Questions tagged [pushdown-automaton]

A pushdown automaton (PDA) is a finite-state automaton with added stack based memory. It is a mathematical description of an algorithm for parsing context-free languages.

PDAs extend finite automata via a stack-based memory, and transitions can push/pop symbols to/from the stack. Deterministic PDAs (ones for which there exists only one legal transition at any time) are strictly weaker than non-deterministic ones; such is not the case for finite automata (PDAs are more powerful) or Turing machines (PDAs are weaker).

186 questions
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.
0
votes
1 answer

Why is this issue in the article impossible?

http://wiki.apidesign.org/wiki/Impossible I had a look at this and I do not understand why this problem seems to be impossible. String given to the "machine" will be always finite right? So even if I have 1 billion zeros, and 1 billion ones, one…
Trt Trt
  • 5,330
  • 13
  • 53
  • 86
0
votes
1 answer

Comparing two Push Down Automata

I am working on a project that requires me to compare two PDA to check whether they accept the same language or not. I have converted these PDAs into their corresponding context free languages, but I have no idea how to proceed further.
0
votes
1 answer

How to change windows embedded handheld language (Pidion PDA)?

I'm using a Pidion BP 6000 PDA with Windows embedded handle (based on windows mobile 6.5) Most of the system language are in Korean, some in English. How to change the system language to English? p/s: the weir thing is, checking the system…
0
votes
0 answers

Simple explanation of PDA accept states?

I've been trying to find a super simple explanation of Push-Down Automaton. This is what I've come up with so far: A PDA has three operations: A push to the stack; given an input state, input symbol, and the top stack symbol A pop from the stack;…
0
votes
0 answers

how do you create a context free grammar for this language and pda?

Show that a set L containing equal number of 01s and 10s is regular ; [hint: L = {‘’, 0,00..,1,11…,010,101,…}, consider two branches; one starting with 0 and other with 1.] Write a CFG and PDA for L.
0
votes
1 answer

A pushdown automaton that recognizes the negation of a language

As an example: Say I want to design a PDA that recognizes the language of all strings over the alphabet {1,0} that are NOT palindromes. If I design a PDA that recognizes the language of all strings over the {1,0} that are palindromes and then swap…
0
votes
1 answer

Some constraint on Language and CFG

I see one note about automaton theory: Consider the following language: L={xy : x,y in {a,b}*} and consider following constraint: 1) x=y 2) x != y 3) x=(y)reverse 4) number of x is not equal to number of y i read a language with constraint…
0
votes
1 answer

Pushdown Automata for an intersection?

I have a question about designing a pushdown automata for the language: L = { w in {a, b}* : 2n_a(w) <= n_b(w) <= 3n_a(w) } In other words, the number of b's in w is "between" 2 times the number of a's and three times the number of a's. I'm…
Farzad
  • 1,770
  • 4
  • 26
  • 48
0
votes
1 answer

Can All States Be Final In A Deterministic Pushdown Automata?

When constructing deterministic pushdown automata, can every state be a final state? I'm having trouble, specifically, with constructing a DPDA that accepts the following language: L = { 0n 1m | n ≥ m } My approach is to make the initial state a…
0
votes
2 answers

Push Down Automanton-Computation

I am trying to understand how PDA works. In the following diagram I understand how transition functions work and how the stack must be updated. But The only question I have is Why the Start state is an accept state as well? while the PDA is for L =…
0
votes
1 answer

Constructing an LL(1) grammar with substituion, factoring and left recursion removal

Using any of the techniques (substitution, factoring, left-recursion removal), construct an LL(1) grammar accepting the same language as G. G over Σ = {0, 1, 2}: S → Y | 1X X → 1X | 0 Y → Y0 | 1X1 | 2X2 I did this so far: X is left…
0
votes
0 answers

Left-recursion removal, to get the equivalent grammar

S → Y | 0Z Y → Y1 | 1Z | 1Z 00 Z → 1Z | 0 I know the Y is left recursive but why is the Z not left recursive? For Y i got Y -> 1ZF | 1Z00 F -> 1F | e Then factoring Y -> 1ZX | 1ZX F -> 1F | e X -> F | 00F Where 'e' is empty
0
votes
0 answers

Language accepted PDA

Suppose we have the following PDA: M= delta(q0, 1, $) = {(q0, X$)} delta(q0,λ, $) = {(q0, λ)} delta(q0, 1, X) = {(q0, XX)} delta(q1, 1, X) = {(q1, λ)} delta(q0, 0, X) = {(q1, X)} delta(q1, 0, $) = {(q0, $)} my…
0
votes
1 answer

Pushdown automaton for (a^n b^n)^m c^m

I'm stuck building the transition functions for this automaton. I suppose I should stack a 1 for each a and unstack it for each b The number of c's equals the number of ab pairs, so I think I should stack a 0 for each b I encounter. Thing is: how do…
andandandand
  • 21,946
  • 60
  • 170
  • 271