107
How to count leaves in the trees from Tetris? ´ Elise Vandomme Postdoc at the LaCIM (UQAM) Colloque panqu´ eb´ ecois des ´ etudiants de l’ISM Trois-Rivi` eres – May 2017 1/31

How to count leaves in the trees from Tetris?

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: How to count leaves in the trees from Tetris?

How to count leaves in the trees from Tetris?

Elise VandommePostdoc at the LaCIM (UQAM)

Colloque panquebecois des etudiants de l’ISMTrois-Rivieres – May 2017

1/31

Page 2: How to count leaves in the trees from Tetris?

2/31

Page 3: How to count leaves in the trees from Tetris?

Trees in Tetris

3/31

Page 4: How to count leaves in the trees from Tetris?

Trees in Tetris

3/31

Page 5: How to count leaves in the trees from Tetris?

Trees in Tetris

3/31

Page 6: How to count leaves in the trees from Tetris?

Polyomino

A polyomino is a connected union of unit squares, called cells.

4/31

Page 7: How to count leaves in the trees from Tetris?

Solomon W. Golomb (1932 - 2016)

5/31

Page 8: How to count leaves in the trees from Tetris?

Combinatorial Problems

Monomino:

Domino:

Tromino:

Tetromino:

How many polyominoes with n cells?Unknown for n ≥ 57

6/31

Page 9: How to count leaves in the trees from Tetris?

Combinatorial Problems

Monomino:

Domino:

Tromino:

Tetromino:

How many polyominoes with n cells?Unknown for n ≥ 57

6/31

Page 10: How to count leaves in the trees from Tetris?

Combinatorial Problems

Monomino:

Domino:

Tromino:

Tetromino:

How many polyominoes with n cells?Unknown for n ≥ 57

6/31

Page 11: How to count leaves in the trees from Tetris?

Combinatorial Problems

Monomino:

Domino:

Tromino:

Tetromino:

How many polyominoes with n cells?Unknown for n ≥ 57

6/31

Page 12: How to count leaves in the trees from Tetris?

Combinatorial Problems

Monomino:

Domino:

Tromino:

Tetromino:

How many polyominoes with n cells?

Unknown for n ≥ 57

6/31

Page 13: How to count leaves in the trees from Tetris?

Combinatorial Problems

Monomino:

Domino:

Tromino:

Tetromino:

How many polyominoes with n cells?Unknown for n ≥ 57

6/31

Page 14: How to count leaves in the trees from Tetris?

Combinatorial Problems

Can we pave the plane with a finite set of polyominoes?

Examples:

Polyominoes:

Yes, we can!

Polyominoes:

No, we can’t!

In general, the problem is undecidable.

7/31

Page 15: How to count leaves in the trees from Tetris?

Combinatorial Problems

Can we pave the plane with a finite set of polyominoes?

Examples:

Polyominoes:

Yes, we can!

Polyominoes:

No, we can’t!

In general, the problem is undecidable.

7/31

Page 16: How to count leaves in the trees from Tetris?

Combinatorial Problems

Can we pave the plane with a finite set of polyominoes?

Examples:

Polyominoes:

Yes, we can!

Polyominoes:

No, we can’t!

In general, the problem is undecidable.

7/31

Page 17: How to count leaves in the trees from Tetris?

Combinatorial Problems

Can we pave the plane with a finite set of polyominoes?

Examples:

Polyominoes:

Yes, we can!

Polyominoes:

No, we can’t!

In general, the problem is undecidable.

7/31

Page 18: How to count leaves in the trees from Tetris?

Combinatorial Problems

Can we pave the plane with a finite set of polyominoes?

Examples:

Polyominoes:

Yes, we can!

Polyominoes:

No, we can’t!

In general, the problem is undecidable.

7/31

Page 19: How to count leaves in the trees from Tetris?

Combinatorial Problems

Can we pave a finite area with a finite set of polyominoes?Example:

Area: 45× 36 rectangle

Polyominoes: all pentominoes

8/31

Page 20: How to count leaves in the trees from Tetris?

Combinatorial Problems

Can we pave a finite area with a finite set of polyominoes?

http://www.knowltonmosaics.com

8/31

Page 21: How to count leaves in the trees from Tetris?

Combinatorial Problems

Can we pave a finite area with a finite set of polyominoes?Example:

Area: a checkerboard

without two opposite corners

Polyominoes: a domino

No, we can’t!

In general, the problem is NP-complete.

9/31

Page 22: How to count leaves in the trees from Tetris?

Combinatorial Problems

Can we pave a finite area with a finite set of polyominoes?Example:

Area: a checkerboard

without two opposite corners

Polyominoes: a domino

Yes, we can!

No, we can’t!

In general, the problem is NP-complete.

9/31

Page 23: How to count leaves in the trees from Tetris?

Combinatorial Problems

Can we pave a finite area with a finite set of polyominoes?Example:

Area: a checkerboard without two opposite corners

Polyominoes: a domino

No, we can’t!

In general, the problem is NP-complete.

9/31

Page 24: How to count leaves in the trees from Tetris?

Combinatorial Problems

Can we pave a finite area with a finite set of polyominoes?Example:

Area: a checkerboard without two opposite corners

Polyominoes: a domino

No, we can’t!

In general, the problem is NP-complete.

9/31

Page 25: How to count leaves in the trees from Tetris?

Combinatorial Problems

Can we pave a finite area with a finite set of polyominoes?Example:

Area: a checkerboard without two opposite corners

Polyominoes: a domino

No, we can’t!

In general, the problem is NP-complete.

9/31

Page 26: How to count leaves in the trees from Tetris?

Behind each polyomino hides a graph

Vertices are the cells.

Two vertices are adjacent if their corresponding cells have acommon side.

Such graph can contain cycles.

10/31

Page 27: How to count leaves in the trees from Tetris?

Behind each polyomino hides a graph

Vertices are the cells.

Two vertices are adjacent if their corresponding cells have acommon side.

Such graph can contain cycles.

10/31

Page 28: How to count leaves in the trees from Tetris?

Behind each polyomino hides a graph

Vertices are the cells.

Two vertices are adjacent if their corresponding cells have acommon side.

Such graph can contain cycles.

10/31

Page 29: How to count leaves in the trees from Tetris?

Behind each polyomino hides a graph

Vertices are the cells.

Two vertices are adjacent if their corresponding cells have acommon side.

Such graph can contain cycles.

10/31

Page 30: How to count leaves in the trees from Tetris?

Tree-like Polyominoes

If there are no cycles, we call it a tree-like polyomino.

This tree-like polyomino has 9 cells and 4 leaves.

For a given n, what is the maximal number of leaves realizedby a tree-like polyomino with n cells?

11/31

Page 31: How to count leaves in the trees from Tetris?

Tree-like Polyominoes

If there are no cycles, we call it a tree-like polyomino.

This tree-like polyomino has 9 cells and 4 leaves.

For a given n, what is the maximal number of leaves realizedby a tree-like polyomino with n cells?

11/31

Page 32: How to count leaves in the trees from Tetris?

Tree-like Polyominoes

If there are no cycles, we call it a tree-like polyomino.

This tree-like polyomino has 9 cells and 4 leaves.

For a given n, what is the maximal number of leaves realizedby a tree-like polyomino with n cells?

11/31

Page 33: How to count leaves in the trees from Tetris?

Maximal number of leaves?

For n ≥ 1, the maximal number of leaves realized by a tree-like polyomino with n cells is given by

`(n) =

0 if n = 1

2 if n = 2

n − 1 if n = 3, 4, 5

`(n − 4) + 2 if n ≥ 6

Theorem (Blondin Masse, de Carufel, Goupil, Samson 2017)

12/31

Page 34: How to count leaves in the trees from Tetris?

Trees in Minecraft

tree-like

polyominoes ⇒

tree-like

polycubes

The maximal number of leaves realized by a tree-like polycubesatisfies a linear recurrence.

Theorem (Blondin Masse, de Carufel, Goupil, Samson 2017)

13/31

Page 35: How to count leaves in the trees from Tetris?

Trees in Minecraft

tree-like polyominoes ⇒ tree-like polycubes

The maximal number of leaves realized by a tree-like polycubesatisfies a linear recurrence.

Theorem (Blondin Masse, de Carufel, Goupil, Samson 2017)

13/31

Page 36: How to count leaves in the trees from Tetris?

Trees in Minecraft

tree-like polyominoes ⇒ tree-like polycubes

The maximal number of leaves realized by a tree-like polycubesatisfies a linear recurrence.

Theorem (Blondin Masse, de Carufel, Goupil, Samson 2017)

13/31

Page 37: How to count leaves in the trees from Tetris?

Tree-like polyominoes are induced subtrees of Z2.

Tree-like polycubes are induced subtrees of Z3.

Can we study this problem in other graphs?

14/31

Page 38: How to count leaves in the trees from Tetris?

Tree-like polyominoes are induced subtrees of Z2.

Tree-like polycubes are induced subtrees of Z3.

Can we study this problem in other graphs?

14/31

Page 39: How to count leaves in the trees from Tetris?

Tree-like polyominoes are induced subtrees of Z2.

Tree-like polycubes are induced subtrees of Z3.

Can we study this problem in other graphs?

14/31

Page 40: How to count leaves in the trees from Tetris?

Definition

For a graph G = (V ,E ) and n ≥ 2

Tn = set of induced subtrees with n vertices

LG (n) = max{# leaves in T |T ∈ Tn}Leafed sequence of G : LG (n)n∈{2,...,|V |}

8 7

54

1 2 3

6

n 2 3 4 5 6 7 8

LG (n) 2

2 3 4 4 5 −∞

15/31

Page 41: How to count leaves in the trees from Tetris?

Definition

For a graph G = (V ,E ) and n ≥ 2

Tn = set of induced subtrees with n vertices

LG (n) = max{# leaves in T |T ∈ Tn}Leafed sequence of G : LG (n)n∈{2,...,|V |}

8 7

54

1 2 3

6

n 2 3 4 5 6 7 8

LG (n) 2 2

3 4 4 5 −∞

15/31

Page 42: How to count leaves in the trees from Tetris?

Definition

For a graph G = (V ,E ) and n ≥ 2

Tn = set of induced subtrees with n vertices

LG (n) = max{# leaves in T |T ∈ Tn}Leafed sequence of G : LG (n)n∈{2,...,|V |}

8 7

54

1 2 3

6

n 2 3 4 5 6 7 8

LG (n) 2 2 3

4 4 5 −∞

15/31

Page 43: How to count leaves in the trees from Tetris?

Definition

For a graph G = (V ,E ) and n ≥ 2

Tn = set of induced subtrees with n vertices

LG (n) = max{# leaves in T |T ∈ Tn}Leafed sequence of G : LG (n)n∈{2,...,|V |}

8 7

54

1 2 3

6

n 2 3 4 5 6 7 8

LG (n) 2 2 3 4

4 5 −∞

15/31

Page 44: How to count leaves in the trees from Tetris?

Definition

For a graph G = (V ,E ) and n ≥ 2

Tn = set of induced subtrees with n vertices

LG (n) = max{# leaves in T |T ∈ Tn}Leafed sequence of G : LG (n)n∈{2,...,|V |}

8 7

54

1 2 3

6

n 2 3 4 5 6 7 8

LG (n) 2 2 3 4 4

5 −∞

15/31

Page 45: How to count leaves in the trees from Tetris?

Definition

For a graph G = (V ,E ) and n ≥ 2

Tn = set of induced subtrees with n vertices

LG (n) = max{# leaves in T |T ∈ Tn}Leafed sequence of G : LG (n)n∈{2,...,|V |}

8 7

54

1 2 3

6

n 2 3 4 5 6 7 8

LG (n) 2 2 3 4 4

5 −∞

15/31

Page 46: How to count leaves in the trees from Tetris?

Definition

For a graph G = (V ,E ) and n ≥ 2

Tn = set of induced subtrees with n vertices

LG (n) = max{# leaves in T |T ∈ Tn}Leafed sequence of G : LG (n)n∈{2,...,|V |}

8 7

54

1 2 3

6

n 2 3 4 5 6 7 8

LG (n) 2 2 3 4 4 5

−∞

15/31

Page 47: How to count leaves in the trees from Tetris?

Definition

For a graph G = (V ,E ) and n ≥ 2

Tn = set of induced subtrees with n vertices

LG (n) = max{# leaves in T |T ∈ Tn}Leafed sequence of G : LG (n)n∈{2,...,|V |}

8 7

54

1 2 3

6

n 2 3 4 5 6 7 8

LG (n) 2 2 3 4 4 5 −∞

15/31

Page 48: How to count leaves in the trees from Tetris?

Particular cases

K6 LKp(n) =

{2 if n = 2 et p ≥ 2

−∞ if 3 ≤ n ≤ p

C6 LCp(n) =

{2 if 2 ≤ n < p

−∞ if n = p

R6 LRp(n) =

2 if 2 = n ou bp2c+ 1 < n < p

n − 1 if 3 ≤ n ≤ bp2c+ 1

−∞ if p ≤ n ≤ p + 1

K3,2 LKp,q(n) =

2 if n = 2

n − 1 if 3 ≤ n ≤ max(p, q) + 1

−∞ if max(p, q) + 1 < n ≤ p + q

16/31

Page 49: How to count leaves in the trees from Tetris?

Particular cases

K6 LKp(n) =

{2 if n = 2 et p ≥ 2

−∞ if 3 ≤ n ≤ p

C6 LCp(n) =

{2 if 2 ≤ n < p

−∞ if n = p

R6 LRp(n) =

2 if 2 = n ou bp2c+ 1 < n < p

n − 1 if 3 ≤ n ≤ bp2c+ 1

−∞ if p ≤ n ≤ p + 1

K3,2 LKp,q(n) =

2 if n = 2

n − 1 if 3 ≤ n ≤ max(p, q) + 1

−∞ if max(p, q) + 1 < n ≤ p + q

16/31

Page 50: How to count leaves in the trees from Tetris?

Particular cases

K6 LKp(n) =

{2 if n = 2 et p ≥ 2

−∞ if 3 ≤ n ≤ p

C6 LCp(n) =

{2 if 2 ≤ n < p

−∞ if n = p

R6 LRp(n) =

2 if 2 = n ou bp2c+ 1 < n < p

n − 1 if 3 ≤ n ≤ bp2c+ 1

−∞ if p ≤ n ≤ p + 1

K3,2 LKp,q(n) =

2 if n = 2

n − 1 if 3 ≤ n ≤ max(p, q) + 1

−∞ if max(p, q) + 1 < n ≤ p + q

16/31

Page 51: How to count leaves in the trees from Tetris?

Particular cases

K6 LKp(n) =

{2 if n = 2 et p ≥ 2

−∞ if 3 ≤ n ≤ p

C6 LCp(n) =

{2 if 2 ≤ n < p

−∞ if n = p

R6 LRp(n) =

2 if 2 = n ou bp2c+ 1 < n < p

n − 1 if 3 ≤ n ≤ bp2c+ 1

−∞ if p ≤ n ≤ p + 1

K3,2 LKp,q(n) =

2 if n = 2

n − 1 if 3 ≤ n ≤ max(p, q) + 1

−∞ if max(p, q) + 1 < n ≤ p + q

16/31

Page 52: How to count leaves in the trees from Tetris?

Particular cases: hypercubes

Only partial results:

LH3(n) =

2 if 2 ≤ n ≤ 3

3 if n = 4

−∞ if 5 ≤ n ≤ 8

LH4(n) =

2 if n ∈ {2, 3}3 if n ∈ {4, 6, 8}4 if n ∈ {5, 7, 9}−∞ if 10 ≤ n ≤ 16

Observations:

The leafed sequence can increase by at most 1 each step.The leafed sequence is not always non-decreasing.

The leafed sequence LG (n)n∈{2,...,|V |} is non-decreasingiff G is a tree.

17/31

Page 53: How to count leaves in the trees from Tetris?

Particular cases: hypercubes

Only partial results:

LH3(n) =

2 if 2 ≤ n ≤ 3

3 if n = 4

−∞ if 5 ≤ n ≤ 8

LH4(n) =

2 if n ∈ {2, 3}3 if n ∈ {4, 6, 8}4 if n ∈ {5, 7, 9}−∞ if 10 ≤ n ≤ 16

Observations:

The leafed sequence can increase by at most 1 each step.

The leafed sequence is not always non-decreasing.

The leafed sequence LG (n)n∈{2,...,|V |} is non-decreasingiff G is a tree.

17/31

Page 54: How to count leaves in the trees from Tetris?

Complexity

Instance: a graph G and two integers n, k ≥ 1

Question: Is there an induced subtree of G with nvertices and k leaves?

Problem LIS

The LIS problem is NP-complete.

Theorem (Blondin Masse, de Carufel, Goupil, V. 2017)

Reduction to the problem:

Instance: a graph G and an integer n ≥ 1

Question: Is there an induced subtree of G with more than nvertices?

which is NP-complet. [Erdos, Saks, Sos 1986]

18/31

Page 55: How to count leaves in the trees from Tetris?

Complexity

Instance: a graph G and two integers n, k ≥ 1

Question: Is there an induced subtree of G with nvertices and k leaves?

Problem LIS

The LIS problem is NP-complete.

Theorem (Blondin Masse, de Carufel, Goupil, V. 2017)

Reduction to the problem:

Instance: a graph G and an integer n ≥ 1

Question: Is there an induced subtree of G with more than nvertices?

which is NP-complet. [Erdos, Saks, Sos 1986]

18/31

Page 56: How to count leaves in the trees from Tetris?

Complexity

Instance: a graph G and two integers n, k ≥ 1

Question: Is there an induced subtree of G with nvertices and k leaves?

Problem LIS

The LIS problem is NP-complete.

Theorem (Blondin Masse, de Carufel, Goupil, V. 2017)

Reduction to the problem:

Instance: a graph G and an integer n ≥ 1

Question: Is there an induced subtree of G with more than nvertices?

which is NP-complet. [Erdos, Saks, Sos 1986]

18/31

Page 57: How to count leaves in the trees from Tetris?

LIS is NP-complete

Polynomial transformation f : (G , n) 7→ (H, 2(n + 1), n + 1)

G H

a b

cd

e

f

a b

cd

e

a′ b′

c ′d ′

e ′

19/31

Page 58: How to count leaves in the trees from Tetris?

LIS is NP-complete

Polynomial transformation f : (G , n) 7→ (H, 2(n + 1), n + 1)

G H

a b

cd

e

f

a b

cd

e

a′ b′

c ′d ′

e ′

If G has an induced subtree with > n vertices

19/31

Page 59: How to count leaves in the trees from Tetris?

LIS is NP-complete

Polynomial transformation f : (G , n) 7→ (H, 2(n + 1), n + 1)

G H

a b

cd

e

f

a b

cd

e

a′ b′

c ′d ′

e ′

If G has an induced subtree with > n vertices

⇒ ∃T induced subtree with n + 1 vertices {v1, . . . , vn+1}

19/31

Page 60: How to count leaves in the trees from Tetris?

LIS is NP-complete

Polynomial transformation f : (G , n) 7→ (H, 2(n + 1), n + 1)

G H

a b

cd

e

f

a b

cd

e

a′ b′

c ′d ′

e ′

If G has an induced subtree with > n vertices

⇒ ∃T induced subtree with n + 1 vertices {v1, . . . , vn+1}⇒ H has a subtree induced by {v1, . . . , vn+1} ∪ {v ′1, . . . , v ′n+1}

19/31

Page 61: How to count leaves in the trees from Tetris?

LIS is NP-complete

Polynomial transformation f : (G , n) 7→ (H, 2(n + 1), n + 1)

G H

a b

cd

e

f

a b

cd

e

a′ b′

c ′d ′

e ′

If G has an induced subtree with > n vertices

⇒ ∃T induced subtree with n + 1 vertices {v1, . . . , vn+1}⇒ H has a subtree induced by {v1, . . . , vn+1} ∪ {v ′1, . . . , v ′n+1}

with 2(n + 1) vertices and n + 1 leaves

19/31

Page 62: How to count leaves in the trees from Tetris?

LIS is NP-complete

Polynomial transformation f : (G , n) 7→ (H, 2(n + 1), n + 1)

G H

a b

cd

e

f

a b

cd

e

a′ b′

c ′d ′

e ′

If H has an induced subtree T with 2(n + 1) vertices andn + 1 leaves

19/31

Page 63: How to count leaves in the trees from Tetris?

LIS is NP-complete

Polynomial transformation f : (G , n) 7→ (H, 2(n + 1), n + 1)

G H

a b

cd

e

f

a b

cd

e

a′ b′

c ′d ′

e ′

If H has an induced subtree T with 2(n + 1) vertices andn + 1 leaves

⇒ T has ≥ n + 1 vertices in V

19/31

Page 64: How to count leaves in the trees from Tetris?

LIS is NP-complete

Polynomial transformation f : (G , n) 7→ (H, 2(n + 1), n + 1)

G H

a b

cd

e

f

a b

cd

e

a′ b′

c ′d ′

e ′

If H has an induced subtree T with 2(n + 1) vertices andn + 1 leaves

⇒ T has ≥ n + 1 vertices in V

⇒ G has an induced subtree with > n vertices

19/31

Page 65: How to count leaves in the trees from Tetris?

What about trees?

For a tree T with m vertices, the leafed sequence LT (n) iscomputed in polynomial time and space.

Theorem (Blondin Masse, de Carufel, Goupil, V. 2017)

Algorithm based on the dynamic programming paradigm

20/31

Page 66: How to count leaves in the trees from Tetris?

Idea of the algorithm

u v

LTu

=?

21/31

Page 67: How to count leaves in the trees from Tetris?

Idea of the algorithm

u v

LTu

=?

21/31

Page 68: How to count leaves in the trees from Tetris?

Idea of the algorithm

u v

LTu

=?

21/31

Page 69: How to count leaves in the trees from Tetris?

Idea of the algorithm

u v

LTu

=?

21/31

Page 70: How to count leaves in the trees from Tetris?

Idea of the algorithm

u v

LTu

=?

21/31

Page 71: How to count leaves in the trees from Tetris?

Idea of the algorithm

For a directed tree Tu rooted in u

f (Tu) = #{x ∈ Tu | deg+(x) = 0}LTu

(n) = max{f (T ′u) : T ′u ⊆ Tu, |T ′u| = n}

Generalization to a directed forest F with k connectedcomponents Fi :

LF

(n) = max

{k∑

i=1

LFi

(λ(i))

∣∣∣∣∣ λ ∈ C (n, k)

}

If F is the forest of the subtrees rooted in the children of u,

LTu

(n) =

{n if n = 0, 1

LF

(n − 1) otherwise

22/31

Page 72: How to count leaves in the trees from Tetris?

Idea of the algorithm

u v

01 01 01

01

01 01

0112

011230112334556

LTu

=?

23/31

Page 73: How to count leaves in the trees from Tetris?

Idea of the algorithm

u v

01 01 01

01

01 01

0112

011230112334556L

Tu=?

23/31

Page 74: How to count leaves in the trees from Tetris?

Idea of the algorithm

u v

01 01 01

01

01 01

0112

011230112334556L

Tu=?

23/31

Page 75: How to count leaves in the trees from Tetris?

Idea of the algorithm

u v

01 01 01

01

01 01

0112

01123

0112334556LTu

=?

23/31

Page 76: How to count leaves in the trees from Tetris?

Idea of the algorithm

u v

01 01 01

01

01 01

0112

011230112334556

LTu

=?

23/31

Page 77: How to count leaves in the trees from Tetris?

Idea of the algorithm

Assuming LFi

are known,

Naive computation of LF

via

LF

(n) = max

{k∑

i=1

LFi

(λ(i))

∣∣∣∣∣ λ ∈ C (n, k)

}

is not polynomial

Computation of LF

via

LF

(n) = max{LF−F1

(i) + LF1

(n − i) | 0 ≤ i ≤ n}

in time Θ(k|F |2)

24/31

Page 78: How to count leaves in the trees from Tetris?

Idea of the algorithm

Assuming LFi

are known,

Naive computation of LF

via

LF

(n) = max

{k∑

i=1

LFi

(λ(i))

∣∣∣∣∣ λ ∈ C (n, k)

}

is not polynomial

Computation of LF

via

LF

(n) = max{LF−F1

(i) + LF1

(n − i) | 0 ≤ i ≤ n}

in time Θ(k|F |2)

24/31

Page 79: How to count leaves in the trees from Tetris?

Idea of the algorithm

01123

0123012

u v

01 01 01

01

01 01

0112

011230112334556

01

0112

01

01011223

25/31

Page 80: How to count leaves in the trees from Tetris?

Idea of the algorithm

01123

0123

012

u v

01 01 01

01

01 01

0112

011230112334556

01

0112

01

01011223

25/31

Page 81: How to count leaves in the trees from Tetris?

Idea of the algorithm

01123

0123012

u v

01 01 01

01

01 01

0112

011230112334556

01

0112

01

01011223

25/31

Page 82: How to count leaves in the trees from Tetris?

Idea of the algorithm

01123

0123012

u v

01 01 01

01

01 01

0112

011230112334556

01

0112

01

01011223

25/31

Page 83: How to count leaves in the trees from Tetris?

Idea of the algorithm

01123

0123012

u v

01 01 01

01

01 01

0112

011230112334556

01

0112

01

01011223

25/31

Page 84: How to count leaves in the trees from Tetris?

Idea of the algorithm

Maximal number of leaves in the subtrees with n vertices,containing the edge {u, v} :

L{u,v}(n) = max{LTu

(i) + LTv

(n − i)∣∣∣ 1 ≤ i ≤ n − 1

}

u v

0112334556

011223

L{u,v} = 012234456677889

LT (n) = max{L{u,v}(n)

∣∣ {u, v} ∈ E}

26/31

Page 85: How to count leaves in the trees from Tetris?

Idea of the algorithm

Maximal number of leaves in the subtrees with n vertices,containing the edge {u, v} :

L{u,v}(n) = max{LTu

(i) + LTv

(n − i)∣∣∣ 1 ≤ i ≤ n − 1

}

u v

0112334556

011223

L{u,v} = 012234456677889

LT (n) = max{L{u,v}(n)

∣∣ {u, v} ∈ E}

26/31

Page 86: How to count leaves in the trees from Tetris?

Could we improve the time and space complexity?

We can not hope to obtain a procedure computing LT (n)which deletes leaves successively.

Counter-example :

LT (7) = 5 et LT (9) = 6

27/31

Page 87: How to count leaves in the trees from Tetris?

From graph theory to combinatorics on words

Each tree has a non-decreasing leaf sequence L = (Li )i≥2.

For any graph, Li+1 − Li ≤ 1.

The difference word ∆L := (Li+1 − Li )i≥3 is a binary word.

Leafed sequence: L = 223445567789

Difference word: ∆L =

0

1101011011

The language of a class of graphs is the set of all their differencewords.

Language of Trees =???

28/31

Page 88: How to count leaves in the trees from Tetris?

From graph theory to combinatorics on words

Each tree has a non-decreasing leaf sequence L = (Li )i≥2.

For any graph, Li+1 − Li ≤ 1.

The difference word ∆L := (Li+1 − Li )i≥3 is a binary word.

Leafed sequence: L = 223445567789

Difference word: ∆L = 01101011011

The language of a class of graphs is the set of all their differencewords.

Language of Trees =???

28/31

Page 89: How to count leaves in the trees from Tetris?

From graph theory to combinatorics on words

Each tree has a non-decreasing leaf sequence L = (Li )i≥2.

For any graph, Li+1 − Li ≤ 1.

The difference word ∆L := (Li+1 − Li )i≥3 is a binary word.

Leafed sequence: L = 223445567789

Difference word: ∆L =

0

1101011011

The language of a class of graphs is the set of all their differencewords.

Language of Trees =???

28/31

Page 90: How to count leaves in the trees from Tetris?

From graph theory to combinatorics on words

Each tree has a non-decreasing leaf sequence L = (Li )i≥2.

For any graph, Li+1 − Li ≤ 1.

The difference word ∆L := (Li+1 − Li )i≥3 is a binary word.

Leafed sequence: L = 223445567789

Difference word: ∆L =

0

1101011011

The language of a class of graphs is the set of all their differencewords.

Language of Trees =???

28/31

Page 91: How to count leaves in the trees from Tetris?

From graph theory to combinatorics on words

Each tree has a non-decreasing leaf sequence L = (Li )i≥2.

For any graph, Li+1 − Li ≤ 1.

The difference word ∆L := (Li+1 − Li )i≥3 is a binary word.

Leafed sequence: L = 223445567789

Difference word: ∆L =

0

1101011011

The language of a class of graphs is the set of all their differencewords.

Language of Trees =???

28/31

Page 92: How to count leaves in the trees from Tetris?

Caterpillars

L = 223455667778 and ∆L = 1110101001

What is the language of caterpillars ?

Language of caterpillars ( Language of trees

Enumerate caterpillars

Get their associated difference words

ε, 0, 1, 00, 10, 11, 0000, 1000, 1001, 1010, 1100, 1101, . . .

Count them by length

n 0 1 2 3 4 5 6 7 8 9

1 2 3 5 8 14 23 41 70 125

Check OEIS It is A194850!

29/31

Page 93: How to count leaves in the trees from Tetris?

Caterpillars

L = 223455667778 and ∆L = 1110101001

What is the language of caterpillars ?

Language of caterpillars ( Language of trees

Enumerate caterpillars

Get their associated difference words

ε, 0, 1, 00, 10, 11, 0000, 1000, 1001, 1010, 1100, 1101, . . .

Count them by length

n 0 1 2 3 4 5 6 7 8 9

1 2 3 5 8 14 23 41 70 125

Check OEIS It is A194850!

29/31

Page 94: How to count leaves in the trees from Tetris?

Caterpillars

L = 223455667778 and ∆L = 1110101001

What is the language of caterpillars ?

Language of caterpillars ( Language of trees

Enumerate caterpillars

Get their associated difference words

ε, 0, 1, 00, 10, 11, 0000, 1000, 1001, 1010, 1100, 1101, . . .

Count them by length

n 0 1 2 3 4 5 6 7 8 9

1 2 3 5 8 14 23 41 70 125

Check OEIS It is A194850!

29/31

Page 95: How to count leaves in the trees from Tetris?

Caterpillars

L = 223455667778 and ∆L = 1110101001

What is the language of caterpillars ?

Language of caterpillars ( Language of trees

Enumerate caterpillars

Get their associated difference words

ε, 0, 1, 00, 10, 11, 0000, 1000, 1001, 1010, 1100, 1101, . . .

Count them by length

n 0 1 2 3 4 5 6 7 8 9

1 2 3 5 8 14 23 41 70 125

Check OEIS It is A194850!

29/31

Page 96: How to count leaves in the trees from Tetris?

Caterpillars

L = 223455667778 and ∆L = 1110101001

What is the language of caterpillars ?

Language of caterpillars ( Language of trees

Enumerate caterpillars

Get their associated difference words

ε, 0, 1, 00, 10, 11, 0000, 1000, 1001, 1010, 1100, 1101, . . .

Count them by length

n 0 1 2 3 4 5 6 7 8 9

1 2 3 5 8 14 23 41 70 125

Check OEIS It is A194850!

29/31

Page 97: How to count leaves in the trees from Tetris?

Caterpillars

L = 223455667778 and ∆L = 1110101001

What is the language of caterpillars ?

Language of caterpillars ( Language of trees

Enumerate caterpillars

Get their associated difference words

ε, 0, 1, 00, 10, 11, 0000, 1000, 1001, 1010, 1100, 1101, . . .

Count them by length

n 0 1 2 3 4 5 6 7 8 9

1 2 3 5 8 14 23 41 70 125

Check OEIS It is A194850!

29/31

Page 98: How to count leaves in the trees from Tetris?

Caterpillars

L = 223455667778 and ∆L = 1110101001

What is the language of caterpillars ?

Language of caterpillars ( Language of trees

Enumerate caterpillars

Get their associated difference words

ε, 0, 1, 00, 10, 11, 0000, 1000, 1001, 1010, 1100, 1101, . . .

Count them by length

n 0 1 2 3 4 5 6 7 8 9

1 2 3 5 8 14 23 41 70 125

Check OEIS It is A194850!

29/31

Page 99: How to count leaves in the trees from Tetris?

Caterpillars

L = 223455667778 and ∆L = 1110101001

What is the language of caterpillars ?

Language of caterpillars ( Language of trees

Enumerate caterpillars

Get their associated difference words

ε, 0, 1, 00, 10, 11, 0000, 1000, 1001, 1010, 1100, 1101, . . .

Count them by length

n 0 1 2 3 4 5 6 7 8 9

1 2 3 5 8 14 23 41 70 125

Check OEIS

It is A194850!

29/31

Page 100: How to count leaves in the trees from Tetris?

Caterpillars

L = 223455667778 and ∆L = 1110101001

What is the language of caterpillars ?

Language of caterpillars ( Language of trees

Enumerate caterpillars

Get their associated difference words

ε, 0, 1, 00, 10, 11, 0000, 1000, 1001, 1010, 1100, 1101, . . .

Count them by length

n 0 1 2 3 4 5 6 7 8 9

1 2 3 5 8 14 23 41 70 125

Check OEIS It is A194850!29/31

Page 101: How to count leaves in the trees from Tetris?

Prefix normal word

A prefix normal word w1 · · ·wn is a binary word such that∀` ≤ n, i ≤ n − `,

|w1 · · ·w`|1 ≥ |wi · · ·wi+`|1.

L = 223455667778 and ∆L = 1110101001

Conjecture:

Language of Caterpillars = {prefix normal words}

Language of Caterpillars ⊇ {prefix normal words}

Proposition (Blondin Masse, de Carufel, Goupil, Lapointe, V.)

30/31

Page 102: How to count leaves in the trees from Tetris?

Prefix normal word

A prefix normal word w1 · · ·wn is a binary word such that∀` ≤ n, i ≤ n − `,

|w1 · · ·w`|1 ≥ |wi · · ·wi+`|1.

L = 223455667778 and ∆L = 1110101001

Conjecture:

Language of Caterpillars = {prefix normal words}

Language of Caterpillars ⊇ {prefix normal words}

Proposition (Blondin Masse, de Carufel, Goupil, Lapointe, V.)

30/31

Page 103: How to count leaves in the trees from Tetris?

Prefix normal word

A prefix normal word w1 · · ·wn is a binary word such that∀` ≤ n, i ≤ n − `,

|w1 · · ·w`|1 ≥ |wi · · ·wi+`|1.

L = 223455667778 and ∆L = 1110101001

Conjecture:

Language of Caterpillars = {prefix normal words}

Language of Caterpillars ⊇ {prefix normal words}

Proposition (Blondin Masse, de Carufel, Goupil, Lapointe, V.)

30/31

Page 104: How to count leaves in the trees from Tetris?

Perspectives

Determine when an integer sequence corresponds to a tree orto a graph

Find an application in Chemistry or Biology

Extend the results obtained in Z2 to the infinite triangular grid(polyiamonds) and to the infinite hexagonal grid (polyhexes)

31/31

Page 105: How to count leaves in the trees from Tetris?

Perspectives

Determine when an integer sequence corresponds to a tree orto a graph

Find an application in Chemistry or Biology

Extend the results obtained in Z2 to the infinite triangular grid(polyiamonds) and to the infinite hexagonal grid (polyhexes)

31/31

Page 106: How to count leaves in the trees from Tetris?

Perspectives

Determine when an integer sequence corresponds to a tree orto a graph

Find an application in Chemistry or Biology

Extend the results obtained in Z2 to the infinite triangular grid(polyiamonds) and to the infinite hexagonal grid (polyhexes)

31/31

Page 107: How to count leaves in the trees from Tetris?

Perspectives

Determine when an integer sequence corresponds to a tree orto a graph

Find an application in Chemistry or Biology

Extend the results obtained in Z2 to the infinite triangular grid(polyiamonds) and to the infinite hexagonal grid (polyhexes)

31/31