Construct the state diagram with transitions of a deterministic Turing machine that given an input number n in binary representation halts with just the binary representation of n+1 on its tape.
Show that the following integer approximation of the log function is PRIMITIVE recursive.
log(m,n) := "logarithm in base m of n" = "the least k for which m^k >= n"
m^k denotes m to the k-th power. You can assume that m >= 2 and n > 0.
Hint:s Use bounded minimization.
Let Sigma = {0,1}. Show that the problem of testing whether a CFG generates some string in 1* is decidable. In other words,
show that ONESTARcfg = {< G > | G is a CFG and (1* INTERSECTION L(G)) <> empty} is decidable.
Hint:s Do not make the mistake of assuming that the intersection of CFLs is context free.
Solve either one of the following problems:
Let G = (V,E) be an undirected graph. A vertex cover for G is a is a subset V' of V such that for each edge (a,b) in E either a belongs to V', or b belongs to V' (or both).
VERTEX-COVER = {< G,c > | G is undirected graph and G has a vertex cover of size c}.
Show that VERTEX-COVER is an NP-complete problem
Hint: Show that:
< G,k> belongs to CLIQUE iff f(< G,k >) = < GC,c > belongs to VERTEX-COVER
where
(Don't forget to show that the function f can be computed by a deterministic TM in polynomial time.)