Macaulay2 » Documentation
Packages » GameTheory :: probabilityRing
next | previous | forward | backward | up | index | toc

probabilityRing -- ring of probability distributions of a game indexed by ordered multi-indices

Description

The list $Di$ represents the format of the game. In this example, we create a ring of probability distributions coming from a game of format {2, 3, 2}. This format can be accessed from the ring through the field "gameFormat".

The variables $p#i$ are the entries of the tensor $p$, which can be accessed from the ring through the field "probabilityVariable".

i1 : Di = {2,3,2};
i2 : PR = probabilityRing Di;
i3 : numgens PR

o3 = 12
i4 : pairs PR#"probabilityVariable"

o4 = {(indexes, {{0, 0, 0}, {0, 0, 1}, {0, 1, 0}, {0, 1, 1}, {0, 2, 0}, {0,
                                                                           
     ------------------------------------------------------------------------
     2, 1}, {1, 0, 0}, {1, 0, 1}, {1, 1, 0}, {1, 1, 1}, {1, 2, 0}, {1, 2,
                                                                         
     ------------------------------------------------------------------------
     1}}), ({1, 1, 0}, p         ), ({1, 1, 1}, p         ), ({1, 0, 0}, p   
                        {1, 1, 0}                {1, 1, 1}                {1,
     ------------------------------------------------------------------------
          ), ({0, 2, 0}, p         ), ({1, 0, 1}, p         ), ({0, 2, 1},
     0, 0}                {0, 2, 0}                {1, 0, 1}              
     ------------------------------------------------------------------------
     p         ), ({0, 1, 0}, p         ), ({0, 1, 1}, p         ), (format,
      {0, 2, 1}                {0, 1, 0}                {0, 1, 1}           
     ------------------------------------------------------------------------
     {2, 3, 2}), ({0, 0, 0}, p         ), ({0, 0, 1}, p         ), ({1, 2,
                              {0, 0, 0}                {0, 0, 1}          
     ------------------------------------------------------------------------
     0}, p         ), ({1, 2, 1}, p         ), (coefficients, PR)}
          {1, 2, 0}                {1, 2, 1}

o4 : List

The optional argument "CoefficientRing" allows to change the base field. If no choice is specified, the base field is set to QQ. It is also possible to change the name of the variable tensor through the optional argument "ProbabilityVariableName", which is set to the string "p" by default.

i5 : PR2 = probabilityRing (Di, CoefficientRing=>RR, ProbabilityVariableName=>"q");
i6 : coefficientRing PR2

o6 = RR
       53

o6 : RealField
i7 : pairs PR2#"probabilityVariable"

o7 = {(indexes, {{0, 0, 0}, {0, 0, 1}, {0, 1, 0}, {0, 1, 1}, {0, 2, 0}, {0,
                                                                           
     ------------------------------------------------------------------------
     2, 1}, {1, 0, 0}, {1, 0, 1}, {1, 1, 0}, {1, 1, 1}, {1, 2, 0}, {1, 2,
                                                                         
     ------------------------------------------------------------------------
     1}}), ({1, 1, 0}, q         ), ({1, 1, 1}, q         ), ({1, 0, 0}, q   
                        {1, 1, 0}                {1, 1, 1}                {1,
     ------------------------------------------------------------------------
          ), ({0, 2, 0}, q         ), ({1, 0, 1}, q         ), ({0, 2, 1},
     0, 0}                {0, 2, 0}                {1, 0, 1}              
     ------------------------------------------------------------------------
     q         ), ({0, 1, 0}, q         ), ({0, 1, 1}, q         ), (format,
      {0, 2, 1}                {0, 1, 0}                {0, 1, 1}           
     ------------------------------------------------------------------------
     {2, 3, 2}), ({0, 0, 0}, q         ), ({0, 0, 1}, q         ), ({1, 2,
                              {0, 0, 0}                {0, 0, 1}          
     ------------------------------------------------------------------------
     0}, q         ), ({1, 2, 1}, q         ), (coefficients, PR2)}
          {1, 2, 0}                {1, 2, 1}

o7 : List

Some functions such as spohnIdeal, konstanzMatrix, ciIdeal or spohnCI require the ring to be created by this function or in a similar manner.

See also

Ways to use probabilityRing:

  • probabilityRing(List)

For the programmer

The object probabilityRing is a method function with options.


The source of this document is in /build/reproducible-path/macaulay2-1.25.05+ds/M2/Macaulay2/packages/GameTheory.m2:1546:0.