Equivalence of NFAs with/without $\epsilon$-Moves

  • MHB
  • Thread starter evinda
  • Start date
In summary, the conversation discusses the equivalence of NFAs with $\epsilon$-moves to NFAs without $\epsilon$-moves. The reason for adding a transition on $1$ from $q_0$ to $q_1$ is to eliminate $\epsilon$-transitions. The possibility of reading $0$ more than once at the beginning and then twice $\epsilon$ is also mentioned, and it is concluded that the transition from $q_0$ to $q_2$ should also be removed in the new NFA.
  • #1
evinda
Gold Member
MHB
3,836
0
Hello! (Wave)

I am looking at the equivalence of NFAs with $\epsilon$-moves to NFAs without $\epsilon$-moves.

View attachment 5767

View attachment 5768

Why do we have to add a transition on $1$ from $q_0$ to $q_1$ although we don't have an arrow from $q_0$ to $q_1$ that corresponds to the symbol $1$?
 

Attachments

  • ep.JPG
    ep.JPG
    43.3 KB · Views: 77
  • ep2.JPG
    ep2.JPG
    6.3 KB · Views: 83
Physics news on Phys.org
  • #2
evinda said:
Hello! (Wave)

I am looking at the equivalence of NFAs with $\epsilon$-moves to NFAs without $\epsilon$-moves.Why do we have to add a transition on $1$ from $q_0$ to $q_1$ although we don't have an arrow from $q_0$ to $q_1$ that corresponds to the symbol $1$?

Hey evinda! (Smile)

Let's see how we can get from $q_0$ to $q_1$ while consuming a symbol... (Thinking)

Isn't that the following?
$$q_0 \overset 0\to q_0 \overset \varepsilon\to q_1 \\
q_0 \overset \varepsilon\to q_0 \overset 1\to q_1$$

Actually we can also pass $q_1$ by with only epsilons:
$$q_0 \overset \varepsilon\to q_1 \overset \varepsilon\to q_2$$
We'll have to consider that later to see what can happen afterwards when a symbol is consumed after all. (Sweating)
 
Last edited:
  • #3
I like Serena said:
Isn't that the following?
$$q_0 \overset 0\to q_0 \overset \varepsilon\to q_1 \\
q_0 \overset \varepsilon\to q_0 \overset 1\to q_1$$

Shouldn't the second one be as follows?$$q_0 \overset \varepsilon\to q_1 \overset 1\to q_1$$

Or am I wrong?
 
  • #4
evinda said:
Shouldn't the second one be as follows?$$q_0 \overset \varepsilon\to q_1 \overset 1\to q_1$$

Or am I wrong?

Yep. You're right. (Nod)
 
  • #5
I like Serena said:
Yep. You're right. (Nod)

That's why I haven't understood why we have to add a transition on $1$ from $q_0$ to $q_1$... (Sweating)
 
  • #6
evinda said:
That's why I haven't understood why we have to add a transition on $1$ from $q_0$ to $q_1$... (Sweating)

In the original NFA that is not possible, but we are revising it into a different NFA without $\varepsilon$-transitions.
In the new NFA we will have the same states with different transitions such that there will not be $\varepsilon$-transitions any more.
So we replace the 2 transitions that include a $\varepsilon$-transition with 1 transition. (Emo)
 
  • #7
I like Serena said:
In the original NFA that is not possible, but we are revising it into a different NFA without $\varepsilon$-transitions.
In the new NFA we will have the same states with different transitions such that there will not be $\varepsilon$-transitions any more.
So we replace the 2 transitions that include a $\varepsilon$-transition with 1 transition. (Emo)

I think that I got it... But then at the following, why don't we also add a transition on $0$ from $q_1$ to $q_2$ ?

View attachment 5774
 

Attachments

  • nfa.JPG
    nfa.JPG
    19.6 KB · Views: 71
  • #8
evinda said:
I think that I got it... But then at the following, why don't we also add a transition on $0$ from $q_1$ to $q_2$ ?

I see this is a slightly different NFA than in the opening post.
Once we're in $q_1$ or $q_2$ there is no transition on $0$ any more is there? (Wondering)
We do have a transition on $0$ from $q_0$ to $q_2$.
 
  • #9
I like Serena said:
I see this is a slightly different NFA than in the opening post.
Once we're in $q_1$ or $q_2$ there is no transition on $0$ any more is there? (Wondering)
We do have a transition on $0$ from $q_0$ to $q_2$.

The NFA with $\epsilon$-moves that we have is the following, isn't it?

View attachment 5777

So couldn't we read 0 more than once at the beginning and then twice $\epsilon$ ?
That's why I thought that we could add a transition on 0 from $q_1$ to $q_2$.
So I am wrong, right?
 

Attachments

  • init.png
    init.png
    2.7 KB · Views: 78
  • #10
evinda said:
The NFA with $\epsilon$-moves that we have is the following, isn't it?

So couldn't we read 0 more than once at the beginning and then twice $\epsilon$ ?
That's why I thought that we could add a transition on 0 from $q_1$ to $q_2$.
So I am wrong, right?

Yes. That's the NFA with $\epsilon$-moves.

Wouldn't that then be a transition from $q_0$ to $q_2$? (Wondering)
 
  • #11
I like Serena said:
Yes. That's the NFA with $\epsilon$-moves.

Wouldn't that then be a transition from $q_0$ to $q_2$? (Wondering)

Yes, that's right... I thought so, because this case also appeared at the NFA of my first post.

So couldn't we also remove the transition on 0 from $q_1$ to $q_2$ at the corresponding new NFA of my first post? Or am I wrong? (Sweating)
 
  • #12
evinda said:
Yes, that's right... I thought so, because this case also appeared at the NFA of my first post.

So couldn't we also remove the transition on 0 from $q_1$ to $q_2$ at the corresponding new NFA of my first post? Or am I wrong? (Sweating)

But in the OP we can go $q_1 \overset\epsilon\to {q_2} \overset 0\to q_2$ can't we? (Wondering)

Suppose we remove it, can we read for instance $010$ then? (Wondering)
 
  • #13
I like Serena said:
But in the OP we can go $q_1 \overset\epsilon\to {q_2} \overset 0\to q_2$ can't we? (Wondering)

Suppose we remove it, can we read for instance $010$ then? (Wondering)

I think that I got it now... Thanks a lot! (Mmm)
 

FAQ: Equivalence of NFAs with/without $\epsilon$-Moves

What is an NFA?

An NFA, or non-deterministic finite automaton, is a mathematical model used to describe and recognize patterns in strings of characters. It is composed of states, transitions, and a start and accept state.

What are $\epsilon$-moves in an NFA?

$\epsilon$-moves, also known as epsilon transitions, are transitions in an NFA that allow the automaton to move from one state to another without reading any input. This means that the automaton can transition to a new state without consuming any characters from the input string.

How do NFAs with $\epsilon$-moves differ from those without?

NFAs with $\epsilon$-moves are more powerful than those without, as they can recognize a larger set of languages. This is because $\epsilon$-moves allow for more flexibility in the transitions between states, making it easier to reach the accept state for certain patterns.

Can NFAs with $\epsilon$-moves be converted to those without?

Yes, NFAs with $\epsilon$-moves can be converted to equivalent NFAs without $\epsilon$-moves. This is done through a process called $\epsilon$-closure, where all transitions involving $\epsilon$-moves are removed and replaced with equivalent transitions without $\epsilon$-moves. This results in a NFA that recognizes the same language as the original, but without any $\epsilon$-moves.

Are NFAs with $\epsilon$-moves equivalent to DFAs?

Yes, NFAs with $\epsilon$-moves are equivalent to deterministic finite automata (DFAs), as both models are able to recognize regular languages. However, while NFAs with $\epsilon$-moves may be more compact and easier to construct, DFAs are generally more efficient in terms of time and space complexity.

Similar threads

Replies
8
Views
2K
Replies
3
Views
1K
Replies
1
Views
4K
Replies
2
Views
1K
Replies
3
Views
2K
Replies
5
Views
2K
Replies
1
Views
5K
Back
Top