This is documentation for Mathematica 4, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
Wolfram Research, Inc.

Advanced Topic: Rearranging Nested ListsContents

1.8.15 Advanced Topic: Combinatorial Operations

You can use lists to set up many kinds of combinatorial calculations. Here are a few examples.

Some combinatorial operations on lists.

This gives the possible permutations of three elements.

In[1]:= Permutations[{a,b,c}]

Out[1]=

This combines the list elements in all possible ways. This operation is analogous to a mathematical "outer product" (see Section 3.7.11).

In[2]:= Outer[List, {a, b}, {c, d}]

Out[2]=

Advanced Topic: Rearranging Nested ListsContents