FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Fun Math Puzzle





Afaceinthematrix
Here is a fun math puzzle. It's moderately difficult; it took me a couple of hours to figure out. If you're interested in math, or like these types of puzzles, then here it is...

The Story:
King Bozo is hosting a party and he would like to play a game. He sets everyone up at a round table and he walks around eliminating every third person and the last person wins. So if one person plays, person 1 obviously wins because he's the only one there. If two people play, then one will win because it goes 2, 1, 2 (eliminated), one survives. If three people play, person 3 will win because it goes 2, 3, 1 (eliminated) 2, 3, 2 (eliminated). So basically it starts on the next person, and every third person is eliminated. To make it easier, I'll simply post the winning number for each amount of people that play up to 20.

1 1
2 1
3 3
4 1
5 3
6 5
7 7
8 1
9 3
10 5
11 7
12 9
13 11
14 13
15 15
16 1
17 3
18 5
19 7
20 9
.
.
.
It can go on forever.

The Problem:
Find an equation for which you can insert the amount of players playing (for x), and it will produce the winning number. I found this problem a while back and decided to post it. So basically you just need to find an equation for those set of numbers. If you put 20 in for x, the equation will produce 9, if you insert 14 in for x, you will get 13, if you insert 16 in for x you will get 1, etc.

Good luck! I'll post the answer in a few days if people are interested, and no one gets it. It took me a couple of hours to get it.
dlseven777
Very interesting problem. I am attempting it now.
dlseven777
judging from the way you are eliminating i think for 4 people it is wrong.

start with 1, 2, 3, 4
2, 3, 4 < eliminated
1, 2, 3 < eliminated
1, 2, 1 < eliminated

leaving 2.

Am I doing this incorrectly?
poly
I dont really get it neither dont u start with 1?
creezalird
can't u give more hints...hehe..still can't figure out the equation...anyway..I have math examination tomorrow..but still working on this problem..hehe
fx-trading-education
I don't know if you would call that an equation but the solution is

1 + (x - (lower power of 2) )* 2

lower power of 2 being 16 if x =20 , 32 if x = 41, 2 if x= 2...

Then for instance for 20 you get 1 + (20 -16) * 2 = 9
Afaceinthematrix
dlseven777 wrote:
judging from the way you are eliminating i think for 4 people it is wrong.

start with 1, 2, 3, 4
2, 3, 4 < eliminated
1, 2, 3 < eliminated
1, 2, 1 < eliminated

leaving 2.

Am I doing this incorrectly?



Hmmm.... I must have posted the game part incorrectly. My friend showed me this puzzle a while back, but he never explained the "game part" properly... he just said that a game is played where every couple people get eliminated around a table and explained it a little more, then he said that he'd just give me the numbers instead of having to explain all the rules of the game... so i know that without a doubt the numbers are correct, but the game must be wrong.... i was just guessing that every third person got eliminated because it worked for the first few... So don't pay attention to the game part and just look at the numbers...
Afaceinthematrix
creezalird wrote:
can't u give more hints...hehe..still can't figure out the equation...anyway..I have math examination tomorrow..but still working on this problem..hehe


Ok, there are some clues.... look at the numbers...

1 1

2 1
3 3

4 1
5 3
6 5
7 7

8 1
9 3
10 5
11 7
12 9
13 11
14 13
15 15

16 1
17 3
18 5
19 7
20 9
21 11
22 13
23 15
24 17
25 19
26 21
27 23
28 25
29 27
30 29
31 31

32 1
.
.
.

Now everytime it got to the number 1, I pushed enter... separating the groups... so think of it this way... i put it into the next group everytime the result ended up being the number 1. and each group doubles from the previous one... one more thing you need to look at is that the group starts over every 2^x.... put all those together and you can come up with one equation that will work for all numbers.... Also notice that each group starts with one, and increases by 2 until you get to the next group....

All of these things are things that I noticed when I was trying to figure out this problem. If no one gets the equation by Sunday, I'll post it.
Afaceinthematrix
fx-trading-education wrote:
I don't know if you would call that an equation but the solution is

1 + (x - (lower power of 2) )* 2

lower power of 2 being 16 if x =20 , 32 if x = 41, 2 if x= 2...

Then for instance for 20 you get 1 + (20 -16) * 2 = 9



You're on the right track.... but can you think of an equation that gets you the number? A way to get the lower power of 2...

For instance let's say that these were the numbers
1 2
2 4
3 6
4 8

Then the equation would equal y=2x, so the equation for these numbers will look something like that... y will equal something...
Afaceinthematrix
Okay, I'll post the answer. I only know of one equation that works, and it's the one I figured out when I solved this puzzle... I was hoping someone else would figure out another way to do it, that's why I posted it but no one else figured it out. Oh well. I'll have to try and see if I can figure out another way. To figure out the answer, I first separated the numbers into groups like this:

1 1

2 1
3 3

4 1
5 3
6 5
7 7

8 1
9 3
10 5
11 7
12 9
13 11
14 13
15 15

16 1
17 3
18 5
19 7
20 9
21 11
22 13
23 15
24 17
25 19
26 21
27 23
28 25
29 27
30 29
31 31

32 1
.
.
.

Every time Y equals one, I would start over. Now notice that the first number in each group is a power of 2, and the values increase by 2 until it starts over again. Now the next thing you have to notice is that his equation will work in each individual group:
y = 2(x-first number in group) + 1

So when I noticed this, I began concentrating on a way to get the first number of each group. Then I remembered that the first number of each group will be a power of 2. So 1 is 2^0, 2 is 2^1, 4 is 2^2, 8 is 2^3, etc.

So that modified my new equation a little more to:
y=2(x-2^(something to get the group number)) + 1

Now there is just one part left of the problem, and that is finding an equation to put in on the exponent that will produce 0 if 1 is put in, 1 if 2 is put in, 2 if 4-7 is put in, 3 if 8-15 is put in, 4 if 16-31 is put in, etc.

This is where most people got stuck, even my math teacher. The idea is to use a logarithm, and the greatest integer function. The greatest integer function will round every number down to the nearest whole number. For instance: [|4.3|] will equal 4.

Now if you use Log2x (log base 2 of X, a little hard to type that), it will give you the correct number, with a decimal after it. So you simply have to take away the decimal and the problem is solved.)

The Answer:
Y = 2(x-2^[|log2x|]) + 1

Does anyone see another way to do this? I want to figure out a way to do it without using the greatest integer function.
fx-trading-education
I do not think that your equation is correct because as far as I know, the sign you use "| |" is to get the absolute value and not the integer part.
Then maybe Int (log2x) would be more appropriate even if "Int()" is not really a mathematical operator.
That's why I prefered to stick with my simple "lower power of 2" that I think everybody understand.
Afaceinthematrix
fx-trading-education wrote:
I do not think that your equation is correct because as far as I know, the sign you use "| |" is to get the absolute value and not the integer part.
Then maybe Int (log2x) would be more appropriate even if "Int()" is not really a mathematical operator.
That's why I prefered to stick with my simple "lower power of 2" that I think everybody understand.


Yes, it is correct [|number|] is called the greatest integer function. It is a term that was introduced to me in calculus. I just put || after the brackets so that people would be able to tell the difference between brackets and the greatest integer function, and that is what the teacher did so that we wouldn't confuse the greatest integer function and brackets (he's put a little line after it)...
http://mathforum.org/workshops/sum98/participants/glazer/phone/great.html

There is a link saying how it works, and your equation really isn't an equation, because you can't just plug in a number for x and have it do the rest....
fx-trading-education
Afaceinthematrix wrote:
and that is what the teacher did so that we wouldn't confuse the greatest integer function and brackets (he's put a little line after it)...


ah, if the teacher did so, then, let's respect the teacher...

You are right;

I didn't take the time to find if there was a "sign" for the Floor function as I had only a short time to stay on the forum and it is a long time I left school, so no nice teacher.
Simulator
Fun??? Think
Afaceinthematrix
Simulator wrote:
Fun??? :-k


Oh yes. Math is extremely fun. Math and science, in my opinion, are the only two subjects that really matter. Math is an art form, which is what most people don't agree with. I spent 2-3 hours on this puzzle and when I finally figured it out, I was so excited. I was one of only two people to figure it out. And as I was showing different teachers and students at school, most of them were asking me what the point was of figuring this out. And I told them because it's art. Paintings and sculptures aren't really practical (except for money, I guess) but people still love them. The same was with this. Math is fun and math is art.
Related topics
Favourite game? (OFFICIAL THREAD)
The President's Puzzle
Politicaly incorrect blonde jokes
Hide Drives and Partitions
Da Vinci Code
Do you enjoy solving problems(puzzle)?
Little Davie - Just for Fun :
Chocolate Math...
20 for solve a fun puzzle
Sudoku: a challenge for your brain; beyond computers?
Software For Your Kids
Math Fun: Study = Fail
Rubik's Cube
Fun Talks
Reply to topic    Frihost Forum Index -> Lifestyle and News -> Jobs and Learning

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.