2.2 PUSHDOWN AUTOMATA (Staflavélar) Flashcards

1
Q

What are pushdown automata?

A

They are like nondeterministic finite automata but have an extra component called a stack.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the stack do in pushdown automata?

A

The stack provides additional memory beyond the finite amount available in the control. The stack allows pushdown automata to recognize some nonregular languages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why is it useful that pushdown automata are equivalent in power to context-free grammars?

A

Because it gives us two options for proving that a language is context free.

We can give either a context-free grammar generating it or a push- down automaton recognizing it.

Certain languages are more easily described in terms of generators, whereas others are more easily described by recognizers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What can pushdown automaton (PDA) do?

A

A pushdown automaton (PDA) can write symbols on the stack and read them back later.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How does pushdown automaton put things on the stack?

A

Writing a symbol “pushes down” all the other symbols on the stack.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is pushing and popping?

A

Writing a symbol on the stack is of- ten referred to as pushing the symbol, and removing a symbol is referred to as popping it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In other words a stack is a “last in, first out” storage device.

What does that mean?

A

All access to the stack, for both reading and writing, may be done only at the top.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A pushdown automaton is a 6-tuple (Q, Σ, Γ, δ, q0, F ), where

A

Q, Σ, Γ, and F are all finite sets, and
1. Q is the set of states,
2. Σ is the input alphabet,
3. Γ is the stack alphabet,
4. δ: Q × Σε × Γε−→P(Q × Γε) is the transition function,
5. q0 ∈ Q is the start state, and
6. F ⊆ Q is the set of accept states.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

If a language is context free, then some pushdown automaton recognizes it.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Because every regular language is recognized by a finite automaton and every finite automaton is automatically a pushdown automaton that simply ignores its stack, we now know that every regular language is also a context-free language.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How is the pumping lemma different for context-free languages?

A

This time the meaning of pumped is a bit more com- plex. It means that the string can be divided into five parts so that the second and the fourth parts may be repeated together any number of times and the resulting string still remains in the language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Pumping lemma for context-free languages :

A

If A is a context-free language, then there is a number p (the pumping length) where, if s is any string in A of length at least p, then s may be divided into five pieces s = uvxyz satisfying the conditions
1.for each i≥0, uv^ixy^iz∈A,
2. |vy| > 0, and
3. |vxy| ≤ p.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly