Rubao Ji Advisor: Dr. Robert W. Robinson Committee: Dr. E. Rodney Canfield Dr. Daniel M. Everett  2002.11  Dynamic connectivity algorithms for Feynman.

Slides:



Advertisements
Similar presentations
Lecture 15. Graph Algorithms
Advertisements

all-pairs shortest paths in undirected graphs
Dynamic Graph Algorithms - I
Graph Traversals Visit vertices of a graph G to determine some property: Is G connected? Is there a path from vertex a to vertex b? Does G have a cycle?
Chapter 5 Decrease and Conquer. Homework 7 hw7 (due 3/17) hw7 (due 3/17) –page 127 question 5 –page 132 questions 5 and 6 –page 137 questions 5 and 6.
© 2006 Pearson Addison-Wesley. All rights reserved14 A-1 Chapter 14 excerpts Graphs (breadth-first-search)
Advanced Data Structures
A Randomized Linear-Time Algorithm to Find Minimum Spaning Trees 黃則翰 R 蘇承祖 R 張紘睿 R 許智程 D 戴于晉 R David R. Karger.
More on Randomized Data Structures. Motivation for Randomized Data Structures We’ve seen many data structures with good average case performance on random.
Perfect Matching for Biconnected Cubic Graphs in O(nlog 2 n) Time Krzysztof Diks & Piotr Stańczyk.
A Randomized Linear-Time Algorithm to Find Minimum Spanning Trees David R. Karger David R. Karger Philip N. Klein Philip N. Klein Robert E. Tarjan.
Princeton University COS 423 Theory of Algorithms Spring 2001 Kevin Wayne Amortized Analysis Some of these lecture slides are adapted from CLRS.
Lists A list is a finite, ordered sequence of data items. Two Implementations –Arrays –Linked Lists.
1 Advanced Data Structures. 2 Topics Data structures (old) stack, list, array, BST (new) Trees, heaps, union-find, hash tables, spatial, string Algorithm.
1 On Dynamic Shortest Paths Problems Liam Roditty Uri Zwick Tel Aviv University ESA 2004.
An almost linear fully dynamic reachability algorithm.
Amortized Rigidness in Dynamic Cartesian Trees Iwona Białynicka-Birula and Roberto Grossi Università di Pisa STACS 2006.
Course Review COMP171 Spring Hashing / Slide 2 Elementary Data Structures * Linked lists n Types: singular, doubly, circular n Operations: insert,
Unit 11a 1 Unit 11: Data Structures & Complexity H We discuss in this unit Graphs and trees Binary search trees Hashing functions Recursive sorting: quicksort,
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 11 Instructor: Paul Beame.
Chapter 4: Trees Binary Search Trees
More Graph Algorithms Weiss ch Exercise: MST idea from yesterday Alternative minimum spanning tree algorithm idea Idea: Look at smallest edge not.
CSE 373, Copyright S. Tanimoto, 2002 Up-trees - 1 Up-Trees Review of the UNION-FIND ADT Straight implementation with Up-Trees Path compression Worst-case.
Minimum Spanning Tree By Jonathan Davis.
0 Course Outline n Introduction and Algorithm Analysis (Ch. 2) n Hash Tables: dictionary data structure (Ch. 5) n Heaps: priority queue data structures.
Depth-First Search Idea: Keep going forward as long as there are unseen nodes to be visited. Backtrack when stuck. v G G G G is completely traversed.
Advanced Data Structures and Algorithms COSC-600 Lecture presentation-6.
1 Binomial heaps, Fibonacci heaps, and applications.
1 GRAPHS - ADVANCED APPLICATIONS Minimim Spanning Trees Shortest Path Transitive Closure.
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
Chapter Tow Search Trees BY HUSSEIN SALIM QASIM WESAM HRBI FADHEEL CS 6310 ADVANCE DATA STRUCTURE AND ALGORITHM DR. ELISE DE DONCKER 1.
Week -7-8 Topic - Graph Algorithms CSE – 5311 Prepared by:- Sushruth Puttaswamy Lekhendro Lisham.
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
MA/CSSE 473 Day 12 Insertion Sort quick review DFS, BFS Topological Sort.
Lecture 13 Graphs. Introduction to Graphs Examples of Graphs – Airline Route Map What is the fastest way to get from Pittsburgh to St Louis? What is the.
Computer Science 112 Fundamentals of Programming II Introduction to Graphs.
2IL05 Data Structures Fall 2007 Lecture 13: Minimum Spanning Trees.
Spring 2015 Lecture 11: Minimum Spanning Trees
MA/CSSE 473 Day 15 BFS Topological Sort Combinatorial Object Generation Intro.
CS Data Structures II Review & Final Exam. 2 Topics Review Final Exam.
Binary SearchTrees [CLRS] – Chap 12. What is a binary tree ? A binary tree is a linked data structure in which each node is an object that contains following.
Balanced Search Trees Problem: Efficiency of BST is related to tree’s height.  search, insert and remove follow a path from root to desired location 
Outline Binary Trees Binary Search Tree Treaps. Binary Trees The empty set (null) is a binary tree A single node is a binary tree A node has a left child.
Lecture 13 Jianjun Hu Department of Computer Science and Engineering University of South Carolina CSCE350 Algorithms and Data Structure.
Lecture 19 Greedy Algorithms Minimum Spanning Tree Problem.
Preview  Graph  Tree Binary Tree Binary Search Tree Binary Search Tree Property Binary Search Tree functions  In-order walk  Pre-order walk  Post-order.
CSC 252a: Algorithms Pallavi Moorthy 252a-av Smith College December 14, 2000.
Union-find Algorithm Presented by Michael Cassarino.
A new linear algorithm for checking a graph for 3-edge-connectivity Feng Sun Advisor: Dr. Robert W. Robinson Committee: Dr. E. Rodney Canfield Dr. Eileen.
Oct 26, 2001CSE 373, Autumn A Forest of Trees Binary search trees: simple. –good on average: O(log n) –bad in the worst case: O(n) AVL trees: more.
Review for Final Exam Non-cumulative, covers material since exam 2 Data structures covered: –Treaps –Hashing –Disjoint sets –Graphs For each of these data.
Exponential random graphs and dynamic graph algorithms David Eppstein Comp. Sci. Dept., UC Irvine.
Hello Everyone!!! 1. Tree And Graphs 2 Features of Trees  Tree Nodes Each node have 0 or more children A node have must one parent  Binary tree Tree.
1 CSE 326: Data Structures Trees Lecture 6: Friday, Jan 17, 2003.
Skip Lists – Why? BSTs –Worse case insertion, search O(n) –Best case insertion, search O(log n) –Where your run fits in O(n) – O(log n) depends on the.
Almost SL=L, and Near-Perfect Derandomization Oded Goldreich The Weizmann Institute Avi Wigderson IAS, Princeton Hebrew University.
Chapter 11. Chapter Summary  Introduction to trees (11.1)  Application of trees (11.2)  Tree traversal (11.3)  Spanning trees (11.4)
CSE 589 Applied Algorithms Spring 1999 Prim’s Algorithm for MST Load Balance Spanning Tree Hamiltonian Path.
Review for Final Exam Non-cumulative, covers material since exam 2
Review for Final Exam Non-cumulative, covers material since exam 2
Review for Final Exam Non-cumulative, covers material since exam 2
CSE 421: Introduction to Algorithms
Minimum-Cost Spanning Tree
Minimum Spanning Tree.
Minimum-Cost Spanning Tree
Binary Trees, Binary Search Trees
Dynamic Graph Algorithms
Binary Trees, Binary Search Trees
Minimum-Cost Spanning Tree
More on Randomized Data Structures
Presentation transcript:

Rubao Ji Advisor: Dr. Robert W. Robinson Committee: Dr. E. Rodney Canfield Dr. Daniel M. Everett   Dynamic connectivity algorithms for Feynman diagrams

 Introduction  Algorithm design and time complexity analysis  Data structure and implementation  Experimental results and discussions Outline of Thesis

G lineV line A Feynman diagram with order of n can be viewed as a matching on 2n nodes (edges in the matching are undirected and called V-lines) along with a permutation of the 2n nodes (represented by directed edges called G- lines) [ Introduction ] Feynman Diagram

G lineV line A Feynman diagram with order of n can be viewed as a matching on 2n nodes (edges in the matching are undirected and called V-lines) along with a permutation of the 2n nodes (represented by directed edges called G- lines) [ Introduction ] Feynman Diagram

G lineV line A Feynman diagram with order of n can be viewed as a matching on 2n nodes (edges in the matching are undirected and called V-lines) along with a permutation of the 2n nodes (represented by directed edges called G- lines) [ Introduction ] Feynman Diagram

aa´a´ bb´b´ Switch(a,b) aa´a´ bb´b´ Switch(2,4) Switch(4,0) Connected Not Connected [ Introduction ] Switching and Connectivity

aa’ bb’ Switch(a,b) aa’ bb’ Switch(2,4) [ Introduction ] Switching and Connectivity

 Dynamic graph problem: Answer queries on graphs that are undergoing a sequence of updates (e.g. insertions and deletions of edges and vertices) [ Introduction ] Fully-dynamic Semi-dynamic (incremental, decremental)  Dynamic algorithm: Update the solution of a problem more efficiently after dynamic changes rather than having to re- compute it from scratch each time (static). Dynamic vs. Static

[ Introduction ] Running time of one single operation averaged over a sufficiently long sequence of operations  Amortized Time any sequence long enough worst case bond  Expected Time sequence has some distribution or is random probabilistic worst case Amortized & Expected

[ Introduction ] A Brief History Deterministic algorithms Frederickson, O(m 1/2 ) O(1) Epstein et al., O(n 1/2 ) O(1) Henzinger&King, O(n 1/3 log n) O(log n/loglog n) Holm et al., O(log 2 n) O(log n/loglog n) Randomized algorithms Henzinger&King, O(log 3 n) O(log n/loglog n) Henzinger&Thorup, O(log 2 n) O(log n/loglog n) Thorup, O(log n(loglog n) 3 ) O(log n/logloglog n) UpdateQuery UpdateQuery

1.Number of G-cycles 2.Update time 3.Query time [ Algorithm design and time complexity analysis ] O (log n) O (log ? n) Features that matter

[ Algorithm design and time complexity analysis ] For a randomly generated Feynman diagram of order n, the expected number of G-cycles is O(log n). C l : G-cycle containing vertex v has length l Pr [C 1 ]= 1/2n Pr [C 2 ]=(2n-1)/2n * 1/(2n-1) = 1/2n Pr [C 3 ]=(2n-1)/2n * (2n-2)/(2n-1)*1/(2n-2) =1/2n : v Prove: Pr [C l ]= 1/2n Lemma 2.1

[ Algorithm design and time complexity analysis ] X i : the size of the G-cycle containing node i S: total number of G-cycles Lemma 2.1 (cont’d)

[ Algorithm design and time complexity analysis ] 1.Splay Tree (Self-Adjusting BST) 2.Treap (BST + Heap) Update G-cycle: In-order traversal V-line: Implicit numbering

[ Algorithm design and time complexity analysis ] Update 1.Splay Tree (Self-Adjusting BST) 2.Treap (BST + Heap) G-cycle: In-order traversal V-line: Implicit numbering

[ Algorithm design and time complexity analysis ] Lemma 2.2 Each splay operation has an amortized time of O(log n) over  (n) operations such that the tree size is always O(n). ( From Sleator&Tarjan,1985 ) Lemma 2.3 Each treap operation has an expected time of O(log n) averaged over all permutations of the nodes for the priority attribute. ( From Seidel & Aragon, 1996 ) Update

[ Algorithm design and time complexity analysis ] x x Splay(x) t1 x Join(t1,t2) t2 x t1t2 x Split(x,t) x t1t2 Update: Splay Tree

[ Algorithm design and time complexity analysis ] x delete(x) t1 x Join(t1,t2) t2 t1t2 x Split(x,t) x t1 t2 Insert(x) x b a Rotate left Rotate right b a y Update: Treap delete(x) x y

 SCQ (Simplified Connectivity Query)  ACQ (Advanced Connectivity Query)  IDQ (Integrated DFS Connectivity Query) [ Algorithm design and time complexity analysis ] Query

 Straightforward approach  Simple DFS or pre-order traversal  Linear [ Algorithm design and time complexity analysis ] Query: SCQ

 More complicated than SCQ  Start from smallest component  O(log 2 n) [ Algorithm design and time complexity analysis ] Query: ACQ

[ Algorithm design and time complexity analysis ] ACQ algorithm has an expected cost of O(log 2 n) time to query the connectivity of Feynman diagram.  S i The probability that at least i attempts will be needed to find another component. D 1 > 1/2, D 2 > 1/2 + 1/4 … D n > 1/2 + 1/4 + ··· +1/2 (n-1)  D i The probability that, in examing vertices in the smallest component, a V -edge joining it to another component will be found in  i attempts. S i > 1 - D i Ex[Steps] < 1 + 1/2 + 1/4 + …= 2  O(log n) expected component, O(log n) expected joins, after each join, take O(log n) expected time to find the smallest component. Lemma 2.4

 Integrated with update process  Maintain a G-cycle graph  O(log n) [ Algorithm design and time complexity analysis ] Query: IDQ

[ Algorithm design and time complexity analysis ] a b a b Case 1 Case 2 Switch(a,b) IDQ (cont’d)

[ Algorithm design and time complexity analysis ] a b a b Case 1 Case 2 Switch(a,b) IDQ (cont’d)

[ Algorithm design and time complexity analysis ] a b a b Case 1 Case 2 Switch(a,b) IDQ (cont’d)

 DFS (Linear in number of G- cycles)  Chance of disconnected O(1/n)  If connected, O(1) to update the edge [ Algorithm design and time complexity analysis ] IDQ (cont’d) IDQ algorithm has an expected cost of O(log n) time to query the connectivity of Feynman diagram.

[ Algorithm design and time complexity analysis ] Using a splay forest data structure for Feynman diagram update combined with ACQ for connectivity queries gives an amortized expected time per operation of O(log 2 n). Using a treap forest data structure for Feynman diagram update combined with ACQ for connectivity queries gives an expected time per operation of O(log 2 n). Lemma 2.5

[ Algorithm design and time complexity analysis ] Using a splay forest data structure for Feynman diagram update combined with IDQ for connectivity queries gives an amortized expected time per operation of O(log n). Using treap a forest data structure for Feynman diagram update combined with IDQ for connectivity queries gives an expected time per operation of O(log n). Lemma 2.6

[ Data structures and implementations ] ASF (Array-based Splay Forest) ilc[i]rc[i] ##0#2###0#2# ##5#13##5# p[i]p[i] ~2 4 ~ s[i]s[i] Update -ASF

T1T2 a a´a´ b b´b´ a´a´ b´b´ b´b´ Splay(a)Splay(b) Switch a´a´ ab ab [ Data structures and implementations ] Splay(w) w b a´a´ w b´b´ a w b a´a´ Join ASF: Switch(a,b) { a  T1, b  T2} a a´a´ b b´b´ Switch (a,b) a b´b´ b a´a´

a a´a´ b b´b´ Splay(a) bb’a’ Splay(b) a’b’ a b a Reattach b aa’bb’ Splay(a) bb’a’ Splay(b) b’ a b a Reattach b a’ T T [ Data structures and implementations ] ASF: Switch(a,b) {a,b  T} a b´b´ b a´a´ Switch (a,b) a a´a´ b b´b´ a’

[ Data structures and implementations ] ATF (Array-based Treap Forest) ilc[i]rc[i] ##0#2###0#2# ##5#13##5# p[i]p[i] ~2 4 ~ s[i]s[i] prio[i] Update -ATF

T1 T2 aa’ bb’ Split(a) Split(b) Switch [ Data structures and implementations ] a’b’ ww ab w a Delete(w) a’ w b ab’ Join x ab’ba’ Delete (x) ab’ba’ Delete(w) ba’ ATF: Switch(a,b) { a  T1, b  T2}

aa’bb’ Split(a) bb’a’ Split(b) a’b’ w w w Reattach aa’bb’ Split(a) bb’a’ Split(b) b’ w w Reattach w a’ a a b b a b a b’a b Delete(w) T T ab’ ba’ ATF: Switch(a,b) {a,b  T} [ Data structures and implementations ]

nodedownnext Type A node nodep1link Type B node p2adj_next visited [ Data structures and implementations ] IDQ: Adjacency list

[ Data structures and implementations ] IDQ: Switch(a,b) { a  T1, b  T2}

[ Data structures and implementations ] IDQ: Switch(a,b) {a,b  T}

[ Experimental results and discussion ]  n: ,000  5000 switches  ACQ  random Exp 1: ASF vs. ATF

[ Experimental results and discussion ] Exp 2: Update vs. Query

[ Experimental results and discussion ] Exp 3: Frequency of Dis-connection

[ Experimental results and discussion ] Exp 4: Time per Switching

[ Experimental results and discussion ] Exp 5: IDQ/ACQ/SCQ

[ Experimental results and discussion ]  Splay tree vs. Treap  IDQ vs. ACQ vs. SCQ  Further study Discussion

Thanks ! Animation downloaded from:

2 0 0 Insert(2) 2 0 Rotate(2) 2 0 Insert(5) 5 Insert(3) Insert(4) Rotate(4) Insert(1) 2 1 iW[i]W[i]P[i]P[i] [ Data structures and implementations ] ATF: Insert