Regular Expressions to Finite Automata Conversion PDF
Document Details
Uploaded by SafeJasper2740
Tags
Summary
This document provides a guide on converting regular expressions (RE) to Finite Automata (FA). It details the subset method and the steps involved, including constructing a transition diagram for a given RE using Non-deterministic Finite Automata (NFA) with epsilon moves. The document also includes image diagrams of finite automata examples.
Full Transcript
Identity Rules of Regular Expression: - ε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* -...
Identity Rules of Regular Expression: - ε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 **How to convert Regular expression to Finite Automata?** To convert the regular expression (RE) to Finite Automata (FA), we can use the Subset method. Subset method is used to obtain FA from the given RE. - Step 1 − Construct a Transition diagram for a given RE by using non-deterministic finite automata (NFA) with ε moves. - Step 2 − Convert NFA with ε to NFA without ε. - Step 3 − Convert the NFA to the equivalent Deterministic Finite Automata (DFA). ![](media/image2.jpeg) ![](media/image4.jpeg) **Construct a Finite Automata for the regular expression ((a+b) (a+b)) \*.** The language for the given regular expression (RE) is as follows − L= {ε, aa, ab, ba, aaaa,}