Can somebody help me to convert this nfa-lambda to dfa?
I have created one DFA like below.
where q3 and q4 is accepted state and q0 is starting state.
Related
What will be the transition diagram of the set of all strings from {0,1} whose tenth symbol from the right end is a 1 ?
I know the regular expression is (0+1)*1(0+1)(0+1)(0+1)(0+1)(0+1)(0+1)(0+1)(0+1)(0+1)
But I couldn't turn it into DFA.
I encountered this question in Introduction to Automata Theory, Languages, and Computations by John E. Hopcroft, Rajeev Motwani, Jeffrey D. Ullman.
First, we need to get hold of the NFA here. This would have 11 states in linear formation with the start having a self loop with 0,1 and a transition to the next state with 1 (not 0). All the other 9 transitions from qi -> qi+1 would have transition for 0,1 both. The last state, q10 will be our accept state.
That was fairly a straightforward approach for the NFA. Now if we convert this NFA to a DFA considering all 211 subsets of set of states of the NFA, we would get the solution.
I will add the NFA Diagram when I get some time. And try to figure out an easy trick to solve the DFA without considering all the possibilities.
You can look at Example 1.30 from Introduction to the Theory of Computation - M. Sipser - 3rd Edition at page 51. There they showed an NFA for strings having 1 at the third position from the end would have 4 states but that corresponding DFA would have 8 states. Not posting the screenshots for copyright issues.
DFA of the set of all strings from {0,1} whose tenth symbol from the right end is a ...
the regular expression for given language is :
(0+1)*1(0+1)(0+1)(0+1)(0+1)(0+1)(0+1)(0+1)(0+1)(0+1)
Hope you got it..!!
Construct a DFA (with alphabet {a,b}) that is equivalent to the following NFA:
My conversion is below, but it appears to be wrong, can you help me explain why?
Any DFA state that includes NFA state 5 must also include NFA state 2, due to the epsilon transition. You have a DFA state labelled just 5, which is thus wrong -- it should be 2,5 (and be merged with the other 2,5 state as a result).
You also forgot to label the edge from 2,3,5 to 4,6 (should be b).
What i mean is that can there be multiple different forms of diagram of the same language? Can it be drawn with multiple solutions? Or each language has only one solution in DFA? I attended a pop quiz today. Drew a solution and tried multiple strings. Each of those were accepted but i didn't get any points for it. Didn't get any feedback from my TA as why it was considered wrong.
The question was. Let L = {w | w contains an odd number of 0s or at least two 1s}.
This is what i did (sorry had to use ms paint).
If you notice a bit more carefully then 0101 is a string in your language but it is not accepted by your automata. Also to answer your other question, yes, there can be multiple DFAs which accept the same language. A trivial example would be the language 0* (Think about it if you are still interested, haha!).
P.S. - Just noticed a comment which pointed out the counter-example but I still went ahead. Sorry!
I've recently started studying Data Bases but I'm struggling with this specific part.
I've read the definition of each Normal Form but I still can't seem to understand. Here's an example that I couldn't solve properly:
**R(A,B,C,D,E,F)**
A->B; B->CD; AD->E
Solution: R1(*A*,B,E); R2(*B*,C,D); R3(*A*,*F*)
I can't understand why the R3 is like that
R3 is to make sure it is in 2nd Normal Form and there is no update anomaly. F in R1 would lead to duplicate rows of A,B,E where there are multiple F values for A. B and E values might be either ambiguous or completely redundant.
Can someone please help me with this question?
Describe an algorithm that converts an NFA into a DFA whose language is the complement of L(A). The complement should be taken with respect to the alphabet of A. Given an informal argument for why your construction works. You need not give a formal proof.
Any kind of guidance is appreciated...
You can convert a FA to its complement by turning its accept states into non-accept states, and turning its non-accept states into accept states. Easy!
You can convert a NFA to a DFA by considering that any NFA state is a power of the states: that is, for each state in the NFA, it is either active or not active. You can map each of these states to a state in a DFA, so you end up with at most 2|Q| states for your DFA which represents your NFA.
Edit: this algorithm and its proof do not actually need the details of A, so long as it is a valid Finite State Automaton.