0% found this document useful (0 votes)
14 views66 pages

Automata ch1

The document provides an overview of the theory of automata, focusing on the study of abstract machines and their computation capabilities. It explains key concepts such as states, transitions, symbols, alphabets, strings, and languages, and distinguishes between deterministic finite automata (DFA) and non-deterministic finite automata (NFA). Additionally, it includes examples of transition diagrams and tables to illustrate how finite automata operate and accept or reject input strings.

Uploaded by

alula girma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views66 pages

Automata ch1

The document provides an overview of the theory of automata, focusing on the study of abstract machines and their computation capabilities. It explains key concepts such as states, transitions, symbols, alphabets, strings, and languages, and distinguishes between deterministic finite automata (DFA) and non-deterministic finite automata (NFA). Additionally, it includes examples of transition diagrams and tables to illustrate how finite automata operate and accept or reject input strings.

Uploaded by

alula girma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 66

College of engineering and technology

School of computing and informatics


AutomataDepartment
and Complexity
of computer science Theory
Chapter one
Theory of automata

Theory of automata is a theoretical branch of computer


science and mathematical.
 It is the study of abstract machines and the computation
problems that can be solved using these machines.
The abstract machine is called the automata.

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Continue…

This automaton consists of states and transitions. The State is


represented by circles, and the Transitions is represented by arrows.
Transition
State

End of state

• Automata is the kind of machine which takes some string as input and
this input goes through a finite number of states and may enter in the final
state.
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Basic terminologies that are important and frequently used in automata:

• 1. Symbols: Symbols are an entity or individual objects, which can be any


letter, alphabet or any picture.
Example: 1, a, b, #
• 2. Alphabets: Alphabets are a finite set of symbols. It is denoted by ∑.
Examples:
∑ = {a, b} ,
∑ = {A, B, C, D}
∑ = {0, 1, 2}
∑ = {0, 1, ....., 5]
∑ = {#, β, Δ}
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Continue..

3. String: It is a finite collection of symbols from the alphabet. The string is denoted
by w.
• Example 1:
If ∑ = {a, b}, various string that can be generated from ∑ are {ab, aa, aaa, bb, bbb,
ba, aba.....}.
A string with zero occurrences of symbols is known as an empty string. It is
represented by ε.
• The number of symbols in a string w is called the length of a string. It is denoted by
|w|.
• Example 2: w = 010
Number of Sting |w| = 3
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Continue..

4. Language: A language is a collection of appropriate string.


A language which is formed over Σ can be Finite or Infinite.
Example: 1 of string of length 2} = {aa, bb, ba, bb}
L1 = {Set
Finite Language

Example: 2
L2 = {Set of all strings starts with 'a'} = {a, aa, aaa, abb, abbb, ababb}
Infinite Language

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Finite Automata

Finite automata are used to recognize patterns.


It takes the string of symbol as input and changes its state
accordingly. When the desired symbol is found, then the transition
occurs.
At the time of transition, the automata can either move to the next
state or stay in the same state.
Finite automata have two states, Accept state or Reject state. When
the input string is processed successfully, and the automata reached its
final state, then it will accept.
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Formal Definition of FA

A finite automaton is a collection of 5-tuple (Q, ∑, δ, q0,


F), where

Q: finite set of states


∑: finite set of the input symbol
q0: initial state
F: final state
δ: Transition function
03/11/2025 For third year CS student by Gezahiegn.T In 2022
There are two types of finite automata:

1. DFA(deterministic finite automata)


2. NFA(non-deterministic finite automata)

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Continue..

DFA: Deterministic refers to the uniqueness of the computation.


 In the DFA, the machine goes to one state only for a particular input
character.
DFA does not accept the null move.

NFA: It is used to transmit any number of states for a particular input.


 It can accept the null move.

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Some important points about DFA and NFA:

Every DFA is NFA, but NFA is not DFA.

There can be multiple final states in both NFA and DFA.

DFA is used in Lexical Analysis in Compiler.

NFA is more of a theoretical concept.

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Transition Diagram

A transition diagram or state transition diagram is a directed graph


which can be constructed as follows:
There is a node for each state in Q, which is represented by the circle.

There is a directed edge from node q to node p labeled a if δ(q, a) = p.

In the start state, there is an arrow with no source.

Accepting states or final states are indicating by a double circle.


03/11/2025 For third year CS student by Gezahiegn.T In 2022
Notations that are used in the transition diagram:

03/11/2025 For third year CS student by Gezahiegn.T In 2022


There is a description of how a DFA operates:

1. In DFA, the input to the automata can be any string.


Now, put a pointer to the start state q and read the input string w from
left to right and move the pointer according to the transition function,
δ.
We can read one symbol at a time. If the next symbol of string w is a
and the pointer is on state p, move the pointer to δ(p, a).
When the end of the input string w is encountered, then the pointer is
on some state F.

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Continue..

2. The string w is said to be accepted by the DFA if r ∈ F that means


the input string w is processed successfully and the automata reached
its final state.
The string is said to be rejected by DFA if r ∉ F.

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Continue..

• Example 1:
• DFA with ∑ = {0, 1} accepts all strings starting with 1.
• Solution:

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Continue..

The finite automata can be represented using a transition graph. In the


previous diagram, the machine initially is in start state q0 then on
receiving input 1 the machine changes its state to q1. From q0 on
receiving 0, the machine changes its state to q2, which is the dead state.
From q1 on receiving input 0, 1 the machine changes its state to q1, which
is the final state. The possible input strings that can be generated are 10,
11, 110, 101, 111......., that means all string starts with 1.
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Continue..

• Example 2:
• NFA with ∑ = {0, 1} accepts all strings starting with 1.
• Solution:

The NFA can be represented using a transition graph. In the above


diagram, the machine initially is in start state q0 then on receiving input
1 the machine changes its state to q1. From q1 on receiving input 0, 1
the machine changes its state to q1. The possible input string that can be
generated is 10, 11, 110, 101, 111......, that means all string starts with 1.

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Transition Table
The transition table is basically a tabular representation of the
transition function. It takes two arguments (a state and a symbol) and
returns a state (the "next state").
A transition table is represented by :
Columns correspond to input symbols.
Rows correspond to states.
Entries correspond to the next state.
The start state is denoted by an arrow with no source.
The accept state is denoted by a star.
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Continue..

Example 1:

Solution:
• Transition table of given DFA is as follows:

Present State Next state for Input 0 Next State of Input 1

→q0 q1 q2

q1 q0 q2

*q2 q2 q2

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Explanation:

In the above table, the first column indicates all the current states. Under
column 0 and 1, the next states are shown.
The first row of the transition table can be read as, when the current state is
q0, on input 0 the next state will be q1 and on input 1 the next state will be
q2.
In the second row, when the current state is q1, on input 0, the next state
will be q0, and on 1 input the next state will be q2.
In the third row, when the current state is q2 on input 0, the next state will
be q2, and on 1 input the next state will be q2.
The arrow marked to q0 indicates that it is a start state and circle marked to
q2 indicates that it is a final state.
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Example 2:

Solution:

Transition table of given NFA is as follows:


Present State Next state for Input 0 Next State of Input 1

→q0 q0 q1
q1 q1, q2 q2
q2 q1 q3
*q3 q2 q2

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Explanation:
The first row of the transition table can be read as, when the current
state is q0, on input 0 the next state will be q0 and on input 1 the next
state will be q1.
In the second row, when the current state is q1, on input 0 the next
state will be either q1 or q2, and on 1 input the next state will be q2.
In the third row, when the current state is q2 on input 0, the next state
will be q1, and on 1 input the next state will be q3.
In the fourth row, when the current state is q3 on input 0, the next
state will be q2, and on 1 input the next state will be q2.

03/11/2025 For third year CS student by Gezahiegn.T In 2022


DFA (Deterministic finite automata)
DFA refers to deterministic finite automata. Deterministic refers to the
uniqueness of the computation. The finite automata are called
deterministic finite automata if the machine is read an input string one
symbol at a time.
In DFA, there is only one path for specific input from the current state
to the next state.
DFA does not accept the null move, i.e., the DFA cannot change state
without any input character.
DFA can contain multiple final states. It is used in Lexical Analysis in
Compiler.
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Continue..
In the following diagram, we can see that from state q0 for input a,
there is only one path which is going to q1. Similarly, from q0, there is
only one path for input b going to q2.

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Formal Definition of DFA
A DFA is a collection of 5-tuples same as we described in the
definition of FA.
Q: finite set of states
∑: finite set of the input symbol
q0: initial state
F: final state
δ: Transition function
Transition function can be defined as:
δ: Q x ∑→Q
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Graphical Representation of DFA
A DFA can be represented by digraphs called state diagram. In which:
The state is represented by vertices.
The arc labeled with an input character show the transitions.
The initial state is marked with an arrow.
The final state is denoted by a double circle.
Example 1:
Q = {q0, q1, q2}
∑ = {0, 1}
q0 = {q0}
F = {q2}
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Continue..
• Solution:
• Transition Diagram:
Transition Table:

Present State Next state for Input 0 Next State of Input 1

→q0 q0 q1

q1 q2 q1

*q2 q2 q2

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Example 2:
• DFA with ∑ = {0, 1} accepts all starting with 0.
• Solution:

• Explanation:
• In the above diagram, we can see that on given 0 as input to DFA in state q0
the DFA changes state to q1 and always go to final state q1 on starting input
0. It can accept 00, 01, 000, 001.... etc. It can't accept any string which starts
with 1, because it will never go to final state on a string starting with 1.
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Example 3:

• DFA with ∑ = {0, 1} accepts all ending with 0.


• Solution:

• Explanation:
• In the above diagram, we can see that on given 0 as input to DFA in
state q0, the DFA changes state to q1. It can accept any string which
ends with 0 like 00, 10, 110, 100....etc. It can't accept any string which
ends with 1, because it will never go to the final state q1 on 1 input, so
the string ending with 1, will not be accepted or will be rejected.
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Example 4:
Design a FA with ∑ = {0, 1} accepts those string which starts with 1 and ends
with 0.
Solution:
The FA will have a start state q0 from which only the edge with input 1 will
go to the next state.

In state q1, if we read 1, we will be in state q1, but if we read 0 at state q1, we
will reach to state q2 which is the final state. In state q2, if we read either 0 or
1, we will go to q2 state or q1 state respectively. Note that if the input ends
with 0, it will be in the final state.
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Example 5:
Design a FA with ∑ = {0, 1} accepts the only input 101.
Solution:

In the given solution, we can see that only input 101 will be accepted.
Hence, for input 101, there is no other path shown for other input.

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Example 6:
Design FA with ∑ = {0, 1} accepts the set of all strings with three
consecutive 0's.
Solution:
The strings that will be generated for this particular languages are
000, 0001, 1000, 10001, .... in which 0 always appears in a clump of 3.
The transition graph is as follows:

03/11/2025 For third year CS student by Gezahiegn.T In 2022


NFA (Non-Deterministic finite
automata)
NFA stands for non-deterministic finite automata. It is easy to construct an
NFA than DFA for a given regular language.
The finite automata are called NFA when there exist many paths for specific
input from the current state to the next state.
Every NFA is not DFA, but each NFA can be translated into DFA.

NFA is defined in the same way as DFA but with the following two
exceptions, it contains multiple next states, and it contains ε transition.
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Continue..

In the following image, we can see that from state q0 for input a, there
are two next states q1 and q2, similarly, from q0 for input b, the next
states are q0 and q1. Thus it is not fixed or determined that with a
particular input where to go next. Hence this FA is called non-
deterministic finite automata.

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Formal definition of NFA:

NFA also has five states same as DFA, but with different
transition function, as shown follows:
δ: Q x ∑ →2Q
where,
•Q: finite set of states
•∑: finite set of the input symbol
•q0: initial state
•F: final state
•δ: Transition function

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Graphical Representation of an
NFA
An NFA can be represented by digraphs called state diagram. In which:
The state is represented by vertices.
The arc labeled with an input character show the transitions.
The initial state is marked with an arrow.
The final state is denoted by the double circle.
Example 1:
Q = {q0, q1, q2}
∑ = {0, 1}
q0 = {q0}
F = {q2}
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Continue..
• Solution:
• Transition diagram:

• Transition Table:
Present State Next state for Next State of Input
Input 0 1
→q0 q0, q1 q1
q1 q2 q0
*q2 q2 q1, q2

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Continue..
In the above diagram, we can see that when the current state is q0, on
input 0, the next state will be q0 or q1, and on 1 input the next state
will be q1. When the current state is q1, on input 0 the next state will
be q2 and on 1 input, the next state will be q0. When the current state
is q2, on 0 input the next state is q2, and on 1 input the next state will
be q1 or q2.

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Example 2:
• NFA with ∑ = {0, 1} accepts all strings with 01.
• Solution:
Transition Table:

Present State Next state for Next State of


Input 0 Input 1
→q0 q1 ε
q1 Ε q2
*q2 q2 q2

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Example 3:
• NFA with ∑ = {0, 1} and accept all string of length at least 2.
• Solution:
Transition Table:
Present State Next state for Input 0 Next State of Input 1

→q0 q1 q1
q1 q2 q2
*q2 Ε ε

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Exercise of NFA
Exercise 1:
• Design a NFA for the transition table as given below:

Present State 0 1
→q0 q0, q1 q0, q2
q1 q3 ε
q2 q2, q3 q3
→q3 q3 q3

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Continue..
• Solution:
• The transition diagram can be drawn by using the mapping function
as given in the table.

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Continue..
• Here,
• δ(q0, 0) = {q0, q1}
• δ(q0, 1) = {q0, q2}
• Then, δ(q1, 0) = {q3}
• Then, δ(q2, 0) = {q2, q3}
• δ(q2, 1) = {q3}
• Then, δ(q3, 0) = {q3}
• δ(q3, 1) = {q3}

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Continue..
• Design an NFA with ∑ = {0, 1} accepts all string ending with 01.
• Solution:
Hence, NFA would be:
• Design an NFA with ∑ = {0, 1} in which double '1' is followed by double
'0'.
• Solution:
• The FA with double 1 is as follows:
• It should be immediately followed by double 0.
• Then,
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Continue..
Now before double 1, there can be any string of 0 and 1. Similarly, after
double 0, there can be any string of 0 and 1.
Hence the NFA becomes:

• Now considering the string 01100011


• q0 → q1 → q2 → q3 → q4 → q4 → q4 → q4

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Eliminating ε Transitions
NFA with ε can be converted to NFA without ε, and this NFA without
ε can be converted to DFA. To do this, we will use a method, which
can remove all the ε transition from given NFA. The method will be:
Find out all the ε transitions from each state from Q. That will be
called as ε-closure{q1} where qi ∈ Q.
Then δ' transitions can be obtained. The δ' transitions mean a ε-
closure on δ moves.
Repeat Step-2 for each input symbol and each state of given NFA.
Using the resultant states, the transition table for equivalent NFA
without ε can be built.
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Example:
• Convert the following NFA with ε to NFA without ε.

• Solutions: We will first obtain ε-closures of q0, q1 and q2 as follows:


1. ε-closure(q0) = {q0}
2. ε-closure(q1) = {q1, q2}
3. ε-closure(q2) = {q2}

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Continue..
• Now the δ' transition on each input symbol is obtained as:
• Keep Watching
• δ'(q0, a) = ε-closure(δ(δ^(q0, ε),a))
• = ε-closure(δ(ε-closure(q0),a))
• = ε-closure(δ(q0, a))
• = ε-closure(q1)
• = {q1, q2}

• δ'(q0, b) = ε-closure(δ(δ^(q0, ε),b))
• = ε-closure(δ(ε-closure(q0),b))
• = ε-closure(δ(q0, b))
• =Ф
• Now the δ' transition on q1 is obtained as:
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Continue..
• Now the δ' transition on q1 is obtained as:
• δ'(q1, a) = ε-closure(δ(δ^(q1, ε),a))
• = ε-closure(δ(ε-closure(q1),a))
• = ε-closure(δ(q1, q2), a)
• = ε-closure(δ(q1, a) ∪ δ(q2, a))
• = ε-closure(Ф ∪ Ф)
• =Ф

• δ'(q1, b) = ε-closure(δ(δ^(q1, ε),b))
• = ε-closure(δ(ε-closure(q1),b))
• = ε-closure(δ(q1, q2), b)
• = ε-closure(δ(q1, b) ∪ δ(q2, b))
• = ε-closure(Ф ∪ q2)
• = {q2}
• The δ' transition on q2 is obtained as:
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Continue..
• The δ' transition on q2 is obtained as:
• δ'(q2, a) = ε-closure(δ(δ^(q2, ε),a))
• = ε-closure(δ(ε-closure(q2),a))
• = ε-closure(δ(q2, a))
• = ε-closure(Ф)
• =Ф

• δ'(q2, b) = ε-closure(δ(δ^(q2, ε),b))
• = ε-closure(δ(ε-closure(q2),b))
• = ε-closure(δ(q2, b))
• = ε-closure(q2)
• = {q2}
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Continue..
• Now we will summarize all the computed δ' transitions:
• δ'(q0, a) = {q0, q1}
• δ'(q0, b) = Ф
• δ'(q1, a) = Ф
• δ'(q1, b) = {q2}
• δ'(q2, a) = Ф
• δ'(q2, b) = {q2}

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Continue..
The transition table can be:
States a b

→q0 {q1, q2} Ф

*q1 Ф {q2}

*q2 Ф {q2}

State q1 and q2 become the final state as ε-closure of q1 and q2


contain the final state q2. The NFA can be shown by the following
transition diagram:

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Steps for converting NFA to
DFA:
Step 1: Initially Q' = ϕ

Step 2: Add q0 of NFA to Q'. Then find the transitions from this start state.

Step 3: In Q', find the possible set of states for each input symbol. If this
set of states is not in Q', then add it to Q'.
Step 4: In DFA, the final state will be all the states which contain F(final
states of NFA)

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Example 1:
• Convert the given NFA to DFA.

Solution: For the given transition diagram we will first construct the
transition table. State 0 1
→q0 q0 q1
q1 {q1, q2} q1
*q2 q2 {q1, q2}

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Continue..
Now we will obtain δ' transition for state q0.
• δ'([q0], 0) = [q0]
• δ'([q0], 1) = [q1]
The δ' transition for state q1 is obtained as:
• δ'([q1], 0) = [q1, q2] (new state generated)
• δ'([q1], 1) = [q1]
The δ' transition for state q2 is obtained as:
• δ'([q2], 0) = [q2]
• δ'([q2], 1) = [q1, q2]
• Now we will obtain δ' transition on [q1, q2].
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Continue..

• δ'([q1, q2], 0) = δ(q1, 0) ∪ δ(q2, 0)
• = {q1, q2} ∪ {q2}
• = [q1, q2]
• δ'([q1, q2], 1) = δ(q1, 1) ∪ δ(q2, 1)
• = {q1} ∪ {q1, q2}
• = {q1, q2}
• = [q1, q2]
• The state [q1, q2] is the final state as well because it contains a final state q2.
The transition table for the constructed DFA will be:
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Continue..

State 0 1
→[q0] [q0] [q1]
[q1] [q1, q2] [q1]
*[q2] [q2] [q1, q2]
*[q1, q2] [q1, q2] [q1, q2]

The Transition diagram will be:

The state q2 can be eliminated because q2 is an


unreachable state.
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Assignment
• Convert the given NFA to DFA.

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Conversion from NFA with ε to DFA

• NFA with ∈ move: If any FA contains ε transaction or move, the

finite automata is called NFA with ∈ move.

• ε-closure: ε-closure for a given state A means a set of states which can

be reached from the state A with only ε(null) move including the state

A itself.
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Steps for converting NFA with ε
to DFA:
Step 1: We will take the ε-closure for the starting state of NFA as a
starting state of DFA.
Step 2: Find the states for each input symbol that can be traversed from
the present. That means the union of transition value and their closures
for each state of NFA present in the current state of DFA.
Step 3: If we found a new state, take it as current state and repeat step 2.
Step 4: Repeat Step 2 and Step 3 until there is no new state present in
the transition table of DFA.
Step 5: Mark the states of DFA as a final state which contains the final
state of NFA.
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Example 1:
• Convert the NFA with ε into its equivalent DFA.

• Solution:

• Let us obtain ε-closure of each state.


• ε-closure {q0} = {q0, q1, q2}
• ε-closure {q1} = {q1}
• ε-closure {q2} = {q2}
• ε-closure {q3} = {q3}
• ε-closure {q4} = {q4}
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Continue..
Now, let ε-closure {q0} = {q0, q1, q2} be state A.
Hence
δ'(A, 0) = ε-closure {δ((q0, q1, q2), 0) }
= ε-closure {δ(q0, 0) ∪ δ(q1, 0) ∪ δ(q2, 0) }
= ε-closure {q3}
= {q3} call it as state B.
δ'(A, 1) = ε-closure {δ((q0, q1, q2), 1) }
= ε-closure {δ((q0, 1) ∪ δ(q1, 1) ∪ δ(q2, 1) }
= ε-closure {q3}
= {q3} = B.
The partial DFA will be

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Continue..
Now,
δ'(B, 0) = ε-closure {δ(q3, 0) }
= ϕδ'(B, 1)
= ε-closure {δ(q3, 1) }
= ε-closure {q4}
= {q4} i.e. state C
For state C:
δ'(C, 0) = ε-closure {δ(q4, 0) }

δ'(C, 1) = ε-closure {δ(q4, 1) }

The DFA will be,
03/11/2025 For third year CS student by Gezahiegn.T In 2022
Assignment 2
Convert the given NFA into its equivalent DFA.

03/11/2025 For third year CS student by Gezahiegn.T In 2022


Assignment 3
Minimization of DFA steps with example

03/11/2025 For third year CS student by Gezahiegn.T In 2022

You might also like