Re: newbie: all possible sums of two lists
- To: mathgroup at smc.vnet.net
- Subject: [mg30679] Re: newbie: all possible sums of two lists
- From: "Orestis Vantzos" <atelesforos at hotmail.com>
- Date: Sat, 8 Sep 2001 02:22:20 -0400 (EDT)
- Organization: National Technical University of Athens, Greece
- References: <9n17po$24b$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
My favourite function(along with Inner): Outer[Plus,list1,list2]//Flatten where list1,list2 are your lists.. Orestis PS. Ommit Flatten and see what happens ;-) "Alan Tu" <alantu at students.uiuc.edu> wrote in message news:9n17po$24b$1 at smc.vnet.net... > Hello, I confess I am a newbie to Mathematica. I think I have a basic > understanding of the syntax and concepts, but there are just so many > functions. What is the most efficient way to find all the possible sums of > two lists. > > List[i1, i2, ... i_n] > List[j1, j2, ... j_m] > > I want > > List[i1+j1, i1+j2, i1+j3, ... i1+j_m, i2+j1, i2+j2, i2+j3, ... i2+j_m, ... > i_n+j_m] > > Any ideas would be appreciated. Thanks. > > Regards, > > Alan Tu > > >