# markovMatrices -- matrices whose minors form the ideal of a list of independence statements

## Synopsis

• Usage:
markovMatrices(R,S)
markovMatrices(R,S,VarNames)
• Inputs:
• R, a ring, R must be a markovRing
• S, a list, list of conditional independence statements among discrete random variables.
• VarNames, a list, list of names of the random variables in the statements of $S$. If this is omitted it is assumed that these are integers in the range from 1 to $n$ where $n$ is the number of random variables in the declaration of markovRing.
• Outputs:
• a list, list whose elements are instances of Matrix.

## Description

List of matrices whose 2x2 minors form the conditional independence ideal of the independence statements on the list $S$. This method is used in conditionalIndependenceIdeal, it is exported to be able to read independence constraints as minors of matrices instead of their polynomial expansions.

 i1 : S = {{{1},{3},{4}}} o1 = {{{1}, {3}, {4}}} o1 : List i2 : R = markovRing (4:2) o2 = R o2 : PolynomialRing i3 : compactMatrixForm =false; i4 : netList markovMatrices (R,S) +----------------------------------------------+ o4 = || p + p p + p || || 1,1,1,1 1,2,1,1 1,1,2,1 1,2,2,1 || || || || p + p p + p || || 2,1,1,1 2,2,1,1 2,1,2,1 2,2,2,1 || +----------------------------------------------+ || p + p p + p || || 1,1,1,2 1,2,1,2 1,1,2,2 1,2,2,2 || || || || p + p p + p || || 2,1,1,2 2,2,1,2 2,1,2,2 2,2,2,2 || +----------------------------------------------+

Here is an example where the independence statements are extracted from a graph.

 i5 : G = graph{{a,b},{b,c},{c,d},{a,d}} o5 = Graph{a => {b, d}} b => {a, c} c => {b, d} d => {a, c} o5 : Graph i6 : S = localMarkov G o6 = {{{a}, {c}, {d, b}}, {{b}, {d}, {c, a}}} o6 : List i7 : R = markovRing (4:2) o7 = R o7 : PolynomialRing i8 : markovMatrices (R,S,vertices G) o8 = {| p p |, | p p |, | p | 1,1,1,1 1,1,2,1 | | 1,1,1,2 1,1,2,2 | | 1,2,1,1 | | | | | | p p | | p p | | p | 2,1,1,1 2,1,2,1 | | 2,1,1,2 2,1,2,2 | | 2,2,1,1 ------------------------------------------------------------------------ p |, | p p |, | p p |, | 1,2,2,1 | | 1,2,1,2 1,2,2,2 | | 1,1,1,1 1,1,1,2 | | | | | | | | p | | p p | | p p | | 2,2,2,1 | | 2,2,1,2 2,2,2,2 | | 1,2,1,1 1,2,1,2 | | ------------------------------------------------------------------------ p p |, | p p |, | p p 1,1,2,1 1,1,2,2 | | 2,1,1,1 2,1,1,2 | | 2,1,2,1 2,1,2,2 | | | | p p | | p p | | p p 1,2,2,1 1,2,2,2 | | 2,2,1,1 2,2,1,2 | | 2,2,2,1 2,2,2,2 ------------------------------------------------------------------------ |} | | | | o8 : List

## Caveat

In case the random variables are not numbered $1, 2, \dots, n$, then this method requires an additional input in the form of a list of the random variable names. This list must be in the same order as the implicit order used in the sequence $d$. The user is encouraged to read the caveat on the method conditionalIndependenceIdeal regarding probability distributions on discrete random variables that have been labeled arbitrarily.