Trimming and gluing Gray codes

Slides:



Advertisements
Similar presentations
Lower Bounds for Additive Spanners, Emulators, and More David P. Woodruff MIT and Tsinghua University To appear in FOCS, 2006.
Advertisements

Connectivity - Menger’s Theorem Graphs & Algorithms Lecture 3.
Approximate List- Decoding and Hardness Amplification Valentine Kabanets (SFU) joint work with Russell Impagliazzo and Ragesh Jaiswal (UCSD)
Minimum Clique Partition Problem with Constrained Weight for Interval Graphs Jianping Li Department of Mathematics Yunnan University Jointed by M.X. Chen.
Introduction to Kernel Lower Bounds Daniel Lokshtanov.
Walks, Paths and Circuits Walks, Paths and Circuits Sanjay Jain, Lecturer, School of Computing.
22C:19 Discrete Structures Trees Spring 2014 Sukumar Ghosh.
Combinatorial Algorithms
Noga Alon Institute for Advanced Study and Tel Aviv University
The number of edge-disjoint transitive triples in a tournament.
Complexity 16-1 Complexity Andrei Bulatov Non-Approximability.
2007 Kézdy André Kézdy Department of Mathematics University of Louisville * Preliminary report.  More -valuations for trees via the combinatorial nullstellensatz*
CS Lecture 9 Storeing and Querying Large Web Graphs.
Some Problems in Computer Science and Elementary Number Theory Elwyn Berlekamp.
CSE 421 Algorithms Richard Anderson Lecture 4. What does it mean for an algorithm to be efficient?
CTIS 154 Discrete Mathematics II1 8.2 Paths and Cycles Kadir A. Peker.
Physical Mapping of DNA Shanna Terry March 2, 2004.
Algorithms: Design and Analysis Summer School 2013 at VIASM: Random Structures and Algorithms Lecture 3: Greedy algorithms Phan Th ị Hà D ươ ng 1.
MA/CSSE 473 Day 12 Insertion Sort quick review DFS, BFS Topological Sort.
Krakow, Summer 2011 Comparability Graphs William T. Trotter
A Simple Algorithm for Stable Minimum Storage Merging Pok-Son Kim Kookmin University, Department of Mathematics, Seoul , Korea Arne Kutzner Seokyeong.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
8.3 Representing Relations Directed Graphs –Vertex –Arc (directed edge) –Initial vertex –Terminal vertex.
5.2 Trees  A tree is a connected graph without any cycles.
Maximum density of copies of a graph in the n-cube John Goldwasser Ryan Hansen West Virginia University.
Data Structures & Algorithms Graphs
CSE 421 Algorithms Richard Anderson Winter 2009 Lecture 5.
1 Finding a decomposition of a graph T into isomorphic copies of a graph G is a classical problem in Combinatorics. The G-decomposition of T is balanced.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
Torsten Mütze joint work with Christoph Standke, Veit Wiechert (TU Berlin) Torsten Mütze joint work with Christoph Standke, Veit Wiechert (TU Berlin) A.
A linear-time algorithm to compute a MAD tree of an interval graph Elias Dahlhaus, Peter Dankelmann, R.Ravi.
CSE 421 Algorithms Richard Anderson Autumn 2015 Lecture 5.
Dr Nazir A. Zafar Advanced Algorithms Analysis and Design Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar.
CSE 373, Copyright S. Tanimoto, 2001 Up-trees - 1 Up-Trees Review of the UNION-FIND ADT Straight implementation with Up-Trees Path compression Worst-case.
Theory of Computational Complexity Probability and Computing Chapter Hikaru Inada Iwama and Ito lab M1.
Bipartite Kneser graphs are Hamiltonian
MA/CSSE 473 Day 15 Return Exam Student questions Towers of Hanoi
Complexity Classes.
Chapter 10 NP-Complete Problems.
Hamilton cycles in highly symmetric graphs
Independent Cascade Model and Linear Threshold Model
A simple parallel algorithm for the MIS problem
On universal partial words
The Design and Analysis of Algorithms
Combinatorial Spectral Theory of Nonnegative Matrices
Analysis of Algorithms
Decision trees Polynomial-Time
CSE 373, Copyright S. Tanimoto, 2001 Up-trees -
Parameterized complexity Bounded tree width approaches
Lecture 22 Complexity and Reductions
Divide-And-Conquer-And-Combine
Rainbow cycles in flip graphs
Joint work with Avishay Tal (IAS) and Jiapeng Zhang (UCSD)
Branching Programs Part 3
NP-Completeness Yin Tat Lee
Computability and Complexity
Independent Cascade Model and Linear Threshold Model
Nikhil Bansal, Shashwat Garg, Jesper Nederlof, Nikhil Vyas
On the effect of randomness on planted 3-coloring models
Chapter 34: NP-Completeness
Richard Anderson Autumn 2016 Lecture 5
Miniconference on the Mathematics of Computation
Richard Anderson Winter 2009 Lecture 6
Richard Anderson Lecture 5 Graph Theory
Approximation Algorithms
Independent Cascade Model and Linear Threshold Model
Locality In Distributed Graph Algorithms
Lecture 24 Vertex Cover and Hamiltonian Cycle
Complexity Theory: Foundations
Presentation transcript:

Trimming and gluing Gray codes Torsten Mütze joint work with Petr Gregor (Charles University Prague)

Combinatorial Gray codes Goal: Generate all objects in a combinatorial class (permutations, subsets, strings, trees, Dyck paths, etc.) such that consecutive objects differ only ‚a little bit‘ Ideally: Generate each new object in time Fundamental task in combinatorial algorithms [Nijenhuis, Wilf 75] [Knuth TAOCP Vol. 4A, 11]

Two classical Gray code problems Problem 1: cyclically generate all subsets of by element additions/removals Example: 000 100 110 010 011 111 101 001 {} {1} {1,2} {2} {2,3} {1,2,3} {1,3} {3} this is achieved by the Gray binary code [Gray 53] there is a simple loopless algorithm to compute it (running time O(1) per generated bitstring) [Ehrlich 73], [Bitner, Ehrlich, Reingold 76]

Two classical Gray code problems Problem 2: cyclically generate all -subsets of of by element exchanges Example: this can be done by a simple loopless algorithm [Tang, Liu 73], [Ehrlich 73], [Bitner, Ehrlich, Reingold 76] {1,2} {2,3} {1,3} {3,4} {2,4} {1,4} 1100 0110 1010 0011 0101 1001 one may even impose further restrictions on the allowed exchanges [Eades, Hickey, Read 84], [Eades, McKay 84], [Ruskey 88], [Chase 89], [Jenkyns, McCarthy 95], [Ruskey, Williams 09]

A vast generalization Problem: For a given interval , generate all subsets whose size is in this interval by element additions/removals/exchanges Special cases: and : Problem 1 : Problem 2 0000 1000 0100 0010 1010 0110 1100 1110 1001 0101 0011 1011 0111 0001 1101 1111 The cube level

A vast generalization Problem: For a given interval , generate all subsets whose size is in this interval by element additions/removals/exchanges Equivalently, does have a Hamilton cycle? Note that partition classes of this graph have the same size only if is odd and Two more general notions: Saturating cycle := all vertices in the smaller partition class are visited Tight enumeration := only distance-2 steps in the bigger partition class

A vast generalization Problem: For a given interval , generate all subsets whose size is in this interval by element additions/removals/exchanges Q1: For which does have a saturating cycle? Q2: For which does have a tight enumeration? Two weaker notions: Saturating cycle := all vertices in the smaller partition class are visited Tight enumeration := only distance-2 steps in the bigger partition class

Hard special cases 11...1 `middle levels conjecture (MLC)‘ [Havel 83], [Buck, Wiedemann 84] Theorem ([M. 16 PLMS]): For any , the graph has a Hamilton cycle. Conjecture ([Gregor, Škrekovski 10]): For any and , the graph has a Hamilton cycle. 00...0 Known cases of the `generalized middle levels conjecture (GMLC)‘ [M. 16] [Gray 53] [El-Hashash, Hassan 01], [Locke, Stong 03] [Gregor, Škrekovski 10] ?

Our results in a nutshell Q1: For which does have a saturating cycle? Q2: For which does have a tight enumeration? We answer these questions positively for a large range of parameters . We provide corresponding constant-time generation algorithms. All remaining open cases are reduced to the GMLC.

Our results - saturating cycles Theorem 1: , , has a saturating cycle in the following cases: [Gray 53] [El-Hashash, Hassan 01], [Locke, Stong 03] [Gregor, Škrekovski 10] [M. 16] open [M., Su 16] 1 1 1 1

Our results - tight enumerations Theorem 2: , , has a tight enumeration in the follow. cases: [Gray 53] [El-Hashash, Hassan 01], [Locke, Stong 03] [Gregor, Škrekovski 10] [M. 16] open [Tang, Liu 73] 2 2 2 2 2

Our results – efficient algorithms Theorem 3: (a) For cases (i) and (ii) in Theorem 1+2, there is an algorithm with running time O(1) in the worst case per generated vertex (i.e., a loopless algorithm). (b) For case (iii) in Theorem 1+2, there is an algorithm with running time O(1) on average per generated vertex. Remarks The algorithms for part (a) are considerably simpler (1 page) than those for part (b) (in (b) we use the rather complex MLC algorithm presented in [M., Nummenpalo SODA 17]) Initialization time is O(n) and required space is O(n) C++ code available on our website

Our results Theorem 4 (approximate version of `generalized middle levels conjecture‘): For any and , the graph has an `almost‘ Hamilton cycle, i.e., a cycle that visits a -fraction of all vertices.

Trimming Gray codes Recall the standard binary Gray code: Lemma ([Tang, Liu 73]): For any two consecutive vertices in , we have . := subsequence of consisting of all vertices on level

Trimming Gray codes (tight enumerations) Corollary: If is even or or , then taking shortcuts (distance-2 steps) at levels and/or yields a tight enumeration. Lemma ([Tang, Liu 73]): For any two consecutive vertices in , we have .

Trimming Gray codes (tight enumerations) Lemma ([Tang, Liu 73]): For any two consecutive vertices in , we have . Corollary: If is even or or , then taking shortcuts (distance-2 steps) at levels and/or yields a tight enumeration. [Gray 53] [El-Hashash, Hassan 01], [Locke, Stong 03] [Gregor, Škrekovski 10] [M. 16] open [Tang, Liu 73] 2 2 2 2 2

Trimming Gray codes (saturating cycles) Lemma ([Tang, Liu 73]): For any two consecutive vertices in , we have .

Trimming Gray codes (saturating cycles) Lemma ([Tang, Liu 73]): For any two consecutive vertices in , we have . upward/downward vertices sequence of up-/down-neighbors of for all upward/downward vertices

Trimming Gray codes (saturating cycles) Lemma: All vertices in and are distinct.

Trimming Gray codes (saturating cycles) Theorem: For any interval with , the graph has a cycle that visits all vertices except possibly some vertices in levels and . Proof: Trim .

Trimming Gray codes (saturating cycles) Corollary: If is even or or , then the omitted vertices are from the same partition class (i.e., all vertices from the other partition class are visited), yielding a saturating cycle.

Trimming Gray codes (saturating cycles) Corollary: If is even or or , then the omitted vertices are from the same partition class (i.e., all vertices from the other partition class are visited), yielding a saturating cycle. [Gray 53] [El-Hashash, Hassan 01], [Locke, Stong 03] [Gregor, Škrekovski 10] [M. 16] open [M., Su 16] 1 1 1 1

Gluing Gray codes (saturating cycles) omitted vertices [Gray 53] [El-Hashash, Hassan 01], [Locke, Stong 03] [Gregor, Škrekovski 10] [M. 16] open [M., Su 16] 1 1 1 1

Efficient algorithms Trimming  simple loopless algorithms with running time O(1) in the worst case per generated vertex (simple bitflip rules) Gluing  rather complex algorithms with running time O(1) on average per generated vertex (base case is the MLC algorithm presented in [M., Nummenpalo SODA 17])

Open problems Conjecture ([Gregor, Škrekovski 10]): For any and , the graph has a Hamilton cycle.

The entire -parameter space  http://page.math.tu-berlin.de/~muetze/animate.html

Thank you!