## Construct a dfa and nfa for a set of strings on{0,1} : the left most symbol differs from the right most one and odd length string

Construct dfa and nfa for a set of string 0,1 such that left most and right most element are different and odd length string
Can you plss draw it

## How can I prove that the accepted language of a given DFA or NFA or REGEX is equivalent to a given language

I found this How do I verify that a DFA is equivalent to a NFA? but as it states it is not really a good question more of how can I check myself during an exam. Because as you might know to do this by hand for < 5 states is really hard to do without any mistake and I only get credit for a correct construction and not understanding that REGΣ = NEAΣ = DEAΣ

## finite automata – NFA that ends with 0 and doesn’t have 11 after the first 0

So as the title says i m trying to find this NFA. So far i thought to make an NFA that “guesses” what comes after the first 0 and i got this:

After some time trying to get rid of all the extra (7 !) states i put in i got to this beauty:

But now i cant figure out how to get rid of the one extra state. Also if you have any tips on how to go to simpler NFA’s instead of what i did (like a thought process for this problem) i would appreciate it a lot. Thank you

## finite automata – Is there a set of formal languages ​​such that any DFA for him has states $Omega (c ^ k)$ and there is an NFA for him with states $O (k)$?

Given an alphabet $$Sigma: | Sigma | = c$$, can a set of languages $${L_k }$$ be created, so any DFA for $$L_k$$ at $$Omega (c ^ k)$$ States and an NFA for $$L_k$$ exists with $$O (k)$$ States?

I'm having trouble creating a $$L_k$$ so that all DFA $$Omega (c ^ k)$$ States. Is a string language with a suffix of $$s_k, | s_k | = k$$ such a language? Here is a draft proof of that.

Proof by contradiction: leave a DFA $$langle Q, Sigma, delta, q_0, F rangle$$ to have $$| Q | . Let $$a, b$$ to be chains of length $$k$$ and $$a_k = (s_k) _1 not = b_k$$

Let $$q_a$$ and $$q_b$$ denote $$delta (q_0, a)$$ and $$delta (q_0, b)$$, respectively.

There are two cases:

There is no $$a, b$$ such as $$q_a = q_b$$. Then each string corresponds to a different state, but there is $$c ^ {k-1}$$ these chains so $$| Q | geq c ^ {k-1}$$, which is not possible.

II. There is $$a, b$$ such as $$q_a = q_b$$. so $$delta (q_a, s_2s_3 ldots s_k) = delta (q_b, s_2s_3 ldots s_k) = q_c$$. $$as_2s_3 ldots s_k$$ must be accepted and $$bs_2s_3 ldots s_k$$ therefore should not $$q_c$$ is both an accepting state and not an accepting state, which is not possible.

This seems to prove that any DFA for $$L_k$$ at least $$c ^ {k-1}$$ knots, which is enough for $$Omega (c ^ k)$$. If my proof is correct, the only remaining task is to prove that an NFA containing $$O (k)$$ nodes exist for $$L_k$$.

The easiest way to do it is to create such an NFA, but I don't know how to do it. $$O (k)$$ suggests that $$i$$-th node should match the state of the "prefix of $$s$$ length $$i$$ matches the suffix of the input string ", but I don't see how such an NFA can be created.

## algorithms – McNaughton-Yamada Algotihm (1960) Regular expression to DFA without going through NFA

I have a homework problem here. It asks me to use the McNaughton-Yamada algorithm to convert a regular expression to DFA first, and then minimize this using a partition argument. I can do the latter. My problem is that I cannot access any real references on the algorithm. Their original document is behind a payment wall at the IEEE which my university does not have access to.

The algorithm went something like this:
1. For each symbol in the expression, give them a left-to-right index increasing by one for each occurrence of that symbol. For example, the expression, aa * would receive a_1 a_2 ^ *.

1. We are building a diagram based on the possible word lengths.

If done correctly, it produces a DFA. I think labeling in (1) is to help label states.

Feel free to give your own example if you decide to give an answer. I will not provide any problem here as there is no guarantee that this is not really my homework exercise.

## Why this NFA with an empty symbol

I'm trying to understand the difference between DFA and NFA
I have this example in my course book

Are empty symbols at the start necessary?
or can we eliminate them to have something like that

## finite automata – Converting an NFA with 2 initial states into a regular expression using state elimination

The task is to determine the language accepted by the following NFA:

My approach to these problems is to convert the NFA into a regular expression and (for the algorithm):

If the initial state has incoming transitions: create a new starting state with an epsilon transition

If there are more than 1 final states OR the final state has outgoing edges: create a new final state with 1 (or more) epsilon transition (s).

In the end, only 2 states remain.

I can't find any solution related to the approach mentioned above in the case of 2 starting states. Any contribution on this situation would be useful.

Thank you!

## Convert NFA to RE

I am fighting with these two. My final answers are

1. a*((a U b)b)*b

2.a*aab*(a U b)


NFA

What am i doing wrong?

Thank you
Rahman

## automata – Help with converting NFA to regular expression

Thanks for contributing an answer to Computer Science Stack Exchange!

• Please make sure to respond to the question. Provide details and share your research!

But to avoid

$$varphi_ {1} (L) = left {w in Sigma ^ {*} | text {there is a} alpha in Sigma ^ {*} text {with} | alpha | = | w | text {and} alpha w in L right }$$
$$begin {array} {l} { text {Proof. We want to show that} varphi_ {1} (L) text {for all languages} L in operatorname {REG} text {is normal. Be there} L in operatorname {REG} text {random. Because} L text {is normal}} \ { text {there is a DFA} M text {with L} (M) = L text {We are building now} M text {a} lambda text {NFA} {} operatorname {with L} left (M ^ { prime} right) = varphi_ {1} (L). text {For this, we describe}} \ { text {the working method} M ^ { prime} text {formal the condition space of} M ^ { prime} text {is (of design) that of} M. text {The calculation}} \ { text {of} M ^ { prime} text {works (conceptually) as follows: instead of a stone at the beginning of the calculation , place}} q_ {0} text {,}} end {array}$$
$$begin {array} {l} { text {we place 3 stones (1 white, 1 red and 1 blue) on the states of} M. text {We place the blue}} \ { text { on} q_ {0} text {, and white on a step det. guessed} q_ {i} text {(both stones at the same condition). }} \ { text {The calculation of} M ^ { prime} text {at entry} w in Sigma ^ {*} text {functions (of design) as follows: