Exercises

1. [00] How many ways are there to shuffle a 52-card deck?

2. [10] In the notation of Eq. (2), show that pn(n−1) = pnn, and explain why this happens.

3. [10] What permutations of {1, 2, 3, 4, 5} would be constructed from the permutation 3 1 2 4 using Methods 1 and 2, respectively?

Image    4. [13] Given the fact that log10 1000! = 2567.60464 ..., determine exactly how many decimal digits are present in the number 1000!. What is the most significant digit? What is the least significant digit?

5. [15] Estimate 8! using the following more exact version of Stirling’s approximation:

    6. [17] Using Eq. (8), write 20! as a product of prime factors. ...

Get Art of Computer Programming, The: Volume 1: Fundamental Algorithms now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.