comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: what to do, for the mathematically-disabled people (only half-joking)
Date: Mon, 11 Jan 2021 16:14:21 -0800 (PST)	[thread overview]
Message-ID: <3cb4a64f-f6b3-4edc-b102-393feb440b32n@googlegroups.com> (raw)
In-Reply-To: <c3a19d35-543b-4668-8079-a62123a0eb53n@googlegroups.com>

On Friday, January 8, 2021 at 4:24:11 PM UTC-7, 0012... wrote:
> > I don't quite understand the question: you want to get better at coding 
> > algorithms? You want to learn more math? More about algorithms?
> Worst. I have literal head-ache half-way writing a simple algorithm. My brain won't get me far enough. 
> I got back at algebra exo, which some help, to go past some blockade. then I'll go further and further, since I always loved math. I have help in a talented friend, and good books. 
> I am, making progress, fortunately. At some point I'll use your books, or whatever seems useful.
> > Knuth's TAOCP series, though it is considered old fashioned these days. It has lots of good exercises.
> Got it. I love "old fashioned" in math, always better.
Another few suggestions:
(1) Try working "backwards", from the result to the input; like induction.
(2) For real-world analogs, use the analog! [Like using 3x5 cards as a stack.]
(3) For Algebra, remember that you have to keep both sides of the equal balanced; for calculus, always remember that it's about rates-of-change.
(4) There are a lot of 'tricks' that work because of identities, but sometimes you have to "go the long way" to arrive at the simple.

Though it doesn't touch identities, deriving the sum formula is a good example here; consider the problem of summation, given S(n) is there a formula?
S(n) = 1 + 2 + 3 + 4 + 5 [...] + n
but also
S(n) = (n) + (n-1) + (n-2) + (n-3) + [...] + n-(n-1)
Adding these
2S(n) = (n+1) + (n+1) + (n+1) + (n+1) + [...] + (n+1); n times n+1
So
2S(n) = n*(n+1)
which means we can divide both sides by 2.

S(n) = ( n*(n+1) ) / 2

So we end up with something that uses an addition, a multiplication, and a division (by 2) to replace something that would have been a loop and n additions.

  reply	other threads:[~2021-01-12  0:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07 21:46 what to do, for the mathematically-disabled people (only half-joking) Mehdi Saada
2021-01-08 14:50 ` Mehdi Saada
2021-01-08 16:05 ` Brian Drummond
2021-01-08 17:43 ` Paul Rubin
2021-01-08 23:24   ` Mehdi Saada
2021-01-12  0:14     ` Shark8 [this message]
2021-01-29  2:22       ` Mehdi Saada
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox