home *** CD-ROM | disk | FTP | other *** search
- Short: Generate permutations, source code in C
- Author: ralf.gruner@t-online.de (Ralf Gruner)
- Uploader: ralf.gruner@t-online.de (Ralf Gruner)
- Type: misc/math
- Distribution: Public Domain
-
-
- This program generates all permutations of the elements of an array.
- The example works with an array of characters, but can be changed for
- any other element types.
-
- Use the executable in a shell window with this syntax:
-
- permutation <text>
-
-
- Example:
-
- 1.Ram Disk:>permutation abc
- abc
- acb
- bac
- bca
- cab
- cba
-
-
- The code is a port of a Pascal program I have written in 1988.
- The permutations are generated in a recursive function using a mask
- for filtering the remainig elements.
- The sort algorithm is simple and can be replaced by the library
- function qsort or can be removed.
-
- Ralf Gruner, Großschönau, Germany 27 August 1999
-
-
- ============================= Archive contents =============================
-
- Original Packed Ratio Date Time Name
- -------- ------- ----- --------- -------- -------------
- 6024 4066 32.5% 26-Aug-99 19:41:46 +permutation
- 1021 475 53.4% 27-Aug-99 16:14:08 +permutation.c
- 488 280 42.6% 27-Aug-99 17:39:06 +permutation.c.info
- 835 394 52.8% 27-Aug-99 17:39:06 +permutation.info
- 872 459 47.3% 27-Aug-99 17:19:26 +permutation.readme
- 3304 349 89.4% 27-Aug-99 17:39:06 +permutation.readme.info
- 628 275 56.2% 27-Aug-99 17:42:02 Permutation.info
- -------- ------- ----- --------- --------
- 13172 6298 52.1% 28-Aug-99 06:19:26 7 files
-