This is documentation for Mathematica 4, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
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}]


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}]


Advanced Topic: Rearranging Nested ListsContents