Comp 455 Study

¡Supera tus tareas y exámenes ahora con Quizwiz!

When computing a Turing Machine what is the Initial Configuration of M on input w?

(s, (ticket)(blank)w)

What are the three rules for Chomsky Normal Form?

1. Eliminate Long Rules length >=3 by splitting them up 2. remove rules that go to e 3. delete rule of length one

How many states are needed for the simplest possible nondeterministic and deterministic finite automata accepting exactly the set of strings over {a1...., a15} not containing all 15 symbols? two numbers

16 for nondeterministic, 2^16 for deterministic

A context-free language is ambiguous if some string has two or more leftmost derivations

F

A grammar is ambiguous if some string has two or more derivations

F

A language L is context-free if and only if there is a deterministic push-down automaton M such that L = L(M)

F

All subsets of a regular language are regular

F

If L is context free and R is Regular then L U R is context free

F

If M is a nondeterministic finite automaton over E and ever state of M is an accepting state then L(M) = E*

F

If language L1 is undecidable and there is a reduction from language L2 to L1 the L2 is undecidable

F

If the opponent can always win in the pumping lemma game, regardless of what moves you make, then L is regular

F

Nondeterministic Turing machines can decide some languages that deterministic Turing machines cannot decide

F

The deterministic context-free languages are closed under union.

F

The language {a^nb^nc^n : n>= 0} is context free

F

The pumping lemma is used to show that a language is regular

F

There exists an extension of a Turing machine that permits the Turing machine to decide problems that could not be decided before

F

every finite automaton accepts at most a finite number of input strings

F

{a^nb^nc^m : n,m >= 0} is context free

F

suppose ((p,a,B),(q,y)) is a production in a push-down automaton. True or false: y is popped from the stack if this production is used y is pushed onto the stack if this production is used B is popped from the stack if this production is used B is pushed onto the stack if this production is used

FTTF

Suppose that L is context-free and R is regular. Therefore R - L MUST be context free

False if R = E* because then R-L = L(not)

A Turing machine is a quintuple (K,E, δ, s, H) H =

Halting states

M _____ L if for any string w in E* the following is true: w in L if and only if M halts on input w.

Recursively Enumerable

A language L is context-free if and only if there is a push-down automaton M such that L = L(M)

T

All regular languages are context free

T

For all languages A and B over E*, (A*B*)* = (AUB)*

T

For ever regular expression E there is a nondeterministic finite automaton M such that L(E) = L(M), where L(E) is the language represented by the regular expression E

T

For every n-state nondeterministic finite automaton M with e arrows there is an equivalent n-state nondeterministic finite automaton M'' without e arrows

T

General Turing machines can decide some languages that Turing machines that never move to the left cannot decide

T

If E and F are regular expressions, then there is a regular expression for the set of strings in L(E) U L(F)

T

If G = (V,E,R,S) is in Chomsky normal form then the right-hand side of every rule in R has length two

T

If L is a regular language then {w^R : w in L} is also a regular language, where w^R is w with the symbols in reverse order

T

If L is context free and R is regular then L n R is context free

T

If T is a reduction from L1 to L2 then T is a computable (recursive) function

T

If equivL has finitely many equivalence classes then L is regular

T

If you can always win in the pumping lemma game, regardless of what moves the opponent makes, then L is not regular

T

The deterministic context-free languages are closed under complemenation

T

a grammar is ambiguous if some string has two or more leftmost derivations

T

for every n state non deterministic finite automaton there is an equivalent deterministic finite automaton having at most 2^n states

T

for every regular expression E there is a nondeterministic finite automaton M such that L(E) = L(M)

T

the language {a^ib^jc^kdc^kb^ja^i : i,j,k >- o} is context free

T

Suppose L is the language represented by the regular expression ((aUb)(aUb))* True or false: a equiv aba ab equiv bbb b equiv abb babab equiv ab

TFTF

Suppose L is a language and the relation equivL has n equivalence classes. let M be a finite automaton. True or false: L is a regular language If L(M) = L and M is deterministic then M has at least n states If L(M) = L and M is nondeterministic then M has at least n states L is a context-free language

TTFT

Suppose L is a context free language. Then L is a finite set There is a deterministic finite automaton M such that L = L(M) There is a nondeterministic finite automaton M such that L = L(M) There is a (nondeterministic) push-down automaton M usch that L = L(M)

There is a (nondeterministic) push-down automaton M such that L = L(M)

A language is generated by a grammar if and only if it is decidable

True

A language is generated by a grammar if and only if it is recursively enumerable

True

For each nondeterministic finite automaton, there is an equivalent deterministic finite automaton

True

If there is a nondeterministic Turing Machine that decides or semidecides a language, or computes a function, then there is also a standard Turing machine doing the same thing on the same language. True or False

True

L subset of E* is deterministic context-free if L$ = L(M).

True, $ marks the end of a string

Suppose that L is context-free and R is regular. Therefore L - R MUST be context free.

True, L - R = LnR(not)

Is {a^mb^n: m(dne)n} a determinist context free language?

Yes

Is {wcw^R: w in {a,b}* a deterministic context free language?

Yes

When you are representing a universal Turing machine what letter do you use conventionally to represent states?

a

Any language decided or semidecided, and any function computed by Turing machines with ________ can be decided, semidecided, or computed, respectively, by a standard Turing Machine (several tapes, heads, two-way infinite tapes, or multi-dimensional tapes)

all of the above

A Turing machine is a quintuple (K,E, δ, s, H) E =

an alphabet, containing blank symbol, left end symbol, but not right and left symbols.

Suppose L is a language and the relation equivL has n equivalence classes. Let M be an arbitrary deterministic finite automaton such that L(M) = L. Then a. The number of states of M is at least n^2 b. The number of states of M is at least 2^n c. The number of states of M is at least n. d. The number of states of M is at most 2^n

c

Recursive languages are closed under...

complement

The class of deterministic context-free languages is closed under...

complement

For a reduction there are two rules:

computability, map elements in language and elements not in language

The language {a^nba^m : n = m} is (finite, regular, context-free but not regular, or not context free)

context-free but not regular

A language is irregular if and only if it is accepted by a finite automaton

false

The class of recursively enumerable languages is closed under complement. True or False

false

The intersection of a context-free language with a regular language is regular

false

if a language is recursively enumerable, then it is recursive

false

For the pumping lemma game, if you can find an example of when you win then the language is not regular

false, all wins

A language L is regular if and only if double(~)L has infinitely many equivalence classes

false, finitely

A language is not recursive if and only if it is lexicographically Turing-enumerable

false, is recursive

A Turing machine is a quintuple (K,E, δ, s, H) K =

finite set of states;

A Turing machine is a quintuple (K,E, δ, s, H) s =

initial state

Context-free languages are not closed under...

intersection or complementation

For the pumping lemma problem |xy| <= ?

n

Is {w in {a,b,c}* : w has equal numbers of a's, b's, and c's} context free? why or why not?

no, cannot keep track of three numbers

is {a^mb^nc^p: m=n and n=p and m=p} a context free language? why or why not?

no, if m=n=p then they all equal each other and a context-free language cant keep track of all three

is {www : w in {a,b}*} context free? why or why not?

no, pumping lemma game, i = 2

For the pumping lemma game, if you always when then language is

not regular

When you are representing a universal Turing machine what letter do you use conventionally to put in front of states?

q

Any function that is computed or language that is decided or semidecided by a k-tape Turing machine is also computed, decided, or semidecided, respecitively, by...

standard Turing machine

What does it mean to put Universal Turing Machines in lexicographic order?

start with s and go down the list

for the context-free pumping lemma game, what are you trying to prove

that the language is not context free

A Turing machine is a quintuple (K,E, δ, s, H) δ =

transition function

A context-free grammar is ambiguous when there are two or more distinct parse trees

true

A language is accepted by a pushdown automata if and only if it is a context-free language

true

A language is recursive if and only if both it and its complement are recursively enumerable

true

A language is recursively enumerable if and only if it is Turing-enumerable

true

If L1 is not recursive, and there is a reduction from L1 to L2, then L2 is also not recursive

true

If a language is recursive, then it is recursively enumerable.

true

The class of deterministic context free languages is properly contained in the class of context-free languages

true

A recursively enumerable language is closed under...

union and intersection

Recursive languages are closed under...

union, complementation, intersection, concatenation, and kleene star

The context-free languages are closed under...

union, concatenation, and kleene Star

The class of languagesaccepted by finite automata is closed under

union, concatenation, kleene star, complementation, and intersection

for the context-free pumping lemma game, is u, v, x, y, or z pumped?

v and y

if x and y are equivalent with respect to L then

xz in L if and only if yz is in L

In the pumping lemma problem x, y, or z cannot = e?

y

Is {a^mcb^n: m(dne)n} U {a^mdb^2m: m>= 0} a deterministic context free language?

yes

Is {ca^mb^n: m(dne)n} U {da^mb^2m: m >= 0} a deterministic context free language?

yes

is {a^mb^nc^p: m(dne)n or n(dne)p or m(dne)p} a context free language? why or why not?

yes, Union of two context free languages

is {a^mb^nc^p: m=n or n=p or m=p} a context free language? why or why not?

yes, Union of two context free languages

Is {a,b}* - {a^nb^n : n >= 0} context free? why or why not?

yes, Union rule

is {a^mB6nc^pd^q : n = q, or m <= p or m + n = p + q} context free? why or why not?

yes, Union rule

is {w in {a,b,c}* : w does not contain equal numbers of occurrences of a, b, and c}

yes, union of a(dne)b, b(dne)c, and a(dne)c


Conjuntos de estudio relacionados

Lecture 12. Autonomic Nervous System

View Set

bingham Gerund and participle exam

View Set

Module 8 Quiz Software Engineering

View Set

cell reproduction and heredity Quiz

View Set