(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
06-01-24 07:14 PM
0 users currently in Brain Teasers.
Acmlm's Board - I3 Archive - Brain Teasers - ||bass' Impossible Yet Possible Quiz - Question 1 (Peg Game)
  
User name:
Password:
Reply:
 
Options: - -
Quik-Attach:
Preview for more options

Max size 1.00 MB, types: png, gif, jpg, txt, zip, rar, tar, gz, 7z, ace, mp3, ogg, mid, ips, bz2, lzh, psd

UserPost
Squash Monster
Posts: 18/296
||bass wanted a strategy that would be gaurinteed. He didn't care which player would be the one able to use it.

But it was easilly possible to misread as wanting a strategy that would work for both players.


Just wanted to save you two pages of back and forth confusion.
Danielle
Posts: 316/6737
Well that's what I said jesus christ >8(
Alastor
Posts: 287/8204
Which is why YOU GO FIRST. If you read it, it doesn't HAVE to work for both players. "Find a strategy guarinteed to win. (It may be for either player.)"
Danielle
Posts: 312/6737
Well if they go first.. isn't there always one of each letter available to them no mattter what you do?
Xkeeper
Posts: 254/5653
Originally posted by Danielle
How can either player win? I don't see how you can use the same strategy if you don't go first.

It just says to pick one and run with it; you aren't forced to use a player that doesn't go first.
Danielle
Posts: 308/6737
How can either player win? I don't see how you can use the same strategy if you don't go first.
||bass
Posts: 10/594
You people need to learn how to read. The question explicitly states that the strategy may be for either player. In this case, it was the first player.
NSNick
Posts: 108/2228
A ha. Nice.
Danielle
Posts: 285/6737
Originally posted by mcw
what if he picks a in there and you have to be b? =p

That's the catch. You have to go first.
emcee
Posts: 33/867
EDIT: Ah, crap, I spent so long trying fix the color you posted the answer while I was typing. I thought I needed closing tags.



Ok, I get it.

Taking your example:

1 8 5 4 7 9 6 3 2 0

Add up ever other number starting with the first one.

1+5+7+6+2=21

Now starting with the second:

8+4+9+3+0=24

The total of these is more, so those are the ones you want.

Here they are color coded:

1854796320

You want the blue ones, so you take the zero:

185479632

They now have to take a red one. It doesn't matter which they take, but lets say they take the 2:

18547963

You of course take the blue:

1854796

They must take a red:

185479

You take a blue:

18547

They take a red:

1854

You a blue:

185

A red for them:

18

You take the last blue and they're left with the red, as long as you get all blues you win because they add up to more.

For clarification, the color were for demostration, the "blues" are simply in the group that adds up to the most, and the "reds" are the others.
jeff
Posts: 11/213
what if he picks a in there and you have to be b? =p
||bass
Posts: 9/594

Begin by seperating the series into sets A and B, alternating as shown.
Sum the values of all the integers in each set.
In this example, A is 25 and B is 20.
Clearly you want to have the elements in set A.
Draw from set A (the left).
Your opponant is now forced to draw from set B.
When your opponant draws, he opens up another element of set A for you to draw.
Draw the open element from set A.
Repeat this process until all elements have been drawn.

This method is guarinteed to win 100% of the time for all arrangements of pegs.
Deleted User
Posts: 138/-7750
I can't wait to hear the answer on this, ||bass has me all excited. D:
||bass
Posts: 8/594
Hint 2: The "correct" soloution looks at all the pegs before the game starts, and then ignores them for the rest of the game.
Kattwah
Posts: 287/3349
I guess its time for me to throw out a guess here...

Take only the pegs with odd values?

Thats a simple solution that works out either way (However, it isnt 100% if they take an odd number.)

Heres a question, does it matter who goes first or not?

Anyways, explaining my theory with a random example

1 8 5 4 7 9 6 3 2 0

You take 1, he takes 8 (1; 8)
You take 5, he takes 4 (6; 12)
You take 7, he takes 2 (13; 14)
You take 9, he takes 6 (22; 20)
You take 3, he takes 0 (25; 20)

You win.

However, here is a problem that presents itself with a "Not odd every turn" situation...

1 8 6 4 7 9 5 3 2 0

So... I just want to know if Im close or not right now
Light PKMN
Posts: 14/51
left peg right peg left peg.....ect

But im wrong
||bass
Posts: 7/594
Hint time: The correct answer will work for any even number of pegs.
||bass
Posts: 6/594
Your algo plays a SMART strategy but not an unbeatable one. One could construct very specific arrangements of pegs that would defeat this algorithim. There is an answer that works for 100% of all possible arrangements of pegs and it's a MUCH simpler algo, you could do it in under 10 lines easily.
NSNick
Posts: 97/2228
For some reason, I couldn't think in straight algebra, so here's a C code thing I think should work:

function char Which_To_Choose (
int a,
int b,
int c,
int d,
)
/*!
requires
[a, b, c, and d are the numbers of the pegs,
where a is the leftmost, b is the second to left,
c is the second to right, and d is the rightmost]
!*/
{
object int ares, dres, hidb, hiac;
if (d > b){
hidb = d;
}
else{
hidb = b;
}
if (a > c){
hiac = a;
}
else{
hiac = c;
}
takea = a - hidb;
taked = d - hiac;
if (takea > taked){
return 'a';
}
return 'd';
||bass
Posts: 5/594
People keep asking me how this is possible if you can't see the values of the pegs. You CAN see them. Read the damn question people. I NEVER said you can't see the values of the pegs. You can.
This is a long thread. Click here to view it.
Acmlm's Board - I3 Archive - Brain Teasers - ||bass' Impossible Yet Possible Quiz - Question 1 (Peg Game)


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.013 seconds; used 365.73 kB (max 420.35 kB)