Wednesday, September 2, 2015

Cheating

So, today in Algorithms we looked at using recurrence relations to prove the asymptotic bounds on run time. The trick, of course, is guessing the right function to begin with. Sure, there are some patterns that are recognizable but, it seems to me that if you already have the algorithm, the simple way to generate a decent guess for the asymptote would be to simply code the algorithm and time it on a range of data sets. The shape of the curve should be pretty apparent; there aren't too many algorithms so complicated that they don't converge to their asymptotic behavior pretty quickly. Maybe mathematicians think that's cheating.

No comments:

Post a Comment