49 49 votes Draw the state transition of a deterministic finite state automaton which accepts all strings from the alphabet $\{a,b\}$, such that no string has $3$ consecutive occurrences of the letter $b$. Theory of Computation gate1993 theory-of-computation finite-automata easy descriptive + – Kathleen 20.7k views answer comment Share Follow Print See all 4 Comments 4 4 Comments reply Bhatti_Bhumit commented Nov 4, 2025 reply Follow flag No String has 3 consecutive occurrences of 'b' | | (complement) V String has 3 consecutive occurrences of 'b' means " String Contains SubString 'bbb' somewhere in it" Create DFA for this than complement it Final state <----> Non final state 1 1 replyShare Gowtham_Kumar commented Jan 28 reply Follow flag we can fist find DFA for 3 consecutive b's using that we find the complement by simply changing the final and non final states of the finite automata and we get our required DFA 0 0 replyShare Kanta_Bhai commented Apr 23 reply Follow flag Question is simple but its analysis is interesting 1 1 replyShare Taniii commented Jul 17 reply Follow flag Reg exp: $$(\epsilon + b + bb)(a + ab + abb)^*$$ 0 0 replyShare Please log in or register to add a comment.
Best answer 88 88 votes Design a DFA that accepts all strings contain $bbb$ regular expression $(a+b)^*bbb(a+b)^*$ then take complement of DFA such that no string has $3$ consecutive occurrences of the letter $b$. having regular expression $(a+ba+bba)^*(\epsilon + b+ bb)$ Praveen Saini answered Mar 3, 2015 • edited Feb 9, 2018 by kenzou Praveen Saini comment Share Follow See all 17 Comments 17 17 Comments reply Show 14 previous comments Shiva Sagar Rao commented Jan 30, 2021 reply Follow flag @pritishc $b$, $bb$ strings are not generated by your regular expression. 0 0 replyShare anon1 commented Jul 1, 2021 reply Follow flag @pritishc it will generate all strings starting with ‘a’ including epsilon. 0 0 replyShare Jatinp commented Apr 24 reply Follow flag @pritishc @raja11sep this will generate all strings starting with a and has no consecutive 3 b's or more 0 0 replyShare Please log in or register to add a comment.
12 12 votes This is the approach for solving the given question:- Aditi0103 answered Jul 20, 2020 Aditi0103 comment Share Follow See 1 comment 1 1 comment reply nobodysomebody commented Aug 20, 2024 reply Follow flag This approach is slightly better for exam point of view it's straightforward 0 0 replyShare Please log in or register to add a comment.
1 1 vote a*((ba+)+(bba+))* Aravind answered Oct 18, 2014 Aravind comment Share Follow See 1 comment 1 1 comment reply anon1 commented Jul 1, 2021 reply Follow flag b, bb these strings are also part of the language which will not be generated by your regular expression. 0 0 replyShare Please log in or register to add a comment.
–2 –2 votes In this ,firstly make the dfa of the language which accept all strings from the alphabet (a,b) such that all string contain three consecutive occurrence of the letter b ,then make non final state as final state and final state as non final,initial state will remain same then it become the dfa that accept all string not containing three consecutive b's. neha pawar answered Oct 18, 2014 neha pawar comment Share Follow See all 11 Comments 11 11 Comments reply Show 8 previous comments Rajesh Panwar commented Dec 8, 2018 reply Follow flag check for string "abbaabba" it also accepted by dfa. 0 0 replyShare anon1 commented Jul 1, 2021 reply Follow flag The first DFA will accept all strings containing at least 3 ‘b’ s. The second DFA will accept all strings containing less than 3 ‘b’ s. 0 0 replyShare Kd7 commented Jan 13 reply Follow flag babb not accepted here 0 0 replyShare Please log in or register to add a comment.