Question: Non-deterministic algorithm for SUM-OF-SUBSETS For every element randomly Guess if it is part of subset Guess(ai in subset) 1 if Yes (O(m)) 0 if No
Non-deterministic algorithm for SUM-OF-SUBSETS
For every element randomly Guess if it is part of subset Guess(ai in subset) 1
if Yes (O(m))
0 if No (O(m))
check if sum of selected elements which have Guess( ) == 1, is M
if Yes,
return True and this is the solution
if No, repeat above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
