1) problem 5.1
2) Let L = { <D> : D is a DFA and there are w,w1,w2,...,w9 ∈ L(D) such that w = w1w2w3w4...w9 } . Prove or disprove that L is decidable.
3) Let ONETM = { <M> : L(M) = { 1 } }. Prove or disprove that ONETM is decidable.
1) problem 5.19
2) Describe a poly-time algorithm that decides whether a given graph G has a 2-coloring. (An assignment of a color RED or BLUE to each vertex such that for every edge (u,w), the endpoints have different colors.) Argue that your algorithm is correct.
3) Describe a polytime algorithm for 2-SAT. Argue that your algorithm is correct. (2-SAT is the following problem: "given a Boolean formula F in 2-cnf form, is the formula satisfiable." 2-cnf form means an "and" of clauses, where each clause is an "or" of two literals.")
1) Let U = { <M, x, 1t> : (∃ y ∈ Σ*) M accepts input <x, y> within t steps }. Show that U is NP-complete.
2) problem 7.26
3) Show that the RULER problem is NP-complete. (Recall the RULER problem described in class. You are given n non-negative numbers x1,x2,...,xn and a width W. You must decide whether a carpenter's ruler with segments of lengths x1,x2,...,xn can be folded so that the result has width < W.
To explain more carefully, a folding is a sequence b1,b2,...,bn where each bi ∈ {-1,1}. Given a folding, define the partial sums W0,W1,W2,...,Wn as follows: