dynamic graph algorithms
play

Dynamic Graph Algorithms Christian Wulff-Nilsen University of - PowerPoint PPT Presentation

Dynamic Graph Algorithms Christian Wulff-Nilsen University of Copenhagen November 14 , 2019 1 / 21 Graph algorithms and data structures 2 / 21 Graph algorithms and data structures Graphs and graph problems are everywhere: 2 / 21 Graph


  1. Dynamic Trees • The data structure should be able to: ◦ Insert/delete an edge ◦ Update the key value of a vertex ◦ Report the sum or the bitwise AND/OR/XOR of all vertices in the tree containing a given vertex 101 000 111 100 010 101 110 100 14 / 21

  2. Dynamic Trees • The data structure should be able to: ◦ Insert/delete an edge ◦ Update the key value of a vertex ◦ Report the sum or the bitwise AND/OR/XOR of all vertices in the tree containing a given vertex 101 000 111 100 010 101 110 100 14 / 21

  3. Dynamic Trees • The data structure should be able to: ◦ Insert/delete an edge ◦ Update the key value of a vertex ◦ Report the sum or the bitwise AND/OR/XOR of all vertices in the tree containing a given vertex 101 000 111 100 010 Change to 100 101 110 100 14 / 21

  4. Dynamic Trees • The data structure should be able to: ◦ Insert/delete an edge ◦ Update the key value of a vertex ◦ Report the sum or the bitwise AND/OR/XOR of all vertices in the tree containing a given vertex 101 000 111 100 010 100 110 100 14 / 21

  5. Dynamic Trees • The data structure should be able to: ◦ Insert/delete an edge ◦ Update the key value of a vertex ◦ Report the sum or the bitwise AND/OR/XOR of all vertices in the tree containing a given vertex 101 000 111 100 010 Bitwise AND: 100 110 100 14 / 21

  6. Dynamic Trees • The data structure should be able to: ◦ Insert/delete an edge ◦ Update the key value of a vertex ◦ Report the sum or the bitwise AND/OR/XOR of all vertices in the tree containing a given vertex 101 000 111 100 010 Bitwise AND: 100 100 110 100 14 / 21

  7. Dynamic Trees • The data structure should be able to: ◦ Insert/delete an edge ◦ Update the key value of a vertex ◦ Report the sum or the bitwise AND/OR/XOR of all vertices in the tree containing a given vertex 101 000 111 100 010 Bitwise AND: 100 100 110 100 • There is a dynamic tree data structure supporting each such operation in O (log n ) time 14 / 21

  8. Fully-dynamic connectivity • Efficiently maintaining a spanning forest of a graph: 1 0 4 3 2 6 7 5 15 / 21

  9. Fully-dynamic connectivity • Efficiently maintaining a spanning forest of a graph: 001 000 100 011 010 110 111 101 15 / 21

  10. Fully-dynamic connectivity • Efficiently maintaining a spanning forest of a graph: 001 000 000001 001011 100 000010 011100 011 010 011111 100111 011110 010101 110111 101110 110 111 101 15 / 21

  11. Fully-dynamic connectivity • Efficiently maintaining a spanning forest of a graph: 000001 001011 000010 011100 011111 100111 011110 010101 110111 101110 15 / 21

  12. Fully-dynamic connectivity • Efficiently maintaining a spanning forest of a graph: 001010 000011 000001 001011 111011 000010 011100 010110 010111 011111 100111 011110 010101 110111 101110 000111 001111 111011 15 / 21

  13. Fully-dynamic connectivity • Efficiently maintaining a spanning forest of a graph: 001010 000011 000001 001011 111011 000010 011100 010110 010111 011111 100111 011110 010101 110111 101001 001111 010101 15 / 21

  14. Fully-dynamic connectivity • Efficiently maintaining a spanning forest of a graph: 001010 000011 000001 001011 111011 000010 011100 010110 010111 011111 100111 011110 010101 110111 101001 001111 010101 15 / 21

  15. Fully-dynamic connectivity • The previous only works if there is at most one edge that can reconnect the tree. 16 / 21

  16. Fully-dynamic connectivity • The previous only works if there is at most one edge that can reconnect the tree. • Handling multiple reconnecting edges with random sampling: 1 0 4 3 2 7 6 5 16 / 21

  17. Fully-dynamic connectivity • The previous only works if there is at most one edge that can reconnect the tree. • Handling multiple reconnecting edges with random sampling: 1 0 4 3 2 7 6 5 16 / 21

  18. Dynamic minimum spanning forest • Suppose that instead of maintaining a spanning forest, we want to maintain a minimum spanning forest: 6 8 1 2 1 4 3 5 1 4 2 17 / 21

  19. Dynamic minimum spanning forest • Suppose that instead of maintaining a spanning forest, we want to maintain a minimum spanning forest: 3 6 8 1 2 1 4 3 5 1 4 2 17 / 21

  20. Dynamic minimum spanning forest • Suppose that instead of maintaining a spanning forest, we want to maintain a minimum spanning forest: 3 6 8 1 2 1 4 3 5 1 4 2 17 / 21

  21. Dynamic minimum spanning forest • Suppose that instead of maintaining a spanning forest, we want to maintain a minimum spanning forest: 3 6 8 1 2 1 4 3 7 5 1 4 2 17 / 21

  22. Dynamic minimum spanning forest • Suppose that instead of maintaining a spanning forest, we want to maintain a minimum spanning forest: 3 6 8 1 2 1 4 3 7 5 1 4 2 17 / 21

  23. Dynamic minimum spanning forest • Suppose that instead of maintaining a spanning forest, we want to maintain a minimum spanning forest: 3 6 8 1 1 4 3 7 5 1 4 2 17 / 21

  24. Dynamic minimum spanning forest • Suppose that instead of maintaining a spanning forest, we want to maintain a minimum spanning forest: 3 6 8 1 1 4 3 7 5 1 4 2 17 / 21

  25. Dynamic minimum spanning forest • Suppose that instead of maintaining a spanning forest, we want to maintain a minimum spanning forest: 3 6 8 1 1 4 3 7 5 1 4 2 • Does the XOR trick work here? 17 / 21

  26. Types of randomized algorithms • For several graph problems, state-of-the-art algorithms are randomized 18 / 21

  27. Types of randomized algorithms • For several graph problems, state-of-the-art algorithms are randomized • Some of these algorithms are Las Vegas , some are Monte Carlo . 18 / 21

  28. Types of randomized algorithms • For several graph problems, state-of-the-art algorithms are randomized • Some of these algorithms are Las Vegas , some are Monte Carlo . • Las Vegas algorithm: produces the correct solution but time/space random 18 / 21

  29. Types of randomized algorithms • For several graph problems, state-of-the-art algorithms are randomized • Some of these algorithms are Las Vegas , some are Monte Carlo . • Las Vegas algorithm: produces the correct solution but time/space random • Monte Carlo algorithm: may give incorrect solutions but time/space typically not random 18 / 21

  30. Issues with randomized dynamic graph algorithms • A randomized dynamic graph algorithm either needs to: ◦ hide its random bits from the user or ◦ assume that the user is not adaptive 19 / 21

  31. Issues with randomized algorithms • Concrete example: Randomized approximate shortest path algorithm supporting: 20 / 21

  32. Issues with randomized algorithms • Concrete example: Randomized approximate shortest path algorithm supporting: ◦ Updates: insertion/deletion of a single edge 20 / 21

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend