Discrete Mathematics with Graph Theory (3rd Edition) 242

# Discrete Mathematics with Graph Theory (3rd Edition) 242 -...

This preview shows page 1. Sign up to view the full content.

240 Solutions to Review Exercises 1f -< 1f'. Now suppose that 1f -< (j :::S 1f' for some combination (j. All integers to the left of k -1 (in 1f) are the same in 1f' as well, and hence also in (j. If k - 1 were also the same in (j, then we would have (j = 1f since no number to the right of k -1 can be increased in 1f. Thus, in (j, k -1 must be increased to k (and no more, since (j -< 1f'). It then follows that (j = 1f' since 1f' is the smallest sequence whose initial segment (up to k) consists of the integers of 1f' . 10. (a) [BB] n; n - r + 1; n - r + j. (b) [BB] It must be 123 ... r; (c) [BB] It must be (n - r + 1) (n - r + 2) ... n. 11. [BB] Given n 2:: r > 0, to enumerate the (;) combinations of 1, 2, ... , n taken r at a time, proceed as follows. Step 1: Set t = 1. Output Comb(l) = 123 ... r. Ifr = n, stop. Step 2: For t = 1 to (;) - 1, given combination Comb(t) = ala2 ... ar, determine the next combi- nation Comb(t + 1) as follows.
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (i) Find the largestj such that aj < n -r + j. (ii) Output Comb(t + 1) = al a2 ... aj-l 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.

Ask a homework question - tutors are online