Unformatted text preview: (i) Find the largestj such that aj < n r + j. (ii) Output Comb(t + 1) = al a2 ... ajl aj + 1 aj + 2 ... aj + r j + 1. 12. Let S = {Xl,X2, . .. ,Xkn}. Generate the combinations of 1,2, ... , kn taken k at a time. As soon as combination al a2 ... ak is generated, output the subset {Xal , x a2 , . .. , x ak }. Chapter 8 Review 1. (a) S = 2, S = 0 + 2( 3) = 6, S = 4 + (6)( 3) = 14, S = 1 + 14( 3) = 41 = f( 3). (b) S = 1, S = 2 + 1(2) = 0, S = 1 + 0(2) = 1, S = 5 + 1(2) = 3, S = 6 + (3)(2) = 0 = f(2). 2. (a) 149 x 712 (b) 1018 )( 72 74 1424 509 144 37 2848 2§4 288 18 §696 127 576 9 11392 63 1152 4 22784 31 2304 2 4§§68 15 4608 1 91136 7 9216 106088 3 18432 1 36864 73296 3. In each case, we set up a flag F which is 0 if the relation has the desired property and is 1 otherwise. (a) Step 1: Set F = 0 and i = 1. Step 2: while F = 0 and i < t, if ai =I=b i set F = 1; replace i by i + 1. end while...
View
Full
Document
This note was uploaded on 11/08/2010 for the course MATH discrete m taught by Professor Any during the Summer '10 term at FSU.
 Summer '10
 any
 Graph Theory, Integers

Click to edit the document details