Live data from Hacker News

Teen Mathletes Do Battle at Algorithm Olympics

wired.com

11–20 of 35 posts

Re: Teen Mathletes Do Battle at Algorithm Olympics

#11

How to become matheletes like them ? Any guides ? Books? Where to get started ? You suggest to learn python by it clearly says C,C++ and Pascal. Should I learn C++ as first language ? Help ?

Note that this is more accurately a computer science competition, not a mathematics competition. The use of "mathletes" in the Wired title was inappropriate.

Re: Teen Mathletes Do Battle at Algorithm Olympics

#12

How to become matheletes like them ? Any guides ? Books? Where to get started ? You suggest to learn python by it clearly says C,C++ and Pascal. Should I learn C++ as first language ? Help ?

You should try doing USACO - http://ace.delos.com/usacogate

They have guides, problems and online judging system.

Re: Teen Mathletes Do Battle at Algorithm Olympics

#13
post #6

Earlier quoted context omitted.

I have to disagree. I participated in few algorithm competition (however much easier than IOI) and I think that: - OOP - C - functional python are redundant. Creating more advanced objects than graph vertex/edge is usually unnecessary in algorithm tasks. Functional programming - well, that would be useful sometimes, but as IOI and most similiar type competirions support C/C++/Pascal, you won't be able to use it anywa…

If I want to play Rachmaninov's second piano concerto, I don't start by trying to play it straight away. I start with simple pieces, with scales and arpeggios, and with speed exercises. I build my basics, initially leaving out things that I'm not ready for. I think learning Python first, and then the concepts behind both OOP and FP, better prepare someone for solving problems in languages like C++ than trying to star…

Algorithm competitions aren't like playing Rachmaninov's second piano concerto.

It's more like playing a simpler piece that everyone knows, like Canon in D. Except you learn to play it faster than anybody else.

You're giving advice on how to be a better programmer, which is significantly different from being a programmer who implements algorithms. In a programming competition, I don't go back and optimize my code. I test to see if it works, and go on to the next question.

Re: Teen Mathletes Do Battle at Algorithm Olympics

#14
It'd be interesting to observe their workflow, from editor choice to debugging methodology. Sure, choosing and developing a sensible algorithm is the "meaty" part. I, for one, am fairly impressed by the stuff these kids do.

But I'd be surprised if they didn't have some serious Vim-Fu going on as well.

Re: Teen Mathletes Do Battle at Algorithm Olympics

#16
post #14

It'd be interesting to observe their workflow, from editor choice to debugging methodology. Sure, choosing and developing a sensible algorithm is the "meaty" part. I, for one, am fairly impressed by the stuff these kids do. But I'd be surprised if they didn't have some serious Vim-Fu going on as well.

There's very little usage of either Emacs or vim at these competitions (they seem to prefer a simple text editor). Also, they code fast, literally at the limit of how fast they can type! Maybe it's a consequence of the language choice (typically C++)...

Re: Teen Mathletes Do Battle at Algorithm Olympics

#17

How to become matheletes like them ? Any guides ? Books? Where to get started ? You suggest to learn python by it clearly says C,C++ and Pascal. Should I learn C++ as first language ? Help ?

http://train.usaco.org/usacogate

It walks you through the algorithms, though you need one of the languages.

There's some terse list at

http://www.algorithmist.com/

that might help. (Disclosure: I started Algorithmist)

Re: Teen Mathletes Do Battle at Algorithm Olympics

#18

How to become matheletes like them ? Any guides ? Books? Where to get started ? You suggest to learn python by it clearly says C,C++ and Pascal. Should I learn C++ as first language ? Help ?

Solve problems. After that, solve more problems. Having done that, read some algorithms book and solve even more problems.

The thing is that most problems on such contests are designed so that classical algorithms are of no use in solving them -- the jury want you to figure out the answer, not to know it beforehand. Of course, there are some algorithms that are helpful anyway, but not many -- here is an almost complete list: merge sort, quicksort, radix sort, Dijkstra, DFS/BFS, Find-Union, KMP, sometimes Manacher and various maximum flow algorithms. Regarding data structures, the following ones are useful: self-balancing binary search trees, interval trees, (mergeable) priority queues.

Learning more algorithms will not help you nearly as much as solving more problems.

Re: Teen Mathletes Do Battle at Algorithm Olympics

#19

How to become matheletes like them ? Any guides ? Books? Where to get started ? You suggest to learn python by it clearly says C,C++ and Pascal. Should I learn C++ as first language ? Help ?

Actually, there is at least one book: http://www.amazon.co.uk/Programming-Challenges-Contest-Train...

Re: Teen Mathletes Do Battle at Algorithm Olympics

#20
post #14

It'd be interesting to observe their workflow, from editor choice to debugging methodology. Sure, choosing and developing a sensible algorithm is the "meaty" part. I, for one, am fairly impressed by the stuff these kids do. But I'd be surprised if they didn't have some serious Vim-Fu going on as well.

There's very little usage of either Emacs or vim at these competitions (they seem to prefer a simple text editor). Also, they code fast , literally at the limit of how fast they can type! Maybe it's a consequence of the language choice (typically C++)...

Maybe it's a consequence of the language choice (typically C++)...

Because it allows them to type as fast as they can, or because it forces them to do so?

Post reply on HN