Open Side Menu Go to the Top
Register
Brainteaser and math puzzle thread Brainteaser and math puzzle thread

07-10-2011 , 02:52 PM
Quote:
Originally Posted by mute
Think I may have solved it but just wanna confirm before I write a long post full of nonsense:

gabe is the answer:

Spoiler:
3 and 14
I think that was the correct answer
Brainteaser and math puzzle thread Quote
07-10-2011 , 03:04 PM
Spoiler:
Re the above discussion I found the following possible sums: 11, 17, 23, 27, 29, 35, 37, 41, 47, 53 (hope I didn't screw up somewhere here). Fortunately the higher candidate sums were pretty easy to eliminate. I feel, that there is probably a more elegant way to arrive at these numbers.

All the possible products from these numbers are:

11: 18, 24, 28, 30
17: 30, 42, 52, 60, 66, 70, 72
23: 42, 60, 76, 90, 102, 112, 120, 126, 130, 132
27: 50, 72, 92, 110, 126, 140, 152, 162, 170, 176, 180, 182
29: 54, 78, 100, 120, 138, 154, 168, 180, 190, 198, 204, 208, 210
35: 66, 96, 124, 150, 174, 196, 216, 234, 250, 264, 276, 286, 294, 300, 304, 306
37: 70, 102, 132, 160, 186, 210, 232, 252, 270, 286, 300, 312, 322, 330, 336, 340, 342
41: 78, 114, 148, 180, 210, 238, 264, 288, 310, 330, 348, 364, 378, 390, 400, 408, 414, 418, 420
47: 90, 132, 172, 210, 246, 280, 312, 342, 370, 396, 420, 442, 462, 480, 496, 510, 522, 532, 540, 546, 550, 552
53: 102, 150, 196, 240, 282, 322, 360, 396, 430, 462, 492, 520, 546, 570, 592, 612, 630, 646, 660, 672, 682, 690, 696, 700, 702

Since man 1 now knows the numbers, we can eliminate any product, that appears twice on the list, which gives:

11: 18, 24, 28
17: 52
23: 76, 112, 130
27: 50, 92, 110, 140, 152, 162, 170, 176, 182
29: 54, 100, 138, 154, 168, 190, 198, 204, 208
35: 96, 124, 150, 174, 216, 234, 250, 276, 294, 304, 306
37: 160, 186, 232, 252, 270, 336, 340
41: 114, 148, 238, 288, 310, 348, 364, 378, 390, 400, 408, 414, 418
47: 172, 246, 280, 370, 442, 480, 496, 510, 522, 532, 540, 550, 552
53: 150, 240, 282, 360, 430, 492, 520, 570, 592, 612, 630, 646, 660, 672, 682, 690, 696, 700, 702

Since man 2 now knows the number it mens the sum is 17 and the product is 52.

So the answer is 3 and 14.


Brainteaser and math puzzle thread Quote
07-10-2011 , 07:27 PM
whoa youre like some kind of math wizard. very good
Brainteaser and math puzzle thread Quote
07-11-2011 , 03:41 AM
yeah very good.

You need to be quite smart to solve this problem, how smart must you be to INVENT this problem?
Brainteaser and math puzzle thread Quote
07-11-2011 , 05:23 AM
slow but steady...

Just to confirm that I'm not completely off base here, since if I accidentally erased one number I could be totally lost and wasting my time, the only sums I have left to consider are

Spoiler:
11, 17, 23, 27, 29, 35, 37, 41, 47, 51, 53, or 71-97


If the correct sum is any other number, I screwed up.

Am I still live to solve this?
Brainteaser and math puzzle thread Quote
07-11-2011 , 05:26 AM
Quote:
Originally Posted by ibavly
Am I still live to solve this?
yes
Brainteaser and math puzzle thread Quote
07-11-2011 , 05:43 AM
Quote:
Originally Posted by ibavly
Am I still live to solve this?
I believe you are and you will probably get the correct result, however

Spoiler:
If you are going through all the sums from bottom to top and is currently at 71, then I think there is one sum that shouldn't be there
Spoiler:
you probably included 51 because you took 34*17 to be different from 17*34. I don't think that's right.
Brainteaser and math puzzle thread Quote
07-11-2011 , 06:39 AM
No I actually just made a massive multiplication table and have been removing numbers.
Brainteaser and math puzzle thread Quote
07-11-2011 , 11:12 AM
Another hint for the card problem for anyone that is still interested:

Spoiler:
Instead of looking for a pattern as n increases, fix the number of cards and look for a pattern in the way the cards move in each iteration of the shuffling procedure.
Brainteaser and math puzzle thread Quote
07-11-2011 , 11:24 AM
Quote:
Originally Posted by mute
Spoiler:
Re the above discussion I found the following possible sums: 11, 17, 23, 27, 29, 35, 37, 41, 47, 53 (hope I didn't screw up somewhere here). Fortunately the higher candidate sums were pretty easy to eliminate. I feel, that there is probably a more elegant way to arrive at these numbers.

All the possible products from these numbers are:

11: 18, 24, 28, 30
17: 30, 42, 52, 60, 66, 70, 72
23: 42, 60, 76, 90, 102, 112, 120, 126, 130, 132
27: 50, 72, 92, 110, 126, 140, 152, 162, 170, 176, 180, 182
29: 54, 78, 100, 120, 138, 154, 168, 180, 190, 198, 204, 208, 210
35: 66, 96, 124, 150, 174, 196, 216, 234, 250, 264, 276, 286, 294, 300, 304, 306
37: 70, 102, 132, 160, 186, 210, 232, 252, 270, 286, 300, 312, 322, 330, 336, 340, 342
41: 78, 114, 148, 180, 210, 238, 264, 288, 310, 330, 348, 364, 378, 390, 400, 408, 414, 418, 420
47: 90, 132, 172, 210, 246, 280, 312, 342, 370, 396, 420, 442, 462, 480, 496, 510, 522, 532, 540, 546, 550, 552
53: 102, 150, 196, 240, 282, 322, 360, 396, 430, 462, 492, 520, 546, 570, 592, 612, 630, 646, 660, 672, 682, 690, 696, 700, 702

Since man 1 now knows the numbers, we can eliminate any product, that appears twice on the list, which gives:

11: 18, 24, 28
17: 52
23: 76, 112, 130
27: 50, 92, 110, 140, 152, 162, 170, 176, 182
29: 54, 100, 138, 154, 168, 190, 198, 204, 208
35: 96, 124, 150, 174, 216, 234, 250, 276, 294, 304, 306
37: 160, 186, 232, 252, 270, 336, 340
41: 114, 148, 238, 288, 310, 348, 364, 378, 390, 400, 408, 414, 418
47: 172, 246, 280, 370, 442, 480, 496, 510, 522, 532, 540, 550, 552
53: 150, 240, 282, 360, 430, 492, 520, 570, 592, 612, 630, 646, 660, 672, 682, 690, 696, 700, 702

Since man 2 now knows the number it mens the sum is 17 and the product is 52.

14 x 3 = 42
13 x 4 =52

So the answer is 4 and 13.

FYP

I solved it a similar way except I worked upwards since intuitively I expect the numbers to be small rather than large, so the multiplication table is a little ott or my intuition sucks and i ran good.



.
Brainteaser and math puzzle thread Quote
07-11-2011 , 11:27 AM
Quote:
Originally Posted by Aicirt
Another hint for the card problem for anyone that is still interested:

Spoiler:
Instead of looking for a pattern as n increases, fix the number of cards and look for a pattern in the way the cards move in each iteration of the shuffling procedure.
Spoiler:
That was pretty much how I was looking at it but never really got very far. There's obviously something about the way the cards move that causes any deck with 2^n cards to be sorted really quickly, which I'm sure would give me a big hint if I was better at solving this sort of thing.
Brainteaser and math puzzle thread Quote
07-11-2011 , 11:30 AM
Quote:
Originally Posted by Hackdeath
.



Quote:
Originally Posted by blankoblanco
whoa youre like some kind of math wizard

Last edited by mute; 07-11-2011 at 11:59 AM.
Brainteaser and math puzzle thread Quote
07-11-2011 , 12:07 PM
Quote:
Originally Posted by Gabethebabe
The biggest and baddest brain teaser I know I have posted like two times already in the past.

There are two men and two numbers A and B.
  • Man 1 knows the product of these numbers (A*B)
  • Man 2 knows the sum of both numbers (A+B)
  • A and B are whole numbers (natural, what do you call it)
  • A and B are >1 and their sum <100.
The following conversation develops.
  • Man 1: I see the product of the numbers, but I don´t know the numbers A or B
  • Man 2: I knew you´d say that
  • Man 1: In that case, now I know the numbers
  • Man 2: In that case, now I know the numbers too.

What are A and B?
The bolded statement cannot happen. Man 1 inferring the numbers from Man 2's statement does not leave Man 2 with 1 solution. ie if A=2, B=9 the first 3 lines will occur, but the 4th won't. Where am I going wrong? lol it made sense when i was solving it because i understood the composers intention but it no longer makes sense.
Brainteaser and math puzzle thread Quote
07-11-2011 , 12:29 PM
Quote:
Originally Posted by Hackdeath
The bolded statement cannot happen. Man 1 inferring the numbers from Man 2's statement does not leave Man 2 with 1 solution. ie if A=2, B=9 the first 3 lines will occur, but the 4th won't. Where am I going wrong? lol it made sense when i was solving it because i understood the composers intention but it no longer makes sense.
I think I've just solved it after managing to resist looking at mute's answers. I'll go through my thought process below.

Spoiler:
Ok, so the second statement means that each combination of two numbers that could make the sum have a non-unique product (eg 2*9 = 18, 18 could also be made as 3*6). This means that any number that can be made by summing two primes can't be the sum of A and B. This leaves the possible numbers as:
11 17 23 27 29 35 37 41 47 51 53 57 59 65 67 71 77 79 83 87 89 93 95 97

The third statement means that the product of A and B must be unique among the possible products that could be made by multiplying any combination that could make the sums above. Obviously there are a lot of possibilities for this so to make it easy I just started from the bottom, so for a sum of 11 you'd get: 2*9 = 18, 3*8 = 24, 4*7 = 28, which can't be made with any other sum, and 5*6 = 30, which can (2*15).

The fourth statement means that the product that was found in the third statement must be the only possible such product for that specific sum. This rules out the sum being 11, since there are 3 possibilities as shown above. However the next possible sum, 17, does have just a single product that satisfies this statement, 4*13 = 52 (the other possible products are: 2*15 = 30 (5*6), 3*14 = 42 (2*21), 5*12 = 60 (3*20), 6*11 = 66 (2*33), 7*10 = 70 (2*35), 8*9 = 72 (3*24)). Therefore A and B must be 4 and 13.

I haven't actually proved that there is no other sum that has exactly 1 unique product but if there were then the problem wouldn't have a definite solution and so I think it's fine to not actually prove it for the sake of solving the problem.

Edit: I clearly didn't exhaustively go through the possible sums at the start. I was certain about the lower bunch though so fortunately it wasn't an issue.

Last edited by Willd; 07-11-2011 at 12:36 PM.
Brainteaser and math puzzle thread Quote
07-11-2011 , 12:33 PM
Quote:
Originally Posted by Hackdeath
The bolded statement cannot happen. Man 1 inferring the numbers from Man 2's statement does not leave Man 2 with 1 solution. ie if A=2, B=9 the first 3 lines will occur, but the 4th won't. Where am I going wrong? lol it made sense when i was solving it because i understood the composers intention but it no longer makes sense.
I'm not following you
Spoiler:
man 2 knows, that the sum is 17. That's the only sum, that allows him to know what the numbers are. It is exactly because the fourth line occurs, that we know this.
Brainteaser and math puzzle thread Quote
07-11-2011 , 01:47 PM
Spoiler:
Quote:
Originally Posted by mute
I'm not following you
Spoiler:
man 2 knows, that the sum is 17. That's the only sum, that allows him to know what the numbers are. It is exactly because the fourth line occurs, that we know this.
my turn, good explanation. I have no idea why this happens to me, I figure something out and then miss out a detail and it no longer makes sense way too often.
Brainteaser and math puzzle thread Quote
07-11-2011 , 01:48 PM
All right here's my teaser, sick props if you get the 2nd part.

There are 2 players and a uniform 30 sided die. Player 1 picks a number, and then player 2 picks a number. Whoever's number is closest to the number rolled wins $(rolled number). e.g if 1 picks 16 and 2 picks 15, and a 18 is rolled, 1 wins $18. Do you go 1st or 2nd and what number do you pick? Easy enough to do with brute force, but are there any shortcuts/elegant solutions?

What about with an n sided die. What do you pick and why?
Brainteaser and math puzzle thread Quote
07-11-2011 , 01:59 PM
Quote:
Originally Posted by Hackdeath
All right here's my teaser, sick props if you get the 2nd part.

There are 2 players and a uniform 30 sided die. Player 1 picks a number, and then player 2 picks a number. Whoever's number is closest to the number rolled wins $(rolled number). e.g if 1 picks 16 and 2 picks 15, and a 18 is rolled, 1 wins $18. Do you go 1st or 2nd and what number do you pick? Easy enough to do with brute force, but are there any shortcuts/elegant solutions?

What about with an n sided die. What do you pick and why?
Spoiler:
m=1, m->30, sum of series 30 = (30+1)(30)/2 = 465

so 232.5 is halfway

30+29+28+27+26+25+24+23 =212

212 + 22 = 234

So you go 2nd. If he picks 23 or higher, you pick 1 less than him. If he picks 22 or lower you pick one more than him

workin on part 2
Brainteaser and math puzzle thread Quote
07-11-2011 , 02:14 PM
Quote:
Originally Posted by Hackdeath
All right here's my teaser, sick props if you get the 2nd part.

There are 2 players and a uniform 30 sided die. Player 1 picks a number, and then player 2 picks a number. Whoever's number is closest to the number rolled wins $(rolled number). e.g if 1 picks 16 and 2 picks 15, and a 18 is rolled, 1 wins $18. Do you go 1st or 2nd and what number do you pick? Easy enough to do with brute force, but are there any shortcuts/elegant solutions?

What about with an n sided die. What do you pick and why?
Spoiler:
reminds me of playing games in class when i was a kid. if the class were split into two teams, the teacher would sometimes say "ok each team pick a number 1-10, whoever is closest gets to go first."

i would never want to answer first. sometimes the team that picked first would go with a lucky number like 7 or whatever, and i would snap answer 6. or if they said 2 id go with three obviously.

so my answer is go second, and choose 1 less or 1 more than the other guy, depending if he picks something high or low. if he picks the exact median, go 1 higher for sure though because you would win more money

of course, this is likely wrong since "blah blah something about maximizing $EV" but if you are just straight up trying to win, i dont see why it isnt the way to go.

if you are forced to go first though, i guess you'd have to take the median of the numbers and just hope the other guy picks something ridiculous.

mostly the same answer imo for an n-sided die.


now somebody correct me please
Brainteaser and math puzzle thread Quote
07-11-2011 , 02:57 PM
Quote:
Originally Posted by Hackdeath
All right here's my teaser, sick props if you get the 2nd part.

There are 2 players and a uniform 30 sided die. Player 1 picks a number, and then player 2 picks a number. Whoever's number is closest to the number rolled wins $(rolled number). e.g if 1 picks 16 and 2 picks 15, and a 18 is rolled, 1 wins $18. Do you go 1st or 2nd and what number do you pick? Easy enough to do with brute force, but are there any shortcuts/elegant solutions?

What about with an n sided die. What do you pick and why?
Spoiler:
Ok my solution is ugly but I'm pretty sure it's correct. The total number of $ from each possible role for an n-sided die is:
1+2+...+n = (n^2+n)/2
In order to +EV at the game you need to choose the number that splits this in half, lets call this x. This results in:
(x^2+x)/2 = (n^2+n)/4
Then I do a bunch of bad maths (I simplified by completing the square) and the end result is this ugly thing:
x = sqrt((n+0.5)^2/2 + 0.125) - 0.5
Putting 30 into the formula for n gives x = 21.06 and so to maximise your EV you round this up and choose 22. That way you have 234/465 if he chooses 21 and 253/465 if he chooses 23, greater than half in both cases.
Brainteaser and math puzzle thread Quote
07-11-2011 , 03:02 PM
Quote:
Originally Posted by Aksdal
Spoiler:
m=1, m->30, sum of series 30 = (30+1)(30)/2 = 465

so 232.5 is halfway

30+29+28+27+26+25+24+23 =212

212 + 22 = 234

So you go 2nd. If he picks 23 or higher, you pick 1 less than him. If he picks 22 or lower you pick one more than him

workin on part 2
Spoiler:
I'm pretty sure this is wrong and going 1st is best. If I go first and pick 22 and you pick 23 then you I win 253 (1-22) vs your 212 (23-30).
Brainteaser and math puzzle thread Quote
07-11-2011 , 03:24 PM
Quote:
Originally Posted by Aksdal
Spoiler:
m=1, m->30, sum of series 30 = (30+1)(30)/2 = 465

so 232.5 is halfway

30+29+28+27+26+25+24+23 =212

212 + 22 = 234

So you go 2nd. If he picks 23 or higher, you pick 1 less than him. If he picks 22 or lower you pick one more than him

workin on part 2
Spoiler:
This is incorrect.


Quote:
Originally Posted by His Boy Elroy
Spoiler:
reminds me of playing games in class when i was a kid. if the class were split into two teams, the teacher would sometimes say "ok each team pick a number 1-10, whoever is closest gets to go first."

i would never want to answer first. sometimes the team that picked first would go with a lucky number like 7 or whatever, and i would snap answer 6. or if they said 2 id go with three obviously.

so my answer is go second, and choose 1 less or 1 more than the other guy, depending if he picks something high or low. if he picks the exact median, go 1 higher for sure though because you would win more money

of course, this is likely wrong since "blah blah something about maximizing $EV" but if you are just straight up trying to win, i dont see why it isnt the way to go.

if you are forced to go first though, i guess you'd have to take the median of the numbers and just hope the other guy picks something ridiculous.

mostly the same answer imo for an n-sided die.


now somebody correct me please
Spoiler:
We used to play games like that in school as well! I could never understand why people wouldn't choose 5 or 6. Your strategy works well vs average opponents, but pretend both players are experts in game theory.


Quote:
Originally Posted by Willd
Spoiler:
Ok my solution is ugly but I'm pretty sure it's correct. The total number of $ from each possible roll for an n-sided die is:
1+2+...+n = (n^2+n)/2
In order to +EV at the game you need to choose the number that splits this in half, lets call this x. This results in:
(x^2+x)/2 = (n^2+n)/4
Then I do a bunch of bad maths (I simplified by completing the square) and the end result is this ugly thing:
x = sqrt((n+0.5)^2/2 + 0.125) - 0.5
Putting 30 into the formula for n gives x = 21.06 and so to maximise your EV you round this up and choose 22. That way you have 234/465 if he chooses 21 and 253/465 if he chooses 23, greater than half in both cases.

Spoiler:
Very good, take a bow! Well explained as well I finally understand the derivation of the solution. I actually posted this earlier in the probability forum, solution and further insight is near end of thread by Siegmund. http://forumserver.twoplustwo.com/25.../#post24302925
Brainteaser and math puzzle thread Quote
07-11-2011 , 03:57 PM
Here follows the formula for ANY number.

Spoiler:
This does not look difficult too calculate for any n.

1+2+3...+n= (n+1)*n/2.
For any n the best number you can pick is x, for which:
1+2+...+x is as close as possible to (x+1) + (x+2)+...+n

So we calculate the number x for which these two are equal.
(x+1)*x/2 (sum of left part) is equal to (n+1)*n/2 - (x+1)*x/2 (sum of right part)

From that follows:
(n+1)*n/2 - x*(x+1)/2 -x*(x+1)/2 = (n+1)*n/2 - x*(x+1)=0

or
(n+1)*n/2 = x*(x+1)

Now we know that x*(x+1)=x^2+x = (x+0.5)^2-0.25

So
(x+0.5)^2-0.25=(n+1)*n/2
(x+0.5)^2 = (n+1)*n/2 + 0.25
(x+0.5)= square root [(n+1)*n/2 + 0.25]
x=square root [(n+1)*n/2 + 0.25]-0.5

That is the optimum for any n.

For 30 follows sqrt(465.25) - 0.5 = 21.06
Brainteaser and math puzzle thread Quote
07-11-2011 , 04:38 PM
Quote:
Originally Posted by Willd
Spoiler:
I'm pretty sure this is wrong and going 1st is best. If I go first and pick 22 and you pick 23 then you I win 253 (1-22) vs your 212 (23-30).
I forgot that fractions exist
Brainteaser and math puzzle thread Quote
07-11-2011 , 05:31 PM
The answer I got for gabe's riddle:

Spoiler:
4,13


Not much of a mathematical feat, but if I'm right I think it would be pretty impressive that I managed to delete over 9000 numbers without making a single mistake
Brainteaser and math puzzle thread Quote

      
m