[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

1538.0. "Rock, Paper, Scissors Combinations" by TKOV51::MATTHEWS () Tue Jan 07 1992 20:55

Can anyone tell me why the answer to the problem below is 10?  The book 
simply lists all the answers and gives no formula.

Problem:  Three people are playing the game "Rock, Paper, Scissors."  How 
many combinations of rock, paper, scissors are possible.

Answer: 1=PPP 	4=RRR 	7=SSS  	10=RPS
	2=PSS   5=RSS   8=SPP
	3=PRR   6=RPP   9=SRR


The game is played by three people using their hands to show rock (fist), 
paper (flat) or scissors (index and middle fingers).  The winner is 
determined by the following rules: rock crushes scissors, scissors cut paper, 
paper covers rock.  (Actually, the above problem is not meaningful, since two 
rounds would have to take place to eliminate two people and determine a 
winner.)

Thanks,

Tim 
T.RTitleUserPersonal
Name
DateLines
1538.1CLT::TRACE::GILBERTOwnership ObligatesWed Jan 08 1992 11:178
    Who plays what is unimportant in counting these combinations (otherwise,
    the answer would simply be 3�3�3 = 27).  Counting:
    
    	Combinations that have all three the same:	3
    	Combinations that have exactly two the same:	6
    	Combinations that have all three different:	1
    						      ----
    	Total number of combinations:		       10
1538.2Rock, Paper, Scissors, photonTorpedoVMSDEV::HALLYBFish have no concept of fireWed Jan 08 1992 16:2416
    If that's as far as the book goes, it's a pretty cheesy problem.
    I would think one could then continue along the lines of:
    
    "What is the probability a 3-player game concludes in 1 round?"
    
    (e.g., SPP is a win for S)
    
    "What is the expected length (in turns) of a game, when all players
    repeat if no clear winner emerges?"
    
    (exercise for the reader)
    
    So as a standalone question it's pretty silly, but as question 1 of a
    series it might make some sense.
    
      John
1538.3Count permutations carefullyCIVAGE::LYNNLynn Yarbrough @WNP DTN 427-5663Thu Jan 09 1992 14:2524
One way of looking at the problem is to attach digits to the letters in 
alpha order, e.g. p=0, r=1, s=2. Now a play is a 3-digit radix-3 integer, 
and the possible plays are those *in which the digits are in non-decreasing
order*. MAPLE is helpful here:

with(combinat, combine);
	...
combine([0$3,1$3,2$3],3);

 [[0, 0, 0], [0, 0, 1], [0, 0, 2], [0, 1, 1], [0, 1, 2], [0, 2, 2], [1, 1, 1],
     [1, 1, 2], [1, 2, 2], [2, 2, 2]]

or in terms of prs,

combine([p$3,r$3,s$3],3);

 [[p, p, p], [p, p, r], [p, p, s], [p, r, r], [p, r, s], [p, s, s], [r, r, r],
     [r, r, s], [r, s, s], [s, s, s]]
 
Counting permutations gives:

> nops(permute(3,0))+nops(permute(3,1))+nops(permute(3,2));
                                       10

1538.4CLT::TRACE::GILBERTOwnership ObligatesThu Jan 09 1992 14:542
    Suppose they were playing "Fire, Water, Earth, and Air" (i.e., 4 choices).
    Now how many combinations are there?  What if 5 people played?  Generalize.
1538.5CIVAGE::LYNNLynn Yarbrough @WNP DTN 427-5663Thu Jan 09 1992 17:4324
Hmmm. Looks like 
> nops(permute(3,0))+nops(permute(3,1))+nops(permute(3,2));
                                       10

does not generalize well. I overlooked something. Anyhow,

combine([a$4,e$4,f$4,w$4],4);

   [[a, a, a, a], [a, a, a, e], [a, a, a, f], [a, a, a, w], [a, a, e, e],

       [a, a, e, f], [a, a, e, w], [a, a, f, f], [a, a, f, w], [a, a, w, w],

       [a, e, e, e], [a, e, e, f], [a, e, e, w], [a, e, f, f], [a, e, f, w],

       [a, e, w, w], [a, f, f, f], [a, f, f, w], [a, f, w, w], [a, w, w, w],

       [e, e, e, e], [e, e, e, f], [e, e, e, w], [e, e, f, f], [e, e, f, w],

       [e, e, w, w], [e, f, f, f], [e, f, f, w], [e, f, w, w], [e, w, w, w],

       [f, f, f, f], [f, f, f, w], [f, f, w, w], [f, w, w, w], [w, w, w, w]]

Gives 35 cases for 4 players, 4 options. There are 126 for 5 players, 5
options. 
1538.6KudosTKOV51::MATTHEWSThu Jan 09 1992 23:5415
Thanks for all of your help.  Can I understand, then, that the answer is 
obtained by combining (i.e. adding) all relevant permutations?

This problem was taken from a review book for the GMAT.  Judging by the 
relative complexity - mainly in setting up the permutations -  of the answers
that you gave me, I cannot believe that the question writers intended for the 
problem to be solved this way.  Then again, listing all of the possibilities 
by hand seems trivial.  Yet, that is how the answer was given in the book.

BTW, what is "Fire, Water, Earth, and Air?"  I assume this refers to the 
ancient idea of elements.  How do you play?

Thanks,

Tim
1538.7Elementary, my dear MatthewsVMSDEV::HALLYBFish have no concept of fireFri Jan 10 1992 08:551
    Water beats Fire which beats Air which beats Earth which beats Water.
1538.8(1) The combinatorial questionDESIR::BUCHANANWed Jul 01 1992 11:2423
>	.4 (Gilbert)
>    Suppose they were playing "Fire, Water, Earth, and Air" (i.e., 4 choices).
>    Now how many combinations are there?  What if 5 people played?  Generalize.

	Suppose you've got P people each picking one of S symbols, then the
number of possible results is:
				( P+S-1 )
				(   P   )

	(Choose S-1 distinct elements, a_0,...,a_(S-2) from {0,...,P+S-2},
where a_i < a_(i+1), for all i.   Let b_i = a_i - i, for all i.   So b_i =<
b_(i+1), for all i, and b_(S-2) =< P.   Define b_(-1) = 0, b_(S-1)=P.   Label
the symbols {0,...,S-1}.   Let b_i-b_(i-1) be the number of people who get 
symbol i.)

>	.5 Lynn
>Gives 35 cases for 4 players, 4 options. There are 126 for 5 players, 5
>options. 

	Agrees with the above formula.

Cheers,
Andrew.
1538.9(2) EAFW is the unique fair tournament on 4 vertsDESIR::BUCHANANWed Jul 01 1992 11:2653
>	.6 Matthews
>BTW, what is "Fire, Water, Earth, and Air?"  I assume this refers to the 
>ancient idea of elements.  How do you play?
>	.7 Hallyburton
>    Water beats Fire which beats Air which beats Earth which beats Water.

	Well this isn't complete.   We need to define what happens when
Water encounters Air, and when Fire encounters Earth.

	Take a step back, away from the four elements.

	We're trying to define a directed graph, where for any two distinct
vertices, u&v, either edge u->v exists or edge v->u exists, but not both.
Such a graph is called a *tournament*, I seem to remember.

	We want additional constraints to hold.   No symbol wins all the time 
(for then the game would be rather pointless), and no symbol loses all the 
time (for then that symbol would be rather unpopular).   This corresponds to
requiring that each vertex of the tournament is the invertex for at least one
edge, and the outvertex for at least one edge.   Call a tournament satisfying
these requirements a *fair* tournament.

	How many fair tournaments are there with four vertices

	Answer: 1.

	Each vertex, by the fairness requirement, must be a member of a cycle
of length at least 3.   You might think that you could have a fair tournament
like the one proposed in an earlier reply:

>                   -< Rock, Paper, Scissors, PhotonTorpedo >-

where you keep the 3-cycle RPS.   But it turns out that you can't define the
functionality of the PhotonTorpedo without permitting a 4-cycle.   And this
generalizes to the result that every fair tournament is Hamiltonian (proof
by induction.)

	So, for 4 vertices, we have to have a 4-cycle, and then there is up
to IM only one way to direct the other two edges, so any fair tournament on
4 vertices you design will be isomorphic to:

	+---->A-----+
	|     |     |
	|     |     |
	|     |     v
	F-----+---->E
	^     |     |
	|     |     |
	|     v     |
	+-----W<----+

Cheers,
Andrew.
1538.10(3) Solving EAFW (can you guess it?)DESIR::BUCHANANWed Jul 01 1992 11:2728
	Now, the next question is: what's the best strategy for this 
symmetrical zero-sum two player game?   If by best we mean minimax, then the 
answer is not too hard.   The game's a little more diverting than RPS, because
each of the symbols is distinct from the others, whereas RPS has the boring
strategy (1/3,1/3,1/3).

	In RPS, if someone *doesn't* play probability 1/3 for each symbol, then
the opponent can take advantage of whatever symbol is being prefered, and
profit from it.   So (1/3, 1/3, 1/3) is the unique minimax strategy.

	In EAFW, the payoff matrix, M, is:

		 0 -1 -1 +1
		+1  0 -1 +1
		+1 +1  0 -1
		-1 -1 +1  0

	If x is the column vector of probabilities with which each strategy
is being selected, then x is a viable strategy if Mx =< 0.   (Ie, each element
of the column vector Mx =< 0.)   M is non-singular, so has no non-trivial null-
space.   The minimax strategy for EAFW is hence more complex to that of RPS.

	The unique minimax strategy turns out to be (0, 1/3, 1/3, 1/3).   
Someone playing E,A,F or W against this will score -1/3, 0, 0 or 0.   Maybe I 
could have guessed this, but I didn't.

Cheers,
Andrew.
1538.11Intuitively I would say (1/6, 1/3, 1/3, 1/6)VMSDEV::HALLYBFish have no concept of fire.Wed Jul 01 1992 12:2818
    Something doesn't look right here.  In the .9 graph:
    
	+---->A-----+		Let's say W--->F means W beats F.
	|     |     |		Then F beats A and F beats E.
	|     |     |		E loses to A and loses to F.
	|     |     v
	F-----+---->E		Therefore doesn't it seem to make sense
	^     |     |		to choose F twice as much as E, and
	|     |     |		similarly A twice as much as W?
	|     v     |
	+-----W<----+		"Fair" seems a poor choice of terms here.
    
    Suppose there is no vector FE nor AW, i.e., F vs. E is a tie, just like
    W vs. A just like F vs. F or W vs. W.  While not a "tournament" in any
    strict sense, it's still a playable game, so I don't like the answer 1.
    
      John
    
1538.12TRACE::GILBERTOwnership ObligatesWed Jul 01 1992 14:4020
.10>	In EAFW, the payoff matrix, M, is:
.10>	The unique minimax strategy turns out to be (0, 1/3, 1/3, 1/3).   
.11>    Intuitively I would say (1/6, 1/3, 1/3, 1/6)

Let's compare strategies

			   Andrew
		     |	 0 1/3 1/3 1/3
		-----+---------------
		1/6  |	 0  -1  -1  +1
	John	1/3  |	+1   0  -1  +1
		1/3  |	+1  +1   0  -1
		1/6  |	-1  -1  +1   0

What does John earn per play?

	1/6*(1/3*(-1-1+1)) + 1/3*(1/3*0) + 1/3*(1/3*0) + 1/6*(1/3*0)
	= -1/18

John's expected loss is 1/18 per play.
1538.13looking for structureDESIR::BUCHANANThu Jul 02 1992 13:5615
	Say that a fair tournament in n dimensions is *dull* if every minimax 
strategy looks like this (0,0,...0,1/r,1/r,...1/r), where there are n-r zeros
and r cases of 1/r.   Note, r will be odd.

Q:	What's the smallest non-dull fair tournament?

A:	dimension 5.   Try Foo beats RPS beats Bar beats Foo.   The payoff
for RPSFB is (1/9,1/9,1/9,1/3,1/3).   I allege that the other 5 fair 
tournaments of that dimension are dull (most with r=3, but the regular one
has r=5).

	But actually all that's happened here is we've embedded RPS inside
one vertex of RPS.   It's not *that* non-dull.

Andrew.