Re: algorithms + data structures = programs



arnuld said:

hai guys,

recently, i purchased Niklaus Wirth's book "Algorithm + Data Structure
= Programs" . i found this book completely incomprehensible.. it's fine
upto 1st 6 pages

Oh dear. Wait there a second. [F/X rustle rustle] Okay, I think I'm with
you...

where he describes how we derive data structures by
modellig real-world objects & role of a programming langugae for
solving a particular problem

He does? Maybe I missed that bit.

but after that he starts with Bisection/Binary-Search

Page 13, in my edition.

& a table to compute the negative-powers of 2
which were totally incomprehensible.

Okay, here at least we can perhaps help. But first, please explain which
bit(s) you don't understand. Is there a specific notation you are
struggling with? Is it the

----
\
\
/
/
----

sign? If so, fear not. This sign (the "sigma") is just the way
mathematicians have of expressing a loop-that-adds-up. Thus:

n - 1
----
\
\ a[i]
/
/
----
i = 0

is the mathematician's way of saying:

sum = 0;
for(i = 0; i < n; i++)
{
sum += a[i];
}

If it's some other thing that's troubling you, please do give us more
detail.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.



Relevant Pages

  • Re: Merge I2O patches from -mm
    ... > You could still keep that information in your data structure. ... Okay, i don't remember why i added this, but i will try to get rid of it ... Markus Lidel ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: How to unload a form while its still busy with Form_Paint
    ... Event can sometimes take upto several minutes. ... That is NEVER okay. ... In general, I would tend to agree, but we don't know what he's drawing or the nature of the app or anything else. ... Bottom line is if USERS are OK with it. ...
    (microsoft.public.vb.general.discussion)