Find DFA Equiv: States, Transitions & Function

  • Context: MHB 
  • Thread starter Thread starter evinda
  • Start date Start date
  • Tags Tags
    Dfa Function States
Click For Summary
SUMMARY

The forum discussion focuses on finding a Deterministic Finite Automaton (DFA) equivalent to a given Non-deterministic Finite Automaton (NFA) with specific states: {A}, {B}, {C}, {A,B}, {A,C}, {B,C}, and {A,B,C}. Participants confirm the necessity of including the empty set and discuss the transition function, denoted as δ', which outlines state transitions based on input symbols 0 and 1. Key points include identifying reachable states from the start state {A} and ensuring all states in the DFA are reachable, leading to the conclusion that the DFA must include states {A}, {A,B,C}, and {B,C}.

PREREQUISITES
  • Understanding of Deterministic Finite Automata (DFA) and Non-deterministic Finite Automata (NFA)
  • Familiarity with transition functions in automata theory
  • Knowledge of state reachability concepts in finite automata
  • Basic mathematical notation for set theory and functions
NEXT STEPS
  • Study the construction of DFAs from NFAs using the subset construction method
  • Learn about state minimization techniques for DFAs
  • Explore the implications of unreachable states in finite automata
  • Investigate the role of transition functions in automata design
USEFUL FOR

Computer science students, automata theorists, and software engineers involved in compiler design or formal language processing will benefit from this discussion.

evinda
Gold Member
MHB
Messages
3,741
Reaction score
0
Hello! (Wave)

I want to find a DFA equivalent with the following:

View attachment 5867

Do we have to follow the following procedure?

View attachment 5868

If so do we have to find the transition function having the following states?

$$\{A\} , \{ B \}, \{ C \}, \{ A,B \}, \{ A,C \}, \{ B,C \}, \{A,B,C\}$$
 

Attachments

  • dfa2.png
    dfa2.png
    2.8 KB · Views: 128
  • R.JPG
    R.JPG
    37.3 KB · Views: 103
Physics news on Phys.org
evinda said:
Hello! (Wave)

I want to find a DFA equivalent with the following:
Do we have to follow the following procedure?
If so do we have to find the transition function having the following states?

$$\{A\} , \{ B \}, \{ C \}, \{ A,B \}, \{ A,C \}, \{ B,C \}, \{A,B,C\}$$

Hey evinda! (Smile)

Yep, except that we should include $\varnothing$ as well. (Nerd)
 
I found the following transition function:

$$\delta': \begin{matrix}
& 0 & 1\\
\{A\} & \{A\} & \varnothing \\
\{B\} & \varnothing & \{C\}\\
\{C\} & \varnothing & \{B\}\\
\{A,B\} & \{A\} & \{C\}\\
\{A,C\} & \{A\} &\{B\} \\
\{B,C\} & \varnothing & \{B,C\}\\
\{A,B,C\} & \{A\} & \{B,C\}\\
\varnothing & \varnothing & \varnothing
\end{matrix}$$So the dfa will look as follows, right? (Thinking)View attachment 5872
 

Attachments

  • dfa3.png
    dfa3.png
    10.1 KB · Views: 123
evinda said:
I found the following transition function:

$$\delta': \begin{matrix}
& 0 & 1\\
\{A\} & \{A\} & \varnothing \\
\{B\} & \varnothing & \{C\}\\
\{C\} & \varnothing & \{B\}\\
\{A,B\} & \{A\} & \{C\}\\
\{A,C\} & \{A\} &\{B\} \\
\{B,C\} & \varnothing & \{B,C\}\\
\{A,B,C\} & \{A\} & \{B,C\}\\
\varnothing & \varnothing & \varnothing
\end{matrix}$$So the dfa will look as follows, right? (Thinking)

Hmm... the start state is missing... shouldn't we start with $q_0'=\{A\}$ as start state (rule 3)? (Wondering)

According to rule 2, shouldn't we have:
$$\delta'(q_0', 0) = \delta'(\{A\}, 0) = \bigcup_{r \in \{A\}} \delta(r, 0) = \delta(A,0) = \{A,B,C\}$$
(Wondering)
 
I like Serena said:
Hmm... the start state is missing... shouldn't we start with $q_0'=\{A\}$ as start state (rule 3)? (Wondering)

According to rule 2, shouldn't we have:
$$\delta'(q_0', 0) = \delta'(\{A\}, 0) = \bigcup_{r \in \{A\}} \delta(r, 0) = \delta(A,0) = \{A,B,C\}$$
(Wondering)

Oh yes, that's right! (Nod) Is everything else correct?
 
evinda said:
Oh yes, that's right! (Nod) Is everything else correct?

Well... we have indeed $\delta'(\{A\}, 1)=\varnothing$. (Nod)

But what should $\delta'(\{A,B,C\}, 0)$ be?
And $\delta'(\{A,B,C\}, 1)$? (Wondering)
 
I like Serena said:
Well... we have indeed $\delta'(\{A\}, 1)=\varnothing$. (Nod)

But what should $\delta'(\{A,B,C\}, 0)$ be?

$\{A,B,C \}$

I like Serena said:
And $\delta'(\{A,B,C\}, 1)$? (Wondering)

$\{B,C\}$

Right?
 
evinda said:
$\{A,B,C \}$

$\{B,C\}$

Right?

Right.

And isn't $\delta'(\{A,B\}, 0) = \{A,B\}$ and $\delta'(\{A,C\}, 0) = \{A,C\}$? (Wondering)
 
I like Serena said:
Right.

And isn't $\delta'(\{A,B\}, 0) = \{A,B\}$ and $\delta'(\{A,C\}, 0) = \{A,C\}$? (Wondering)

Isn't it $\delta'(\{A,B\}, 0) = \{A,B, C\}$ and $\delta'(\{A,C\}, 0) = \{A,B, C\}$ because of the transitions from A to C by reading 0 and from A to B by reading 0 respectively? Or am I wrong?
 
  • #10
evinda said:
Isn't it $\delta'(\{A,B\}, 0) = \{A,B, C\}$ and $\delta'(\{A,C\}, 0) = \{A,B, C\}$ because of the transitions from A to C by reading 0 and from A to B by reading 0 respectively? Or am I wrong?

Oh yes. You are right! (Blush)
 
  • #11

Attachments

  • ddfa.png
    ddfa.png
    8.9 KB · Views: 126
  • #12
evinda said:
So we get the following dfa, right?

I think there are 2 arrows missing from $\{A,B,C\}$... (Thinking)

Btw, did you notice that 4 of those 8 states are not reachable from the start state? (Wondering)
 
  • #13
I like Serena said:
I think there are 2 arrows missing from $\{A,B,C\}$... (Thinking)

Oh yes, right... I forgot to write the transition from $\{A,B,C\}$ to $\{A,B,C\}$ by reading 0, and the transition from $\{A,B,C\}$ to $\{B,C\}$ by reading 1.

So the dfa is the following:

View attachment 5881

I like Serena said:
Btw, did you notice that 4 of those 8 states are not reachable from the start state? (Wondering)
Yes, the states $\{ B \}, \{C\}, \{A,B\}, \{A,C\}$. :eek:
But all the states of a dfa should be reachable from the start state, right? (Thinking)
 

Attachments

  • ddfa.png
    ddfa.png
    9.1 KB · Views: 119
  • #14
evinda said:
Oh yes, right... I forgot to write the transition from $\{A,B,C\}$ to $\{A,B,C\}$ by reading 0, and the transition from $\{A,B,C\}$ to $\{B,C\}$ by reading 1.

So the dfa is the following:

Yep. (Nod)

Yes, the states $\{ B \}, \{C\}, \{A,B\}, \{A,C\}$. :eek:
But all the states of a dfa should be reachable from the start state, right? (Thinking)

Does the definition require that?
Last time I checked we can have unreachable states - it's just that we might as well leave them out.
They're just making the diagram messier than it needs to be. (Emo)
Anyway, the procedure you quoted did include all of them.
That is, it specifically said that the set of states would be $q'=\mathcal P(q)$.
 
  • #15
I like Serena said:
Last time I checked we can have unreachable states - it's just that we might as well leave them out.
They're just making the diagram messier than it needs to be. (Emo)

So a dfa equivalent to the given initial nfa is the following, right?View attachment 5882

In order to know which states are reachable from the starting state do we look at the states where we can go from the states where the starting state can go? (Blush)

I.e. in this case, we have

$\begin{matrix}
& 0 & 1\\
\{A\} &\{A,B,C\} & \varnothing
\end{matrix}$

and

$\begin{matrix}
& 0 & 1\\
\{A,B,C\} &\{A,B,C\} & \{B,C\}
\end{matrix}$

so we deduce that we have to include at the dfa the states $\{A\}, \{A,B,C\}$ and $\{B,C \}$, right? (Thinking)
 

Attachments

  • ddfa.png
    ddfa.png
    4.5 KB · Views: 106
  • #16
evinda said:
So a dfa equivalent to the given initial nfa is the following, right?

In order to know which states are reachable from the starting state do we look at the states where we can go from the states where the starting state can go? (Blush)

I.e. in this case, we have

$\begin{matrix}
& 0 & 1\\
\{A\} &\{A,B,C\} & \varnothing
\end{matrix}$

and

$\begin{matrix}
& 0 & 1\\
\{A,B,C\} &\{A,B,C\} & \{B,C\}
\end{matrix}$

so we deduce that we have to include at the dfa the states $\{A\}, \{A,B,C\}$ and $\{B,C \}$, right? (Thinking)

Yep. (Nod)

That leaves only to check where we can go from $\{B,C \}$. (Sun)
 
  • #17
I like Serena said:
Yep. (Nod)

That leaves only to check where we can go from $\{B,C \}$. (Sun)

I got it... Thanks a lot! (Smirk)
 

Similar threads

Replies
2
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 43 ·
2
Replies
43
Views
8K
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K