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
2
votes
2 answers

How to convert nested function call tree to state machine?

Say you have this sort of system: const input = [0, [1, 2, [3, 4, [8, 9], 6, 7], 4], [5, 6, 7], 3, 4, [8, 9], 6, 7, [1], 9] const output = parse(input) console.log(output.join('-')) function parse(input) { const output = [] iterate(input,…
Lance
  • 75,200
  • 93
  • 289
  • 503
2
votes
2 answers

What is the difference between a Turing Machine and an Algorithm?

According to my understanding, the Turing machine is just a machine representation of an algorithm. Is there any difference between an algorithm and a Turing machine?
Obaid Ur Rehman
  • 324
  • 2
  • 15
2
votes
1 answer

Deterministic Pushdown Automata for L = a^nb^n | n >=0) Python Program

The python code I wrote and ran for the program. It does what I want it to do for the project, but I really don't like how I structured the code and I feel like I could have labelled and shortened so much of my code. Any advice? I want to make it…
2
votes
0 answers

What is the best algorithm for getting the level of a graph

I want to getting the level of a graph, i know one that is get the shortest path between two nodes (Djikstra), What is the best on space and time ? regards
2
votes
1 answer

Need a better explanation of this lengthy DFA word problem ( CS : Formal Language & Automata course)

I read this problem multiple times and still don't quite understand it. I just need some help understanding what's going on here. So, I understand that there are three types of "species": A, B and C. Are these species alphabets Σ? Also, in the…
2
votes
1 answer

Chomsky hierarchy - examples with real languages

I'm trying to understand the four levels of the Chomsky hierarchy by using some real languages as models. He thought that all the natural languages can be generated through a Context-free Grammar, but Schieber contradicted this theory proving that…
Babbara
  • 448
  • 1
  • 6
  • 21
2
votes
3 answers

Constructing CFG for even length words with maximum of two 0's

I am struggling to construct a good CFG for a L={xE{0,1}* | that is of even length and have a maximum of two 0s} So words like L={11, 10, 0011...} I am trying with the following attempt. S -> E | E0A | A0E | E0E0E | 00EA | EA00 E-> 1A | e A ->…
2
votes
3 answers

Minimum number of states in DFA

Minimum number states in the DFA accepting strings (base 3 i.e,, ternary form) congruent to 5 modulo 6? I have tried but couldn't do it.
2
votes
1 answer

How to construct NPDA corresponding to the below grammar?

I wanna construct NPDA corresponding to the below grammar. Please tell me the idea of the construction. S -> aABB|aAA A -> aBB|a B -> bBB|A
Rurou2
  • 167
  • 1
  • 1
  • 7
2
votes
1 answer

How to design NPDA for accepting these languages?

I wanna design the NPDA(non-deterministics pushdown automata) that accepts below two languages. Please explain how to design them. L(r) where r = abb*aba* L(r) = {a^nb^2n : n > 0}
Rurou2
  • 167
  • 1
  • 1
  • 7
2
votes
2 answers

How to construct a pushdown automata for L={a^nb^m where n<=m<=2n}?

It should be constructed without using 2 stacks. I tried it but I couldn't do it without 2 stacks.
2
votes
3 answers

DFA that will accepts the string having odd number of 1's and odd number of 0's

I want the DFA generation, that will accepts the string having odd number of 1's and odd number of 0's.
Manthan
  • 63
  • 1
  • 2
  • 10
2
votes
1 answer

Deterministic Finite Automata divisibility problem

Design a DFA that accepts the string given by L = { w has number of 'a' divisible by 3 and number of 'b' divisible by 2 over the alphabet {a,b} }
Suraj Oberai
  • 304
  • 5
  • 14
2
votes
1 answer

How and why non deterministic PDA is more powerful than deterministic PDA?

How and why non deterministic PDA is more powerful than deterministic PDA? Please explain.
2
votes
1 answer

Fixed size tape Turing machine which cannot write on input is equivalent to DFA

I have to prove that Turing machine with fixed size tape which cannot write on input is equivalent to finite automaton (DFA or NFA). It's important to add that the size of the tape is the size of the tape which excludes the input. For example, if…
Avishai Yaniv
  • 420
  • 5
  • 15