Sorted independent finance guides are full of helpful information on everyday money matters.

TI-84 Plus and Casio fx-CG50: Which Die Wins?

TI-84 Plus and Casio fx-CG50: Which Die Wins?

Introduction:  Which Die Wins? 

The program DICEODDS compares a pair of dice against each other.  Each die, having values on its six faces and a different distribution of those values, is rolled against each other.  The program determines which die has a better chance of winning.

The face of each die can have any value, and values can repeat.  These dice can and usually are  different from the standard dice (1, 2, 3, 4, 5, 6).

Example 1:

Die 1 is your standard die:  {1, 2, 3, 4, 5, 6}
However, Die 2 has all threes:  {3, 3, 3, 3, 3, 3}

If we roll Die 1 against Die 2, Die 1 wins if a 4, 5, or 6 is rolled.  The odds of Die 1 having a higher value is 1/2. 

Example 2:

Die 1:  {3, 3, 3, 4, 4, 4}
Die 2: {2, 2, 2, 2, 7, 7}

Die 1 wins when a 2 is rolled on Die 2, which occurs 4/6 or 2/3 of the time.  If a 7 is rolled from Die 2, then Die 2 wins, and this has a probability of 1/3. 

DICEODDS compares each value of Die 1 against Die 2 on a single roll of each die.

This is an idea based on a article from James Grime, mathematician who is part of Numberphile. (see Source below)  Numberphile has a YouTube channel which discusses mathematics.   

Grime starts the article by presenting a game where two players choose one of three dies.  The red die has five 3s and one 6, the blue die has three 2s and three 5s, and the olive has one 1 and five 4s.  By comparing dies against each other, the red has a better chance of winning over blue, the blue has better chance of winning over olive, and olive has a better chance of winning over red.  It happens that the dice in this game represent paper-rock-scissors.

Grime also covers games where a chosen die is rolled twice during a game.  There is Efron Dice, a game involving choosing one of four dice (all 3s, half 0s and half 4s, half 1s and half 5s, half 2s and half 6s).  Grime also presents a game involving five dice, each die with an equal chance of winning. 

Dice are considered to be non-transitive when in a game of comparing dice, no die is dominant.

Running DICEODDS

DICEODDS compares two dice on a single role and their probability of winning.  The user is allowed to either enter their own values or generate two random dice, with values ranging from 0 to 9.  Values can repeat, and if you want, do not have to be positive integers.  The screen shots below are from the Casio fx-CG50 version of DICEODDS. 

TI-84 Plus Program DICEODDS

“2019-06-03 EWS”
Menu(“WHICH DIE WINS?”,”RANDOM DICE”,1,”ENTER DICE”,2)
Lbl 1
seq(randInt(0,9),X,1,6)→L₁
seq(randInt(0,9),X,1,6)→L₂
Goto 3
Lbl 2
Disp “ENTER DIE OF 6 VALUES”
Input “DIE 1: “,L₁
Input “DIE 2: “,L₂
Lbl 3
0→P
For(I,1,6)
sum(L₁(I)>L₂)/6*1/6→F
P+F→P
End
ClrHome
Disp “DIE 1,2″,L₁,L₂,”ODDS DIE 1 WINS”,P▶Frac,”ODDS DIE 2 WINS”,(1-P)▶Frac

Casio fx-CG50 Program DICEODDS – (text file format)

‘ProgramMode:RUN
“2019-06-04 EWS”
Menu “WHICH DIE WINS?”,”RANDOM DICE”,1,”ENTER DICE”,2
Lbl 1
6->Dim List 1
6->Dim List 2
For 1->I To 6
RanInt#(0,9)->List 1[I]
RanInt#(0,9)->List 2[I]
Next
Goto 3
Lbl 2
“ENTER DIE: 6 VALUES”
“DIE 1:”?->List 1
“DIE 2:”?->List 2
Lbl 3
0->P
For 1->I To 6
Sum (List 1[I]>List 2)/6*1/6->F
P+F->P
Next

ClrText
Red Locate 1,1,”DIE 1:”
Blue Locate 1,2,”DIE 2:”
For 1->I To 6
6+2*I->J
Red Locate J,1,List 1[I]
Blue Locate J,2,List 2[I]
Next
Locate 1,4,”ODDS DIE 1 WINS:”
Red Locate 1,5,P
Locate 1,6,”ODDS DIE 2 WINS:”
Blue Locate 1,7,1-P

Source:

Grime, James “The Bizzare World of Nontransitive Dice: Games for Two or More Players” from:
Pritici, Micrcea (editor) “The Best Writing on Mathematics 2018”  Princeton University Press: Princeton, NJ.  2019  ISBN 978-0-691-18276-6

The article can also be found on the web:  https://singingbanana.com/dice/article.htm
(Retrieved June 5, 2019)

Eddie

All original content copyright, © 2011-2019.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.