Questions tagged [automata]

In theoretical computer science, automata theory is the study of abstract 'mathematical' machines or systems and the computational problems that can be solved using these machines. These abstract machines are called automata. ("Automata", Wikipedia)

From Wikipedia,

Automata, or automata theory, is the study of mathematical objects called abstract machines or automata and the computational problems that can be solved using them. Automata comes from the Greek word αὐτόματα meaning "self-acting".

692 questions
6
votes
8 answers

How can I construct a grammar that generates this language?

I'm studying for a finite automata & grammars test and I'm stuck with this question: Construct a grammar that generates L: L = {a^n b^m c^m+n|n>=0, m>=0} I believe my productions should go along this lines: S->aA | aB B->bB | bC C->cC |…
andandandand
  • 21,946
  • 60
  • 170
  • 271
5
votes
1 answer

Regular Language (yes or no)

I was given the task to check whether this language is regular: L = {w∈{a,b,c}* | where the number of a is less than the number of b+c.} I can find neither a regular expression for this, nor a deterministic (or not) finite state automaton. On the…
Giannis Vl
  • 51
  • 1
5
votes
6 answers

Fixing unescaped XML entities in Java with Regex?

I have some badly formatted XML that I must parse. Fixing the problem upstream is not possible. The (current) problem is that ampersand characters are not always escaped properly, so I need to convert & into & If & is already there, I don't…
Greg Mattes
  • 33,090
  • 15
  • 73
  • 105
5
votes
3 answers

Turing machine for addition and comparison of binary numbers

Good Day everyone! I am trying to solve this Exercise for learning purpose. Can someone guide me in solving these 3 questions? Like I tried the 1st question for addition of 2 binary numbers separated by '+'. where I tried 2 numbers addition by…
5
votes
0 answers

computing the ε-closure of NFA in haskell

I am implementing a nondeterministic finite automaton in Haskell and I am trying to implement the function that calculates the epsilon closure. To this purpose the NFA is implemented as: data Transaction = Transaction { start_state :: Int, …
elena
  • 889
  • 2
  • 11
  • 19
5
votes
1 answer

How to understand ATN graph generated for ANTLR grammar?

I have 2 simple lexer rules in my ANTLR4 grammar: fragment Attrs : '.' ARCH; fragment ARCH : 'IA32' | 'X64' | 'IPF' | 'EBC' | 'common'; The generated ATN with ANTLR4.7 is like this (Visual Studio Code): I searched some references about "ATN",…
smwikipedia
  • 61,609
  • 92
  • 309
  • 482
5
votes
1 answer

Pushing/popping stack in reverse order in a Pushdown Automaton

So I'm studying for a test I have coming up on pushdown automata and context-free languages and I'm stuck on this one construction. I have every part of this automaton completely working perfectly except for one part which I will explain below. The…
5
votes
2 answers

Testing intersection of two regular languages

I want to test whether two languages have a string in common. Both of these languages are from a subset of regular languages described below and I only need to know whether there exists a string in both languages, not produce an example string. The…
Mike Samuel
  • 118,113
  • 30
  • 216
  • 245
5
votes
2 answers

what is glushkov NFA. What is the difference between Glushkov NFA and Thompson NFA?

I saw this term "Glushkov NFA" at http://lambda-the-ultimate.org/node/2064 . Search engines are returning references to articles that use glushkov nfa, but nothing specific about the glushkov nfa itself. What is Glushkov NFA? How different is it…
woodstok
  • 2,704
  • 3
  • 34
  • 50
5
votes
0 answers

DFA Minimization by Hopcroft algorithm

P := {F, Q \ F}; W := {F}; while (W is not empty) do choose and remove a set A from W for each c in ∑ do let X be the set of states for which a transition on c leads to a state in A for each set Y in P for which X ∩ Y…
Silvester
  • 2,819
  • 5
  • 22
  • 23
5
votes
1 answer

Pumping lemma (Regular language)

I need some help with a pumping lemma problem. L = { {a,b,c}* | #a(L) < #b(L) < #c(L) } This is what I got so far: y = uvw is the string from the pumping lemma. I let y = abbc^n, n is the length from the pumping lemma. y is in L because the number…
mrjasmin
  • 1,230
  • 6
  • 21
  • 37
5
votes
1 answer

Example of Non-Linear, UnAmbiguous and Non-Deterministic CFL?

In the Chomsky classification of formal languages, I need some examples of Non-Linear, Unambiguous and also Non-Deterministic Context-Free-Language(N-CFL)? Linear Language: For which Linear grammar is possible( ⊆ CFG) e.g. L1 = {anbn | n ≥ 0 }…
5
votes
2 answers

how to draw automata in java

i want to draw an automata with edges and circulaire states, something like this http://pop-art.inrialpes.fr/~girault/Cours/Automates/td5.html, have u an example for that
Wassim Sboui
  • 1,692
  • 7
  • 30
  • 48
4
votes
5 answers

PDA to accept a language of strings containing more a's than b's

Produce a PDA to recognise the following language : the language of strings containing more a's than b's I have been struggling with this question for several days now, I seem to have hit a complete mental block. Would any one be able to provide…
user1301430
  • 189
  • 1
  • 2
  • 11
4
votes
1 answer

What type of languages are accepted by a PDA in which stack size is limited?

What type(s) of languages are accepted by a PDA in which stack size is limited to, say 20 items? In my view it should still be CFL, because there is a temporary memory to store.
1 2
3
46 47