Docsity

MA 522 Fall 2003 Homework: Polynomial Time Algorithms and NP-Completeness - Prof. Agnes Sz, Assignments of Mathematics

Toggle sidebar
bg1
Homework 2
MA 522 Fall 2003
1.
(a) Show that an otherwise polynomial-time algorithm that makes at most a constant
number of calls to polynomial-time subroutines runs in polynomial time;
(b) Show that a polynomial number of calls to polynomial time subroutines may result in
an exponential-time algorithm.
2. Let
FACTORING ={(n, k) : nhas some factor dwith 1< d < k}.
(a) Show that FACTORING โˆˆNP;
(b) Show that FACTORING โˆˆco-NP (using that PRIMES โˆˆNP).
3.
(a) Prove that if NP 6=co-NP, then P 6=NP.
(b) Prove that if FACTORING is NP-complete then NP = co-NP.
4. The subgraph-isomorphism problem takes two graphs G1and G2and asks whether G1
is isomorphic to a subgraph of G2. (Two graphs are isomorphic, if there is a permutation
of the vertices which transform one graph into the other, preserving the edges). Prove
that the subgraph isomorphism problem is NP-complete, using NP-complete problems
discussed in class
1

Partial preview of the text

Download MA 522 Fall 2003 Homework: Polynomial Time Algorithms and NP-Completeness - Prof. Agnes Sz and more Assignments Mathematics in PDF only on Docsity!

Homework 2

MA 522 Fall 2003

(a) Show that an otherwise polynomial-time algorithm that makes at most a constant number of calls to polynomial-time subroutines runs in polynomial time; (b) Show that a polynomial number of calls to polynomial time subroutines may result in an exponential-time algorithm.

  1. Let FACTORING = {(n, k) : n has some factor d with 1 < d < k}.

(a) Show that FACTORING โˆˆ NP; (b) Show that FACTORING โˆˆ co-NP (using that PRIMES โˆˆ NP).

(a) Prove that if NP 6 = co-NP, then P 6 = NP. (b) Prove that if FACTORING is NP-complete then NP = co-NP.

  1. The subgraph-isomorphism problem takes two graphs G 1 and G 2 and asks whether G 1 is isomorphic to a subgraph of G 2. (Two graphs are isomorphic, if there is a permutation of the vertices which transform one graph into the other, preserving the edges). Prove that the subgraph isomorphism problem is NP-complete, using NP-complete problems discussed in class