Finding DFA: Hint to Construct NFA for ((0∪1)*10* ∪ 0)

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

Discussion Overview

The discussion revolves around constructing a deterministic finite automaton (DFA) that recognizes the language $((0 \cup 1)^{\ast} 1 0^{\ast}) \cup 0$. Participants explore the process of converting a non-deterministic finite automaton (NFA) into a DFA, addressing various challenges and considerations in the conversion process.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants express difficulties in converting their proposed NFA into a DFA and seek hints on how to proceed.
  • One participant suggests splitting the initial state into two states to better handle the language requirements, indicating that recognizing $(0 \cup 1)^{\ast}$ too early could lead to incorrect acceptance of strings like $00$.
  • Another participant proposes a method for labeling states and creating new states based on the sets of states reachable by reading specific inputs (0 or 1).
  • There is a discussion about the inclusion of certain states in the DFA, with some participants questioning the logic behind the transitions and the finality of certain states.
  • Participants identify that some states are identical and can be merged without losing information, leading to a more efficient DFA.
  • There is a clarification that the process continues until no new states can be reached, and participants discuss the criteria for stopping the conversion process.

Areas of Agreement / Disagreement

Participants generally agree on the steps needed to convert the NFA to a DFA, but there are ongoing discussions about specific transitions and the finality of certain states. Some points remain contested, particularly regarding the merging of states and the criteria for stopping the conversion process.

Contextual Notes

Participants express uncertainty about the exact transitions between states and the implications of merging states. There are also discussions about the reachability of certain subsets from the initial state, indicating that not all possible subsets need to be included in the DFA.

  • #31
I like Serena said:
I don't think so.
We can convert it to states with sets of the original states.
For $\epsilon$-transitions, we just need to draw in additional states that might be reached with an $\epsilon$-transition. (Thinking)

I haven't really understood what we have to do... (Worried)

By ignoring the $\epsilon$-transition, we have the following. Right?

$\begin{matrix}
& 0 & 1\\
\{q_0\} & \{q_3\} &\varnothing \\
\{q_3\} & \varnothing & \varnothing
\end{matrix}$

By including the $\epsilon$-transition, we have the following additional transitions:

$q_0 \overset{0,1}{\to} q_1$ and $q_0 \overset{1}{\to} q_3$

So do we have the following transition function?

$\begin{matrix}
& 0 & 1\\
\{q_0\} & \{q_1,q_3\} &\{q_1, q_3\} \\
\{q_3\} & \varnothing & \varnothing
\end{matrix}$Or have I understood it wrong? (Sweating)
 
Physics news on Phys.org
  • #32
evinda said:
I haven't really understood what we have to do... (Worried)

By ignoring the $\epsilon$-transition, we have the following. Right?

$\begin{matrix}
& 0 & 1\\
\{q_0\} & \{q_3\} &\varnothing \\
\{q_3\} & \varnothing & \varnothing
\end{matrix}$

By including the $\epsilon$-transition, we have the following additional transitions:

$q_0 \overset{0,1}{\to} q_1$ and $q_0 \overset{1}{\to} q_3$

So do we have the following transition function?

$\begin{matrix}
& 0 & 1\\
\{q_0\} & \{q_1,q_3\} &\{q_1, q_3\} \\
\{q_3\} & \varnothing & \varnothing
\end{matrix}$Or have I understood it wrong? (Sweating)

Shouldn't that be:
$q_0 \overset{0,1}{\to} q_1$ and $q_0 \overset{1}{\to} q_2$? (Wondering)Not so fast. (Worried)
Let's start with:
$\begin{matrix}
\delta' & 0 & 1\\
\{q_0\} & \{q_1,q_3\} &\{q_1, q_2\}
\end{matrix}$

Now we've found 2 new states, and we should try and find out where we can go from them, including implicit $\epsilon$-transitions if there are any:
$\begin{matrix}
\delta' & 0 & 1\\
\{q_0\} & \{q_1,q_3\} &\{q_1, q_2\} \\
\{q_1,q_3\} & ? & ? \\
\{q_1,q_2\} & ? & ?
\end{matrix}$

(Thinking)
 
  • #33
I like Serena said:
Shouldn't that be:
$q_0 \overset{0,1}{\to} q_1$ and $q_0 \overset{1}{\to} q_2$? (Wondering)

Oh yes, right... (Blush)

I like Serena said:
Not so fast. (Worried)
Let's start with:
$\begin{matrix}
\delta' & 0 & 1\\
\{q_0\} & \{q_1,q_3\} &\{q_1, q_2\}
\end{matrix}$

Now we've found 2 new states, and we should try and find out where we can go from them, including implicit $\epsilon$-transitions if there are any:
$\begin{matrix}
\delta' & 0 & 1\\
\{q_0\} & \{q_1,q_3\} &\{q_1, q_2\} \\
\{q_1,q_3\} & ? & ? \\
\{q_1,q_2\} & ? & ?
\end{matrix}$

(Thinking)

So we have the following transition function, right?$\begin{matrix}
\delta' & 0 & 1\\
\{q_0\} & \{q_1,q_3\} &\{q_1, q_2\} \\
\{q_1,q_3\} & \{ q_1\} & \{ q_1, q_2\} \\
\{q_1,q_2\} & \{q_1,q_2\} & \{ q_1, q_2\} \\
\{q_1\} & \{ q_1\} & \{ q_1, q_2 \}
\end{matrix}$

And these are all the states that are reachable from the starting state. So we get the following dfa

View attachment 5889

which is the same as we found before, right? (Smile)
 

Attachments

  • ddf.png
    ddf.png
    5.5 KB · Views: 134
  • #34
evinda said:
Oh yes, right... (Blush)
So we have the following transition function, right?$\begin{matrix}
\delta' & 0 & 1\\
\{q_0\} & \{q_1,q_3\} &\{q_1, q_2\} \\
\{q_1,q_3\} & \{ q_1\} & \{ q_1, q_2\} \\
\{q_1,q_2\} & \{q_1,q_2\} & \{ q_1, q_2\} \\
\{q_1\} & \{ q_1\} & \{ q_1, q_2 \}
\end{matrix}$

And these are all the states that are reachable from the starting state. So we get the following dfa
which is the same as we found before, right? (Smile)

Yep! (Nod)

One observation, according to your notes:

http://mathhelpboards.com/attachments/discrete-mathematics-set-theory-logic-15/5765d1469112227-construction-dfa-pr22-jpg

the start state should be $\{q_0, q_1\}$ instead of $\{q_0\}$, although that doesn't really change the DFA. (Nerd)
 
  • #35
I like Serena said:
the start state should be $\{q_0, q_1\}$ instead of $\{q_0\}$, although that doesn't really change the DFA. (Nerd)

Why is it like that? (Thinking)
 
  • #36
evinda said:
Why is it like that? (Thinking)

It's an arbitrary choice of the procedure.
It includes all empty transitions after each state.
Instead we just started with the start state after which we included all empty transitions before and after each state. (Nerd)

tl;dr it does not matter. (Wink)
 
  • #37
I like Serena said:
It's an arbitrary choice of the procedure.
It includes all empty transitions after each state.
Instead we just started with the start state after which we included all empty transitions before and after each state. (Nerd)

tl;dr it does not matter. (Wink)

So it includes all the states we can reach after any $\epsilon$-transition? Or only the states we can reach after the $\epsilon$-transitions that are immediately reached from the starting state? (Thinking)
 
  • #38
evinda said:
So it includes all the states we can reach after any $\epsilon$-transition? Or only the states we can reach after the $\epsilon$-transitions that are immediately reached from the starting state? (Thinking)

The $E$ function includes all states we can reach after any $\epsilon$-transition.
For consistency, no exception is made for the starting state. (Emo)
 
  • #39
I like Serena said:
The $E$ function includes all states we can reach after any $\epsilon$-transition.

Which function do you mean with the "$E$ function" ? (Thinking)
 
  • #40
evinda said:
Which function do you mean with the "$E$ function" ? (Thinking)

The one that your notes refer to as:

Formally, for $R \subseteq Q$ let
\[E(R)=\{q \mid q\text{ can be reached from R by traveling along $0$ or more $\varepsilon$ arrows} \}.\]
(Thinking)
 
  • #41
I like Serena said:
The one that your notes refer to as:

Formally, for $R \subseteq Q$ let
\[E(R)=\{q \mid q\text{ can be reached from R by traveling along $0$ or more $\varepsilon$ arrows} \}.\]
(Thinking)


Yes, I see.. I had understood it wrong and I thought that you meant that the starting state should contain all the states that could be reached after any $\epsilon$-transition... but the new starting state contains the starting state of the nfa and any states that can be reached after having read $\epsilon$ exactly after the starting state. Right?
 
  • #42
evinda said:
Yes, I see.. I had understood it wrong and I thought that you meant that the starting state should contain all the states that could be reached after any $\epsilon$-transition... but the new starting state contains the starting state of the nfa and any states that can be reached after having read $\epsilon$ exactly after the starting state. Right?

Yep! (Nod)

Still, that is any state that could be reached after any $\epsilon$-transition... without actually reading an input symbol. (Nerd)
 
  • #43
I like Serena said:
Yep! (Nod)

Still, that is any state that could be reached after any $\epsilon$-transition... without actually reading an input symbol. (Nerd)

I see... Thank you! (Smile)
 
  • #44
How can we justify in a few words that the dfa indeed recognizes the language $((0 \cup 1)^{\star}10^{\star}) \cup 0$? (Thinking)
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
2
Views
2K
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 45 ·
2
Replies
45
Views
4K