Question: Help needed for this question. Suppose that the symbol is the empty set, the symbol is the set union operator, and the symbol is

Help needed for this question.

Suppose that the symbol is the empty set, the symbol is the set union operator, and the symbol \ is the set subtraction operator. For example:

=

{ 1, 2, 3 }

=

{ 1, 2, 3 }

{ 1, 2, 3 }

=

{ 1, 2, 3 }

{ 1, 2, 3 } { 4 }

=

{ 1, 2, 3, 4 }

{ 1, 2, 3 } { 2 }

=

{ 1, 2, 3 }

\

=

\ { 1, 2, 3 }

=

{ 1, 2, 3 } \

=

{ 1, 2, 3 }

{ 1, 2, 3 } \ { 4 }

=

{ 1, 2, 3 }

{ 1, 2, 3 } \ { 2 }

=

{ 1, 3 }

The backracking algorithm MAKE-SETS uses these set operators. It is written in Cormens pseudocode notation. 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) if k == 0 print s else for e = e to n s = s { e } MAKING-SETS(n, k1, e+ 1, s) s = s \ { e }

1. What sets will MAKE-SETS(4, 3) print? Hint: enumerate the recursive calls to MAKING-SETS breadth-first.

2. Let l and m be nonnegative integers. What does MAKE-SETS(l, m) compute? Your answer must be one short sentence, stated in terms of l and m.

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 Databases Questions!