Now when i try to construct the epsilon-NFA, the conversion took an insane amount of pages and finally when i put it into the converter to convert it into a DFA, it says 'encountered infinite transition loop'. Firstly I'm not sure if this RegEx is right. Main Menu by School by Literature Title by Subject by Study Guides Textbook Solutions Expert Tutors Earn. The first part is to check for an even number of 0s and the latter part is to ensure that the number of 1s is divisible by 3. test eax eax jg short loc31307D call sub3140F3 jmp short loc3130BC loc31307D from CSE 6388 at University of Texas, Arlington. I ended up with this RegEx- (1*01*01*)*1* | ((0*10*10*10*)*0*)* I think it should make sense that add eax,eax is mathematically equivalent to imul eax, 2, but it takes another step to see that its equivalent to shl eax,1, which is represented in the C code as << 1.This isnt terribly complicated, but its an optimization detail that some might not be familiar with. Does this mean i just '+' the RegEx for -'accepts all strings containing even number of 0's' and the RegEx for- 'the number of 1's divisible by 3'?Īnyways, this was the approach that I'd tried. The very first problem I've encountered was the 'or' mentioned in the question. MrKhonsu Asks: Constructing a deterministic finite automata from a very convoluted RegExĬonstruct a dfa over the alphabet such that it accepts all strings containing even number of 0's OR the number of 1's divisible by 3.
0 Comments
Leave a Reply. |