Download Chapter 4 Generating Permutations and Combinations

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts

Large numbers wikipedia , lookup

Addition wikipedia , lookup

Collatz conjecture wikipedia , lookup

Elementary mathematics wikipedia , lookup

Factorization of polynomials over finite fields wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Transcript
Algorithm II
• Begin with n empty locations which label 1,
2, …, n from left to right
• 1: put 1 in location number b1 +1
• 2: put 2 in the (b2 + 1)st empty location
• ……
• k: (general step) counting from the left we put
k in the (bk +1)st empty location.
• n: put n in the one remaining empty location.
15