Re: Combination List
- To: mathgroup at smc.vnet.net
- Subject: [mg78060] Re: Combination List
- From: "Bruno Campanini" <BC at gmail.com>
- Date: Fri, 22 Jun 2007 06:35:11 -0400 (EDT)
- References: <f55qci$k58$1@smc.vnet.net> <f58bk7$6ve$1@smc.vnet.net> <f5arsg$9aq$1@smc.vnet.net> <f5dj3m$snm$1@smc.vnet.net>
"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