Finding Optimal Tree Decompositions

Total Page:16

File Type:pdf, Size:1020Kb

Finding Optimal Tree Decompositions MSc thesis Computer Science Finding Optimal Tree Decompositions Tuukka Korhonen June 4, 2020 Faculty of Science University of Helsinki Supervisor(s) Assoc. Prof. Matti J¨arvisalo,Dr. Jeremias Berg Examiner(s) Assoc. Prof. Matti J¨arvisalo,Dr. Jeremias Berg Contact information P. O. Box 68 (Pietari Kalmin katu 5) 00014 University of Helsinki,Finland Email address: [email protected].fi URL: http://www.cs.helsinki.fi/ HELSINGIN YLIOPISTO – HELSINGFORS UNIVERSITET – UNIVERSITY OF HELSINKI Tiedekunta — Fakultet — Faculty Koulutusohjelma — Utbildningsprogram — Study programme Faculty of Science Computer Science Tekij¨a— F¨orfattare— Author Tuukka Korhonen Ty¨onnimi — Arbetets titel — Title Finding Optimal Tree Decompositions Ohjaajat — Handledare — Supervisors Assoc. Prof. Matti J¨arvisalo, Dr. Jeremias Berg Ty¨onlaji — Arbetets art — Level Aika — Datum — Month and year Sivum¨a¨ar¨a— Sidoantal — Number of pages MSc thesis June 4, 2020 94 pages, 1 appendix page Tiivistelm¨a— Referat — Abstract The task of organizing a given graph into a structure called a tree decomposition is relevant in multiple areas of computer science. In particular, many NP-hard problems can be solved in polynomial time if a suitable tree decomposition of a graph describing the problem instance is given as a part of the input. This motivates the task of finding as good tree decompositions as possible, or ideally, optimal tree decompositions. This thesis is about finding optimal tree decompositions of graphs with respect to several notions of optimality. Each of the considered notions measures the quality of a tree decomposition in the context of an application. In particular, we consider a total of seven problems that are formulated as finding optimal tree decompositions: treewidth, minimum fill-in, generalized and fractional hypertreewidth, total table size, phylogenetic character compatibility, and treelength. For each of these problems we consider the BT algorithm of Bouchitt´eand Todinca as the method of finding optimal tree decompositions. The BT algorithm is well-known on the theoretical side, but to our knowledge the first time it was implemented was only recently for the 2nd Parameterized Algorithms and Computational Experiments Challenge (PACE 2017). The author’s implementation of the BT algorithm took the second place in the minimum fill-in track of PACE 2017. In this thesis we review and extend the BT algorithm and our implementation. In particular, we improve the efficiency of the al- gorithm in terms of both theory and practice. We also implement the algorithm for each of the seven problems considered, introducing a novel adaptation of the algorithm for the maximum compatibility problem of phylogenetic characters. Our implementation outperforms alternative state-of-the-art approaches in terms of numbers of test instances solved on well-known bench- marks on minimum fill-in, generalized hypertreewidth, fractional hypertreewidth, total table size, and the maximum compatibility problem of phylogenetic characters. Furthermore, to our understanding the implementation is the first exact approach for the treelength problem. ACM Computing Classification System (CCS) Theory of computation → Design and analysis of algorithms → Graph algorithms analysis Avainsanat — Nyckelord — Keywords tree decompositions, triangulations, Bouchitt´e–Todinca algorithm, potential maximal cliques S¨ailytyspaikka — F¨orvaringsst¨alle— Where deposited Helsinki University Library Muita tietoja — ¨ovrigauppgifter — Additional information Algorithms specialisation line Contents 1 Introduction1 1.1 Contributions.................................. 3 1.2 Organization of the Thesis........................... 4 2 Preliminaries5 2.1 Graph Theory and Notations ......................... 5 2.2 Tree Decompositions.............................. 5 2.3 Triangulations.................................. 7 2.4 From Tree Decompositions to Triangulations................. 9 2.5 Cost Functions on Minimal Triangulations.................. 11 3 Optimal Tree Decompositions 13 3.1 Treewidth.................................... 13 3.2 Minimum Fill-In ................................ 14 3.3 Generalized and Fractional Hypertreewidth.................. 14 3.3.1 Generalized Hypertreewidth...................... 15 3.3.2 Fractional Hypertreewidth....................... 16 3.3.3 On the Notion of Hypertreewidth................... 17 3.4 Total Table Size................................. 18 3.5 Phylogenetic Character Compatibility..................... 19 3.5.1 Phylogenetic Trees ........................... 20 3.5.2 Formulation by Triangulations..................... 21 3.6 Treelength.................................... 23 4 The Bouchitt´e–Todinca Algorithm 25 4.1 Combinatorial Objects............................. 25 4.1.1 Minimal Separators........................... 25 4.1.2 Potential Maximal Cliques....................... 27 4.2 Enumeration Phase............................... 28 4.2.1 Enumerating Minimal Separators................... 28 4.2.2 Enumerating Potential Maximal Cliques ............... 30 4.3 Dynamic Programming Phase......................... 35 4.3.1 Characterization of Minimal Triangulations ............. 35 4.3.2 Finding Optimal Minimal Triangulations............... 38 4.3.3 The BT-DP Algorithm......................... 39 4.4 Adaptation to Maximum Compatibility.................... 42 5 Implementation 44 5.1 Overview..................................... 44 5.2 Preprocessing.................................. 46 5.2.1 General Techniques........................... 46 5.2.2 Treewidth................................ 47 5.2.3 Minimum Fill-In ............................ 48 5.2.4 Phylogenetic Character Compatibility................. 49 5.2.5 Other Problems............................. 49 5.3 Optimizing PMC-ENUM............................ 49 5.4 Computing Edge Covers ............................ 51 5.5 Low-level Implementation Details....................... 52 6 Empirical Comparison 53 6.1 Empirical Setup................................. 53 6.2 Benchmarks................................... 53 6.3 Treewidth.................................... 54 6.4 Minimum Fill-In ................................ 56 6.5 Generalized and Fractional Hypertreewidth.................. 57 6.5.1 Generalized Hypertreewidth...................... 59 6.5.2 Fractional Hypertreewidth....................... 60 6.6 Total Table Size................................. 61 6.7 Phylogenetic Character Compatibility..................... 61 6.7.1 Perfect Phylogeny............................ 62 6.7.2 Binary Maximum Compatibility.................... 63 6.7.3 Multi-state Maximum Compatibility ................. 65 6.8 Treelength.................................... 67 7 Analysis of the Implementation 68 7.1 Treewidth.................................... 68 7.2 Minimum Fill-In ................................ 71 7.3 Generalized Hypertreewidth.......................... 73 7.4 Fractional Hypertreewidth........................... 76 7.5 Perfect Phylogeny................................ 78 7.6 Multi-State Maximum Compatibility ..................... 80 8 Conclusions 84 Bibliography 87 A Summary of Empirical Comparison 1 Introduction Graphs and trees are ubiquitous objects in computer science. Graphs are used to represent any data with pairwise relations, such as flights between cities, connections in social net- works, or dependencies between variables. On the other hand, trees are used to represent more structured data, such as elements in a web page or indexed databases. Graphs allow the representation of more general structures than trees. However, this comes with the cost that many algorithmic problems solved efficiently in trees are intractable in graphs in general. For example, the graph problems of maximum independent set and minimum dominating set are NP-hard in general but can be solved in linear time if the input graph is a tree [5]. The desire to attain the best of both worlds motivates the task of organizing arbitrary graphs into tree-like structures. A tree decomposition of a graph is a tree whose nodes correspond to bags that contain vertices of the graph and whose structure maintains certain connectivity properties of the graph [15]. Tree decompositions have been rediscovered multiple times [14, 57, 91] and are also known as join trees [8], clique trees [46], and junction trees [62] in different contexts. It is trivial to obtain a tree decomposition of a graph in the form of a single bag containing all vertices of the graph. However, such a tree decomposition does not give any insight on the structure of the graph, and is thus not useful. To quantify the usefulness of a tree decomposition, multiple different cost functions on the quality of tree decompositions have been introduced, each with the associated goal to find tree decompositions with as small cost as possible, or in other words, optimal tree decompositions. Perhaps the most well-known cost function associated with tree decompositions is the width of a tree decomposition, measuring the number of vertices in the largest bag of the decomposition [15]. The graph parameter of treewidth denotes the smallest width of a tree decomposition of a graph [15]. The graphs with small treewidth generalize trees, trees having treewidth one. Many classical NP-hard graph problems, such as maximum independent set, minimum dominating set, chromatic number, and Hamiltonicity can be solved with dynamic programming over a tree decomposition, with a running time exponential in the width of the decomposition but linear in the size
Recommended publications
  • Elements of Graphical Models
    Steffen L. Lauritzen Elements of Graphical Models Lectures from the XXXVIth International Probability Summer School in Saint-Flour, France, 2006 September 4, 2011 Springer Your dedication goes here Preface Here come the golden words place(s), First name Surname month year First name Surname vii Contents 1 Introduction ................................................... 1 2 Markov Properties ............................................. 5 2.1 Conditional Independence . .5 2.1.1 Basic properties . .5 2.1.2 General conditional independence . .6 2.2 Markov Properties for Undirected Graphs . .9 2.3 Markov Properties for Directed Acyclic Graphs . 15 2.4 Summary . 22 3 Graph Decompositions and Algorithms ........................... 25 3.1 Graph Decompositions and Markov Properties . 25 3.2 Chordal Graphs and Junction Trees . 27 3.3 Probability Propagation and Junction Tree Algorithms. 32 3.4 Local Computation . 32 3.5 Summary . 39 4 Specific Graphical Models ...................................... 41 4.1 Log-linear Models . 41 4.1.1 Interactions and factorization . 41 4.1.2 Dependence graphs and factor graphs . 42 4.1.3 Data and likelihood function . 44 4.2 Gaussian Graphical Models . 50 4.2.1 The multivariate Gaussian distribution . 50 4.2.2 The Wishart distribution . 52 4.2.3 Gaussian graphical models . 53 4.3 Summary . 58 5 Further Statistical Theory....................................... 61 5.1 Hyper Markov Laws . 61 5.2 Meta Markov Models . 66 ix x Contents 5.2.1 Bayesian inference . 71 5.2.2 Hyper inverse Wishart and Dirichlet laws . 72 5.3 Summary . 73 6 Estimation of Structure ......................................... 77 6.1 Estimation of Structure and Bayes Factors . 77 6.2 Estimating Trees and Forests . 81 6.3 Learning Bayesian networks .
    [Show full text]
  • Arxiv:1606.02359V1 [Stat.ME] 7 Jun 2016
    STRUCTURE LEARNING IN GRAPHICAL MODELING MATHIAS DRTON AND MARLOES H. MAATHUIS Abstract. A graphical model is a statistical model that is associated to a graph whose nodes correspond to variables of interest. The edges of the graph reflect allowed conditional dependencies among the variables. Graphical models admit computationally convenient fac- torization properties and have long been a valuable tool for tractable modeling of multivariate distributions. More recently, applications such as reconstructing gene regulatory networks from gene expression data have driven major advances in structure learning, that is, estimat- ing the graph underlying a model. We review some of these advances and discuss methods such as the graphical lasso and neighborhood selection for undirected graphical models (or Markov random fields), and the PC algorithm and score-based search methods for directed graphical models (or Bayesian networks). We further review extensions that account for effects of latent variables and heterogeneous data sources. 1. Introduction This article gives an overview of commonly used techniques for structure learning in graphical modeling. Structure learning is a model selection problem in which one estimates a graph that summarizes the dependence structure in a given data set. 1.1. What is a Graphical Model? A graphical model captures stochastic dependencies among a collection of random variables Xv, v 2 V (Lauritzen, 1996). Each model is associated to a graph G = (V; E), where the vertex set V indexes the variables and the edge set E imposes a set of conditional independencies. Specifically, Xv and Xw are required to be conditionally independent given XC := (Xu : u 2 C), denoted by Xv ?? Xw j XC , if every path between nodes v and w in G is suitably blocked by the nodes in C.
    [Show full text]
  • Chapter 6 Inference with Tree-Clustering
    Chapter 6 Inference with Tree-Clustering As noted in Chapters 3, 4, topological characterization of tractability in graphical models is centered on the graph parameter called induced-width or tree-width. In this chap- ter, we take variable elimination algorithms such as bucket-elimination one step further, showing that they are a restricted version of schemes that are based on the notion of tree-decompositions which is applicable across the whole spectrum of graphical models. These methods have received different names in different research areas, such as join-tree clustering, clique-tree clustering and hyper-tree decompositions. We will refer to these schemes by the umbrella name tree-clustering or tree-decomposition. The complexity of these methods is governed by the induced-width, the same parameter that controls the performance of bucket elimination. We will start by extending the bucket-elimination algorithm into an algorithms that process a special class of tree-decompositions, called bucket-trees, and will then move to the general notion of tree-decomposition. 6.1 Bucket-Tree Elimination The bucket-elimination algorithm, BE-bel, for belief updating computes the belief of the first node in the ordering, given all the evidence or just the probability of evidence. However, it is often desirable to answer the belief query for every variable in the network. A brute-force approach will require running BE-bel n times, each time with a different variable order. We will show next that this is unnecessary. By viewing bucket-elimination 103 104 CHAPTER 6. INFERENCE WITH TREE-CLUSTERING as message passing algorithm along a rooted bucket-tree, we can augment it with a second message passing from root to leaves which is equivalent to running the algorithm for each variable separately.
    [Show full text]
  • Unifying Cluster-Tree Decompositions for Reasoning in Graphical Models∗
    Unifying Cluster-Tree Decompositions for Reasoning in Graphical models¤ Kalev Kask¤, Rina Dechter¤, Javier Larrosa¤¤ and Avi Dechter¤¤¤ ¤Bren School of Information and Computer Science, University of California, Irvine, CA 92697-3425, USA ¤¤ Universitat Politcnica de Catalunya (UPC), Barcelona, Spain ¤¤¤ Business school, California State University, Northridge, CA, USA April 7, 2005 Abstract The paper provides a unifying perspective of tree-decomposition algorithms appearing in various automated reasoning areas such as join-tree clustering for constraint-satisfaction and the clique-tree al- gorithm for probabilistic reasoning. Within this framework, we in- troduce a new algorithm, called bucket-tree elimination (BT E), that extends Bucket Elimination (BE) to trees, and show that it can pro- vide a speed-up of n over BE for various reasoning tasks. Time-space tradeo®s of tree-decomposition processing are analyzed. 1 Introduction This paper provides a unifying perspective of tree-decomposition algorithms that appear in a variety of automated reasoning areas. Its main contribution ¤This work was supported in part by NSF grant IIS-0086529 and by MURI ONR award N0014-00-1-0617 1 is bringing together, within a single coherent framework, seemingly di®erent approaches that have been developed over the years within a number of di®erent communities 1. The idea of embedding a database that consists of a collection of functions or relations in a tree structure and, subsequently, processing it e®ectively by a tree-processing algorithm, has been discovered and rediscovered in dif- ferent contexts. Database researchers observed, almost three decades ago, that relational database schemes that constitute join-trees enable e±cient query processing [22].
    [Show full text]
  • Graphical Models and Message Passing
    Graphical Models and Message passing Yunshu Liu ASPITRG Research Group 2013-07-16 References: [1]. Steffen Lauritzen, Graphical Models, Oxford University Press, 1996 [2]. Michael I. Jordan, Graphical models, Statistical Science, Vol.19, No. 1. Feb., 2004 [3]. Christopher M. Bishop, Pattern Recognition and Machine Learning, Springer-Verlag New York, Inc. 2006 [4]. Daphne Koller and Nir Friedman, Probabilistic Graphical Models - Principles and Techniques, The MIT Press, 2009 [5].Kevin P. Murphy, Machine Learning - A Probabilistic Perspective, The MIT Press, 2012 Outline Preliminaries on Graphical Models Directed graphical model Undirected graphical model Directed graph and Undirected graph Message passing and sum-product algorithm Factor graphs Sum-product algorithms Junction tree algorithm Outline I Preliminaries on Graphical Models I Message passing and sum-product algorithm Preliminaries on Graphical Models Motivation: Curse of dimensionality I Matroid enumeration I Polyhedron computation I Entropic Region I Machine Learning: computing likelihoods, marginal probabilities ··· Graphical Models: Help capturing complex dependencies among random variables, building large-scale statistical models and designing efficient algorithms for Inference. Preliminaries on Graphical Models Definition of Graphical Models: A graphical model is a probabilistic model for which a graph denotes the conditional dependence structure between random variables. MIT : Accepted by MIT Stanford : Accepted by Stanford MIT Example: Suppose MIT and GPA Stanford accepted
    [Show full text]
  • Graph Properties of DAG Associahedra and Related Polytopes
    DEGREE PROJECT IN MATHEMATICS, SECOND CYCLE, 30 CREDITS STOCKHOLM, SWEDEN 2018 Graph properties of DAG associahedra and related polytopes JONAS BEDEROFF ERIKSSON KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF ENGINEERING SCIENCES Graph properties of DAG associahedra and related polytopes JONAS BEDEROFF ERIKSSON Degree Projects in Mathematics (30 ECTS credits) Degree Programme in Mathematics (120 credits) KTH Royal Institute of Technology year 2018 Supervisor at KTH: Liam Solus Examiner at KTH: Svante Linusson TRITA-SCI-GRU 2018:161 MAT-E 2018:25 Royal Institute of Technology School of Engineering Sciences KTH SCI SE-100 44 Stockholm, Sweden URL: www.kth.se/sci GRAPH PROPERTIES OF DAG ASSOCIAHEDRA AND RELATED POLYTOPES JONAS BEDEROFF ERIKSSON Sammanfattning. En riktad acyklisk graf kan betraktas som en representant för relatio- ner av betingat oberoende mellan stokastiska variabler. Ett grundläggande problem inom kausal inferens är, givet att vi får data från en sannolikhetsfördelning som uppfyller en mängd relationer av betingat oberoende, att hitta den underliggande graf som represen- terar dessa relationer. Den giriga SP-algoritmen strävar efter att hitta den underliggande grafen genom att traversera kanter på en polytop kallad DAG-associahedern. Därav spelar kantstrukturen hos DAG-associahedern en stor roll för vår förståelse för den giriga SP- algoritmens komplexitet. I den här uppsatsen studerar vi grafegenskaper hos kantgrafer av DAG-associahedern, relaterade polytoper och deras viktiga delgrafer. Exempel på grafe- genskaper som vi studerar är diameter, radie och center. Våra diameterresultat för DAG- associahedern ger upphov till en ny kausal inferensalgoritm med förbättrade teoretiska på- litlighetsgarantier och komplexitetsbegränsningar jämfört med den giriga SP-algoritmen. Abstract. A directed acyclic graph (DAG) can be thought of as encoding a set of condi- tional independence (CI) relations among random variables.
    [Show full text]