All quizzes Computability and Complexity

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

Given the regular expression (abUa)*b*ab which of the following strings are not in this language? A.) baaab B.) abbbab C.) aaabbbab D.) ababbab

A

In a PDA, if we have a transition from state A to state B, with the label 1,0 -> ε this means A.) If the input symbol is 1, and there's a 0 at the top of the stack, we transition from A to B, and pop the 0 from the stack. B.) If the input symbol is 1, we transition from state 0 to state ε C.) Either 1 or 0 is replaced with ε D.) We pop from the stack if the top of the stack holds a 1 or a 0

A

When we say a language is context-free, we mean that it is generated by a context-free grammar in which replacement rules... A.) do not consider the contents of stack memory. B.) are the only factor governing what substitutions we can apply in a derivation---regardless of the terminals or variables which may precede or follow the variable being replaced. C.) can only be applied to a variable to the left or right of a given terminal. D.) can only replace variables with terminals.

B

Given the language {(a^i)(b^j) | i >= 1, j > i} which of the following strings is not in the language? A.) aaaabbbbb B.) abb C.) aaabbb D.) abbbbbb

C

In the form of the transition function for a Turing machine, δ: Q x Γ -> Q x Γ X {L, R} {L,R} represents A.) the set containing the left child and right child, respectively. B.) the set of values for circuit inductance (L) and resistance (R). C.) the set containing the legal moves of the tape head, that is, left and right. D.) the set containing the indices of the leftmost and rightmost non-blank cells, respectively.

C

In the form of the transition function for a Turing machine, δ: Q x Γ -> Q x Γ X {L, R} Γ (gamma) represents A.) the stack alphabet. B.) an extension of the factorial function to the complex numbers. C.) the tape alphabet. D.) the instruction set.

C

If the complement of a language, A, is Turing-recognizable, we say that A is... A.) fractionally recognizable. B.) partially recognizable. C.) recognizable. D.) co-Turing recognizable.

D

T/F: 3SAT is not polynomial time reducible to CLIQUE

F

T/F: We often use informal English descriptions of a machine's behavior when describing a Turing machine.

T

T/F: We say that configuration C1 yields configuration C2 if the Turing machine can legally go from C1 to C2 in a single step.

T

T/F: When we say a finite automaton recognizes some language, we mean that it accepts all strings in the language and does not accept strings which are not in the language.

T

T/F: When we write R ∈ Q' (where Q' is a state in some DFA, M), it's important to realize that R plays two roles: R is a state in M, but it is also a set of states in some equivalent NFA, N.

T

∑ = ∑ U {ε}

T

mc: In the context of this course, a language is A.) a set of strings. B.) a kind of machine. C.) something spoken by humans. D.) None of the above.

a

The number of possible languages, and thus decision problems, is A.) uncountably infinite. B.) equal to the number of possible Turing machines. C.) countably infinite. D.) finite.

A

We can convert an arbitrary NFA to an equivalent regular expression by A.) converting the NFA to a GNFA, and then proceeding by state elimination until we have exactly two states, at which point the single transition from start state to accept state is labeled with the desired regular expression. B.) reading transition labels, starting at the start state until we reach accept states, converting them to regular expressions as we proceed, and then taking the union of all the resulting regular expressions, when all paths in the NFA have been accounted for. C.) converting the NFA to a GNFA, eliminating any self-loops and epsilon transitions, and then proceeding by state elimination until we have exactly two states, at which point the single transition from start state to accept state is labeled with the desired regular expression. D.) converting it to a DFA, and then performing subset construction.

A

We say uaqibv yields uqjacv if in the transition function A.) δ(qi, b) = (qj, c, L) B.) δ(qi, c) = (qj, b, L) C.) δ(qj, b) = (qj, c, L) D.) δ(qi, b) = (qj, c, R)

A

mc: P is the class of languages that are A.) decidable in polynomial time on a deterministic, single-tape Turing machine. B.) decidable in linear time on a deterministic, single-tape Turing machine. C.) decidable in polynomial time on a deterministic, multi-tape Turing machine. D.) decidable in polynomial time on a non-deterministic, single-tape Turing machine.

A

A language A is mapping reducible to language B if there is a complete function f where for every w A.) w >= f(w) B.) w ∈ A <=> f(w) ∈ B C.) w ∈ A <=> f(w) ∉ B D.) f(w) >= w

B

A language B is NP-complete if: A.) every A in NP is polynomial time reducible to B, and B is reducible to PATH. B.) B is in NP and every A in NP is polynomial time reducible to B. C.) B is in NP and a polynomially verifiable certificate exists for any element of B. D.) B is in NP and every A in NP is non-polynomial time reducible to B.

B

CLIQUE = {<G,k> | G is an undirected graph with a k-clique} is a member of A.) 3SAT B.) NP C.) P D.) HAMPATH

B

If A mapping reducible to B, and B is ________________, then A is decidable A.) recognizable B.) decidable C.) co-Turing recognizable D.) computable

B

NP is the class of languages that A.) are not a problem at all (hence, NP). B.) have polynomial time verifiers. C.) are verifiable only on a non-deterministic Turing machine. D.) are non-polynomially decidable.

B

When we say all context-free languages are decidable, we mean that A.) all context-free languages are Turing-recognizable. B.) ACFG = {<g, w> | G is a CFG that generates string w} is decidable C.) ACFG = {<g, w> | G is a CFG that unambiguously generates string w} is decidable D.) Any arbitrary CFG will generate a string of length n, in at most n^2 steps

B

Consider the configuration: 1011(q7)01111. This means that A.) the machine is in state q7 and the current position of the tape holds a one. B.) the machine is in state q7 and there are 11 (binary 1011) non-blank cells to the left of the tape head and 15 (binary 1111) non-blank cells to the right of the tape head. C.) the machine is in state q7 and the current position of the tape holds a zero. D.) This is an invalid configuration!

C

Context-free languages are recognized by... A.) finite state transducers. B.) generalized non-deterministic finite automata. C.) pushdown automata. D.) non-deterministic finite automata.

C

For any validly-defined Turing Machine A.) |Σ| <= |Γ| B.) |Σ| = |Γ| C.) |Σ| < |Γ| D.) |Σ| >= |Γ|

C

PATH = {<G, s, t> | G is a directed graph that has a directed path from s to t is a member of A.) NP hard B.) NP complete C.) P D.) NP

C

The set of all languages is A.) countably infinite. B.) finite. C.) uncountably infinite. D.) empty.

C

The transition function of a PDA is of the form... A.) δ: Q X ∑ X Γ -> Q X Γ B.) δ: Q X ∑ -> P(Q X ∑) C.) δ: Q X ∑ X Γ -> P(Q X Γ)

C

We convert a finite automaton to a regular expression by... A.) converting to a GNFA and then performing subset construction. B.) converting to a DFA and then performing state elimination. C.) converting to a GNFA and then performing state elimination. D.) converting to a PDA and then performing state elimination.

C

δ(q3, 0) = (q4, 0, R) means... A.) if in state q3, and a 0 is at the top of the stack, then transition to q4, push a zero onto the stack, and move right. B.) if in state q4, and a 0 is under the tape head, then transition to q3, write a zero at the current position, and move right. C.) if in state q3, and a 0 is under the tape head, then transition to q4, write a zero at the current position, and move right. D.) if in state q4, and a 0 is under the tape head, then transition to q3, write a zero at the current position, and move right.

C

In our high-level, "plain English" descriptions of Turing machines, we indicate input objects encoded as strings by... A.) providing the complete string or strings using the symbols of the tape alphabet. B.) enclosing them in parentheses, for example(A, B, w) C.) providing the complete string or strings using the symbols of the input alphabet. D.) enclosing them in angle brackets, for example, <A, B, w>

D

In the context of a "plain vanilla" Turing machine, a configuration includes... A.) the state of the machine, the position of the tape head, the symbol immediately under the tape head, and a few symbols on either side of the tape head. B.) the set of all states the machine is in, and the entire contents of the tape. C.) the state of the machine, the position of the tape head, and the symbol immediately under the tape head. D.) the state of the machine, the position of the tape head, and the entire tape contents.

D

The difference in the transition function of a DFA and an NFA is that A.) In a DFA δ: Q X ∑ -> Q wheras in an NFA we have δ: Q X ∑(epsilon) -> Q B.) In a DFA δ: Q X ∑(epsilon) -> P(Q) wheras in an NFA we have δ: Q X ∑(epsilon) -> Q C.) None of these is the correct! D.) In a DFA δ: Q X ∑ -> Q whereas in an NFA we have δ: Q X ∑(epsilon) -> P(Q)

D

The language ATM = {<M,w> | M is a Turing machine, w is a string, and M accepts w} is A.) decidable. B.) co-Turing recognizable. C.) unrecognizable. D.) undecidable.

D

The number of possible Turing machines is A.) finite. B.) five. C.) uncountably infinite. D.) countably infinite.

D

T/F: A DFA may have 0 or 1 out transitions from each state for any symbol in the alphabet.

F

T/F: A Turing machine can have multiple accept states.

F

T/F: A non-deterministic Turing machine recognizes languages that a deterministic Turing machine cannot.

F

T/F: A substitution rule may have only one variable on the right-hand side. That is, any given substitution rule, the value yielded from some variable may include more than one terminal but only one variable.

F

T/F: All Turing-recognizable languages are decidable.

F

T/F: An enumerator is a Turing machine that outputs strings in some language and always halts.

F

T/F: Context-free grammars do not allow for recursion.

F

T/F: Context-free languages are recognized by NFAs.

F

T/F: Given M = {M | M is a turing machine} the cadrinality of this set is uncountable

F

T/F: Given any arbitrary CFG, every has exactly one derivation with exactly one parse tree.

F

T/F: Given some DFA, D, and an equivalent regular expression, R, <D, R> ∈ EQDFA

F

T/F: If a context-free grammar is unambiguous, then a given string has exactly two leftmost derivations.

F

T/F: If we concatenate two regular languages, it's possible that the resulting language is not regular.

F

T/F: In a PDA, the stack alphabet must be disjoint form the input alphabet, that is Σ U Γ = Ø

F

T/F: In a PDA, we can access elements of the stack by their index, with index 0 representing the top of the stack.

F

T/F: In the definition of an NFA or DFA, using Sipser's notation, F is always a set of sets.

F

T/F: Once a Turing machine consumes all input symbols on its tape, computation will halt, and the machine will either be in its accept state or its reject state.

F

T/F: Some regular languages cannot be pumped.

F

T/F: The set of states in an NFA always includes the empty set as an element.

F

T/F: There are some languages which are Turing decidable, but not Turing recognizable.

F

t/f: (x1 ^ x2' ^ x3) V (x3 ^ x2 ^ x4) is a valid 3cnf-formula

F

A pushdown automata is a(n) ________________

NFA

T/F: A context-free grammar is a 4-tuple consisting of a finite set of variables, a finite set of terminals, a set of substitution rules, and a start variable.

T

T/F: A function f: Σ* -> Σ* is a computable function if there exists some Turing machine, M, such that on every input w, M halts with only f(w) on its tape.

T

T/F: A function f: Σ* -> Σ* is a polynomial time computable function if some polynomial time Turing machine M exists that halts with just f(w) on its tape, when started on any input w

T

T/F: A language A is polynomially verifiable if it has a polynomial time verifier.

T

T/F: A language is Turing recognizable if and only if some multi-tape Turing machine recognizes it.

T

T/F: A language is a set of strings.

T

T/F: A language is decidable if and only if it is Turing-recognizable and co-Turing-recognizable.

T

T/F: A language is decidable if and only if some non-deterministic Turing machine decides it.

T

T/F: A language is nothing more than a set of strings.

T

T/F: A verifier for some language, A, is an algorithm, V, where A = {w| V accepts <w,c> for some string c} and we refer to c as the certificate

T

T/F: After reaching the accept state or the reject state, a Turing machine will halt immediately.

T

T/F: An epsilon transition allows an NFA to change state without consuming an additional symbol.

T

T/F: Anything that can be encoded as a string can serve as the input to a Turing machine.

T

T/F: Anything that we write or type, be it source code or a mathematical object or a poem, is encoded as a string.

T

T/F: Context-free grammars have their roots in the work of Panini, dating from the 5th century BCE.

T

T/F: Every DFA is an NFA -- just one without branching, epsilon transitions, or missing transitions.

T

T/F: Every nondeterministic finite automaton has an equivalent deterministic finite automaton.

T

T/F: Given some CFG, with start variable S, the language of the grammar is {w ∈ ∑ | S => w}

T

T/F: Given some regular language A, the language {w^R | w ∈ A } is also regular

T

T/F: Given two regular languages, A and B, then {w | xy such that x ∈ A and y ∈ B} is a regular language

T

T/F: If A mapping reducible to B, and B is in set P, then A is in set P.

T

T/F: If a language is Turing recognizable and co-Turing recognizable, and we run the respective recognizers on some input string, w, we know at least one of the recognizers must halt in an accept state.

T

T/F: If we wish to show that two models of computation are equivalent, it suffices to show that one model can simulate the other.

T

T/F: In order to simulate a non-deterministic Turing machine with a deterministic Turing machine, we use a multi-tape Turing machine, where we number nodes in the tree representing non-deterministic branches, and record the address numbers on a separate tape.

T

T/F: Some context-free languages are inherently ambiguous, meaning that there is no CFG that unambiguously generates all strings in the language.

T

T/F: Strings in a context-free language may be generated using a context-free grammar.

T

T/F: The class of regular languages is a strict subset of the class of context-free languages.

T

T/F: The description of any Turing machine can be encoded as a string.

T

T/F: The language {(0^n)(1^n)} is context free

T

T/F: The language 0* has a single-state NFA which recognizes it.

T

T/F: The pumping lemma for regular languages holds true for all regular languages.

T

T/F: The transition function, either in an NFA or DFA, provides the "legal moves" we can make between states in a finite automaton.

T

T/F: Turing's 1936 paper, in which he introduced his machine model of computation, was intended to answer Hilbert's Decision Problem (Entscheidungsproblem).

T

T/F: We call a language a regular language if there is some finite automaton which recognizes it.

T

T/F: We can convert any NFA to an equivalent DFA using subset construction.

T

T/F: We can convert any finite automaton which recognizes some language to a context-free grammar which generates the language.

T

T/F: We can encode a Turing machine as a string, just as we can encode a DFA, NFA, regular expression, CFG, or pushdown automaton as a string.

T

T/F: We can include one or more Turing machines within a Turing machine and use these as "subroutines."

T

T/F: We can use the pumping lemma to prove a language is not regular.

T

T/F: We know we cannot have a decider for the language {⟨M,w⟩| M is a TM and w halts on input w} because if we did, we could construct a decider for ATM which we know is undecidable.

T


Conjuntos de estudio relacionados

MIST Quiz #4 Business Process Innovation

View Set

GEOG 110: Chapter 4 Landform Features

View Set

Bcomm Phrases, Clauses, and Fragments

View Set

Molecular Bonding & Hybridization

View Set

Chapter 44: Digestive and Gastrointestinal Treatment Modalities

View Set

Visual BASIC Final Exam Study Cards

View Set

Chapter 43: Liver, Pancreas, and Biliary Tract Problems

View Set