Question: In this assignment, you will prove that the Zero Sum problem is NP - Complete. The Zero Sum problem accepts an array of n integers
In this assignment, you will prove that the Zero Sum problem is NPComplete. The
Zero Sum problem accepts an array of n integers and returns whether it is possible
to negate some of those integers to make the array sum equal
For example, the array data has a zero sum if you negate
the and while the array data cannot be reduced to a
sum of zero.
Prove that Zero Sum is NP
The Subset Sum problem is NPC This takes in an array of n integers and a
target t to determine if the array has a subset that sums to t
To prove that Zero Sum is NPC would you reduce Zero Sum to Subset or
Subset Sum to Zero Sum?
Give pseudocode for your reduction from question above.
Subset Sum has two parameters an array and a target value while Zero Sum
only has one an array If you are reducing ZS to SS you will need to come up
with a target value and possibly modify the array. If you are reducing SS to ZS
you will need to come up with an array that incorporates the target value.
Show that your reduction is polynomial time.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
