3

I am trying to convert this finite automata to a regular expression using state removal. When removing a state, I know that I should look at all outgoing and incoming transitions, and make sure sure that all paths though the soon to be removed state are preserved. However, I still find this entire concept a bit confusing. I have attached an image of a practice problem I've attempted, and I was wondering if it was correct. I would also appreciate any tips for tackling these types of problems.

fa-to-regex

pythonbeginner4556
  • 313
  • 1
  • 5
  • 14
  • I have a question, at step1) we cannot reach B just by 0 but at step 2) we can reach B just by 0. can you explain about adding +0 at your expression in 0*1+0 ? – Rebin May 08 '16 at 17:15
  • Yeah that was the confusing part for me. There is a transition from C to A with an input of 0.. I wasn't sure where else to incorporate it so I put the +0 there. Perhaps I should remove it all together...because wouldn't 0*1 work on its own? – pythonbeginner4556 May 08 '16 at 17:23
  • post your code not images. – Pedro Lobito May 08 '16 at 17:46
  • This is a good question and sorry I cannot solve it right now, on my way. but your final regx is accepting '001' but your original is not accepting it. Am I right? – Rebin May 08 '16 at 17:50
  • Rebin: yes, I see that. I am trying to see if I can fix that – pythonbeginner4556 May 08 '16 at 17:59

1 Answers1

2

I am not sure if this is a correct solution. (by the way I dont know if we can delete A at first step) enter image description here

Rebin
  • 516
  • 1
  • 6
  • 16