Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  How many minimum number of states will be the... Start Learning for Free
How many minimum number of states will be there in the DFA accepting all strings (over the alphabet {a,b}) that do not contain two consecutive a’s?
  • a)
    2
  • b)
    3
  • c)
    4
  • d)
    5
Correct answer is option 'B'. Can you explain this answer?
Verified Answer
How many minimum number of states will be there in the DFA accepting a...

First draw FSM for accepting all strings containing consecutive a’s, as shown above. Now change the final states to non final states and non final states to final states to get the required DFA shown below:
View all questions of this test
Most Upvoted Answer
How many minimum number of states will be there in the DFA accepting a...
To construct a DFA that accepts all strings over the alphabet {a, b} that do not contain two consecutive a's, we can start with the initial state and transition to a new state for each symbol in the alphabet.

Let's create a table to represent the transition function of the DFA:

| State | a | b |
|-------|---|---|
| q0 | q1 | q0 |
| q1 | q2 | q0 |
| q2 | q1 | q3 |
| q3 | q3 | q3 |

In this table, each row represents a state of the DFA, and each column represents a symbol in the alphabet. The entry in the table represents the next state that the DFA transitions to when it is in a certain state and reads a certain symbol.

The initial state is q0, and it transitions to q1 when it reads an 'a' and stays in q0 when it reads a 'b'. From q1, it transitions to q2 when it reads an 'a' and stays in q0 when it reads a 'b'. From q2, it transitions to q1 when it reads an 'a' and transitions to q3 when it reads a 'b'. Finally, from q3, it stays in q3 regardless of the symbol it reads.

The accepting state of the DFA is q0, as it represents the state where there are no consecutive 'a's.

Therefore, the minimum number of states in this DFA is 4.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

How many minimum number of states will be there in the DFA accepting all strings (over the alphabet {a,b}) that do not contain two consecutive a’s?a)2b)3c)4d)5Correct answer is option 'B'. Can you explain this answer?
Question Description
How many minimum number of states will be there in the DFA accepting all strings (over the alphabet {a,b}) that do not contain two consecutive a’s?a)2b)3c)4d)5Correct answer is option 'B'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about How many minimum number of states will be there in the DFA accepting all strings (over the alphabet {a,b}) that do not contain two consecutive a’s?a)2b)3c)4d)5Correct answer is option 'B'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for How many minimum number of states will be there in the DFA accepting all strings (over the alphabet {a,b}) that do not contain two consecutive a’s?a)2b)3c)4d)5Correct answer is option 'B'. Can you explain this answer?.
Solutions for How many minimum number of states will be there in the DFA accepting all strings (over the alphabet {a,b}) that do not contain two consecutive a’s?a)2b)3c)4d)5Correct answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of How many minimum number of states will be there in the DFA accepting all strings (over the alphabet {a,b}) that do not contain two consecutive a’s?a)2b)3c)4d)5Correct answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of How many minimum number of states will be there in the DFA accepting all strings (over the alphabet {a,b}) that do not contain two consecutive a’s?a)2b)3c)4d)5Correct answer is option 'B'. Can you explain this answer?, a detailed solution for How many minimum number of states will be there in the DFA accepting all strings (over the alphabet {a,b}) that do not contain two consecutive a’s?a)2b)3c)4d)5Correct answer is option 'B'. Can you explain this answer? has been provided alongside types of How many minimum number of states will be there in the DFA accepting all strings (over the alphabet {a,b}) that do not contain two consecutive a’s?a)2b)3c)4d)5Correct answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice How many minimum number of states will be there in the DFA accepting all strings (over the alphabet {a,b}) that do not contain two consecutive a’s?a)2b)3c)4d)5Correct answer is option 'B'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev