DFA Exercises and Problems: Theory of Computation, Assignments of Theory of Computation

A set of exercises and problems related to deterministic finite automata (dfa) within the theory of computation. It includes questions on dfa construction, key features, string acceptance, and scenario-based problems involving automaton analysis, transition tables, language definition, and behavior analysis. The exercises are designed to test understanding of dfa concepts and their application in recognizing regular languages. It is useful for students studying computer science and formal languages, offering practical problems to reinforce theoretical knowledge. Dfa construction for specific languages, identification of dfa components, and analysis of dfa behavior on different input strings. It also includes scenario-based problems that require defining languages accepted by dfas and tracing state sequences for given inputs.

Typology: Assignments

2024/2025

Uploaded on 09/17/2025

vishruth-gowda
vishruth-gowda 🇮🇳

2 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Week 02: Theory of Computation
Prof. Ashwini Kumar Mathur
August 2025
DFA Construction:
Q1. Draw the DFA for the language over the alphabet Σ = {0,1}that accepts all strings
ending with an odd number of 0s.
Q2. Construct a DFA state diagram over Σ = {0,1}that accepts all binary strings that
start and end with 0.
Q3. Construct a DFA state diagram over Σ = {0,1}that accepts all binary strings that
start and end with different symbols.
Short Questions
Q1. Which of the following is a key feature of a DFA?
a) Only one start state
b) Multiple transitions for the same symbol from a state
c) No final state
d) Multiple start states
Q2. The set of input symbols for a Finite Automaton is called:
a) State set
b) Alphabet
c) Transition
d) Configuration
Q3. A DFA accepts a string if:
a) It ends in any state
b) It ends in a final state
c) The input contains only zeros
d) It starts with a final state
1
pf3
pf4
pf5

Partial preview of the text

Download DFA Exercises and Problems: Theory of Computation and more Assignments Theory of Computation in PDF only on Docsity!

Week 02: Theory of Computation

Prof. Ashwini Kumar Mathur

August 2025

DFA Construction:

Q1. Draw the DFA for the language over the alphabet Σ = { 0 , 1 } that accepts all strings ending with an odd number of 0s.

Q2. Construct a DFA state diagram over Σ = { 0 , 1 } that accepts all binary strings that start and end with 0.

Q3. Construct a DFA state diagram over Σ = { 0 , 1 } that accepts all binary strings that start and end with different symbols.

Short Questions

Q1. Which of the following is a key feature of a DFA?

a) Only one start state b) Multiple transitions for the same symbol from a state c) No final state d) Multiple start states

Q2. The set of input symbols for a Finite Automaton is called:

a) State set b) Alphabet c) Transition d) Configuration

Q3. A DFA accepts a string if:

a) It ends in any state b) It ends in a final state c) The input contains only zeros d) It starts with a final state

Q4. Which is NOT true for a DFA?

a) Each state has exactly one transition for each symbol b) It may have λ (epsilon) transitions c) Has a finite set of states d) Has a transition function

Q5. If Σ = {a, b}, what string is accepted by a DFA that accepts

only the empty string?

a) ”a” b) ”b” c) ”ab” d) None of these

Q6. A DFA can be used to recognize:

a) Regular languages b) Context-free languages c) Context-sensitive languages d) All languages

Q7. Which of the following is not a component of a DFA?

a) Set of states b) Stack c) Start state d) Set of input symbols

Q8. The number of transitions from a state in a DFA (having k

input symbols) is:

a) At least k b) At most k c) Exactly k d) Any number

Q9. A DFA is called deterministic because:

a) It has non-deterministic choices b) It has multiple transitions for a symbol c) Next state is uniquely determined for each input symbol d) It can contain loops

Question 3: DFA Language Definition and Trace

(a) Define the language accepted by this DFA.

(b) Which is the shortest string that is not accepted by the DFA?

(c) Give the sequence of states visited when the DFA processes the input string babb.

(d) Is the string aababb accepted? Show the complete state sequence.

Question 4: Language and Behaviour Analysis

(a) What language does this DFA accept? Express your answer using set notation or a regular expression.

(b) Describe how the DFA behaves on strings of length at least 3.

(c) Is there any string with less than three occurrences of ’a’ that is rejected by this DFA? Explain.

(d) Give examples of three strings accepted and three strings rejected by this DFA.

Question 5: FSM Analysis

(a) List all the states and their transitions for each input symbol.

(b) Does the automaton accept the string baab? Trace the state sequence or explain why not.

(c) If the string has exactly two ’a’s, what are all possible strings of length 3 that are accepted?