What are the identity rules for regular expression?

Data Structure AlgorithmsComputer ScienceComputers

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
Updated on 12-Jun-2021 10:14:19