Monomino-Domino Tatami Coverings Alejandro Erickson Joint work - - PowerPoint PPT Presentation

monomino domino tatami coverings
SMART_READER_LITE
LIVE PREVIEW

Monomino-Domino Tatami Coverings Alejandro Erickson Joint work - - PowerPoint PPT Presentation

Monomino-Domino Tatami Coverings Alejandro Erickson Joint work with Frank Ruskey at The University of Victoria, Canada December 4, 2013 Durham University, ACiD Seminar. Japanese Tatami mats Traditional Japanese floor mats made of soft woven


slide-1
SLIDE 1

Monomino-Domino Tatami Coverings

Alejandro Erickson

Joint work with Frank Ruskey at The University of Victoria, Canada

December 4, 2013 Durham University, ACiD Seminar.

slide-2
SLIDE 2

Japanese Tatami mats

Traditional Japanese floor mats made of soft woven straw. A 17th Century layout rule: No four mats may meet.

slide-3
SLIDE 3

No four dominoes (mats) may meet

Tatami coverings of rectangles were considered by Mitsuyoshi Yoshida, and Don Knuth (about 370 years later).

slide-4
SLIDE 4

No four dominoes (mats) may meet

Tatami coverings of rectangles were considered by Mitsuyoshi Yoshida, and Don Knuth (about 370 years later).

slide-5
SLIDE 5

No four dominoes (mats) may meet

Tatami coverings of rectangles were considered by Mitsuyoshi Yoshida, and Don Knuth (about 370 years later).

slide-6
SLIDE 6

No four dominoes (mats) may meet

Tatami coverings of rectangles were considered by Mitsuyoshi Yoshida, and Don Knuth (about 370 years later).

slide-7
SLIDE 7

No four dominoes (mats) may meet

Tatami coverings of rectangles were considered by Mitsuyoshi Yoshida, and Don Knuth (about 370 years later).

slide-8
SLIDE 8

No four dominoes (mats) may meet

Tatami coverings of rectangles were considered by Mitsuyoshi Yoshida, and Don Knuth (about 370 years later).

slide-9
SLIDE 9

No four dominoes (mats) may meet

Tatami coverings of rectangles were considered by Mitsuyoshi Yoshida, and Don Knuth (about 370 years later).

slide-10
SLIDE 10

Coverings of the chessboard

There are exactly two

Generalized by Ruskey, Woodcock, 2009, using Hickerson’s decomposition.

slide-11
SLIDE 11

Domino Tatami Covering

slide-12
SLIDE 12

Domino Tatami Covering

slide-13
SLIDE 13

Domino Tatami Covering

slide-14
SLIDE 14

Domino Tatami Covering

slide-15
SLIDE 15

Domino Tatami Covering

slide-16
SLIDE 16

Domino Tatami Covering

slide-17
SLIDE 17

Domino Tatami Covering

slide-18
SLIDE 18

Domino Tatami Covering

slide-19
SLIDE 19

Domino Tatami Covering

slide-20
SLIDE 20

Domino Tatami Covering

slide-21
SLIDE 21

Domino Tatami Covering

(Ruskey, 2009)

INPUT: A region, R, with n grid squares. QUESTION: Can R be tatami covered with dominoes?

slide-22
SLIDE 22

Domino Tatami Covering

(Ruskey, 2009)

INPUT: A region, R, with n grid squares. QUESTION: Can R be tatami covered with dominoes? Is this NP-hard?

slide-23
SLIDE 23

Domino Tatami Covering

(Ruskey, 2009)

INPUT: A region, R, with n grid squares. QUESTION: Can R be tatami covered with dominoes?

slide-24
SLIDE 24

Domino Tatami Covering

(Ruskey, 2009)

INPUT: A region, R, with n grid squares. QUESTION: Can R be tatami covered with dominoes?

slide-25
SLIDE 25

Domino Tatami Covering

(Ruskey, 2009)

INPUT: A region, R, with n grid squares. QUESTION: Can R be tatami covered with dominoes?

slide-26
SLIDE 26

Domino Tatami Covering

(Ruskey, 2009)

INPUT: A region, R, with n grid squares. QUESTION: Can R be tatami covered with dominoes?

slide-27
SLIDE 27

Domino Tatami Covering

(Ruskey, 2009)

INPUT: A region, R, with n grid squares. QUESTION: Can R be tatami covered with dominoes?

slide-28
SLIDE 28

Domino Tatami Covering

(Ruskey, 2009)

INPUT: A region, R, with n grid squares. QUESTION: Can R be tatami covered with dominoes?

slide-29
SLIDE 29

Domino Tatami Covering

(Ruskey, 2009)

INPUT: A region, R, with n grid squares. QUESTION: Can R be tatami covered with dominoes?

slide-30
SLIDE 30

Domino Tatami Covering is polynomial

A domino covering is a perfect matching in the underlying graph.

slide-31
SLIDE 31

Domino Tatami Covering is polynomial

A domino covering is a perfect matching in the underlying graph. INPUT: A region, R, with n grid squares. QUESTION: Can R be tatami covered with dominoes?

slide-32
SLIDE 32

Domino Tatami Covering is polynomial

A domino covering is a perfect matching in the underlying graph. INPUT: A region, R, with n grid squares. QUESTION: Can R be tatami covered with dominoes? This can be answered in O(n2), since the underlying graph is bipartite.

slide-33
SLIDE 33

Tatami coverings as matchings

The tatami restriction is the additional constraint, that every 4-cycle contains a matched edge.

slide-34
SLIDE 34

DTC is NP-hard

Domino Tatami Covering

INPUT: A region, R, with n grid squares. QUESTION: Can R be tatami covered with dominoes?

Theorem (E., Ruskey, 2013)

Domino Tatami Covering is NP-hard.

slide-35
SLIDE 35

Planar 3SAT

Let φ be a 3CNF formula, with variables U, and clauses C. Let G = (U ∪ C, E), where {u, c} ∈ E iff one of the literals u or ¯ u is in the clause c. The formula is planar if there exists a planar embedding

  • f G.

Planar 3SAT is NP-complete (Licht- enstein, 1982).

slide-36
SLIDE 36

Reduction to Planar 3SAT

Working backwards from the answer...

b a d b ∨ ¯ d a ∨ ¯ b ∨ c c ¬ ∧ ∧ ∧ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬

slide-37
SLIDE 37

Reduction to Planar 3SAT

Working backwards from the answer...

b a d b ∨ ¯ d a ∨ ¯ b ∨ c c

slide-38
SLIDE 38

Verify the NOT gate

T F NOT gate covering can be completed with all “good” signals, but no “bad” signal. “good” “bad” F− →T T− →T T− →F F− →F

slide-39
SLIDE 39

Verify the NOT gate

F− →T T− →F

1

F− →F

1 2 3 5 4 6 7 8 9

T− →T NOT gate covering can be completed with all “good” signals, but no “bad” signal. “good” “bad” F− →T T− →T T− →F F− →F

slide-40
SLIDE 40

Search for a NOT gate

T F Search for sub-region, R, of the pink area. If R and the chessboards can be covered with all “good” signals, but no “bad” signal, we are done! “good” “bad” F− →T T− →T T− →F F− →F

slide-41
SLIDE 41

SAT-solvers

◮ A SAT-solver is software that finds a satisfying

assignment to a Boolean formula, or outputs

  • UNSATISFIABLE. We used MiniSAT.
slide-42
SLIDE 42

SAT-solvers

◮ A SAT-solver is software that finds a satisfying

assignment to a Boolean formula, or outputs

  • UNSATISFIABLE. We used MiniSAT.

◮ Given an instance of DTC, the corresponding

SAT instance has the edges of the underlying graph G, as variables. A satisfying assignment sets matched edges to TRUE and unmatched edges to FALSE.

slide-43
SLIDE 43

SAT-solvers

◮ A SAT-solver is software that finds a satisfying

assignment to a Boolean formula, or outputs

  • UNSATISFIABLE. We used MiniSAT.

◮ Given an instance of DTC, the corresponding

SAT instance has the edges of the underlying graph G, as variables. A satisfying assignment sets matched edges to TRUE and unmatched edges to FALSE.

◮ Three conditions must be enforced:

slide-44
SLIDE 44

SAT-solvers

◮ A SAT-solver is software that finds a satisfying

assignment to a Boolean formula, or outputs

  • UNSATISFIABLE. We used MiniSAT.

◮ Given an instance of DTC, the corresponding

SAT instance has the edges of the underlying graph G, as variables. A satisfying assignment sets matched edges to TRUE and unmatched edges to FALSE.

◮ Three conditions must be enforced:

  • 1. TRUE edges are not incident.
slide-45
SLIDE 45

SAT-solvers

◮ A SAT-solver is software that finds a satisfying

assignment to a Boolean formula, or outputs

  • UNSATISFIABLE. We used MiniSAT.

◮ Given an instance of DTC, the corresponding

SAT instance has the edges of the underlying graph G, as variables. A satisfying assignment sets matched edges to TRUE and unmatched edges to FALSE.

◮ Three conditions must be enforced:

  • 1. TRUE edges are not incident.
  • 2. An edge at each vertex is TRUE.
slide-46
SLIDE 46

SAT-solvers

◮ A SAT-solver is software that finds a satisfying

assignment to a Boolean formula, or outputs

  • UNSATISFIABLE. We used MiniSAT.

◮ Given an instance of DTC, the corresponding

SAT instance has the edges of the underlying graph G, as variables. A satisfying assignment sets matched edges to TRUE and unmatched edges to FALSE.

◮ Three conditions must be enforced:

  • 1. TRUE edges are not incident.
  • 2. An edge at each vertex is TRUE.
  • 3. An edge of each 4-cycle is TRUE.
slide-47
SLIDE 47

SAT-solvers

We can generate, test cover, and forbid regions with SAT-solvers.

4 12 CC#......#CC CC#......#CC CC#......#CC CC#......#CC 2 .A........<> .V........A. .A........V. .V........<> <>........A. .A........V. .V........A. <>........V. 2 <>........<> .A........A. .V........V. <>........<> .A........A. .V........V. .A........A. .V........V.

Combine python scripts with the SAT-solver Min- iSAT (fast, lightweight, pre-compiled for my system.)

slide-48
SLIDE 48

Gadget Search

◮ request candidate

region, R, from MiniSAT, satisfying “good” signals.

◮ MiniSAT to test

each “bad” signal in R.

◮ if every test

UNSATISFIABLE R is the answer!

◮ Else, “forbid” R in

next iteration.

slide-49
SLIDE 49

Huge search space

CC#....#CC CC#....#CC CC#....#CC CC#..#.#CC XXX.#..XXX XXX..#.XXX CC#.#..XXX CC#....XXX CC#....XXX CC#....XXX Require and forbid some grid squares (#, X) to be in R to reduce number

  • f disconnected regions.

Search a smaller area.

slide-50
SLIDE 50

It worked!

T T T Inputs Output

slide-51
SLIDE 51

Recall the context

b a d b ∨ ¯ d a ∨ ¯ b ∨ c c ¬ ∧ ∧ ∧ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬

slide-52
SLIDE 52

Recall the context

b a d b ∨ ¯ d a ∨ ¯ b ∨ c c

slide-53
SLIDE 53

Verifiable by hand

T T T In Out T F F In Out F T F In Out F F F In Out TT− →T TF− →F FT− →F FF− →F

slide-54
SLIDE 54

Verifiable by hand

* F T In Out

F * T In Out T T F In Out *F− →T F*− →T TT− →F Impossible AND gate coverings, where * denotes F

  • r T.
slide-55
SLIDE 55

Testing a clause

T F

slide-56
SLIDE 56

Simply Connected DTC

Is DTC NP-hard even if the region is simply connected?

slide-57
SLIDE 57

The Structure of Tatami Coverings

slide-58
SLIDE 58

What are the consequences of this arrangement?

slide-59
SLIDE 59

This placement is forced.

slide-60
SLIDE 60

And this placement is also forced.

slide-61
SLIDE 61

As is this.

slide-62
SLIDE 62

And this.

slide-63
SLIDE 63

Ditto.

slide-64
SLIDE 64

Etc.

slide-65
SLIDE 65

Until we reach the boundary.

slide-66
SLIDE 66

This a ray. They can go NE, NW, SE, SW.

slide-67
SLIDE 67

?

How do rays start? (The question mark.) Not a vertical domino.

slide-68
SLIDE 68

Monomino-Domino Tatami Coverings

slide-69
SLIDE 69

Monomino-Domino Tatami Coverings

bidimer loner vortex vee

slide-70
SLIDE 70

We can enumerate and generate them!

For example, the number of coverings of the n × n square with n monominoes is n2n−1.

slide-71
SLIDE 71

We can enumerate and generate them!

For example, the number of coverings of the n × n square with n monominoes is n2n−1.

Generating functions

Let Xk be a set of ak combinatorial objects for each k ≥ 0. The generating function for {Xk}k≥0 is f (z) = a0z0 + a1z1 + a2z2 + a3z3 + a4z4 + . . . . If ak = 0 for some k ≥ K, then f (z) is a polynomial.

slide-72
SLIDE 72

Email from Knuth to Ruskey:

... I looked also at generating functions for the case m = n, with respect to horizontal versus vertical

  • dominoes. ... for example when n = 11, the

generating function for tatami tilings with exactly 11 monominoes and 55 dominoes turns out to be 2(1 + z)5(1 + z2)2(1 − z + z2)(1 + z4)(1 − z + z2 − z3 + z4)p(z), when subdivided by the number of say horizontal dominoes, where p(z) is a fairly random-looking irreducible polynomial of degree 36. One naturally wonders if there’s a good reason for so many cyclotomic polynomials in this

  • factorization. ...
slide-73
SLIDE 73

Count n × n coverings with n monominoes, h horizontal dominoes

A diagonal flip is an operation on coverings which preserves the tatami restriction, and changes the

  • rientation of some dominoes.
slide-74
SLIDE 74

Count n × n coverings with n monominoes, h horizontal dominoes

Good: Every covering is obtainable via a sequence of diagonal flips. Bad: Conflicting flips complicate enumeration. Solution: Equivalence classes with independent flips.

slide-75
SLIDE 75

Classes of coverings with independent diagonal flips

Longest “flipped” diagonal in green.

◮ Flippable diagonals

are independent of

  • ne another.
slide-76
SLIDE 76

Classes of coverings with independent diagonal flips

Longest “flipped” diagonal in green.

◮ Flippable diagonals

are independent of

  • ne another.

◮ Can change

s to s in a predictable way.

slide-77
SLIDE 77

Classes of coverings with independent diagonal flips

Longest “flipped” diagonal in green.

◮ Flippable diagonals

are independent of

  • ne another.

◮ Can change

s to s in a predictable way.

◮ Consider k-sum

subsets of multiset {1, 2, . . . , 9, 1, 2, . . . , 5}

slide-78
SLIDE 78

Generating polynomial (E.,Ruskey)

Sn(z) = n

k=1(1 + zk) “generates” k-sum subsets

  • f {1, 2, ..., n}. (algebra omitted...) Let

V Hn(z) = Pn(z)

  • j≥1

S⌊ n−2

2j ⌋(z)

where Pn(z) is a polynomial. For odd n, the kth coefficient of V Hn(z) is the number of n × n coverings with n monominoes and h horizontal dominoes.

slide-79
SLIDE 79

Generating polynomial (E.,Ruskey)

Sn(z) = n

k=1(1 + zk) “generates” k-sum subsets

  • f {1, 2, ..., n}. (algebra omitted...) Let

V Hn(z) = Pn(z)

  • j≥1

S⌊ n−2

2j ⌋(z)

where Pn(z) is a polynomial. For odd n, the kth coefficient of V Hn(z) is the number of n × n coverings with n monominoes and h horizontal dominoes. Cyclotomic polynomial factors: Sn(z) =

n

  • j=1

φ

⌊ n+j

2j ⌋

2j

(z)

slide-80
SLIDE 80

“... where p(z) is a fairly random-looking irreducible polynomial...”

Not as random as it looks. e.g. complex zeros of Pn(z). n is odd. Large n plotted with darker, smaller dots.

slide-81
SLIDE 81

“... where p(z) is a fairly random-looking irreducible polynomial...”

Not as random as it looks.

◮ deg(Pn(z)) = n−2

k=1 Od(k), where Od(k) is

the largest odd divisor of k.

slide-82
SLIDE 82

“... where p(z) is a fairly random-looking irreducible polynomial...”

Not as random as it looks.

◮ deg(Pn(z)) = n−2

k=1 Od(k), where Od(k) is

the largest odd divisor of k.

◮ Pn(1) = n2ν(n−2)−1, where ν(k) is the binary

weight of k.

slide-83
SLIDE 83

“... where p(z) is a fairly random-looking irreducible polynomial...”

Not as random as it looks.

◮ deg(Pn(z)) = n−2

k=1 Od(k), where Od(k) is

the largest odd divisor of k.

◮ Pn(1) = n2ν(n−2)−1, where ν(k) is the binary

weight of k.

◮ ... etc. But, is Pn(z) irreducible?

slide-84
SLIDE 84

“... where p(z) is a fairly random-looking irreducible polynomial...”

Not as random as it looks.

◮ deg(Pn(z)) = n−2

k=1 Od(k), where Od(k) is

the largest odd divisor of k.

◮ Pn(1) = n2ν(n−2)−1, where ν(k) is the binary

weight of k.

◮ ... etc. But, is Pn(z) irreducible? ◮ Can it be computed without dividing

V Hn(z) = Pn(z)

  • j≥1

S⌊ n−2

2j ⌋(z).

slide-85
SLIDE 85

Open problems

◮ Efficient combinatorial generation

All tatami coverings of the 3 × 4 grid.

slide-86
SLIDE 86

Open problems

◮ Efficient combinatorial generation ◮ Generalizations to other tiles

All tatami coverings of the 3 × 4 grid.

slide-87
SLIDE 87

Lozenge 5-Tatami Covering

slide-88
SLIDE 88

Lozenge 5-Tatami Covering

Is Lozenge 5-Tatami Covering NP-hard?

slide-89
SLIDE 89

Tomoku!

INSTANCE: A r × c grid and tiles completely contained in each row and column. QUESTION: Is there a tatami covering of this grid with these row and column projections?

slide-90
SLIDE 90

Tomoku!

INSTANCE: A r × c grid and tiles completely contained in each row and column. QUESTION: Is there a tatami covering of this grid with these row and column projections?

slide-91
SLIDE 91

Water Strider Problem

slide-92
SLIDE 92

Water Strider Problem

slide-93
SLIDE 93

Water Strider Problem

INSTANCE: A rectilinear region, R, with n segments, and vertices in R2. QUESTION: Is there a configuration of at most k water striders, such that no two water striders intersect, and no more water striders can be added?

slide-94
SLIDE 94

Thank you

Thanks also to Bruce Kapron and Don Knuth. Part

  • f this research was conducted at the 9th

McGill-INRIA Workshop on Computational Geometry. Slides at alejandroerickson.com