MathGroup Archive 2001

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

Search the Archive

Re: newbie: all possible sums of two lists

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30681] Re: newbie: all possible sums of two lists
  • From: Albert Retey <albert.retey at visualanalysis.com>
  • Date: Sat, 8 Sep 2001 02:22:22 -0400 (EDT)
  • Organization: Visual Analysis AG
  • References: <9n17po$24b$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

> 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

Mathematica 4.1 for Linux
Copyright 1988-2000 Wolfram Research, Inc.
 -- Motif graphics initialized -- 

In[1]:= Flatten[Outer[Plus, {i1, i2, i3}, {j1, j2, j3}]]

Out[1]= {i1 + j1, i1 + j2, i1 + j3, i2 + j1, i2 + j2, i2 + j3, i3 + j1, 
 
>    i3 + j2, i3 + j3}

hope this helps...

Albert


  • Prev by Date: How solve a system of ODE with periodic coeffs.
  • Next by Date: Re: newbie: all possible sums of two lists
  • Previous by thread: Re: newbie: all possible sums of two lists
  • Next by thread: Re: newbie: all possible sums of two lists