2 votes 2 votes Here is the DFA and I need to convert it to regular expression. I get two different answers when removing states in different order. i get b(c+ab)*d when I remove B first and then A while I get (bc*a)*bc*d when I eliminate A first. Which one is right? Theory of Computation regular-expression + – manish.anand asked Jul 5, 2017 • retagged May 22, 2020 by soujanyareddy13 manish.anand 503 views answer comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments joshi_nitish commented Jul 5, 2017 reply Follow Share your regular expression will not generate "acbad"...which is in language.. 0 votes 0 votes Arunav Khare commented Jul 5, 2017 reply Follow Share Thanks for pointing. I edited the comment 1 votes 1 votes Nitesh Choudhary commented Jul 5, 2017 reply Follow Share i also got same ................... if you remove B first you will get (ac*b)*ac*d else if A first you will get a(c+bac*)*d first and second regular expressions are equivalent. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes the correct regex will be $a(c+ba)^{*}d$. step1 : (c+ba)* is a loop occur at state B step2: to reach A to B a is needed and from b to c "d" is needed. BASANT KUMAR answered Aug 17, 2019 BASANT KUMAR comment Share Follow See all 0 reply Please log in or register to add a comment.