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
-1
votes
1 answer
-1
votes
3 answers

Difference Between KMP and Regex/DFA-based Searching

I am confused about the relation between KMP (Knuth–Morris–Pratt) and Regex (DFA-based) Searching. My thought is that KMP cannot use regex notations (e.g., (A|B){2}C), so it can only search for a "single" string (e.g., AC or BC, but not AC|BC). Is…
JackWM
  • 10,085
  • 22
  • 65
  • 92
-1
votes
1 answer

What is this DFA means?

There is a DFA. But I don't know this DFA means. I want to know this DFA's Regular expression and description (Description like 'this automata accept suffix is 011) Blue state is start state and red states are accept states.
-1
votes
1 answer

minimum no of states required for A(BC)*D?

What are the minimum no. of states required in dfa of the language: A(BC)*D? Is it 3 or 4? By 3 I mean, can I write "BC" on single arrow? If possible please explain using a diagram. Thank you in advance.
gmaster
  • 174
  • 1
  • 15
-1
votes
1 answer

Mapping power state to unique number NFA to DFA

I am writing the code to convert NFA to DFA, if we have a power state {1,2,4}, I have to convert it into the some unique number, say x. Also I have to do the reverse mapping such that is I get x, I have to return the power state as {1,2,4} I came up…
Vallabh Patade
  • 4,960
  • 6
  • 31
  • 40
-1
votes
2 answers

How can I tell a regular language?

As we know, using pumping lemma, we can easily prove the language L = {WW|W ∈ {a,b}*} is not a regular language. However, The language, L1 = {W1W2| |W1| = |W2|} is a regular language. Because we can get the DFA like below, My question is, L = {WW|W…
henry
  • 185
  • 2
  • 2
  • 13
-1
votes
1 answer

Is there an openly available implementation of the Hopcroft's DFA minimization algorithm?

Ditto. Java or C# would be best, but any imperative language will do.
Jakub Lédl
  • 1,805
  • 3
  • 17
  • 26
-2
votes
1 answer

By writing a regular expression or a grammar, describe the language accepted by the NFA

NFA diagram the strings accepted are aaaaa which is pretty clear. The L = (111 + 1111)* is what I am getting but I need it in regular expression or grammar
coding12
  • 1
  • 1
-2
votes
1 answer

Regular Expression | Automata Theory

does anyone know about regular expressions of the following languages: the set of all strings starting with 000 and not ending 11 the set of all strings with odd string length and ending in 111 L6 is the set of all strings ending in 00 and…
-2
votes
1 answer

How can you identify whether the language is regular or context-free language

For example, is this language regular or context-free language? On the one hand n can't be smaller than m but on the other hand you can't count n and m. {(ab)^n (ab)^m | n>=m>=0}
Tomer Cher
  • 37
  • 7
-2
votes
1 answer

From a regular expression to NFA and to DFA

I have the following regular expression: [A−Z]∗01∗[^A−Z]{3} The alphabet is [A-Z][0-9]. Can someone explain the correct way to convert to a NFA and then to DFA. And how can I implement the epsilon closure in C.
Nedo
  • 15
  • 5
-2
votes
1 answer

How to draw a dfa for this language :L={ w | w has an even number of a’s and one or two b’s}

I tried this problem but i get stuck everytime because i am unable to satisfy the second condition for b. Someone give the right dfa diagram for the language.
Prajwal K
  • 1
  • 1
  • 1
-2
votes
1 answer

Find the DFA for the language L given

L is a language over {x,y,z} where x's are never preceded by y's and never followed by z's
Aastha Dahal
  • 329
  • 2
  • 11
-2
votes
1 answer

Deterministic finite automaton for even zeroes and ones in multiples of 5

Given a binary string, create a DFA to check if the number of zeroes is even and the number of ones is a multiple of 5.
-2
votes
4 answers

DFA is not accepting strings

my program is supposed to implement a dfa for a binary string... dfa is a machine that can be in only one state at a time (when you enter a string the machine should use it and at the last step it should reach to the final state. if so, we say that…
Little Girl
  • 27
  • 2
  • 8
1 2 3
37
38