: , .
Haskell permutations, :
import Data.List
permutations ["hel","lo","bye"] ==
[["hel","lo","bye"],["lo","hel","bye"],["bye","lo","hel"],
["lo","bye","hel"],["bye","hel","lo"],["hel","bye","lo"]]
, ,
map concat (permutations ["hel","lo","bye"]) ==
["hellobye","lohelbye","byelohel","lobyehel","byehello","helbyelo"]
(, ) , @Sven, Math.Combinatorics.Graph :
map concat (combinationsOf 2 ["hel","lo","bye"])
, . , " ", , - , , .