0% found this document useful (0 votes)
10 views3 pages

Automata Theory Exercise Solutions

The document provides solutions to exercises on automata theory, specifically analyzing a DFA and an NFA. The DFA accepts the string 'baab' and 'abaaab' while rejecting 'baba' and 'abab'. The NFA accepts the string 'aabb' as it leads to accepting states.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

Automata Theory Exercise Solutions

The document provides solutions to exercises on automata theory, specifically analyzing a DFA and an NFA. The DFA accepts the string 'baab' and 'abaaab' while rejecting 'baba' and 'abab'. The NFA accepts the string 'aabb' as it leads to accepting states.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Automata Theory Exercise Solutions

Exercise 1: DFA Analysis


Given information: M is a DFA with state diagram showing states q₀ (initial), q₁, and q₂ (accepting)
a) Transition table of M
State a b
→q₀ q₁ q₀
q₁ q₁ q₂
q₂ q₀ q₁
Note: → indicates initial state, * indicates accepting state
b) String acceptance check
Analysis of whether strings baba, baab, abab, abaaab are accepted:
1. baba:
Start: q₀
b → q₀
a → q₁
b → q₂
a → q₀
End state: q₀ (non-accepting)
Result: NOT ACCEPTED
2. baab:
Start: q₀
b → q₀
a → q₁
a → q₁
b → q₂
End state: q₂ (accepting)
Result: ACCEPTED
3. abab:
Start: q₀
a → q₁
b → q₂
a → q₀
b → q₀
End state: q₀ (non-accepting)
Result: NOT ACCEPTED
4. abaaab:
Start: q₀
a → q₁
b → q₂
a → q₀
a → q₁
a → q₁
b → q₂
End state: q₂ (accepting)
Result: ACCEPTED
Exercise 2: NFA Analysis
Given information: M is a nondeterministic finite automaton
a) Transition table of M
State a b
→q₀ {q₀, q₁} ∅

q₁ ∅ {q₀, q₂}
q₂ ∅ {q₁, q₂}
Note: → indicates initial state, * indicates accepting state, ∅ represents empty set
b) Trace all computations of the string aabb in M
Step 1: Start at initial state q₀
Read 'a': From q₀ with 'a' → {q₀, q₁}
Current state set: {q₀, q₁}
Step 2: Process second symbol 'a' from states {q₀, q₁}
From q₀ with 'a' → {q₀, q₁}
From q₁ with 'a' → ∅
Current state set: {q₀, q₁}
Step 3: Process third symbol 'b' from states {q₀, q₁}
From q₀ with 'b' → ∅
From q₁ with 'b' → {q₀, q₂}
Current state set: {q₀, q₂}
Step 4: Process fourth symbol 'b' from states {q₀, q₂}
From q₀ with 'b' → ∅
From q₂ with 'b' → {q₁, q₂}
Final state set: {q₁, q₂}
c) Is aabb in L(M)?
Since the final state set {q₁, q₂} contains accepting states (both q₁ and q₂ are accepting states), the
string "aabb" IS ACCEPTED by the NFA and is in L(M).

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy