Proving Problems NPC

Efficient Recruiting

Organize a summer sports camp. Need at least one coach to cover nn sports. We have mm potential coaches. Here is the kicker - for each of the nn sports, there is some subset of mm applicants. Here is the decision problem: For a give number k<mk < m, is it possible to hire at most kk coaches and still cover nn sports?

Prove efficient recruiting is NPC.

Prove Efficient Recruiting in NP

Certificate: a subset VV' of coaches that cover all nn sports

Certifier: for each coach in VV', mark the sport that he/she qualifies, check if all nn sports are cleared in the end.

The checker takes polynomial time. Thus, efficient recruiting is in NP.

Reduction from Vertex Cover

We want to show VC p\leq_p ER

Step 1 Construct a poly-time algorithm that converts VC inputs to ER inputs

Given a graph G=(V,E)G = (V, E) and an integer kk, we'd like to define a sport SeS_e for each edge ee and a coach CvC_v for each vertex vv. CvC_v is qualified for sport SeS_e iff vv is an endpoint of edge ee.

Step 2 Claim: an ER instance is true iff the corresponding VC instance is true

\Rightarrow If there are kk coaches that cover all nn sports, then the kk vertices in the graph will cover all the edges in GG.

\Leftarrow If there is a vertex cover of size kk, then this set of coaches will cover all sports.

Reduction from Set Cover

We want to show SC p\leq_p ER

Step 1 Convert SC inputs to ER inputs

Let the universe set UU be the set of sports, and let each coach's skills be a subset, so the collection of subsets will a collection of coaches. We have kk subsets union to UU.

Step 2 Claim: an ER instance is true iff the corresponding SC instance is true

\Rightarrow If there are kk coaches that cover all nn sports, then the kk subsets will cover all the elements in the university and union to UU.

\Leftarrow If there are kk subsets that union to UU, then these kk coaches will cover all sports.

References

Algorithm Design Ch8.2, 8.3

Connie Fan Blog Solutions

Last updated