Starting from:

$30

CS 334: Problem Set 6

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.

More products