Discussion:
15
(too old to reply)
Richard Tobin
2022-12-16 13:45:18 UTC
Permalink
This is probably well-known.

Two players take it in turns to choose an integer between 1 and 9
that has not already been chosen. The first player with three
numbers totalling 15 wins.

What is the optimal strategy for each player?

-- Richard
Richard Heathfield
2022-12-16 14:11:15 UTC
Permalink
Post by Richard Tobin
This is probably well-known.
Two players take it in turns to choose an integer between 1 and 9
that has not already been chosen. The first player with three
numbers totalling 15 wins.
What is the optimal strategy for each player?
I don't know, but I bet it involves one of these:
I don't know, but I bet it involves one of these
I don't know, but I bet it involves one of thes
I don't know, but I bet it involves one of the
I don't know, but I bet it involves one of th
I don't know, but I bet it involves one of t
I don't know, but I bet it involves one of
I don't know, but I bet it involves one of
I don't know, but I bet it involves one o
I don't know, but I bet it involves one
I don't know, but I bet it involves one
I don't know, but I bet it involves on
I don't know, but I bet it involves o
I don't know, but I bet it involves
I don't know, but I bet it involves
I don't know, but I bet it involve
I don't know, but I bet it involv
I don't know, but I bet it invol
I don't know, but I bet it invo
I don't know, but I bet it inv
I don't know, but I bet it in
I don't know, but I bet it i
I don't know, but I bet it
I don't know, but I bet it
I don't know, but I bet i
I don't know, but I bet
I don't know, but I bet
I don't know, but I be
I don't know, but I b
I don't know, but I
I don't know, but I
I don't know, but
I don't know, but
I don't know, bu
I don't know, b
I don't know,
I don't know,
I don't know
I don't kno
I don't kn
I don't k
I don't
I don't
I don'
I don
I do
I d
I
I

4 9 2
3 5 7
8 1 6
--
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within
Ammammata
2022-12-16 15:45:32 UTC
Permalink
Post by Richard Heathfield
I don't know, but I bet it involves one of these
I don't know, but I bet it involves one of thes
I don't know, but I bet it involves one of the
I don't know, but I bet it involves one of th
I don't know, but I bet it involves one of t
I don't know, but I bet it involves one of
I don't know, but I bet it involves one of
I don't know, but I bet it involves one o
I don't know, but I bet it involves one
I don't know, but I bet it involves one
I don't know, but I bet it involves on
I don't know, but I bet it involves o
I don't know, but I bet it involves
I don't know, but I bet it involves
I don't know, but I bet it involve
I don't know, but I bet it involv
I don't know, but I bet it invol
I don't know, but I bet it invo
I don't know, but I bet it inv
I don't know, but I bet it in
I don't know, but I bet it i
I don't know, but I bet it
I don't know, but I bet it
I don't know, but I bet i
I don't know, but I bet
I don't know, but I bet
I don't know, but I be
I don't know, but I b
I don't know, but I
I don't know, but I
I don't know, but
I don't know, but
I don't know, bu
I don't know, b
I don't know,
I don't know,
I don't know
I don't kno
I don't kn
I don't k
I don't
I don't
I don'
I don
I do
I d
I
I
nice spoiler advert: did you wrote it line-by-line or it's a plugin?
--
/-\ /\/\ /\/\ /-\ /\/\ /\/\ /-\ T /-\
-=- -=- -=- -=- -=- -=- -=- -=- - -=-
........... [ al lavoro ] ...........
Richard Heathfield
2022-12-16 17:15:17 UTC
Permalink
Post by Ammammata
Post by Richard Heathfield
I don't know, but I bet it involves one of these
I don't know, but I bet it involves one of thes
I don't know, but I bet it involves one of the
I don't know, but I bet it involves one of th
I don't know, but I bet it involves one of t
I don't know, but I bet it involves one of
I don't know, but I bet it involves one of
I don't know, but I bet it involves one o
I don't know, but I bet it involves one
I don't know, but I bet it involves one
I don't know, but I bet it involves on
I don't know, but I bet it involves o
I don't know, but I bet it involves
I don't know, but I bet it involves
I don't know, but I bet it involve
I don't know, but I bet it involv
I don't know, but I bet it invol
I don't know, but I bet it invo
I don't know, but I bet it inv
I don't know, but I bet it in
I don't know, but I bet it i
I don't know, but I bet it
I don't know, but I bet it
I don't know, but I bet i
I don't know, but I bet
I don't know, but I bet
I don't know, but I be
I don't know, but I b
I don't know, but I
I don't know, but I
I don't know, but
I don't know, but
I don't know, bu
I don't know, b
I don't know,
I don't know,
I don't know
I don't kno
I don't kn
I don't k
I don't
I don't
I don'
I don
I do
I d
I
I
nice spoiler advert: did you wrote it line-by-line or it's a plugin?
Um, neither. It's a C program (which I did write line by line).

cat spoiler.c

#include <stdio.h>
#include <string.h>

int main(int argc, char **argv)
{
if(argc > 1)
{
size_t len = strlen(argv[1]) + 1;
while(len--)
{
printf("%.*s\n", (int)len, argv[1]);
}
}
return 0;
}

Compilation:

gcc -o spoiler spoiler.c

Installation:

sudo cp spoiler /usr/local/bin

Usage:

spoiler "I don't know, but I bet it involves one of these:"
--
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within
Richard Tobin
2022-12-16 17:37:55 UTC
Permalink
Post by Richard Tobin
Two players take it in turns to choose an integer between 1 and 9
that has not already been chosen. The first player with three
numbers totalling 15 wins.
What is the optimal strategy for each player?
Indeed it does, but how do you use it?

-- Richard
Richard Heathfield
2022-12-16 18:08:44 UTC
Permalink
Post by Richard Tobin
Post by Richard Tobin
Two players take it in turns to choose an integer between 1 and 9
that has not already been chosen. The first player with three
numbers totalling 15 wins.
What is the optimal strategy for each player?
Indeed it does, but how do you use it?
Ha! I saw that straight away, complete with forced win for the
first player, and I was just about to click 'Send' on my first
reply when my brain caught up with my fingers (just in time). It
was obvious... until it suddenly wasn't and my solution fell into
dust, prompting a complete re-draft.
--
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within
leflynn
2022-12-16 19:05:06 UTC
Permalink
Post by Richard Tobin
Post by Richard Tobin
Two players take it in turns to choose an integer between 1 and 9
that has not already been chosen. The first player with three
numbers totalling 15 wins.
What is the optimal strategy for each player?
Indeed it does, but how do you use it?
-- Richard
Indeed it does, but how do you use it?
With affection.
L. Flynn
Carl G.
2022-12-16 17:56:23 UTC
Permalink
Post by Richard Tobin
This is probably well-known.
Two players take it in turns to choose an integer between 1 and 9
that has not already been chosen. The first player with three
numbers totalling 15 wins.
What is the optimal strategy for each player?
-- Richard
I wrote a similar puzzle for this group in 2005 entitled "Moe's Game":


Moe has always been interested in games. Several years ago, Moe invented
a simple two-player word game. His game is played using nine tiles. Each
tile is labeled with a single letter of the alphabet. The letters on the
tiles are those in the phrase "REMIND YOU", which helps "remind you"
which letters to use. The objective of the game is to collect the tiles
necessary to spell out any one of eight three-letter words. There are
many three-words that can be spelled using the letters, but Moe selected
the following eight words: END, ION, MUD, RIM, ROD, RYE, and of course
YOU and MOE (since Moe plays the game against you). The game play is
straight forward. The tiles are placed face-up in a pile. The players
then take turns removing one of the tiles from the pile. The first
player to collect the tiles necessary to spell one of the eight words,
wins. Sometimes Moe plays first, and sometimes he lets his opponent play
first. Although the game occasionally ends in a draw (with neither
player spelling one of the words), Moe has never lost a game.

What is Moe's playing strategy?
--
Carl G.
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
Richard Heathfield
2022-12-16 21:58:39 UTC
Permalink
Post by Carl G.
Post by Richard Tobin
This is probably well-known.
Two players take it in turns to choose an integer between 1 and 9
that has not already been chosen.  The first player with three
numbers totalling 15 wins.
What is the optimal strategy for each player?
-- Richard
Moe has always been interested in games. Several years ago, Moe
invented a simple two-player word game. His game is played using
nine tiles. Each tile is labeled with a single letter of the
alphabet. The letters on the tiles are those in the phrase
"REMIND YOU", which helps "remind you" which letters to use. The
objective of the game is to collect the tiles necessary to spell
out any one of eight three-letter words. There are many
three-words that can be spelled using the letters, but Moe
selected the following eight words: END, ION, MUD, RIM, ROD, RYE,
and of course YOU and MOE (since Moe plays the game against you).
The game play is straight forward. The tiles are placed face-up
in a pile. The players then take turns removing one of the tiles
from the pile. The first player to collect the tiles necessary to
spell one of the eight words, wins. Sometimes Moe plays first,
and sometimes he lets his opponent play first. Although the game
occasionally ends in a draw (with neither player spelling one of
the words), Moe has never lost a game.
What is Moe's playing strategy?
RYE
ION
MUD

As player 1, pick O, giving you an option on four lines.

Example: o (lower case for P1)

As player 2, pick R E M or D (a corner) for an option on two lines.

Example: (upper case for P1)

R
o

As player 1, pick a corner a single rook move away from Player
2's move (or possibly any corner; I didn't think it through).

Example:

R
o
m

Player 2 must block:

R E
o
m

Player 1 must block:

RyE
o
m

Player 2 must block:

RyE
o
mU

Player 1's best bet is to block the third column and hope for P2
stupidity:

RyE
on
mU

Player 2 must block:

RyE
Ion
mU

and P1's move is forced.

Effectively a forced draw if neither side throws it away.

In numbers:

2 7 6
9 5 1
4 3 8

P1 picks 5.
P2 picks an even number x.
P1 picks an even number y such that x+y <> 10 (or possibly any
even number - I didn't think it all the way through).
P2 picks 10-y.

and now it's all blocking until P1's fourth move, where he has a
theoretical winning line remaining if his opponent is prepared to
connive at his own destruction by failing to block it.
--
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within
Mike Terry
2022-12-16 22:39:36 UTC
Permalink
Post by Richard Heathfield
Post by Richard Tobin
This is probably well-known.
Two players take it in turns to choose an integer between 1 and 9
that has not already been chosen.  The first player with three
numbers totalling 15 wins.
What is the optimal strategy for each player?
-- Richard
Moe has always been interested in games. Several years ago, Moe invented a simple two-player word
game. His game is played using nine tiles. Each tile is labeled with a single letter of the
alphabet. The letters on the tiles are those in the phrase "REMIND YOU", which helps "remind you"
which letters to use. The objective of the game is to collect the tiles necessary to spell out any
one of eight three-letter words. There are many three-words that can be spelled using the letters,
but Moe selected the following eight words: END, ION, MUD, RIM, ROD, RYE, and of course YOU and
MOE (since Moe plays the game against you). The game play is straight forward. The tiles are
placed face-up in a pile. The players then take turns removing one of the tiles from the pile. The
first player to collect the tiles necessary to spell one of the eight words, wins. Sometimes Moe
plays first, and sometimes he lets his opponent play first. Although the game occasionally ends in
a draw (with neither player spelling one of the words), Moe has never lost a game.
What is Moe's playing strategy?
RYE
ION
MUD
As player 1, pick O, giving you an option on four lines.
Example: o (lower case for P1)
As player 2, pick R E M or D (a corner) for an option on two lines.
Example: (upper case for P1)
R
 o
As player 1, pick a corner a single rook move away from Player 2's move (or possibly any corner; I
didn't think it through).
R
 o
m
R E
 o
m
RyE
 o
m
RyE
 o
mU
RyE
 on
mU
RyE
Ion
mU
and P1's move is forced.
Effectively a forced draw if neither side throws it away.
2 7 6
9 5 1
4 3 8
P1 picks 5.
P2 picks an even number x.
P1 picks an even number y such that x+y <> 10 (or possibly any even number - I didn't think it all
the way through).
P2 picks 10-y.
and now it's all blocking until P1's fourth move, where he has a theoretical winning line remaining
if his opponent is prepared to connive at his own destruction by failing to block it.
2 7 6
9 5 1
4 3 8

The key observation :

a) Every row/column/diagonal adds to 15 (clearly - it's the most famous magic square)
b) Less obviously, EVERY combination of 3 numbers totalling 15 appears as a row/column/diagonal.
That's not a requirement for a magic square, but checking by hand, it applies in this square.

So collecting 3 numbers totalling 15 is equivalent to completing a row/column/diagonal in the
square, i.e. the game is the same as noughts and crosses (= tic-tac-toe in some contries). That
game is known by children to be a draw with best play. I suppose the point for this puzzle is that
noughts and crosses is easy to visualise, whereas the original addition puzzle at first seems rather
opaque.

Hmm, a simple variation:

Two players take it in turns to choose an integer between 1 and 9
that has not already been chosen. The first player to acquire
numbers totalling 15 wins.

(Very easy first player win)

Mike.
Richard Heathfield
2022-12-17 08:05:31 UTC
Permalink
a)  Every row/column/diagonal adds to 15 (clearly - it's the most
famous magic square)
b)  Less obviously, EVERY combination of 3 numbers totalling 15
appears as a row/column/diagonal. That's not a requirement for a
magic square, but checking by hand, it applies in this square.
Less obviously still, here are the words that unlocked it for me.

"Sometimes Moe plays first, and sometimes he lets his opponent
play first. Although the game occasionally ends in a draw (with
neither player spelling one of the words), Moe has never lost a
game."

It was only after reading this that I realised that the existence
of a "never lose" strategy meant that I only needed to find one
player's strategy, and that the other player's game would
necessarily come out in the wash.
--
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within
Richard Tobin
2022-12-17 12:40:42 UTC
Permalink
Post by Mike Terry
b) Less obviously, EVERY combination of 3 numbers totalling 15 appears
as a row/column/diagonal.
I am sure that Richard H, as a Killer Sudoku player, would have
noticed this!

-- Richard
Richard Heathfield
2022-12-17 14:45:00 UTC
Permalink
Post by Richard Tobin
Post by Mike Terry
b) Less obviously, EVERY combination of 3 numbers totalling 15 appears
as a row/column/diagonal.
I am sure that Richard H, as a Killer Sudoku player, would have
noticed this!
Yes, it's why I jumped to magic squares in the first place.
--
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within
Edward Murphy
2022-12-18 20:13:25 UTC
Permalink
  Two players take it in turns to choose an integer between 1 and 9
  that has not already been chosen.  The first player to acquire
  numbers totalling 15 wins.
(Very easy first player win)
[spoiler space]































2 7 6
9 5 1
4 3 8

X picks 9.
O must pick 6 (otherwise X picks 6 and wins on 9+6).
X picks 2.
O has no second pick that will win. (X has 9 2, O has 6.)
O must pick 4 (otherwise X picks 4 and wins on 9+4+2).
X picks 5.
O has no third pick that will win. (X has 9 5 2, O has 6 4.)
O picks something.
X picks either 1 (winning on 9+5+1) or 8 (winning on 8+5+2).
Jonathan Dushoff
2022-12-19 16:00:14 UTC
Permalink
Post by Richard Tobin
This is probably well-known.
Two players take it in turns to choose an integer between 1 and 9
that has not already been chosen. The first player with three
numbers totalling 15 wins.
What is the optimal strategy for each player?
I first saw this problem in an email from a fairly prominent scientist when I was in my late 40s. I sent the following response, which I thought was clever:

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Spoiler space ...

Thanks for the problem. I got it in about 5 minutes, but only because I spent several weeks working on a related problem about 40 years ago :-).
Loading...