Re: Combination List
- To: mathgroup at smc.vnet.net
- Subject: [mg78132] Re: Combination List
- From: Bill Rowe <readnewsciv at sbcglobal.net>
- Date: Sat, 23 Jun 2007 07:17:56 -0400 (EDT)
On 6/22/07 at 6:35 AM, BC at gmail.com (Bruno Campanini) wrote: >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 Then either Union[Sort/@Tuples[Range@3,2]] or Union[Tuples[Range@3, 2], SameTest -> (Sort@#1 === Sort@#2 &)] will do the trick -- To reply via email subtract one hundred and four