Given a discrete rectangle R of dimensions h x w, let W be the set of snake-like polyominoes contained in R represented as binary matrices, i.e. polyominoes whose underlying simple graph is a chain with respect to the 4-adjacency relation. We present an algorithm that generates W for any h and w. Also, let a be the maximal area that can be realized by an element of W. We provide exact formulas of a for h <= 5 and any w.
翻译:给定一个尺寸为 h×w 的离散矩形 R,令 W 为包含于 R 的蛇形多联骨牌(以二元矩阵表示)的集合,即其基础简单图关于4-邻接关系为一条链的多联骨牌。我们提出一种针对任意 h 和 w 生成 W 中所有元素的算法。此外,设 a 为 W 中元素可实现的最大面积。我们给出了当 h ≤ 5 且 w 任意时 a 的精确公式。