
26 Jul
2005
26 Jul
'05
12:06 a.m.
On 07/24/2005 05:45 PM, Alex Mendes da Costa wrote: [snip]
Given N sequences, generate all the N-tuples s.t. the i'th element in each tuple is drawn from the i'th sequence.
For example, if sequence S1 is { 1, 2, 3 } and sequence S2 is { 10, 20 }, I need to generate these tuples: (1, 10), (2, 10), (1, 20), (2, 20).
So the number of generated tuples is N*(min(S1.size(),S2.size). IOW, it's the same number as elements in a matrix of rank N*M where M is the size of the smallest of the N sequences. Is that right?