Main Flashcards
What is the Acceptance problem?
ATM
ATM = { < M, w > | M is a TM, M accepts w }
Is recognizable.
Is undecidable.
In this course what is an algorithm?
A turing machine
Stated by the Church-turing theorem
Formal definition of a turing machine
It is a 7-tuple (has 7 components)
- Q = finite set of states
- Σ = the finite input alphabet
- ⊔ ∉ Σ
- Γ = the finite tape alphabet
- ⊔ ∈ Γ
- Σ ⊆ Γ
- δ = transition function
- q0 = start state
- qacc = accept state
- qacc != qrej
- qrej = reject state
- q0, qaccept & qreject ∈ Q
The transition function (δ)
δ(q,a) = (r,b,D)
δ tells us how the machine reacts if we are in some state q while the head reads a.
Then enter a new state r, replace a with some symbol b, and move in some direction D (left or right)
A nondeterministic TM’s transition function can contain several possibilities for the same situation (any one of the parentheses):
δ(q,a) = { (r,b,D), … (rk, bk, Dk) }
Can also be written as sets:
δ: Q x Γ –> Q x Γ x {L,R}
Q (all states) and the tape alphabet, transition to another Q and tape alphabet along with a left or rigt movement of the tapehead.
Definition of a configuration
A configuration of turing machine M is a string: uqav
- u, v ∈ Γ*
- u = portion left of head
- v = nonblank portion right of head
- q ∈ Q
- current state
- a ∈ Γ
- symbol currently scanned
Written: q0110 then 0q110 and so forth.
What is L(M)
The collection of strings that M accepts is the language of M or the language recognized by M, denoted L(M)
Definition of when a language is recognizable
There are two definitions
- If there exist a TM M such that L = L(M).
- If there exist a TM M that for any input w accepts iff w ∈ L.
Definition of a decider
A TM that halts on all inputs are called deciders
What does it mean when a decider “decides L”
That it will accept on any input w where w ∈ L, and reject on any input where w ∉ L
When is a language “decidable”
A language L is decidable if some TM decides it.
What is the relation between Multi-tape TMs and Single-tape TMs?
Every multi-tape TM has an equivalent single-tape TM.
What is a Nondeterministic TM?
At any point in a computation the machine may proceed according to several possibilities.
A Nondeterministic TM can from one state go to several different states with the same input.
What is the relation between nondeterministic and deterministic TMs?
Every nondeterministic TM has an equivalent deterministic TM.
A NTM with n states converted to a DTM may have up to 2n states
What is an enumerator?
- A TM which prints the content on its tape.
- The printed set of strings represents the language recognized by the enumerator.
- An enumerator starts with the blank input on its tape
- It might print an infinite list of strings
- It might generate strings in any order
- It might print repeatedly the same string
What is the terminology for describing TMs?
- Formal description
- Spells out in full the TM’s states, transition function, etc.
- The lowest level of description
- Quickly becomes very complex, even for simple problems
- Implementation description
- We use English to describe the way the TM works
- We describe how the TM moves its tape head
- We describe how the TM uses the tape (stores information)
- We do not give details about states or transition functions
- High-level description
- We use English to describe an algorithm
- We do not provide details about the use of the machine (tape head, tape, states, etc.)
What kind of input can a TM take?
The input of a TM is always a string.
- If we use other objects as input, e.g. polynomials, we need to find a way to encode the object into a string
- input 0 => input <0>
- input 01,02,…,0k => input <01,02,…,0k>
Definition of a decidable language
There are two definitions
- A language L is decidable if there exists a TM M where L = L(M) and M stops on every input.
- A language L is decidable if there exists a TM M such that we for all strings w have that M accepts w if w ∈ L and rejects w if w ∉ L
What is the spectrum of languages?
((((Regular languages) CF-lang) Decidable) Recognizable (ATM))
What does it mean when a function is injective?
It means that it is one-to-one. It does not map two different elements of A to the same element of B.
What does it mean when a function is surjective?
A function f: A –> B is surjective (onto) if all the elements of B are associated to some element of A.
What is a bijective function?
A function f: A –> B is bijective if each element of A corresponds to a unique element of B and each element of B corresponds to a unique element of A, i.e., f is injective and surjective
When are sets equipotent?
Two sets A and B are equipotent, written A ~ B if there exists a bijective function from A to B.
Intuitively, two sets are equipotent iff they have the same “number” of elements.
The class of all sets equipotent to a given set is called a cardinal.
What is a universal turing machine?
A universal TM U:
- is a “universal simulator” of TMs. (It simulates any possible TM)
- the initial part of the tape describes all the instructions of a TM T, and after reading this part of the tape U behaves like T.
What is a reduction?
A reduction is a way of converting one problem to another problem in such a way that a solution to the second problem can be used to solve the first problem.
Problem A reduces to Problem B
- A solution to B provides a solution to A
- Solving A is not harder than solving B
- If B is decidable then A is decidable
- If A is undecidable then B is undecidable
What is reducibility?
It is a method to prove that some problems are undecidable.
To prove that B is undecidable, find a problem A that is known to be undecidable and such that A reduces to B.
What is a linear bounded automaton?
A linear bounded automaton is a TM such that the tape head is not permitted to move off the portion of the tape containing the input.
If the machine tries to move its head off either end of the input, the head stays where it is.
What is a post correspondence problem?
Post correspondence problem: It is undecidable whether a collection of dominos has a match.
A collection of dominos: [a | ab], [b | ac], [abc | ac], [ab | bc]
A match is a list of dominos (repetition permitted) so that the string we get by reading off the symbols on the top is the same as the string of symbols on the bottom.
Example of a match:
[a | ab], [b | ca], [ca | a], [a | ab], [abc | c]
If A ≤M B and A is undecidable, is B then undecidable?
Yes.
What is a property of recognizable languages?
A class of languages S is called a property of recognizable languages if all the members of S are recognizable languages, i.e, for every L ∈ S there exists a TM that recognizes L.
What does it mean that a property is trivial?
A trivial property is true either for all languages or for no languages.
If you can prove for a property of some set of laguages that two laguages L1 and L2 exist such that L1 ∈ S and L2 ∉ S, then that property is non-trivial.
If S is not trivial, then it is non-trivial.
Explain running time/time complexity.
Let M be a deterministic TM that halts on all inputs.
The running time or time complexity of M is the function:
f: N –> N
where f(n) is the maximum number of steps that M uses on any input of length n.
If f(n) is the running time of M, we say that M runs in time f(n) and that M is an f(n) time Turing machine.
What does it mean to be an asymptotic upper bound?
When f(n) = O(g(n)), we say that g(n) is an asymptotic upper bound for f(n).
Explain polynomial bounds
Bounds of form nc for a constant c > 0.
Explain exponential bounds.
Bounds of form 2n^c for some constant c > 0.
What is the time complexity class?
Let t: N –> R+ be a function. The time complexity class TIME(t(n)) is the collection of all languages that are decidable by a 0(t(n)) time Turing Machine.
What does a superscript + mean like R+ or N+?
R+ all positive real numbers N+ all positive natural numbers
Explain running time.
Let N be a nondeterministic TM that is a decider. The running time of N is the function f: N –> N where f(n) is the maximum number of steps that N uses on any branch of its computation on any input of length n.
Define PSPACE from NSPACE
When can Rice’s theorem be used?
Given a decision problem:
- Examine if it translate to a membership of a languageclass
(“L(M) ∈ S” ? )
- Examine if S is a non-trivial property, by finding a language that has it and another that does not have it.
If 1 and 2 is true, then Rice’s theorem can be used.
What is a Hamiltionian path?
A Hamiltonian path in a directed graph G is a directed path that goes through each node exactly once.
Often called HPATH.
What is a verifier?
A verifier for a language A is an algorithm V such that
A = {w | V accepts <w> for some strings c}</w>
The time of a verifier is measured in terms of |w|
A polynomial time verifier is a verifier that runs in polynomial time (in the length of w)
When is a language polynomially verifiable?
A language is polynomially verifiable if it has a polynomial time verifier.
What is a certificate?
A verifier uses a string. This is called a certificate or a proof of membership in the language.
A certificate for a string ∈ HPATH is an example Hamiltonian path from s to t.
What is NP and what does the name mean?
- NP is the class of languages that are decided by nondeterministic polynomial TMs.
- NP is decidable.
- The name: nondeterministic polynomial time.
- NP has a polynomial verifier