Top/RedoHwks

Top | Top | recent changes | Preferences

If you got less than a 23/30 on homework 2, 3, or 4 and want to redo it (and you haven't already) you can. Turn any hwks you want to redo in by wednesday. Your new grade, minus a 7 point penalty, will replace your current grade on that hwk. Don't redo the same problems, but do the following substitutes:

hwk 2

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.

hwk 3

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.")

hwk 4

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:

W0 = 0. Wi+1 = Wi + bi xi.
Then the width of the folding is
maxi,i' |Wi - Wi'|.)


Top | Top | recent changes | Preferences
This page is read-only | View other revisions
Last edited December 5, 2004 4:09 pm by Neal Young (diff)
Search: