[Archive!] Pure mathematics, physics, chemistry, etc.: brain-training problems not related to trade in any way - page 449

 
MetaDriver: Lyosha, you're getting a bit carried away here. That's not true at all. Just because you're often right, doesn't mean you're always right. Or maybe you just don't understand my statement.

I'm not saying I'm always right. That would be too much.

But in this case the observer must reason the way that wise men would, i.e. on the basis of the information they have. And we, in fact, try to reason like that. When we analyse the lines, we involve only the information that the wise man has - even though we have information that both of them have.

 
Mathemat:

I'm not claiming that I'm always right. That would be too much.

But in this case an observer is obliged to reason as wise men would do, i.e. on the basis of the information they have. And we, in fact, try to reason like that. When we analyse the lines, we involve only the information that the wise man has - even though we have information that both of them have.

I'm aware of that. That's not what I mean. Wise men have fixed variables. In terms of fixed variables, the problem is solved unambiguously. We have a space of variables. A meta-problem. We need to find under what conditions dialog is correct. A solution from a SET of solutions, or rules of solution set derivation. Another task. And a different solution.

About "Option 5) S=93; P=356; a=4; b=89 is discarded immediately in light of my addition after the proof of Lemma:....... " - I'd check it out if I were you.

Perhaps the lemma is a holey one (I'll check it myself tonight).

That's all for now, I'm off to work.

 

My bad, I'm in total breach of condition - not related to trade in any way . Still, hint, it's been five days I can't figure it out.

int start()
{int y;
y= WindowFirstVisibleBar();Alert ("y",y);
for (;y>=0;y--)
{ double up=iFractals(Symbol(),PERIOD_M15,MODE_UPPER,y);
double down=iFractals(Symbol(),PERIOD_M15,MODE_LOWER,y);
if (up>=1|down>=1){
Alert("Previous upper fractal is:", up, " Previous lower fractal is:", down);Alert ("y",y);}}


WindowFirstVisibleBar() counts the number of bars on the visible chart, it should work like this - Alert writes the numbers of bars with fractals.

But this simple thing doesn't work! It gives out all the bars. So the simple if (up>=1|down>=1){

doesn't work, or I'm completely stupid, I'm stubbornly looking at this place till my stomach itches, I don't get it!

I'd really like to understand the principle, what's wrong? Everything seems to be very simple and correct. I want to know!

Help!

If completely in the wrong thread, again I apologize, then delete.

 
Dimka-novitsek:

My bad, I'm in complete violation of the condition - not related to trading in any way . Still tell me, I haven't been able to figure it out for five days.

........................

Help!

If it's in the wrong branch, I'm sorry, then delete it.

Well, here's a branch. https://www.mql5.com/ru/forum/111497

Move the post there, and here at most leave a link to ask us THAT help. The topic is different here. Shoo! :)

Good luck.

 
Yeah, I got it, I'm on my way there now.
 
MetaDriver:

I'm aware of that. That's not what I mean. Wise men have fixed variables. In terms of fixed variables, the problem is solved unambiguously. We have a space of variables. A meta-problem. We need to find under what conditions dialogue is correct. A solution from a SET of solutions, or rules of solution set derivation. Another task. And a different solution.

About "Option 5) S=93; P=356; a=4; b=89 is discarded immediately in light of my addition after the proof of Lemma:....... " - I would check it if I were you.

Maybe the lemma is leaky (I'll check it myself tonight).

Yes, I get your point. Wise guys solve the problem based on the sum and product they got, while we need a general form.

And lemma is not leaky :) I recently had doubts about the addition (related to multiplier 53), but now they are gone. The only clarification: if the sum is less than 200, then the limit number of the sum is 103.

Think about it, can B say his first line "I knew it without you..." if he gets an amount over 55 (we have 93). Considering the possible pairs, he won't miss the 53 and 40 option. But the number 53*40 is decomposable into multipliers unambiguously (our sum is not more than 100). Consequently, he will not be able to say "I knew without you...", because it is a case of one-digit decomposition into multipliers.

 
Mathemat:

1) Yes, I see your point. The pundits solve the problem based on the sum and the product they got, but we need a general form.

2) And the lemma isn't a hole :) I recently had doubts about the addition (related to multiplier 53), but now they are gone. The only clarification: if the sum is less than 200, then the limit number of the sum is 103.

You do the math, would B be able to say his first line "I knew without you..." if he gets the sum over 55 (we have 93). Considering the possible pairs, he won't miss the 53 and 40 option. But the number 53*40 is decomposable into multipliers unambiguously (our sum is not more than 100). Consequently, he will not be able to say "I knew it without you...", because it is a case of one-digit decomposition into multipliers.

1. Uh-huh. Okay.

Two. Okay. I think I've got it. I concede the logic of the lemma. Let's fix it.

So we need to correct this condition:

bool ValidSum(uint n) {return((n%2==1) && (MX[n-2].count>1) && n<=SMax);}

It does not contain all the restrictions. If I understand correctly - you need to put in it as an upper bound(first-invariant-simple-number-exceeds-SMax/2 + 2).

Right?

There you go, corrected it. // see trailer.

Now it's done like this:

   bool ValidSum(uint n) {return((n%2==1) && (MX[n-2].count>1) && n<=Top);}

Where Top is calculated in the constructor like this:

   for(Top=SMax/2;MX[Top].count>1;Top++);
   Top+=2;

The results are as follows:

2011.01.14 19:28:45 MetaSage (EURUSD,M10) //+---- Max = 200 -------------------+
2011.01.14 19:28:45 MetaSage (EURUSD,M10) S=93; P=356; a=4; b=89
2011.01.14 19:28:45 MetaSage (EURUSD,M10) S=41; P=148; a=4; b=37
2011.01.14 19:28:4514 19:28:45 MetaSage (EURUSD,M10) S=37; P=160; a=5; b=32
2011.01.14 19:28:45 MetaSage (EURUSD,M10) S=23; P=76; a=4; b=19
2011.01.14 19:28:45 MetaSage (EURUSD,M10) S=17; P=52; a=4; b=13
2011.01.14 19:28:45 MetaSage (EURUSD,M10) //+---- Max = 200 -------------------+
2011.01.01.14 19:28:45 MetaSage (EURUSD,M10) //============== START ========================
2011.01.14 19:22:39 MetaSage (EURUSD,M10) //+---- Maximum amount = 99 -------------------+
2011.01.14 19:22:39 MetaSage (EURUSD,M10) S=23; P=76; a=4; b=19
201101.01.14 19:22:39 MetaSage (EURUSD,M10) S=17; P=52; a=4; b=13
2011.01.14 19:22:39 MetaSage (EURUSD,M10) //+---- Max = 99 -------------------+
2011.01.14 19:22:39 MetaSage (EURUSD,M10) //============== START ========================

Is it correct now? ;-))

Files:
 
drknn:
So, you have found the right pair of numbers. Now can you simulate the dialogue of the wise men, showing all the calculations that took place in each of their heads at each stage of the conversation?

We could. But so far, I'm bored. I'm a little tired of the task, and, as Ritchie rightly said, the Forex machine is lying on the bed... :)

Well, you should try it. Call more help, if you need it. There's a base. All that's left is a haircut, a comb-over, and a dye job.

You can cut the script, there'll be no copyright infringement. Today I'm giving away free licenses. ;-)

 
Mathemat:
Scared you. OK, you don't have to look at the proof, it's right anyway :)

So anyway, using pen and paper, and discarding proofs and lemmas, has anyone tried to disprove at least one pair of the eight presented?
 

And why discard them when lemmas help a lot to speed up the process of refutation? I have already written detailed expositions for particular cases several times. But nobody seems to be particularly interested in them. Let's try again.

Generally speaking, there are not eight pairs, but only two (if the sum is less than 100). I have already given a proof of the complete acceptability of the pair 4.13 recently. Now let's disprove the pair S=23; P=76; a=4; b=19:

A: (76 = 2*38 = 4*19.) Can't.

B: (My sum of 23 is in the Set of Acceptable Sums MDS = {11,17,23,27,29,35,37,41,47,51,53} at which I, B, can be sure that A will not guess a pair immediately. See lemma :) ) I already knew that you can't.

A: (B informs me that his sum belongs to MDS. What sum can I have? 40 и 23. Only 23 belongs to the MDS, and I therefore know the sum and therefore the numbers themselves - 4 and 19). I know the numbers.

B: (B has actually told me that in his product there is only one single option for the sum included in the MDS. I may have to check all the variants. Keep in mind that we will always have variant 23 for the sums. To discard the variant it is sufficient to find another sum from the MDS.

Also consider that only odd numbers can be valid sums.

23=2+21. П (=2*3*7) = 2*21 = 3*14 = 6*7. The sums of the multipliers are 23, 17, 13. Two choices from MDS are bummer.

23=3+20. П (=2*2*3*5) = 2*30 = 3*20 = 4*15 = 5*12 = 6*10. The sums of the multipliers are 32, 23, 19, 17. Enough already. Bummer.

23=4+19. П (=2*2*19) = 2*38 = 4*19. The sums of the multipliers are 40, 23. The real candidate. Then the numbers are 4 and 19. But I haven't checked all the options yet :(

23=5+18. П (=2*3*3*5) = 2*45 = 3*30 = 5*18 = 6*15 = 9*10. The sums of the multipliers are 47, . Already enough, as 47 is included in the MDS, but there will still be 23. Bummer.

23=6+17. П (=2*3*17) = 2*51 = 3*34 = 6*17. The sums of the multipliers are 53, . That's enough, because there will be 23 more anyway. Bummer.

23=7+16. П (=2*2*2*2*7) = ... = 16*7 - the only valid option with an odd sum of 23. Another viable candidate, but with different numbers - 16 and 7.

That's it. The enumeration can be terminated. I, Sage B, don't know the numbers, as I already have two options I can't choose from). " B.

Reason: