Question: Questions 2 a and 2 b are about the backtracking procedure MAKE - SETS and its helper MAKING - SETS, written in Cormen s pseudocode.
Questions a and b are about the backtracking procedure MAKESETS and its helper MAKINGSETS, written in Cormens pseudocode. The symbol is the empty set, and the symbol is the set union operator. The parameters n k and e are nonnegative integers. The parameter s is a set of nonnegative integers.
MAKESETSnk
MAKINGSETSnk
MAKINGSETSnkes
ifk
prints
else
foreeton
MAKINGSETSnkese
a points. What will MAKESETS print? Hint: enumerate calls to MAKINGSETS breadthfirst.
b points. Suppose that n and k are nonnegative integers. What does MAKESETSnk compute? Your answer must be one short sentence, stated in terms of n and k
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
