next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
GraphicalModels :: undirectedEdgesMatrix

undirectedEdgesMatrix -- the matrix corresponding to the edges of an undirected graph

Synopsis

Description

This symmetric matrix has entries k(i,i) along the diagonal and entry k(i,j) in the (i,j) position if there is an edge between i and j, and a zero otherwise. The documentation of gaussianRing further describes the indeterminates k(i,j).

i1 : G = graph({{a,b},{b,c},{c,d},{a,d}})

o1 = Graph{a => {b, d}}
           b => {a, c}
           c => {b, d}
           d => {a, c}

o1 : Graph
i2 : R = gaussianRing G

o2 = R

o2 : PolynomialRing
i3 : compactMatrixForm =false;
i4 : K = undirectedEdgesMatrix(R)

o4 = | k     k       0   k    |
     |  a,a   a,b         a,d |
     |                        |
     | k     k     k       0  |
     |  a,b   b,b   b,c       |
     |                        |
     |   0   k     k     k    |
     |        b,c   c,c   c,d |
     |                        |
     | k       0   k     k    |
     |  a,d         c,d   d,d |

             4       4
o4 : Matrix R  <--- R

See also

Ways to use undirectedEdgesMatrix :

  • undirectedEdgesMatrix(Ring)