Constant Time Generation of Linear Extensions Akimitsu Ono Shin-ichi Nakano Gunma Univ. Out put Complete List of Linear Extensions of P Input Partial ordering.

Slides:



Advertisements
Similar presentations
Chapter 12 Binary Search Trees
Advertisements

Every edge is in a red ellipse (the bags). The bags are connected in a tree. The bags an original vertex is part of are connected.
Chapter 9 Code optimization Section 0 overview 1.Position of code optimizer 2.Purpose of code optimizer to get better efficiency –Run faster –Take less.
Michael Alves, Patrick Dugan, Robert Daniels, Carlos Vicuna
More Efficient Generation of Plane Triangulations Shin-ichi Nakano Takeaki Uno Gunma University National Institute of JAPAN Informatics, JAPAN 23/Sep/2003.
Techniques for Dealing with Hard Problems Backtrack: –Systematically enumerates all potential solutions by continually trying to extend a partial solution.
1 Section 9.4 Spanning Trees. 2 Let G be a simple graph. A spanning subtree of G is a subgraph of G containing every vertex of G –must be connected; contains.
Precedence Constrained Scheduling Abhiram Ranade Dept. of CSE IIT Bombay.
Advanced Topics in Algorithms and Data Structures 1 Rooting a tree For doing any tree computation, we need to know the parent p ( v ) for each node v.
Connected Components, Directed Graphs, Topological Sort COMP171.
Linear-Time Reconstruction of Zero-Recombinant Mendelian Inheritance on Pedigrees without Mating Loops Authors: Lan Liu, Tao Jiang Univ. California, Riverside.
Lec 15 April 9 Topics: l binary Trees l expression trees Binary Search Trees (Chapter 5 of text)
Is the following graph Hamiltonian- connected from vertex v? a). Yes b). No c). I have absolutely no idea v.
CSE 421 Algorithms Richard Anderson Lecture 4. What does it mean for an algorithm to be efficient?
Advanced Topics in Algorithms and Data Structures Page 1 An overview of lecture 3 A simple parallel algorithm for computing parallel prefix. A parallel.
3/10/03Tucker, Sec.3-51 Tucker, Applied Combinatorics, Sec. 3.5, Jo E-M “Big O” Notation We say that a function is if for some constant c, when n is large.
Randomness in Computation and Communication Part 1: Randomized algorithms Lap Chi Lau CSE CUHK.
Design and Analysis of Algorithms Minimum Spanning trees
School of EECS, Peking University “Advanced Compiler Techniques” (Fall 2011) Loops Guo, Yao.
Important Problem Types and Fundamental Data Structures
Trees and Tree Traversals Prof. Sin-Min Lee Department of Computer Science San Jose State University.
Graph Algorithms Using Depth First Search Prepared by John Reif, Ph.D. Distinguished Professor of Computer Science Duke University Analysis of Algorithms.
Subway Network Algorithm Matt Freeburg ICS 311 Fall 2006 University of Hawai’i at Manoa.
Busby, Dodge, Fleming, and Negrusa. Backtracking Algorithm Is used to solve problems for which a sequence of objects is to be selected from a set such.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
A Fast Algorithm To Determine Minimality of Strongly Connected Digraphs Under the direction of Dr. Robinson By Jianping Zhu.
A Fast Algorithm for Enumerating Bipartite Perfect Matchings Takeaki Uno (National Institute of Informatics, JAPAN)
Simple Efficient Algorithm for MPQ-tree of an Interval Graph Toshiki SAITOH Masashi KIYOMI Ryuhei UEHARA Japan Advanced Institute of Science and Technology.
MA/CSSE 473 Day 12 Insertion Sort quick review DFS, BFS Topological Sort.
Lecture 5: Backtracking Depth-First Search N-Queens Problem Hamiltonian Circuits.
Foundations of Discrete Mathematics
An Efficient Algorithm for Enumerating Pseudo Cliques Dec/18/2007 ISAAC, Sendai Takeaki Uno National Institute of Informatics & The Graduate University.
Discrete Structures Lecture 12: Trees Ji Yanyan United International College Thanks to Professor Michael Hvidsten.
A Study of Balanced Search Trees: Brainstorming a New Balanced Search Tree Anthony Kim, 2005 Computer Systems Research.
Compact Encodings of Graphs Shin-ichi Nakano (Gunma Univ.) Gunma.
Preview  Graph  Tree Binary Tree Binary Search Tree Binary Search Tree Property Binary Search Tree functions  In-order walk  Pre-order walk  Post-order.
Chap 8 Trees Def 1: A tree is a connected,undirected, graph with no simple circuits. Ex1. Theorem1: An undirected graph is a tree if and only if there.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
Jan Topological Order and SCC Edge classification Topological order Recognition of strongly connected components.
Data Structures and Algorithms in Parallel Computing Lecture 2.
Speeding Up Enumeration Algorithms with Amortized Analysis Takeaki Uno (National Institute of Informatics, JAPAN)
Data Structures and Algorithms in Parallel Computing Lecture 3.
Topological Sort: Definition
CSE 421 Algorithms Richard Anderson Winter 2009 Lecture 5.
Graph Connectivity This discussion concerns connected components of a graph. Previously, we discussed depth-first search (DFS) as a means of determining.
Fast Elimination of Redundant Linear Equations and Reconstruction of Recombination-free Mendelian Inheritance on a Pedigree Authors: Lan Liu & Tao Jiang,
7 Finding Bridge in a Graph. What is a bridge ? A C D B F G E.
CSE 421 Algorithms Richard Anderson Autumn 2015 Lecture 5.
1 Igor Burdonov Alexander Kossatchev Building direct and back spanning trees by automata on a graph The Institute for System Programming (ISP) of the Russian.
Topological Sorting.
Greedy Technique.
Minimum Spanning Tree Chapter 13.6.
Source Code for Data Structures and Algorithm Analysis in C (Second Edition) – by Weiss
12. Graphs and Trees 2 Summary
PC trees and Circular One Arrangements
CS120 Graphs.
Graph Algorithms Using Depth First Search
Connected Components Minimum Spanning Tree
Bart M. P. Jansen June 3rd 2016, Algorithms for Optimization Problems
Elementary graph algorithms Chapter 22
Md. Abul Kashem, Chowdhury Sharif Hasan, and Anupam Bhattacharjee
Subgraphs, Connected Components, Spanning Trees
Richard Anderson Winter 2009 Lecture 6
Elementary graph algorithms Chapter 22
Important Problem Types and Fundamental Data Structures
Richard Anderson Winter 2019 Lecture 6
Richard Anderson Lecture 5 Graph Theory
Output Sensitive Enumeration
Lecture 11 Graph Algorithms
Richard Anderson Autumn 2015 Lecture 6
Presentation transcript:

Constant Time Generation of Linear Extensions Akimitsu Ono Shin-ichi Nakano Gunma Univ. Out put Complete List of Linear Extensions of P Input Partial ordering P

Generation Problems Given a class C of objects we wish to enumerate efficiently every object in C without duplications Application: Test data

Basic Enumeration Algorithm 1 Define a dictionary 2 Design two methods find-first-One find-next-of(x) Based on this technique many enumeration algorithms have designed. Algorithm Enumeration x = Find-first-One while x != NIL do Output x x = find-next-of (x)

Improvement In general, the output of enumeration algorithm is huge and dominates the running time. If we only output the difference of the objects, then we can improve the running time a lot (Combinatorial) Gray Code O(n) time/each  O(1) time/each

Hamiltonian Path Vertex Object obj

Hamiltonian Path Vertex Object Edge difference is constnat obj

Hamiltonian Path Vertex Object Edge difference is constnat Hamiltonian Path dictionary obj

Unfortunately Hamiltonian Path may not exist! Vertex Object Edge difference is constnat No Hamiltonian Path No dictionary obj

Idea: However A Spanning Tree always exists! obj

Our Enummeration Algorithm 1 Define a spanning tree 2 Design two method find-root find-children-of(x) Algorithm enumeration x = find-root find-children-of (x) Algorithm find-children-of(x) Output(x) as a difference find-children-of(x) for each child xi do find-children-of(xi) obj If we can find k children in O(k) time, then we can find each object O(1) time for each

Our Enumeration Algorithms Based on this technique (output only difference) + (tree structure) we have designed many enumeration algorithms. Biconnected plane triangulations ICALP2001 Triconnected plane triangulations COCOON 2001 Floorplan ISAAC 2001 Planted tree IPL 2002 Free tree WG2004 Linear extension This Talk plane graph

Linear Extensions Out put A Linear Extension of P Input Partial ordering P Many scheduling problems with precedence constraints are modeled by a linear extension of a partial ordering Given a partial ordering P, one can compute a linear extension of P in O(n+m) time. See page 549 of (All arrow go right!) job

Generating All Linear Extensions Out put Complete List of Linear Extensions of P Input Partial ordering P

Known Enumeration Algorithms for Linear Extensions Well 71 O(n)time / each Knuth, Szwarcfiter 74 O(m+n)time / each Vorol and Rotem 81 O(n)time / each Pruesse and Ruskey 94 O(1)time / each on average This Talk O(1)time / each (worst case)

Pruesse and Ruskey 94 Input Partial ordering P

Pruesse and Ruskey 94 Input Partial ordering P If we can find a Hamiltonian Path then we can output each in O(1) time. However, …..

Pruesse and Ruskey 94 Input Partial ordering P

Pruesse and Ruskey 94 Input Partial ordering P G X K 2 Hamiltonian ! O(n) time for Trace Output O(1) time/each

Our Algorithm Root Define A sequence of linear extensions for each A linear extension P Parent of P within n step we always reach the Root

Family Tree of Linear Extensions

Our Algorithm 1234

Root Child of Root

Our Algorithm

Example Input Partial ordering P

How can we find children Input Partial ordering P #Type 1 Child 0 #Type 2 Child 3 #Type 3 Child 0 We can find k children in O(k) time

Running Time Preprocessing find root linear extension O(m+n) time Then trace the tree in O(n) time O(1) time / each on average

Odd-Even Travarsal Algorithm find-children-of(x) If depth is odd Output(x) for each child xi do find-children-of(xi) If depth is even Output(x)

Running Time Preprocessing find root linear extension O(m+n) time Then O(1) time / each on average ( in worst case)

Summary A simple enumeration algorithm for linear extensions Preprocessing find a linear extension O(m+n) time then trace the tree in O(n) time Output O(1) time / each

Future Works Can we estimate # of descendant objects in the tree without constructing the tree? load balancing

Thank you for your attention! Give me questions and suggestions!