(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
05-18-24 02:45 AM
0 users currently in Brain Teasers.
Acmlm's Board - I3 Archive - Brain Teasers - ||bass' Impossible Yet Possible Quiz - Question 1 (Peg Game) New poll | |
Pages: 1 2Add to favorites | Next newer thread | Next older thread
User Post
||bass
Administrator








Since: 11-17-05
From: Salem, Connecticut

Last post: 6299 days
Last view: 6298 days
Posted on 11-30-05 10:51 PM Link | Quote
A sequence of 10 pegs (or coins) is placed in a single row randomly e.g., 5 1 3 7 0 4 2 9 8 6. Each peg has a value between 0 and 9. There is a peg for each value. Each player removes a peg from either the left or the right end of the row. After all pegs have been collected (each player takes 5) the winner is the one that collected the pegs with the highest total value.

Find a strategy guarinteed to win. (It may be for either player.) (There is an answer.)
That Break Guy



 





Since: 11-23-05
From: I'm currently over there

Last post: 6742 days
Last view: 6742 days
Posted on 12-01-05 08:03 AM Link | Quote
Basically you take the pegs that reveal the lowest possible gain while also giving you more points in the end, that way your opponent is pretty much forced to take the other side, which will give you the peg you didn't want your opponent to get. Of course, with the numbers provided, you're better off starting with the 6, rather than the 5.

The flaw in this logic is that if you don't know the values, then it's impossible to know which pegs to pick to guarantee a win.
||bass
Administrator








Since: 11-17-05
From: Salem, Connecticut

Last post: 6299 days
Last view: 6298 days
Posted on 12-01-05 12:40 PM Link | Quote
Originally posted by That Break Guy
Basically you take the pegs that reveal the lowest possible gain while also giving you more points in the end, that way your opponent is pretty much forced to take the other side, which will give you the peg you didn't want your opponent to get. Of course, with the numbers provided, you're better off starting with the 6, rather than the 5.

The flaw in this logic is that if you don't know the values, then it's impossible to know which pegs to pick to guarantee a win.
That method for solving is an exponential angorythim. There is no way you could formulate that strategy for ALL possible games in a single post. The winning strategy has to be a linear algorithim.

Furthermore, I don't think you seem to understand the rules of the game. On a player's turn, he can pick from either side. The side you pick on one turn doesn't have to be the same side you pick on the next turn.

The "correct" answer can be done on a single sheet of paper, even if you incresed the number of pegs to 100 pegs.

PS: Your answer is also wrong.


(edited by ||bass on 12-01-05 11:41 AM)
(edited by ||bass on 12-01-05 11:45 AM)
(edited by ||bass on 12-01-05 12:15 PM)
||bass
Administrator








Since: 11-17-05
From: Salem, Connecticut

Last post: 6299 days
Last view: 6298 days
Posted on 12-01-05 10:14 PM Link | Quote
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.
NSNick

Gohma
IF ALL ELSE
FAILS USE FIRE
BOOZE








Since: 11-17-05
From:

Last post: 6300 days
Last view: 6300 days
Skype
Posted on 12-02-05 12:04 AM Link | Quote
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
Administrator








Since: 11-17-05
From: Salem, Connecticut

Last post: 6299 days
Last view: 6298 days
Posted on 12-02-05 12:09 AM Link | Quote
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.
||bass
Administrator








Since: 11-17-05
From: Salem, Connecticut

Last post: 6299 days
Last view: 6298 days
Posted on 12-02-05 05:11 PM Link | Quote
Hint time: The correct answer will work for any even number of pegs.
Light PKMN

Tektite








Since: 11-19-05
From: Cat Land

Last post: 6656 days
Last view: 6656 days
Posted on 12-02-05 11:27 PM Link | Quote
left peg right peg left peg.....ect

But im wrong
Kattwah

Acro
RIP Acmlm's Board: Feb. 18 2007








Since: 11-17-05

Last post: 6298 days
Last view: 6298 days
Posted on 12-02-05 11:44 PM Link | Quote
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
||bass
Administrator








Since: 11-17-05
From: Salem, Connecticut

Last post: 6299 days
Last view: 6298 days
Posted on 12-02-05 11:46 PM Link | Quote
Hint 2: The "correct" soloution looks at all the pegs before the game starts, and then ignores them for the rest of the game.
Deleted User
Banned


 





Since: 05-08-06

Last post: None
Last view: 6299 days
Posted on 12-03-05 12:59 AM Link | Quote
I can't wait to hear the answer on this, ||bass has me all excited. D:
||bass
Administrator








Since: 11-17-05
From: Salem, Connecticut

Last post: 6299 days
Last view: 6298 days
Posted on 12-03-05 01:02 AM Link | Quote

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.
jeff

Double metal axe








Since: 11-17-05

Last post: 6298 days
Last view: 6298 days
Skype
Posted on 12-03-05 01:12 AM Link | Quote
what if he picks a in there and you have to be b? =p
emcee

Red Super Koopa


 





Since: 11-20-05

Last post: 6298 days
Last view: 6298 days
Posted on 12-03-05 01:25 AM Link | Quote
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.


(edited by emcee on 12-03-05 12:27 AM)
Danielle

6730
Administratorrrr
HELLO THERE









Since: 11-17-05
From: California
Rate me
^_^

Last post: 6299 days
Last view: 6298 days
Skype
Posted on 12-03-05 02:17 PM Link | Quote
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.
NSNick

Gohma
IF ALL ELSE
FAILS USE FIRE
BOOZE








Since: 11-17-05
From:

Last post: 6300 days
Last view: 6300 days
Skype
Posted on 12-03-05 03:51 PM Link | Quote
A ha. Nice.
||bass
Administrator








Since: 11-17-05
From: Salem, Connecticut

Last post: 6299 days
Last view: 6298 days
Posted on 12-03-05 09:32 PM Link | Quote
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.
Danielle

6730
Administratorrrr
HELLO THERE









Since: 11-17-05
From: California
Rate me
^_^

Last post: 6299 days
Last view: 6298 days
Skype
Posted on 12-04-05 12:15 AM Link | Quote
How can either player win? I don't see how you can use the same strategy if you don't go first.
Xkeeper
Took the board down in a blaze of glory, only to reveal how truly moronical ||bass is.


 





Since: 11-17-05
From: Henderson, Nevada

Last post: 6298 days
Last view: 6298 days
Skype
Posted on 12-04-05 12:26 AM Link | Quote
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

6730
Administratorrrr
HELLO THERE









Since: 11-17-05
From: California
Rate me
^_^

Last post: 6299 days
Last view: 6298 days
Skype
Posted on 12-04-05 01:59 AM Link | Quote
Well if they go first.. isn't there always one of each letter available to them no mattter what you do?
Pages: 1 2Add to favorites | Next newer thread | Next older thread
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.017 seconds; used 449.38 kB (max 577.44 kB)