Good Will Hunting s Problem: Counting Homeomorphically Irreducible Trees

Similar documents
Counting unlabeled k-trees

Trees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph.

Figure 4.1: The evolution of a rooted tree.

Evolution Module. 6.1 Phylogenetic Trees. Bob Gardner and Lev Yampolski. Integrated Biology and Discrete Math (IBMS 1300)

Trees and Tree Encodings

CHAPTER 2. Graphs. 1. Introduction to Graphs and Graph Isomorphism

An Exact Enumeration of Unlabeled Cactus Graphs

HOMEWORK #4 SOLUTIONS - MATH 4160

Outerplanar Obstructions for the Feedback Vertex Set

Discrete mathematics , Fall Instructor: prof. János Pach

Split-Decomposition Trees with Prime Nodes: Enumeration and Random Generation of Cactus Graphs. Maryam Bahrani Jérémie Lumbroso

A graph is finite if its vertex set and edge set are finite. We call a graph with just one vertex trivial and all other graphs nontrivial.

March 20/2003 Jayakanth Srinivasan,

γ(ɛ) (a, b) (a, d) (d, a) (a, b) (c, d) (d, d) (e, e) (e, a) (e, e) (a) Draw a picture of G.

WUCT121. Discrete Mathematics. Graphs

8 Matroid Intersection

Proposition 1. The edges of an even graph can be split (partitioned) into cycles, no two of which have an edge in common.

Ma/CS 6b Class 13: Counting Spanning Trees

1 Some Solution of Homework

Exercise set 2 Solutions

THE PROBABILITY OF A GIVEN 1-CHOICE STRUCTURE* FRANK HARARY UNIVERSITY OF MICHIGAN AND RON READ UNIVERSITY OF THE WEST INDIES

NOTE. Intransitive Trees

Distribution of tree parameters

Generating Functions for Multi-labeled Trees

Section Summary. Introduction to Trees Rooted Trees Trees as Models Properties of Trees

Adjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge.

Noncrossing Trees and Noncrossing Graphs

Graphs That Are Randomly Traceable from a Vertex

Binary Decision Diagrams

Binary trees having a given number of nodes with 0, 1, and 2 children.

Well labeled paths and the volume of a polytope

Introduction III. Graphs. Motivations I. Introduction IV

4 Basics of Trees. Petr Hliněný, FI MU Brno 1 FI: MA010: Trees and Forests

Math 221 Final Exam Review

Lecture 2 : Counting X-trees

COVERING SPACES AND SUBGROUPS OF THE FREE GROUP

Surfaces from a polygon. Olivier Bernardi Massachusetts Instiitute of Technology

An Introduction to Graph Theory

Graph Theory CS/Math231 Discrete Mathematics Spring2015

arxiv: v1 [math.co] 20 Aug 2012

MATH10001 Mathematical Workshop. Graphs, Trees and Algorithms Part 2. Trees. From Trees to Prüfer Codes

Unlabeled equivalence for matroids representable over finite fields

IMO Training 2010 Double Counting Victoria Krakovna. Double Counting. Victoria Krakovna

Multivariate Lagrange inversion formula and the cycle lemma

A generalization of Mader s theorem

Lesson 19: The Graph of a Linear Equation in Two Variables is a Line

Graph Theory S 1 I 2 I 1 S 2 I 1 I 2

A Complete Grammar for Decomposing a Family of Graphs into 3-connected Components

The optimal routing of augmented cubes.

Lecture 4: Trees and Art Galleries

Paths, Flowers and Vertex Cover

Slides for Faculty Oxford University Press All rights reserved.

Star Decompositions of the Complete Split Graph

Elements of Graph Theory

4 Fractional Dimension of Posets from Trees

Finite Model Generation for Isabelle/HOL Using a SAT Solver

MC302 GRAPH THEORY SOLUTIONS TO HOMEWORK #1 9/19/13 68 points + 6 extra credit points

The Matrix-Tree Theorem and Its Applications to Complete and Complete Bipartite Graphs

Material from Recitation 1

Discrete mathematics

6.001 Notes: Section 4.1

Indicate the option which most accurately completes the sentence.

REDUNDANCY OF MULTISET TOPOLOGICAL SPACES

Discrete Mathematics Introduction

The number of spanning trees of random 2-trees

COUNTING AND PROBABILITY

Let denote the number of partitions of with at most parts each less than or equal to. By comparing the definitions of and it is clear that ( ) ( )

Chapter 3 Trees. Theorem A graph T is a tree if, and only if, every two distinct vertices of T are joined by a unique path.

Chung-Feller Theorems

13 th Annual Johns Hopkins Math Tournament Saturday, February 19, 2011 Automata Theory EUR solutions

As a consequence of the operation, there are new incidences between edges and triangles that did not exist in K; see Figure II.9.

1 Variations of the Traveling Salesman Problem

Math236 Discrete Maths with Applications

Basic Properties The Definition of Catalan Numbers

Combinatorics of free product graphs

Core Membership Computation for Succinct Representations of Coalitional Games

1 Elementary number theory

Parameterized coloring problems on chordal graphs

Lesson 19: The Graph of a Linear Equation in Two Variables Is a Line

Foundations of Computer Science Spring Mathematical Preliminaries

4. Simplicial Complexes and Simplicial Homology

Lecture 1. 1 Notation

Hamiltonian cycles in bipartite quadrangulations on the torus

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1

Math 8803/4803, Spring 2008: Discrete Mathematical Biology

Catalan Numbers. Table 1: Balanced Parentheses

Basics of Graph Theory

Abstract. A graph G is perfect if for every induced subgraph H of G, the chromatic number of H is equal to the size of the largest clique of H.

K 4,4 e Has No Finite Planar Cover

MT5821 Advanced Combinatorics

Priority Queues. 1 Introduction. 2 Naïve Implementations. CSci 335 Software Design and Analysis III Chapter 6 Priority Queues. Prof.

Definition: A graph G = (V, E) is called a tree if G is connected and acyclic. The following theorem captures many important facts about trees.

Lecture Notes on Data Representation

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/18/14

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur

INTRODUCTION TO THE HOMOLOGY GROUPS OF COMPLEXES

Math 5320, 3/28/18 Worksheet 26: Ruler and compass constructions. 1. Use your ruler and compass to construct a line perpendicular to the line below:

CPS 102: Discrete Mathematics. Quiz 3 Date: Wednesday November 30, Instructor: Bruce Maggs NAME: Prob # Score. Total 60

Forbidden Minors for a Pursuit Game on Graphs

Chapter 11: Graphs and Trees. March 23, 2008

Transcription:

Good Will Hunting s Problem: Counting Homeomorphically Irreducible Trees Ira M. Gessel Department of Mathematics Brandeis University Brandeis University Combinatorics Seminar September 18, 2018

Good Will Hunting s Problem In the movie Good Will Hunting, Professor Lambeau says:

Good Will Hunting s Problem In the movie Good Will Hunting, Professor Lambeau says: My colleagues and I have conferred, and there is a problem on the board right now that took us more than two years to prove. Let this be said: the gauntlet has been thrown down. But the faculty have answered, and answered with vigor.

Good Will Hunting s Problem In the movie Good Will Hunting, Professor Lambeau says: My colleagues and I have conferred, and there is a problem on the board right now that took us more than two years to prove. Let this be said: the gauntlet has been thrown down. But the faculty have answered, and answered with vigor. The problem seems to be Draw all the homeomorphically irreducible trees with n = 10.

A tree is a connected graph without cycles.

A tree is a connected graph without cycles. A tree is homeomorphically irreducible if it has no vertices of degree 2.

We want to count unlabeled trees, which more formally are isomorphism classes of trees. For example, 1 2 4 5 4 6 5 3 is isomorphic to 2 1 8 9

The answer to Good Will Hunting s problem is that there are 10 unlabeled homeomorphically irreducible trees with 10 vertices.

The answer to Good Will Hunting s problem is that there are 10 unlabeled homeomorphically irreducible trees with 10 vertices.

In the movie Will just draws them (actually he s interrupted after drawing 8 of them). It s not hard to show that these are all different.

In the movie Will just draws them (actually he s interrupted after drawing 8 of them). It s not hard to show that these are all different. How do we know we haven t missed any?

In the movie Will just draws them (actually he s interrupted after drawing 8 of them). It s not hard to show that these are all different. How do we know we haven t missed any? Let n i be the number of vertices of degree i. Then i n i = 10.

In the movie Will just draws them (actually he s interrupted after drawing 8 of them). It s not hard to show that these are all different. How do we know we haven t missed any? Let n i be the number of vertices of degree i. Then i n i = 10. Also, in any graph the sum of the degrees is twice the number of edges. A tree with m vertices has m 1 edges. So i in i = 18.

In the movie Will just draws them (actually he s interrupted after drawing 8 of them). It s not hard to show that these are all different. How do we know we haven t missed any? Let n i be the number of vertices of degree i. Then i n i = 10. Also, in any graph the sum of the degrees is twice the number of edges. A tree with m vertices has m 1 edges. So i in i = 18. It s convenient to eliminate n 1 from these equations. Subtracting the first from the second gives 8n 9 + 7n 8 + 6n 7 + 5n 6 + 4n 5 + 3n 4 + 2n 3 + n 2 = 8. Then n 9, n 8, n 7, and n 6 must all be 0 or 1, and at most one of them can be 1, and n 2 must be 0.... It s not hard to check all the possibilities.

A more interesting problem A much more interesting problem is to find the number of homeomorphically irreducible trees with n vertices for all n.

A more interesting problem A much more interesting problem is to find the number of homeomorphically irreducible trees with n vertices for all n. But what does this mean?

A more interesting problem A much more interesting problem is to find the number of homeomorphically irreducible trees with n vertices for all n. But what does this mean? Ideally, we d like a nice formula for the number of homeomorphically irreducible trees with n vertices, like Cayley s formula n n 2 for the number of labeled trees with vertex set {1, 2,..., n}.

A more interesting problem A much more interesting problem is to find the number of homeomorphically irreducible trees with n vertices for all n. But what does this mean? Ideally, we d like a nice formula for the number of homeomorphically irreducible trees with n vertices, like Cayley s formula n n 2 for the number of labeled trees with vertex set {1, 2,..., n}. But there is no such formula.

A more interesting problem A much more interesting problem is to find the number of homeomorphically irreducible trees with n vertices for all n. But what does this mean? Ideally, we d like a nice formula for the number of homeomorphically irreducible trees with n vertices, like Cayley s formula n n 2 for the number of labeled trees with vertex set {1, 2,..., n}. But there is no such formula. Alternatively, we might hope for an efficient algorithm for computing the number t n of homeomorphically irreducible trees with n vertices.

A more interesting problem A much more interesting problem is to find the number of homeomorphically irreducible trees with n vertices for all n. But what does this mean? Ideally, we d like a nice formula for the number of homeomorphically irreducible trees with n vertices, like Cayley s formula n n 2 for the number of labeled trees with vertex set {1, 2,..., n}. But there is no such formula. Alternatively, we might hope for an efficient algorithm for computing the number t n of homeomorphically irreducible trees with n vertices. We can do better than this.

We will find a (reasonably) simple equation for the generating function t n x n n=1 from which the coefficients can be computed efficiently.

We will find a (reasonably) simple equation for the generating function t n x n n=1 from which the coefficients can be computed efficiently. First we ll do this for trees without the requirement of homeomorphic irreducibility; then counting homeomorphically irreducible trees is a straightforward variation.

We will find a (reasonably) simple equation for the generating function t n x n n=1 from which the coefficients can be computed efficiently. First we ll do this for trees without the requirement of homeomorphic irreducibility; then counting homeomorphically irreducible trees is a straightforward variation. The enumeration of homeomorphically irreducible trees was accomplished by Frank Harary and Geert Prins, The number of homeomorphically irreducible trees, and other species, Acta Math. 101 (1959), 141 162. We will follow the general outline of their approach, with some simplifications and modernizations.

Counting unlabeled trees We count (unlabeled) trees in two steps. 1. First we count rooted trees. 2. Then we reduce the problem of counting unrooted trees to that of counting rooted trees. Unlabeled trees were first counted by Cayley in 1875; our approach is similar to that of Richard Otter, The number of trees, Ann. of Math. (2) 49 (1948), 583 599.

A rooted tree (or more precisely, a vertex-rooted tree) is a tree in which one vertex has been marked as a root: We often draw rooted trees with the root at the top:

Rooted trees have a recursive decomposition: every (unlabeled) rooted tree may be decomposed into a root and a multiset of rooted trees.

Counting multisets Let s take a slight detour to count multisets in general. Suppose we have a set A, not necessarily finite. Each element a A has a size s(a) P. We give a the weight x s(a).

Counting multisets Let s take a slight detour to count multisets in general. Suppose we have a set A, not necessarily finite. Each element a A has a size s(a) P. We give a the weight x s(a). We assume that for each integer n, only finitely many elements of A have size n. Then we define the generating function A(x) for A to be the formal power series A(x) = a A x s(a).

We define the size of a multiset {a 1, a 2,..., a k } of elements of A to be s(a 1 ) + s(a 2 ) + + s(a k ). Then the weight of {a 1, a 2,..., a k } is x s(a 1)+s(a 2 )+ +s(a k ), the product of the weights of its elements. We would like to find a formula for the generating function (sum of weights) for multisets of elements of A in terms of A(x).

We define the size of a multiset {a 1, a 2,..., a k } of elements of A to be s(a 1 ) + s(a 2 ) + + s(a k ). Then the weight of {a 1, a 2,..., a k } is x s(a 1)+s(a 2 )+ +s(a k ), the product of the weights of its elements. We would like to find a formula for the generating function (sum of weights) for multisets of elements of A in terms of A(x). For multisets made up of copies of a single element a A, the generating function is 1 + x s(a) + x 2s(a) + x 3s(a) + = 1 1 x s(a)

We define the size of a multiset {a 1, a 2,..., a k } of elements of A to be s(a 1 ) + s(a 2 ) + + s(a k ). Then the weight of {a 1, a 2,..., a k } is x s(a 1)+s(a 2 )+ +s(a k ), the product of the weights of its elements. We would like to find a formula for the generating function (sum of weights) for multisets of elements of A in terms of A(x). For multisets made up of copies of a single element a A, the generating function is 1 + x s(a) + x 2s(a) + x 3s(a) + = 1 1 x s(a) So the generating function for all multisets of elements of A is a A 1 1 x s(a)

It s convenient to write this in another form. The logarithm of this generating function is log a A since A(x) = a A x s(a). 1 1 x s(a) = 1 log 1 x s(a) a A = x ks(a) k a A k=1 1 = (x k ) s(a) k = k=1 k=1 a A 1 k A(x k )

Thus if A(x) is the generating function for a set A then the generating function for multisets of elements of A is ( exp k=1 A(x k ) ). k

Thus if A(x) is the generating function for a set A then the generating function for multisets of elements of A is ( exp k=1 A(x k ) ). k Let s write h n [A(x)] for the generating function for multisets of n elements of A ( n-multisets ) and we write h[a(x)] for n=0 h n[a(x)]. Then we have shown ( h[a(x)] = exp k=1 A(x k ) ). k

2-multisets We will also need the generating function for 2-element multisets of elements of A, which is h 2 [A(x)] = 1 2 ( ) A(x) 2 + A(x 2 ).

2-multisets We will also need the generating function for 2-element multisets of elements of A, which is h 2 [A(x)] = 1 2 ( ) A(x) 2 + A(x 2 ). Proof. First, A(x) 2 counts ordered pairs of elements of A. So it counts each unordered pair of distinct elements twice and each unordered pair of the same element once.

2-multisets We will also need the generating function for 2-element multisets of elements of A, which is h 2 [A(x)] = 1 2 ( ) A(x) 2 + A(x 2 ). Proof. First, A(x) 2 counts ordered pairs of elements of A. So it counts each unordered pair of distinct elements twice and each unordered pair of the same element once. Next, A(x 2 ) counts ordered pairs of the same element of A, so it counts unordered pairs of the same element.

2-multisets We will also need the generating function for 2-element multisets of elements of A, which is h 2 [A(x)] = 1 2 ( ) A(x) 2 + A(x 2 ). Proof. First, A(x) 2 counts ordered pairs of elements of A. So it counts each unordered pair of distinct elements twice and each unordered pair of the same element once. Next, A(x 2 ) counts ordered pairs of the same element of A, so it counts unordered pairs of the same element. Therefore A(x) 2 + A(x 2 ) counts every unordered pair twice.

Rooted trees Our decomposition of a rooted tree into a root together with a multiset of rooted trees gives the functional equation for the generating function R(x) for rooted trees, where the size of a rooted tree is the number of vertices: ( R(x k ) ) R(x) = xh[r(x)] = x exp. k k=1 From this equation we can easily compute R(x) = x +x 2 +2x 3 +4x 4 +9x 5 +20x 6 +48x 7 +115x 8 +286x 9 + 719x 10 + 1842x 11 + 4766x 12 + 12486x 13 + 32973x 14 + 87811x 15 + 235381x 16 + 634847x 17 + 1721159x 18 + 4688676x 19 + 12826228x 20 + 35221832x 21 +

Unrooted trees To count unrooted trees, we find a formula that expresses the generating function for unrooted trees in terms of the generating function for rooted trees. To do this, we use the dissymmetry theorem of Pierre Leroux. (Otter used a related, but somewhat different, result called the dissimilarity characteristic theorem.)

Leroux s theorem relates unrooted trees to trees rooted at a vertex: trees rooted at an edge: and trees rooted at a vertex and incident edge:

The dissymmetry theorem. Let T be a (labeled) tree. Let T be the set of rootings of T at a vertex, let T be the set of rootings of T at an edge, and let T be the set of rootings of T at a vertex and incident edge. Then there is a bijection φ from T T to {T } T. Moreover, φ is compatible with isomorphisms of trees; i.e., if α := T 1 T 2 is an isomorphism of trees than φ α = α φ. Thus φ gives a corresponding bijection for unlabeled trees.

Example:

To prove the dissymmetry theorem, we start with the fact that every tree has either a center edge or a center vertex which is fixed by every automorphism of the tree. The center is obtained by removing every leaf and its incident edge successively until only a vertex or edge remains.

To prove the dissymmetry theorem, we start with the fact that every tree has either a center edge or a center vertex which is fixed by every automorphism of the tree. The center is obtained by removing every leaf and its incident edge successively until only a vertex or edge remains.

To prove the dissymmetry theorem, we start with the fact that every tree has either a center edge or a center vertex which is fixed by every automorphism of the tree. The center is obtained by removing every leaf and its incident edge successively until only a vertex or edge remains.

To prove the dissymmetry theorem, we start with the fact that every tree has either a center edge or a center vertex which is fixed by every automorphism of the tree. The center is obtained by removing every leaf and its incident edge successively until only a vertex or edge remains.

To prove the dissymmetry theorem, we start with the fact that every tree has either a center edge or a center vertex which is fixed by every automorphism of the tree. The center is obtained by removing every leaf and its incident edge successively until only a vertex or edge remains.

To prove the dissymmetry theorem, we start with the fact that every tree has either a center edge or a center vertex which is fixed by every automorphism of the tree. The center is obtained by removing every leaf and its incident edge successively until only a vertex or edge remains.

Now suppose that T w is a T tree rooted at a vertex or edge w. If w is the center of T then φ(t w ) is just T. Otherwise, there is a unique path from w to the center. Then φ(t w ) is T rooted at both w and the next vertex or edge on this path (which might be the center).

A corollary of the dissymmetry theorem allows us to count (unrooted) unlabeled trees: Let T be a class of trees closed under isomorphism. Let T (x) be the generating function for unlabeled trees of T. Let T (x), T (x), and T (x) be the generating functions for unlabeled trees in T rooted at a vertex, at an edge, or at a vertex and incident edge. Then T (x) + T (x) = T (x) + T (x), so T (x) = T (x) + T (x) T (x).

For the case in which T is the class of all trees, we saw that T (x) = R(x) where R(x) = xh[r(x)]. We need to compute T (x) and T (x). In fact, we have T (x) = h 2 [R(x)] = 1 2 ( ) R(x) 2 + R(x 2 ) and T (x) = R(x) 2.

For T (x) = h 2 [R(x)], we have a bijection from trees rooted at an edge to unordered pairs of rooted trees:

For T (x) = h 2 [R(x)], we have a bijection from trees rooted at an edge to unordered pairs of rooted trees: Similarly, for T (x) = R(x) 2, we have a bijection from trees rooted at a vertex and incident edge to ordered pairs of rooted trees:

Putting everything together, we get where T (x) = R(x) + h 2 [R(x)] R(x) 2 = R(x) + 1 ( ) R(x) 2 + R(x 2 ) R(x) 2 2 = R(x) 1 ( ) R(x) 2 R(x 2 ) 2 ( R(x) = xh[r(x)] = x exp and we can easily compute k=1 R(x k ) ) k T (x) = x +x 2 +3x 3 +6x 4 +15x 5 +34x 6 +85x 7 +207x 8 +525x 9 + 1332x 10 + 3449x 11 + 8981x 12 + 23671x 13 + 62787x 14 + 167881x 15 + 451442x 16 + 1221065x 17 + 3318451x 18 + 9059397x 19 + 24829391x 20 + 68299159x 21 +

Counting homeomorphically irreducible trees We take the same approach with homeomorphically irreducible trees. We need to count homeomorphically irreducible trees rooted at a vertex, at an edge, and at a vertex and incident edge.

Homeomorphically irreducible trees rooted a vertex Let s compare the degrees of vertices with the number of children in rooted trees: degree 2 2 children degree 2 1 child

We need to count rooted trees in which the root does not have exactly two children, and no non-root vertex has exactly one child.

We need to count rooted trees in which the root does not have exactly two children, and no non-root vertex has exactly one child. To do this we first count rooted trees in which no vertex has one child. Let S(x) be the generating function for these trees. Then S(x) = x n 1 h n [S(x)] = x ( h[s(x)] S(x) )

We need to count rooted trees in which the root does not have exactly two children, and no non-root vertex has exactly one child. To do this we first count rooted trees in which no vertex has one child. Let S(x) be the generating function for these trees. Then S(x) = x n 1 h n [S(x)] = x ( h[s(x)] S(x) ) and the generating function for homeomorphically irreducible trees rooted at a vertex is T (x) = x n 2 h n [S(x)] = x ( h[s(x)] h 2 [S(x)] ). = (1 + x)s(x) xh 2 [S(x)]

The generating function for homeomorphically irreducible trees rooted at an edge is T (x) = h 2 [S(x)] and the generating function for homeomorphically irreducible trees rooted a vertex and incident edge is T (x) = S(x) 2. So our final result is that the generating function for unrooted homeomorphically irreducible trees is where S(x) satisfies (1 + x)s(x) + (1 x)h 2 [S(x)] S(x) 2 S(x) = x ( h[s(x)] S(x) ).

We can then compute as many terms as we want: T (x) = x + x 2 + x 4 + x 5 + 2x 6 + 2x 7 + 4x 8 + 5x 9 + 10x 10 + 14x 11 + 26x 12 + 42x 13 + 78x 14 + 132x 15 + 249x 16 + 445x 17 + 842x 18 + 1561x 19 + 2988x 20 + 5671x 21 +

We can then compute as many terms as we want: T (x) = x + x 2 + x 4 + x 5 + 2x 6 + 2x 7 + 4x 8 + 5x 9 + 10x 10 + 14x 11 + 26x 12 + 42x 13 + 78x 14 + 132x 15 + 249x 16 + 445x 17 + 842x 18 + 1561x 19 + 2988x 20 + 5671x 21 + The number of homeomorphically irreducible trees with 100 vertices is 76119905667088547333499833156.