• edited by
2,790 views

2 Answers

5 5 votes
Look we can compare regular expressions by constructing their DFA

If L(M1)=L(M2)

Now for each N input Regular Expression there will be At most 2^n States in it's DFA(may be less, but this is the upper bound)

so simply the complexity will be O(2^n)

correct me,if needed :D
0 0 votes
A) Constant time

Equality of two regular expression is decidable. Decidable means 'yes' and 'no' answer is possible in finite amount of time. Because it will not causing any loop. So, equality of two regular expression can be measured in constant time.
Position:
Show:

Related questions

0 0 votes
1 answers 1 answer
1.2k
1.2k views
sripo asked Oct 10, 2018
1,174 views
Can you please draw the DFA for given regex (ab*)*
2 2 votes
4 4 answers
1.5k
1.5k views
0 0 votes
1 1 answer
1.0k
1.0k views
Namit Dhupar asked Dec 2, 2017
1,038 views
Can someone please explain me how could we derive the RE from FA's ... Here https://gateoverflow.in/464/gate2008-52PS- Obviously the answer can be easily obtained using ...
1 1 vote
2 2 answers
3.3k
3.3k views
shekhar chauhan asked Jun 8, 2016
3,267 views
If r1 and r2 are 2 Regular Expression Such thatr1 = (a+b)* r2 = (a*+b*+a*b*+b*a*)What are the different case's in which r1 = r2 ?Please Explain with an example