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 2a and 2b are about the backtracking procedure MAKE-SETS and its helper MAKING-SETS, 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.
MAKE-SETS(n,k)
MAKING-SETS(n,k,1,)
MAKING-SETS(n,k,e,s)
ifk==0
prints
else
fore=eton
MAKING-SETS(n,k1,e+1,s{e})
2a.(5 points.) What will MAKE-SETS(4,3) print? Hint: enumerate calls to MAKING-SETS breadth-first.
2b.(5 points.) Suppose that n and k are nonnegative integers. What does MAKE-SETS(n,k) 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!