The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
133 views

Can I write a* + b* = (a + b)* ????

asked in Theory of Computation by (149 points) | 133 views
0
NO  you cannot write
0
To check equivalence of two regex create minimal DFA for both regex and if they are same then yes they are equivalent.
0

sumit goyal 1 please explain the difference 

+1
a* + b *  wil give { a , aa ,aaa ,aaaa ,......  , b,bb,bbb,bbbb,bbbb  , epsilon }

(a+b)* will give all possible combinations
0
so how to create a DFA for this? a* + b *
0

It is drawn like this

0

sumit goyal 1 You forgot dead state.$4$ states will be there moreover first state is final

0
i cretaed a nfa , so i didnot take dead state ,

3 Answers

+1 vote

$1^{st}$ one is RHS.
$2^{nd}$ one is LHS.
LHS $\neq$ RHS

answered by Active (1.5k points)
0 votes
answered by Junior (979 points)
0 votes

No ,because both are not same as u can see by the 1st REstring produce like ab,aabb.a,b,aa,bbetc but u can't get string like aba,aaabbabab,ababa etc .

whereas by the 2nt RE u will get all string produce by a and b.

answered by (163 points)

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

39,823 questions
46,798 answers
140,950 comments
58,888 users