I am looking for help with an algorithm that will generate all the possible combinations of n-random letters in decreasing length. For example, the array of 'a','b','c' should generate:
abc acb bac bca cab cba ab ac ba bc ca cb a b c
where letters cannot repeat themselves once used