Samuel Williams Thursday, 17 May 2007

This research investigates the performance of various different permutation generation algorithms and how they can be optimised to improve execution time. Feel free to use the source code, which implements 5 different methods of permutation generation.

Example Usage

$ g++ -o algo main.cpp
$ ./algo
*** Not enough arguments
Usage: ./algo [algorithm-id = 5,6,7,8,9] [order=1...n] [options]
	-t	 Print out time information
	-s	 Test sorting algorithm
The above modes are mutually exclusive
$ ./algo 5 3
Generating permutations using algorithm 5: Slow Recursive order 3
     0:    1,    2,    3
     1:    1,    3,    2
     2:    2,    1,    3
     3:    2,    3,    1
     4:    3,    1,    2
     5:    3,    2,    1
Time: 3.00407e-05