How do people create difficult, recreational problems (e.g. like those found in competitions such as the IMO)? Please let me know if this question does not belong here.

I have always wondered how the problem-setters for contests like the IMO come up with the problems. The creation of problems like those set at university, or found in textbooks, seem natural -- a mathematician uses their years of experience in mathematics to fashion questions from known problems, theorems, and their proofs.
But competition maths seems a bit different. Often it is not as clearly tied with a particularly useful result, or sometimes it comes across as purely for the sake of a competition (I am thinking of those long geometry problems in particular in that case). Yet many of them are really neat, interesting standalone questions, and usually quite tough as well.
I was wondering whether anyone who has taken part in the creation of such questions could share a bit about what the process is like? Does one often operate 'in reverse' (for instance with the hard IMO geometry questions: starting with a construction, mildly arbitrary, and 'erasing' the steps)? Or perhaps asking oneself a question, trying to answer it, and if it is an appropriate amount of difficult, shape it as a question? Would love to hear from anyone with experience in the area.
 A: Disclaimer: I am a high schooler and have never contributed a problem to a very large-scale and prestigious math competition like the IMO. However, every year my school designs problems for a math competition that we administer to middle schoolers, and I write many problems for this competition every year.
In every math competition, there will surely be some students who are able to carry out computations or algorithms abnormally fast or who have memorized a lot of useful formulas. My main goal when writing test questions is to ensure that participants cannot excel on the test by algorithmic/formulaic/rote knowledge alone, but rather have to use some kind of intuition or ingenuity.
One way to do this (that is also used in a lot of higher-level competitions) is to use really large numbers so that the problem can’t be solved by brute force. For instance, consider this problem:

Define the function $f$ as
  $$f(x)=\frac{1+x}{1-x}$$
  calculate the value of
  $$\overbrace{f(f(f(...f}^{2019}(3)...)))$$

During a math competition, even the quickest students don’t have time to evaluate a function $2019$ times. To solve this problem, the students would have to play around with this function and eventually realize that $f$ satisfies the nice property $f(f(f(f(x))))=x$, from which the answer can be easily obtained.
Another way to prevent students from solving problems formulaically is to design a problem that seems to provide too little information. For example:

If a rectangular prism has surface area $12$ and volume $3$, and its side lengths are $a,b,c$, then what is the value of
  $$\frac{1}{a}+\frac{1}{b}+\frac{1}{c}=\space ?$$

For a middle schooler who expects to use the surface area and volume formulas to simply solve for $a,b,c$ and plug in the answers, this problem would stop them in their tracks, because there isn’t actually enough information to find the values of $a,b,$ and $c$, although there is enough information to find the value of $\frac{1}{a}+\frac{1}{b}+\frac{1}{c}$.
Anyways, these examples are only middle-school level problems (or easy high-school level ones) and not representative of the type of competition you’re asking about, but they can at least shed some light on how one designs contest problems.
A: Not IMO-level, but I contributed a problem to an olympiad a few years ago. I started with the general concept (number the faces of a dodecahedron and make a pigeonhole argument about face numbers), and then fiddled with a variety of necessary consequences, trying to find something that worked nicely (i.e. restrictive enough to be challenging while still having a solution).
If you leave yourself enough room, i.e. to change the allowable numbers on the faces, the face total, adding conditions on the numbers, etc, you can find a variety of different results. Then, it's just a matter of picking one that has approximately the right difficulty level.
A: Here is my two cents as a former IMO and math contestants in general in high school. 
I would strongly argue otherwise. That is, creation of those elegant math contest problems are results of a long chain of similar problems and of shared experience of thousands of people, each next one slightly modified from the previous ones. Keep in mind that many of the former math contestants continue keeping up with current contests and maybe play around with them in their spare times, which sometimes could result in something interesting, something new. 
You are indeed right that a good chunk of contest problems have little to nothing to add to original research. However, the underlying process of discovery of such problems are still the same. For instance, you have proved an inequality and what's next? For me, it was always fun looking for the refinement of the inequality and so I kept toying with the inequalities I solved, and as a I result I ended up proposing several "original-ish" problems to some contests. 
Another example you can see it in your eyes is to take look at the older Putnam problems and then look at some newer ones. You can see how the older problems look very much like standard university curriculum problems, while the newer ones are more refined, more olympiad type if you will. This is a consequence of nothing but the experience and practice accumulated over the years, by past competitors. You can even see a sharper contrast if you go through old IMO compendiums and then some new ones. 
Note that the process is still ongoing and it is resulting in a change in the natures of contest problems too. The biggest example would of course be the IMO. For decades, it has been pretty much the standard that $2$ problems would be Euclidean geometry problems and one of the algebra problems would be some sort of inequality. But it appears that we are "running out" of fresh problems in those area that are still doable in competition; therefore, the IMO is slowly phasing them out. I would be surprised if I see another homogeneous, symmetric/cyclic inequality in IMO again. Same with, one hard and one easy Euclidean geometry problems. As much as those two are my favorite topics, I support this shift because those two are the most formulaic - as long as you know all the tricks and had enough practice, you are very likely to solve those problems. 
A: For Euclidean geometry, it is usually by "playing with GeoGebra". Sometimes, when playing around you create a new configuration with some unexpected properties like concyclic points. Then you try to 'hide' information (by for eg. redefining the points in some other way) to make it difficult.
Evan Chen has also written an article about creating problems here 
