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

  • 50Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Dynamic Basics
A dynamic algorithm responds to a user who changes the input and expects a new output after each change; the changing input is updated
.

50 questions

  1. 1
    A dynamic algorithm responds to a user who changes the input and expects a new output after each change; the changing input is updated
    _____
    .
    Hint

    The updates arrive as the algorithm runs, rather than all being known in advance.

    Answer

    online

    Explanation

    In a dynamic algorithm, the user supplies updates online, and the algorithm processes them as they arrive.

  2. 2
    In a dynamic graph algorithm, the initial graph is available for
    _____
    before the online updates begin.
    Hint

    This is the initial work performed on the graph before updates are handled.

    Answer

    pre-processing

    Explanation

    The algorithm first receives an initial graph and has time to pre-process it before processing updates or queries.

  3. 3
    After the first update, the graph represents the state after one update; more generally, the graph after i updates is denoted
    _____
    .
    Hint

    The notation uses G followed by the number of updates already processed.

    Answer

    Gi

    Explanation

    The lecture denotes the graph after i updates as Gi, with G0 representing the initial graph.

  4. 4
    Typical dynamic graph updates include inserting or deleting an edge and, in some settings, inserting or deleting a
    _____
    .
    Hint

    This is a graph element that represents a node.

    Answer

    vertex

    Explanation

    Dynamic graph updates usually change edges, though some problems also allow vertex insertions or deletions.

  5. 5
    A dynamic graph query may ask whether the graph is connected or request the distance between two
    _____
    .
    Hint

    A graph distance is measured between two graph elements that represent locations or endpoints.

    Answer

    nodes

    Explanation

    Connectivity and the distance between two nodes are examples of queries in dynamic graph problems.

  6. 6
    Maintaining a minimum spanning tree dynamically requires reporting how the tree changes after each graph
    _____
    .
    Hint

    This is an insertion or deletion that changes the input graph.

    Answer

    update

    Explanation

    A dynamic algorithm may maintain a large object such as a minimum spanning tree and report its changes after updates.

  7. 7
    The time required to process one update or query is called the
    _____
    time.
    Hint

    It measures the work performed at each step in the dynamic sequence.

    Answer

    update

    Explanation

    Update time is the time needed to process each step of the update or query sequence.

  8. 8
    An algorithm has worst-case update time T if every individual step takes at most
    _____
    time.
    Hint

    The same bound must hold for each step, not merely on average.

    Answer

    T

    Explanation

    Worst-case update time bounds the processing time of every step individually by T.

  9. 9
    If the total time over the first k steps is at most kT, then the amortized update time is at most
    _____
    .
    Hint

    Amortized time averages the total work across the sequence of steps.

    Answer

    T

    Explanation

    Amortized update time is an average over time steps, not over a probability distribution; a total of at most kT over k steps gives an amortized bound of T.

  10. 10
    The time spent processing the initial graph is called pre-processing time and is not included in the
    _____
    time.
    Hint

    This is the per-step measure used after the initial graph is supplied.

    Answer

    update

    Explanation

    Pre-processing time handles the initial graph and is counted separately from update time.

  11. 11
    An algorithm that handles both edge insertions and deletions is called
    _____
    dynamic.
    Hint

    It supports both directions of change rather than only one type.

    Answer

    fully

    Explanation

    A fully dynamic algorithm handles both insertion and deletion updates.

  12. 12
    An algorithm that handles insertions but not deletions is called
    _____
    .
    Hint

    The graph grows through additions.

    Answer

    incremental

    Explanation

    Incremental algorithms handle insertion updates.

  13. 13
    An algorithm that handles deletions but not insertions is called
    _____
    .
    Hint

    The graph changes through removals.

    Answer

    decremental

    Explanation

    Decremental algorithms handle deletion updates.

  14. 14
    A matching is a set of edges that are
    _____
    ; no two selected edges share an endpoint.
    Hint

    The defining condition rules out shared vertices between selected edges.

    Answer

    disjoint

    Explanation

    A matching consists of pairwise disjoint edges, so no vertex belongs to more than one selected edge.

  15. 15
    A matching with the largest possible number of edges is a
    _____
    matching.
    Hint

    This describes a matching that cannot be made larger in size.

    Answer

    maximum

    Explanation

    A maximum matching is a matching of greatest size in the graph.

  16. 16
    The size of a graph's maximum matching is denoted by the lecture's notation
    _____
    .
    Hint

    It is the symbol used for the maximum matching size of graph G.

    Answer

    mu of G

    Explanation

    The lecture uses mu of G to denote the size of a maximum matching in G.

  17. 17
    A single edge insertion or deletion can change the size of a graph's maximum matching by at most
    _____
    .
    Hint

    One update can add or remove no more than one matched edge from the optimum size.

    Answer

    1

    Explanation

    An insertion can increase maximum matching size by at most one, and a deletion can decrease it by at most one.

  18. 18
    The rebuild strategy computes an approximate matching from scratch, stores its size, and then returns that stored value for a period of
    _____
    .
    Hint

    The algorithm waits through a fixed number of subsequent steps before recomputing.

    Answer

    updates

    Explanation

    After computing an approximate matching, the basic rebuild algorithm returns the stored estimate for a chosen number of updates before rebuilding.

  19. 19
    Rebuilding after every roughly epsilon times the stored matching estimate updates works because the true maximum matching changes by at most one per
    _____
    .
    Hint

    Consider how the matching size responds to one insertion or deletion.

    Answer

    update

    Explanation

    Since each update changes the maximum matching size by at most one, its total change during a short waiting period can be bounded.

  20. 20
    A maximum matching touches every edge: otherwise, an edge with neither endpoint matched could be added to the matching, contradicting its
    _____
    .
    Hint

    The contradiction is that the matching could be enlarged.

    Answer

    maximum

    Explanation

    If an edge were incident to no edge in a maximum matching, it could be added without violating disjointness, producing a larger matching.

  21. 21
    Because every edge touches a maximum matching, deleting the endpoints of one matching edge removes at most about 2n edges; this gives the bound that the graph has at most
    _____
    times n edges.
    Hint

    Repeat the endpoint-removal argument for every edge in a maximum matching.

    Answer

    2 mu of G

    Explanation

    Each matching edge has two endpoints, each with degree at most n. Removing the endpoints of all mu of G matching edges accounts for every graph edge, giving the bound 2 times mu of G times n.

  22. 22
    If a method can handle L updates with rebuild time tb and worst-case update time tu, rebuilding once per phase gives amortized update time
    _____
    .
    Hint

    Spread the rebuild cost across L updates, then add the cost of processing an ordinary update.

    Answer

    tb over L plus tu

    Explanation

    The rebuild cost contributes tb divided by L per update, and the underlying algorithm contributes tu, for a total of tb over L plus tu.

  23. 23
    To convert the amortized rebuild cost into a worst-case bound, the rebuild work is performed gradually in the
    _____
    .
    Hint

    The work is spread across multiple updates instead of being concentrated in one large spike.

    Answer

    background

    Explanation

    Background rebuilding distributes rebuild work over a period, removing the large single-update cost peak.

  24. 24
    In the background-rebuilding schedule, the first quarter of a phase is used to rebuild the structure for the graph at the phase's
    _____
    .
    Hint

    The rebuilding begins from the graph state before that phase's updates.

    Answer

    start

    Explanation

    During the first L over 4 steps, the algorithm gradually rebuilds a data structure for the graph at the beginning of the phase.

  25. 25
    After rebuilding, the next quarter of the phase catches up by feeding the stored structure
    _____
    updates per step.
    Hint

    The catch-up period processes updates at double the normal rate.

    Answer

    two

    Explanation

    Processing two updates per step during the catch-up period brings the rebuilt structure up to date.

  26. 26
    After catching up, the final half of a phase is the period when the rebuilt structure can answer
    _____
    for the current graph.
    Hint

    At this point, the structure has processed all updates seen so far.

    Answer

    correctly

    Explanation

    Once caught up, the structure processes one update per step and provides correct answers during the final half of the phase.

  27. 27
    Two staggered copies of the background-rebuilding algorithm ensure that at every step at least one copy is
    _____
    .
    Hint

    Their schedules are offset so their periods of valid answers cover one another's gaps.

    Answer

    correct

    Explanation

    Running two instances with shifted schedules ensures that one has a valid, current answer at every time step.

  28. 28
    A one-batch decremental connectivity algorithm receives one set D of edge deletions and determines whether the graph after deleting D is still
    _____
    .
    Hint

    The task checks whether all vertices remain reachable from one another.

    Answer

    connected

    Explanation

    The one-batch problem handles a single set of deletions and answers whether the resulting graph is connected.

  29. 29
    A simple dynamic reduction can handle a sequence of at most L updates by treating the prefix through the current step as a new
    _____
    .
    Hint

    The one-batch algorithm is repeatedly given all updates from the beginning up to the present.

    Answer

    batch

    Explanation

    For each step, the reduction forms a batch containing the entire update prefix and runs the one-batch algorithm on it.

  30. 30
    If processing a batch of d deletions takes O(d2)O(d^2)O(d2) time, rerunning the method on each update prefix of length at most L gives a per-step bound of
    _____
    .
    Hint

    The largest prefix has size L, and the batch cost is quadratic in its size.

    Answer

    O(L2)O(L^2)O(L2)

    Explanation

    At a step with i updates, the batch cost is O(i2)O(i^2)O(i2), which is at most O(L2)O(L^2)O(L2) for sequences of length L.

  31. 31
    Combining linear initialization, an O(L2)O(L^2)O(L2) per-step bound, and background rebuilding gives an update-time expression of
    _____
    .
    Hint

    Divide the initialization cost across L steps, then add the per-step batch cost.

    Answer

    O(m/L+L2)O(m/L + L^2)O(m/L+L2)

    Explanation

    The generic rebuilding reduction gives initialization time divided by L plus the bounded per-step cost, yielding O(m/L+L2)O(m/L + L^2)O(m/L+L2).

  32. 32
    Choosing L to balance m/Lm/Lm/L and L2L^2L2 gives decremental connectivity with O(m2/3)O(m^{2/3})O(m2/3) worst-case update
    _____
    .
    Hint

    The two terms are equal when L is chosen proportional to m1/3m^{1/3}m1/3.

    Answer

    time

    Explanation

    Setting L to m1/3m^{1/3}m1/3 balances the two terms and yields O(m2/3)O(m^{2/3})O(m2/3) worst-case update time.

  33. 33
    In the one-batch connectivity method, the algorithm first computes a
    _____
    of the original graph.
    Hint

    This tree connects all vertices using a subset of graph edges.

    Answer

    spanning tree

    Explanation

    The method begins by computing a spanning tree, which is then used to identify components created by deleted tree edges.

  34. 34
    Deleting d edges from the spanning tree splits it into at most
    _____
    components.
    Hint

    Each deleted tree edge can increase the number of components by at most one.

    Answer

    d plus 1

    Explanation

    Removing d tree edges from a tree produces at most d plus 1 components.

  35. 35
    After deleted tree edges split the spanning tree, connectivity can be restored only if surviving
    _____
    edges connect the resulting components.
    Hint

    These are graph edges that were not part of the chosen spanning tree.

    Answer

    non-tree

    Explanation

    The algorithm checks whether non-tree edges remain that connect the components created by tree-edge deletions.

  36. 36
    In the one-batch method, each non-tree edge is represented by a point whose coordinates are the first Euler-tour positions of its two
    _____
    .
    Hint

    These are the two vertices joined by the edge.

    Answer

    endpoints

    Explanation

    The algorithm maps a non-tree edge to a point in two-dimensional space using the first positions of its endpoints in the Euler tour.

  37. 37
    The representation of a tree as a sequence obtained by walking around it is called an
    _____
    .
    Hint

    This tour records the vertices encountered while traversing the tree.

    Answer

    Euler-tour

    Explanation

    An Euler-tour representation converts a tree into a sequence that can be used to reason about intervals and tree-edge cuts.

  38. 38
    In an Euler-tour representation of a tree, each tree edge corresponds to
    _____
    appearances in the tour.
    Hint

    The traversal crosses an edge in both directions.

    Answer

    two

    Explanation

    Each tree edge is traversed twice in the tour, so it appears twice in the sequence representation.

  39. 39
    A two-dimensional range-query structure can insert or delete a point in O(log⁡2n)O(\log^2 n)O(log2n) time and find a point in a specified rectangle in O(log⁡n)O(\log n)O(logn) time; the rectangle query is used to test for a connecting
    _____
    .
    Hint

    Its point representation lies in the queried range when the corresponding graph edge joins the relevant components.

    Answer

    non-tree edge

    Explanation

    The range structure stores points representing non-tree edges. Queries over rectangles determine whether such an edge connects particular spanning-tree components.

  40. 40
    Deleting tree edges partitions the Euler-tour sequence into intervals, and querying each pair of intervals checks for edges between component
    _____
    .
    Hint

    Each query concerns two of the components created by the cuts.

    Answer

    pairs

    Explanation

    The algorithm forms intervals from the deleted tree edges and checks pairs of intervals for points representing surviving connecting edges.

  41. 41
    With O(d) intervals, checking all pairs requires O(d squared) rectangle queries, which accounts for the one-batch algorithm's
    _____
    time.
    Hint

    This is the cost of processing the deletion batch.

    Answer

    update

    Explanation

    There are O(d squared) pairs of intervals to test, so the batch-processing time is O(d squared), apart from logarithmic factors.

  42. 42
    A two-batch algorithm handles an initial deletion batch D1 followed by a second batch D2; in the described connectivity reduction, the second batch is smaller, with sizes about m2/3m^{2/3}m2/3 and
    _____
    respectively.
    Hint

    The two batch sizes use complementary exponents that add to one.

    Answer

    m1/3m^{1/3}m1/3

    Explanation

    The example uses a first batch of size about m2/3m^{2/3}m2/3 and a second batch of size about m1/3m^{1/3}m1/3 to obtain an O(m1/3)O(m^{1/3})O(m1/3) worst-case update-time algorithm.

  43. 43
    A k-batch method can schedule successively smaller batches, with each later batch roughly a factor of n1/kn^{1/k}n1/k smaller than the preceding one; this can lead to improved dynamic
    _____
    .
    Hint

    The scheduling technique is used to reduce the per-update running time.

    Answer

    algorithms

    Explanation

    Multi-batch algorithms can organize updates into decreasing batch sizes and use the batching reduction to improve dynamic algorithm update times.

  44. 44
    A vertex sparsifier, also called a mimicking network, replaces a large graph with a smaller graph that preserves useful information relative to a selected set of
    _____
    .
    Hint

    These are the designated vertices whose relationships the smaller graph must retain.

    Answer

    terminals

    Explanation

    A vertex sparsifier is a compressed graph designed to preserve information about the original graph as it relates to a specified terminal set.

  45. 45
    A vertex sparsifier must contain at least the terminal vertices, while its size should be proportional to the size of the
    _____
    .
    Hint

    The goal is to make the compressed graph small relative to the designated vertices.

    Answer

    terminal set

    Explanation

    The sparsifier contains the terminals and is intended to have size close to the size of the terminal set.

  46. 46
    For shortest paths, a sparsifier with parameter k can have O(∣S∣n1/k)O(|S|n^{1/k})O(∣S∣n1/k) edges while approximating terminal-to-terminal distances within a factor of
    _____
    .
    Hint

    The same parameter controls both the size-distance tradeoff and the approximation factor.

    Answer

    k

    Explanation

    The described shortest-path sparsifier has O(∣S∣n1/k)O(|S|n^{1/k})O(∣S∣n1/k) edges and preserves distances between terminals up to a factor of k.

  47. 47
    The minmax path between two vertices minimizes the
    _____
    edge weight along the path.
    Hint

    The path is judged by its heaviest edge, not by the sum of its weights.

    Answer

    maximum

    Explanation

    A minmax path minimizes the largest edge weight among all edges on the path.

  48. 48
    A minimum spanning tree preserves all minmax paths because the unique tree path between any two vertices is itself a
    _____
    path.
    Hint

    The maximum edge on the tree path is no heavier than the maximum edge on any alternative path.

    Answer

    minmax

    Explanation

    If an alternative path had a lower maximum edge weight, replacing the heaviest edge on the tree path with a lighter edge from that alternative path would create a lower-weight spanning tree, contradicting minimality.

  49. 49
    The exchange argument for minimum spanning trees contradicts minimality by adding a lighter edge from an alternative path and removing the tree path's
    _____
    edge.
    Hint

    This is the edge whose weight exceeds every edge on the supposedly better alternative path.

    Answer

    heaviest

    Explanation

    If the tree path were not minmax, its heaviest edge would be heavier than every edge on some alternative path. Replacing it with an edge from that path would lower the total tree weight.

  50. 50
    Vertex sparsifiers are connected to graph compression approaches studied in approximation and fixed-parameter tractability, including
    _____
    .
    Hint

    This technique reduces a problem instance while preserving the information needed to solve it.

    Answer

    kernelization

    Explanation

    The lecture relates vertex sparsifiers to kernelization, a form of compression used in approximation and fixed-parameter tractability.

1 of 50
Question 1 of 50

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent