Nov. 2nd, 2004

sniffnoy: (Chu-Chu Zig)
So. You may recall that last year I was working on the cow problems, and I got to Humble Numbers, and after working on it for a while, I just sort of stopped. And of course in that time I've lost a lot of my knowledge of programming (though I'm sure it shouldn't take long to get it back), Tom has been continually bugging me to finish Humble Numbers, and of course I've fallen way behind everyone else on the cow problems.

I should probably mention what the problem is at this point. Given a set of k prime numbers, find the nth number which has only those as prime factors. (1 doesn't count.) These numbers are referred to "humble numbers", for whatever reason.

Anyway, eventually it got to the point where Tom told me how to do it, how to generate the next humble number from the existing ones (the way I was doing it was much weirder, IIRC). But I forgot it. So finally today I got back to it, and I realized how to do it! And I went I got rid of my old algorithm and wrote up this much simpler one.

...and after a bit, I realized that my algorithm was utterly, utterly wrong.

Well, not unfixable, actually. So I fixed it. And it's even slower than the original. It only gets 5 test cases rather than 11. YAY.

So, back to work on it, I suppose...

-Sniffnoy

--
"I have opinions of my own--strong opinions--but I don't always agree
with them."
-George W. Bush

May 2025

S M T W T F S
    123
45678910
11121314151617
181920212223 24
25262728293031
Page generated Jun. 19th, 2025 01:20 am
Powered by Dreamwidth Studios