subsum - The SUBSETSUM problem Consider the following...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: The SUBSETSUM problem Consider the following problem called the KNAPSACK problem: INPUT: n integer weights w 1 ,w 2 ,...,w n n integer values v 1 ,v 2 ,...,v n an integer weight capacity W an integer goal g PROBLEM: Is there I { 1 , 2 , ,n } such that i I w i W and i I v i g ? Problems with constrained resources. n jobs with w i representing the bandwidth requirement of the i-th job, W representing the total bandwidth available. A simpler version, 0 / 1 SUBSET problem : v i = w i for all i and W = g . INPUT: n numbers a 1 ,a 2 , ,a n , a target number B ; PROBLEM: Is there I { 1 , 2 , ,n } such that i a i = B ? Reduction from 3-CNFSAT to SUBSETSUM F be a 3-CNFSAT Boolean formula: m clauses C 1 , ,C m and n variables X 1 , ,X n . Construct 2 m + 2 n + 1 numbers with 2 m + n bits each: Variable-numbers XP ( i ) ,XN ( i ) for 1 i n ....
View Full Document

This document was uploaded on 11/29/2010.

Page1 / 6

subsum - The SUBSETSUM problem Consider the following...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online