Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Algorithm Analysis Course: Should I use Mathematica for projects?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg127272] Re: Algorithm Analysis Course: Should I use Mathematica for projects?
  • From: Andrzej Kozlowski <akozlowski at gmail.com>
  • Date: Fri, 13 Jul 2012 02:53:02 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <jtkuhh$2a$1@smc.vnet.net> <20120712085845.B341E6859@smc.vnet.net>

On 12 Jul 2012, at 10:58, Richard Fateman wrote:

> It would be better to use a programming language in which Lists are
> lists, not arrays and accessing elements in an array of length N is an
> O(1) operation, not O(N).

I have no idea what was meant by "accessing elements" in the quote above but "retrieving elements"  from  Mathematica's lists ("arrays") is in fact constant time (i.e. O(1)).
In fact, this is the main reason why Mathematica uses this particular data structure.  The price of this is that one cannot efficiently extend Mathematica's lists, but there are well discussed ways of avoiding this problem.

AndrzejKozlowski



  • Prev by Date: updated OptionsExplorer
  • Next by Date: SendMail with multiples receives
  • Previous by thread: Re: Algorithm Analysis Course: Should I use Mathematica for projects?
  • Next by thread: Re: Algorithm Analysis Course: Should I use Mathematica for projects?