Java Glossary : permutation

CMP home Java glossary home Menu no menu Last updated 2004-06-28 by Roedy Green ©1996-2004 Canadian Mind Products

Java definitions: 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

You are here : home : Java Glossary : P words : permutation.

permutation
If you take a set of objects and rearrange the order without taking any away or adding any, that is a permutation of the orginal set of objects. Permutations care about order where combinations do not. If you have n objects there are n! possible permutations of them. For code to generate them all see the Dijkstra algorithm.
book_coverA Discipline of Programming
0-13-215871-X
Edsger Wybe Dijkstra
See page 71 for the permutations algorithm.
amazon.com Barnes and Noble
amazon.ca chapters
amazon.co.uk amazon.de

For example, the 3! = 6 permutations of three objects a, b and c are:

a b c
a c b
b a c
b c a
c a b
c b a


CMP logo
CMP_home
home
Canadian Mind Products CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[24.87.56.253]
Your IP:[80.134.30.163]
You are visitor number 2040.
Please send errors, omissions and suggestions
to improve this page to Roedy Green.
You can get a fresh copy of this page from: or possibly from your local J: drive mirror:
http://mindprod.com/jgloss/permutation.html J:\mindprod\jgloss\permutation.html