CoCoA:Tuples

From ApCoCoAWiki
Revision as of 10:02, 24 October 2007 by XMLBot (talk | contribs) (pushing XML rev. 1.46, again)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Tuples

N-tuples

Description

This function computes all N-tuples with entries in S.

It is equivalent to S >< S >< ... >< S [N times].

Example

  Tuples([1, 4, 7], 2);
[[1, 1], [1, 4], [1, 7], [4, 1], [4, 4], [4, 7], [7, 1], [7, 4], [7, 7]]
-------------------------------

Syntax

Tuples(S:LIST, N:INT):LIST

CartesianProduct, CartesianProductList

Permutations

Subsets

   <type>list</type>