MULTIPLAYER ROCK-PAPER-SCISSORS CHARLOTTE ATEN Contents 1. Introduction 1 2. RPS Magas 3 3. Ites as a Function of Players and Vice Versa 5 4. Algebraic Properties of RPS Magas 6 References 6 1. Introduction The gae of Rock-Paper-Scissors (RPS) involves two players siultaneously choosing either rock (r), paper (p), or scissors (s). Inforally, the rules of the gae are that rock beats scissors, paper beats rock, and scissors beats paper. That is, if one player selects rock and the other selects paper then the latter player wins, and so on. If two players choose the sae ite then the round is a tie. A aga is an algebra A := (A, f) consisting of a set A and a single binary operation f : A 2 A. We will view the gae of RPS as a aga. We let A := {r, p, s} and define a binary operation f : A 2 A where f(x, y) is the winning ite aong {x, y}. This operation is given by the table below and copletely describes the rules of RPS. In order to play the first player selects a eber of A, say x, at the sae tie that the second player selects a eber of A, say y. Each player who selected f(x, y) is the winner. Note that it is possible for both players to win, in which case we have a tie. r p s r r p r p p p s s r s s In general we have a class of selection gaes, which are gaes consisting of a collection of ites A, fro which a fixed nuber of players n each choose one, resulting in a tuple a A n, following which the round s winners are those who chose f(a) for soe fixed rule f : A n A. We refer to an algebra A := (A, f) with a single basic n-ary operation f : A n A as an n-ary aga or an n-aga. We will soeties abuse this terinology and refer to an n-ary aga A siply as a aga. Each such gae can be viewed as an n-ary aga and each n-ary aga Date: 2018. eail: caten2@u.rochester.edu Thanks to Scott Kirila for pointing out the result we use in section 2. This research was supported in part by the people of the Yoseite Valley. 1
2 CHARLOTTE ATEN can be viewed as a gae in the sae anner, providing we allow for gaes where we keep track of who is player 1, who is player 2, etc. Again note that any subset of the collection of players ight win a given round, so there can be ultiple player ties. The classic RPS gae has several desirable properties. Naely, RPS is, in ters we proceed to define, (1) conservative, (2) essentially polyadic, (3) strongly fair, and (4) nondegenerate. Let A := (A, f) be an n-aga. We say that an operation f : A n A is conservative when for any a 1,..., a n A we have that f(a 1,..., a n ) {a 1,..., a n }[1, p.94]. Siilarly we call A conservative when f is conservative. We say that an operation f : A n A is essentially polyadic when there exists soe g : Sb(A) A such that for any a 1,..., a n A we have f(a 1,..., a n ) = g({a 1,..., a n }). Siilarly we call A essentially polyadic when f is essentially polyadic. We say that f is fair when for all a, b A we have f 1 (a) = f 1 (b). Let Ak denote the ebers of A n which have k distinct coponents for soe k N. We say that f is strongly fair when for all a, b A and all k N we have f 1 (a) A k = f 1 (b) A k. Siilarly we call A (strongly) fair when f is (strongly) fair. Note that if f (respectively, A) is strongly fair then f (respectively, A) is fair, but the reverse iplication does not hold. We say that f is nondegenerate when A > n. Siilarly we call A nondegenerate when f is nondegenerate. Thinking in ters of selection gaes we say that A is conservative when each round has at least one winning player. We say that A is essentially polyadic when a round s winning ite is deterined solely by which ites were played, not taking into account which player played which ite or how any players chose a particular ite. We say that A is fair when each ite has the sae probability of being the winning ite (or tying). We say that A is strongly fair when each ite has the sae chance of being the winning ite when exactly k distinct ites are chosen for any k N. Note that this is not the sae as saying that each player has the sae chance of choosing the winning ite (respectively, when exactly k distinct ites are chosen). When A is degenerate (i.e. not nondegenerate) we have that A n. In the case that A n we have that all ebers of A A have the sae set of coponents. If A is essentially polyadic with A n it is ipossible for A to be strongly fair unless A = 1. Extensions of RPS which allow players to choose fro ore than the three eponyous ites are attested historically. The French variant of RPS gives a pair of players 4 ites to choose aong[6, p.140]. In addition to the usual rock, paper, and scissors there is also the well (w). The well beats rock and scissors but loses to paper. The corresponding Cayley table is given below. This gae is not fair, as f 1 (r) = 3 yet f 1 (p) = 5. It is nondegenerate since there are 4 ites for 2 players to chose aong. It is also conservative and essentially polyadic. r p s w r r p r w p p p s p s r s s w w w p w w
MULTIPLAYER ROCK-PAPER-SCISSORS 3 There has been soe recent recreational interest in RPS variants with larger nubers of ites fro which two players ay choose. For exaple, the gae Rock-Paper-Scissors-Spock-Lizard[3] (RPSSL) is attested in the popular culture. The Cayley table for this gae is given below, with v representing Spock and l representing lizard. This gae is conservative, essentially polyadic, strongly fair, and nondegenerate. r p s v l r r p r v r p p p s p l s r s s v s v v p v v l l r l s l l It is folklore that the only valid RPS variants for two players use an odd nuber of ites. Currently this is entioned on the Wikipedia entry for Rock-Paper- Scissors without citation[5] and with a reference to a collection of such gaes[4]. In our language we have the following result. We give a proof of a ore general stateent in the next section. Theore. Let A be a selection gae with n = 2 which is essentially polyadic, strongly fair, and nondegenerate and let := A. We have that 1 is odd. Conversely, for each odd 1 there exists such a selection gae. In the present paper we explore selection gaes for ore than 2 siultaneous players. We give a nuerical constraint on which n-agas of order can be essentially polyadic, strongly fair, and nondegenerate. We use this constraint to exaine perissible values of for a fixed n and vice versa. We describe soe eleentary algebraic properties of agas which are generalized RPS gaes. 2. RPS Magas The agas we are interested in are those corresponding to selection gaes which have the four desirable properties possessed by Rock-Paper-Scissors. Definition (RPS aga). Let A := (A, f) be an n-ary aga. When A is conservative, essentially polyadic, strongly fair, and nondegenerate we say that A is an RPS aga. When A is an n-aga of order with these properties we say that A is an RPS(, n) aga. We also use RPS and RPS(, n) to indicate the classes of such agas. Note that in order for A to be fair we need that the nuber of ites () divides the nuber of tuples A n = n, which is always the case. This is certainly not a sufficient condition, as we have seen, for exaple, that the French variant of RPS is unfair. Our first theore generalizes directly to selection gaes with ore than 2 players. Theore. Let A be a selection gae with n players and ites which is essentially polyadic, strongly fair, and nondegenerate. For all pries p n we have that p. Conversely, for each pair (, n) with 1 such that for all pries p n we have that p there exists such a selection gae.
4 CHARLOTTE ATEN Proof. Since A is nondegenerate we ust have that > n. Since A is strongly fair we ust have that f 1 (a) A k = f 1 (b) A k for all k N. As the distinct sets f 1 (a) A k for a A partition A k and are all the sae size we require that A k. When k > n we have that A k = and obtain no constraint on. When k n we have that A k is nonepty. As we take A to be essentially polyadic we have that f(x) = f(y) for all x, y A k such that {x 1,..., x n } = {y 1,..., y n }. Let B k denote the collection of unordered sets of k distinct eleents of A. Note that the size of the collection of all ebers x B k such that {x 1,..., x n } = {z 1,..., z k } for distinct z i A does not depend on the choice of distinct z i. This iplies that for a fixed k n each of the ites ust be the winner aong the sae nuber of unordered sets of k distinct eleents in A. We have that B k = ( ) k so we require that Bk = ( ) k for all k n. Let d(, n) := gcd ({ ( k ) 1 k n }). Since ( ) k for all k n we ust have that d(, n). Joris, Oestreicher, and Steinig showed that when > n we have d(, n) = lc( { k } ε k() 1 k n ) where ε k () = 1 when k and ε k () = 0 otherwise[2, p.103]. Since we have that d(, n) and d(, n) it ust be that = d(, n) and hence ({ }) lc k ε k() 1 k n = 1. This iplies that ε k () = 0 for all 2 k n. That is, no k between 2 and n inclusive divides. This is equivalent to having that no prie p n divides, as desired. It reains to show that such gaes A exist when 1 and for all pries p n we have that p. By this assuption we have that k whenever 2 k n. Since ( ) = k! 1) ( k + 1) = ( ( k)!k! k(k 1) (2) and none of the factors of k! divide it ust be that ( ) k for each 2 k n. This iplies that B k for each k n so for each k n we can partition B k into subcollections C k := {C k,r } r A indexed on the eleents of A, each with C k,r = ( k). With respect to this collection of partitions C := {C k} 1 k n we define an n-ary operation f : A n A by f(a 1,..., a n ) := r when {a 1,..., a n } C k,r for soe k {1,..., n}. This ap is well-defined since each {a 1,..., a n } contains exactly k distinct eleents for soe k {1,..., n} and thus belongs to a unique eber of one of the partitions C k. In order to see that the resulting aga A := (A, f) is essentially polyadic choose soe a 0 A and let g : Sb(A) A be given by g(u) := { r a 0 when ( k)u C k,r. when U > n By construction we have that f(a 1,..., a n ) = g({a 1,..., a n }) for all a 1,..., a n A. The choice of a 0 was iaterial. We now show that A is strongly fair. Given
MULTIPLAYER ROCK-PAPER-SCISSORS 5 r A we have that f(a 1,..., a n ) = r with (a 1,..., a n ) A k when {a 1,..., a n } C k,r. Note that the nuber of ebers of A k whose coordinates for the set {a 1,..., a n } is the sae as the nuber of ebers of A k whose coordinates for the set {b 1,..., b n } for soe other (b 1,..., b n ) A k. This iplies that each of the f 1 (r) A k have the sae size for a fixed k and hence A is strongly fair. To see that A is nondegenerate observe that if 1 < n then there is soe prie p dividing. Since p < n is prie we require that p, a contradiction. We see that an essentially polyadic, strongly fair, nondegenerate n-ary aga always exists when 1 and for all pries p n we have that p. We have given a description of all possible essentially polyadic, strongly fair, nondegenerate n-agas. There is always at least one RPS aga for every n 2, although for brevity we refrain fro deonstrating this. 3. Ites as a Function of Players and Vice Versa Our nuerical condition on the existence of an RPS(, n) aga allows us to analyze how any ites can be used by a fixed nuber n of players in such a gae. For the n = 2 case we see that the only prie p 2 is 2 so 2. For n = 3 we find that 2 and 3. As 2 we have that (od 6) {1, 3, 5}. As 3 we have that (od 6) {1, 2, 4, 5}. Cobining these conditions we see that RPS(, 3) algebras can only exist for 1 (od 6) or 5 (od 6). Our exaple of an RPS 3-aga of order 5 was the sallest possible and we see that the next largest RPS 3-agas have order = 6 + 1 = 7. A siilar analysis can be used to obtain a constraint on odulo the product of all pries p n for any fixed n. Since 2 and 3 are also the only pries p 4 we find that RPS(, 4) agas can only exist for 1 (od 6) or 5 (od 6). In the case of n = 5, however, we obtain that (od 30) {1, 7, 11, 13, 17, 19, 23, 29}. The sallest RPS 5-aga thus has order 7. Our nuerical condition also allows us to fix the nuber of ites and ask how any players n ay use that nuber of ites. By our previous work this question is answered iediately. Theore. Given a fixed there exists an RPS(, n) aga if and only if n < t() where t() is the least prie dividing. Proof. Suppose that there exists such a aga. We know that in this case p for all p n. Since t() is a prie dividing we ust have that n < t(). Conversely, if n < t() then all pries p n are less than t() and as such do not divide. It is possible to show that RPS(, n) agas always exist when this condition is et. Our result iplies that the only RPS(2, n) aga has n = 1. Up to isoorphis this is the aga (A, f) with A = {a, b} and f : A A the identity ap. There are RPS(3, n) agas for n 2. The gae of RPS is one such RPS(3, 2) aga. There are RPS(4, n) agas only for n = 1. Up to isoorphis this is again a set A with A = 4 and f = id A. There are RPS(5, n) agas for n 4. The gae of RPSSL is one such RPS(5, 2) aga. In the full version of this paper we will use a Z 5 action to obtain an exaple of a RPS(5, 3) aga. Since 2 6 the only RPS(6, n) agas are unary. We can perfor a siilar analysis for any fixed nuber of ites.
6 CHARLOTTE ATEN 4. Algebraic Properties of RPS Magas We give soe basic algebraic properties of RPS agas. Note that both the original RPS aga and the aga for the French variant are contained in the aga for RPSSL so subalgebras of RPS agas ay or ay not be RPS agas. Observe that any subset of the universe of a conservative aga is a subuniverse. For exaple, {r, s, l} is a subuniverse for RPSSL and the corresponding subalgebra satisfies the nuerical condition necessary for RPS agas (being binary and of order 3), yet the corresponding subalgebra fails to be strongly fair. The class of RPS agas is as far fro being closed under products as possible. Theore. Let A and B be nontrivial RPS n-agas with n > 1. The aga A B is not an RPS aga. Proof. We show that A B cannot be conservative. Let A := (A, f) and let B := (B, g). Let x 1,..., x n A be distinct and let y 1,..., y n B be distinct. Since f and g are conservative we have that f(x) = x i and g(y) = y j for soe i and j. It follows that (f g)((x 1, y 1 ),..., (x n, y n )) = (x i, y j ). Either i j, in which case (x i, y j ) is not one of the (x i, y i ) and A B is not conservative, or i = j. In this latter case we have that f is essentially polyadic so f(σ(x)) = f(x) for any perutation σ of the x i. This iplies that f(x 2,..., x n, x 1 ) = f(x 1,..., x n ) = x i so (f g)((x 2, y 1 ),..., (x n, y n 1 ), (x 1, y n )) = (x i, y i ). Now (x i, y i ) does not appear aong the arguents of f g so again we see that A B cannot be conservative and hence cannot be an RPS aga. References [1] Clifford Bergan. Universal Algebra: Fundaentals and Selected Topics. Chapan and Hall/CRC, 2011. isbn: 978-1-4398-5129-6 (cit. on p. 2). [2] H Joris, C Oestreicher, and J Steinig. The greatest coon divisor of certain sets of binoial coefficients. In: Journal of Nuber Theory 21.1 (1985), pp. 101 119. issn: 0022-314X. doi: https : / / doi. org / 10. 1016 / 0022-314X(85)90013-7 (cit. on p. 4). [3] Rock Paper Scissors Spock Lizard. Jan. 16, 2018. url: http://www.sakass. co/theories/rpssl.htl (cit. on p. 3). [4] Rock Paper Scissors Variants. Jan. 16, 2018. url: http://www.uop.co/ rps.ht (cit. on p. 3). [5] Rock-paper-scissors. Jan. 16, 2018. url: https://en.wikipedia.org/wiki/ Rock%C3%A2%C2%80%C2%93paper%C3%A2%C2%80%C2%93scissors (cit. on p. 3). [6] Gisèle Ubhauer. Gae Theory and Exercises. 1st ed. Routledge Advanced Texts in Econoics and Finance. Routledge, 2016. isbn: 0415604214,978-0- 415-60421-5,978-0-415-60422-2,978-1-315-66906-9 (cit. on p. 2).