Any demoscener from Mensa?
category: residue [glöplog]
/without
i've got a test for you:
How do you get a life?
How do you get a life?
there is a hidden block above after the fifth green pipe.
Now I have no life. Maths/coding/films is the best way for me to escape from reality... you know ex-girlfriends and that :P The same effect than alcohol but cheaper and less dangerous for physical health (but maybe worse for mental one).
And about how to get a life... well, what I do is just to wait for a while until I'm fine enough to search for another couple. Then I start my social life again, know new people and you know, special people appears time to time. Thats all. My method TM.
And about how to get a life... well, what I do is just to wait for a while until I'm fine enough to search for another couple. Then I start my social life again, know new people and you know, special people appears time to time. Thats all. My method TM.
New task:
We're looking for two numbers. Everybody knows that they are two different numbers, that they are integers, that they are greater than 1, and that person 1 knows only the sum of the two numbers, while person 2 knows only the product of the two numbers. Now the following dialogue happens:
1: 'I don't know either number.'
2: 'Me neither.'
1: 'Well, now I know both numbers!'
2: 'So do I!'
Assume that both persons are extremely good at logical thinking. So what are the numbers?
We're looking for two numbers. Everybody knows that they are two different numbers, that they are integers, that they are greater than 1, and that person 1 knows only the sum of the two numbers, while person 2 knows only the product of the two numbers. Now the following dialogue happens:
1: 'I don't know either number.'
2: 'Me neither.'
1: 'Well, now I know both numbers!'
2: 'So do I!'
Assume that both persons are extremely good at logical thinking. So what are the numbers?
texel: Seems like you've already had a life at least ;-)
I suppose 4 and 6, but I've done it fast and I'm not sure if it is correct... but Adok will tell me :D
2 and 9?
2 and 9 = 11
3 and 8 = 11
4 and 7 = 11
5 and 6 = 11
you can't delete these in the first step.
2*9=18
6*3=18
you can't detele these in the second step.
So... 2 and 9 should not be the solution I think
3 and 8 = 11
4 and 7 = 11
5 and 6 = 11
you can't delete these in the first step.
2*9=18
6*3=18
you can't detele these in the second step.
So... 2 and 9 should not be the solution I think
texel/doom: please note that it's about arbitrarily high numbers this time.
(not competing because i already did that one years ago too :)
(not competing because i already did that one years ago too :)
I know kb_, but if I have had no errors, my solution was valid I think
and anyway, the solution could not be a very big number
texel: 4 and 6 is correct, well done.
I told you already, my guesses are better than proof.
It's about thinking with your gut. \o/
It's about thinking with your gut. \o/
The solution could be read in my blog from 15 March 2005:
Let's check out the dialogue: Person 1 knows the sum s, but isn't able to deduce the two numbers from it. So there are at least two possibilities to compute the sum. Thus the possibilities 2+3 and 2+4 are obsolete.
Person 2 knows the product p, but isn't able to deduce the two numbers from it. So there are at least two possibilities to compute the product. From this follows:
1. At least one of the two numbers is not a prime number.
2. If one of the two numbers - let's call it n - is a prime number, the other number must not be n^2.
3. If one of the two numbers - let's call it n - is a prime number, the other number must not be n^3.
After both persons announce that they don't know the numbers, person 1 is able to deduce the numbers.
As person 1 is extremely good at logical thinking, he/she is aware of the facts presented above. So the fact that person 1 is now able to deduce the numbers means that all possibilities to compute s except one involve either two prime numbers or one prime number n and n^2 or one prime number n and n^3. There are only the following possible values for s:
Step 1. Just one possibility not involving two prime numbers:
7=(2+5)=3+4
8=2+6=(3+5)
There are no other possibilities because for any s > 8 there are at least two ways to compute the number as the sum of two non-prime numbers. Proof for all s != 12: s - 4 > 0 and s - 4 != 4 and s - 6 > 0 and s - 6 != 6. It's also easy to prove that it applies for s = 12.
Step 2. Just one possibility not involving two prime numbers or a prime number n and n^2:
7=(2+5)=3+4
8=2+6=(3+5)
There are no other possibilities for the following reasons: 2+4 is not possible (see above), and for any s = n + n^2 with n being a prime number and n >= 3 it's possible to show that apart from the combination of a prime number n and n^2, there are at least two further combinations in which at least one of the two numbers is not a prime number.
Step 3. Just one possibility not involving two prime numbers or a prime number n and n^2 or a prime number n and n^3:
7=(2+5)=3+4
8=2+6=(3+5)
10=(2+8)=(3+7)=4+6
There are no other possibilities. In analogy to the previous case it's possible to show that for s = n + n^3 with a being a prime number and n >= 3 there are at least two further combinations involving at least one non-prime number.
So when person 1 says that he/she has now deduced the two numbers, it means that they are either 3 and 4, 2 and 6, or 4 and 6.
Person 2 has done all the reasoning so far himself/herself and says that he/she has now been able to deduce the numbers. So it could not have been the pairs 3 and 4 or 2 and 6 because their products are equal. Therefore the correct solution is: 4 and 6.
Let's check out the dialogue: Person 1 knows the sum s, but isn't able to deduce the two numbers from it. So there are at least two possibilities to compute the sum. Thus the possibilities 2+3 and 2+4 are obsolete.
Person 2 knows the product p, but isn't able to deduce the two numbers from it. So there are at least two possibilities to compute the product. From this follows:
1. At least one of the two numbers is not a prime number.
2. If one of the two numbers - let's call it n - is a prime number, the other number must not be n^2.
3. If one of the two numbers - let's call it n - is a prime number, the other number must not be n^3.
After both persons announce that they don't know the numbers, person 1 is able to deduce the numbers.
As person 1 is extremely good at logical thinking, he/she is aware of the facts presented above. So the fact that person 1 is now able to deduce the numbers means that all possibilities to compute s except one involve either two prime numbers or one prime number n and n^2 or one prime number n and n^3. There are only the following possible values for s:
Step 1. Just one possibility not involving two prime numbers:
7=(2+5)=3+4
8=2+6=(3+5)
There are no other possibilities because for any s > 8 there are at least two ways to compute the number as the sum of two non-prime numbers. Proof for all s != 12: s - 4 > 0 and s - 4 != 4 and s - 6 > 0 and s - 6 != 6. It's also easy to prove that it applies for s = 12.
Step 2. Just one possibility not involving two prime numbers or a prime number n and n^2:
7=(2+5)=3+4
8=2+6=(3+5)
There are no other possibilities for the following reasons: 2+4 is not possible (see above), and for any s = n + n^2 with n being a prime number and n >= 3 it's possible to show that apart from the combination of a prime number n and n^2, there are at least two further combinations in which at least one of the two numbers is not a prime number.
Step 3. Just one possibility not involving two prime numbers or a prime number n and n^2 or a prime number n and n^3:
7=(2+5)=3+4
8=2+6=(3+5)
10=(2+8)=(3+7)=4+6
There are no other possibilities. In analogy to the previous case it's possible to show that for s = n + n^3 with a being a prime number and n >= 3 there are at least two further combinations involving at least one non-prime number.
So when person 1 says that he/she has now deduced the two numbers, it means that they are either 3 and 4, 2 and 6, or 4 and 6.
Person 2 has done all the reasoning so far himself/herself and says that he/she has now been able to deduce the numbers. So it could not have been the pairs 3 and 4 or 2 and 6 because their products are equal. Therefore the correct solution is: 4 and 6.
You have a blog? o_O
Ed Pegg Jr. is my hero now. \o/ But, before you judge him too harshly, note this:
I will now go study the mathematicalness of stuff. First place I'll look is the fridge. Last time I ate, I think I saw some maths in there. I'll let you know when I discover something interesting.
Quote:
References:
Adok, editor. Hugi Special Edition #1: Coding Digest. http://www.pouet.net/prod.php?which=10807.
I will now go study the mathematicalness of stuff. First place I'll look is the fridge. Last time I ate, I think I saw some maths in there. I'll let you know when I discover something interesting.
Doom: Do you want to say that all the crap he writes is my fault? :-)
For this problem first you have to be able to think this is a cow. This is the harder part of the problem. It is a cow looking at the left. This cow is obviously happy because its tail points to the up.
Moving only 2 sticks you have to make it look to the right and continue to be happy.
Are we allowed to move them by just changing their position or can we rotate them too?
Code:
______
| |\
\|____|/
/\ /\
Adok: Your cow isn't very happy.
And bbcode isn't my friend apparently.
And bbcode isn't my friend apparently.