Correctness of Constructing Optimal Alphabetic Trees Revisited Marek Karpinski, Lawrence L. Larmore, Wojciech Rytter Theoretical computer science 180 (1997)

Slides:



Advertisements
Similar presentations
Great Theoretical Ideas in Computer Science
Advertisements

Two Segments Intersect?
Sorting an Intransitive Total Ordered Set
WSPD Applications.
Improved Algorithms for Inferring the Minimum Mosaic of a Set of Recombinants Yufeng Wu and Dan Gusfield UC Davis CPM 2007.
Introduction to Computer Science 2 Lecture 7: Extended binary trees
Greedy Algorithms Greed is good. (Some of the time)
Great Theoretical Ideas in Computer Science for Some.
Recursive Definitions and Structural Induction
Study Group Randomized Algorithms 21 st June 03. Topics Covered Game Tree Evaluation –its expected run time is better than the worst- case complexity.
Outline. Theorem For the two processor network, Bit C(Leader) = Bit C(MaxF) = 2[log 2 ((M + 2)/3.5)] and Bit C t (Leader) = Bit C t (MaxF) = 2[log 2 ((M.
Discussion #34 1/17 Discussion #34 Warshall’s and Floyd’s Algorithms.
9/5/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Plane Sweep Algorithms and Segment Intersection Carola Wenk.
Rajat K. Pal. Chapter 3 Emran Chowdhury # P Presented by.
PTAS for Bin-Packing. Special Cases of Bin Packing 1. All item sizes smaller than Claim 1: Proof: If then So assume Therefore:
Great Theoretical Ideas in Computer Science.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
1 Maximizing Lifetime of Sensor Surveillance Systems IEEE/ACM TRANSACTIONS ON NETWORKING Authors: Hai Liu, Xiaohua Jia, Peng-Jun Wan, Chih- Wei Yi, S.
1 Huffman Codes. 2 Introduction Huffman codes are a very effective technique for compressing data; savings of 20% to 90% are typical, depending on the.
. Computational Genomics 5a Distance Based Trees Reconstruction (cont.) Modified by Benny Chor, from slides by Shlomo Moran and Ydo Wexler (IIT)
CS 454 Theory of Computation Sonoma State University, Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Original slides by Vahid and.
CSE115/ENGR160 Discrete Mathematics 03/03/11 Ming-Hsuan Yang UC Merced 1.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
Great Theoretical Ideas in Computer Science.
A general approximation technique for constrained forest problems Michael X. Goemans & David P. Williamson Presented by: Yonatan Elhanani & Yuval Cohen.
December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 1 Turing Machines Theorem 1.1: Any partial function that can be computed by a Post-
Data Structures – LECTURE 10 Huffman coding
1 More Applications of the Pumping Lemma. 2 The Pumping Lemma: Given a infinite regular language there exists an integer for any string with length we.
CS 454 Theory of Computation Sonoma State University, Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Original slides by Vahid and.
Tirgul 5 This tirgul is about AVL trees. You will implement this in prog-ex2, so pay attention... BTW - prog-ex2 is on the web. Start working on it!
1 Separator Theorems for Planar Graphs Presented by Shira Zucker.
Prof. Busch - LSU1 Pumping Lemma for Context-free Languages.
TR1413: Discrete Mathematics For Computer Science Lecture 1: Mathematical System.
TECH Computer Science Graph Optimization Problems and Greedy Algorithms Greedy Algorithms  // Make the best choice now! Optimization Problems  Minimizing.
Minimum Cost Binary Trees Speaker: Dana Moshkovitz.
CS Data Structures Chapter 5 Trees. Chapter 5 Trees: Outline  Introduction  Representation Of Trees  Binary Trees  Binary Tree Traversals 
Mathematical Induction II Lecture 21 Section 4.3 Mon, Feb 27, 2006.
Discrete Structures Lecture 12: Trees Ji Yanyan United International College Thanks to Professor Michael Hvidsten.
5.5.3 Rooted tree and binary tree  Definition 25: A directed graph is a directed tree if the graph is a tree in the underlying undirected graph.  Definition.
Reading and Writing Mathematical Proofs Spring 2015 Lecture 4: Beyond Basic Induction.
Theory of Computation, Feodor F. Dragan, Kent State University 1 TheoryofComputation Spring, 2015 (Feodor F. Dragan) Department of Computer Science Kent.
5.5.2 M inimum spanning trees  Definition 24: A minimum spanning tree in a connected weighted graph is a spanning tree that has the smallest possible.
Lecture 2 Plan: 1. Automatic Boolean Algebras 2. Automatic Linear Orders 3. Automatic Trees 4. Automatic Versions of König’s lemma 5. Intrinsic Regularity.
Introduction to Graphs And Breadth First Search. Graphs: what are they? Representations of pairwise relationships Collections of objects under some specified.
1 Introduction to Algorithms L ECTURE 17 (Chap. 24) Shortest paths I 24.2 Single-source shortest paths 24.3 Dijkstra’s algorithm Edsger Wybe Dijkstra
Chapter 8 Maximum Flows: Additional Topics All-Pairs Minimum Value Cut Problem  Given an undirected network G, find minimum value cut for all.
Costas Busch - LSU1 Pumping Lemma for Context-free Languages.
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 223 – Advanced Data Structures Math Review 1.
A Different Solution  alternatively we can use the following algorithm: 1. if n == 0 done, otherwise I. print the string once II. print the string (n.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
1 An Efficient Optimal Leaf Ordering for Hierarchical Clustering in Microarray Gene Expression Data Analysis Jianting Zhang Le Gruenwald School of Computer.
Great Theoretical Ideas in Computer Science for Some.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
 2004 SDU 1 Lecture5-Strongly Connected Components.
MA/CSSE 473 Day 30 Optimal BSTs. MA/CSSE 473 Day 30 Student Questions Optimal Linked Lists Expected Lookup time in a Binary Tree Optimal Binary Tree (intro)
MA/CSSE 473 Days Optimal linked lists Optimal BSTs.
5.6 Prefix codes and optimal tree Definition 31: Codes with this property which the bit string for a letter never occurs as the first part of the bit string.
Sorting by placement and Shift Sergi Elizalde Peter Winkler By 資工四 B 周于荃.
Section Recursion 2  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
3. Polygon Triangulation
The Road Problem - Special Case Study
Chapter 16: Greedy Algorithms
Autumn 2015 Lecture 11 Minimum Spanning Trees (Part II)
Definition: Let G = (V, T, P, S) be a CFL
Pumping Lemma for Context-free Languages
Properties of Context-Free Languages
The algorithm of Garsia and Wachs
Minimum Spanning Tree Algorithms
Winter 2019 Lecture 11 Minimum Spanning Trees (Part II)
Autumn 2019 Lecture 11 Minimum Spanning Trees (Part II)
Presentation transcript:

Correctness of Constructing Optimal Alphabetic Trees Revisited Marek Karpinski, Lawrence L. Larmore, Wojciech Rytter Theoretical computer science 180 (1997)

18/12/ Outline Definitions General version of Garsia-Wachs (GW) algorithm Proof of GW Hu-Tacker (HT) algorithm Proof of HT by similarity to GW

18/12/ Definitions Binary tree: Every internal node has exactly two sons

18/12/ Definitions

18/12/ The Move Operator

18/12/ The Move Operator

18/12/ The Move Operator

18/12/ The Move Operator

18/12/ Definitions

18/12/ Theorem 1 (correctness of GW)

18/12/ Garsia-Wachs Algorithm

18/12/ Definitions

18/12/ Theorem 2

18/12/ Shift Operations

18/12/ Shift Operations

18/12/ LeftShift Example

18/12/ LeftShift Example

18/12/ LeftShift Example

18/12/ LeftShift Example

18/12/ LeftShift Example

18/12/ LeftShift Example

18/12/ LeftShift Example

18/12/ LeftShift Example

18/12/ LeftShift Example

18/12/ Theorem 2

18/12/ Proof of Point 2 in Theorem 2

18/12/ Proof of Point 2 in Theorem 2

18/12/ Proof of Point 3 Theorem 2

18/12/ Definition of Well Shaped Segments

18/12/ Definition of Well Shaped Segments Active Window

18/12/ Movability Lemma If the segment [i,…,j] is left well shaped, then the active pair (i,i+1) can be moved to the other side of the segment by locally rearranging sub-trees in the active window without changing the relative order of the other items and without changing the level function of the tree.

18/12/ Movability Lemma

18/12/ Movability Lemma

18/12/ Movability Lemma

18/12/ Movability Lemma

18/12/ Movability Lemma

18/12/ Theorem 3

18/12/ Point 1 in Theorem 2

18/12/ Hu-Tucker Algorithm Transparent items and opaque items Compatible pair – No opaque items in the middle Minimal compatible pair (mcp) – compatible pair (i,i+1) where Weight(i) + weight(i+1) is minimal Tie Breaking Rule

18/12/ Hu-Tucker Algorithm

18/12/ Hu-Tucker Algorithm

18/12/ Hu-Tucker Algorithm

18/12/ Hu-Tucker Algorithm

18/12/ GW` Algorithm gmp – Globaly Minimal Pair GW` - the same as GW but always choose gmp instead of some other lmp.

18/12/ Definitions Special sequence – sequence of weights, each one is either transparent or opaque Normal sequence – sequence of weights MoveTransparent operator – converts a special sequence into a normal sequence and moves all transparent items to their RightPos. (first it moves the rightmost item, then the one to its left, etc…)

18/12/ MoveTransparent

18/12/ MoveTransparent

18/12/ MoveTransparent

18/12/ MoveTransparent

18/12/ MoveTransparent

18/12/ MoveTransparent

18/12/ MoveTransparent

18/12/ MoveTransparent

18/12/ MoveTransparent

18/12/ MoveTransparent

18/12/ MoveTransparent

18/12/ MoveTransparent

18/12/ MoveTransparent

18/12/ MoveTransparent

18/12/ MoveTransparent

18/12/ MoveTransparent

18/12/ The Simulation Lemma Assuming there are no ties

18/12/ Proof of the Simulation Lemma Claim A Claim B

18/12/ Proof of Claim A By contradiction assume that w,u are not visible to each other. This means there is an opaque item q between them. Two cases:

18/12/ Proof of Claim A Contradiction – no place for q

18/12/ Proof of Claim A

18/12/ Proof of Claim A Contradiction – no place for q

18/12/ Proof of Claim B Claim B Proof

18/12/ Proof of Claim B The order of movements is from right to left, thus w is Processed first then the items between u and w, and then u. At this point u and w must be adjacent, thus q must be processed later, and thus it is to the left of u. q is not visible from u because (u,w) is mcp

18/12/ Proof of Claim B Let q` be the opaque item between q and u visible from u Contradiction

18/12/ Conclusion

18/12/ Claim C

18/12/ Proof of claim C

18/12/ Proof of Simulation Lemma The proof of the lemma is by induction

18/12/ Tie Braking Rule Theorem 4 The Tie Breaking Rule (TBR) is correct Proof

18/12/ Proof of TBR Case 1: All weights are strictly positive

18/12/ Proof of TBR Case 2: Some of the original weights are zero