- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are the identity rules for regular expression?
The two regular expression’s P and Q are equivalent (denoted as P=Q) if and only if P represents the same set of strings as Q does.
For showing the equivalence of two regular expressions we need to show some identities of regular expression’s
Let P, Q and R be the regular expressions then the identity rules are as follows −
- εR=R ε=R
- ε*= ε ε is null string
- (Φ)*= ε Φ is empty string
- ΦR=R Φ= Φ
- Φ+R=R
- R+R=R
- RR*=R*R=R+
- (R*)*=R*
- Ε+RR*=R*
- (P+Q)R=PR+QR
- (P+Q)*=(P*Q*)*=(P*+Q*)*
- R*(ε+R)=( ε+R)R*=R*
- (R+ε)*=R*
- Ε+R*=R*
- (PQ)*P=P(QP)*
- R*R+R=R*R
Advertisements