PLEASE ANSWER THE QUESTION NO:5 NOT 3 5) If the answer to (3) is “yes” then you can quickly prove to a skeptic that you
Posted: Fri May 20, 2022 5:12 pm
PLEASE ANSWER THE QUESTION NO:5 NOT 3
5) If the answer to (3) is “yes” then you can quickly prove to a
skeptic that you are right: simply show them the subset, and ask
them to add up the numbers. How does this relate to the property of
a decision problem being in NP?
FOR REFERENCE PURPOSE :
3) Does the following set have a subset that adds up to 0? {20,
27, -3, -1, 2, 7, 13, -44, -3, -5, 4} Suggestion: There are 2048
subsets of this set and you cannot check them all by hand. Use the
Haskell Stdm library’s `powerset` function to get all subsets. Then
see if one of them satisfies the requirement that the sum of all
its elements is 0.
5) If the answer to (3) is “yes” then you can quickly prove to a
skeptic that you are right: simply show them the subset, and ask
them to add up the numbers. How does this relate to the property of
a decision problem being in NP?
FOR REFERENCE PURPOSE :
3) Does the following set have a subset that adds up to 0? {20,
27, -3, -1, 2, 7, 13, -44, -3, -5, 4} Suggestion: There are 2048
subsets of this set and you cannot check them all by hand. Use the
Haskell Stdm library’s `powerset` function to get all subsets. Then
see if one of them satisfies the requirement that the sum of all
its elements is 0.