Quantcast
Viewing all articles
Browse latest Browse all 35

Counting maximal domino placements

Background

A maximal domino placement (MDP) on a rectangular grid is a non-overlapping placement of zero or more dominoes, so that no more dominoes can be added without overlapping some existing domino.

Alternatively, it can be thought of as a tiling using dominoes and monominoes (single square pieces) so that no two monominoes are adjacent to each other.

For example, the following are a few MDPs on a 3x3 grid: (-s and |s represent horizontal and vertical dominoes, and os represent holes respectively.)

--|   --|   --o|o|   --|   o--|--   --o   --o

There are exactly five MDPs on 2x3, and eleven on 2x4. Rotation and/or reflection of a placement is different from original unless they exactly coincide.

|||   |--   --|   o--   --o|||   |--   --|   --o   o--||||   ||--   |--|   |o--   |--o   --||||||   ||--   |--|   |--o   |o--   --||--o|   ----   o--|   o--o   ----o--|   o--o   --o|   ----   ----

In the graph-theoretical sense, an MDP is equivalent to a maximal matching (maximal independent edge set) in the grid graph of given size.

Challenge

Given the width and height of a grid, count the number of distinct maximal domino placements on it.

Standard rules apply. The shortest code in bytes wins.

Test cases

A288026 is the table of values read by antidiagonals.

w|h| 1  2   3     4      5       6---+------------------------------1  | 1  1   2     2      3       42  | 1  2   5    11     24      513  | 2  5  22    75    264     9414  | 2 11  75   400   2357   134075  | 3 24 264  2357  22228  2074236  | 4 51 941 13407 207423 3136370

Viewing all articles
Browse latest Browse all 35

Trending Articles