[Date Index]
[Thread Index]
[Author Index]
Re: Algorithm Analysis Course: Should I use Mathematica for projects?
*To*: mathgroup at smc.vnet.net
*Subject*: [mg127313] Re: Algorithm Analysis Course: Should I use Mathematica for projects?
*From*: Andrzej Kozlowski <akozlowski at gmail.com>
*Date*: Sun, 15 Jul 2012 04:30:07 -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> <jtoglu$qk8$1@smc.vnet.net> <50006641.8080505@cs.berkeley.edu> <4C9B8992-4120-4D27-A049-93F3632F2182@gmail.com> <20120714052828.774436867@smc.vnet.net> <FB3DBDDB-A4F4-42A9-8B6D-A880E2980CDF@mimuw.edu.pl> <5001B612.9030903@eecs.berkeley.edu>
I don't intend to get involved in more pompous and futile rhetorics so beloved by Richard, but so I will restrict myself to matters of substance.
The stuff about "how it all works" is mere hypothesis - quite interesting in some ways but no more (and actually perhaps less) than similar hypothesis I have heard from my students. It's all rather unimportant.
>> Another thing, all your examples of length dependent retrieval involve changing the list in w way that could alter it's length.
> This is false. I set the several arrays in fixed size and then changed the contents, not the length.
> Your statement is also ungrammatical. ... " it's" is a contraction for "it is" ... not a possessive. :)
I will address only the first part of the above (the second is just too childish, even with the smiley, to bother with).
You used the construction:
B = Table[i, {i, 0, 1000}];
B[[5]] = j; Timing[Do[B[[50]]++, {i, 0, 100000}]]
This sort of thing can certainly change the length of a list. A simple example:
Clear[B]
j /: {a___, j, b__} := {a, 1, 1, b}
B = Table[i, {i, 0, 5}];
Length[B]
6
B[[5]] = j;
Length[B]
7
It would seem to me that this alone should force re-evaluation of the =
list.
>>
>> Finally, I would like to mention that I have taken no position at all =
on the question in the subject of this thread. Clearly using a tool =
which was designed for a purpose other than the one you have in mind is =
rarely the optimal approach unless there are some benefits that =
compensate for the almost inevitable deficiencies. Mathematica was not =
designed primarily as an all purpose programming language so it is not =
the best tool for the study of the workings of such languages.
> That was not the issue. Studying algorithms is not the same as =
studying the workings of programming languages.
> Mathematica would not be my first choice for either.
Studying algorithms is not the same as studying the working of =
programming languages and I never said it was. But algorithms have =
various aspects some of which can be studied without any mention of any =
programming language at all (as happens for example with algorithms in =
commutative algebra) and others (such as time and space complexity) =
require the introduction of a specific model of a computer and a =
suitable language - (as was done, for example, in volume 1 of Knuth's =
"The Art of Computer Programming"). Choosing such a model and a language =
is always to some extent arbitrary. One could probably create a computer =
especially designed to run Mathematica (as was once done with LISP at =
MIT) and if this computer became the "accepted standard" "the study of =
algorithms" for such a computer would not be exactly the same as the =
study of algorithms for th standard computers in use today.
Andrzej=
Prev by Date:
**Re: Algorithm Analysis Course: Should I use Mathematica for projects?**
Next by Date:
**Re: Algorithm Analysis Course: Should I use Mathematica for projects?**
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?**
| |