0% found this document useful (0 votes)
5 views

TOC_Notes-V2 (1)

The document discusses the construction of Deterministic Finite Automata (DFA) for various string acceptance criteria involving characters 'a' and 'b', as well as '0' and '1'. It includes specific problems such as accepting strings starting with 'ab', ending with '011', containing substrings like 'aa' or excluding 'aab', and conditions on the parity of occurrences of 'a's and 'b's. Additionally, it defines regular languages in relation to DFAs.

Uploaded by

Amann Adil
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

TOC_Notes-V2 (1)

The document discusses the construction of Deterministic Finite Automata (DFA) for various string acceptance criteria involving characters 'a' and 'b', as well as '0' and '1'. It includes specific problems such as accepting strings starting with 'ab', ending with '011', containing substrings like 'aa' or excluding 'aab', and conditions on the parity of occurrences of 'a's and 'b's. Additionally, it defines regular languages in relation to DFAs.

Uploaded by

Amann Adil
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Theory of Computation

Classes of automata

Deterministic finite automata-problems

1. Obtain a DFA to accept strings of a’s and b’s starting with the string ab.

Solution: Write M = (Q, Σ, δ, q0, F) and construct DFA transition table, take an example and
show for the acceptance of accepted string and rejected string. Refer the slides.

Fig: Transition diagram to accept string ab (a+b)*

So, the DFA which accepts strings of a’s and b’s starting with the string ab is given by

M = ( Q, Σ, δ, q0, F) where

Q = {q0, q1, q2, q3}

Σ = {a, b}

q0 is the start state

F = {q2} is the final state

δ is shown the transition table.

2. Draw a DFA to accept string of 0’s and 1’s ending with the string 011.

3. Obtain a DFA to accept strings of a’s and b’s having a sub string aa

School of CSE, REVA University Page 1


Theory of Computation

4. Obtain a DFA to accept strings of a’s and b’s except those containing the substring aab.

5. Obtain DFAs to accept strings of a’s and b’s having exactly one a.

6. Obtain a DFA to accept strings of a’s and b’s having even number of a’s and b’s

The machine to accept even number of a’s and b’s.

7. Obtain a DFA to accept strings of a’s and b’s having odd number of a’s and even
number of b’s.

The machine to accept odd number of a’s and even number of b’s.

8. Obtain a DFA to accept strings of a’s and b’s having even number of a’s and odd
number of b’s.

The machine to accept even number of a’s and odd number of b’s.

School of CSE, REVA University Page 2


Theory of Computation

9. Obtain a DFA to accept strings of a’s and b’s having odd number of a’s and odd number
of b’s.

The machine to accept odd number of a’s and odd number of b’s.

Regular language

Definition: Let M = ( Q, Σ, δ, q0, F) be a DFA. The language L is regular if there exists a


machine M such that L = L(M).

School of CSE, REVA University Page 3

You might also like