Permutations
Usage Message: Permutations[list] generates a list of all possible permutations of the elements in list. Attributes[Permutations] = {Protected} Notes: Permutations[{}] returns {}. It is widely believed that the result should instead be {{}}, in part so that the number of permutations for a set with n elements will always be n!. It is possible that this behavior will be changed for some future version of Mathematica. You can get the suggested behavior in any version of Mathematica by adding a rule for Permutations:
In[1]:= Permutations[{}]
Out[1]= {}
In[2]:= Unprotect[Permutations]; Permutations[{}] = {{}}; Protect[Permutations]
Out[2]= {Permutations}
In[3]:= Permutations[{}]
Additional Online Documentation:
Mathematica 3.0
http://documents.wolfram.com/v3/RefGuide/Permutations.html
Mathematica 4.0
http://documents.wolfram.com/v4/RefGuide/Permutations.html
Questions or comments? Send email to support@wolfram.com.
|