Practical Dynamic Graph Algorithms
Practical Dynamic Graph Algorithms: Models, Transferable Data Structures, and Local Adaptation
1. Dynamic Graph Algorithm Models
A dynamic graph algorithm maintains a graph property while the graph changes through edge insertions and deletions. The algorithm must update its maintained information after each change or group of changes.
The main dimensions that distinguish dynamic graph models are:
Graph representation: whether the graph is stored on one machine or distributed across several machines.
Processing resources: whether computation uses one processor, shared-memory parallelism, or distributed machines.
Update delivery: whether updates arrive individually, in batches, or as a stream.
Adversarial and privacy assumptions: what the update sequence or observer is allowed to know.
These dimensions can be combined, producing many different computational models.
2. Sequential Dynamic Graphs
In the classic sequential dynamic model:
Edge insertions and deletions arrive one at a time.
The algorithm processes each update sequentially.
The algorithm maintains a graph property after every update.
For example, an algorithm might maintain:
Connectivity,
A matching,
A degree-based property,
A k-core decomposition,
A subgraph-density estimate.
The sequential dynamic model is the basic reference point for comparing more specialized models.
3. Shared-Memory Parallel Graph Algorithms
A graph can be stored on one machine and processed using several cores or processors. Modern machines commonly contain many cores, allowing different parts of a graph or computation to be processed concurrently.
All processors can read from and write to a common shared memory.
Work-depth complexity
A common model for analyzing shared-memory algorithms is the work-depth model. It uses two primary complexity measures.
Work
Work is the total number of operations performed by the algorithm, including operations executed in parallel.
If an algorithm performs W total operations, its work is W.
Depth or span
Depth, also called span, is the length of the longest chain of sequential dependencies.
If some operations must wait for earlier operations, the depth measures the longest such dependency chain. Low depth indicates that the computation can be completed in few parallel steps.
An efficient parallel algorithm aims for both low total work and low depth: the work should not be much larger than the best sequential algorithm, while the depth should be small enough to provide substantial parallel speedup.
The PRAM model is another historical model for parallel computation, but the work-depth model is especially useful for analyzing modern shared-memory systems.
4. Massively Parallel Computation
When a graph is too large for one machine, it can be partitioned across many machines connected by a communication network.
The Massively Parallel Computation model, or MPC model, represents this setting.
Basic structure
An MPC system consists of:
M machines,
S units of memory per machine,
A graph whose edges are distributed across the machines,
Local computation performed independently on each machine,
Synchronous communication rounds between machines.
The machines communicate through a fully connected network, meaning that any machine can communicate with any other machine.
Important complexity measures
The main complexity measures are:
Space per machine: S.
Total space: M×S.
Number of communication rounds: the number of synchronous rounds required.
Local computation: the work performed within each machine.
A desirable regime uses memory that is linear in the number of vertices rather than in the number of edges. Even more desirable is sublinear memory per machine, in which each machine stores less than a linear amount of information in the number of vertices.
MPC is particularly relevant to companies that process very large datasets using clusters of machines.
5. Batch-Dynamic Graph Algorithms
Instead of receiving one update at a time, a system may receive many updates that occur during the same time interval. These updates can be processed together in a batch-dynamic model.
A batch contains both:
Edge insertions,
Edge deletions.
The algorithm receives a graph G and a batch of updates, then produces the graph obtained after applying the entire batch.
If the batch is Δ, the resulting graph can be viewed as:
where the symmetric-difference notation represents the combined effect of insertions and deletions.
Batch processing is useful when:
Updates naturally arrive in groups,
Parallel hardware can process many changes simultaneously,
Communication costs make individual updates inefficient,
A system periodically synchronizes changes.
Batch-dynamic algorithms can be combined with shared-memory parallelism or MPC.
6. Streaming Graph Algorithms
In the graph streaming model, edges arrive one at a time as a stream.
The graph may be too large to store in full, so the algorithm has only a limited amount of memory. It must select and maintain a compact representation of the stream that is sufficient for solving the target problem.
Streaming process
Edges arrive sequentially.
The algorithm observes each edge.
The algorithm keeps only selected information in memory.
The algorithm eventually outputs an estimate or solution.
Complexity measures
The main measures are:
Total memory: the amount of information retained from the stream.
Number of passes: the number of times the algorithm must scan the entire stream.
Streaming models include:
Insertion-only streams: edges are only added.
Fully dynamic streams: both insertions and deletions occur.
Insertion-only streaming corresponds to incremental dynamic algorithms, while fully dynamic streaming must cope with the more difficult setting in which previously seen edges can be removed.
Other combinations are possible, such as streaming algorithms that use parallel processing on the stored portion of the stream.
7. Adversarial Models
The behavior of the update sequence may depend on what the adversary knows about the algorithm.
Oblivious adversary
An oblivious adversary determines the entire update sequence before the algorithm runs.
The updates arrive online, but the adversary does not observe the algorithm’s outputs before fixing the sequence. This is similar to an offline adversary that prepares an update sequence in advance.
Adaptive adversary
An adaptive adversary can observe previous outputs of the algorithm and choose future updates based on those outputs.
A stronger adaptive adversary may also observe the algorithm’s internal random bits.
A deterministic algorithm is unaffected by knowledge of random bits because it has no random bits.
Randomized algorithms may need special techniques to remain robust against strong adaptive adversaries.
Privacy-violating adversaries
An even stronger observer may attempt to infer private information from the algorithm’s outputs. Differential privacy is used to limit how much can be learned about an individual edge or adjacency-list entry.
8. Differential Privacy for Graphs
Differential privacy protects sensitive information by ensuring that the output distribution of an algorithm changes only slightly when one private unit of data is modified.
For graph problems, the private unit is often an edge.
Edge-neighboring graphs
Two graphs G and G′ are edge-neighboring if they differ by exactly one edge.
Edge differential privacy attempts to hide whether a particular edge exists.
Central differential privacy
In the central model of differential privacy:
A trusted curator receives the entire private graph.
The curator runs a randomized private algorithm.
The curator releases privatized answers to queries.
A randomized algorithm A is ε-differentially private if, for every pair of neighboring inputs G and G′, and every set of possible outputs T,
The parameter ε is the privacy parameter.
Smaller ε: stronger privacy because neighboring graphs produce more similar output distributions.
Larger ε: weaker privacy but usually better accuracy.
The central curator is trusted with the entire graph, which makes this model less restrictive than local privacy.
9. Local Differential Privacy
The local model of differential privacy does not require users to trust a central curator with their raw private information.
Each node locally privatizes its own adjacency list.
Local randomizers
Each node has an ε-local randomizer R. The randomizer receives:
The node’s private adjacency list,
Public information supplied by the algorithm.
It then produces privatized information.
The neighboring inputs for a local randomizer are adjacency lists that differ in exactly one bit. A bit can represent whether a particular neighboring edge is present.
Interactive local-private computation
A local-private distributed algorithm can proceed in rounds:
A curator or coordinator sends public information x to the nodes.
Each node applies its local randomizer to its private adjacency list and x.
Each node sends privatized information to the curator.
The curator combines the privatized information to create new public information.
The process repeats for several rounds.
The curator does not need to be trusted with the original adjacency lists. It only coordinates the computation using privatized messages.
The main complexity measure is the number of communication rounds, which is compared with the round complexity of non-private distributed algorithms.
Point-to-point interpretation
The model can also be implemented without a central curator:
Nodes send privatized messages only to their neighbors.
Nodes receive privatized messages from their neighbors.
The computation proceeds through local communication.
The curator-based description is often easier to define and analyze.
Visibility of personalized messages
A curator may send different messages to different nodes. However, if the communication system allows other parties to inspect those messages, then personalized messages do not provide additional privacy merely because they are sent to different recipients.
Consequently, one can conceptually broadcast the union of the messages to everyone. The important privacy protection comes from the fact that the messages are already privatized.
Static nature of the local model
The local-private model described here assumes a static graph:
The graph is fixed at the beginning.
The adjacency list of each node remains unchanged throughout the communication rounds.
Nodes may use information received in earlier rounds when producing later outputs.
This is different from a dynamic continual-release setting, in which the graph itself changes and a private output is required after every update.
10. Combining Computational Models
The various models can be combined to represent more realistic systems.
Examples include:
Batch dynamic + shared-memory parallelism: each update batch is processed in parallel on a multicore machine.
Batch dynamic + MPC: update batches are processed by a distributed cluster.
Dynamic updates + differential privacy: produces a continual-release model.
Distributed computation + differential privacy: produces local differential privacy.
Insertion-only streaming: supports incremental dynamic algorithms.
Fully dynamic streaming: supports both insertions and deletions in a stream.
Parallel streaming: processes the portion of the stream retained in memory using parallel computation.
Continual release
In the continual-release model, a graph changes over time, and the algorithm must output a privatized answer after every update.
For example, after each edge insertion or deletion, the algorithm might privately release:
The current number of edges,
An estimate of the maximum core number,
A density estimate,
A connectivity-related statistic.
The challenge is to maintain privacy over the entire sequence of releases, not merely one output.
11. Transferable or Universal Algorithms
The large number of computational models creates a practical implementation problem. A company may change its hardware, storage design, communication architecture, or privacy requirements. Reimplementing a completely different algorithm for every model is expensive and error-prone.
A desirable goal is therefore to design transferable data structures.
Properties of transferable data structures
A transferable data structure should:
Use the same core algorithmic idea across many models.
Require only small modifications when moved between models.
Preserve strong theoretical guarantees.
Match the best-known guarantee in as many models as possible.
Avoid major redesign when the computational environment changes.
The phrase “without much effort” is partly subjective. An algorithm is a good candidate if its modifications are incremental rather than fundamental.
Universal model or programming primitives
An ideal long-term goal would be either:
A universal computational model from which algorithms can be systematically reduced to many other models, or
A collection of algorithmic programming primitives such that algorithms expressed using those primitives automatically inherit guarantees in multiple models.
Locally adjustable graph algorithms are a step toward this goal, but a general universal model or programming language has not yet been established.
12. Locally Adjustable Graph Algorithms
A locally adjustable graph algorithm maintains a small amount of state at each vertex and repeatedly updates that state using information from a local neighborhood.
General structure
These algorithms typically operate as follows:
Every vertex begins in an initial state.
Each vertex computes a function of its state and sends the result to nearby vertices.
Each vertex receives outputs from its neighbors.
It counts or aggregates the received outputs according to a constraint.
It updates its internal state.
The process repeats for a small number of rounds.
The algorithm terminates when a stable condition is reached.
The local neighborhood may consist only of immediate neighbors.
Example of a local update
Suppose vertex v has state Sv. It sends a function output f(Sv) to its neighbors. Each neighboring vertex then counts how many received outputs satisfy a particular condition:
The vertex uses cv to determine its next state Sv′. This process is repeated until no further state changes are needed.
These algorithms are naturally distributed because each node needs only local information and communicates with nearby nodes.
Why they transfer well
Locally adjustable algorithms are structurally simple:
Local state is small.
Communication is local.
Updates are based on counts or simple aggregates.
The same local rule can often be implemented sequentially, in parallel, in distributed systems, or with privatized messages.
13. Level Data Structures
A major class of locally adjustable algorithms is the level data structure.
The vertices are partitioned across levels. During the algorithm, vertices move upward or downward according to local rules.
Typical characteristics include:
O(logn) levels for a graph with n vertices.
A state consisting primarily of the current level of each vertex.
Local updates based on neighbors’ levels.
Vertex movement triggered when a degree-like quantity crosses a threshold.
Level structures are used in several graph problems, including problems related to:
Arboricity,
Orientation,
Dense subgraphs,
Degeneracy,
k-core decomposition.
The focus here is on level structures whose guarantees depend on the graph’s current arboricity, rather than only on the maximum arboricity seen over the entire update sequence.
k-Core Decomposition
14. Definition of a k-Core
A k-core of a graph is the maximal induced subgraph in which every vertex has degree at least k.
An induced subgraph contains a selected set of vertices and all edges from the original graph whose endpoints are both in that set.
Thus, a k-core must satisfy:
Every included vertex has at least k neighbors within the subgraph.
The subgraph is maximal: no additional vertices can be added while preserving that property.
The k-core can be found conceptually by repeatedly removing vertices whose current degree is less than k. This is often called a peeling process.
Core number
The core number of a vertex v, denoted informally by core(v), is the largest value of k such that v belongs to the k-core:
The collection of core numbers for all vertices is the k-core decomposition.
Interpretation
A large core number indicates that a vertex belongs to a highly interconnected region of the graph. A vertex can have a high ordinary degree but still have a low core number if most of its neighbors do not themselves belong to a sufficiently dense subgraph.
Core number is not the same as degree. Degree measures the number of immediate neighbors, while core number measures the largest recursively dense structure containing the vertex.
The k-core decomposition is relevant to dense-subgraph analysis, network structure, data mining, machine learning, and computational biology.
15. Approximate k-Core Decomposition
Exact k-core decomposition is difficult to maintain in several computational settings:
It is difficult to obtain efficient parallel algorithms with very small depth.
It is difficult to obtain efficient distributed algorithms with few communication rounds.
Exact core numbers do not have known differential-private algorithms in the setting discussed.
A common solution is to use approximation.
A core-number estimate k(v) is a c-approximation to the exact core number k(v) if:
This is a two-sided multiplicative approximation.
The definition can be converted into a one-sided form by multiplying through by c. For example, the lower bound can be written as:
Approximation makes it possible to design algorithms that work efficiently under parallelism, distribution, streaming, or privacy constraints.
16. Insertion-Based Level Algorithm
The level data structure for approximate core decomposition assigns vertices to levels and moves them according to their local induced degree.
Levels and thresholds
The structure has approximately logn levels. Each level represents a range of density or support.
For a vertex v, define its induced degree at its current level as the number of neighbors that are at the same level or a higher level:
where ℓ is the current level of v.
A vertex moves upward if this induced degree exceeds the threshold for its current level.
Active vertices
When edges are inserted:
Every vertex incident to an inserted edge is marked active.
Each active vertex examines its induced degree among same-level and higher-level neighbors.
If its induced degree is greater than the threshold, it moves upward.
Vertices that move upward remain active.
Vertices that do not move upward become inactive.
The induced degrees of the remaining active vertices are recomputed.
The process continues until no active vertex can move or the top level is reached.
For a threshold written as 2.1(1+η), where η>0, the movement rule is:
The constant 2.1 is not fundamental. It can be replaced by 2+γ for any constant γ>0. It is used as a convenient explanatory value.
Peeling interpretation
The process resembles a peeling algorithm, but it operates through level changes rather than simply deleting vertices.
The level of a vertex summarizes how much support it receives from vertices that are at least as “dense” or advanced in the structure.
Termination
The insertion process terminates when either:
All active vertices become inactive, meaning no vertex satisfies the movement condition, or
Vertices reach the highest level.
At termination, the level arrangement provides information about approximate core numbers.
17. Stacking Multiple Level Structures
One level structure uses a single cutoff. To estimate core numbers over a broad range, several copies of the structure can be stacked.
Each copy has a cutoff larger than the previous one by a factor of 1+η.
If the bottom structure has cutoff:
then successive structures have cutoffs:
The top structure has a cutoff of approximately:
Thus, the complete data structure uses O(logn) copies.
Extracting an approximation
For a vertex v:
Inspect each copy of the level structure.
Determine whether v lies above the topmost level in that copy.
Select the largest cutoff for which this occurs.
Use that cutoff as the approximate core number.
Vertices in the highest level have core numbers within approximately a factor of two of the relevant cutoff. The stacked structures extend this estimate across different core-number scales.
18. Locally Adjustable Interpretation
The level algorithm fits the locally adjustable framework directly.
Each vertex stores:
Its current level,
Possibly additional local bookkeeping information.
During an update round:
Each vertex sends its current level to its neighbors.
Each vertex counts neighbors whose levels are at least its own level.
The count determines whether the vertex moves upward.
The vertex updates its level and communicates the new state in the next round.
The local state and communication rule are simple, making the algorithm suitable for many computational models.
Complexity and Model Transfers
19. Batch-Dynamic Shared-Memory Algorithm
The level data structure can be implemented for batch updates using shared-memory parallelism.
The stated guarantees include:
Work efficiency: the work matches the best amortized work per update of the best-known sequential algorithm.
Approximation: a (2+η) two-sided approximation.
Depth: polylogarithmic depth.
Deterministic variant: determinism can be obtained with additional logarithmic factors in the depth.
Adversarial robustness: the deterministic version is robust against the strongest adaptive adversary.
The randomized version uses hash tables as its main source of randomization.
The work-efficient property is important because parallelism does not substantially increase the total amount of computation compared with the best sequential method.
20. MPC Algorithm
The shared-memory batch-dynamic algorithm can be transferred almost immediately to the MPC model.
The algorithm obtains guarantees for:
Total space,
Space per machine,
Communication rounds,
Approximation quality.
The space per machine can be sublinear in the number of vertices. For any constant δ satisfying:
the algorithm can operate with an appropriate sublinear memory allocation.
However, the number of MPC rounds is currently larger than the best-known static MPC round complexity. Therefore, reducing the dynamic round complexity is an important goal.
A desirable result would make the dynamic algorithm use at least as few rounds as the corresponding static algorithm.
21. Local Edge-Differentially Private Algorithm
The locally private version maintains the level algorithm while privatizing the local degree tests.
Its guarantees include:
A (2+η) one-sided approximation.
An additive error term involving logn/ε.
Operation in the local edge-differential privacy model.
The additive error is related to privacy lower bounds for dense-subgraph problems. Since the maximum k-core number is within a factor of two of a relevant dense-subgraph quantity, lower bounds for dense-subgraph estimation suggest that some logarithmic dependence on n/ε may be unavoidable.
Reducing the number of logarithmic factors remains possible and is an open direction.
22. Private Transformation Using Geometric Noise
The local-private algorithm is obtained by modifying the non-private level data structure in a simple way.
Non-private movement test
In the original algorithm, a vertex moves upward when its induced degree exceeds a level threshold:
Private movement test
In the private version:
The vertex computes its induced degree.
It independently samples noise from a geometric distribution.
It adds the noise to the induced degree.
It compares the noisy value with the threshold.
It moves upward if the noisy value exceeds the threshold.
The private test is therefore:
where Zv is independently sampled noise.
The geometric mechanism has a probability mass function of the general form:
for an appropriate privacy-dependent parameter λ. The exact parameter determines the privacy-accuracy tradeoff.
Every time a vertex remains active and must be tested again, fresh independent noise is drawn.
What remains unchanged
The following parts of the algorithm stay the same:
The level structure,
The active/inactive status rules,
Vertex movement,
The stacked cutoff structures,
The method for extracting an approximate core number.
Only the degree comparison is changed from an exact comparison to a noisy comparison.
The algorithmic transformation is simple: add independent geometric noise to each local induced-degree test. The privacy and approximation analysis is substantially more difficult than the implementation change.
23. Sources of Additive Error
The local-private approximation has an additive error containing polylogarithmic factors.
One contribution comes directly from the parameter used in the geometric mechanism. This produces an error term of approximately:
An additional logarithmic factor arises when the guarantee is required to hold with high probability over many vertices, levels, rounds, and noisy tests.
Thus, a typical high-probability error can contain a term of the form:
depending on how the mechanism and probability bounds are parameterized.
The key sources are:
Noise required for differential privacy,
The number of level structures,
Repeated tests across rounds,
A union bound or related high-probability analysis over many events.
Open Problems and Broader Directions
24. Improving Approximation
The batch-dynamic shared-memory result has a (2+η) two-sided approximation, which corresponds to a weaker one-sided factor after converting the two-sided guarantee.
An important question is whether the approximation factor can be reduced while preserving:
Work efficiency,
Polylogarithmic depth,
Good amortized update time.
25. Reducing MPC Communication Rounds
The dynamic MPC algorithm currently uses more rounds than the best static algorithm.
A central goal is to reduce the number of rounds, ideally to the static bound or a comparably efficient dynamic bound.
This is challenging because dynamic updates can trigger cascades of local changes across levels, requiring repeated communication.
26. Reducing Local-Privacy Error
The additive error in the local-DP algorithm contains logarithmic factors in n and dependence on 1/ε.
Possible improvements include:
Reducing the number of logarithmic factors,
Designing more efficient noise mechanisms,
Avoiding repeated noise accumulation,
Exploiting correlations or improved concentration bounds.
Some logarithmic dependence may be unavoidable because of lower bounds for related dense-subgraph problems.
The (2+η) approximation factor may also be difficult to improve when only logarithmically many rounds are allowed. A known lower bound connects this approximation barrier with logn rounds, although the precise tradeoff between approximation and polylogarithmic rounds remains an open question.
27. Identifying More Transferable Problems
A broader research direction is to determine which graph problems admit algorithms that transfer easily among:
Sequential dynamic computation,
Shared-memory parallelism,
MPC,
Streaming,
Batch updates,
Central differential privacy,
Local differential privacy.
Problems such as dense-subgraph estimation, degree ordering, and k-core decomposition already have private algorithms in relevant settings.
Other problems, such as matching, are more difficult to formulate under edge privacy because directly releasing a matching can reveal whether particular edges are present. Releasing only the size of a matching is more privacy-compatible and may be substantially more tractable, particularly in the local-DP model.
The ultimate objective is to identify either:
A universal model covering these settings, or
A set of algorithmic primitives whose use guarantees efficient, private, parallel, distributed, and dynamic implementations.
Locally adjustable graph algorithms and level data structures provide an initial framework for pursuing that objective.

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