Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

By that logic, every algorithm is O(1). You first limit it to a single input, then you “correctly define” the output for that input using some fixed length string, and you’re golden.


Thus the importance of a good definition 'reasonable'. I can't remember the one in that one course 10 years ago.

However, yes, there are big differences based on the encoding. Nobody would accept using unary input encoding to artificially inflate the size of the input. It's also why the time-compelixity of prime-testing is sometimes confusing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: