Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please solve this and help me understand it. Much appreciated. A subset S of nod

ID: 3777661 • Letter: P

Question

Please solve this and help me understand it. Much appreciated.

A subset S of nodes in a graph G is called a dominating set iff every node of G is either in S or adjacent to a node in S. Consider the language DOMINATING-SET = {(G, k): G has a dominating set of size k}. Carefully argue that the following is a correct polynomial-time mapping reduction from VERTEX-COVER to DOMINATING-SET: Map (G, k) to (G', k) where G' is obtained from G by removing all nodes of degree 0 and applying the following operation for each edge {u, v} of G: put {u, v} in G' as well as a fresh new node that has edges only to u and to v. Using 5a, prove that DOMINATING-SET is NP-complete.

Explanation / Answer

# Simple comparisons >>> 8 > 10 False >>> 256 < 725 True >>> 10 == 10 True # Use comparisons in an expression >>> x = 2*8 >>> y = 2 >>> while x != y: ... print 'Doing some work...' ... y = y + 2 ... Doing some work... Doing some work... Doing some work... Doing some work... Doing some work... Doing some work... Doing some work... # Combining comparisons >>> 3> 3