polyominoes, gray codes, and venn diagrams

116
Polyominoes, Gray Codes, and Venn Diagrams Stirling Chow 1 Frank Ruskey 1 1 Department of Computer Science University of Victoria, CANADA Northwest Theory Day, April 2005

Upload: others

Post on 10-Apr-2022

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Polyominoes, Gray Codes, and Venn Diagrams

Polyominoes, Gray Codes, and Venn Diagrams

Stirling Chow1 Frank Ruskey1

1Department of Computer ScienceUniversity of Victoria, CANADA

Northwest Theory Day, April 2005

Page 2: Polyominoes, Gray Codes, and Venn Diagrams

Definition - polyomino

I Made from unit squaresjoined along edges.

I No holes allowed.

I Must be connected.

I Translations allowed butnot flips or rotations.

(a)

(b)

(c)

(d)

(e)

Page 3: Polyominoes, Gray Codes, and Venn Diagrams

Definition - polyomino

I Made from unit squaresjoined along edges.

I No holes allowed.

I Must be connected.

I Translations allowed butnot flips or rotations.

(a)

(b)

(c)

(d)

(e)

Page 4: Polyominoes, Gray Codes, and Venn Diagrams

Definition - polyomino

I Made from unit squaresjoined along edges.

I No holes allowed.

I Must be connected.

I Translations allowed butnot flips or rotations.

(a)

(b)

(c)

(d)

(e)

Page 5: Polyominoes, Gray Codes, and Venn Diagrams

Definition - polyomino

I Made from unit squaresjoined along edges.

I No holes allowed.

I Must be connected.

I Translations allowed butnot flips or rotations.

(a)

(b)

(c)

(d)

(e)

Page 6: Polyominoes, Gray Codes, and Venn Diagrams

Definition - convexity conditions

I Column convex if intersections with vertical lines areconnected.

I Satisfy the recurrence: an = 5an−1 − 7an−2 + 4an−3

([Polya],nice proof:[Hickerson]).

I Convex if both row and column convex.

I Gray codes: column convex only.

I Further restriction: number of cells in each column is fixed.

(a) column−convexnot row−convex

(b) row−convexnot column−convex

(c) convex

Page 7: Polyominoes, Gray Codes, and Venn Diagrams

Definition - convexity conditions

I Column convex if intersections with vertical lines areconnected.

I Satisfy the recurrence: an = 5an−1 − 7an−2 + 4an−3

([Polya],nice proof:[Hickerson]).

I Convex if both row and column convex.

I Gray codes: column convex only.

I Further restriction: number of cells in each column is fixed.

(a) column−convexnot row−convex

(b) row−convexnot column−convex

(c) convex

Page 8: Polyominoes, Gray Codes, and Venn Diagrams

Definition - convexity conditions

I Column convex if intersections with vertical lines areconnected.

I Satisfy the recurrence: an = 5an−1 − 7an−2 + 4an−3

([Polya],nice proof:[Hickerson]).

I Convex if both row and column convex.

I Gray codes: column convex only.

I Further restriction: number of cells in each column is fixed.

(a) column−convexnot row−convex

(b) row−convexnot column−convex

(c) convex

Page 9: Polyominoes, Gray Codes, and Venn Diagrams

Definition - convexity conditions

I Column convex if intersections with vertical lines areconnected.

I Satisfy the recurrence: an = 5an−1 − 7an−2 + 4an−3

([Polya],nice proof:[Hickerson]).

I Convex if both row and column convex.

I Gray codes: column convex only.

I Further restriction: number of cells in each column is fixed.

(a) column−convexnot row−convex

(b) row−convexnot column−convex

(c) convex

Page 10: Polyominoes, Gray Codes, and Venn Diagrams

Definition - convexity conditions

I Column convex if intersections with vertical lines areconnected.

I Satisfy the recurrence: an = 5an−1 − 7an−2 + 4an−3

([Polya],nice proof:[Hickerson]).

I Convex if both row and column convex.

I Gray codes: column convex only.

I Further restriction: number of cells in each column is fixed.

(a) column−convexnot row−convex

(b) row−convexnot column−convex

(c) convex

Page 11: Polyominoes, Gray Codes, and Venn Diagrams

I Column counts: [a1, a2, . . . , ak ]; below is the set [1, 2, 2, 1].

I Shift limits: 〈A1,A2, . . . ,Ak−1〉, where Ai = ai + ai+1 − 1;thus [1, 2, 2, 1] → 〈2, 3, 2〉.

I Not unique [1, 3, 1, 3] → 〈3, 3, 3〉 and [2, 2, 2, 2] → 〈3, 3, 3〉.I No polyomino for 〈1, 2, 1〉.I Encode individual polyominoes as

(p1, p2, . . . , pk−1) ∈ A1 × A2 × · · · × Ak−1

(1,2,1)(1,2,0)(1,1,1)(1,1,0)(1,0,1)(1,0,0)

(0,0,0) (0,0,1) (0,1,0) (0,1,1) (0,2,0) (0,2,1)

Page 12: Polyominoes, Gray Codes, and Venn Diagrams

I Column counts: [a1, a2, . . . , ak ]; below is the set [1, 2, 2, 1].

I Shift limits: 〈A1,A2, . . . ,Ak−1〉, where Ai = ai + ai+1 − 1;thus [1, 2, 2, 1] → 〈2, 3, 2〉.

I Not unique [1, 3, 1, 3] → 〈3, 3, 3〉 and [2, 2, 2, 2] → 〈3, 3, 3〉.I No polyomino for 〈1, 2, 1〉.I Encode individual polyominoes as

(p1, p2, . . . , pk−1) ∈ A1 × A2 × · · · × Ak−1

(1,2,1)(1,2,0)(1,1,1)(1,1,0)(1,0,1)(1,0,0)

(0,0,0) (0,0,1) (0,1,0) (0,1,1) (0,2,0) (0,2,1)

Page 13: Polyominoes, Gray Codes, and Venn Diagrams

I Column counts: [a1, a2, . . . , ak ]; below is the set [1, 2, 2, 1].

I Shift limits: 〈A1,A2, . . . ,Ak−1〉, where Ai = ai + ai+1 − 1;thus [1, 2, 2, 1] → 〈2, 3, 2〉.

I Not unique [1, 3, 1, 3] → 〈3, 3, 3〉 and [2, 2, 2, 2] → 〈3, 3, 3〉.I No polyomino for 〈1, 2, 1〉.I Encode individual polyominoes as

(p1, p2, . . . , pk−1) ∈ A1 × A2 × · · · × Ak−1

(1,2,1)(1,2,0)(1,1,1)(1,1,0)(1,0,1)(1,0,0)

(0,0,0) (0,0,1) (0,1,0) (0,1,1) (0,2,0) (0,2,1)

Page 14: Polyominoes, Gray Codes, and Venn Diagrams

I Column counts: [a1, a2, . . . , ak ]; below is the set [1, 2, 2, 1].

I Shift limits: 〈A1,A2, . . . ,Ak−1〉, where Ai = ai + ai+1 − 1;thus [1, 2, 2, 1] → 〈2, 3, 2〉.

I Not unique [1, 3, 1, 3] → 〈3, 3, 3〉 and [2, 2, 2, 2] → 〈3, 3, 3〉.I No polyomino for 〈1, 2, 1〉.I Encode individual polyominoes as

(p1, p2, . . . , pk−1) ∈ A1 × A2 × · · · × Ak−1

(1,2,1)(1,2,0)(1,1,1)(1,1,0)(1,0,1)(1,0,0)

(0,0,0) (0,0,1) (0,1,0) (0,1,1) (0,2,0) (0,2,1)

Page 15: Polyominoes, Gray Codes, and Venn Diagrams

I Column counts: [a1, a2, . . . , ak ]; below is the set [1, 2, 2, 1].

I Shift limits: 〈A1,A2, . . . ,Ak−1〉, where Ai = ai + ai+1 − 1;thus [1, 2, 2, 1] → 〈2, 3, 2〉.

I Not unique [1, 3, 1, 3] → 〈3, 3, 3〉 and [2, 2, 2, 2] → 〈3, 3, 3〉.I No polyomino for 〈1, 2, 1〉.I Encode individual polyominoes as

(p1, p2, . . . , pk−1) ∈ A1 × A2 × · · · × Ak−1

(1,2,1)(1,2,0)(1,1,1)(1,1,0)(1,0,1)(1,0,0)

(0,0,0) (0,0,1) (0,1,0) (0,1,1) (0,2,0) (0,2,1)

Page 16: Polyominoes, Gray Codes, and Venn Diagrams

I The change pi := pi ± 1 corresponds to a small earthquake.fault line earthquake begins two unit shift

(1,1,3,2,3,1) (1,1,3,2,3,1) (1,1,5,2,3,1)

I Can generate these using Gray codes for mixed-radix numbers(H-path in k − 1 dimensional grid graph).

I A more interesting move is a single cell move within a column.

I Then pi := pi ± 1 and pi+1 := pi+1 ∓ 1 (except atextremities).

Page 17: Polyominoes, Gray Codes, and Venn Diagrams

I The change pi := pi ± 1 corresponds to a small earthquake.fault line earthquake begins two unit shift

(1,1,3,2,3,1) (1,1,3,2,3,1) (1,1,5,2,3,1)

I Can generate these using Gray codes for mixed-radix numbers(H-path in k − 1 dimensional grid graph).

I A more interesting move is a single cell move within a column.

I Then pi := pi ± 1 and pi+1 := pi+1 ∓ 1 (except atextremities).

Page 18: Polyominoes, Gray Codes, and Venn Diagrams

I The change pi := pi ± 1 corresponds to a small earthquake.fault line earthquake begins two unit shift

(1,1,3,2,3,1) (1,1,3,2,3,1) (1,1,5,2,3,1)

I Can generate these using Gray codes for mixed-radix numbers(H-path in k − 1 dimensional grid graph).

I A more interesting move is a single cell move within a column.

I Then pi := pi ± 1 and pi+1 := pi+1 ∓ 1 (except atextremities).

Page 19: Polyominoes, Gray Codes, and Venn Diagrams

I The change pi := pi ± 1 corresponds to a small earthquake.fault line earthquake begins two unit shift

(1,1,3,2,3,1) (1,1,3,2,3,1) (1,1,5,2,3,1)

I Can generate these using Gray codes for mixed-radix numbers(H-path in k − 1 dimensional grid graph).

I A more interesting move is a single cell move within a column.

I Then pi := pi ± 1 and pi+1 := pi+1 ∓ 1 (except atextremities).

Page 20: Polyominoes, Gray Codes, and Venn Diagrams

I Define two operations (and their inverses) on A-sequences:τi : pi := pi + 1 (only at the endpoints)σi : pi := pi − 1; pi+1 := pi+1 + 1;

I The “problem” of Ai = 1.I Implies that ai , ai+1 = 1. (Since Ai = ai + ai+1 − 1)I I.e., cells i and i + 1 are frozen in place.

I If two or more Ai = 1 then underlying graph is disconnected;otherwise it is connected.

I The graph is denoted G ([a1, . . . , ak ]) or G (〈A1, . . . ,Ak−1〉).I An interesting case occurs when Ak−1 = 1 and Ai > 1,

for i = 1, 2, . . . , k − 2: the right-frozen case.

I Free = neither side frozen.

Page 21: Polyominoes, Gray Codes, and Venn Diagrams

I Define two operations (and their inverses) on A-sequences:τi : pi := pi + 1 (only at the endpoints)σi : pi := pi − 1; pi+1 := pi+1 + 1;

I The “problem” of Ai = 1.I Implies that ai , ai+1 = 1. (Since Ai = ai + ai+1 − 1)I I.e., cells i and i + 1 are frozen in place.

I If two or more Ai = 1 then underlying graph is disconnected;otherwise it is connected.

I The graph is denoted G ([a1, . . . , ak ]) or G (〈A1, . . . ,Ak−1〉).I An interesting case occurs when Ak−1 = 1 and Ai > 1,

for i = 1, 2, . . . , k − 2: the right-frozen case.

I Free = neither side frozen.

Page 22: Polyominoes, Gray Codes, and Venn Diagrams

I Define two operations (and their inverses) on A-sequences:τi : pi := pi + 1 (only at the endpoints)σi : pi := pi − 1; pi+1 := pi+1 + 1;

I The “problem” of Ai = 1.I Implies that ai , ai+1 = 1. (Since Ai = ai + ai+1 − 1)I I.e., cells i and i + 1 are frozen in place.

I If two or more Ai = 1 then underlying graph is disconnected;otherwise it is connected.

I The graph is denoted G ([a1, . . . , ak ]) or G (〈A1, . . . ,Ak−1〉).I An interesting case occurs when Ak−1 = 1 and Ai > 1,

for i = 1, 2, . . . , k − 2: the right-frozen case.

I Free = neither side frozen.

Page 23: Polyominoes, Gray Codes, and Venn Diagrams

I Define two operations (and their inverses) on A-sequences:τi : pi := pi + 1 (only at the endpoints)σi : pi := pi − 1; pi+1 := pi+1 + 1;

I The “problem” of Ai = 1.I Implies that ai , ai+1 = 1. (Since Ai = ai + ai+1 − 1)I I.e., cells i and i + 1 are frozen in place.

I If two or more Ai = 1 then underlying graph is disconnected;otherwise it is connected.

I The graph is denoted G ([a1, . . . , ak ]) or G (〈A1, . . . ,Ak−1〉).I An interesting case occurs when Ak−1 = 1 and Ai > 1,

for i = 1, 2, . . . , k − 2: the right-frozen case.

I Free = neither side frozen.

Page 24: Polyominoes, Gray Codes, and Venn Diagrams

I Define two operations (and their inverses) on A-sequences:τi : pi := pi + 1 (only at the endpoints)σi : pi := pi − 1; pi+1 := pi+1 + 1;

I The “problem” of Ai = 1.I Implies that ai , ai+1 = 1. (Since Ai = ai + ai+1 − 1)I I.e., cells i and i + 1 are frozen in place.

I If two or more Ai = 1 then underlying graph is disconnected;otherwise it is connected.

I The graph is denoted G ([a1, . . . , ak ]) or G (〈A1, . . . ,Ak−1〉).I An interesting case occurs when Ak−1 = 1 and Ai > 1,

for i = 1, 2, . . . , k − 2: the right-frozen case.

I Free = neither side frozen.

Page 25: Polyominoes, Gray Codes, and Venn Diagrams

I Define two operations (and their inverses) on A-sequences:τi : pi := pi + 1 (only at the endpoints)σi : pi := pi − 1; pi+1 := pi+1 + 1;

I The “problem” of Ai = 1.I Implies that ai , ai+1 = 1. (Since Ai = ai + ai+1 − 1)I I.e., cells i and i + 1 are frozen in place.

I If two or more Ai = 1 then underlying graph is disconnected;otherwise it is connected.

I The graph is denoted G ([a1, . . . , ak ]) or G (〈A1, . . . ,Ak−1〉).I An interesting case occurs when Ak−1 = 1 and Ai > 1,

for i = 1, 2, . . . , k − 2: the right-frozen case.

I Free = neither side frozen.

Page 26: Polyominoes, Gray Codes, and Venn Diagrams

I Define two operations (and their inverses) on A-sequences:τi : pi := pi + 1 (only at the endpoints)σi : pi := pi − 1; pi+1 := pi+1 + 1;

I The “problem” of Ai = 1.I Implies that ai , ai+1 = 1. (Since Ai = ai + ai+1 − 1)I I.e., cells i and i + 1 are frozen in place.

I If two or more Ai = 1 then underlying graph is disconnected;otherwise it is connected.

I The graph is denoted G ([a1, . . . , ak ]) or G (〈A1, . . . ,Ak−1〉).I An interesting case occurs when Ak−1 = 1 and Ai > 1,

for i = 1, 2, . . . , k − 2: the right-frozen case.

I Free = neither side frozen.

Page 27: Polyominoes, Gray Codes, and Venn Diagrams

I Define two operations (and their inverses) on A-sequences:τi : pi := pi + 1 (only at the endpoints)σi : pi := pi − 1; pi+1 := pi+1 + 1;

I The “problem” of Ai = 1.I Implies that ai , ai+1 = 1. (Since Ai = ai + ai+1 − 1)I I.e., cells i and i + 1 are frozen in place.

I If two or more Ai = 1 then underlying graph is disconnected;otherwise it is connected.

I The graph is denoted G ([a1, . . . , ak ]) or G (〈A1, . . . ,Ak−1〉).I An interesting case occurs when Ak−1 = 1 and Ai > 1,

for i = 1, 2, . . . , k − 2: the right-frozen case.

I Free = neither side frozen.

Page 28: Polyominoes, Gray Codes, and Venn Diagrams

1,1,0

2,0,0 0,1,0

2,1,0

1,0,0

0,0,0

LemmaIf k is even, then G ([a1, . . . , ak ]) isbipartite.

Proof.Define partite sets according to theparity of∑

j odd

pj (=∑

j

jpj mod 2).

Example

G ([2, 2, 1, 1]) is bipartite.

Page 29: Polyominoes, Gray Codes, and Venn Diagrams

2,1

0,0

1,1

2.0 0,1

1,0

LemmaIf k > 3 is odd, then G ([a1, . . . , ak ])is bipartite iff A1 = 1 or Ak−1 = 1.

Proof.Odd cycle: τ1, σ1, . . . , σk−2, τ

−1k−1:

Example

G ([2, 2, 1]) is not bipartite.

Page 30: Polyominoes, Gray Codes, and Venn Diagrams

2,1

0,0

1,1

2.0 0,1

1,0

LemmaIf k > 3 is odd, then G ([a1, . . . , ak ])is bipartite iff A1 = 1 or Ak−1 = 1.

Proof.Odd cycle: τ1, σ1, . . . , σk−2, τ

−1k−1:

0000,

Example

G ([2, 2, 1]) is not bipartite.

Page 31: Polyominoes, Gray Codes, and Venn Diagrams

2,1

0,0

1,1

2.0 0,1

1,0

LemmaIf k > 3 is odd, then G ([a1, . . . , ak ])is bipartite iff A1 = 1 or Ak−1 = 1.

Proof.Odd cycle: τ1, σ1, . . . , σk−2, τ

−1k−1:

0000,1000,

Example

G ([2, 2, 1]) is not bipartite.

Page 32: Polyominoes, Gray Codes, and Venn Diagrams

2,1

0,0

1,1

2.0 0,1

1,0

LemmaIf k > 3 is odd, then G ([a1, . . . , ak ])is bipartite iff A1 = 1 or Ak−1 = 1.

Proof.Odd cycle: τ1, σ1, . . . , σk−2, τ

−1k−1:

0000,1000,0100,

Example

G ([2, 2, 1]) is not bipartite.

Page 33: Polyominoes, Gray Codes, and Venn Diagrams

2,1

0,0

1,1

2.0 0,1

1,0

LemmaIf k > 3 is odd, then G ([a1, . . . , ak ])is bipartite iff A1 = 1 or Ak−1 = 1.

Proof.Odd cycle: τ1, σ1, . . . , σk−2, τ

−1k−1:

0000,1000,0100,0010,

Example

G ([2, 2, 1]) is not bipartite.

Page 34: Polyominoes, Gray Codes, and Venn Diagrams

2,1

0,0

1,1

2.0 0,1

1,0

LemmaIf k > 3 is odd, then G ([a1, . . . , ak ])is bipartite iff A1 = 1 or Ak−1 = 1.

Proof.Odd cycle: τ1, σ1, . . . , σk−2, τ

−1k−1:

0000,1000,0100,0010,0001,

Example

G ([2, 2, 1]) is not bipartite.

Page 35: Polyominoes, Gray Codes, and Venn Diagrams

2,1

0,0

1,1

2.0 0,1

1,0

LemmaIf k > 3 is odd, then G ([a1, . . . , ak ])is bipartite iff A1 = 1 or Ak−1 = 1.

Proof.Odd cycle: τ1, σ1, . . . , σk−2, τ

−1k−1:

0000, 0000.1000,0100,0010,0001,

Example

G ([2, 2, 1]) is not bipartite.

Page 36: Polyominoes, Gray Codes, and Venn Diagrams

LemmaIf k > 2 is even, then G (a) has no Hamilton path if A2i+1 is oddfor all i , unless a2 = a3 = · · · = ak−1 = 1.

Proof.Define a sign-reversing involution... If all A2i+1 are odd, thenparity difference is

d(A) =∏

j even

Aj .

Example

G (〈3, 2, 3, 2, 3〉) has no H-path.G (〈3, 1, 1, 1, 3〉) is a 3 by 3 grid and has a H-path.Conjecture: There is a H-path if k even and some A2i+1 is even.

Page 37: Polyominoes, Gray Codes, and Venn Diagrams

TheoremIf G (〈A1,A2, . . . ,Ak−1〉) has a Hamilton path H and BC is evenand BC 6= 6, then G (〈B,A1,A2, . . . ,Ak−1,C 〉) has a Hamiltonpath H ′.

Proof.Convert each edge of H into a path of BC vertices in H ′. Thestructure of B,C is a B by C grid graph. Need to be careful aboutthe τ moves in H.... Need to show the existence of particular typesof H-cycles in grid graphs....

TheoremIf A has the form (N>3)

0|1(O>3N>1)∗(N)0|1E or it’s reverse, then

there is a 1-move Gray code for A

Proof.Add pairs of columns on the left...

Page 38: Polyominoes, Gray Codes, and Venn Diagrams

TheoremIf G (〈A1,A2, . . . ,Ak−1〉) has a Hamilton path H and BC is evenand BC 6= 6, then G (〈B,A1,A2, . . . ,Ak−1,C 〉) has a Hamiltonpath H ′.

Example

Converting G (2, 2) into G (2, 2, 2, 2).0 0 1 10 1 0 1

Page 39: Polyominoes, Gray Codes, and Venn Diagrams

TheoremIf G (〈A1,A2, . . . ,Ak−1〉) has a Hamilton path H and BC is evenand BC 6= 6, then G (〈B,A1,A2, . . . ,Ak−1,C 〉) has a Hamiltonpath H ′.

Example

Converting G (2, 2) into G (2, 2, 2, 2).0 0 1 10 1 0 1

0 0 0 00 0 0 0

Page 40: Polyominoes, Gray Codes, and Venn Diagrams

TheoremIf G (〈A1,A2, . . . ,Ak−1〉) has a Hamilton path H and BC is evenand BC 6= 6, then G (〈B,A1,A2, . . . ,Ak−1,C 〉) has a Hamiltonpath H ′.

Example

Converting G (2, 2) into G (2, 2, 2, 2).0 0 1 10 1 0 1

? ? ? ?0 0 0 0 00 0 0 0 1? ? ? ?

Page 41: Polyominoes, Gray Codes, and Venn Diagrams

TheoremIf G (〈A1,A2, . . . ,Ak−1〉) has a Hamilton path H and BC is evenand BC 6= 6, then G (〈B,A1,A2, . . . ,Ak−1,C 〉) has a Hamiltonpath H ′.

Example

Converting G (2, 2) into G (2, 2, 2, 2).0 0 1 10 1 0 1

? ? ? ?0 0 0 0 00 0 0 0 1? ? ? 1 0

Page 42: Polyominoes, Gray Codes, and Venn Diagrams

TheoremIf G (〈A1,A2, . . . ,Ak−1〉) has a Hamilton path H and BC is evenand BC 6= 6, then G (〈B,A1,A2, . . . ,Ak−1,C 〉) has a Hamiltonpath H ′.

Example

Converting G (2, 2) into G (2, 2, 2, 2).0 0 1 10 1 0 1

0 1 1 0 00 0 0 0 00 0 0 0 10 0 1 1 0

Page 43: Polyominoes, Gray Codes, and Venn Diagrams

TheoremIf G (〈A1,A2, . . . ,Ak−1〉) has a Hamilton path H and BC is evenand BC 6= 6, then G (〈B,A1,A2, . . . ,Ak−1,C 〉) has a Hamiltonpath H ′.

Example

Converting G (2, 2) into G (2, 2, 2, 2).0 0 1 10 1 0 1

0 1 1 0 0 ? ? ?0 0 0 0 0 0 0 0 10 0 0 0 1 1 1 1 00 0 1 1 0 ? ? ?

Page 44: Polyominoes, Gray Codes, and Venn Diagrams

TheoremIf G (〈A1,A2, . . . ,Ak−1〉) has a Hamilton path H and BC is evenand BC 6= 6, then G (〈B,A1,A2, . . . ,Ak−1,C 〉) has a Hamiltonpath H ′.

Example

Converting G (2, 2) into G (2, 2, 2, 2).0 0 1 10 1 0 1

0 1 1 0 0 0 1 1 10 0 0 0 0 0 0 0 10 0 0 0 1 1 1 1 00 0 1 1 0 1 1 0 0

Page 45: Polyominoes, Gray Codes, and Venn Diagrams

TheoremIf G (〈A1,A2, . . . ,Ak−1〉) has a Hamilton path H and BC is evenand BC 6= 6, then G (〈B,A1,A2, . . . ,Ak−1,C 〉) has a Hamiltonpath H ′.

Example

Converting G (2, 2) into G (2, 2, 2, 2).0 0 1 10 1 0 1

0 1 1 0 0 0 1 1 1 ? ? ?0 0 0 0 0 0 0 0 1 1 1 1 10 0 0 0 1 1 1 1 0 0 0 0 10 0 1 1 0 1 1 0 0 ? ? ?

Page 46: Polyominoes, Gray Codes, and Venn Diagrams

TheoremIf G (〈A1,A2, . . . ,Ak−1〉) has a Hamilton path H and BC is evenand BC 6= 6, then G (〈B,A1,A2, . . . ,Ak−1,C 〉) has a Hamiltonpath H ′.

Example

Converting G (2, 2) into G (2, 2, 2, 2).0 0 1 10 1 0 1

0 1 1 0 0 0 1 1 1 0 0 1 10 0 0 0 0 0 0 0 1 1 1 1 10 0 0 0 1 1 1 1 0 0 0 0 10 0 1 1 0 1 1 0 0 0 1 1 0

Page 47: Polyominoes, Gray Codes, and Venn Diagrams

TheoremIf G (〈A1,A2, . . . ,Ak−1〉) has a Hamilton path H and BC is evenand BC 6= 6, then G (〈B,A1,A2, . . . ,Ak−1,C 〉) has a Hamiltonpath H ′.

Example

Converting G (2, 2) into G (2, 2, 2, 2).0 0 1 10 1 0 1

0 1 1 0 0 0 1 1 1 0 0 1 1 ? ? ?0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 10 0 0 0 1 1 1 1 0 0 0 0 1 1 1 10 0 1 1 0 1 1 0 0 0 1 1 0 ? ? ?

Page 48: Polyominoes, Gray Codes, and Venn Diagrams

TheoremIf G (〈A1,A2, . . . ,Ak−1〉) has a Hamilton path H and BC is evenand BC 6= 6, then G (〈B,A1,A2, . . . ,Ak−1,C 〉) has a Hamiltonpath H ′.

Example

Converting G (2, 2) into G (2, 2, 2, 2).0 0 1 10 1 0 1

0 1 1 0 0 0 1 1 1 0 0 1 1 0 0 10 0 0 0 0 0 0 0 1 1 1 1 1 1 1 10 0 0 0 1 1 1 1 0 0 0 0 1 1 1 10 0 1 1 0 1 1 0 0 0 1 1 0 0 1 1

Page 49: Polyominoes, Gray Codes, and Venn Diagrams

TheoremIf A has the form (N>3)

0|1(O>3N>1)∗(N)0|1E or it’s reverse, then

there is a 1-move Gray code for A

Page 50: Polyominoes, Gray Codes, and Venn Diagrams

Right-frozen case – a poset

I Operations are τ1 and σ1, σ2, . . ..

I Underlying poset G (〈A1,A2, . . . ,Ak−1, 1〉) orders p-sequences:(p1, p2, . . . , pk−1) ≤ (q1, q2, . . . , qk−1) iff

k−1∑i=j

pi ≤k−1∑i=j

qi

I The operations are the cover relations.

I G (〈2, 2, . . . , 2︸ ︷︷ ︸n

, 1〉) is M(n) (e.g., [Lindstrom][Stanley])

I Is a distributive lattice in general.

I Join irreducibles: A′1A

′2 · · ·A′

i0 · · · 0xA′j+1 · · ·A′

k−1, where0 ≤ x < A′

j := Aj − 1. There are∑

j jA′j of them.

I Is self-dual under the mappingp1 · · · pk−1 7→ (A′

1 − p1) · · · (A′k−1 − pk−1).

Page 51: Polyominoes, Gray Codes, and Venn Diagrams

Right-frozen case – a poset

I Operations are τ1 and σ1, σ2, . . ..

I Underlying poset G (〈A1,A2, . . . ,Ak−1, 1〉) orders p-sequences:(p1, p2, . . . , pk−1) ≤ (q1, q2, . . . , qk−1) iff

k−1∑i=j

pi ≤k−1∑i=j

qi

I The operations are the cover relations.

I G (〈2, 2, . . . , 2︸ ︷︷ ︸n

, 1〉) is M(n) (e.g., [Lindstrom][Stanley])

I Is a distributive lattice in general.

I Join irreducibles: A′1A

′2 · · ·A′

i0 · · · 0xA′j+1 · · ·A′

k−1, where0 ≤ x < A′

j := Aj − 1. There are∑

j jA′j of them.

I Is self-dual under the mappingp1 · · · pk−1 7→ (A′

1 − p1) · · · (A′k−1 − pk−1).

Page 52: Polyominoes, Gray Codes, and Venn Diagrams

Right-frozen case – a poset

I Operations are τ1 and σ1, σ2, . . ..

I Underlying poset G (〈A1,A2, . . . ,Ak−1, 1〉) orders p-sequences:(p1, p2, . . . , pk−1) ≤ (q1, q2, . . . , qk−1) iff

k−1∑i=j

pi ≤k−1∑i=j

qi

I The operations are the cover relations.

I G (〈2, 2, . . . , 2︸ ︷︷ ︸n

, 1〉) is M(n) (e.g., [Lindstrom][Stanley])

I Is a distributive lattice in general.

I Join irreducibles: A′1A

′2 · · ·A′

i0 · · · 0xA′j+1 · · ·A′

k−1, where0 ≤ x < A′

j := Aj − 1. There are∑

j jA′j of them.

I Is self-dual under the mappingp1 · · · pk−1 7→ (A′

1 − p1) · · · (A′k−1 − pk−1).

Page 53: Polyominoes, Gray Codes, and Venn Diagrams

Right-frozen case – a poset

I Operations are τ1 and σ1, σ2, . . ..

I Underlying poset G (〈A1,A2, . . . ,Ak−1, 1〉) orders p-sequences:(p1, p2, . . . , pk−1) ≤ (q1, q2, . . . , qk−1) iff

k−1∑i=j

pi ≤k−1∑i=j

qi

I The operations are the cover relations.

I G (〈2, 2, . . . , 2︸ ︷︷ ︸n

, 1〉) is M(n) (e.g., [Lindstrom][Stanley])

I Is a distributive lattice in general.

I Join irreducibles: A′1A

′2 · · ·A′

i0 · · · 0xA′j+1 · · ·A′

k−1, where0 ≤ x < A′

j := Aj − 1. There are∑

j jA′j of them.

I Is self-dual under the mappingp1 · · · pk−1 7→ (A′

1 − p1) · · · (A′k−1 − pk−1).

Page 54: Polyominoes, Gray Codes, and Venn Diagrams

Right-frozen case – a poset

I Operations are τ1 and σ1, σ2, . . ..

I Underlying poset G (〈A1,A2, . . . ,Ak−1, 1〉) orders p-sequences:(p1, p2, . . . , pk−1) ≤ (q1, q2, . . . , qk−1) iff

k−1∑i=j

pi ≤k−1∑i=j

qi

I The operations are the cover relations.

I G (〈2, 2, . . . , 2︸ ︷︷ ︸n

, 1〉) is M(n) (e.g., [Lindstrom][Stanley])

I Is a distributive lattice in general.

I Join irreducibles: A′1A

′2 · · ·A′

i0 · · · 0xA′j+1 · · ·A′

k−1, where0 ≤ x < A′

j := Aj − 1. There are∑

j jA′j of them.

I Is self-dual under the mappingp1 · · · pk−1 7→ (A′

1 − p1) · · · (A′k−1 − pk−1).

Page 55: Polyominoes, Gray Codes, and Venn Diagrams

Right-frozen case – a poset

I Operations are τ1 and σ1, σ2, . . ..

I Underlying poset G (〈A1,A2, . . . ,Ak−1, 1〉) orders p-sequences:(p1, p2, . . . , pk−1) ≤ (q1, q2, . . . , qk−1) iff

k−1∑i=j

pi ≤k−1∑i=j

qi

I The operations are the cover relations.

I G (〈2, 2, . . . , 2︸ ︷︷ ︸n

, 1〉) is M(n) (e.g., [Lindstrom][Stanley])

I Is a distributive lattice in general.

I Join irreducibles: A′1A

′2 · · ·A′

i0 · · · 0xA′j+1 · · ·A′

k−1, where0 ≤ x < A′

j := Aj − 1. There are∑

j jA′j of them.

I Is self-dual under the mappingp1 · · · pk−1 7→ (A′

1 − p1) · · · (A′k−1 − pk−1).

Page 56: Polyominoes, Gray Codes, and Venn Diagrams

Right-frozen case – a poset

I Operations are τ1 and σ1, σ2, . . ..

I Underlying poset G (〈A1,A2, . . . ,Ak−1, 1〉) orders p-sequences:(p1, p2, . . . , pk−1) ≤ (q1, q2, . . . , qk−1) iff

k−1∑i=j

pi ≤k−1∑i=j

qi

I The operations are the cover relations.

I G (〈2, 2, . . . , 2︸ ︷︷ ︸n

, 1〉) is M(n) (e.g., [Lindstrom][Stanley])

I Is a distributive lattice in general.

I Join irreducibles: A′1A

′2 · · ·A′

i0 · · · 0xA′j+1 · · ·A′

k−1, where0 ≤ x < A′

j := Aj − 1. There are∑

j jA′j of them.

I Is self-dual under the mappingp1 · · · pk−1 7→ (A′

1 − p1) · · · (A′k−1 − pk−1).

Page 57: Polyominoes, Gray Codes, and Venn Diagrams

Further properties

I The rank of a p-sequence is

r(p) =k−1∑j=1

jpj .

I Rank generating function is

k−1∏j=1

1− z jAj

1− z j

I Since G is the cover graph of a distributive lattice, its prism isHamiltonian ([Pruesse & R]). Thus G 2 is Hamiltonian. Notthe same as moving two cells!

Page 58: Polyominoes, Gray Codes, and Venn Diagrams

Further properties

I The rank of a p-sequence is

r(p) =k−1∑j=1

jpj .

I Rank generating function is

k−1∏j=1

1− z jAj

1− z j

I Since G is the cover graph of a distributive lattice, its prism isHamiltonian ([Pruesse & R]). Thus G 2 is Hamiltonian. Notthe same as moving two cells!

Page 59: Polyominoes, Gray Codes, and Venn Diagrams

Further properties

I The rank of a p-sequence is

r(p) =k−1∑j=1

jpj .

I Rank generating function is

k−1∏j=1

1− z jAj

1− z j

I Since G is the cover graph of a distributive lattice, its prism isHamiltonian ([Pruesse & R]). Thus G 2 is Hamiltonian. Notthe same as moving two cells!

Page 60: Polyominoes, Gray Codes, and Venn Diagrams

LemmaThe graph G (〈2, . . . , 2, 1〉) has a Hamilton path if and only if(n+1

2

)is even and n 6= 5.

Proof.This follows from the results of Savage, Shields, and West.

TheoremFor all n > 0 the graph G (〈2, 2, . . . , 2︸ ︷︷ ︸

n

〉) is Hamiltonian.

Proof.Induction on n with a suitably strengthened hypothesis...

Page 61: Polyominoes, Gray Codes, and Venn Diagrams

LemmaThe graph G (〈2, . . . , 2, 1〉) has a Hamilton path if and only if(n+1

2

)is even and n 6= 5.

Proof.This follows from the results of Savage, Shields, and West.

TheoremFor all n > 0 the graph G (〈2, 2, . . . , 2︸ ︷︷ ︸

n

〉) is Hamiltonian.

Proof.Induction on n with a suitably strengthened hypothesis...

Page 62: Polyominoes, Gray Codes, and Venn Diagrams

LemmaThe graph G (〈2, . . . , 2, 1〉) has a Hamilton path if and only if(n+1

2

)is even and n 6= 5.

Proof.This follows from the results of Savage, Shields, and West.

TheoremFor all n > 0 the graph G (〈2, 2, . . . , 2︸ ︷︷ ︸

n

〉) is Hamiltonian.

Proof.Induction on n with a suitably strengthened hypothesis...

Page 63: Polyominoes, Gray Codes, and Venn Diagrams

LemmaThe graph G (〈2, . . . , 2, 1〉) has a Hamilton path if and only if(n+1

2

)is even and n 6= 5.

Proof.This follows from the results of Savage, Shields, and West.

TheoremFor all n > 0 the graph G (〈2, 2, . . . , 2︸ ︷︷ ︸

n

〉) is Hamiltonian.

Proof.Induction on n with a suitably strengthened hypothesis...

Page 64: Polyominoes, Gray Codes, and Venn Diagrams

LemmaThere is no Hamilton path in G (〈A1,A2, . . . ,Ak , 1〉) if (1) has thesame parity as A1A2 · · ·Ak .

k∑j=1

j(Aj − 1) =k∑

j=1

jA′j . (1)

Proof.Note that 00 · · · 00 and A′

1A′2 · · ·A′

k0 are pendant vertices in aA1A2 · · ·Ak vertex bipartite graph G and that their distance fromeach other is precisely (1).

Page 65: Polyominoes, Gray Codes, and Venn Diagrams

LemmaThere is no Hamilton path in G (〈A1,A2, . . . ,Ak , 1〉) if (1) has thesame parity as A1A2 · · ·Ak .

k∑j=1

j(Aj − 1) =k∑

j=1

jA′j . (1)

Proof.Note that 00 · · · 00 and A′

1A′2 · · ·A′

k0 are pendant vertices in aA1A2 · · ·Ak vertex bipartite graph G and that their distance fromeach other is precisely (1).

Page 66: Polyominoes, Gray Codes, and Venn Diagrams

44

43

42

41

40

40

30

20

10

00

34

00

10

20

30

40

44

34

2443

33 14

34

24

43042342

42 04

14

1332

41 03032241

1231

21 02

11 00

01

0240

01

I The Poset G (〈5, 5, 1〉). Joinirreducibles in yellow.

I The subposet of join-irreducibles.

I Both are self-dual.

I Note: G (〈5, 5, 1〉) notrank-unimodal.

Page 67: Polyominoes, Gray Codes, and Venn Diagrams

44

43

42

41

40

40

30

20

10

00

34

00

10

20

30

40

44

34

2443

33 14

34

24

43042342

42 04

14

1332

41 03032241

1231

21 02

11 00

01

0240

01

I The Poset G (〈5, 5, 1〉). Joinirreducibles in yellow.

I The subposet of join-irreducibles.

I Both are self-dual.

I Note: G (〈5, 5, 1〉) notrank-unimodal.

Page 68: Polyominoes, Gray Codes, and Venn Diagrams

44

43

42

41

40

40

30

20

10

00

34

00

10

20

30

40

44

34

2443

33 14

34

24

43042342

42 04

14

1332

41 03032241

1231

21 02

11 00

01

0240

01

I The Poset G (〈5, 5, 1〉). Joinirreducibles in yellow.

I The subposet of join-irreducibles.

I Both are self-dual.

I Note: G (〈5, 5, 1〉) notrank-unimodal.

Page 69: Polyominoes, Gray Codes, and Venn Diagrams

44

43

42

41

40

40

30

20

10

00

34

00

10

20

30

40

44

34

2443

33 14

34

24

43042342

42 04

14

1332

41 03032241

1231

21 02

11 00

01

0240

01

I The Poset G (〈5, 5, 1〉). Joinirreducibles in yellow.

I The subposet of join-irreducibles.

I Both are self-dual.

I Note: G (〈5, 5, 1〉) notrank-unimodal.

Page 70: Polyominoes, Gray Codes, and Venn Diagrams

Posets - Join Irreducibles

200 001

122

000

220

221

212 022

202

201

012

022

Expanding

I G (〈3, 3, 3, 1〉).I Ends with 2 or

not.

I G (〈3, 3, 3, 3, 1〉).

Page 71: Polyominoes, Gray Codes, and Venn Diagrams

Posets - Join Irreducibles

0222

0122

0222

1222

2012

2022

2122

2212

2202

2002

0002

0012

2221

2220 2201

2200 2001

00012000

0000

Expanding

I G (〈3, 3, 3, 1〉).I Ends with 2 or

not.

I G (〈3, 3, 3, 3, 1〉).

Page 72: Polyominoes, Gray Codes, and Venn Diagrams

Posets - Join Irreducibles

0222

0122

0222

1222

2012

2022

2122

2212

2202

2002

0002

0012

2221

2220 2201

2200 2001

00012000

0000

Expanding

I G (〈3, 3, 3, 1〉).I Ends with 2 or

not.

I G (〈3, 3, 3, 3, 1〉).

Page 73: Polyominoes, Gray Codes, and Venn Diagrams

More on unimodality

I Let c(S) be the smallest value of k for which P(S i ) is rankunimodal for all i ≥ k.

I Example What is c(2, 3)? The rank gf is(1 + z)(1 + z2 + z4) = 1 + z + z2 + z3 + z4 + z5.

I Ranks of 2, 3, 2:1 1 1 1 1 1

1 1 1 1 1 1

1 1 1 2 2 2 1 1 1

I Ranks of 2, 3, 2, 3 are1 1 1 2 2 2 1 1 1

1 1 1 2 2 2 1 1 11 1 1 2 2 2 1 1 1

1 1 1 2 3 3 2 3 4 3 2 3 3 2 1 1 1which is not unimodal.

I Continuing, P((2, 3)5) is not unimodal, but P((2, 3)k) appearsto be unimodal for k ≥ 6 (checked up to k = 200).

Page 74: Polyominoes, Gray Codes, and Venn Diagrams

More on unimodality

I Let c(S) be the smallest value of k for which P(S i ) is rankunimodal for all i ≥ k. Well defined?

I Example What is c(2, 3)? The rank gf is(1 + z)(1 + z2 + z4) = 1 + z + z2 + z3 + z4 + z5.

I Ranks of 2, 3, 2:1 1 1 1 1 1

1 1 1 1 1 1

1 1 1 2 2 2 1 1 1

I Ranks of 2, 3, 2, 3 are1 1 1 2 2 2 1 1 1

1 1 1 2 2 2 1 1 11 1 1 2 2 2 1 1 1

1 1 1 2 3 3 2 3 4 3 2 3 3 2 1 1 1which is not unimodal.

I Continuing, P((2, 3)5) is not unimodal, but P((2, 3)k) appearsto be unimodal for k ≥ 6 (checked up to k = 200).

Page 75: Polyominoes, Gray Codes, and Venn Diagrams

More on unimodality

I Let c(S) be the smallest value of k for which P(S i ) is rankunimodal for all i ≥ k. Well defined?

I Example What is c(2, 3)? The rank gf is(1 + z)(1 + z2 + z4) = 1 + z + z2 + z3 + z4 + z5.

I Ranks of 2, 3, 2:1 1 1 1 1 1

1 1 1 1 1 1

1 1 1 2 2 2 1 1 1

I Ranks of 2, 3, 2, 3 are1 1 1 2 2 2 1 1 1

1 1 1 2 2 2 1 1 11 1 1 2 2 2 1 1 1

1 1 1 2 3 3 2 3 4 3 2 3 3 2 1 1 1which is not unimodal.

I Continuing, P((2, 3)5) is not unimodal, but P((2, 3)k) appearsto be unimodal for k ≥ 6 (checked up to k = 200).

Page 76: Polyominoes, Gray Codes, and Venn Diagrams

More on unimodality

I Let c(S) be the smallest value of k for which P(S i ) is rankunimodal for all i ≥ k. Well defined?

I Example What is c(2, 3)? The rank gf is(1 + z)(1 + z2 + z4) = 1 + z + z2 + z3 + z4 + z5.

I Ranks of 2, 3, 2:1 1 1 1 1 1◦ ◦ ◦ 1 1 1 1 1 1

1 1 1 2 2 2 1 1 1

I Ranks of 2, 3, 2, 3 are1 1 1 2 2 2 1 1 1

1 1 1 2 2 2 1 1 11 1 1 2 2 2 1 1 1

1 1 1 2 3 3 2 3 4 3 2 3 3 2 1 1 1which is not unimodal.

I Continuing, P((2, 3)5) is not unimodal, but P((2, 3)k) appearsto be unimodal for k ≥ 6 (checked up to k = 200).

Page 77: Polyominoes, Gray Codes, and Venn Diagrams

More on unimodality

I Let c(S) be the smallest value of k for which P(S i ) is rankunimodal for all i ≥ k. Well defined?

I Example What is c(2, 3)? The rank gf is(1 + z)(1 + z2 + z4) = 1 + z + z2 + z3 + z4 + z5.

I Ranks of 2, 3, 2:1 1 1 1 1 1

1 1 1 1 1 1

1 1 1 2 2 2 1 1 1

I Ranks of 2, 3, 2, 3 are1 1 1 2 2 2 1 1 1◦ ◦ ◦ ◦ 1 1 1 2 2 2 1 1 1

◦ ◦ ◦ ◦ 1 1 1 2 2 2 1 1 1

1 1 1 2 3 3 2 3 4 3 2 3 3 2 1 1 1which is not unimodal.

I Continuing, P((2, 3)5) is not unimodal, but P((2, 3)k) appearsto be unimodal for k ≥ 6 (checked up to k = 200).

Page 78: Polyominoes, Gray Codes, and Venn Diagrams

c(n, m)2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

2 1 6 1 7 1 5 1 7 1 5 1 5 1 5 1 5 1 5 13 7 6 8 8 8 a 8 a 9 a b a b a c c c c c4 4 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 15 6 1 3 4 6 5 6 5 6 6 7 6 7 6 7 6 7 7 76 1 1 1 3 1 1 1 3 1 3 1 3 1 3 1 3 1 3 17 3 1 1 2 4 4 4 4 4 4 5 5 5 6 5 6 5 6 58 3 1 1 3 1 3 1 1 1 3 1 1 1 1 1 1 1 1 19 4 1 1 1 3 3 3 3 4 4 4 4 4 4 4 4 4 4 510 3 1 1 1 1 1 1 3 1 1 1 3 1 1 1 3 1 3 111 3 1 3 1 1 2 4 4 4 4 4 4 4 4 4 4 4 4 412 1 1 1 1 1 3 1 3 1 3 1 3 1 3 1 1 1 3 113 4 1 3 1 3 1 2 2 3 3 3 3 3 3 4 4 4 4 414 4 1 3 3 1 3 1 3 1 3 1 3 1 1 1 3 1 1 115 1 4 4 4 1 4 4 2 4 4 4 4 4 4 4 4 4 4 416 4 1 3 3 1 1 1 3 1 3 1 3 1 3 1 3 1 3 117 4 1 3 3 1 1 3 1 3 2 3 3 3 3 3 3 3 3 318 4 1 1 1 1 1 1 3 1 3 1 3 1 3 1 3 1 3 119 4 1 4 3 1 1 1 1 1 2 3 2 3 3 3 3 4 4 420 3 1 3 3 1 3 1 1 1 3 1 3 1 3 1 3 1 3 1

Page 79: Polyominoes, Gray Codes, and Venn Diagrams

Remarks about c(m, n)

I Only the 2,2 entry is proven.

I Most entries are checked out to k = 30. The numbers arehuge; i.e., the underlying poset has (nm)30 elements.

I Some conjectures:I For odd m, limn→∞ c(m, n) = cm. In particular, c3 = 16 (the

value 16 first occurs for k = 90).I For even m with an odd factor, for large enough n, if n even

then c(m, n) = 1 and if n is odd then c(m, n) = 3.I If m = 2d then c(m, n) = 1 for n ≥ 2d+1.I For m ≥ 25, c(m, 3) = 1 if 5 | m; otherwise, c(m, 3) = 4.I For m ≥ 15, c(m, 3) = 1, 3, 4 if

m = ({0}, {5, 10}, other) mod 15.

Page 80: Polyominoes, Gray Codes, and Venn Diagrams

Remarks about c(m, n)

I Only the 2,2 entry is proven.

I Most entries are checked out to k = 30. The numbers arehuge; i.e., the underlying poset has (nm)30 elements.

I Some conjectures:I For odd m, limn→∞ c(m, n) = cm. In particular, c3 = 16 (the

value 16 first occurs for k = 90).I For even m with an odd factor, for large enough n, if n even

then c(m, n) = 1 and if n is odd then c(m, n) = 3.I If m = 2d then c(m, n) = 1 for n ≥ 2d+1.I For m ≥ 25, c(m, 3) = 1 if 5 | m; otherwise, c(m, 3) = 4.I For m ≥ 15, c(m, 3) = 1, 3, 4 if

m = ({0}, {5, 10}, other) mod 15.

Page 81: Polyominoes, Gray Codes, and Venn Diagrams

Remarks about c(m, n)

I Only the 2,2 entry is proven.

I Most entries are checked out to k = 30. The numbers arehuge; i.e., the underlying poset has (nm)30 elements.

I Some conjectures:I For odd m, limn→∞ c(m, n) = cm. In particular, c3 = 16 (the

value 16 first occurs for k = 90).I For even m with an odd factor, for large enough n, if n even

then c(m, n) = 1 and if n is odd then c(m, n) = 3.I If m = 2d then c(m, n) = 1 for n ≥ 2d+1.I For m ≥ 25, c(m, 3) = 1 if 5 | m; otherwise, c(m, 3) = 4.I For m ≥ 15, c(m, 3) = 1, 3, 4 if

m = ({0}, {5, 10}, other) mod 15.

Page 82: Polyominoes, Gray Codes, and Venn Diagrams

Remarks about c(m, n)

I Only the 2,2 entry is proven.

I Most entries are checked out to k = 30. The numbers arehuge; i.e., the underlying poset has (nm)30 elements.

I Some conjectures:I For odd m, limn→∞ c(m, n) = cm. In particular, c3 = 16 (the

value 16 first occurs for k = 90).I For even m with an odd factor, for large enough n, if n even

then c(m, n) = 1 and if n is odd then c(m, n) = 3.I If m = 2d then c(m, n) = 1 for n ≥ 2d+1.I For m ≥ 25, c(m, 3) = 1 if 5 | m; otherwise, c(m, 3) = 4.I For m ≥ 15, c(m, 3) = 1, 3, 4 if

m = ({0}, {5, 10}, other) mod 15.

Page 83: Polyominoes, Gray Codes, and Venn Diagrams

Remarks about c(m, n)

I Only the 2,2 entry is proven.

I Most entries are checked out to k = 30. The numbers arehuge; i.e., the underlying poset has (nm)30 elements.

I Some conjectures:I For odd m, limn→∞ c(m, n) = cm. In particular, c3 = 16 (the

value 16 first occurs for k = 90).I For even m with an odd factor, for large enough n, if n even

then c(m, n) = 1 and if n is odd then c(m, n) = 3.I If m = 2d then c(m, n) = 1 for n ≥ 2d+1.I For m ≥ 25, c(m, 3) = 1 if 5 | m; otherwise, c(m, 3) = 4.I For m ≥ 15, c(m, 3) = 1, 3, 4 if

m = ({0}, {5, 10}, other) mod 15.

Page 84: Polyominoes, Gray Codes, and Venn Diagrams

Remarks about c(m, n)

I Only the 2,2 entry is proven.

I Most entries are checked out to k = 30. The numbers arehuge; i.e., the underlying poset has (nm)30 elements.

I Some conjectures:I For odd m, limn→∞ c(m, n) = cm. In particular, c3 = 16 (the

value 16 first occurs for k = 90).I For even m with an odd factor, for large enough n, if n even

then c(m, n) = 1 and if n is odd then c(m, n) = 3.I If m = 2d then c(m, n) = 1 for n ≥ 2d+1.I For m ≥ 25, c(m, 3) = 1 if 5 | m; otherwise, c(m, 3) = 4.I For m ≥ 15, c(m, 3) = 1, 3, 4 if

m = ({0}, {5, 10}, other) mod 15.

Page 85: Polyominoes, Gray Codes, and Venn Diagrams

Remarks about c(m, n)

I Only the 2,2 entry is proven.

I Most entries are checked out to k = 30. The numbers arehuge; i.e., the underlying poset has (nm)30 elements.

I Some conjectures:I For odd m, limn→∞ c(m, n) = cm. In particular, c3 = 16 (the

value 16 first occurs for k = 90).I For even m with an odd factor, for large enough n, if n even

then c(m, n) = 1 and if n is odd then c(m, n) = 3.I If m = 2d then c(m, n) = 1 for n ≥ 2d+1.I For m ≥ 25, c(m, 3) = 1 if 5 | m; otherwise, c(m, 3) = 4.I For m ≥ 15, c(m, 3) = 1, 3, 4 if

m = ({0}, {5, 10}, other) mod 15.

Page 86: Polyominoes, Gray Codes, and Venn Diagrams

Remarks about c(m, n)

I Only the 2,2 entry is proven.

I Most entries are checked out to k = 30. The numbers arehuge; i.e., the underlying poset has (nm)30 elements.

I Some conjectures:I For odd m, limn→∞ c(m, n) = cm. In particular, c3 = 16 (the

value 16 first occurs for k = 90).I For even m with an odd factor, for large enough n, if n even

then c(m, n) = 1 and if n is odd then c(m, n) = 3.I If m = 2d then c(m, n) = 1 for n ≥ 2d+1.I For m ≥ 25, c(m, 3) = 1 if 5 | m; otherwise, c(m, 3) = 4.I For m ≥ 15, c(m, 3) = 1, 3, 4 if

m = ({0}, {5, 10}, other) mod 15.

Page 87: Polyominoes, Gray Codes, and Venn Diagrams

Open Problems

I Is the Gray code necessary condition sufficient?

I Remove the BC 6= 6 from a previous theorem.

I Gray codes for general column-convex polyominoes?

I Gray codes for convex polyominoes?

I Hexominoes?

I Prove some of the unimodality results. Perhaps the numbersare asymptotically normal?

Page 88: Polyominoes, Gray Codes, and Venn Diagrams

Open Problems

I Is the Gray code necessary condition sufficient?

I Remove the BC 6= 6 from a previous theorem.

I Gray codes for general column-convex polyominoes?

I Gray codes for convex polyominoes?

I Hexominoes?

I Prove some of the unimodality results. Perhaps the numbersare asymptotically normal?

Page 89: Polyominoes, Gray Codes, and Venn Diagrams

Open Problems

I Is the Gray code necessary condition sufficient?

I Remove the BC 6= 6 from a previous theorem.

I Gray codes for general column-convex polyominoes?

I Gray codes for convex polyominoes?

I Hexominoes?

I Prove some of the unimodality results. Perhaps the numbersare asymptotically normal?

Page 90: Polyominoes, Gray Codes, and Venn Diagrams

Open Problems

I Is the Gray code necessary condition sufficient?

I Remove the BC 6= 6 from a previous theorem.

I Gray codes for general column-convex polyominoes?

I Gray codes for convex polyominoes?

I Hexominoes?

I Prove some of the unimodality results. Perhaps the numbersare asymptotically normal?

Page 91: Polyominoes, Gray Codes, and Venn Diagrams

Open Problems

I Is the Gray code necessary condition sufficient?

I Remove the BC 6= 6 from a previous theorem.

I Gray codes for general column-convex polyominoes?

I Gray codes for convex polyominoes?

I Hexominoes?

I Prove some of the unimodality results. Perhaps the numbersare asymptotically normal?

Page 92: Polyominoes, Gray Codes, and Venn Diagrams

Open Problems

I Is the Gray code necessary condition sufficient?

I Remove the BC 6= 6 from a previous theorem.

I Gray codes for general column-convex polyominoes?

I Gray codes for convex polyominoes?

I Hexominoes?

I Prove some of the unimodality results. Perhaps the numbersare asymptotically normal?

Page 93: Polyominoes, Gray Codes, and Venn Diagrams

Thanks for still being here!

And please let me know if you have seen that poset before...

And on to the Venn diagrams.

Page 94: Polyominoes, Gray Codes, and Venn Diagrams

Definition - Venn diagram

I Made from simple closedcurves C1,C2, . . . ,Cn.

I Infinite intersection notallowed (usually, but nothere!).

I Let Xi denote the interioror the exterior of the curveCi and considerX1 ∩ X2 ∩ · · · ∩ Xn.

I Euler diagram if each suchintersection is connected.

I Venn diagram if Euler andno intersection is empty.

I Independent family if nointersection is empty.

Page 95: Polyominoes, Gray Codes, and Venn Diagrams

Definition - Venn diagram

I Made from simple closedcurves C1,C2, . . . ,Cn.

I Infinite intersection notallowed (usually, but nothere!).

I Let Xi denote the interioror the exterior of the curveCi and considerX1 ∩ X2 ∩ · · · ∩ Xn.

I Euler diagram if each suchintersection is connected.

I Venn diagram if Euler andno intersection is empty.

I Independent family if nointersection is empty.

Page 96: Polyominoes, Gray Codes, and Venn Diagrams

Definition - Venn diagram

I Made from simple closedcurves C1,C2, . . . ,Cn.

I Infinite intersection notallowed (usually, but nothere!).

I Let Xi denote the interioror the exterior of the curveCi and considerX1 ∩ X2 ∩ · · · ∩ Xn.

I Euler diagram if each suchintersection is connected.

I Venn diagram if Euler andno intersection is empty.

I Independent family if nointersection is empty.

Page 97: Polyominoes, Gray Codes, and Venn Diagrams

Definition - Venn diagram

I Made from simple closedcurves C1,C2, . . . ,Cn.

I Infinite intersection notallowed (usually, but nothere!).

I Let Xi denote the interioror the exterior of the curveCi and considerX1 ∩ X2 ∩ · · · ∩ Xn.

I Euler diagram if each suchintersection is connected.

I Venn diagram if Euler andno intersection is empty.

I Independent family if nointersection is empty.

Page 98: Polyominoes, Gray Codes, and Venn Diagrams

Definition - Venn diagram

I Made from simple closedcurves C1,C2, . . . ,Cn.

I Infinite intersection notallowed (usually, but nothere!).

I Let Xi denote the interioror the exterior of the curveCi and considerX1 ∩ X2 ∩ · · · ∩ Xn.

I Euler diagram if each suchintersection is connected.

I Venn diagram if Euler andno intersection is empty.

I Independent family if nointersection is empty.

Page 99: Polyominoes, Gray Codes, and Venn Diagrams

Definition - Venn diagram

I Made from simple closedcurves C1,C2, . . . ,Cn.

I Infinite intersection notallowed (usually, but nothere!).

I Let Xi denote the interioror the exterior of the curveCi and considerX1 ∩ X2 ∩ · · · ∩ Xn.

I Euler diagram if each suchintersection is connected.

I Venn diagram if Euler andno intersection is empty.

I Independent family if nointersection is empty.

Page 100: Polyominoes, Gray Codes, and Venn Diagrams

“polyVenn” diagrams

I Minimum area Venn diagrams.

I Curves are the boundaries of a polyomino.I Each interior/exterior intersection is a square.

I Total bounded area is 2n − 1.I Each polyomino is a 2n−1-omino.

I Introduced by Mark Thompson on a recreational math webpage.

Page 101: Polyominoes, Gray Codes, and Venn Diagrams

PolyVenn diagram with congruent curves

B

C

C

C

C

C

C

C

C

C

C

C

C

C

C

C

DBA A

AAA

AB

B

B

B

B

B

B

B

B

B B

D

EE

EEEE

E E

E E

EE

B

B

B

(d)

(c)

E

DDDD

D D D D

D D

DD

D DC

E E E

A

B

B

B

B

B

B

B

B

C C C C

C C C C

D

A

A AB B

(a)

A

A

A

A

A

A

AD

C

C

(b)

A A

AA

A A

A A A

C

DD

DD

DDA A

A

A

B

B B

B

C

Page 102: Polyominoes, Gray Codes, and Venn Diagrams

A CB

D E F

Page 103: Polyominoes, Gray Codes, and Venn Diagrams

A CB

D E F

A A A

A

A A A

A

A

A A

AA A

A

AA

A A A

A

A A

A

A

AA

AAAAA

Page 104: Polyominoes, Gray Codes, and Venn Diagrams

A CB

D E F

B B B B

BB B B

B

B

BB

BB

B

B

B

B B B B B

B

B

BBBBBBBB

A A A

A

A A A

A

A

A A

AA A

A

AA

A A A

A

A A

A

A

AA

AAAAA

Page 105: Polyominoes, Gray Codes, and Venn Diagrams

A CB

D E F

C C C

C

C C

C CCCCC

C

CC

C C C C C C

C

C C

C

C

CC CCC

C

B B B B

BB B B

B

B

BB

BB

B

B

B

B B B B B

B

B

BBBBBBBB

A A A

A

A A A

A

A

A A

AA A

A

AA

A A A

A

A A

A

A

AA

AAAAA

Page 106: Polyominoes, Gray Codes, and Venn Diagrams

A CB

D E F

D

D D D DD D D

D

D

DD

D

D

D

D

D

D

D D D D D

D

DD

D D D D D

DC C C

C

C C

C CCCCC

C

CC

C C C C C C

C

C C

C

C

CC CCC

C

B B B B

BB B B

B

B

BB

BB

B

B

B

B B B B B

B

B

BBBBBBBB

A A A

A

A A A

A

A

A A

AA A

A

AA

A A A

A

A A

A

A

AA

AAAAA

Page 107: Polyominoes, Gray Codes, and Venn Diagrams

A CB

D E F

E E

E

E E

E E E

E E E E E E E

E

E

E

EE

E E E EE

EEEEE

E E

D

D D D DD D D

D

D

DD

D

D

D

D

D

D

D D D D D

D

DD

D D D D D

DC C C

C

C C

C CCCCC

C

CC

C C C C C C

C

C C

C

C

CC CCC

C

B B B B

BB B B

B

B

BB

BB

B

B

B

B B B B B

B

B

BBBBBBBB

A A A

A

A A A

A

A

A A

AA A

A

AA

A A A

A

A A

A

A

AA

AAAAA

Page 108: Polyominoes, Gray Codes, and Venn Diagrams

A CB

D E F

FF

F

F

F

F

F

F

F F F

F

F

F

F F

F

F

F

F

F

F

FF F

F

F

FF

F

F

F

E E

E

E E

E E E

E E E E E E E

E

E

E

EE

E E E EE

EEEEE

E E

D

D D D DD D D

D

D

DD

D

D

D

D

D

D

D D D D D

D

DD

D D D D D

DC C C

C

C C

C CCCCC

C

CC

C C C C C C

C

C C

C

C

CC CCC

C

B B B B

BB B B

B

B

BB

BB

B

B

B

B B B B B

B

B

BBBBBBBB

A A A

A

A A A

A

A

A A

AA A

A

AA

A A A

A

A A

A

A

AA

AAAAA

Page 109: Polyominoes, Gray Codes, and Venn Diagrams

A CB

D E F

FF

F

F

F

F

F

F

F F F

F

F

F

F F

F

F

F

F

F

F

FF F

F

F

FF

F

F

F

E E

E

E E

E E E

E E E E E E E

E

E

E

EE

E E E EE

EEEEE

E E

D

D D D DD D D

D

D

DD

D

D

D

D

D

D

D D D D D

D

DD

D D D D D

DC C C

C

C C

C CCCCC

C

CC

C C C C C C

C

C C

C

C

CC CCC

C

B B B B

BB B B

B

B

BB

BB

B

B

B

B B B B B

B

B

BBBBBBBB

A A A

A

A A A

A

A

A A

AA A

A

AA

A A A

A

A A

A

A

AA

AAAAA

Top figure colored bycardinality of the underlyingset. Red = 1, yellow = 2, etc.

Page 110: Polyominoes, Gray Codes, and Venn Diagrams

A

B

C D E

F G

G

G

G

G

G G G

G

G

G

G

G

G

G

G

G

G

G G

G

G

G

G GG

GG

G

G G

G

G

G G

G G

GG

GG

G

G

G

G

G

G

G

G

G

G

G G

G

GG

G

GGG

G

G

G

G

FF

F

F

FF

F

F

FF

F F

F

F

F

F

F F

F

F

F

F F

FF

F

F

F F

F F

F

FF

FF

FF

F F FF

F F

FF

F

F

F

FF

F

F

FF

F

FF

F

FF

FF

FE

EE

E

E

EE

E

E

E

EE

E

E E

E

E

E

EE

E

E

E

E

E

E E

EE

E

E

E

EE

E

E

E

EE E

E E

EEE

E

E E

E

E

EE

E E

E

E

E

E

E

E

EE E

E

D

DDD

D

DD

D

D

D

D

D

D

D D

D

D D

D D

D

D D

D

D

D

D

DD

D

D

D

D

D

D

D

D

DD

D

D

D

D

D

DDDD

D

D D

D

D

D

D

DD

D

D

D

D

D

D

D

C C C

C

C

CC

C

C

C

C

C

C

C C C C

C

C

C

C

C

C

C

CC

C

C

C C

C C C

C C

C C

C C

C

C

CC

C

C CC

C

C

C

C

C

C C

C

C C C

C

C

CC

C

C

B

B

B

B

B

B

B

B

BB

B

B B

B

BBBB

B B B B

B

BBBBBB

BB B B B

B

B

B

B

B

BB

B

B B

B

B

B

B

BB

B

B B

B

B B B B B B B

BBB

A A A AA

A

A

A

A A

A A A A A

A

A A

A

AAA

A A A

AAA

AA

A

AA

A A

A

AA

A

AAA

AAA

A

A

A

A A A A

AAAAAAAAA

A A A

n = 7.

Page 111: Polyominoes, Gray Codes, and Venn Diagrams

In a minimum bounding box

E

E

EE

E

E

E E

E

EE

E

EE

E

E

DDDD

D D

D D

D

D

D

D

D D

D

D

D D

D

D

D D DD

C

C

C C

C

C

CC

C

C

C

C

C

C

CCCC

CCCC

C

C

CC

C

C

B

B

B

B

B

B

B

B

B

BBB

B

B

B

B

BB

B

BB

B

B B

B

B B

B

B

B

A

AA

A

A

AA

A

A

A

A

A A A

AA

AAA

AA

AA

A

AA

AA

A

A

Page 112: Polyominoes, Gray Codes, and Venn Diagrams

A naıve way to construct a polyVenn diagram for any n.

DECECDBEBDBCAEADACABEDCB

ABC

BCDE ACDE ABDE ABCE ABCD CDE BDE BCE BCD ADE ACE ACD ABE ABD

A ABCDE

I A 5-Venn diagram with curve A highlighted.

I Area in general is 322n.

Page 113: Polyominoes, Gray Codes, and Venn Diagrams

Symmetric chain decomposition of the Boolean lattice

.

ABC

BCACAB

CA

(a)

AD

ADACBCAB

CDBDABD

D

ACD

C

BCD

B

ABC

A

$\emptyset$

ABCD

(b)

$\emptyset$

D

BD

B

ABCD

BCDACDABD

CD

D

AD

ABD

ABCD

A B

BCAB

ABC BCD

ACD

(c)

BD CD

C

AC

I A partition of all 2n

subsets into chains of theform

x1 ⊂ x2 ⊂ · · · ⊂ xt

where |xi | = n − |xt−i+1|and |xi | = |xi−1 − 1|.

I Various algorithms known:

I De Bruijn, vanEbbenhorstTengbergen, andKruyswijk.

I Aigner.

Page 114: Polyominoes, Gray Codes, and Venn Diagrams

.

ACE

CDE BCE

ABE

ABCE

DEADE

ABDE

ABD

ACDEBCDE

AB

ABC

ABCD

ABCDE

BD

BDE

BECD

E

AE

D

AD

C

AC

ACD

B

BC

BCD

A

CE

I Another 5-Venn diagram withcurve A highlighted.

I Based on symmetric chaindecomposition.

I Area is 2n +( nn/2

).

Page 115: Polyominoes, Gray Codes, and Venn Diagrams

I Are there congruent n-polyVenns for n ≥ 6? We saw earlierthat they exist for n = 2, 3, 4, 5.

I Is there a 5-polyVenn whose curves are convex polyominoes?

I Are there minimum bounding box n-polyVenns for n ≥ 6? Wesaw earlier that they exist for n = 2, 3, 4, 5.

I Are there minimum area n-polyVenns for n ≥ 8? We sawearlier examples for n = 6, 7.

I One problem for which we have not attempted solutions is theconstruction of n-polyVenns that fill an w × h box, wherewh = 2n − 1. Of course, a necessary condition is that 2n − 1not be a Mersenne prime. For example, is there are4-polyVenn that fits in a 3× 5 rectangle or a 6-polyVenn thatfits in a 7× 9 or 3× 27 rectangle?

Page 116: Polyominoes, Gray Codes, and Venn Diagrams

Thanks for coming!