A finite automaton (FA) is a mathematical description of an algorithm capable of parsing regular languages. FAs have no external memory, and as such can only take into account a fixed number of previous symbols when processing strings. A deterministic FA (DFAs) is one for which there is only ever one legal transition between states; nondeterministic FAs can be transformed into equivalent DFAs. FAs are the weakest of the commonly-defined automata.
Questions tagged [finite-automata]
585 questions
3
votes
1 answer
Creating context free grammars for languages
I'm taking a class on Finite Automata. I'm preparing for a midterm and am having trouble creating Grammars for specific languages. While I find the simple ones very intuitive, when they become more complex, I don't seem to know where to start. For…

PhilT
- 43
- 1
- 5
3
votes
1 answer
Finite automata to regular expression via state removal
I am trying to convert this finite automata to a regular expression using state removal. When removing a state, I know that I should look at all outgoing and incoming transitions, and make sure sure that all paths though the soon to be removed state…

pythonbeginner4556
- 313
- 1
- 5
- 14
3
votes
1 answer
Finite Automata String Matcher
I am trying to build a FA string matcher using java. I have the following pseudocode.
For the Finite-Automata-Matcher algorithm to work the transition function has to be computed. The following algorithm Compute-Transition-Function computes given…

Barte
- 306
- 1
- 5
- 16
3
votes
2 answers
DFA - design a DFA that accepts all strings over {0,1} that contains at most two 00's and three 11's as substring
I am practicing my DFA and I came across this question that seems to be very complex. I tried splitting it up into two smaller questions and I have an answer but it doesn't look right to me.
Can someone help me or at least give me some tips.
They…

Gana
- 75
- 1
- 7
3
votes
3 answers
How can I prove this language is regular?
I'm trying to prove if this language:
L = { w={0,1}* | #0(w) % 3 = 0 } (number of 0's is divisble by 3)
is regular using the pumping lemma, but I can't find a way to do it. All other examples I got, have a simple form or let's say a more defined…

mrklr
- 81
- 1
- 6
3
votes
1 answer
How to determine if a context-free grammar describes a regular language?
Given an arbitrary context-free grammar, how can I check whether it describes a regular language?
I'm not looking for exam "tricks". I'm looking for a foolproof mechanical test that I can code.
If it helps, here's an example of a CFG that I might…

user541686
- 205,094
- 128
- 528
- 886
3
votes
1 answer
How to create finite state transducers by compiling a grammar?
I'm using the OpenFST library and I'd like to develop finite state transducers (FSTs) at a higher level by describing grammar using Backus Naur Form (BNF).
Has anyone been able to compile BNF grammars into an OpenFST-consumable form?

trianta2
- 3,952
- 5
- 36
- 52
3
votes
1 answer
Meta-information in DAWG/DAFSA
I would like to implement a string look-up data structure, for dynamic strings, that will support efficient search and insertion. Currently, I am using a trie but I would like to reduce the memory footprint if possible. This Wikipedia article…

Schemer
- 1,635
- 4
- 19
- 39
3
votes
1 answer
Regular Languages and Concatenation
Regular languages are closed under concatenation - this is demonstrable by having the accepting state(s) of one language with an epsilon transition to the start state of the next language.
If we consider the language L = {a^n | n >=0}, this language…

CharlotteA
- 41
- 1
- 1
- 3
3
votes
1 answer
Superscript plus sign meaning
I have a quick question.
What does the superscript plus sign mean here?
= {w ∈ {0,1} : w ∈ (0^+)(1^+)}
Been awhile since I've done these. This is for making a non-deterministic finite automata

Raslion
- 91
- 1
- 2
- 5
3
votes
1 answer
DFA for this language
Σ={ a, b, c, d }
L={ x ∈ Σ* | x does not start or end with "bab" }
Examples that should be accepted:
ababa
ababc
bbabb
bbaba
ab
ba
aaaa
ɛ
Examples that should be rejected:
bab
baba
babc
cbab
abab
I tried several times, and got this so…
user1697973
3
votes
2 answers
Levenshtein Automata
i implemented a levenshtein trie to find similar words to a given word.
my goal was to have a fast way to do spell correction.
However i found out that there is an even faster way to do that:
Levenshtein Automata
I just have a problem... I…

Mulgard
- 9,877
- 34
- 129
- 232
3
votes
2 answers
What is a real life example of a Moore machine?
I have tried to find real life examples of Moore machines because I have read a lot about Moore machines but I am still confused.
Are there any real life examples of a Moore machine? Any points I should know in order to understand Moore machines?

Asad
- 63
- 1
- 10
3
votes
4 answers
Interview: Machine coding / regex (Better alternative to my solution)
The following is the interview question:
Machine coding round: (Time 1hr)
Expression is given and a string testCase, need to evaluate the testCase is valid or not for expression
Expression may contain:
letters [a-z]
'.' ('.' represents any char…

claudius
- 1,112
- 1
- 10
- 23
3
votes
5 answers
Finiteness of Regular Language
We all know that (a + b)* is a regular language for containing only symbols a and b.
But (a + b)* is a string of infinite length and it is regular as we can build a finite automata, so it should be finite.
Can anyone please explain this?

Madhudeep Petwal
- 83
- 2
- 7