MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Combination List


"Sem" <sarner2006-sem at yahoo.it> wrote in message 
news:f5dj3m$snm$1 at smc.vnet.net...
> Did you mean this:
>
> In[1]:= Tuples[Range[4],3]
> Out[1]=
> {{1,1,1},{1,1,2},{1,1,3},{1,1,4},{1,2,1},{1,2,2},{1,2,3},{1,2,4},{1,3,1},{1,3,
> 
> 2},{1,3,3},{1,3,4},{1,4,1},{1,4,2},{1,4,3},{1,4,4},{2,1,1},{2,1,2},{2,1,
> 
> 3},{2,1,4},{2,2,1},{2,2,2},{2,2,3},{2,2,4},{2,3,1},{2,3,2},{2,3,3},{2,3,
> 
> 4},{2,4,1},{2,4,2},{2,4,3},{2,4,4},{3,1,1},{3,1,2},{3,1,3},{3,1,4},{3,2,
> 
> 1},{3,2,2},{3,2,3},{3,2,4},{3,3,1},{3,3,2},{3,3,3},{3,3,4},{3,4,1},{3,4,
> 
> 2},{3,4,3},{3,4,4},{4,1,1},{4,1,2},{4,1,3},{4,1,4},{4,2,1},{4,2,2},{4,2,
> 
> 3},{4,2,4},{4,3,1},{4,3,2},{4,3,3},{4,3,4},{4,4,1},{4,4,2},{4,4,3},{4,4,
>    4}}
>
> In[2]:= Length[%]
> Out[2]= 64

Not exactly.

Tuples[Range[3],2]  gives:
1 1
1 2
1 3
2 1
2 2
2 3
3 1
3 2
3 3

I need instead unique values:
1 1
1 2
1 3
2 2
2 3
3 3

Bruno 



  • Prev by Date: Re: Switch to TraditionalForm in style File
  • Next by Date: Re: save as pdf in version 6
  • Previous by thread: Re: Combination List
  • Next by thread: Re: Combination List