Ch 13 Flashcards

(89 cards)

1
Q

A stack machine is a kind of automation that uses a stack for auxiliary data storage.

A

T

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

The size of the stack is bounded.

A

F

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

The size of a stack is unbounded - it never runs out of space.

A

T

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

The set of languages that can be defined using a stack machine is the same as the set of languages that can be defined using a DFA: the regular languages.

A

F

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

What gives stack machines an edge over finite automata?

A

The size of the stack is unbounded.

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

What is a stack?

A

A collection of data accessed in last-in-first-out order.

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

What is a kind of automation that uses a stack for auxiliary data storage?

A

Stack machine

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

What does it mean for data to be pushed onto a stack?

A

Data item is added to the top of the stack.

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

What is it called when data is added to a stack?

A

Push

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

Just like DFAs, stack machines make state transitions.

A

F

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

Stack machines make transitions.

A

F

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

Unlike a DFA or NFA, what does a stack machine not do, but instead maintains a stack of symbols?

A

state transitions.

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

A stack machine starts with a stack that contains just one symbol, S

A

T

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

No stack machine can be deterministic.

A

F???

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

NA stack machine may have more than one legal sequence of moves on a given input string.

A

F

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

If the stack machine decides to accept the input string, it will by leaving its stack empty, and popping everything off including what?

A

The bottom-of-stack symbol S.

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

What does a stack machine start with?

A

A start symbol, S

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

In a stack machine, what must be popped off to signal that the input string is accepted?

A

The original bottom-of-stack symbol S

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

The transition function (pikmen) takes only one parameter.

A

F

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

A stack machine is a 4-tuple.

A

T

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

A stack machine is nondeterminisitic - at each stage, there may be any number of possible moves.

A

T

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

A stack machine is nondeterministic.

A

T

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

At each stage of a stack machine, there may be only two possible moves.

A

F

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

What is the formal definition of a stack machine?

A

See notes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is the output of the transition function?
A set of strings that can be pushed onto the stack.
26
What is Γ of 4-tuple M
Stack alphabet
27
What is Σ of 4-tuple M
Input alphabet
28
What is S of 4-tuple M
An element of Γ is the initial stack symbol
29
An instantaneous description of a Stack machine is a pair (x,y).
T
30
There is at least one move if the Stack Machine's stack is empty.
F
31
No move is possible when the stack machine is empty.
T
32
At any point in the stack machine's operation, its future depends on two things: that part of the input string that is still to be read, and what?
The current contents of the stack.
33
An instantaneous description for a stack machine is a pair (x, y) where x ∈ Σ* is what?
the unread part of the input.
34
What side of the stack is considered to be the top of the stack?
???
35
A stack machine can easily simulate any finite automation.
T
36
A stack machine cannot easily simulate a finite automation.
F
37
What can a stack machine easily simulate?
Finite automation.
38
What process can be carried out by a stack machine, using the stack to hold the string to be rewritten?
String-rewriting
39
when can a stack machine be used to replace a leftmost symbol?
If the leftmost symbol is a nonterminal
40
There is no CFG that we can construct a stack machine for.
F
41
We can take any CFG and construct a stack machine for the same language.
T
42
When constructing a stack machine out of a CFG, what should be done if the top symbol on the stack is nonterminal?
replace it using any one of the grammar's productions for that nonterminal
43
What does a stack machine recognize?
???
44
There is a way to take any stack machine and construct a CFG for the same language.
T
45
It is not possible to take any CFG and construct an equivalent stack machine. However, the reverse of this is true.
F
46
If M = (Γ, Σ, S, δ) is any stack machine, there is no context-free grammar G with L(G) = L(M).
F
47
If M = (Γ, Σ, S, δ) is any stack machine, there is context-free grammar G with L(G) = L(M).
T
48
In the construction, the stack symbols of the stack machine become nonterminals in the constructed grammar, and the input symbols become what?
terminals
49
A language is context free if and only if it is L(M) for some stack machine M.
T
50
CFGs and stack machines have equivalent definitional power.
T
51
When is a language context free?
If and only if it is L(M) for some stack machine M
52
Forcing a parse tree to repeat a nonterminal symbol in a certain way is called _______ parse trees.
pumping parse trees
53
The height of a parse tree is the number of edges in the longest path from the start symbol to any leaf
T
54
The ___ of a parse tree is the number of edges in the longest path from the start symbol to any leaf.
height
55
If L1 and L2 are any context free language, L1L2 is also context free.
T
56
Context free languages are closed for some of the same common operations as regular languages.
T
57
What are some of the same common operations that context-free languages are closed for?
union, concantenation, kleene star
58
The Kleene closure of any language L is L* = {x1x2…xn | n ≥ 0, with allxi ϵ L}.
T
59
If L is any context free language, L* is also context free.
T
60
Context-free languages are closed under what with regular languages?
intersection
61
the CFLs are closed for complement.
F
62
The intersection of regular languages is a regular language, and they are not all CFLs
F
63
The intersection of 2 CFLs fails to be a CFL
F
64
In nonclosure property, what does not mean that every intersection of CFLs fails?
???
65
CFLs are not closed for which operations?
intersection or complement
66
The pumping lemma is very useful for proving that languages are context free.
T
67
For a certain class of grammars, the non determinism of the top-down-parsing stack machine can easily be avoided.
T
68
Whenever there is a terminal on top of the stack, the constructed stack machine can apply any one of the productions for that nontermina.
T
69
The constructed stack machine works by repeatedly applying what?
productions
70
PDAs can be illustrated with state-transition diagrams.
T
71
One widely studied kind of automation is the push down automations.
T
72
Push down automation has a limited, bounded stack of symbols.
F
73
Some PDAs accept a string by empying their stack, some accept by ending in an acepting state, and some must do both.
T
74
Some push-down automations start with a special symbol on the stack.
???
75
What is the definition of a PDA?
A finite-state machine augmented with an unbounded stack of symbols.
76
What does PDA stand for?
Push-down automation
77
what automation is like a finite state machine augmented with an unbouded stack of symbols?
Push-down automation
78
a deterministic context-free language (DCFL) is a regular language that is L(M) for some DPDA M.
T
79
The set of languages that cna be recognized by a PDA is not the same as a stack machine.
???
80
DPDAs are usually defined in a way that prevents them to get stuck in most configurations.
F
81
What is a deterministic context-free language?
???
82
A ___ is a language that is L(M) for some DPDA M.
Deterministic context-free language
83
What is a deterministic context-free language (DCFL)
a language that is L(M) for some DPDA M
84
What happens when you restrict PDAs to the deterministic case?
???
85
The DCFLs have the same closure properties of CFLs.
F
86
The union of two DCFLs is necessarily a DCFL.
F
87
The DCFLs are the same as the LR(1) language. These are exactly the languages that can be quickly parsed using deterministic, bottom-up techniques.
T
88
There is no tool like the pumping lemma specifically for DCFLs.
T
89
What is the result for xR if we know x=abc?
cba