* Ch. 4 of Discrete and Combinatorial Mathematics * * Exercise 4.1, problem 5a * 5. Consider the following program segment (written in pseudocode): for i := 1 to 123 do for j := 1 to i do print i * j a) How many times is the print statement of the third line * executed? (n)(n+1)/2 * n = 123. The answer should be 7626 * * Exercise 4.2, problem 18a Consider the permutations of 1, 2, 3, 4. The permutation 1432, for instance, is said to have one ascent—namely, 14 (since…
Words 455 - Pages 2