$30
CS 334: Problem Set 6.
Problem 1. (10 points) A triangle in an undirected graph is a cycle of length 3. Show that the
language ππ
πΌπ΄ππΊπΏπΈ = {〈πΊ〉: ππππβ πΊ ππππ‘ππππ π π‘πππππππ} is in π·.
Problem 2. (10 points) Language π΄ is polynomial-time reducible to π΅, denoted π΄ <π π΅, if there is a
polynomial-time computable function π such that
π€ ∈ π΄ ⇔ π(π€) ∈ π΅.
a. (5 points) Show that if ∀π΄, π΅ ∈ π·, if π΅ ≠ π and π΅ ≠ Σ
∗
then π΄ <π π΅.
(Hint: this is easier than it seems since π΄ ∈ π·. Now use the definition.)
b. (5 points) Show that if π· = π΅π· then every language, other than π and Σ
∗
, in π· is
π΅π·-Complete.
Problem 3. (10 points) Behold, a genie appears before you! Given a formula π(π₯1, π₯2, … , π₯π) in
conjunctive normal form with π boolean variables, the genie will correctly tell you (in one step) whether
or not the formula is satisfiable. Unfortunately, the genie will not give you a truth assignment to the
variables that makes the formula true.
Your problem is to figure out a satisfying truth assignment when the genie says the formula is satisfiable.
You can present the genie with a polynomial (in π) number of queries.
i. (5 points) Give a high-level description of your algorithm, with sufficient detail.
ii. (2 points) What is the maximum number of queries made by your algorithm?
iii. (3 points) Explain why your algorithm correctly finds a satisfying assignment for a satisfiable
formula.