1 votes 1 votes Construct a DFA that accepts a language generated by a grammar S->abA A->baB B->aA|bb Find tha DFA and regular expression Shubham Kumar 7 asked Apr 14, 2018 Shubham Kumar 7 5.0k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes Since there is no null production, so we cannot determine the final state.. This grammar looks incomplete. Hitesh answered Apr 14, 2018 • edited Apr 14, 2018 by Hitesh Hitesh comment Share Follow See all 6 Comments See all 6 6 Comments reply srestha commented Apr 14, 2018 reply Follow Share pic is not DFA it is NFA 0 votes 0 votes Hitesh commented Apr 14, 2018 reply Follow Share corrected... thnkss for pointing out.. 0 votes 0 votes srestha commented Apr 14, 2018 reply Follow Share no the regular expression was ok abba(aba)*bb But as in every state it was not accepting a and b both that is why it was not DFA, it was a NFA Now, if u add a reject state in that diagram, then it will be DFA 1 votes 1 votes Shubham Kumar 7 commented Apr 14, 2018 reply Follow Share where to add a reject state in that transition diagram ... Please show.. 0 votes 0 votes pankaj_vir commented Apr 15, 2018 reply Follow Share https://people.cs.nctu.edu.tw/~wgtzeng/courses/FL2016SpringUnder/HW2-Solutions-2016-Spring.pdf Check question no.14 0 votes 0 votes Hitesh commented Apr 15, 2018 reply Follow Share yes i noticed that mistake..actually we need null production for final state and it was absent in this grammer so i edited my answer..although we can draw dfa using regex..adding a dead state and pointing all missing transitions to dead will do our job.. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes we can drow NFA from the given grammar. abhishekmehta4u answered Apr 28, 2018 abhishekmehta4u comment Share Follow See all 0 reply Please log in or register to add a comment.