[math-fun] Re: math-fun Digest, Vol 17, Issue 8
BTW I've shared RCS's interesting experience of the surprising messiness of such algorithms, such as determining whether p+qx < r+sx for signed p,q,r,s using only integer operations. Heck, I'd even pay $50 for an easy way to
generate a+bx in increasing order for a,b >=0 (if you think you have one contact me to negotiate the definition of "easy"<;-).
Fool's errand, if I understand correctly. [SNIP foolishness] I think you missed the constraint 'a,b >= 0'.
That I did. Ooops. Surely the easiest algorithm would be Dijkstra's? Very quick, very easy, and not requiring anything more than integer maths if you're paranoid about roundoff errors or are very tight on space. Your "same floor" algorithm may very well nearly be Dijkstra's already though. Phil ===== When inserting a CD, hold down shift to stop the AutoRun feature In the Device Manager, disable the SbcpHid device. http://www.cs.princeton.edu/~jhalderm/cd3/ __________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail
=Phil Carmody Surely the easiest algorithm would be Dijkstra's?
I'm not sure; which algorithm of Dijkstra's do you refer to? Googling on just dijkstra+algorithm mainly gets zillions of references to a shortest path procedure. That's not applicable to this problem of determining the nearest neighbor in an efficient way; the "Dijkstra's algorithm" assumes you have this information a priori. Anyway, if you can provide further keywords to search on let me know and I'll try tossing them in the engine's maw. Thanks!
participants (2)
-
Marc LeBrun -
Phil Carmody