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

isNonAttackingRooks -- Check if a rook configuration is non-attacking

Description

Given a collection of cells $\mathcal{P}$, this function checks whether a configuration of two rooks placed on the cells of $\mathcal{P}$ is non-attacking, that is, whether no two rooks share the same row or column or, if they are on the same row (resp. column), they are not connected by a horizontal (resp. vertical) path of cells of $\mathcal{P}$.

i1 : Q = cellCollection {{1,1},{1,2},{2,1},{2,2}};
i2 : isNonAttackingRooks({1,1}, {2,2}, Q)

o2 = true
i3 : isNonAttackingRooks({1,1}, {1,2}, Q)

o3 = false

See also

Ways to use isNonAttackingRooks:

  • isNonAttackingRooks(List,List,CollectionOfCells)

For the programmer

The object isNonAttackingRooks is a method function with options.


The source of this document is in PolyominoIdeals.m2:1321:0.