kids encyclopedia robot

Image: Probability of winning Snakes and Ladders by turns

Kids Encyclopedia Facts
Original image(SVG file, nominally 500 × 312 pixels, file size: 37 KB)

Description: Probability of winning a game a Snakes and Ladders within n turns. Location of snakes and ladders placed according to this paper.
Title: Probability of winning Snakes and Ladders by turns
Credit: Mathematica source code: ladders = {{1, 38}, {4, 14}, {9, 31}, {21, 42}, {28, 84}, {36, 44}, {51, 67}, {71, 91}, {80, 100}}; snakes = {{16, 6}, {47, 26}, {49, 11}, {56, 53}, {62, 19}, {64, 60}, {87, 24}, {93, 73}, {95, 75}, {98, 78}}; maxNum = 100; numDieSides = 6; f := If[0 <= #2 - #1 <= numDieSides, If[#1 != #2, 1/numDieSides, If[#1 + numDieSides <= maxNum, 0, (numDieSides + #1 - maxNum)/numDieSides]], 0] &; p = Table[f[i, j], {i, 0, 100}, {j, 0, 100}]; pTranspose = Transpose[p]; transports = Union[snakes, ladders]; For[i = 1, i <= Length[transports], i++, pTranspose[[transportsi, 2 + 1]] = pTranspose[[transportsi, 1 + 1]] + pTranspose[[transportsi, 2 + 1]]] For[i = Length[transports], i > 0, i--, pTranspose = Delete[pTranspose, transportsi, 1 + 1]] p = Transpose[pTranspose]; For[i = Length[transports], i > 0, i--, p = Delete[p, transportsi, 1 + 1]] points = Template:0, 0; pPower = IdentityMatrix[Length[p]]; For[x = 0, x <= 250, x++, points = Union[points, {{x, (pPower = pPower.p)[[1, Length[p]]]}}]] ListPlot[points, Joined -> True, Frame -> True, PlotRange -> {{0, 250}, {0, 1}}, ImageSize -> 500] After saving the image as an SVG from Mathematica, edit the raw SVG text by adding "width='500' height='312'" to the end of the SVG tag.
Author: Self
Usage Terms: Creative Commons Attribution-Share Alike 3.0
License: CC BY-SA 3.0
License Link: https://creativecommons.org/licenses/by-sa/3.0
Attribution Required?: Yes

The following page links to this image:

kids search engine