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: [mg127269] Re: Algorithm Analysis Course: Should I use Mathematica for projects?
  • From: Richard Fateman <fateman at cs.berkeley.edu>
  • Date: Thu, 12 Jul 2012 04:58:45 -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>

On 7/11/2012 3:25 PM, Brentt wrote:
> Hi,
>
> I'm an undergrad math major, and taking a cross disciplinary Algorithm
> Analysis course in the fall. I talked to the professor and he said we can
> use whichever language we like and Mathematica would be fine if it had a
> way to evaluate run-time.
>
> Two questions:
>
> I think the required capabilities are those found in the documentation
> under "Time Measurement & Optimization". Would this be correct? And would
> those functions be adequate for an algorithm analysis course?

My guess is that those measurement tools would be fine.  The problem is 
that Mathematica is unsuitable as a programming language.
>
>
> I know this list would be a little biased but: should I use Mathematica?

You could write the programs, but the timing would look nonsensical 
without substantial explanation.
>
> Cons:  I absolutely adore Mathematica and never find myself wanting to
> program in anything else (I've toyed with Python and other languages, but
> Mathematica inspires me to play with programming like other languages have
> not), and thought committing to Python for the class might expand my
> programming skills.

You should use a conventional programming language which supports 
conventional data structures.  This could be python, or C or Java or Lisp.

  Also I'm guessing the course will focus on procedural
> algorithms which might not be a good fit for Mathematica's functional
> paradigm.
Probably not an issue.

I know Mathematica can be shoehorned in to any paradigm, but
> maybe it'd be better to use a more procedural language.

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).

Your times and the expectations of the class/instructor/exams/homeworks
would work together if you used a language which did not disrespect the
fundamentals of data structures.

>
> Pros: I will learn Mathematica with more depth, and there are good reasons
> to get really good at one thing as opposed to OK at many things.

It is unlikely that having an in-depth understanding of Mathematica will 
have a strongly positive impact on what you do after graduation.
Compared (say) with experience in a more commonly used programming language.

Plus what
> I learn in Mathematica may just as well translate to other languages anyway
> so it may not be a big deal which I choose.

To some extent Mathematica makes a hash of "paradigms" from other 
programming languages, with a dose of mathematical procedures.  Learning 
functional programming from Mathematica seems to me to
be an unappealing prospect.

Ask your instructor for a recommendation of a programming language, and
learn that one.

Good luck.

>
> Input anyone?
>





  • Prev by Date: Re: Sending an interrupt to the frontend?
  • Next by Date: Re: Sending an interrupt to the frontend?
  • 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?