I manged to get through Ch 3 yesterday, this time with pencil and paper in hand. I can only say that mathematicians and computer scientists are insanely sick people.
Basically, they start up with this equation, turned to readable form by yours truly:
a%n = a - n(floor(a/n))
I just stared at that just awed by the obviousness and the simplicity of it. Why didn't I think of this?
And then I figured this may or may not work, so I should think about opening up the editor and programming it:
a%n - a = -n(floor(a/n))
(a%n - a)/ -n = floor(a/n)
floor(a/n) = a(1%n - 1)/ -n
But this can't be what the machine is doing if you consider what happens in a register machine..?
And then there's whole bunch of other stuff, with expansions and series and then:
How do people figure this stuff out? Thankfully someone else decided that the Theta was probably e^??
Well, okay, that feels better. I was thinking the expansion would go e to something, but how the hell did they figure out what alpha is?
And then finally, a way to compute Fibonacci numbers:
I'm in absolute awe of how they figure this stuff out. The next section is figuring out lower and upper bounds using The Master Theorem, along with the drawing of the tree and 8 pages of proofs. Maybe by page 300 I'll see some algorithms again.