COMP 455

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Suppose G = (V, Σ, R, S) is in Chomsky normal form and there is a derivation in G from S of the form S ⇒ x1 ⇒ x2 ⇒ x3. How long is x3?

4

If L is L1* where L1 is context-free then L is

Context free but not necessarily deterministic context free

If L is the intersection of a regular language and a context-free language then L is

Context-free but not necessarily deterministic context-free

If L is the language accepted by an arbitrary push-down automata then L is

Context-free but not necessarily deterministic context-free

If L is the language generated by a context-free grammar then L is

Context-free but not necessarily deterministic context-free

If L is the union of a regular language and a context-free language then L is

Context-free but not necessarily deterministic context-free

{encode(M): Turing machine M has at least 10 states}

Decidable but not finite

{encode(M): Turing machine M uses at least 100 tape squares during its computation on blank tape}

Decidable but not finite

{encode(x): string x is a palindrome, that is, x = x^R}

Decidable but not finite

If L is the language accepted by a deterministic push-down automaton then L is

Deterministic context-free but not necessarily regular.

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

False

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

False

All subsets of a regular language are regular

False

All subsets of a regular language are regular.

False

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

False

For every n state nondeterministic finite automaton there is an equivalent deterministic finite automaton having at most 2n states

False

For every n state nondeterministic finite automaton there is an equivalent deterministic finite automaton having at most n states

False

If M is a nondeterministic finite automaton over Σ and every state of M is an accepting state, then L(M) = Σ*

False

If M is an n state nondeterministic finite automaton, then there is a deterministic finite automaton having 2n states that is equivalent to M

False

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

False

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

False

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

False

Suppose L is a language and the relation ≈L has n equivalence classes. Let M be a finite automaton. If L(M) = L and M is nondeterministic then M has at least n states

False

Suppose L is a regular language. L must be finite

False

Suppose L is a regular language. L must be infinite

False

Suppose L is a regular language. The relation ≈L must have infinitely many equivalence classes

False

The context free languages are closed under complementation.

False

The context free languages are closed under intersection.

False

The deterministic context-free languages are closed under complementation

False

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

False

The pumping lemma for context-free languages is used to show that a language is context free.

False

The set of strings in {a, b, c}∗ having equal numbers of a's, b's, and c's is context free.

False

The two regular expressions abcø and abcø* are equivalent

False

If L is the intersection of a regular language and a finite language then L is

Finite

{encode(M): Turing machine M does not halt on blank tape}

Not partially decidable

{encode(M)encode(x): Turing machine M does not halt on string x}

Not partially decidable

{encode(M): Turing machine M halts on blank tape}

Partially decidable but not decidable

{encode(M)encode(x): Turing machine M halts on string x}

Partially decidable but not decidable

If there is a Turing machine T with two halting states y and n and for strings (words) in L, T halts in state y and for strings (words) not in L, T halts in state n then L is

Recursive/decidable but not necessarily context-free

If there is a Turing machine T which halts for strings in L and does not halt for strings not in L then T is

Recursively enumerable/partially decidable but not necessarily decidable/recursive

If L is a language represented by a regular expression then L is

Regular but not necessarily finite

If L is a language that is represented by a regular expression then L is

Regular but not necessarily finite

If L is the intersection of two regular languages then L is

Regular but not necessarily finite

If L is the language accepted by a nondeterministic finite automaton then L is

Regular but not necessarily finite

If L is then language accepted by a deterministic finite automaton then L is

Regular but not necessarily finite

What is a method for showing that a language L is not regular?

Show that the relation ≈L has infinitely many equivalence classes.

x ≡M y

The same strings are accepted starting at x as at y

Suppose (K, Σ, δ, s, H) is a Turing Machine. H is

The set of halting states

Suppose (K, Σ, δ, s, H) is a Turing Machine. K is

The set of states

Suppose (K, Σ, δ, s, H) is a Turing Machine. s is

The start state

Suppose δ(q,a) = (p,b) for the Turing machine. Suppose that the Turing machine goes from configuration C1 to configuration C2 using the fact that δ(q,a) = (p,b). q is

The state the Turing machine is in in configuration C1.

Suppose δ(q,a) = (p,b) for the Turing machine. Suppose that the Turing machine goes from configuration C1 to configuration C2 using the fact that δ(q,a) = (p,b). p is

The state the Turing machine will be in in configuration C2.

Suppose δ(q,a) = (p,b) for the Turing machine. Suppose that the Turing machine goes from configuration C1 to configuration C2 using the fact that δ(q,a) = (p,b). b is

The symbol written on the tape between configuration C1 and C2.

Suppose (K, Σ, δ, s, H) is a Turing Machine. Σ is

The tape alphabet

Suppose δ(q,a) = (p,b) for the Turing machine. Suppose that the Turing machine goes from configuration C1 to configuration C2 using the fact that δ(q,a) = (p,b). a is

The tape symbol scanned in configuration C1.

Suppose (K, Σ, δ, s, H) is a Turing Machine. δ is

The transition function

Suppose δ(q,a) = (p,b) for the Turing machine. Suppose that the Turing machine goes from configuration C1 to configuration C2 using the fact that δ(q,a) = (p,b). δ is

The transition function

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

True

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

True

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

True

All finite languages are decidable

True

All regular languages are context-free.

True

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

True

For every context-free language L there is a context-free grammar G in Chomsky normal form such that L = L(G).

True

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

True

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

True

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

True

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

True

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

True

If E and F are regular expressions, then there is a regular expression for the set of strings in the union of L(E) and L(F) where L gives the set of strings represented by a regular expression

True

If E is a regular expression, then there is a finite automaton M such that L(M) = L(E).

True

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

True

If L is a regular language then the complement of L is a regular language

True

If L is a regular language then the complement of L is a regular language.

True

If L is a regular language then the union of L and L* is also a regular language

True

If M is a finite automaton, then L(M) is regular

True

If M is a finite automaton, then L(M) is regular.

True

If M is a finite automaton, then there is a regular expression E such that L(M) = L(E).

True

If M is a nondeterministic finite automaton, then there is a deterministic finite automaton equivalent to M

True

If M is a nondeterministic finite automaton, then there is a deterministic finite automaton equivalent to M.

True

If a language L is partially decidable and its complement is also partially decidable, then L is decidable

True

If languages L1 and L2 are regular, then their concatenation L1L2 is also regular.

True

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

True

If τ is a reduction from L1 to L2 then τ is a computable recursive function

True

If ≈L has finitely many equivalence classes then L is regular.

True

Suppose L is a language and the relation ≈L has n equivalence classes. Let M be a finite automaton. If L(M) = L and M is deterministic then M has at least n states

True

Suppose L is a language and the relation ≈L has n equivalence classes. Let M be a finite automaton. L is a context-free language

True

Suppose L is a language and the relation ≈L has n equivalence classes. Let M be a finite automaton. L is a regular language

True

Suppose L is a regular language. L must be context free

True

Suppose L is a regular language. The intersection of L with a context-free language will always be context-free

True

Suppose L is a regular language. The union of L with a regular language will always be regular

True

The context free languages are closed under Kleene star.

True

The context free languages are closed under concatenation.

True

The context free languages are closed under union (that is, the union of two context-free languages is a context-free language).

True

The deterministic context-free languages are closed under union

True

The intersection of two regular languages is regular

True

The intersection of two regular languages is regular.

True

The language {a^nb^nc^m: n,m ≥ 0 is context free}

True

The set of strings in {a, b}∗ having equal numbers of a's and b's is context free.

True

x ∼M y

x and y cause M to end up in the same state

x ≈L y.

{z : xz ∈ L} = {z : yz ∈ L}

((p, a, β),(q, γ)) is a transition in a push-down automaton

β is popped from the stack if this transition is used. γ is pushed onto the stack if this transition used.


संबंधित स्टडी सेट्स

Chemical Bonding and Compounds folder

View Set

Basic and Optional Parts of a Professional Business Letter

View Set

Lecture 7: Historical Development of US Health Insurance

View Set

NCLEX Review Study Guide (Summer 2022)

View Set

Chapter 8: Concepts and Generic Knowledge

View Set

Chemistry Semester 2 Final Review

View Set