reflexfps's blog

By reflexfps, 8 years ago, In English

There is lots of evidence that doing well in math contests helps significantly in programming contests.

Someone else asked a similar question on another page, where one of the comments (http://codeforces.com/blog/entry/18149?#comment-230597) says:

"People able to do well in mathematical competitions do perform well and have a big boost when it comes to competitive programming not because of their knowledge of specific theorems, but because they are able of conducting logical and precise reasoning."

That same page includes references to several top competitive programmers who improved relatively quickly because of their strong math background.

Here's another link (https://community.topcoder.com/tc?module=Static&d1=features&d2=070805) where Petr says at one point:

"I think that two main keys to programming challenges are training and thinking. You have to solve a lot of problems to become really successful, but you also need to have good math knowledge and the ability to solve uprising problems. Mathematical puzzles and olympiad problems, for example, can help develop it very well."

I personally did math contests throughout my school years (I am attending university now), but I never did significantly well in them (the best I did was in 12th grade when I qualified for the AIME, for anyone who knows what that is). So my question is: Is is worth supplementing practice for programming contests with practicing math contest problems? Would your problem solving ability improve any faster if you practiced math contest problems, or would it be more efficient to practice programming problems only?

  • Vote: I like it
  • +34
  • Vote: I do not like it

»
8 years ago, # |
Rev. 4   Vote: I like it +15 Vote: I do not like it

I used to actively participate in math competitions when I was younger (5th to 8th grade) and I did fairly well, but with time I started performing worse and worse, and at the moment (finishing 11th grade) I'm not good compared to other mathematicians from my country.

It surely helps a lot, and as mentioned by the comments you showed — it's the logical and precise reasoning. For example in a competition if I come up with a greedy I often try to 'prove' it in my head, even if only intuitively, and experience in maths contests helps a lot for that.

Having said that, I don't think it helps that much if you solve math contest problems as the majority of them require knowledge of different theorems and may require long and messy proofs, both of which are not usually needed for a programming competition. If you feel that mathy programming problems are not your strong side — solve such problems instead of pure math problems.

Of course, now and then you'll find programming contest problems that simply require the knowledge of advanced maths or some very specific theorem — I've accepted that those problems I'm just unable to solve without checking author's solution. The good news is, however, that no one is really fond of such problems and they are quite rare from what I've seen. Despite that, there are some algorithms that may require knowledge of maths to really understand them (FFT for example, which I struggle to understand), but if you were a math competitor in the past it shouldn't be a problem to understand them given enough time.

All of this is simply my opinion, I can't really back it up with lots of arguments, but I think that if you were ever a good maths competitor, then it should be sufficient to solve programming problems only, and solve pure math only for pleasure (some problems are very beautiful) or when necessary for a specific programming problem you encounter.

P.S.

I don't really know how the ACM ICPC problem syllabus is regarding maths. I think it might be a bit more mathy than what I'm used to seeing in most competitions, but I'm guessing that most people who study programming in university also take some math classes, which I hope is enough.