[Archive!] Pure mathematics, physics, chemistry, etc.: brain-training problems not related to trade in any way - page 450
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
Actually there is a more general observation (it can be seen from the MD printout): probably all reasonable choices are restricted to pairs of numbers 2^n and p (prime). I haven't proved it, I'm just assuming it.
Now, based on that assumption, let's do something real. The most difficult thing in the dialogue of the wise men is the last line. It is the one which so far requires that many options be considered. Let us assume that we have already had three replicas and only the last one remains. How many sums from MDS can be represented as 2^n + prime?
Why this particular decomposition? Simply because B in the last line, considering possible decompositions of sums (see my previous post) and corresponding products, having met product 2*...*2*simple, already knows in advance that only one of sums for it can be admissible, since only one is odd - if numbers are equal to powers of two and odd prime. This immediately gives a real candidate.
So, let's go.
11 = 2^2+7 = 2^3+3. There are two candidates. Bummer at once.
17 = 2^2+13. There are no more such submissions. Good candidate.
23 = 2^2+19 = 2^4+7. Bummer.
27 = 2^2+23 = 2^3+19 = 2^4+11. All the more bummer.
29 = 2^4+13. Submission alone. Another candidate.
35 = 2^2+31 = 2^4+19 = 2^5+3. Bummer.
37 = 2^3+29 = 2^5+5 . Bummer.
41 = 2^2 +37. Submission singular. Candidate.
47 = 2^2+43 = 2^4+31. Bummer.
51 = 2^2+47 = 2^3+43 . Bummer.
53 = 2^4+37. Submission is singular. Candidate.
So out of all the MDS we are left with only 4 admissible sums - 17, 29, 41, 53.
____________________________________________________________
With 17 we have dealt with: B, having 17, calculates the numbers uniquely in the fourth replica.
To be continued. We only have three numbers left to analyse to finish the problem.
__________________________________
P.S. Let's make all 4 numbers short and elegant after all. Let's assume that three lines have already been said, and only the last move of Sage B is left. Let's start with the ones that won't pass, to get to the main one quickly.
29 = 4+25. П (=2*2*5*5) = 2*50 = 4*25 = 5*20 = 10*10. The sums are 52, 29, 25, 20. Only 29 from the green list is appropriate. This is a single-digit solution, i.e. the candidate (numbers 4 and 25). However, another single-digit one we already have is 16 and 13. So B will not say his line.
41 = 16+25. П (=2*2*2*2*5*5) = 2*200 = 4*100 = 5*80 = 8*50 = 10*40 = 16*25 = 20*20. The sums are 202, 104, 85, 58, 50, 41 , 40. The only permissible one is 41, i.e. the candidate (numbers 16 and 25). However, another single digit we already have is 4 and 37. So B will not say his line.
53 = 13+40. П (=2*2*2*5*13) = 2*260 = 4*130 = 5*104 = 8*65 = 10*52 = 13*40 = 20*26. The sums are 262, 134, 109, 73, 62, 53 , 46. The only permissible sum is, of course, 53 (the original numbers are 13 and 40).However, another single digit we already have is 16 and 37. So B will not say his line.
And finally, 17. I haven't come up with a short proof of the validity of the solution yet. I'm thinking. I'll compile the proof in full later, so that it's in one post. But the problem - now, now - is completely solved.
Found the error. It's called over-optimization. :)
There was an incomplete overrun in one place, an incorrect loop end condition. Fixed it.
// see lines 68-69.
// for(uint i=2;i<=sqrt(n);i++) // ERROR!!!
for(uint i=2;i<n/2;i++) // this is correct.
Now the results are surprising.
The solution is unique (S=17; P=52; a=4; b=13) up to max sum == 867
With max sum == 868, there are two solutions.
Here is the printout.
2011.01.15 18:33:11 MetaSage (EURUSD,M1) //+---- Maximum sum = 867 -------------------+
2011.01.15 18:33:10 MetaSage (EURUSD,M1) S=17; P=52; a=4; b=13
2011.01.15 18:33:10 MetaSage (EURUSD,M1) //+---- Maximum amount = 867 -------------------+
2011.01.15 18:33:10 MetaSage (EURUSD,M1) //============== START ========================
2011.01.15 18:32:59 MetaSage (EURUSD,M1) //+---- Max = 868 -------------------+
2011.01.15 18:32:59 MetaSage (EURUSD,M1) S=65; P=244; a=4; b=61
2011.01.15 18:32:59 MetaSage (EURUSD,M1) S=17; P=52; a=4; b=13
2011.01.15 18:32:59 MetaSage (EURUSD,M1) //+---- Max = 868 -------------------+
2011.01.15 18:32:59 MetaSage (EURUSD,M1) //============== START ========================
So, this task has enormous potential, not some measly hundred. Found the text:
А вот что говорит RockMover, который решал эту задачу на компьютере: Следующая пара - 4 и 61, она появляется, когда наибольшее допустимое число - 437. (Если я ничего не напутал). В диапазоне примерно до 800 появляется еще пара (32, 131), а пара (16, 73) - только когда диапазон больше 900.
I didn't check more precisely because of the slow performance of the computing machine, and I couldn't use the Cray I supercomputer, as firstly I'd have to take people away from work, and secondly it's the weekend anyway.
MD, run it up to a couple of thousand, eh?
Next Frontier 1503 (2 decisions) / 1504 (3 decisions)
2011.01.15 18:50:34 MetaSage (EURUSD,M1) //+---- Max = 1504 -------------------+
2011.01.15 18:50:34 MetaSage (EURUSD,M1) S=163; P=4192; a=32; b=131
2011.01.15 18:50:34 MetaSage (EURUSD,M1) S=65; P=244; a=4; b=61
2011.01.15 18:50:34 MetaSage (EURUSD,M1) S=17; P=52; a=4; b=13
2011.01.15 18:50:34 MetaSage (EURUSD,M1) //+---- Max = 1504 -------------------+
2011.01.15 18:50:34 MetaSage (EURUSD,M1) //============== START ========================
2011.01.15 18:50:10 MetaSage (EURUSD,M1) //+---- Maximum amount = 1503 -------------------+
2011.01.15 18:50:09 MetaSage (EURUSD,M1) S=65; P=244; a=4; b=61
2011.01.15 18:50:09 MetaSage (EURUSD,M1) S=17; P=52; a=4; b=13
2011.01.15 18:50:09 MetaSage (EURUSD,M1) //+---- Maximum amount = 1503 -------------------+
Alexei > "And finally 17. Haven't come up with a short proof of the validity of the solution yet. I think."
Well there won't be a short one here, because the whole dialogue is correct. It needs a full walkthrough. "Bae..."
So, this task has enormous potential, not some measly hundred. Found the text:
MD, run it up to a couple of thousand, eh?
A huge thanks to ValS for slipping such a great and ancient... bojang.
At the same time, I propose to give the problem the title of the coolest one in the branch.
MD, OK, I'll run it myself. Not yet :)
At two thousand 4 solutions, but I did not look for the boundary - the computer is slow, it is tedious to manually go through the boundary.
2011.01.15 18:59:16 MetaSage (EURUSD,M1) //+---- Maximum amount = 2000 -------------------+
2011.01.15 18:59:14 MetaSage (EURUSD,M1) S=163; P=4192; a=32; b=131
2011.01.15 18:59:14 14 MetaSage (EURUSD,M1) S=89; P=1168; a=16; b=73
2011.01.15 18:59:14 14 MetaSage (EURUSD,M1) S=65; P=244; a=4; b=61
2011.01.15 18:59:14 14 MetaSage (EURUSD,M1) S=17; P=52; a=4; b=13
2011.01.15 18:59:14 MetaSage (EURUSD,M1) //+---- Max = 2000 -------------------+
Maybe it's slow at the beginning, because of too big multiplier decomposition table.
I have a table of size SMax*(SMax-1) there just in case. I'll see if I can reduce it to a smaller size. I need a lemma for maximal product... :))
1. A huge thanks to ValS for slipping such a great and ancient... bojang.
2. At the same time, I propose to give this problem the title of the coolest one in the branch.
3. MD, OK, I'll run it myself. Not yet :)
Mathemat:
So, this task has enormous potential, not some measly hundred. Found the text:
And here's what RockMover, who solved this problem on a computer, says: The next pair is 4 and 61, and it appears when the largest possible number is 437. (If I'm not mistaken). Another pair (32, 131) appears in the range up to about 800, and the pair (16, 73) only appears when the range is greater than 900.
I didn't check more precisely because of the slow performance of the calculating machine, and I couldn't use the Cray I supercomputer, as firstly I would have to take people away from work, and secondly it's the weekend anyway.
By and large, you have to remove the restrictions on the amount. All reasoning remains essentially the same, just more of it.
Judging by the fact that in the quote the man needed Cray 1, his algorithm was less optimized than yours :)