MathGroup Archive 2005

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

Search the Archive

Re: Tilting at Windmills?

  • To: mathgroup at
  • Subject: [mg62156] Re: Tilting at Windmills?
  • From: dana.onthebeach at (Dana DeLouis ("dana.onthebeach at"))
  • Date: Sun, 13 Nov 2005 02:08:36 -0500 (EST)
  • Sender: owner-wri-mathgroup at

HI.  Here's my attempt.




Dana DeLouis

"Matt" <anonmous69 at> wrote in message news:dl1jta$1m$1 at
> Hello,
>  Where there's a chance of success, I tend to agonize over details of
> implementation.  Memory usage is one such area.  Here is a statement of
> a problem I was trying to solve in Mathematica:
> Given a list of the following form:{x1,x2,x3,...,xn-1,xn} I want to
> develop an algorithm that will iterate over the input list to produce
> output of the following
> form:{x1,x2,x2,x2,x2,x3,x3,x3,x3,x4,x4,x4,x4,x5,...,xn-2,xn-1,xn-1,xn-1,xn-1,xn}
> which will then need to be partitioned to end up in the following form:
> {{x1,x2},{x2,x2},{x2,x3},{x3,x3},{x3,x4},{x4,x4},{x4,x5},...,{xn-2,xn-1},{xn-1,xn-1},{xn-1,xn}}
> which means that if I had a flattened list of length'n' as input, then
> the new flattened list would have a length of 4*(n-2)+2
> Here is my first solution...


  • Prev by Date: Re: Re: Re: Re: Mathematica 1
  • Next by Date: Re: extract from list and keep track
  • Previous by thread: Re: Tilting at Windmills?
  • Next by thread: Re: Tilting at Windmills?