Macaulay2 » Documentation
Packages » PolyominoIdeals > polyoMatrix
next | previous | forward | backward | up | index | toc

polyoMatrix -- Matrix attached to a collection of cells

Synopsis

Description

Let $\mathcal{P}$ be a collection of cells and $[(p,q),(r,s)]$ be the smallest interval of $\NN^2$ containing $\mathcal{P}$. The matrix $M(\mathcal{P})$ is a matrix having $s-q$ rows and $r-q$ columns with $M(\mathcal{P})_{i,j}=x_{(i,j)}$ if $(i,j)$ is a vertex of $\mathcal{P}$, otherwise it is zero.
This routine returns the matrix of the collection of cells encoding by Q. In the next example we assume for simplicity that the smallest interval containing $\mathcal{P}$ is $[(1,1),(r,s)]$.

i1 : Q={{{1,1},{2,2}},{{2,1},{3,2}},{{2,2},{3,3}}}

o1 = {{{1, 1}, {2, 2}}, {{2, 1}, {3, 2}}, {{2, 2}, {3, 3}}}

o1 : List
i2 : M = polyoMatrix Q

o2 = | 0       x_(2,3) x_(3,3) |
     | x_(1,2) x_(2,2) x_(3,2) |
     | x_(1,1) x_(2,1) x_(3,1) |

                                                                3                                                         3
o2 : Matrix (QQ[x   , x   , x   , x   , x   , x   , x   , x   ])  <-- (QQ[x   , x   , x   , x   , x   , x   , x   , x   ])
                 3,3   3,2   3,1   2,3   2,2   2,1   1,2   1,1             3,3   3,2   3,1   2,3   2,2   2,1   1,2   1,1


i3 : Q={{{1, 3}, {2, 4}}, {{2, 2}, {3, 3}}, {{3, 1}, {4, 2}}, {{2, 4}, {3, 5}}, {{3, 5}, {4, 6}}, {{4, 4}, {5, 5}}, {{5, 3}, {6, 4}}, {{4, 2}, {5, 3}}, {{6, 4}, {7, 5}}, {{5, 1}, {6, 2}}, {{7, 5}, {8, 6}}, {{7, 1}, {8, 2}}, {{4, 6}, {5, 7}}, {{5, 7}, {6, 8}}, {{6, 6}, {7, 7}}};
i4 : M = polyoMatrix Q

o4 = | 0       0       0       0       x_(5,8) x_(6,8) 0       0       |
     | 0       0       0       x_(4,7) x_(5,7) x_(6,7) x_(7,7) 0       |
     | 0       0       x_(3,6) x_(4,6) x_(5,6) x_(6,6) x_(7,6) x_(8,6) |
     | 0       x_(2,5) x_(3,5) x_(4,5) x_(5,5) x_(6,5) x_(7,5) x_(8,5) |
     | x_(1,4) x_(2,4) x_(3,4) x_(4,4) x_(5,4) x_(6,4) x_(7,4) 0       |
     | x_(1,3) x_(2,3) x_(3,3) x_(4,3) x_(5,3) x_(6,3) 0       0       |
     | 0       x_(2,2) x_(3,2) x_(4,2) x_(5,2) x_(6,2) x_(7,2) x_(8,2) |
     | 0       0       x_(3,1) x_(4,1) x_(5,1) x_(6,1) x_(7,1) x_(8,1) |

                                                                                                                                                                                                                                                                                              8                                                                                                                                                                                                                                                                                       8
o4 : Matrix (QQ[x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   ])  <-- (QQ[x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   ])
                 8,6   8,5   8,2   8,1   7,7   7,6   7,5   7,4   7,2   7,1   6,8   6,7   6,6   6,5   6,4   6,3   6,2   6,1   5,8   5,7   5,6   5,5   5,4   5,3   5,2   5,1   4,7   4,6   4,5   4,4   4,3   4,2   4,1   3,6   3,5   3,4   3,3   3,2   3,1   2,5   2,4   2,3   2,2   1,4   1,3             8,6   8,5   8,2   8,1   7,7   7,6   7,5   7,4   7,2   7,1   6,8   6,7   6,6   6,5   6,4   6,3   6,2   6,1   5,8   5,7   5,6   5,5   5,4   5,3   5,2   5,1   4,7   4,6   4,5   4,4   4,3   4,2   4,1   3,6   3,5   3,4   3,3   3,2   3,1   2,5   2,4   2,3   2,2   1,4   1,3


i5 : Q={{{1, 1}, {2, 2}}, {{2, 2}, {3, 3}}, {{3, 3}, {4, 4}}, {{4, 3}, {5, 4}}};
i6 : M = polyoMatrix Q

o6 = | 0       0       x_(3,4) x_(4,4) x_(5,4) |
     | 0       x_(2,3) x_(3,3) x_(4,3) x_(5,3) |
     | x_(1,2) x_(2,2) x_(3,2) 0       0       |
     | x_(1,1) x_(2,1) 0       0       0       |

                                                                                        4                                                                                 5
o6 : Matrix (QQ[x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   ])  <-- (QQ[x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   , x   ])
                 5,4   5,3   4,4   4,3   3,4   3,3   3,2   2,3   2,2   2,1   1,2   1,1             5,4   5,3   4,4   4,3   3,4   3,3   3,2   2,3   2,2   2,1   1,2   1,1

Ways to use polyoMatrix :

For the programmer

The object polyoMatrix is a method function.