• Re: 15

    From Richard Heathfield@21:1/5 to Richard Tobin on Fri Dec 16 14:11:15 2022
    On 16/12/2022 1:45 pm, Richard Tobin wrote:
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Tobin@21:1/5 to All on Fri Dec 16 13:45:18 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ammammata@21:1/5 to All on Fri Dec 16 16:45:32 2022
    Richard Heathfield submitted this idea :
    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

    nice spoiler advert: did you wrote it line-by-line or it's a plugin?

    --
    /-\ /\/\ /\/\ /-\ /\/\ /\/\ /-\ T /-\
    -=- -=- -=- -=- -=- -=- -=- -=- - -=-
    ........... [ al lavoro ] ...........

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to Ammammata on Fri Dec 16 17:15:17 2022
    On 16/12/2022 3:45 pm, Ammammata wrote:
    Richard Heathfield submitted this idea :
    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

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to Richard Tobin on Fri Dec 16 18:08:44 2022
    On 16/12/2022 5:37 pm, Richard Tobin wrote:
    In article <tnhua3$3bf70$3@dont-email.me>,
    Richard Heathfield <rjh@cpax.org.uk> wrote:

    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:

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Carl G.@21:1/5 to Richard Tobin on Fri Dec 16 09:56:23 2022
    On 12/16/2022 5:45 AM, Richard Tobin wrote:
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Tobin@21:1/5 to rjh@cpax.org.uk on Fri Dec 16 17:37:55 2022
    In article <tnhua3$3bf70$3@dont-email.me>,
    Richard Heathfield <rjh@cpax.org.uk> wrote:

    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:

    Indeed it does, but how do you use it?

    -- Richard

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From leflynn@21:1/5 to Richard Tobin on Fri Dec 16 11:05:06 2022
    On Friday, December 16, 2022 at 12:40:02 PM UTC-5, Richard Tobin wrote:
    In article <tnhua3$3bf70$3...@dont-email.me>,
    Richard Heathfield <r...@cpax.org.uk> wrote:

    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:
    Indeed it does, but how do you use it?

    -- Richard

    Indeed it does, but how do you use it?
    With affection.
    L. Flynn

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to Carl G. on Fri Dec 16 21:58:39 2022
    On 16/12/2022 5:56 pm, Carl G. wrote:
    On 12/16/2022 5:45 AM, Richard Tobin wrote:
    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?



    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mike Terry@21:1/5 to Richard Heathfield on Fri Dec 16 22:39:36 2022
    On 16/12/2022 21:58, Richard Heathfield wrote:
    On 16/12/2022 5:56 pm, Carl G. wrote:
    On 12/16/2022 5:45 AM, Richard Tobin wrote:
    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?



    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.


    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to Mike Terry on Sat Dec 17 08:05:31 2022
    On 16/12/2022 10:39 pm, Mike Terry wrote:
    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.

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Tobin@21:1/5 to news.dead.person.stones@darjeeling. on Sat Dec 17 12:40:42 2022
    In article <3EmdnQFht6A0bgH-nZ2dnZfqn_qdnZ2d@brightview.co.uk>,
    Mike Terry <news.dead.person.stones@darjeeling.plus.com> wrote:

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to Richard Tobin on Sat Dec 17 14:45:00 2022
    On 17/12/2022 12:40 pm, Richard Tobin wrote:
    In article <3EmdnQFht6A0bgH-nZ2dnZfqn_qdnZ2d@brightview.co.uk>,
    Mike Terry <news.dead.person.stones@darjeeling.plus.com> wrote:

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Edward Murphy@21:1/5 to Mike Terry on Sun Dec 18 12:13:25 2022
    On 12/16/2022 2:39 PM, Mike Terry wrote:

    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)

    [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).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jonathan Dushoff@21:1/5 to Richard Tobin on Mon Dec 19 08:00:14 2022
    On Friday, December 16, 2022 at 8:50:02 AM UTC-5, Richard Tobin wrote:
    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 :-).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)