- 17 Dec 2015 00:02
#14633146
While studying some math, I accidentally invented a problem that I can't seem to solve. No fancy-tootin'-high-falutin' math here, just ordinary numbers and formulas.
Let's say you have a formula with the following properties:
0) One input, one output. For example, the formula "take a number and multiply it by 5 to get the answer" has one input (some number) and one output (that number multiplied by 5). I should then be able to put all the numbers along with their answers in a list like this:
1 -> 5
2 -> 10
3 -> 15
4 -> 20
...
and so on
Call the left side the problem list, and call the right side the answer list.
1) No two problems have the same answer.
2) Every number appears exactly once in the list of answers.
This means that a formula like "take a number and add 1 to it" is not valid because it breaks rule 2. If you write out the problem and answer list for this formula
1 -> 2
2 -> 3
3 -> 4
4 -> 5
...
You can see that the number 1 never appears in the answer list.
However, a formula like "take a number and don't do anything to it" is a valid formula, which you can check. But so is the formula with the following problem-answer list
1 -> 2
2 -> 1
3 -> 4
4 -> 3
5 -> 6
6 -> 5
...
Note that a formula can be specified entirely by its problem-answer list. You don't have to come up with a rule for it like "if the number is odd then add 1 and if its even then subtract 1", but it helps if you do.
Now, what's interesting is that many of the formulas which satisfy the above 3 rules have cycles. What I mean is that if you apply the above formula to 1 over and over again, you get
1 -> 2 -> 1 -> 2 -> ... and on and on forever.
However, there are some that don't and my first challenge to you is to find one that a) satisifies the three rules above and which b) never repeats no matter which number you give it first and no matter how many times you apply the formula.
MY SOLUTION (DO NOT PEAK UNTIL YOU'VE TRIED TO SOLVE THE FIRST CHALLENGE)
Let's say you have a formula with the following properties:
0) One input, one output. For example, the formula "take a number and multiply it by 5 to get the answer" has one input (some number) and one output (that number multiplied by 5). I should then be able to put all the numbers along with their answers in a list like this:
1 -> 5
2 -> 10
3 -> 15
4 -> 20
...
and so on
Call the left side the problem list, and call the right side the answer list.
1) No two problems have the same answer.
2) Every number appears exactly once in the list of answers.
This means that a formula like "take a number and add 1 to it" is not valid because it breaks rule 2. If you write out the problem and answer list for this formula
1 -> 2
2 -> 3
3 -> 4
4 -> 5
...
You can see that the number 1 never appears in the answer list.
However, a formula like "take a number and don't do anything to it" is a valid formula, which you can check. But so is the formula with the following problem-answer list
1 -> 2
2 -> 1
3 -> 4
4 -> 3
5 -> 6
6 -> 5
...
Note that a formula can be specified entirely by its problem-answer list. You don't have to come up with a rule for it like "if the number is odd then add 1 and if its even then subtract 1", but it helps if you do.
Now, what's interesting is that many of the formulas which satisfy the above 3 rules have cycles. What I mean is that if you apply the above formula to 1 over and over again, you get
1 -> 2 -> 1 -> 2 -> ... and on and on forever.
However, there are some that don't and my first challenge to you is to find one that a) satisifies the three rules above and which b) never repeats no matter which number you give it first and no matter how many times you apply the formula.
MY SOLUTION (DO NOT PEAK UNTIL YOU'VE TRIED TO SOLVE THE FIRST CHALLENGE)
Spoiler: show