[Archive!] Pure mathematics, physics, chemistry, etc.: brain-training problems not related to trade in any way - page 448
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
No, wrong in point 2, ValS.
B did not know in advance that A would fail: he saw in advance that a combination of 2+5 was possible, in which A could know the numbers immediately. Yes, he saw it, but he hadn't heard A's line yet - and so he couldn't have known in advance that A wouldn't figure out the numbers.
And about the inconsistency - yes, that's exactly right.
Any other options with other numbers?
Yes, that's right. Watching the code, looking for an error
Any other options with other numbers?
Yes, there are.
There were indeed a few minor and not quite errors in the programme. After correction I got 8 results:
4 5
4 13
4 37
5 8
8 17
8 23
11 32
13 16
Checked the first of these (4 and 5) meticulously with pen and paper and the dialogue seems to work. No time for the rest, unfortunately, time to run.
Lemma. The sum of numbers is in no way less than 11 and must be represented as 2+ odd_component. This is easily proved from the analysis of the first line of B.
4 and 5 do not fit immediately: B before his first retort will have to consider 2+7 (single-digit multiplication), which he cannot discard before A's retort.
Now for the proof of the highlighted one.
In his first cue B already knows in advance that A cannot recognise the pair. This can only be the case if any decomposition of the sum of C into two summands (which will be the multipliers) contains at least one composite number.
1. The sum cannot be even. According to the unproved, but tested to 100 Goldbach hypothesis, any even number up to 100 is representable as the sum of two prime numbers. Hence, if the sum were even, B could not be sure that the decomposition of the product in A is always odd.
2. The sum cannot be 2+ odd_simple. Otherwise, 2*Odd_simple would be a single-valued decomposition of the product of A into multipliers, and B would not say his retort.
Hence, Sum=2+ odd_complete. This is the necessity of the condition.
Now - sufficiency: if C=2+ odd_component, then any decomposition of C into 2 summands results in at least one of them being a compound. This is easily proved by going through possible summand decompositions, moving in ascending order of the first summand and starting with 2.
If the first summand is odd, the second summand is even and not equal to 2. Hence, the second summand is a composite, and the corresponding product contains at least 3 factors.
If the first summand is even (and not equal to 2), then the first summand is already compound. Again the product has at least 3 factors. Sufficiency is proved.
Trying (either manually or on computer) gives the following possible series of sums, at which B says his line: 11,17,23,27,29,35,37,41,47,51,53,57,59,65,67,71,77,79,83,87,89,93,95,97.
Addition: numbers over 55 can be dropped from this series if we remember that C<100. Indeed, if C>55, then B should consider C = 53 + (C-53). Here the second number is at least 2. The corresponding product of the factors 53 and (C-53) is the only possible decomposition (53 is prime), because dragging any factor from C-53 will make the first factor greater than 100 (i.e. the sum as well). Consequently, B would not be able to say his line.
Thus all possible sums are from the series 11,17,23,27,29,35,37,41,47,51,53.
Scared you. OK, you don't have to look at the proof, it's right anyway :)
Made a script (in the trailer)
So figured it out. For the pundits who are given the problem, there is only one solution each time, as long as they name the correct product and sum.
For the observer, there are five solutions in the sum range [2...99].
1) S=17; P=52; a=4; b=13
2) S=23; P=76; a=4; b=19
3) S=37; P=160; a=5; b=32
4) S=41; P=148; a=4; b=37
5) S=93; P=356; a=4; b=89
By the way, interesting effect, Lyosha, can you explain?
// I thought at first it was a bug in the program. :)
2011.01.14 01:59:27 GMT (EURUSD,H6) S=127; P=1276; a=11; b=116
2011.01.14 01:59:27 GMT MetaSage (EURUSD,H6) S=121; P=904; a=8; b=113
2011.01.14 01:59:27 GMT MetaSage (EURUSD,H6) S=97; P=712; a=8; b=89
2011.01.14 01:59:27 14 MetaSage (EURUSD,H6) S=95; P=534; a=6; b=89
2011.01.14 01:59:27 GMT MetaSage (EURUSD,H6) S=93; P=356; a=4; b=89
2011.01.14 01:59:27 GMT MetaSage (EURUSD,H6) S=83; P=316; a=4; b=79
2011.01.14 01:59:27 GMT MetaSage (EURUSD,H6) S=77; P=292; a=4; b=73
2011.01.14 01:59:27 14 MetaSage (EURUSD,H6) S=59; P=220; a=4; b=55
2011.01.14 01:59:27 14 MetaSage (EURUSD,H6) S=47; P=172; a=4; b=43
2011.01.14 01:59:27 14 MetaSage (EURUSD,H6) S=41; P=148; a=4; b=37
2011.01.14 01:59:27 14 MetaSage (EURUSD,H6) S=37; P=160; a=5; b=32
2011.01.14 01:59:27 14 MetaSage (EURUSD,H6) S=23; P=76; a=4; b=19
2011.01.14 01:59:27 GMT MetaSage (EURUSD,H6) S=17; P=52; a=4; b=13
2011.01.14 01:59:27 MetaSage (EURUSD,H6) //+----- Max = 200 -------------+
2011.01.14 01:59:03 MetaSage (EURUSD,H6) //+-----------------------------------------------------------+
2011.01.14 01:59:03 MetaSage (EURUSD,H6) S=93; P=356; a=4; b=89
2011.01.14 01:59:03 MetaSage (EURUSD,H6) S=41; P=148; a=4; b=37
2011.01.14 01:59:03 MetaSage (EURUSD,H6) S=37; P=160; a=5; b=32
2011.01.14 01:59:03 MetaSage (EURUSD,H6) S=23; P=76; a=4; b=19
2011.01.14 01:59:03 MetaSage (EURUSD,H6) S=17; P=52; a=4; b=13
2011.01.14 01:59:03 MetaSage (EURUSD,H6) //+----- Max = 99 ---------------------+
// I found and corrected a small bug (which did not affect the result, but still).
// bool ValidSum(uint n) {return((n%2==1) && (MX[n-2].count>1) && n<SMax);} //it was
// bool ValidSum(uint n) {return((n%2==1) && (MX[n-2].count>1) && n<=SMax);} //it became
Honestly, I haven't looked at the code. But it's good that it appeared :)
The sets of solutions to the problem, regardless of who is looking at it - the observer or each of the wise men - must be the same. Regarding the solutions:
Option 5) S=93; P=356; a=4; b=89 is discarded immediately in light of my addition after the proof of Lemma: here the sum is greater than 55. If the sum limit is 199, then the maximum sum is no more than 101.
For the rest of the options, a little later.
To be honest, I didn't look through the code. But it's good that it has appeared :)
The sets of solutions to the problem, regardless of who is looking at it - the observer or each of the wise men - must be the same. About the solutions:
Variant 5) S=93; P=356; a=4; b=89 is rejected immediately in light of my addition after Lemma's proof: here the sum is greater than 55. If the sum limit is 199, then the maximum sum is no more than 101.
For the rest of the options, a little later.
Lyosha, you're getting carried away here. That is absolutely not the case. Just because you're often right, doesn't mean you're always right. Or maybe you just don't understand my statement.
About the extra decisions - it looks like there are some. I know where to look. There (in the script) in expansions to groups of multipliers identical (in value) multipliers are counted as different, i.e. can generate several identical in value groups. I will correct it in the evening. // Now I'm at work.
You can correct it yourself if you like. The code is available.