1. Home
  2. Explore
  3. Computer Science
  4. Dynamic Graph Algorithms

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Dynamic Graph Algorithms

  • 47Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Dynamic Graph Foundations
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What is a dynamic algorithm?

Tap to flipClick to flipspace

An algorithm that processes changes to its input over time and updates its output or answers queries after each change.

Or swipe the card

47 cards

  1. What is a dynamic algorithm?

    An algorithm that processes changes to its input over time and updates its output or answers queries after each change.

  2. How does the online dynamic graph setting proceed?

    Preprocess an initial graph G0G_0G0​, then receive updates or queries online and update the data structure or answer each query as it arrives.

  3. What are typical updates and tasks in a dynamic graph problem?

    Updates commonly insert or delete edges, and sometimes vertices. Tasks include testing connectivity, answering distances, or maintaining an object such as a minimum spanning tree.

  4. What does GiG_iGi​ denote in a dynamic graph sequence?

    GiG_iGi​ is the graph after the first iii updates; G0G_0G0​ is the initial graph.

  5. What is worst-case update time?

    A bound TTT on the time needed to process every individual update or query.

  6. What is amortized update time, and how does it differ from an average over a distribution?

    Amortized update time TTT means the total processing time over the first kkk steps is at most kTkTkT. It averages over time steps, not over a probability distribution.

  7. What is preprocessing time in a dynamic algorithm?

    The time spent processing the initial input graph G0G_0G0​; it is counted separately from update time.

  8. Distinguish fully dynamic, incremental, and decremental algorithms.

    Fully dynamic algorithms handle both insertions and deletions. Incremental algorithms handle insertions only; decremental algorithms handle deletions only.

  9. What is a matching, and what does �μ(G)�\mu(G)�μ(G) denote?

    A matching is a set of pairwise vertex-disjoint edges. �μ(G)�\mu(G)�μ(G) denotes the size of a maximum matching in GGG.

  10. What is the basic recomputation strategy for a dynamic problem?

    Recompute the desired answer from scratch after every update. For approximate matching, the lecture gives a static computation time of O(m/ϵ)O(m/\epsilon)O(m/ϵ).

  11. How much can one edge insertion or deletion change the maximum matching size?

    By at most 111: inserting one edge can increase the maximum matching size by at most 111, and deleting one can decrease it by at most 111.

  12. Describe the periodic rebuilding strategy for approximate dynamic matching.

    Compute an approximate matching value from scratch, store it as μ~\widetilde{\mu}μ​, return that stored value for about ϵμ~\epsilon\widetilde{\mu}ϵμ​ updates, then recompute and repeat.

  13. Why does periodic rebuilding keep the stored matching estimate accurate?

    Immediately after rebuilding, the estimate is accurate. During the next ϵμ~\epsilon\widetilde{\mu}ϵμ​ updates, the true maximum matching size changes by at most that many, so the stored estimate remains within a 1+ϵ1+\epsilon1+ϵ factor under the stated approximation setup.

  14. What is the general amortized cost of rebuilding an algorithm every LLL updates?

    If rebuilding costs TbT_bTb​ and each update costs TuT_uTu​, the amortized update time is Tb/L+TuT_b/L+T_uTb​/L+Tu​.

  15. Why is the number of edges in a graph at most 2nμ(G)2n\mu(G)2nμ(G)?

    Every edge must touch an endpoint of a maximum matching; otherwise it could be added to that matching. The 2μ(G)2\mu(G)2μ(G) matched vertices have total degree at most 2nμ(G)2n\mu(G)2nμ(G), which bounds the number of edges.

  16. What update-time bound does periodic rebuilding give for approximate matching?

    Using rebuild time O(m/ϵ)O(m/\epsilon)O(m/ϵ), a rebuild interval of about ϵμ~\epsilon\widetilde{\mu}ϵμ​, and m≤2nμ(G)m\leq 2n\mu(G)m≤2nμ(G) gives O(n/ϵ2)O(n/\epsilon^2)O(n/ϵ2) amortized update time, or O(n)O(n)O(n) when ϵ\epsilonϵ is treated as a constant.

  17. How does background rebuilding remove the large update-time peak caused by a rebuild?

    Distribute the rebuild work across multiple updates instead of doing all of it at once, so each update pays only a portion of the rebuild cost.

  18. How is a phase of length LLL divided in the background-rebuilding method?

    Into three periods: an initial L/4L/4L/4 rebuild period, an L/4L/4L/4 catch-up period, and a final L/2L/2L/2 period in which the structure answers correctly.

  19. What happens during the rebuild period of background rebuilding?

    The algorithm rebuilds a data structure for the graph at the phase’s start. It spreads the total rebuild work TbT_bTb​ evenly over L/4L/4L/4 updates and ignores updates arriving during this period.

  20. What is the purpose of the catch-up period in background rebuilding?

    The rebuilt structure is behind because updates were ignored. During the next L/4L/4L/4 steps, it processes two updates per step, catching up with the update sequence seen so far.

  21. When does a background-rebuilt structure answer current queries correctly?

    During the final L/2L/2L/2 steps of its phase, after it has caught up; it then processes one new update per step.

  22. Why are two shifted copies used in background rebuilding?

    A single copy is correct only during part of its phase. Shifting the schedule of a second copy ensures at least one copy is correct at every time step.

  23. What worst-case update time does background rebuilding achieve?

    It achieves O(Tb/L+Tu)O(T_b/L+T_u)O(Tb​/L+Tu​) worst-case update time, up to constant factors, for an algorithm that can handle LLL updates before rebuilding.

  24. What does it mean to rewind a data structure, and how can this be supported?

    Rewinding restores the data structure’s configuration to an earlier point. Persistence can provide this capability for data structures.

  25. What is a one-batch algorithm?

    An algorithm that starts with a graph, receives one batch of updates, and answers a specified question about the resulting graph, without needing to process further batches.

  26. How can a one-batch algorithm be used to process a sequence of updates?

    For update iii, form a batch consisting of the first iii updates and run the one-batch algorithm on that prefix. Repeat for each new update.

  27. If a one-batch algorithm has initialization time O(m)O(m)O(m) and cost O(d2)O(d^2)O(d2) for a batch of ddd updates, what sequence-processing costs follow?

    It yields an algorithm handling LLL updates with initialization time O(m)O(m)O(m) and worst-case per-step work at most O(L2)O(L^2)O(L2) by rerunning it on each update prefix.

  28. How does background rebuilding convert the preceding sequence-processing algorithm into a dynamic one?

    The resulting worst-case update time is O(m/L+L2)O(m/L+L^2)O(m/L+L2). Choosing L=m1/3L=m^{1/3}L=m1/3 balances the terms and gives O(m2/3)O(m^{2/3})O(m2/3) update time.

  29. What is the basic idea behind a kkk-batch strategy?

    Use an algorithm that handles several successive batches, then schedule batches from largest to smaller ones. The lecture’s intuition is to shrink batch sizes by roughly a factor of n1/kn^{1/k}n1/k at each stage.

  30. What is the stated conditional benefit of a two-batch connectivity algorithm?

    If initialization takes linear time, the first batch costs linear time in its size, and the second batch likewise costs linear time in its own size, choosing batch sizes around m2/3m^{2/3}m2/3 and m1/3m^{1/3}m1/3 can yield O(m1/3)O(m^{1/3})O(m1/3) worst-case update time.

  31. What is the decremental connectivity problem considered in the lecture?

    Given a graph with nnn vertices and mmm edges under edge deletions only, maintain whether the whole graph is connected.

  32. How does the one-batch connectivity problem differ from the fully dynamic version?

    It receives one set DDD of ddd deleted edges and must determine whether G−DG-DG−D is connected; it does not need to handle a continuing sequence of batches.

  33. What are the initialization and batch-processing costs of the one-batch connectivity algorithm described?

    Initialization takes linear time to build the required structures, and processing a batch of ddd deletions takes O(d2)O(d^2)O(d2) time.

  34. How does deleting tree edges from an initial spanning tree help test connectivity?

    Deleting tree edges splits the spanning tree into at most d+1d+1d+1 components. The graph remains connected exactly when non-tree edges can reconnect these components into one connected graph.

  35. What is a two-dimensional range query structure used for in the batch connectivity algorithm?

    It stores points in the plane, supports point insertion and deletion in O(log⁡2n)O(\log^2 n)O(log2n) time, and can return a point inside a queried rectangle in O(log⁡n)O(\log n)O(logn) time.

  36. What is an Euler tour representation of a tree?

    A sequence obtained by walking around the tree and recording the visited vertices. Each tree edge appears twice in the tour, once for each traversal direction.

  37. How are non-tree edges represented as points in the connectivity algorithm?

    For each non-tree edge, place a point whose coordinates are the first positions (minimum ranks) at which its two endpoints occur in the Euler tour.

  38. How do deleted tree edges lead to rectangle queries in the connectivity algorithm?

    Deleting tree edges cuts the Euler-tour representation into intervals. These intervals form a grid of regions; querying the resulting rectangles checks whether non-tree edges connect the separated tree components.

  39. How are deleted non-tree edges handled in the range-query structure?

    Delete the point corresponding to each deleted non-tree edge from the point set.

  40. Why does the one-batch connectivity algorithm take O(d2)O(d^2)O(d2) batch time?

    The deletions and corresponding point updates take O(d)O(d)O(d)-scale work, while the algorithm may query O(d2)O(d^2)O(d2) rectangles to check connections among the components.

  41. Can the spanning-tree and range-query approach be adapted to insertions?

    Yes. Although presented for deletions for simplicity, the lecture notes that the exercise’s approach can also work for insertions.

  42. What is a vertex sparsifier, also called a mimicking network?

    A smaller graph HHH containing a designated terminal set SSS and preserving useful information about the original graph GGG that concerns those terminals.

  43. What size goal does a vertex sparsifier aim for?

    Its size should be proportional to the number of terminals, so it compresses a large graph while retaining terminal-relevant information.

  44. What shortest-path guarantee does the lecture give for a terminal sparsifier with parameter kkk?

    There is a sparsifier with O(∣S∣n1/k)O(|S|n^{1/k})O(∣S∣n1/k) edges such that distances between every pair of terminals are preserved within a factor of kkk.

  45. What is the minmax path between vertices sss and ttt?

    A path from sss to ttt minimizing the weight of its heaviest edge; the minmax value is that maximum edge weight.

  46. How does a minimum spanning tree preserve minmax paths?

    For any vertices sss and ttt, the unique tree path between them in a minimum spanning tree is an sss–ttt minmax path.

  47. Why must the minimum-spanning-tree path between two vertices be a minmax path?

    If another path had a strictly smaller maximum edge weight, an edge on the tree path with the largest weight could be replaced by an edge from the alternative path, producing a lighter spanning tree and contradicting minimality.

Card 1 of 47
Card 1 of 47

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent