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
0
votes
3 answers

How does a LR Automaton actually work?

In this LR(0) automaton There are transitions for the non terminals as well, which I don't understand. If the input is aab. Then you are going to end up in the state which is just A->a·. If you were to visualise the state that were reached by…
Jonathan.
  • 53,997
  • 54
  • 186
  • 290
0
votes
1 answer

How to design a regex used for searching a pattern, rather than validating a pattern?

As we learned, given a regex pattern (e.g., A B A B A C), we can convert it to a DFA. In this example, it would be like a chain (you can test it here). This "chain-like" DFA can tell if a given string match the pattern or not (i.e., accept/reject…
JackWM
  • 10,085
  • 22
  • 65
  • 92
0
votes
0 answers

L = {www| w belongs to {0,1}*} prove via pumping lemma

Is the language given below a CFL? If not prove via Pumping Lemma. L = {www| w belongs to {0,1}*} That much I know that it's not a cfl! But I'm facing difficulty solving it via pumping lemma. Kindly help me
hyeri
  • 663
  • 9
  • 26
0
votes
1 answer

Describing the action of a Turing Machine

I'm trying to answer the third part to the following question: I have drawn the following state diagram: According to the solution, the machine "adds 1 to a binary number with its least significant bit in the leftmost position on the tape". I…
kw3rti
  • 204
  • 2
  • 11
0
votes
2 answers

Copy elements from vector based on condition C++

I'm using C++ to create Hopcroft's algorithm for DFA Minimization. Part of Hopcroft's algorithm is to - initially - divide two sets (P with accept and non-accept states and Q with non-accept states only). I already have group P, and from P I'm…
woz
  • 544
  • 6
  • 22
0
votes
3 answers

Solve three letter string into regular expression way

I need help to solve in regular expression way. The language of all strings defined over Σ = {X, Y, Z} with Y as the third letter and Z being the second last letter.
0
votes
1 answer

Converting a CFG into Greibach normal form

Do we need to convert a context-free grammar into Chomsky normal form first to convert it into Greibach normal form?
0
votes
2 answers

What is the difference between an Alphabet and an element of a set?

What is the difference between an Alphabet and an element of a set? Whether Alphabet is an element of a set or it is a set itself?
0
votes
1 answer

Deterministic Finite Automata Regular Expression with na(w) and nb(w) over a language

I'm trying to find the regular expression for the following language on {a,b} L = {w:(na(w) + nb(w)) mod 3 < 2 } I would like to split this up into: L1 = {w: (na(w) + nb(w)) mod 3 = 0 } L2 = {w: (na(w) + nb(w)) mod 3 = 1 } and then use L1 Union L2…
stevetronix
  • 1,231
  • 2
  • 16
  • 32
0
votes
1 answer

Grammar which generate language a^i^2?

Can anybode show what production rules are needed for constructing grammar for language Can it be described by a grammar? EDIT: This is similar but kind of "weaker" grammar since you are not doing powers but multiples of 2. It is…
0
votes
2 answers

Deterministic Finite Automata minimization

If we have a finite automaton with no final/accepting states. So that F is empty. How do you minimize it? I got this to a test in which I was asked to minimize an automaton but it had empty F and I didn't know how to approach the problem because…
0
votes
0 answers

Converting from regex (postfix) to epsilon nfa simple code or pseudo code

I have a regular expression in postfix form and I have to convert it to epsilon-NFA. I have read a lot of codes but it was complex, hard and I couldn't understand. My question is there an express simple code(c#, c++) to do this or even a pseudo code…
lole
  • 1
  • 1
  • 3
0
votes
2 answers

Forest Fire simulation in Octave or Matlab

In this page https://courses.cit.cornell.edu/bionb441/CA/forest.m I found a code named "Forest Fire" I am trying to figure out how this code works for educational purposes. Here are the rules: Cells can be in 3 different states. State=0 is empty,…
arnirx
  • 1
  • 3
0
votes
1 answer

Is the following language context free grammar?

For n>=0, is the given grammar (a^na^na^n) context free? I tried using pumping lemma, and the result was, no it is not context free.
0
votes
2 answers

Converting a Context-Free Grammar to a PDA

I am attempting to convert the following CFG to a pushdown automaton: S → AS | A A → 0A | 1B | 1 B → 0B | 0 I'm not really sure how to approach this problem, or the problem of CFG->PDA in general.