Questions tagged [dfa]

A DFA is a deterministic finite automaton, a simple model of computation. It is one way to model regular languages. Each DFA consists of a finite set of states and a transition function between those states describing how the state of the machine changes in response to new input. DFAs are closely related to regular expressions in the sense that they can be converted into each other. Thus, DFAs are often used to implement regular expression matchers.

569 questions
0
votes
2 answers

Why can't there be multi-state in DFA?

My question is , can state3 also be named state2, or in general. Why can we name our states with same names. For the expression ab+a*a First state takes 'a'. then it will either go state2/state3.
wtsang02
  • 18,603
  • 10
  • 49
  • 67
0
votes
1 answer

How to solve δ(A,01) for this DFA?

Consider the DFA : What will be δ(A,01) equal to ? options: A) {D} B) {C,D} C) {B,C,D} D) {A,B,C,D} The correct answer is option B) but I don't get how. Please some one explain me the steps to solve it and also in general how do…
Brite Roy
  • 425
  • 3
  • 9
  • 28
0
votes
0 answers

Context Free Grammars - LR(0) DFA

I need some help with constructing a LR(0) DFA for a Context Free Grammar. S -> A A -> aaAb | B B -> aBb | e This is what I have: State { S -> .A A -> .aaAb A -> .B B -> .aBb B -> .e } Then I have an arrow labeled a to: State { A->…
mrjasmin
  • 1,230
  • 6
  • 21
  • 37
0
votes
1 answer

Designing nfa that accepts couple of strings

I need help designing an nfa that accepts the words "hello","hello world" and "stay together" the alphabet includes the english alphabet,numbers and symbols. I need help getting started. Anyone has any suggestions?
Israel Rodriguez
  • 209
  • 2
  • 8
  • 15
0
votes
1 answer

how to correct a slightly incorrect DFA, for a given correct input string?

I wrote a program which can generate DFAs. But the DFAs are slightly incorrect. That is, sometimes they can't accept the correct strings. My question is: is there any algorithm can correct the DFAs, so that they can accept the given correct…
JackWM
  • 10,085
  • 22
  • 65
  • 92
0
votes
1 answer

DFA and NFA equivalent language

I'm asked to build a DFA A and NFA B such that L(D) = L(N) with some specific conditions. I'm not asking for solutions or answers; I just wanted to make sure I have the right method to attack this problem. First off, I'm a bit confused by the…
pauliwago
  • 6,373
  • 11
  • 42
  • 52
0
votes
3 answers

c++ Elements lost when stored in a map

I'm trying for several days to simulate a non-deterministic finite automata, using a map I'm storing state transitions, exactly as indicated in this post. The problem is they are missing the nondeterministic transitions, ie those which by the same…
novaKid
  • 233
  • 2
  • 4
  • 11
-1
votes
1 answer

Why language is not regular?

Show that the language is not regular. L = {a^n b^m : n>m}
-1
votes
1 answer

converting from dfa to regular expression

Can someone explain to me how to convert this DFA to a regular expression? I have tried using Arden’s theorem but I don’t know how to simplify the equations to get the regular expression for this DFA. If someone could show me how to simplify the…
-1
votes
2 answers

Can a DFA have multiple of the same state?

I need to create a DFA for a sequential order of states e.g. A -> B -> C -> B -> A and so on, where 'A' is the start and finish state, 1 is a transition to the next state and 0 just loops back to the current state. 1 and 0 are the only…
-1
votes
1 answer

How to construct DFA that L accept : w contain '110' and doesn't contain '010'?

L = { w belongs {0,1}* | w contain '110' and doesn't contain '010'} I need to construct DFA that receives L. How can I draw a DFA that will do the both of conditions? hints will be a great help.
AndrewM
  • 55
  • 7
-1
votes
1 answer

Why doesn't {a^nb^n | n >= 0} follow regular language closure properties?

Using the pumping lemma, we can prove that {a^nb^n | n >= 0}, but what is not clear is the following. {a^n | n >= 0} is regular by itself and so is {b^n | n >= 0}, and if I am not mistaken, regular languages are closed under concatenation, so why…
user19187727
  • 169
  • 9
-1
votes
1 answer

How to draw a DFA for that given language?

This the question : L = { vwv : w,v ∈ {a,b}* , |v| = 2 } I draw it until W cames up idk what to do ! this is my way :
-1
votes
2 answers

Is L = {a^n a^n b^m |m, n ≥ 0} a regular or irregular language?

I have troubles in solving/proving this problem. I can understand that in a non regular no Finite State Automaton/Machine can be written that validates and accepts this input since it lacks a memory component. (Please correct me if I'm wrong) The…
-1
votes
1 answer

'8 Ball' Program

I've tried looking on google but i guess I can just not get the right search phrases to find what I want. If you are familiar with the afterNET IRC server, there is a command '.8' which is an 8 ball. It answers more than just yes/no questions tho.…
will
  • 1,397
  • 5
  • 23
  • 44