Find DFA Equiv: States, Transitions & Function

In summary, the conversation involves finding a DFA equivalent to an NFA by following a specific procedure. The DFA has states that include $\varnothing$ and $\{ A \}, \{ B \}, \{ C \}, \{ A,B \}, \{ A,C \}, \{ B,C \},$ and $\{ A,B,C \}$. It is noted that some of these states may not be reachable from the start state, but the procedure requires them to be included in the DFA. The conversation also involves discussing the transition function and determining which states are reachable from the start state.
  • #1
evinda
Gold Member
MHB
3,836
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: 59
  • R.JPG
    R.JPG
    37.3 KB · Views: 52
Physics news on Phys.org
  • #2
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)
 
  • #3
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: 52
  • #4
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)
 
  • #5
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?
 
  • #6
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)
 
  • #7
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?
 
  • #8
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)
 
  • #9
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: 58
  • #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: 54
  • #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: 50
  • #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)
 

Related to Find DFA Equiv: States, Transitions & Function

What is a DFA?

A DFA (Deterministic Finite Automaton) is a mathematical model used to recognize patterns in data. It consists of a finite set of states, a set of input symbols, a transition function, a start state, and a set of accept states.

What is the purpose of finding DFA equivalence?

Finding DFA equivalence involves determining if two DFAs recognize the same language. This is important in automata theory and computer science as it allows for the comparison and simplification of models.

How do you find the number of states in a DFA?

The number of states in a DFA can be found by counting the number of distinct states in the DFA's transition function. This can also be done by creating a state transition diagram and counting the number of nodes.

What is the difference between a DFA and a NFA?

The main difference between a DFA (Deterministic Finite Automaton) and a NFA (Nondeterministic Finite Automaton) is that a DFA has only one possible state at any given time, while an NFA can have multiple possible states. This means that DFAs are simpler and easier to understand, while NFAs are more powerful and can recognize more complex patterns.

How do you determine if two DFAs are equivalent?

To determine if two DFAs are equivalent, you can use the Myhill-Nerode Theorem or minimize the DFAs and compare their transition tables. If the two DFAs recognize the same language and have the same number of states, they are equivalent.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
998
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
18
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
10
Views
2K
  • Set Theory, Logic, Probability, Statistics
2
Replies
43
Views
7K
  • General Engineering
Replies
4
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
2K
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
1K
Back
Top