User:BaillyAlexandre/sandbox

Finite element method
The finite element method (FEM) is used to compute the tournament equity of 3 players.

Player A, B and C  have respectively i, j and k chips with i + j + k = total chip count N.

p1st(i, j, k) is the probability for player A to be 1st (that is to win the tournament) when players A, B and C  have respectively i, j and k chips.

p2nd(i, j, k) is the probability for player A to be 2nd.

p3rd(i, j, k) is the probability for player A to be 3rd.

Of course:

p1st(i, j, k) = p1st(i, k, j)

p2nd(i, j, k) = p2nd(i, k, j)

p3rd(i, j, k) = p3rd(i, k, j)

p1st(i, j, k) + p2nd(i, j, k) + p3rd(i, j, k) = 1

The player chip counts (i, j, k) can be put in a 3 dimensional space. Due to the constraint i + j + k = N the player chip counts are on a 3D plane. The constraints i >= 0, j >= 0 and k >= 0 further restrict the place of the player chip counts to the equilateral triangle with vertices at (0, 0, N), (0, N, 0) and (0, 0, N). An equilateral triangle is indeed a convenient representation of the 3 players problem that displays the symmetries.

The figure corresponds with a total chip count N 4 and is known as the 2-simplex. Each label corresponds with the chip counts of player A, B and C. Player B side is AC and player B vertex is B. On his side player B has 0 chips. Segments parallel to its side correspond to more chips when they approach its vertex. Player C side is AB and player C vertex is C. Player A side is CB and player A vertex is A.

The figure is a FEM mesh.

The equations for p2nd(i, j, k) are:

p2nd(0,1,3) = p2nd(0,2,2) = p2nd(0,3,1) = 0 (player A may not end up 3rd)

p2nd(3,1,0) = p2nd(3,0,1) = ¼ (using 2 players results)

p2nd(2,2,0) = p2nd(2,0,2) = ½

p2nd(1,3,0) = p2nd(1,0,3) = ¾

p2nd(2,1,1) = [p2nd(3,0,1) + p2nd(3,1,0) + p2nd(2,0,2) + p2nd(2,2,0) + p2nd(1,1,2) + p2nd(1,2,1)]/6

p2nd(1,1,2) = [p2nd(2,0,2) + p2nd(1,0,3) + p2nd(0,1,3) + p2nd(0,2,2) + p2nd(1,2,1) + p2nd(2,1,1)]/6

p2nd(1,2,1) = p2nd(1,1,2)

Those equations solves the drunken sailors random walk within the triangular maze. At each crossword (labels 112, 121 or 221) the sailor will randomly select one of the 6 options. When the sailor reaches the border of the maze then either he is out of the game (labels 012, 022, 031) or he enters a lower dimension maze (labels 103, 202, etc.).

There is a map between the random walk problem and an electrical network. Each segment between 2 labels of the figure has 1 ohm resistance. The potential of the border labels is known (label 013, 022, 031 at 0 volt, label 301, 310 at ¼ volt, label 202, 220 at ½ volt, label 103, 130 at ¾ volt). The equation for each inner label is merely an application of the Kirchhoff’s circuit law. The potential of each inner label maps with the probability of finishing 2nd.

The random walk problem is also known as the discrete Dirichlet problem.

Solving the equations gives:

p2nd(2,1,1) = 0.357143

p2nd(1,1,2) = p2nd(1,2,1) = 0.321429

Those FEM results are compared against the ICM results in the table hereafter.