List All Word/Item Permutations Within a Text String
PHP Program by Jay Tanner
Enter a Text String Containing Up To 8 UNIQUE Words or Items
View/Copy PHP Source Code
Permutations are the total count of all the unique possible sequences in which unique items can be arranged in a line without duplicating any sequence, assuming that all of the items or words in the string are unique and distinguishable from each other. Even if the listing is far too long to print, we can still very easily compute the total number of possible permutations exactly. ============================================================== Given the plain text string: 'One Two Three Four' There are exactly 24 possible word or item permutations within the given text string. -------------------------------------------------------------- INDEXED TABLE OF 24 PERMUTATIONS OF 4 UNIQUE ITEMS Count Listing of ALL Permutations of the Unique Items ----- ------------------------------------------------------- 1 'One Two Three Four' 2 'One Two Four Three' 3 'One Three Two Four' 4 'One Three Four Two' 5 'One Four Two Three' 6 'One Four Three Two' 7 'Two One Three Four' 8 'Two One Four Three' 9 'Two Three One Four' 10 'Two Three Four One' 11 'Two Four One Three' 12 'Two Four Three One' 13 'Three One Two Four' 14 'Three One Four Two' 15 'Three Two One Four' 16 'Three Two Four One' 17 'Three Four One Two' 18 'Three Four Two One' 19 'Four One Two Three' 20 'Four One Three Two' 21 'Four Two One Three' 22 'Four Two Three One' 23 'Four Three One Two' 24 'Four Three Two One' ==============================================================
Program by Jay Tanner
Revised: Thursday, January 01, 1970 at 12:00:00 AM UTC