Better HN
topnewbestaskshowjobs
Log inSign up

rwitts

12 karma · joined Aug 13, 2013 (13y ago) · 2 submissions

Submissions

comment 13y ago · link · parent

Very nice! I'm glad that you worried about this and I have to admit that your asymptotic example is nicer than mine.

comment 13y ago · link · parent

This is a very interesting article.

A minor quibble - it is very difficult to find a paradigm in which the running time of the proposed algorithm differs from simply choosing the best of the obvious algorithms.

Line at a time takes O( max(w,h) ). Binary searching each row and column separately takes O( min(w,h) log(max(w,h) ). Therefore, implementing both basic algorithms and using the faster one at run-time will run in time O(min(max(w,h), min(w,h)log(max(w,h)).

Which is very close to the proposed run-time - unfortunately so much so that it is very hard to find a sequence of (w,h) for which the proposed algorithm works asymptotically better than simply doing "the obvious thing".

But it is possible! And the lower bounds are nice!