Next: puzzle
From: spinoza1111 on
For certain algorithms, having to do with parsing, see my book Build
Your Own .Net Language and Compiler (Apress).

I sympathize with your dilemma. Programmers need to know finite math,
logic, and formal proofs, none of which are touched in high school
outside of geometry, to understand Cormen.

Bentley's book and mine to an extent show its possible to embed this
needed instruction in a book for programmers.

But I also suggest you mosey on over to the math and logic/philosophy
section of Border's or Barnes and Noble to buy an introductory text in
logic and set theory, which will help you with the more advanced books.

Most formal education in math is taught with a combination of
hand-waving and brutality, in which the student is confronted by
Calculus I after a year of using inadequately formal methods in
advanced algebra. In Calculus I, he is confronted, inappropriately for
students who've not disassembled and reassembled a car, by mechanical
metaphors, when Newton's purpose was to present a formal system
independent of motion and change.

This style of education is completely inadequate for programming, as is
shown by the following trick question: what is the length of a line
bounded by points at x coordinates a and b?

In continuous math the answer is a-b. In many computer applications,
since and b identify not infinitesimals but points-with-mass-and-volume
(typically "cells"), the answer is not the position of a minus that of
b but a-b+1!

You will also need at some point to grok sets considered as lists with
no duplicates and elementary logical proof, which has an unsung
relation to programming.

Cormen is just doing his job because in fact there is no basis for
programming that is not math and logic.
AlgoMan wrote:
> Hi,
>
> I have been trying my hand at programming for a year as an
amateur.
>
> However, I have no formal education in computer science or
mathematics.
> Hence, now I am learning algorithms & data structures from some
> textbooks.
>
> People recommend "Introduction to Algorithms" by Thomas Cormen
etc
> & Sedgewicks algorithm books. Unfortunately, IMHO, these books are
not
> easy to
> understand for someone who doesn't have a formal Math/CompScience
> backgroup.
> I think you need to know a lot of mathematics, mathematical notations
> etc for
> understanding Cormen. As far as Sedgewick is concerned, his coding is
> rather
> complicated to understand for a beginner, he applies a twist to even
> simple
> algorithms which make them slightly difficult to understand.
>
> For eg. most other books, explain the Towers of Hanoi solution with
> this function prototype.
>
> hanoi(N, Source, Dest, Aux)
>
> Sedgewick has
> hanoi(int N, int d)
>
> Had to read it many times to understand what he is doing here,
whereas
> the
> Source, Dest thingy is very intuitive to understand for a beginner.
> Sedgwick tries to make all his programs very small, elegant &
compact,
> which
> make them a little difficult to understand for a beginner. Other than
> that,
> Sedgewick goes deep into different analysis, which are very difficult
> to
> understand.
>
> I came across the book "Programming Pearls" by Jon Bentley. This
> books explains algorithms in a very very beautiful & elegant manner
for
> a beginner.
> Things which I have found very very complex in other books, I
> understood in
> 1st reading with Bentley. Unfortunately, his books do not cover
> algorithms
> & data structures exhaustively, but are just a collection of papers,
> some of
> which concentrate on algorithms.
>
> Are there are any books on Data Structures & Algorithms which cover
> this
> subject in the same manner that Bentley does in his papers?

From: CBFalconer on
spinoza1111(a)yahoo.com wrote:
>
.... snip ...
>
> This style of education is completely inadequate for programming,
> as is shown by the following trick question: what is the length of
> a line bounded by points at x coordinates a and b?
>
> In continuous math the answer is a-b. In many computer
> applications, since and b identify not infinitesimals but
> points-with-mass-and-volume (typically "cells"), the answer is not
> the position of a minus that of b but a-b+1!

Utter rubbish loquaciously expressed. This explains some of the
errors in your code.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson

From: spinoza1111 on

CBFalconer wrote:
> spinoza1111(a)yahoo.com wrote:
> >
> ... snip ...
> >
> > This style of education is completely inadequate for programming,
> > as is shown by the following trick question: what is the length of
> > a line bounded by points at x coordinates a and b?
> >
> > In continuous math the answer is a-b. In many computer
> > applications, since and b identify not infinitesimals but
> > points-with-mass-and-volume (typically "cells"), the answer is not
> > the position of a minus that of b but a-b+1!
>
> Utter rubbish loquaciously expressed. This explains some of the
> errors in your code.

No, it displays you don't know your trade. Cf. Knuth, Concrete
Mathematics.

My example was so simple a child could understand it. If a and b are
points with x coordinates 1 and 5, the width of the line segment is of
length 4.

But if a and b are cells in a row of say seven cells, and a is number
one and at the far left and b is 5, the width of the "line" of
non-infinitesimal cells is 5 and not four.

In the infinitesimal case, there is no difference between width and
distance, because neither point contributes anything to the width. In
the noninfinitesimal case, the distance remains the same for in that
case it is the number of cells that must be visited to move from a to
be, but the width of the line segment includes both "points".

The fact that you don't understand this, and are too cowardly to show
why I am "wrong" lest you be exposed for a damned fool, illustrates the
OP's dilemma. There are entirely too many self-styled programmers who
are unclear on mathematics including infinitesimals and how the enter,
and do not enter, their trade.
>
> --
> "If you want to post a followup via groups.google.com, don't use
> the broken "Reply" link at the bottom of the article. Click on
> "show options" at the top of the article, then click on the
> "Reply" at the bottom of the article headers." - Keith Thompson

From: CBFalconer on
spinoza1111(a)yahoo.com wrote:
> CBFalconer wrote:
>> spinoza1111(a)yahoo.com wrote:
>>>
>> ... snip ...
>>>
>>> This style of education is completely inadequate for programming,
>>> as is shown by the following trick question: what is the length
>>> of a line bounded by points at x coordinates a and b?
>>>
>>> In continuous math the answer is a-b. In many computer
>>> applications, since and b identify not infinitesimals but
>>> points-with-mass-and-volume (typically "cells"), the answer is
>>> not the position of a minus that of b but a-b+1!
>>
>> Utter rubbish loquaciously expressed. This explains some of the
>> errors in your code.
>
> No, it displays you don't know your trade. Cf. Knuth, Concrete
> Mathematics.
>
> My example was so simple a child could understand it. If a and b
> are points with x coordinates 1 and 5, the width of the line
> segment is of length 4.
>
> But if a and b are cells in a row of say seven cells, and a is
> number one and at the far left and b is 5, the width of the
> "line" of non-infinitesimal cells is 5 and not four.

x x x x x
1 2 3 4 5 location of the discrete
a b the actual points
1 2 3 4 ordinal of the interval

and lo, the count of intervals, which is the width, is 4.

As I said, utter rubbishy nilgewater. Most children can see this.
Are you sure your name isn't Schildt? The ability to count is a
prerequisite for this profession.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson

From: infobahn on
CBFalconer wrote:
>
> Are you sure your name isn't Schildt?

Schildt writes clearly.

> The ability to count is a prerequisite for this profession.

Which profession? Spamming? Your correspondent is getting just a
little bit too keen to write "see my book". Try a Google search
for his use of the exact phrase "my book" in comp.programming.

Wouldn't you call that spamming?
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5
Next: puzzle