<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, Combinations of numbers in sets</title>
    <link>http://www.mapleprimes.com/questions/41503-Combinations-Of-Numbers-In-Sets</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Wed, 10 Jun 2026 19:37:33 GMT</lastBuildDate>
    <pubDate>Wed, 10 Jun 2026 19:37:33 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, Combinations of numbers in sets</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, Combinations of numbers in sets</title>
      <link>http://www.mapleprimes.com/questions/41503-Combinations-Of-Numbers-In-Sets</link>
    </image>
    <item>
      <title>found one solution BUT...</title>
      <link>http://www.mapleprimes.com/questions/41503-Combinations-Of-Numbers-In-Sets?ref=Feed:MaplePrimes:Combinations of numbers in sets:Comments#answer77394</link>
      <itunes:summary>seem to have found one way to answer this, but it only works when you put all the numbers from 3 sets into the same set as detailed below, it automatically sorts the numbers in the ascending order; 

&gt; (combinat[permute])({0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, 3);

[[0, 1, 2], [0, 1, 3], [0, 1, 4], [0, 1, 5], [0, 1, 6], [0, 1, 7], [0, 1, 8], 

  [0, 1, 9], [0, 2, 1], [0, 2, 3], [0, 2, 4], [0, 2, 5], [0, 2, 6], [0, 2, 7], 

  [0, 2, 8], [0, 2, 9], [0, 3, 1], [0, 3, 2], [0, 3, 4], [0, 3, 5], [0, 3, 6], 

  [0, 3, 7], [0, 3, 8], [0, 3, 9], [0, 4, 1], [0, 4, 2], [0, 4, 3], [0, 4, 5], 

  [0, 4, 6], [0, 4, 7], [0, 4, 8], [0, 4, 9], [0, 5, 1], [0, 5, 2], [0, 5, 3], 

  [0, 5, 4], [0, 5, 6], [0, 5, 7], [0, 5, 8], [0, 5, 9], [0, 6, 1], [0, 6, 2], 

  [0, 6, 3], [0, 6, 4], [0, 6, 5], [0, 6, 7], [0, 6, 8], [0, 6, 9], [0, 7, 1], 

  [0, 7, 2], [0, 7, 3], [0, 7, 4], [0, 7, 5], [0, 7, 6], [0, 7, 8], [0, 7, 9], 

  [0, 8, 1], [0, 8, 2], [0, 8, 3], [0, 8, 4], [0, 8, 5], [0, 8, 6], [0, 8, 7], 

  [0, 8, 9], [0, 9, 1], [0, 9, 2], [0, 9, 3], [0, 9, 4], [0, 9, 5], [0, 9, 6], 

  [0, 9, 7], [0, 9, 8], [1, 0, 2], [1, 0, 3], [1, 0, 4], [1, 0, 5], [1, 0, 6], 

  [1, 0, 7], [1, 0, 8], [1, 0, 9], [1, 2, 0], [1, 2, 3], [1, 2, 4], [1, 2, 5], 

  [1, 2, 6], [1, 2, 7], [1, 2, 8], [1, 2, 9], [1, 3, 0], [1, 3, 2], [1, 3, 4], 

  [1, 3, 5], [1, 3, 6], [1, 3, 7], [1, 3, 8], [1, 3, 9], [1, 4, 0], [1, 4, 2], 

  [1, 4, 3], [1, 4, 5], [1, 4, 6], [1, 4, 7], [1, 4, 8], [1, 4, 9], [1, 5, 0], 

  [1, 5, 2], [1, 5, 3], [1, 5, 4], [1, 5, 6], [1, 5, 7], [1, 5, 8], [1, 5, 9], 

  [1, 6, 0], [1, 6, 2], [1, 6, 3], [1, 6, 4], [1, 6, 5], [1, 6, 7], [1, 6, 8], 

  [1, 6, 9], [1, 7, 0], [1, 7, 2], [1, 7, 3], [1, 7, 4], [1, 7, 5], [1, 7, 6], 

  [1, 7, 8], [1, 7, 9], [1, 8, 0], [1, 8, 2], [1, 8, 3], [1, 8, 4], [1, 8, 5], 

  [1, 8, 6], [1, 8, 7], [1, 8, 9], [1, 9, 0], [1, 9, 2], [1, 9, 3], [1, 9, 4], 

  [1, 9, 5], [1, 9, 6], [1, 9, 7], [1, 9, 8], [2, 0, 1], [2, 0, 3], [2, 0, 4], 

  [2, 0, 5], [2, 0, 6], [2, 0, 7], [2, 0, 8], [2, 0, 9], [2, 1, 0], [2, 1, 3], 

  [2, 1, 4], [2, 1, 5], [2, 1, 6], [2, 1, 7], [2, 1, 8], [2, 1, 9], [2, 3, 0], 

  [2, 3, 1], [2, 3, 4], [2, 3, 5], [2, 3, 6], [2, 3, 7], [2, 3, 8], [2, 3, 9], 

  [2, 4, 0], [2, 4, 1], [2, 4, 3], [2, 4, 5], [2, 4, 6], [2, 4, 7], [2, 4, 8], 

  [2, 4, 9], [2, 5, 0], [2, 5, 1], [2, 5, 3], [2, 5, 4], [2, 5, 6], [2, 5, 7], 

  [2, 5, 8], [2, 5, 9], [2, 6, 0], [2, 6, 1], [2, 6, 3], [2, 6, 4], [2, 6, 5], 

  [2, 6, 7], [2, 6, 8], [2, 6, 9], [2, 7, 0], [2, 7, 1], [2, 7, 3], [2, 7, 4], 

  [2, 7, 5], [2, 7, 6], [2, 7, 8], [2, 7, 9], [2, 8, 0], [2, 8, 1], [2, 8, 3], 

  [2, 8, 4], [2, 8, 5], [2, 8, 6], [2, 8, 7], [2, 8, 9], [2, 9, 0], [2, 9, 1], 

  [2, 9, 3], [2, 9, 4], [2, 9, 5], [2, 9, 6], [2, 9, 7], [2, 9, 8], [3, 0, 1], 

  [3, 0, 2], [3, 0, 4], [3, 0, 5], [3, 0, 6], [3, 0, 7], [3, 0, 8], [3, 0, 9], 

  [3, 1, 0], [3, 1, 2], [3, 1, 4], [3, 1, 5], [3, 1, 6], [3, 1, 7], [3, 1, 8], 

  [3, 1, 9], [3, 2, 0], [3, 2, 1], [3, 2, 4], [3, 2, 5], [3, 2, 6], [3, 2, 7], 

  [3, 2, 8], [3, 2, 9], [3, 4, 0], [3, 4, 1], [3, 4, 2], [3, 4, 5], [3, 4, 6], 

  [3, 4, 7], [3, 4, 8], [3, 4, 9], [3, 5, 0], [3, 5, 1], [3, 5, 2], [3, 5, 4], 

  [3, 5, 6], [3, 5, 7], [3, 5, 8], [3, 5, 9], [3, 6, 0], [3, 6, 1], [3, 6, 2], 

  [3, 6, 4], [3, 6, 5], [3, 6, 7], [3, 6, 8], [3, 6, 9], [3, 7, 0], [3, 7, 1], 

  [3, 7, 2], [3, 7, 4], [3, 7, 5], [3, 7, 6], [3, 7, 8], [3, 7, 9], [3, 8, 0], 

  [3, 8, 1], [3, 8, 2], [3, 8, 4], [3, 8, 5], [3, 8, 6], [3, 8, 7], [3, 8, 9], 

  [3, 9, 0], [3, 9, 1], [3, 9, 2], [3, 9, 4], [3, 9, 5], [3, 9, 6], [3, 9, 7], 

  [3, 9, 8], [4, 0, 1], [4, 0, 2], [4, 0, 3], [4, 0, 5], [4, 0, 6], [4, 0, 7], 

  [4, 0, 8], [4, 0, 9], [4, 1, 0], [4, 1, 2], [4, 1, 3], [4, 1, 5], [4, 1, 6], 

  [4, 1, 7], [4, 1, 8], [4, 1, 9], [4, 2, 0], [4, 2, 1], [4, 2, 3], [4, 2, 5], 

  [4, 2, 6], [4, 2, 7], [4, 2, 8], [4, 2, 9], [4, 3, 0], [4, 3, 1], [4, 3, 2], 

  [4, 3, 5], [4, 3, 6], [4, 3, 7], [4, 3, 8], [4, 3, 9], [4, 5, 0], [4, 5, 1], 

  [4, 5, 2], [4, 5, 3], [4, 5, 6], [4, 5, 7], [4, 5, 8], [4, 5, 9], [4, 6, 0], 

  [4, 6, 1], [4, 6, 2], [4, 6, 3], [4, 6, 5], [4, 6, 7], [4, 6, 8], [4, 6, 9], 

  [4, 7, 0], [4, 7, 1], [4, 7, 2], [4, 7, 3], [4, 7, 5], [4, 7, 6], [4, 7, 8], 

  [4, 7, 9], [4, 8, 0], [4, 8, 1], [4, 8, 2], [4, 8, 3], [4, 8, 5], [4, 8, 6], 

  [4, 8, 7], [4, 8, 9], [4, 9, 0], [4, 9, 1], [4, 9, 2], [4, 9, 3], [4, 9, 5], 

  [4, 9, 6], [4, 9, 7], [4, 9, 8], [5, 0, 1], [5, 0, 2], [5, 0, 3], [5, 0, 4], 

  [5, 0, 6], [5, 0, 7], [5, 0, 8], [5, 0, 9], [5, 1, 0], [5, 1, 2], [5, 1, 3], 

  [5, 1, 4], [5, 1, 6], [5, 1, 7], [5, 1, 8], [5, 1, 9], [5, 2, 0], [5, 2, 1], 

  [5, 2, 3], [5, 2, 4], [5, 2, 6], [5, 2, 7], [5, 2, 8], [5, 2, 9], [5, 3, 0], 

  [5, 3, 1], [5, 3, 2], [5, 3, 4], [5, 3, 6], [5, 3, 7], [5, 3, 8], [5, 3, 9], 

  [5, 4, 0], [5, 4, 1], [5, 4, 2], [5, 4, 3], [5, 4, 6], [5, 4, 7], [5, 4, 8], 

  [5, 4, 9], [5, 6, 0], [5, 6, 1], [5, 6, 2], [5, 6, 3], [5, 6, 4], [5, 6, 7], 

  [5, 6, 8], [5, 6, 9], [5, 7, 0], [5, 7, 1], [5, 7, 2], [5, 7, 3], [5, 7, 4], 

  [5, 7, 6], [5, 7, 8], [5, 7, 9], [5, 8, 0], [5, 8, 1], [5, 8, 2], [5, 8, 3], 

  [5, 8, 4], [5, 8, 6], [5, 8, 7], [5, 8, 9], [5, 9, 0], [5, 9, 1], [5, 9, 2], 

  [5, 9, 3], [5, 9, 4], [5, 9, 6], [5, 9, 7], [5, 9, 8], [6, 0, 1], [6, 0, 2], 

  [6, 0, 3], [6, 0, 4], [6, 0, 5], [6, 0, 7], [6, 0, 8], [6, 0, 9], [6, 1, 0], 

  [6, 1, 2], [6, 1, 3], [6, 1, 4], [6, 1, 5], [6, 1, 7], [6, 1, 8], [6, 1, 9], 

  [6, 2, 0], [6, 2, 1], [6, 2, 3], [6, 2, 4], [6, 2, 5], [6, 2, 7], [6, 2, 8], 

  [6, 2, 9], [6, 3, 0], [6, 3, 1], [6, 3, 2], [6, 3, 4], [6, 3, 5], [6, 3, 7], 

  [6, 3, 8], [6, 3, 9], [6, 4, 0], [6, 4, 1], [6, 4, 2], [6, 4, 3], [6, 4, 5], 

  [6, 4, 7], [6, 4, 8], [6, 4, 9], [6, 5, 0], [6, 5, 1], [6, 5, 2], [6, 5, 3], 

  [6, 5, 4], [6, 5, 7], [6, 5, 8], [6, 5, 9], [6, 7, 0], [6, 7, 1], [6, 7, 2], 

  [6, 7, 3], [6, 7, 4], [6, 7, 5], [6, 7, 8], [6, 7, 9], [6, 8, 0], [6, 8, 1], 

  [6, 8, 2], [6, 8, 3], [6, 8, 4], [6, 8, 5], [6, 8, 7], [6, 8, 9], [6, 9, 0], 

  [6, 9, 1], [6, 9, 2], [6, 9, 3], [6, 9, 4], [6, 9, 5], [6, 9, 7], [6, 9, 8], 

  [7, 0, 1], [7, 0, 2], [7, 0, 3], [7, 0, 4], [7, 0, 5], [7, 0, 6], [7, 0, 8], 

  [7, 0, 9], [7, 1, 0], [7, 1, 2], [7, 1, 3], [7, 1, 4], [7, 1, 5], [7, 1, 6], 

  [7, 1, 8], [7, 1, 9], [7, 2, 0], [7, 2, 1], [7, 2, 3], [7, 2, 4], [7, 2, 5], 

  [7, 2, 6], [7, 2, 8], [7, 2, 9], [7, 3, 0], [7, 3, 1], [7, 3, 2], [7, 3, 4], 

  [7, 3, 5], [7, 3, 6], [7, 3, 8], [7, 3, 9], [7, 4, 0], [7, 4, 1], [7, 4, 2], 

  [7, 4, 3], [7, 4, 5], [7, 4, 6], [7, 4, 8], [7, 4, 9], [7, 5, 0], [7, 5, 1], 

  [7, 5, 2], [7, 5, 3], [7, 5, 4], [7, 5, 6], [7, 5, 8], [7, 5, 9], [7, 6, 0], 

  [7, 6, 1], [7, 6, 2], [7, 6, 3], [7, 6, 4], [7, 6, 5], [7, 6, 8], [7, 6, 9], 

  [7, 8, 0], [7, 8, 1], [7, 8, 2], [7, 8, 3], [7, 8, 4], [7, 8, 5], [7, 8, 6], 

  [7, 8, 9], [7, 9, 0], [7, 9, 1], [7, 9, 2], [7, 9, 3], [7, 9, 4], [7, 9, 5], 

  [7, 9, 6], [7, 9, 8], [8, 0, 1], [8, 0, 2], [8, 0, 3], [8, 0, 4], [8, 0, 5], 

  [8, 0, 6], [8, 0, 7], [8, 0, 9], [8, 1, 0], [8, 1, 2], [8, 1, 3], [8, 1, 4], 

  [8, 1, 5], [8, 1, 6], [8, 1, 7], [8, 1, 9], [8, 2, 0], [8, 2, 1], [8, 2, 3], 

  [8, 2, 4], [8, 2, 5], [8, 2, 6], [8, 2, 7], [8, 2, 9], [8, 3, 0], [8, 3, 1], 

  [8, 3, 2], [8, 3, 4], [8, 3, 5], [8, 3, 6], [8, 3, 7], [8, 3, 9], [8, 4, 0], 

  [8, 4, 1], [8, 4, 2], [8, 4, 3], [8, 4, 5], [8, 4, 6], [8, 4, 7], [8, 4, 9], 

  [8, 5, 0], [8, 5, 1], [8, 5, 2], [8, 5, 3], [8, 5, 4], [8, 5, 6], [8, 5, 7], 

  [8, 5, 9], [8, 6, 0], [8, 6, 1], [8, 6, 2], [8, 6, 3], [8, 6, 4], [8, 6, 5], 

  [8, 6, 7], [8, 6, 9], [8, 7, 0], [8, 7, 1], [8, 7, 2], [8, 7, 3], [8, 7, 4], 

  [8, 7, 5], [8, 7, 6], [8, 7, 9], [8, 9, 0], [8, 9, 1], [8, 9, 2], [8, 9, 3], 

  [8, 9, 4], [8, 9, 5], [8, 9, 6], [8, 9, 7], [9, 0, 1], [9, 0, 2], [9, 0, 3], 

  [9, 0, 4], [9, 0, 5], [9, 0, 6], [9, 0, 7], [9, 0, 8], [9, 1, 0], [9, 1, 2], 

  [9, 1, 3], [9, 1, 4], [9, 1, 5], [9, 1, 6], [9, 1, 7], [9, 1, 8], [9, 2, 0], 

  [9, 2, 1], [9, 2, 3], [9, 2, 4], [9, 2, 5], [9, 2, 6], [9, 2, 7], [9, 2, 8], 

  [9, 3, 0], [9, 3, 1], [9, 3, 2], [9, 3, 4], [9, 3, 5], [9, 3, 6], [9, 3, 7], 

  [9, 3, 8], [9, 4, 0], [9, 4, 1], [9, 4, 2], [9, 4, 3], [9, 4, 5], [9, 4, 6], 

  [9, 4, 7], [9, 4, 8], [9, 5, 0], [9, 5, 1], [9, 5, 2], [9, 5, 3], [9, 5, 4], 

  [9, 5, 6], [9, 5, 7], [9, 5, 8], [9, 6, 0], [9, 6, 1], [9, 6, 2], [9, 6, 3], 

  [9, 6, 4], [9, 6, 5], [9, 6, 7], [9, 6, 8], [9, 7, 0], [9, 7, 1], [9, 7, 2], 

  [9, 7, 3], [9, 7, 4], [9, 7, 5], [9, 7, 6], [9, 7, 8], [9, 8, 0], [9, 8, 1], 

  [9, 8, 2], [9, 8, 3], [9, 8, 4], [9, 8, 5], [9, 8, 6], [9, 8, 7]]

Is there any command in Maple that takes 3 sets and produces combinations in the following order:

[A1,B1,C1], [A2,B1,C1], [A3,B1,C1], [A4,B1,C1], [A1,B2,C1] 

thanks</itunes:summary>
      <description>seem to have found one way to answer this, but it only works when you put all the numbers from 3 sets into the same set as detailed below, it automatically sorts the numbers in the ascending order; 

&gt; (combinat[permute])({0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, 3);

[[0, 1, 2], [0, 1, 3], [0, 1, 4], [0, 1, 5], [0, 1, 6], [0, 1, 7], [0, 1, 8], 

  [0, 1, 9], [0, 2, 1], [0, 2, 3], [0, 2, 4], [0, 2, 5], [0, 2, 6], [0, 2, 7], 

  [0, 2, 8], [0, 2, 9], [0, 3, 1], [0, 3, 2], [0, 3, 4], [0, 3, 5], [0, 3, 6], 

  [0, 3, 7], [0, 3, 8], [0, 3, 9], [0, 4, 1], [0, 4, 2], [0, 4, 3], [0, 4, 5], 

  [0, 4, 6], [0, 4, 7], [0, 4, 8], [0, 4, 9], [0, 5, 1], [0, 5, 2], [0, 5, 3], 

  [0, 5, 4], [0, 5, 6], [0, 5, 7], [0, 5, 8], [0, 5, 9], [0, 6, 1], [0, 6, 2], 

  [0, 6, 3], [0, 6, 4], [0, 6, 5], [0, 6, 7], [0, 6, 8], [0, 6, 9], [0, 7, 1], 

  [0, 7, 2], [0, 7, 3], [0, 7, 4], [0, 7, 5], [0, 7, 6], [0, 7, 8], [0, 7, 9], 

  [0, 8, 1], [0, 8, 2], [0, 8, 3], [0, 8, 4], [0, 8, 5], [0, 8, 6], [0, 8, 7], 

  [0, 8, 9], [0, 9, 1], [0, 9, 2], [0, 9, 3], [0, 9, 4], [0, 9, 5], [0, 9, 6], 

  [0, 9, 7], [0, 9, 8], [1, 0, 2], [1, 0, 3], [1, 0, 4], [1, 0, 5], [1, 0, 6], 

  [1, 0, 7], [1, 0, 8], [1, 0, 9], [1, 2, 0], [1, 2, 3], [1, 2, 4], [1, 2, 5], 

  [1, 2, 6], [1, 2, 7], [1, 2, 8], [1, 2, 9], [1, 3, 0], [1, 3, 2], [1, 3, 4], 

  [1, 3, 5], [1, 3, 6], [1, 3, 7], [1, 3, 8], [1, 3, 9], [1, 4, 0], [1, 4, 2], 

  [1, 4, 3], [1, 4, 5], [1, 4, 6], [1, 4, 7], [1, 4, 8], [1, 4, 9], [1, 5, 0], 

  [1, 5, 2], [1, 5, 3], [1, 5, 4], [1, 5, 6], [1, 5, 7], [1, 5, 8], [1, 5, 9], 

  [1, 6, 0], [1, 6, 2], [1, 6, 3], [1, 6, 4], [1, 6, 5], [1, 6, 7], [1, 6, 8], 

  [1, 6, 9], [1, 7, 0], [1, 7, 2], [1, 7, 3], [1, 7, 4], [1, 7, 5], [1, 7, 6], 

  [1, 7, 8], [1, 7, 9], [1, 8, 0], [1, 8, 2], [1, 8, 3], [1, 8, 4], [1, 8, 5], 

  [1, 8, 6], [1, 8, 7], [1, 8, 9], [1, 9, 0], [1, 9, 2], [1, 9, 3], [1, 9, 4], 

  [1, 9, 5], [1, 9, 6], [1, 9, 7], [1, 9, 8], [2, 0, 1], [2, 0, 3], [2, 0, 4], 

  [2, 0, 5], [2, 0, 6], [2, 0, 7], [2, 0, 8], [2, 0, 9], [2, 1, 0], [2, 1, 3], 

  [2, 1, 4], [2, 1, 5], [2, 1, 6], [2, 1, 7], [2, 1, 8], [2, 1, 9], [2, 3, 0], 

  [2, 3, 1], [2, 3, 4], [2, 3, 5], [2, 3, 6], [2, 3, 7], [2, 3, 8], [2, 3, 9], 

  [2, 4, 0], [2, 4, 1], [2, 4, 3], [2, 4, 5], [2, 4, 6], [2, 4, 7], [2, 4, 8], 

  [2, 4, 9], [2, 5, 0], [2, 5, 1], [2, 5, 3], [2, 5, 4], [2, 5, 6], [2, 5, 7], 

  [2, 5, 8], [2, 5, 9], [2, 6, 0], [2, 6, 1], [2, 6, 3], [2, 6, 4], [2, 6, 5], 

  [2, 6, 7], [2, 6, 8], [2, 6, 9], [2, 7, 0], [2, 7, 1], [2, 7, 3], [2, 7, 4], 

  [2, 7, 5], [2, 7, 6], [2, 7, 8], [2, 7, 9], [2, 8, 0], [2, 8, 1], [2, 8, 3], 

  [2, 8, 4], [2, 8, 5], [2, 8, 6], [2, 8, 7], [2, 8, 9], [2, 9, 0], [2, 9, 1], 

  [2, 9, 3], [2, 9, 4], [2, 9, 5], [2, 9, 6], [2, 9, 7], [2, 9, 8], [3, 0, 1], 

  [3, 0, 2], [3, 0, 4], [3, 0, 5], [3, 0, 6], [3, 0, 7], [3, 0, 8], [3, 0, 9], 

  [3, 1, 0], [3, 1, 2], [3, 1, 4], [3, 1, 5], [3, 1, 6], [3, 1, 7], [3, 1, 8], 

  [3, 1, 9], [3, 2, 0], [3, 2, 1], [3, 2, 4], [3, 2, 5], [3, 2, 6], [3, 2, 7], 

  [3, 2, 8], [3, 2, 9], [3, 4, 0], [3, 4, 1], [3, 4, 2], [3, 4, 5], [3, 4, 6], 

  [3, 4, 7], [3, 4, 8], [3, 4, 9], [3, 5, 0], [3, 5, 1], [3, 5, 2], [3, 5, 4], 

  [3, 5, 6], [3, 5, 7], [3, 5, 8], [3, 5, 9], [3, 6, 0], [3, 6, 1], [3, 6, 2], 

  [3, 6, 4], [3, 6, 5], [3, 6, 7], [3, 6, 8], [3, 6, 9], [3, 7, 0], [3, 7, 1], 

  [3, 7, 2], [3, 7, 4], [3, 7, 5], [3, 7, 6], [3, 7, 8], [3, 7, 9], [3, 8, 0], 

  [3, 8, 1], [3, 8, 2], [3, 8, 4], [3, 8, 5], [3, 8, 6], [3, 8, 7], [3, 8, 9], 

  [3, 9, 0], [3, 9, 1], [3, 9, 2], [3, 9, 4], [3, 9, 5], [3, 9, 6], [3, 9, 7], 

  [3, 9, 8], [4, 0, 1], [4, 0, 2], [4, 0, 3], [4, 0, 5], [4, 0, 6], [4, 0, 7], 

  [4, 0, 8], [4, 0, 9], [4, 1, 0], [4, 1, 2], [4, 1, 3], [4, 1, 5], [4, 1, 6], 

  [4, 1, 7], [4, 1, 8], [4, 1, 9], [4, 2, 0], [4, 2, 1], [4, 2, 3], [4, 2, 5], 

  [4, 2, 6], [4, 2, 7], [4, 2, 8], [4, 2, 9], [4, 3, 0], [4, 3, 1], [4, 3, 2], 

  [4, 3, 5], [4, 3, 6], [4, 3, 7], [4, 3, 8], [4, 3, 9], [4, 5, 0], [4, 5, 1], 

  [4, 5, 2], [4, 5, 3], [4, 5, 6], [4, 5, 7], [4, 5, 8], [4, 5, 9], [4, 6, 0], 

  [4, 6, 1], [4, 6, 2], [4, 6, 3], [4, 6, 5], [4, 6, 7], [4, 6, 8], [4, 6, 9], 

  [4, 7, 0], [4, 7, 1], [4, 7, 2], [4, 7, 3], [4, 7, 5], [4, 7, 6], [4, 7, 8], 

  [4, 7, 9], [4, 8, 0], [4, 8, 1], [4, 8, 2], [4, 8, 3], [4, 8, 5], [4, 8, 6], 

  [4, 8, 7], [4, 8, 9], [4, 9, 0], [4, 9, 1], [4, 9, 2], [4, 9, 3], [4, 9, 5], 

  [4, 9, 6], [4, 9, 7], [4, 9, 8], [5, 0, 1], [5, 0, 2], [5, 0, 3], [5, 0, 4], 

  [5, 0, 6], [5, 0, 7], [5, 0, 8], [5, 0, 9], [5, 1, 0], [5, 1, 2], [5, 1, 3], 

  [5, 1, 4], [5, 1, 6], [5, 1, 7], [5, 1, 8], [5, 1, 9], [5, 2, 0], [5, 2, 1], 

  [5, 2, 3], [5, 2, 4], [5, 2, 6], [5, 2, 7], [5, 2, 8], [5, 2, 9], [5, 3, 0], 

  [5, 3, 1], [5, 3, 2], [5, 3, 4], [5, 3, 6], [5, 3, 7], [5, 3, 8], [5, 3, 9], 

  [5, 4, 0], [5, 4, 1], [5, 4, 2], [5, 4, 3], [5, 4, 6], [5, 4, 7], [5, 4, 8], 

  [5, 4, 9], [5, 6, 0], [5, 6, 1], [5, 6, 2], [5, 6, 3], [5, 6, 4], [5, 6, 7], 

  [5, 6, 8], [5, 6, 9], [5, 7, 0], [5, 7, 1], [5, 7, 2], [5, 7, 3], [5, 7, 4], 

  [5, 7, 6], [5, 7, 8], [5, 7, 9], [5, 8, 0], [5, 8, 1], [5, 8, 2], [5, 8, 3], 

  [5, 8, 4], [5, 8, 6], [5, 8, 7], [5, 8, 9], [5, 9, 0], [5, 9, 1], [5, 9, 2], 

  [5, 9, 3], [5, 9, 4], [5, 9, 6], [5, 9, 7], [5, 9, 8], [6, 0, 1], [6, 0, 2], 

  [6, 0, 3], [6, 0, 4], [6, 0, 5], [6, 0, 7], [6, 0, 8], [6, 0, 9], [6, 1, 0], 

  [6, 1, 2], [6, 1, 3], [6, 1, 4], [6, 1, 5], [6, 1, 7], [6, 1, 8], [6, 1, 9], 

  [6, 2, 0], [6, 2, 1], [6, 2, 3], [6, 2, 4], [6, 2, 5], [6, 2, 7], [6, 2, 8], 

  [6, 2, 9], [6, 3, 0], [6, 3, 1], [6, 3, 2], [6, 3, 4], [6, 3, 5], [6, 3, 7], 

  [6, 3, 8], [6, 3, 9], [6, 4, 0], [6, 4, 1], [6, 4, 2], [6, 4, 3], [6, 4, 5], 

  [6, 4, 7], [6, 4, 8], [6, 4, 9], [6, 5, 0], [6, 5, 1], [6, 5, 2], [6, 5, 3], 

  [6, 5, 4], [6, 5, 7], [6, 5, 8], [6, 5, 9], [6, 7, 0], [6, 7, 1], [6, 7, 2], 

  [6, 7, 3], [6, 7, 4], [6, 7, 5], [6, 7, 8], [6, 7, 9], [6, 8, 0], [6, 8, 1], 

  [6, 8, 2], [6, 8, 3], [6, 8, 4], [6, 8, 5], [6, 8, 7], [6, 8, 9], [6, 9, 0], 

  [6, 9, 1], [6, 9, 2], [6, 9, 3], [6, 9, 4], [6, 9, 5], [6, 9, 7], [6, 9, 8], 

  [7, 0, 1], [7, 0, 2], [7, 0, 3], [7, 0, 4], [7, 0, 5], [7, 0, 6], [7, 0, 8], 

  [7, 0, 9], [7, 1, 0], [7, 1, 2], [7, 1, 3], [7, 1, 4], [7, 1, 5], [7, 1, 6], 

  [7, 1, 8], [7, 1, 9], [7, 2, 0], [7, 2, 1], [7, 2, 3], [7, 2, 4], [7, 2, 5], 

  [7, 2, 6], [7, 2, 8], [7, 2, 9], [7, 3, 0], [7, 3, 1], [7, 3, 2], [7, 3, 4], 

  [7, 3, 5], [7, 3, 6], [7, 3, 8], [7, 3, 9], [7, 4, 0], [7, 4, 1], [7, 4, 2], 

  [7, 4, 3], [7, 4, 5], [7, 4, 6], [7, 4, 8], [7, 4, 9], [7, 5, 0], [7, 5, 1], 

  [7, 5, 2], [7, 5, 3], [7, 5, 4], [7, 5, 6], [7, 5, 8], [7, 5, 9], [7, 6, 0], 

  [7, 6, 1], [7, 6, 2], [7, 6, 3], [7, 6, 4], [7, 6, 5], [7, 6, 8], [7, 6, 9], 

  [7, 8, 0], [7, 8, 1], [7, 8, 2], [7, 8, 3], [7, 8, 4], [7, 8, 5], [7, 8, 6], 

  [7, 8, 9], [7, 9, 0], [7, 9, 1], [7, 9, 2], [7, 9, 3], [7, 9, 4], [7, 9, 5], 

  [7, 9, 6], [7, 9, 8], [8, 0, 1], [8, 0, 2], [8, 0, 3], [8, 0, 4], [8, 0, 5], 

  [8, 0, 6], [8, 0, 7], [8, 0, 9], [8, 1, 0], [8, 1, 2], [8, 1, 3], [8, 1, 4], 

  [8, 1, 5], [8, 1, 6], [8, 1, 7], [8, 1, 9], [8, 2, 0], [8, 2, 1], [8, 2, 3], 

  [8, 2, 4], [8, 2, 5], [8, 2, 6], [8, 2, 7], [8, 2, 9], [8, 3, 0], [8, 3, 1], 

  [8, 3, 2], [8, 3, 4], [8, 3, 5], [8, 3, 6], [8, 3, 7], [8, 3, 9], [8, 4, 0], 

  [8, 4, 1], [8, 4, 2], [8, 4, 3], [8, 4, 5], [8, 4, 6], [8, 4, 7], [8, 4, 9], 

  [8, 5, 0], [8, 5, 1], [8, 5, 2], [8, 5, 3], [8, 5, 4], [8, 5, 6], [8, 5, 7], 

  [8, 5, 9], [8, 6, 0], [8, 6, 1], [8, 6, 2], [8, 6, 3], [8, 6, 4], [8, 6, 5], 

  [8, 6, 7], [8, 6, 9], [8, 7, 0], [8, 7, 1], [8, 7, 2], [8, 7, 3], [8, 7, 4], 

  [8, 7, 5], [8, 7, 6], [8, 7, 9], [8, 9, 0], [8, 9, 1], [8, 9, 2], [8, 9, 3], 

  [8, 9, 4], [8, 9, 5], [8, 9, 6], [8, 9, 7], [9, 0, 1], [9, 0, 2], [9, 0, 3], 

  [9, 0, 4], [9, 0, 5], [9, 0, 6], [9, 0, 7], [9, 0, 8], [9, 1, 0], [9, 1, 2], 

  [9, 1, 3], [9, 1, 4], [9, 1, 5], [9, 1, 6], [9, 1, 7], [9, 1, 8], [9, 2, 0], 

  [9, 2, 1], [9, 2, 3], [9, 2, 4], [9, 2, 5], [9, 2, 6], [9, 2, 7], [9, 2, 8], 

  [9, 3, 0], [9, 3, 1], [9, 3, 2], [9, 3, 4], [9, 3, 5], [9, 3, 6], [9, 3, 7], 

  [9, 3, 8], [9, 4, 0], [9, 4, 1], [9, 4, 2], [9, 4, 3], [9, 4, 5], [9, 4, 6], 

  [9, 4, 7], [9, 4, 8], [9, 5, 0], [9, 5, 1], [9, 5, 2], [9, 5, 3], [9, 5, 4], 

  [9, 5, 6], [9, 5, 7], [9, 5, 8], [9, 6, 0], [9, 6, 1], [9, 6, 2], [9, 6, 3], 

  [9, 6, 4], [9, 6, 5], [9, 6, 7], [9, 6, 8], [9, 7, 0], [9, 7, 1], [9, 7, 2], 

  [9, 7, 3], [9, 7, 4], [9, 7, 5], [9, 7, 6], [9, 7, 8], [9, 8, 0], [9, 8, 1], 

  [9, 8, 2], [9, 8, 3], [9, 8, 4], [9, 8, 5], [9, 8, 6], [9, 8, 7]]

Is there any command in Maple that takes 3 sets and produces combinations in the following order:

[A1,B1,C1], [A2,B1,C1], [A3,B1,C1], [A4,B1,C1], [A1,B2,C1] 

thanks</description>
      <guid>77394</guid>
      <pubDate>Sat, 21 Apr 2007 15:24:09 Z</pubDate>
      <itunes:author>Antonio_S</itunes:author>
      <author>Antonio_S</author>
    </item>
    <item>
      <title>combinat[cartprod] or combstruct</title>
      <link>http://www.mapleprimes.com/questions/41503-Combinations-Of-Numbers-In-Sets?ref=Feed:MaplePrimes:Combinations of numbers in sets:Comments#answer77367</link>
      <itunes:summary>Here are two ways of doing it, one relatively simple, and one that scales nicely:
&lt;pre&gt; &gt; (A,B,C) := ({1,3,4,8}, {5,6,9}, {2,0,7}):
&gt; T := combinat[cartprod]([A,B,C]):
&gt; S := table(): 
&gt; for i from 1 while not T[finished] do S[i] := T[nextvalue]() end do:
&gt; res := [seq(S[j],j=1..i-1)]:
&lt;/pre&gt;
and now 'res' is a list of lists exactly as you ask above.

The more complicated way is via combstruct:
&lt;pre&gt; &gt; with(combstruct):
# create a structure
&gt; P := {Z=Prod( Union(a[1],a[3],a[4],a[8]), Union(a[5],a[6],a[9]), Union(a[2],a[0],a[7])) , seq(a[i]=Atom,i=0..9)}:
# enumerate them all
&gt; res := allstructs([Z,P,unlabelled],size=3):
# make the results pretty
&gt; rr := eval(res, Prod=((a,b,c)-&gt;[op(1,a),op(1,b),op(1,c)]));

  rr := [[8, 6, 0], [3, 6, 7], [1, 5, 2], [4, 6, 0], [1, 9, 2],

        [8, 9, 2], [8, 9, 0], [4, 6, 7], [8, 6, 2], [8, 5, 7],

        [3, 5, 2], [1, 9, 7], [3, 5, 0], [4, 5, 0], [1, 9, 0],

        [1, 6, 7], [1, 6, 2], [1, 6, 0], [4, 5, 2], [3, 9, 0],

        [8, 5, 2], [3, 9, 7], [1, 5, 0], [4, 9, 7], [8, 6, 7],

        [8, 9, 7], [3, 6, 0], [3, 9, 2], [4, 9, 0], [8, 5, 0],

        [3, 5, 7], [4, 5, 7], [1, 5, 7], [4, 6, 2], [4, 9, 2],

        [3, 6, 2]]

&gt; 
&lt;/pre&gt;</itunes:summary>
      <description>Here are two ways of doing it, one relatively simple, and one that scales nicely:
&lt;pre&gt; &gt; (A,B,C) := ({1,3,4,8}, {5,6,9}, {2,0,7}):
&gt; T := combinat[cartprod]([A,B,C]):
&gt; S := table(): 
&gt; for i from 1 while not T[finished] do S[i] := T[nextvalue]() end do:
&gt; res := [seq(S[j],j=1..i-1)]:
&lt;/pre&gt;
and now 'res' is a list of lists exactly as you ask above.

The more complicated way is via combstruct:
&lt;pre&gt; &gt; with(combstruct):
# create a structure
&gt; P := {Z=Prod( Union(a[1],a[3],a[4],a[8]), Union(a[5],a[6],a[9]), Union(a[2],a[0],a[7])) , seq(a[i]=Atom,i=0..9)}:
# enumerate them all
&gt; res := allstructs([Z,P,unlabelled],size=3):
# make the results pretty
&gt; rr := eval(res, Prod=((a,b,c)-&gt;[op(1,a),op(1,b),op(1,c)]));

  rr := [[8, 6, 0], [3, 6, 7], [1, 5, 2], [4, 6, 0], [1, 9, 2],

        [8, 9, 2], [8, 9, 0], [4, 6, 7], [8, 6, 2], [8, 5, 7],

        [3, 5, 2], [1, 9, 7], [3, 5, 0], [4, 5, 0], [1, 9, 0],

        [1, 6, 7], [1, 6, 2], [1, 6, 0], [4, 5, 2], [3, 9, 0],

        [8, 5, 2], [3, 9, 7], [1, 5, 0], [4, 9, 7], [8, 6, 7],

        [8, 9, 7], [3, 6, 0], [3, 9, 2], [4, 9, 0], [8, 5, 0],

        [3, 5, 7], [4, 5, 7], [1, 5, 7], [4, 6, 2], [4, 9, 2],

        [3, 6, 2]]

&gt; 
&lt;/pre&gt;</description>
      <guid>77367</guid>
      <pubDate>Sun, 22 Apr 2007 04:37:22 Z</pubDate>
      <itunes:author>JacquesC</itunes:author>
      <author>JacquesC</author>
    </item>
    <item>
      <title>Many thanks!
</title>
      <link>http://www.mapleprimes.com/questions/41503-Combinations-Of-Numbers-In-Sets?ref=Feed:MaplePrimes:Combinations of numbers in sets:Comments#answer77364</link>
      <itunes:summary>Many thanks!</itunes:summary>
      <description>Many thanks!</description>
      <guid>77364</guid>
      <pubDate>Sun, 22 Apr 2007 05:40:21 Z</pubDate>
      <itunes:author>Antonio_S</itunes:author>
      <author>Antonio_S</author>
    </item>
    <item>
      <title>une methode possible</title>
      <link>http://www.mapleprimes.com/questions/41503-Combinations-Of-Numbers-In-Sets?ref=Feed:MaplePrimes:Combinations of numbers in sets:Comments#answer76656</link>
      <itunes:summary>bonjour,

une maniere de faire est:

frtotx:=proc(s);l:=[seq([s[1][i]],i=1..nops(s[1]))];for ki from 2 to nops(s) do l:=[seq(seq([op(l[i]),s[ki][j]],j=1..nops(s[ki])),i=1..nops(l))];od;return(l);end;

on fait par exemple frtotx([[1,2,3],[1,2]]);
[[1, 1], [1, 2], [2, 1], [2, 2], [3, 1], [3, 2]]</itunes:summary>
      <description>bonjour,

une maniere de faire est:

frtotx:=proc(s);l:=[seq([s[1][i]],i=1..nops(s[1]))];for ki from 2 to nops(s) do l:=[seq(seq([op(l[i]),s[ki][j]],j=1..nops(s[ki])),i=1..nops(l))];od;return(l);end;

on fait par exemple frtotx([[1,2,3],[1,2]]);
[[1, 1], [1, 2], [2, 1], [2, 2], [3, 1], [3, 2]]</description>
      <guid>76656</guid>
      <pubDate>Fri, 22 Jun 2007 14:02:13 Z</pubDate>
      <itunes:author>xavier</itunes:author>
      <author>xavier</author>
    </item>
    <item>
      <title>Using nested seq(...)'s</title>
      <link>http://www.mapleprimes.com/questions/41503-Combinations-Of-Numbers-In-Sets?ref=Feed:MaplePrimes:Combinations of numbers in sets:Comments#answer76599</link>
      <itunes:summary>Though not being a single command, here is another way which gives a list of combinations:

[seq(seq(seq([A[i],B[j],C[k]],k=1..nops(C)),j=1..nops(B)),i=1..nops(A))];

To get them nicely ordered, maybe it would be preferable to let A, B, and C themselves be lists, instead of sets.</itunes:summary>
      <description>Though not being a single command, here is another way which gives a list of combinations:

[seq(seq(seq([A[i],B[j],C[k]],k=1..nops(C)),j=1..nops(B)),i=1..nops(A))];

To get them nicely ordered, maybe it would be preferable to let A, B, and C themselves be lists, instead of sets.</description>
      <guid>76599</guid>
      <pubDate>Tue, 26 Jun 2007 21:02:00 Z</pubDate>
      <itunes:author>John Fredsted</itunes:author>
      <author>John Fredsted</author>
    </item>
    <item>
      <title>another beginner's tip</title>
      <link>http://www.mapleprimes.com/questions/41503-Combinations-Of-Numbers-In-Sets?ref=Feed:MaplePrimes:Combinations of numbers in sets:Comments#answer76597</link>
      <itunes:summary>I'm relatively new to Maple, and it was suggested elsewhere, that maybe I should do a book, in the book section here in MaplePrimes concerning the way I learn from maple. I'm still working on that idea, but in the meantime, I'll jump in here with an idea for other new users.

When I come across a bunch of good ideas like the ones here, I create a new maple worksheet with the examples, along with a link to this page at the top and a few comments about the original question and people who gave some good ideas. I then save the worksheet with an appropriate name in a folder that I use just for that sort of thing. 

I'm not sure if others have the same problem of forgetting things that I seem to have acquired in my latter years, but because of that, I try to record and categorize as much as I can so it's more easily obtainable when needed rather than end up becoming frustrated when I encounter a situation when I need what I read "somewhere" but can't remember what it was that I read or even where I read it.</itunes:summary>
      <description>I'm relatively new to Maple, and it was suggested elsewhere, that maybe I should do a book, in the book section here in MaplePrimes concerning the way I learn from maple. I'm still working on that idea, but in the meantime, I'll jump in here with an idea for other new users.

When I come across a bunch of good ideas like the ones here, I create a new maple worksheet with the examples, along with a link to this page at the top and a few comments about the original question and people who gave some good ideas. I then save the worksheet with an appropriate name in a folder that I use just for that sort of thing. 

I'm not sure if others have the same problem of forgetting things that I seem to have acquired in my latter years, but because of that, I try to record and categorize as much as I can so it's more easily obtainable when needed rather than end up becoming frustrated when I encounter a situation when I need what I read "somewhere" but can't remember what it was that I read or even where I read it.</description>
      <guid>76597</guid>
      <pubDate>Tue, 26 Jun 2007 21:21:45 Z</pubDate>
      <itunes:author>Tim Van Dusen</itunes:author>
      <author>Tim Van Dusen</author>
    </item>
  </channel>
</rss>