Paper Title: Robust Restaking Networks.


 



















theoremTheorem
lemmaLemma
corollaryCorollary
claimClaim
caseCase


solution
  
  
  


amatrix[1]
  [[ ]

































































Robust Restaking Networks
    Naveen DurvasulaColumbia University. Email: . Tim RoughgardenColumbia University & a16z crypto. Email: .
    August 5, 2024
============================================================================================================



§ ABSTRACT 
We study the risks of validator reuse across multiple services in a
restaking protocol. We characterize the robust security of a restaking
network as a function of the buffer between the costs and profits from
attacks.  For example, our results imply that if attack costs
always exceed attack profits by 10%, then a sudden loss of .1% of
the overall stake (e.g., due to a software error) cannot result in the
ultimate loss of more than 1.1% of the overall stake.
We also provide local analogs of these overcollateralization conditions
and robust security guarantees that apply specifically for a target
service or coalition of services. All of our bounds on worst-case
stake loss are the best possible. Finally, we bound the
maximum-possible length of a cascade of attacks.

Our results suggest measures of robustness that could be exposed to
the participants in a restaking protocol. We also suggest
polynomial-time computable sufficient conditions that can proxy for
these measures.




§ INTRODUCTION




 §.§ Sharing Validators Across Services


Major blockchain protocols such as Bitcoin or Ethereum are
“decentralized,” meaning that transaction execution is carried
out by a large and diverse set of “validators.” 
Such protocols offer a form of “trusted computation,” in the sense
that, because they are decentralized, no one individual or entity can
easily interfere with their execution. A decentralized and
Turing-complete smart contract platform such as Ethereum can then be
viewed as a trusted programmable computer capable of performing
arbitrary computations.

While Turing-complete, the computing functionality offered by Ethereum
smart contracts suffers from limitations imposed by design decisions
in the underlying consensus protocol. Most obviously, computation and
storage in the Ethereum virtual machine is scarce, with perhaps 15–20
transactions processed per second.  Could the Ethereum protocol be
somehow bypassed, opening the door for different or more powerful
computing functionality, while retaining at least some of the
protocol's decentralization?  Or, what about applications that are not
compatible with all Ethereum validators, perhaps due to demanding
hardware requirements or regulatory constraints?

One natural approach to addressing these challenges is to allow the
reuse of a blockchain protocol's validators across multiple
services, where a “service” is some task that could be carried out
by some subset of validators. (The initial blockchain protocol can be viewed as the
canonical service, performed by all validators.)
For example, such services
could include alternative consensus protocols
(perhaps with higher throughput, a different virtual machine, or
different consistency-liveness trade-offs), storage (“data
availability”), or verifiable off-chain computation (“zk
coprocessors”).[
Several projects, in various stages of production, are currently
exploring this idea; the Eigenlayer restaking protocol <cit.>
is perhaps the most well known of them. We stress that our goal here
is to develop a model that isolates some of the fundamental challenges
and risks of validator reuse, independent of any specific
implementation of the idea.]

The obvious danger of validator reuse is an increased risk of
a validator deviating from its intended behavior (e.g., due to overwhelming computational
responsibilities). Our focus here is deliberate validator
deviations in response to economic incentives, such as the profits that could
be obtained by corrupting one or more services. The goal of this paper is to
quantify such risks:

Under what conditions can validators be safely reused across
multiple services?







 §.§ Cryptoeconomic Security


We first review the usual “cryptoeconomic” approach to answering a
more basic question: when is a blockchain protocol, without any
additional services, “safe from attack”?  The idea is to perform a
cost-benefit analysis from the perspective of an attacker, and declare
the protocol safe if the cost of carrying out an attack
exceeds the profit that the attacker can expect from it; see also Figure <ref>.
In the
specific case of a proof-of-stake blockchain protocol with slashing
(such as Ethereum), the cost can be estimated as the value of the
validator stake that would be lost to slashing following an attack. 
For example, let V denote the set of validators of a proof-of-stake
blockchain protocol and σ_v the stake of validator v ∈ V
(e.g., 32 ETH in Ethereum). In a typical PBFT-type protocol in which
double-voting validators lose all of their stake, the 
cost of an attack (i.e., causing a consistency violation) can be
bounded below by 13∑_v ∈ Vσ_v. In this case,
the protocol can be regarded as cryptoeconomically secure provided
the estimated profit π of an attack is less than this quantity.
To the extent that there is a “buffer” between 13∑_v
  ∈ Vσ_v and π, the protocol can be treated as
“robustly secure,” meaning secure even after a sudden loss of some
amount of stake (e.g., due to slashing caused by a software error).







 §.§ Our Results: Robustly Secure Validator Reuse


Viewing the basic scenario of a blockchain protocol as a star graph
(with one “service” representing the protocol connected to all the
validators running it), the more complex scenario of validators reused
across multiple services can be viewed as an arbitrary bipartite
graph (Figure <ref>). As before, we suppose that each
validator v ∈ V has some
stake σ_v that can be confiscated in the event that v
participates in an attack on a service that it has agreed to
support. There is now a set S of services, with π_s denoting the
profit an attacker would obtain by compromising the service s ∈
S.[We follow <cit.> and assume that the estimates on
  attack profitability (the π_s's) are given. Developing tools to
  help produce such estimates in practice is an important open
  research direction.]
We assume that compromising a service s ∈ S requires the
participation of an α_s fraction of the overall validator stake
supporting v (e.g., α_s = 1/3).
With this expanded network formalism to capture multiple services,
when should we consider a network to be “secure”?



Intuitively, a network is insecure if there is a set of services that
can be profitably attacked. This requires two conditions to be
satisfied: the validators B ⊆ V carrying out the attack must
control sufficient stake to do so (for each service s in the
attacked set A, the validators of B control at least a α_s
fraction of the staked pledged to s), and they must profit from it
(i.e., ∑_s ∈ Aπ_s > ∑_v ∈ Bσ_v).
We call such a pair (A,B) a valid attack and a network secure if there are no valid attacks; see also Figure <ref>.
With multiple services,
security is an inherently combinatorial (as opposed to binary)
notion. For example, the computational problem of checking whether a network is secure is 
as hard as the (coNP-hard) problem of verifying the expansion of a bipartite graph (see <cit.>).



When is a network “robustly secure,” in the sense that the sudden
loss of a small amount of stake cannot enable a catastrophic attack?
Unlike the “all-or-nothing” version of this question with a single
service, with multiple services, the following more fine-grained question is the appropriate one: given an initial shock in the
form of a sudden loss of a ψ fraction of the overall stake, what
is the total fraction of stake that might be lost following any
consequent valid attacks?

As in the case of a single service, some amount of “buffer” in stake
(relative to attack profits) is necessary for robust security. We
parameterize this overcollateralization factor via a parameter γ and suppose that,
whenever B ⊆ V is a subset of validators capable of
corrupting all the services in A ⊆ S, the total stake
of B is at least a 1+γ factor larger than the total profit from
corrupting all of A. For example, this condition holds in the
network in Figure <ref>(b) for γ=1/2 (but not for larger
values of γ).

Our first main result (<ref>) precisely characterizes the
worst-case (over bipartite graphs and shocks, as a function
of γ) fraction of the overall
stake that can be lost due to a shock
of size ψ: 1+1γψ. Because the network
was secure prior to the shock, the value of a
1+1γψ fraction of the overall stake is also
an upper bound on the total profit obtained from all of the attacked
services.

We also show that our result is tight
in a strong sense (<ref>, <ref>, and
<ref>): for every ψ, γ, and ϵ
greater than zero such that 0 ≤1 + 1/γψ - ϵ≤ 1,
there exists a restaking graph in which a ψ
fraction of the overall stake can disappear in a shock that results in
the loss of at least a 1 + 1/γψ - ϵ fraction
of the overall stake.[After slightly reducing the validator
  stakes, the network
  in Figure <ref>(b) already shows that the bound is tight for
  the special case in which ψ = 1/5 and γ is arbitrarily
  close to 1/2. (Consider a shock that knocks out the validator that
is connected to all four services.)]

Qualitatively, this result implies that a constant-factor
strengthening of the obvious necessary condition for security
automatically implies robust security. For example, if attack costs
always exceed attack profits by 10%, then a sudden loss of .1% of
the overall stake cannot result in the ultimate loss of more than
1.1% of the overall stake. 

Our result suggests a “risk measure” that could be exposed to the
participants in a restaking protocol, namely the maximum value of the
buffer parameter γ that holds with respect to the current
restaking network. We also suggest easy-to-check
sufficient conditions that can proxy for this risk measure (<ref>). These conditions are similarly tight, as shown in <ref>, <ref>, and  <ref>.



 §.§ Our Results: Local Robust Security Guarantees




The results described in Section <ref> are “global” with
respect to the network structure, in three distinct senses: (i) the
overcollateralization condition is assumed to hold for every
subset B  V of validators and A  S of services that B is
capable of corrupting; (ii) the initial shock can affect any subset of
validators, subject to the assumed bound of ψ on the total
fraction of stake lost; and (iii) any subset of validators might lose
stake following the initial shock, subject to our upper bound of
(1+1γ)ψ on the total fraction of lost stake.






  
Local guarantees.
We next pursue more general “local” guarantees, which are
parameterized by a set C of services. (The global guarantees will
correspond to the special case in which C=S.)
For example, C might be a set of closely related services that share
a number of dedicated validators. The operators of such a set C
might object to both the assumptions and the conclusion of our global
guarantee:



  * How can we be sure that the overcollateralization factor holds for
  services and validators that we know nothing about?


  * And even if we could, 
how can we be sure that random validators that we have nothing
  to do with won't suddenly lose their stake (e.g., because they
  supported a malicious or buggy service), resulting in an initial
  shock the causes the loss of more than a ψ fraction of the
  overall stake?


  * And even if we could, how can we be sure that our validators
  won't be the ones that lose their stake following a shock that is
  purely the fault of other services and/or validators?



To address these concerns, we next consider a refined version of the
basic model, parameterized by a set C of services.  We denote
by Γ(C) the validators that are exclusive to C, meaning that
they contribute to no services outside C. (In the special case in
which C=S, Γ(C)=V and we recover the original model.)
Intuitively, the validators in Γ(C) are the ones that services
in C are “counting on”; other validators support (potentially
malicious or buggy) services outside C and, from C's perspective,
could disappear at any time.  We then restrict attention to initial
shocks in which at most a ψ fraction of the total stake
controlled by the validators of Γ(C) is lost. (The shock can affect
validators outside of Γ(C) arbitrarily.)  The goal is then to
identify overcollateralization conditions guaranteeing that, no matter
what the initial shock and subsequent attacks, the fraction of stake
ultimately lost by the validators in Γ(C) is bounded (by a
function of the shock size ψ and an overcollateralization
parameter γ).

Generalizing our global guarantees to local guarantees is not
straightforward and, as the next two examples show, requires
additional compromises. The first example shows that protection can be
guaranteed only against a subset of valid attacks, a natural and well
motivated subset that we call “stable attacks.” The second example
shows that, even when restricting attention to stable attacks,
overcollateralization is required not only for potential attacks, but
more generally for what we call “attack headers.”









  
Necessity of restricting to stable attacks.
In more detail, in the first example (depicted on the left of
<ref>), we
consider a restaking network with two services and three
validators. (Vertices in this figure correspond to validators, which
were previously represented as the right-hand side vertices of a
bipartite graph; each service is now identified with its neighborhood
of validators.) 
The service highlighted in green on the left has 100
times as much stake securing it as its profit from corruption, and
shares no validators with other services, so one might hope that it
would be protected from any shocks that affect only the other
validators.
However, if the validator
outlined in red disappears, the two validators outlined in yellow
can attack both services for
a profit of 102-101 > 0.
But this example is unsatisfying: the validator with stake 1 could
have attacked the service with profit from corruption 101 on its own
to yield a profit of 100. The addition of the validator with stake
100 added 100 to the cost of the attack, but only added 1 (from
the corruption of the service highlighted in green) to the profit. We
show in <ref> that the issue suggested by this
example is fundamental: without further restrictions on attacks that
rule out contrived examples such as this one, there does not exist a
local condition that guarantees local security.
In response, we confine
attention to sequences of what we call stable attacks in which
all of the attacking validators contribute positively to the profit of
the attack (as opposed to free riding on the profits attributable to
other attacking validators). The attack in the example is not
stable, as the validator with stake 100 was not a profitable
addition to the attack that could have been carried out by the
validator with stake 1.






  
Necessity of overcollateralizing attack headers.
Even if we restrict our attention to stable attacks, simple
overcollateralization is insufficient to guarantee local security. To
appreciate the issue, consider the restaking network shown on the
right in <ref>. In this example, there are three
services, each with a profit from corruption of 1, and three
services each with stake 1. Each validator is used to secure two
different services. The service outlined in green is
overcollateralized in that its profit from corruption is 1, but two
units of stake stake are securing it. Despite this, if the unrelated
validator outlined in red disappears, the two validators outlined in
yellow can attack all three services for a profit of 3-2 > 0.
Furthermore, if all validators are required to attack each service
(i.e., α_s=1), then this attack is stable, as the inclusion
of both validators in the attack is profitable. Thus, despite being
overcollateralized, a stable attack can be launched on the service
highlighted in green even if stake unrelated to the service disappears
in a shock.

We find that to guarantee robust security for a coalition of services
C using only “local” information, it is necessary to
overcollateralize not only pairs (A,B) where B is a set of
validators capable of attacking all services in A, but a more
general collection of pairs that we call attack
  headers. Informally, this amounts to requiring that there is some
“buffer” in stake for any potential attack on some services in C
even if we were to allow every validator that is also securing a
service outside of C to join the attack without considering their
profitability. Our main result here (<ref>) formally
provides a local condition guaranteeing that, whenever an initial
shock knocks out at most a ψ fraction of the stake that provides
security exclusively to C, the worst-case loss of such stake, after
an arbitrary sequence of stable attacks, is at most a
(1+1γ)ψ fraction. We show that our bounds are
tight and indeed require overcollateralization of all attack headers
(<ref>, <ref>, and
<ref>), and again provide easily computable
sufficient (and similarly tight) conditions that can proxy for the
overcollateralization condition (<ref>).  Our local condition
generalizes the global overcollateralization condition, with the latter
corresponding to the special case of the former in which C=S.




 §.§ Our Results: Cascading Attacks


An attack on a restaking network results in a loss of stake (of the
attacking validators), and this may introduce new opportunities for
other sets of validators to carry out profitable attacks. That is, an
initial shock may set off an entire cascade of attacks. (All of
the bounds on stake loss described in Sections <ref>
and <ref> hold for cascades of attacks of arbitrary length.)
Our final result concerns the maximum-possible length of such a
cascade, and shows that this quantity is also governed in part by the
overcollateralization factor γ.

Precisely, we define the reference depth of a cascade of attacks
as a measure of the “long-range dependence” between different
attacks in an attack sequence. For example, if each attack in the
sequence is directly enabled by the loss of the validators slashed in
the previous attack, then the reference depth of the sequence
is 1. Our main result here (<ref>) bounds the
maximum-possible attack length as a function of the reference
depth k, the shock size ψ, the overcollateralization
factor γ, and the minimum stake ϵ held by a validator:
k ( 1 + log_1 + γ(ψ· [total
    stake]/ϵγ)).
For example, in the case of constant reference depth and equal
validator stake amounts, the worst-case attack length is logarithmic
in the number of validators with overcollateralization and linear
without it.



 §.§ Related Work


Our focus on the risks of cascading failures following a small shock
echoes some of themes in the literature on systemic risk in financial
networks. For example, Eisenberg and Noe <cit.>
that study the existence and structure of inter-firm payments in a
financial network following a default.  This work is extended by
Glasserman and Young <cit.>, who study how
“connectedness,” meaning the fraction of liabilities that a firm
externally owes, affects contagion risk.  Acemoglu et
al. <cit.> build further on this work and study
network “stability,” meaning the propensity for shocks to propagate;
they show that connectivity initially improves stability, but then at
a phase transition, denser connectivity leads to increased shock
propagation.  In a subsequent paper, Acemoglu et
al. <cit.> unify a number of the preceding
results. 

A separate line of work, beginning with Chen et
al. <cit.>, aims to axiomatically characterize
systemic risk measures.  The model in <cit.> can
capture, in particular, a contagion model characterized by a matrix of
profits and losses over different firms and outcomes. The results
in <cit.> characterize the global measures of risk
(operating on the matrix) that satisfies certain sets of desirable
axioms.  This is work is expanded upon in Kromer et
al. <cit.>, where the authors consider general
outcome measure spaces, as well as in Feinstein et
al. <cit.>, where the authors consider
set-valued risk measures.  Battison et al.<cit.>
study systemic risk measurement when a regulator has limited
information about contracts made between financial network
participants (e.g., the fraction of the face value that can likely be
recovered if a counterparty defaults), and show how small errors in
knowledge can lead to large errors in systemic risk measurement.

Our work also shares some conceptual similarity with the well-known
work of Diamond and Dybvig <cit.> on bank runs and
of Brunnermeier et al. <cit.> on the risks of re-hypothecation.

The model in the present work differs substantially from those
considered in the aforementioned papers, in large part because of the
idiosyncrasies of restaking networks, including their combinatorial
and bipartite nature and their susceptibility to economically
motivated attacks.

Restaking has also, to a limited extent, been studied in its own
right. The EigenLayer team introduces restaking in <cit.>. The
framing of an economically motivated attacker that trades off stake
loss with profits from corruption appears in <cit.>, and is used
also by Deb et al. <cit.>.  Chitra and
Neuder <cit.> discuss restaking risk from a validator
perspective, comparing restaking with investments in other financial
instruments (e.g. bonds).  Alexander <cit.>
considers the interplay between existing leveraging schemes and liquid
restaking tokens, which can amplify large-scale credit risk.



§ MODEL




  
Validators and Services. We consider a setting in which there is a set V of validators and a set S of services. Each service s ∈ S has some profit from corruption π_s, and each validator v ∈ V has some stake σ_v. We also associate with each service s a parameter α_s that denotes the fraction of stake required to corrupt/launch an attack on s. We call a bipartite graph G = (S, V, E, π, σ, α) a restaking graph; an edge is drawn between a validator v ∈ V and a service s ∈ S if v is restaking for s. For a given set of vertices A in a graph G, we use the notation N_G(A) to denote the neighbors of A. 



  
Attack Dynamics. For simplicity, we assume that validators lose their full stake σ_v if they launch an attack on a service. As such, for a given collection of services A ⊆ S, and a given collection of validators B ⊆ V restaking for those services, we say that (A, B) is an attacking coalition for a restaking graph G if the validators in B possess enough stake to corrupt the services A:

    ∑_v ∈ B ∩ N_G(s)σ_v_Total stake in s owned by validators B≥α_s ·∑_v ∈ N_G(s)σ_v_Total amount restaked in s      ∀ s ∈ A

We further say that (A, B) is a valid attack if it is an attacking coalition that has an incentive to launch an attack:

    ∑_s ∈ Aπ_s_Total profit from corrupting A > ∑_v ∈ Bσ_v_Total stake owned by validators B

If a valid attack (A, B) is carried out, we denote by G ↘ B the induced subgraph G⟨S, V ∖ B|. The graph G ↘ B denotes the state of the restaking graph after the attack is carried out. If no valid attacks exist on the graph, we call it secure. To simplify notation, for any subset of validators B ⊆ V, we will use the shorthand σ_B to denote ∑_v ∈ Bσ_v. Similarly, for any A ⊆ S, we will use π_A as shorthand for ∑_s ∈ Aπ_s.



  
EigenLayer sufficient conditions. We note in passing that, in their whitepaper <cit.>, EigenLayer proposes some efficiently verifiable sufficient conditions for security that they check to ensure that an attack does not exist.
[EigenLayer Sufficient Conditions, from Appendix B.1 of the EigenLayer Whitepaper <cit.>]
A restaking graph G is secure if for each validator v ∈ V,

    ∑_s ∈ N_Gvσ_v /σ_N_Gs·π_s/α_s≤σ_v



It is shown in Appendix B.1 of the whitepaper that if <ref> holds for G, then the graph is secure (i.e. no valid attacks (A,B) satisfying <ref> exist).




  
Cascading attacks. Our goal is to understand when a small shock can result in the loss of a large fraction of the overall stake. Small shocks can turn into large shocks by means of a cascading attack. Formally, we say that a disjoint sequence (A_1, B_1), …, (A_T, B_T) ∈ 2^S × 2^V is a valid cascade of attacks on a restaking graph G = (S, V, E, π, σ, α) if for each t ∈ [T], (A_t, B_t) is a valid attack on G ↘⋃_i = 1^t-1  B_i. We denote by C(G) the set of all such sequences of valid cascading attacks. 



  
Worst-case stake loss. We now define a metric that measures the total potential loss of stake due to a sequence of cascading attacks. In our model, we first suppose that an initial small shock decreases the amount of stake. Formally, we define, for a given restaking graph G = (S, V, E, π, σ, α),


    𝔻_ψ(G) := D ⊆ V |σ_D/σ_V≤ψ

to be the set of validator coalitions that constitute at most a ψ-fraction of all stake. Given some D ∈𝔻_ψ(G), we use the notation G ↘ D := G⟨S, V ∖ D| to denote the induced subgraph of the restaking graph when we delete the validators D.

We now define 

    R_ψ(G) := ψ_Initial shock + max_D ∈𝔻_ψ(G)max_(A_1, B_1), …, (A_T, B_T) ∈ C(G↘ D)σ_⋃_t = 1^T B_t/σ_V_Stake lost from cascading attacks


This quantity represents the worst-case total fraction of stake lost due to an initial ψ-fraction of the stake disappearing. By construction, ψ≤ R_ψ(G) ≤ 1.



§ OVERCOLLATERALIZATION PROVIDES ROBUST SECURITY


In this section, we show that “scaling up” the definition of security automatically results in robust security, meaning bounded losses from cascading attacks that follow an initial shock. We first show that, without loss of generality, it suffices to consider single valid attacks (A, B) ∈ C(G↘ D) instead of more general cascading attacks.


    Let G = (S, V, E, π, σ, α) be an arbitrary restaking graph, and further suppose that (A, B) is an attacking coalition on G ↘ D, where D ⊆ V. Then, (A, B ∪ D) is an attacking coalition on G. 


    Because (A, B) is an attacking coalition on G ↘ D, we must have by <ref> that
    
    σ_B ∩ N_Gs≥α_s ·σ_N_G s∖ D      ∀ s ∈ A

    It follows that for any s ∈ A,
    
    σ_B ∪ D∩ N_Gs   = σ_B ∩ N_Gs + σ_D ∩ N_Gs
       ≥α_s ·σ_ N_Gs∖ D  + σ_D ∩ N_Gs
       ≥α_s ·σ_N_Gs

and the desired result follows.


Let G = (S, V, E, π, σ, α) be an arbitrary restaking graph, and further suppose that (A_1, B_1), …, (A_T, B_T) ∈ C(G) is a valid sequence of cascading attacks on G. Then, ⋃_t = 1^T A_t, ⋃_t = 1^T B_t is also a valid attack on G. 


    By repeatedly applying Lemma <ref>, we find that for each t ∈ [T], A_t, ⋃_i = 1^t B_t is an attacking coalition on G. It follows by inspection of <ref> that we must therefore have that ⋃_t A_t, ⋃_t B_t is an attacking coalition on G. To finish the result, it suffices to show that <ref> holds for this attacking coalition on the original graph G. This follows from the disjointness of the A_t's and of the B_t's:
    
    π_⋃_t A_t = ∑_t = 1π_A_t > ∑_t = 1^T σ_B_t  =  σ_⋃_t B_t

    where in the inner inequality we use that for each t ∈ [T], π_A_t > σ_B_t by <ref>, as (A_t, B_t) is a valid attack on G ↘⋃_i=1^t-1 B_i. It follows that ⋃_t A_t, ⋃_t B_t is a valid attack on G.




  
Adding Multiplicative Slack. Our condition is given by adding multiplicative slack to <ref>. Formally, we say that a restaking graph G is secure with γ-slack if for all attacking coalitions (A, B) on G,

    (1 + γ) π_A_Total profit from corrupting A≤σ_B_Total stake owned by validators B





    Suppose that a restaking graph G = (S, V, E, π, σ, α) is secure with γ-slack for some γ > 0. Then, for any ψ > 0, R_ψ(G) < 1 + 1/γψ.



Take any ψ > 0 and any D ∈𝔻_ψ(G) for some restaking graph G where (<ref>) holds. Let (A_1, B_1) …, (A_T, B_T) ∈ C(G↘ D) be arbitrary. Applying <ref>, we must have that (⋃_t A_t, ⋃_t B_t) ∈ C(G↘ D) as well. Defining A := ⋃_t A_t and B := ⋃_t B_t, we must therefore have that (A, B) is an attacking coalition on G ↘ D, and furthermore that

    π_A    > σ_B

 By <ref>, we must also have that (A, B ∪ D) is an attacking coalition on the original graph G. It then follows that as G is secure with γ-slack, <ref> must hold on (A, B ∪ D), whence

    (1 + γ)  π_A ≤σ_B ∪ D = σ_B + σ_D

Putting this together with <ref>, we find that

    (1 + γ) σ_B < (1 + γ) π_A ≤σ_B + σ_D  ≤σ_B + ψ·σ_V

It follows that 

    γ·σ_B < ψ·σ_V    σ_B /σ_V <  ψ/γ
       ψ +  σ_B /σ_V < 1 + 1/γψ

As we took A_1, …, A_T to be arbitrary, we find that R_ψ(G) < 1 + 1/γψ, as desired.


The EigenLayer sufficient conditions (<ref>) can be similarly “scaled up” to yield efficiently checkable sufficient conditions for security with γ-slack (and hence, by <ref>, robustness to cascading attacks).

Let G be a restaking graph such that, for all validators v ∈ V,
    
    ∑_s ∈ N_G(v)σ_v /σ_N_Gs·(1 + γ) π_s/α_s≤σ_v

Then, R_ψ(G) < 1 + 1/γψ.


    This follows from <ref> and <ref>. Noting that the γ-slack condition holds precisely iff no valid attacks exist when profits from corruption π_s are inflated by a multiplicative factor of (1+γ), it suffices to apply EigenLayer's sufficient conditions from <ref> with modified profits from corruption (1+γ)π_s.

Note that, given a restaking network, it is straightforward to compute the minimum value of γ such that the condition in (<ref>) holds. 
This value can then be interpreted as an easily computed “risk measure” of such a network.



§ LOWER BOUNDS FOR GLOBAL SECURITY


In this section, we show that the upper bounds from the previous section are tight. We first show that if there is no multiplicative slack (i.e. γ = 0), then very small shocks can cause all stake to be lost in the worst case. This holds even under the EigenLayer conditions (<ref>)[The graph exhibited in the proof of <ref> has π_x/σ_a →∞ as ϵ→ 0. It is possible to construct a counterexample with similar properties while maintaining that π_s/σ_v is greater than some universal constant for any s ∈ S and v ∈ V. This is done in <ref>.].

    For any 0 < ϵ < 1, there exists a restaking graph G that is secure and meets the EigenLayer condition (<ref>), but has R_ψ(G) = 1 for all ψ≥ϵ. 


    We construct a restaking graph G = (S, V, E, π, σ, α) with one service S = x and two validators V = a,b, where an edge exists between each validator and the service (i.e. E := (x, a), (x, b)). We then let σ_a := ϵ, σ_b := 1 - ϵ, π_x := 1, and α_x := 1. Without loss of generality, we may assume ψ < 1 as R_1(G) = 1 for any restaking graph G. This graph satisfies (<ref>) as 
    
    σ_a/σ_a + σ_b·π_x/α_x = σ_a
    σ_b/σ_a + σ_b·π_x/α_x = σ_b

    whence the graph is also secure by <ref>. We now consider an initial shock D = a. As σ_a/σ_V = ϵ≤ψ, it follows that D ∈ D_ψ(G). The pair (x, b) is a valid attack on G ↘ D, since b = N_G ↘ Dx whence it is an attacking coalition, and σ_b < π_x. It follows that R_ψ(G) ≥σ_a + σ_b/σ_V = 1 as desired.


Next, we show that the bound we give in <ref> (indeed, more strongly, the condition given in <ref>) is tight for all ψ, γ > 0. 


    For any ψ, γ, ϵ > 0 such that
    
    0 ≤1 + 1/γψ - ϵ≤ 1,

    there exists a restaking graph G that satisfies the condition (<ref>) from <ref> but has R_ψ(G) ≥1 + 1/γψ - ϵ.


    We construct a restaking graph G = (S, V, E, π, σ, α) with three validators V = a, b, c and one service S = x, where an edge exists between each of the validators a and b and the service x (i.e. the edge set E := (x,a), (x,b)). Without loss of generality, suppose that ϵ≤ψ/γ. Let σ_a > 0 be any positive constant. We define
    
    σ_b    := σ_a 1/γ- ϵ/ψ
    σ_c    := σ_a1 - ψ + ϵ/ψ - 1/γ
    π_x    := 1 + 1/γψ - ϵ/1 + γ·σ_V
    α_s    := 1

    Notice first that σ_b ≥ 0 as we have taken ϵ≤ψ/γ. Next, observe that
    
    σ_c ≥ 0    1 - ψ + ϵ/ψ≥1/γ
        1 ≥1 + 1/γψ - ϵ

    whence σ_c ≥ 0 by <ref>. Finally, we must also have that π_x ≥ 0 by <ref> as well. Next, notice by construction that
    
    σ_V    = σ_a + σ_b + σ_c = σ_a1 + 1/γ- ϵ/ψ+ 1 - ψ + ϵ/ψ - 1/γ = σ_a/ψ

    This graph meets condition (<ref>) from <ref>, as 
    
    ∑_s ∈ N_Gaσ_a/σ_N_Gs (1 + γ)π_s    = σ_a/σ_a + σ_b⟨1 + 1/γψ - ϵ|σ_V
       = σ_a/σ_a1 + 1/γ- ϵ/ψ⟨1 + 1/γψ - ϵ|σ_a/ψ
       = σ_a

    A similar argument shows that 
    
    ∑_s ∈ N_Gbσ_b/σ_N_Gs (1 + γ)π_s = σ_b/σ_a⟨1 + 1/γψ - ϵ|⟨1 + 1/γψ - ϵ|σ_a = σ_b

    Finally, as the validator c has no neighbors, it also satisfies the condition, whence the graph indeed satisfies (<ref>). We now consider an initial shock D := a to the graph. Because
    
    σ_a/σ_V = σ_a/σ_a/ψ = ψ,

    the shock D ∈𝔻_ψ constitutes a ψ fraction of the total stake as desired. The attack (x, b) is a valid attack on G ↘ D. To see this, notice first that (x, b) is an attacking coalition on G ↘ D as b = N_G ↘ Dx. Furthermore, b is incentivized to attack since
    
    π_x - σ_b    = 1 + 1/γψ - ϵ/1 + γ·σ_V - σ_b
       = ⟨1 + 1/γ- ϵ/ψ/1 + γ - 1/γ- ϵ/ψ|σ_a
       = ⟨1 + 1/γψ + γϵ/(1 + γ) ψ - 1/γ|σ_a
       = γϵσ_a/(1 + γ) ψ > 0

    whence <ref> is satisfied for the pair (x, b). It follows that
    
    R_ψ(G) ≥σ_a + σ_b/σ_V = 1 + 1/γ- ϵ/ψσ_a/σ_a/ψ = 1 + 1/γψ - ϵ

    as desired.




§ LOCAL SECURITY



The bound in <ref> on the worst-possible stake loss from cascading attacks is reassuring from a global perspective, but less so from the perspective of one or a small number of services who would like an assurance that they will not be among those affected by such attacks. 
Beginning with this section, 
we focus on a specific coalition of services C ⊆ S that seeks to insulate their shared security Γ(C) against shocks and resulting cascading attacks that may come about due to the decisions of other services and validators. Formally, we denote by 

    Γ(C) := v ∈ V | N_Gv⊆ C

the set of validators that exclusively provide security for services in C. 



  
Worst-case stake loss (local version).
As before, we first suppose that an initial shock affects the restaking graph. Whereas previously, we considered shocks for which the total stake in the shock was bounded, we now consider shocks for which the total stake that impacts the exclusive security of some coalition of services C (i.e., stake that secures services from C and only services from C) is bounded. Formally, for any coalition of services C ⊆ S within some restaking graph G, we let


    𝔻_ψ(C, G) := D ⊆ V |σ_D ∩Γ(C)/σ_Γ(C)≤ψ

denote the set of all validator coalitions that provide at most ψ stake to the aggregate security of the coalition of services C. Notice that shocks D ∈𝔻_ψ(C, G) may have much more total stake σ_D than a ψ fraction of the graph. We are instead only guaranteed that the impact of the shock on stake that is being used exclusively for members in C is small. We are now interested in the potential cascading losses that can affect the stake that is exclusively utilized by the coalition C after a shock occurs that destroys at most ψ stake from the aggregate security of C. Formally, we study the quantity


    R_ψ(C, G) := ψ_Initial Shock + max_D ∈𝔻_ψ(C, G)max_(A_1, B_1), …, (A_T, B_T) ∈ C(G ↘ D)σ_⋃_t = 1^T B_t ∩Γ(C)/σ_Γ(C)_Stake lost from cascading attacks




  
Local security conditions. We seek sufficient conditions on a restaking graph G that guarantee a nontrivial upper bound on R_ψ(C, G). 
Ideally, the sufficient condition

would depend only the neighborhood/choices of the coalition C


to provide a guarantee that holds regardless of the choices made by other validators and services (i.e., the services of C can attempt to “control their own destiny” by ensuring that the locally defined sufficient condition holds). Formally, given a restaking graph G = (S, V, E, π, σ, α) and a coalition of services C ⊆ S, we call a restaking graph G' = (S', V', E', π', σ', α') a C-local variant of G if C cannot distinguish G' from G on the basis of local information: C ⊆ S', N_GC = N_G'C, and

    (π_s, α_s)    = (π'_s, α'_s)       ∀ s ∈ C
    σ_v, N_Gv   = σ'_v, N_G'v      ∀ v ∈ N_GC

We then define a local security condition f: (C, G) ↦0,1 to be a Boolean function that takes as input a restaking graph G and a coalition of services C ⊆ S such that f(C, G) must be equal to f(C, G') for all C-local variants G'. The intuition behind this definition is that the condition should only depend on service-level information (e.g. profits from corruption, security thresholds) for services in the coalition, and validator-level information for validators in N_GC. 



  
Local security impossibility. Unfortunately, without further restrictions on the attacks under consideration (like those defined later in this section), it is impossible to construct any nontrivial local security condition that yields any nontrivial upper bound on R_ψ(C, G).


    For any local security condition f, any secure restaking graph G and coalition of services C ⊆ S such that f(C, G) = 1, there exists a secure C-local variant G' of G such that R_0(C, G') = 1. 



    Take any f, C, and secure G such that f(C, G) = 1. Define 
    
    Δ := σ_N_GC - π_C

    to be the total overcollateralization of C in aggregate. Next, we define G' to be an augmented version of G, where we add a new service s^* that has a profit from corruption π_s^* = Δ + 2ϵ where ϵ > 0. We further add 2 validators a and b to the graph who are adjacent only to s^*. We let σ_a := Δ + ϵ and σ_b := ϵ. As σ_a + σ_b ≥π_s^*, the graph G' must be secure as G was secure. Next, notice that as the validator a is not path-connected to C, G' must be a C-local variant of G. However, by construction, the attack C ∪s^*, N_GC ∪b is valid on the graph G' ↘a. It follows that R_0(C, G') = 1.




  
Stable attacks. While the above impossibility appears to be quite strong, it is somewhat contrived. At the heart of the impossibility is that under the definition of a valid attack (i.e. <ref>), not every validator must be productive in carrying out the attack. There may be a subset of validators in the attack that can yield more net profit than the full coalition. In what follows, we show that if we assume that malicious validator coalitions will choose to add others to their ranks only if it is profitable for them in net to do so, then a local security condition with guarantees similar to those in <ref> does indeed exist. Formally, for A ⊆ S and B ⊆ V, we say that an attack (A, B) is stable if it is valid (i.e. <ref> hold), and for all A' ⊆ A and B' ⊆ B such that (A', B') is valid, 

    σ_B ∖ B' < π_A ∖ A'

Intuitively, if (<ref>) did not hold, then the validators of B' would be better off ditching those in B ∖ B' and attacking only the services in A'.

We say that a disjoint sequence (A_1, B_1), …, (A_T, B_T) ∈ 2^S × 2^V is a cascade of stable attacks on a restaking graph G = (S, V, E, π, σ, α)  if for each t ∈ [T], (A_t, B_t) is a stable attack on G ↘⋃_i = 1^t-1 B_i. We denote by S(G) the set of all such sequences of cascading stable attacks. In light of Theorem <ref>, we redefine our notion of worst-case stake loss using stable attacks:

    R_ψ(C, G) := ψ + max_D ∈𝔻_ψ(C, G)max_(A_1, B_1), …, (A_T, B_T) ∈ S(G ↘ D)σ_⋃_t B_t ∩Γ(C)/σ_Γ(C)

Unlike valid attacks, unions of sequences of stable cascading attacks need not be stable (which will complicate the proof of <ref> in the next section).


    There exists a restaking graph G and a sequence (A_1, B_1), (A_2, B_2) ∈ S(G) such that A_1 ∪ A_2, B_1 ∪ B_2∉ S(G).



        Consider restaking graph where there are two services S = x, y and two validators V = a,b where both validators are restaking in both services. Furthermore, π_x = π_y = 2, α_x = α_y = 1/2, and σ_a = σ_b = 1. In this case, the sequence x, a, y, b∈ S(G). However, x, y, a, b∉ S(G) because the attack x, y, a is a valid attack.




§ A LOCAL SECURITY CONDITION FOR STABLE ATTACKS


In this section, we give a family of local security conditions that yield guarantees on the local worst-case stake loss R_ψ(C, G) that resemble our result from Theorem <ref> for global security. In Theorems <ref> and <ref>, we showed that security with γ-slack was necessary and sufficient in order to obtain a 1 + 1/γψ upper-bound on R_ψ(G). In other words, it was both necessary and sufficient to ensure that all attacking coalitions (A, B) were overcollateralized multiplicatively by a factor of (1 + γ). Our condition for local security is similar: we must ensure that certain attack headers (X, Y) are overcollateralized multiplicatively by a factor of (1 + γ).



  
Attack header. Formally, we say that (X, Y) is an attack header, for X ⊆ S and Y ⊆Γ(X), if there exists a set of validators B ⊆ V satisfying

    B ∩Γ(X) = ∅

such that (X, B ∪ Y) is an attacking coalition. In other words, (X, Y) is an attack header if Y can be appended to a collection of validators B that may be slashed without attacking services in X to form an attacking coalition that attacks the services X. An attacking coalition is a special case of an attack header (in which B can be taken as ∅).


    Let G = (S, V, E, π, σ, α) be a restaking graph and C ⊆ S be a coalition of services. If, for all attack headers (X, Y) where X ⊆ C, 
    
    (1 + γ) π_X ≤σ_Y

    then R_ψ(C, G) < (1+1/γ)ψ. Furthermore, the Boolean function that checks whether <ref> holds for all attack headers is a local security condition.



    Let D ∈𝔻_ψ(C, G) and (A_1, B_1), …, (A_T, B_T) ∈ S(G ↘ D) be arbitrary. For each t ∈ [T], define
    
    L_t := B_t ∩Γ(C)

    to be the set of all validators exclusively securing C that were lost in the tth attack. Next, define
    
    A'_t := s ∈ A_t |σ_B_t ∖ L_t≥α_s ·σ_N_G s∖⋃_i = 1^t - 1 B_i ∪ D

    to be the maximal set of services such that (A'_t, B_t ∖ L_t) is an attacking coalition on G ↘⋃_i = 1^t-1 B_i ∪ D. Notice also that because (A_t, B_t) is a stable attack on G ↘⋃_i = 1^t-1 B_i ∪ D, we must have that A_t ∖ A'_t is nonempty, and furthermore must be a subset of C. 
    
     
        
    σ_⋃_t B_t ∩Γ(C) < π_⋃_t A_t ∖ A'_t

    
    
    From stability, we have that
    
    σ_L_t = σ_B_t ∖B_t ∖ L_t  < π_A_t ∖ A'_t

    To see why this holds, notice that there are two cases. If the attacking coalition (A'_t, B_t ∖ L_t) is a valid attack, then the inequality follows directly from the stability definition. If instead (A'_t, B_t ∖ L_t) is not a valid attack despite being an attacking coalition, the inequality must still hold because the original attack (A_t,B_t) is valid and therefore satisfies <ref>. Iterating over t, we find that
    
    σ_⋃_t B_t ∩Γ(C)  = ∑_t = 1^T σ_L_t < ∑_t = 1^T π_A_t ∖ A'_t = π_⋃_t A_t ∖ A'_t

    

     
        ⋃_t A_t ∖ A'_t, ⋃_t B_t ∪ D∩Γ(C) is an attack header on G, and ⋃_t A_t ∖ A'_t⊆ C.
    
    
    Because each A_t ∖ A'_t ⊆ C, we must also have that ⋃_t A_t ∖ A'_t ⊆ C as well. Next, by applying <ref> noting the disjointness of the (A_t, B_t), we have that
    
    ⋃_t A_t, ⋃_t B_t = ⋃_t A_t ∖ A'_t∪⋃_t A'_t,   ⋃_t B_t

    must be an attacking coalition on G ↘ D. In particular, we must have that ⋃_t A_t ∖ A'_t, ⋃_t B_t
    is an attacking coalition on G ↘ D, whence by Lemma <ref> we have that ⋃_t A_t ∖ A'_t, ⋃_t B_t ∪ D
    is an attacking coalition on G. Rewriting the above as 
    
    ⋃_t A_t ∖ A'_t,   ⟨⋃_t B_t ∪ D∩Γ(C)|∪⟨⋃_t B_t ∪ D∖Γ(C)|

    and noting by construction that
    
    ⟨⋃_t B_t ∪ D∖Γ(C)|∩Γ(C) = ∅,

    we find that ⋃_t A_t ∖ A'_t, ⋃_t B_t ∪ D∩Γ(C) is an attack header on G as desired.
    
    Putting these claims together yields the desired result. By Claim <ref> and <ref>, we find that
    
    (1+γ) π_⋃_t A_t ∖ A'_t≤σ_⋃_t B_t ∪ D∩Γ(C)≤σ_⋃_t B_t ∩Γ(C) + ψ·σ_Γ(C)

    Adding in Claim <ref>, we find that
    
    (1+γ)σ_⋃_t B_t ∩Γ(C)   < σ_⋃_t B_t ∩Γ(C) + ψ·σ_Γ(C)
       σ_⋃_t B_t ∩Γ(C)/σ_Γ(C) < ψ/γ
        R_ψ(C, G) < 1 + 1/γψ

    as desired. To see that the Boolean function that checks whether <ref> holds for all attack headers is a local security condition, observe that it suffices to check that for all X ⊆ C and Y ⊆ N_GC ∩Γ(C) = Γ(C) such that X, Y ∪ N_GC ∖Γ(C) is an attacking coalition, <ref> holds. Thus, for any restaking graph G and C-local variant G', this function will evaluate to the same output.


The condition in (<ref>) can be checked via enumeration, although the time required to do so grows exponentially in the number of services in C and the number of validators that contribute security exclusively to services in C. 
In the event that this is a prohibitive amount of computation,
the same guarantee holds under a stronger, easily checked local analog of the EigenLayer sufficient condition (<ref>) which, in effect, treats as malicious all validators that contribute security to any services outside of C.


    For any restaking graph G = (S,V,E,π,σ,α) and coalition of services C ⊆ S, satisfaction of the local condition
    
    ∑_s ∈ N_Gvσ_v/σ_N_Gs·(1 + γ) π_s/α'_s≤σ_v

    for all v ∈ N_GC with N_Gv⊆ C guarantees that R_ψ(C, G) < 1 + 1/γψ, where for each s ∈ C,
    
    α'_s := α_s - σ_N_Gs∖Γ(C)/σ_N_Gs



    This follows from <ref> and <ref>. Notice that to guarantee that the condition (<ref>) from <ref> holds for all attack headers (X,Y), it suffices to guarantee that no valid attacks exist, when (i) all profits from corruption for services in C are inflated by a multiplicative factor of (1+γ), and (ii) the fraction of stake required to corrupt a given service is offset by the fraction of stake in that service that is also restaking for services that do not belong to C. As <ref> provides a sufficient condition to guarantee the existence of no valid attacks, <ref> will guarantee that all attack headers are overcollateralized by a multiplicative factor of (1 + γ).




§ LOWER BOUNDS FOR LOCAL SECURITY


We next show senses in which <ref> (and more strongly, <ref>) is tight.


For any ψ, γ, ϵ > 0 such that
    
    0 ≤1 + 1/γψ - ϵ≤ 1,

    there exists a restaking graph G that satisfies the condition (<ref>) from <ref> but has R_ψ(C, G) ≥1 + 1/γψ - ϵ.


    Notice that if we take C = S, the condition (<ref>) from <ref> is identical to the condition (<ref>) from <ref>. Furthermore, R_ψ(S, G) is the same as R_ψ(G) except for the fact that R_ψ(S, G) considers only stable attacks. Repeating the argument from <ref>, and noting that the attack given in the proof of that result is stable, we obtain the desired result. 



    For any γ > 0, there exists a graph restaking graph G = (S, V, E, π, σ, α) that satisfies (<ref>) from <ref>, but there exists a C ⊆ S such that R_0(C, G) = 1.


    Let there be three services S = x, y , z, three validators V = a, b, c, and edges as follows:
    
    E := (x, a), (x, b), (y, b), (y, c), (z, c), (z, a).

    Next, let α_s = 1 for all s ∈ S, and let π_x = π_y = π_z =: π > 0 be an arbitrary positive constant. Next pick σ_a such that
    
    σ_a < 2π,

    let σ_b := 2(1 + γ)π, and let σ_c := 2(1 + γ)π. This graph satisfies (<ref>) from <ref> as
    
    σ_a/σ_a + σ_b· (1+γ) π + σ_a/σ_a + σ_c· (1 + γ) π < (1 + γ)π1/σ_b + 1/σ_cσ_a = σ_a
    σ_b/σ_a + σ_b· (1+γ) π + σ_b/σ_b + σ_c· (1 + γ) π < 3/2 (1 + γ)π < σ_b
    σ_c/σ_a + σ_c· (1+γ) π + σ_c/σ_b + σ_c· (1 + γ) π < 3/2 (1 + γ)π < σ_c

    Next, let C := x, z, and observe that the shock D = b, c is an element of 𝔻_0(C, G). However, because σ_a < π_x + π_z = 2π, we must have that (x, z, a) is a stable attack on G ↘ D. As a = Γ(C), it follows that R_0(C, G) = 1.




§ LONG CASCADES




  
Cascade Structure. Although <ref> shows that all long cascades can be made into a short, one-step attack, it is arguably more dangerous if large attacks can be made through long cascades of small attacks that each require less coordination. In this section, we show how adding γ-slack also enables us to upper-bound the length of a cascade in the worst case. Our results depend on what we call the reference depth of a cascading sequence of attacks. Formally, for a given restaking graph G and coalition of validators B_0, we say that a valid cascade of attacks (A_1, B_1), …, (A_T, B_T) on C(G↘B_0) has reference depth k if


    k = maxi ∈ [T] |∃  t ∈ [T]  s.t.  N_G(A_t) ∩ B_t - i∅


In other words, a cascading sequence has reference depth k if the services attacked in a given time step are not affected by validators that were slashed more than k steps previous. 

 
    Suppose that a restaking graph G = (S, V, E, π, σ, α) is secure with γ-slack for some γ > 0. Let ϵ = min_v ∈ Vσ_v denote the minimum stake held by a validator. Then, for any ψ > 0, B_0 ∈𝔻_ψ(G), and (A_1, B_1), …, (A_T, B_T) ∈ C(G ↘B_0) with reference depth k, 
    
    T < k1 + log_1 + γψ·σ_V/ϵγ




    Because (A_1, B_1), …, (A_T, B_T) ∈ C(G ↘B_0) has reference depth k, it follows that if we define
    
    A'_i    := ⋃_t = k(i-1) + 1^ki A_t
    
            B'_i    := ⋃_t = k(i-1) + 1^ki B_t
    
            B'_0    := B_0

    for i ∈1, …, T/k, we must have that for all j < i - 1,
    
    N_GA'_i ∩ B'_j = ∅

    Furthermore, by <ref>, we must have that the sequence (A'_i, B'_i) ∈ C(G↘ B_0). Applying <ref> again, we further have that for every i, ⋃_j = i + 1^T/k A'_i, ⋃_j = i + 1^T/k B'_i is a valid attack on G ↘⋃_j = 0^i B'_i. It follows by <ref> that for any i ∈0, …,T/k - 1,
    
    π_⋃_j = i + 1^T/k A'_j > σ_⋃_j = i + 1^T/k B'_j = ∑_j = i + 1^T/kσ_B'_j

    Next, noting that 
    
    N_G ⋃_j = i+1^T/k A_i' ∩⋃_j = 1^i - 1 B_i' = ∅

    by <ref>, it follows that indeed ⋃_j = i + 1^T/k A'_i, ⋃_j = i + 1^T/k B'_i is also a valid attack on G ↘ B_i'. Applying <ref>, we then find that ⋃_j = i + 1^T/k A'_i, B'_i ∪⋃_j = i + 1^T/k B'_i is an attacking coalition on the original graph G. Because G is secure with γ-slack, <ref> must now hold on this pair, whence for all i ∈0, …, T/k - 1,
    
    (1+γ) π_⋃_j = i + 1^T/k A'_j≤σ_⋃_j = i^T/k B'_j = σ_B'_i + ∑_j = i+1^T/kσ_B'_j

    Putting this together with <ref>, we have that for all i ∈0, …, T/k - 1,
    
    (1 + γ) ∑_j = i+1^T/kσ_B'_j <  σ_B'_i + ∑_j = i+1^T/kσ_B'_j
       σ_B'_i  > γ∑_j = i+1^T/kσ_B'_j

    It can be shown inductively from <ref> that the sequence σ_B'_i > X_i, where we define the sequence X_i by
    
    X_T/k   := ϵ
    
            X_i    := γ∑_j = i+1^T/k X_j        i ∈0, …, T/k - 1

    Solving, we find that
    
    X_0 = ϵγ (1 + γ)^T/k - 1

    It then follows as desired that
    
    ψ·σ_V = σ_B_0 > ϵγ(1+γ)^T/k - 1 T < k1 + log_1 + γψ·σ_V/ϵγ





 §.§ Acknowledgments


We thank Tarun Chitra, Soubhik Deb, Sreeram Kannan, Mike Neuder, and
Mallesh Pai for comments on earlier drafts of this paper.  We thank
Soubhik and Sreeram in particular for emphasizing the importance of
local guarantees.

This research was supported in part by
NSF awards CCF-2006737 and CNS-2212745, and research awards from the
Briger Family Digital Finance Lab and the Center for Digital Finance
and Technologies.

plain






§ LOWER BOUNDS UNDER A BOUNDED PROFIT-STAKE RATIO


The example exhibited in <ref> requires that for the whole graph to be attacked due to an arbitrarily small shock R_ϵ(G) = 1, there is a service whose profit from corruption is arbitrarily larger than the stake of some validator (i.e. π_s/σ_v for a service s and validator v). In this section, we show that equally strong lower bounds for both global and local security exist even when all of the services are “small”, in the sense that an absolute constant bounds the ratio of the profit from corruption of any service and the stake of any validator. 


    For any 0 < ϵ < 1, there exists a secure restaking graph G = (S, V, E, π, σ, α) that meets the EigenLayer condition (<ref>),
    
    max_(s, v) ∈ S × Vπ_s/σ_v = 2,

    but there exist proper subsets C ⊂ S such that R_0(C, G) = 1. Furthermore, for any ψ≥ϵ, R_ψ(S, G) = 1.


    Pick any n such that 6 | n and 1/n < ϵ. We let V consist of n validators each with stake σ_v = 1. Letting N := n/6, we let S consist of 3N services each with π_s := 2 and α_s := 1. The graph thus satisfies <ref>. We now split S into two disjoint sets S_6 and S_3, where S_6 contains N of the services, and S_3 contains the remaining 2N services. We define the edges E as follows. First, we draw edges such that the neighborhoods N_Gs_s ∈ S_6 of services in S_6 evenly partition V into groups of 6. Next, we draw edges such that the neighborhoods N_Gs_s ∈ S_3 evenly partition V into groups of 3, and make the entire graph G a single connected component. An example of such a graph for n = 30 is shown in <ref>. The graph satisfies (<ref>) as each validator is adjacent to just one service from S_6 and one service from S_3, whence for any v ∈ V,
    
    ∑_s ∈ N_G vσ_v/σ_N_Gs·π_s/α_s = 1/6· 2 + 1/3· 2 = σ_v

    Thus, G is secure by <ref>.
    
        For all attacking coalitions (A, B) on G such that (A, B)  (S, V), σ_B ≥π_A + 1.
    
    
        To see this, notice first that as α_s = 1 for all s ∈ S, for any A ⊆ S, (A, N_GA) is the unique stake-minimal attacking coalition on G that attacks A. Writing A_3 := A ∩ S_3 and A_6 := A ∩ S_6, we must further have that
        
    σ_N_GA = 3A_3 + N_GA_6 ∖ N_GA_3

        and that
        
    π_A = 2A = 2A_3 + A_6

        It follows that
        
    σ_N_GA - π_A = A_3 - 2A_6 + N_GA_6 ∖ N_GA_3

        As all validators v have σ_v = 1, it suffices to show that σ_N_GA > π_A. Suppose for contradiction that σ_N_GA≤π_A. We must then have by <ref> that A_3≤ 2 A_6 else σ_N_GA > π_A. Furthermore, 2 A_6≤A_3 since N_GA_6 ∖ N_GA_3≥ 32A_6 - A_3. It follows that we must have A_3 = 2A_6 and N_GA_6 ∖ N_GA_3 = 0. However, if both of these conditions occurred simultaneously, then (A, N_GA) must be disconnected from the rest of the graph. As G forms a single connected component, and N_GA is a proper subset of V, it follows that σ_N_GA > π_A as desired.
    
    
    Next, pick any v ∈ V, and consider the initial shock D = v. Notice that for any C such that v ∉Γ(C), D ∈𝔻_0(C, G). Further, as ϵ > 1/n, D ∈𝔻_ψ(S, G) for any ψ≥ϵ. To finish the result, it suffices to show that (S, V ∖v) is a stable attack on G ↘ D. To see this, note that it is clearly an attacking coalition, and 
    
    π_S = n > n - 1 = σ_V ∖v

    whence it is a valid attack on G ↘ D. To see that it is a stable attack, it suffices to show that there is no A ⊆ S and proper B ⊂ V∖v such that (A, B) is a valid attack. It further suffices to consider proper A ⊂ S as V ∖v is unique a subset of validators B such that (S, B) is an attacking coalition on G ↘ D. The result now follows from <ref> as for any such attacking coalitions (A, B) on G ↘ D,
    
    σ_B ∪v≥π_A + 1 σ_B≥π_A

    whence (A, B) is not a valid attack on G ↘ D as desired. ]

 Paper Title: Simpler Optimal Sorting from a Directed Acyclic Graph.



 


[
    Ivor van der Hoog, Eva Rotenberg, Daniel Rutschmann.  
 Technical University of Denmark, DTU 
    
1Fusion@ÖAW, Institute for Theoretical Physics - Computational Physics, Graz University of Technology, 8010 Graz, Austria

2 Max-Planck-Institut für Plasmaphysik, 17489 Greifswald, Germany

3Institute of Plasma Physics, National Science Center “Kharkov Institute of Physics and Technology”, 61108 Kharkov, Ukraine

===============================================================================================================================================================================================================================================================================================================================

§ ABSTRACT 
    Fredman proposed in 1976 the following algorithmic problem: 
    Given are a ground set X, some partial order P over X, and some comparison oracle O_L that specifies a linear order L over X that extends P. A query to O_L has as input distinct x, x' ∈ X and outputs whether x <_L x' or vice versa. 
    If we denote by e(P) the number of linear orders that extend P, then it follows from basic information theory that log e(P) is a worst-case lower bound on the number of queries needed to output the sorted order of X. 

    Fredman did not specify in what form the partial order is given. 
    Haeupler, Hladík, Iacono, Rozhon, Tarjan, and Tětek ('24) propose to assume as input a directed acyclic graph, G, with m edges and n=|X| vertices. Denote by P_G the partial order induced by G.
    Their algorithmic performance is measured in running time and the number of queries used, where they use Θ(m + n +  log e(P_G)) time and Θ(log e(P_G)) queries to output X in its sorted order. 
    Their algorithm is worst-case optimal in terms of running time and queries, both. 
    Their algorithm combines topological sorting with heapsort, and uses sophisticated data structures (including a recent type of heap with a working-set bound).
    Their analysis relies upon sophisticated counting arguments using entropy, recursively defined sets defined over the run of their algorithm, and vertices in the graph that they identify as bottlenecks for sorting.  

    In this paper, we do away with sophistication. 
    We show that when the input is a directed acyclic graph then the problem admits a simple solution using Θ(m + n + log e(P_G)) time and Θ(log e(P_G)) queries. 
    Especially our proofs are much simpler as we avoid the usage of advanced charging arguments and data structures,
    and instead rely upon two brief observations. 




  
Funding.
Ivor van der Hoog received funding from the European Union's Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No 899987.
Daniel Rutschmann and Eva Rotenberg received funding from Carlsberg Foundation
Young Researcher Fellowship CF21-0302 “Graph Algorithms with Geometric Applications”.
Eva Rotenberg additionally receives funding from 
DFF Grant 2020-2023 (9131-00044B) “Dynamic Network Analysis”, and VILLUM Foundation
grant VIL37507 “Efficient Recomputations for Changeful Problems”.


§ INTRODUCTION

Sorting is a fundamental problem in computer science.

In 1976, Fredman introduced a natural generalisation of sorting, namely sorting under partial information <cit.>: 

Given a ground set X of size n, and some partial order P on X, and an oracle O_L with access to a ground-truth linear order L of X, the task is to minimise the number of oracle queries to recover the linear order of X. A query takes two input elements from X, and outputs their relation in the linear order. Algorithmic efficiency is measured in time, and the number of queries used. 
Let e(P) denote the number of linear orders that extend the partial order P. Then, for any binary (e.g. yes/no) query, 
⌈log_2(e(P))⌉ is a worst-case lower bound for the number of queries needed, simply because the sequence of answers should be able to lead to any possible extension of the order. 



  
Previous work.
Fredman <cit.> shows an exponential-time algorithm for sorting under partial information that uses log e(P) + O(n) queries.
This fails to match the Ω(log e(P)) lower bound
when log e(P) is sublinear. Kahn and Saks <cit.> prove
that there always exists a query which reduces the number of remaining linear extensions by a
constant fraction; showing that an O(log e(P))-query algorithm exists. 
 Kahn and Kim <cit.> are the first to also consider algorithmic running time.
 They note that Kahn and Saks <cit.> can preprocess a partial order using exponential time and space, so that given O_L it can output the sorted order of X in linear time plus O(log e(P)) queries.
Kahn and Kim <cit.> propose the first polynomial time algorithm that performs O(log e(P)) queries.
They do not separate preprocessing the partial order and oracle queries, and use an unspecified polynomial time using the ellipsoid method. 
Cardinal, Fiorini, Joret, Jungers and Munro <cit.> (in their full version) preprocess  P in O(n^2.5) time, to output the sorted X in O(log e(P) + n) time using O(log e(P)) queries. 
Their runtime poses the question whether query-optimal (sub)quadratic-time algorithms are possible. 

For subquadratic algorithms, it becomes relevant how one obtains the partial order. 
Van der Hoog, Kostityna, Löffler and Speckmann <cit.> study the problem in a restricted setting where P is induced by a set of intervals. Here, distinct x_i, x_j ∈ X are incomparable whenever their intervals ([a_i, b_i], [a_j, b_j]) intersect (otherwise, x_i ≺_P x_j whenever b_i < a_j). 
They preprocess the intervals in O(n log n) time such that, given O_L, they can produce a pointer to a linked list storing X in its sorted order using O(log e(P)) queries and time. For their queries, they use finger search <cit.> (or exponential search from a pointer). Finger search has as input a value x_i, a sorted list π, and a finger p ∈π with p < x_i. 
It finds the farthest q along π for which q < x_i in O(1+ log d_i) time and comparisons. Here, d_i denotes the length of the sublist from p to q <cit.>. 



Van der Hoog and Rutschmann <cit.> assume that P is given as another oracle O_P where queries receive distinct x, x' ∈ X and output whether x ≺_P x'.
For fixed c ≥ 1, they preprocess O_P using O(n^1 + 1/c) time and queries to O_P. Given O_L, they produce a pointer to a linked list storing X in its sorted order using O(c ·log e(P)) queries and time. 
Their query algorithm also makes use of finger search.
They show matching lower bounds in their setting. 

Haeupler, Hladík, Iacono, Rozhon, Tarjan, and Tětek <cit.> assume that the partial order P_G is induced by a graph G with m edges. Their algorithm can be seen as a combination of topological sort and heapsort. 
Their algorithm first isolates a collection B ⊂ X which they call bottlenecks. 
They then iteratively consider all sources S in G - B, remove the source s ∈ S that is minimum in the linear order L, and append s to the output a directed path π.
Before appending s to π, they find the maximum prefix B_s = { b ∈ B | b <_L s } using finger search where the finger is the head of B. They remove B_s from B, append B_s to π, and then append s. 
To obtain the minimum s ∈ S, they adapt the recently developed heap by Haeupler, Hladík, and Rozhoň, Tarjan and Tětek <cit.> which has a special working-set bound. For the formal definition, we refer to <cit.> but intuitively such heaps retrieve the minimum-value s from the heap in time logω(s) instead of log n where ω(s) can be thought of as the number of heap elements inserted after s. 
Their algorithm does not separate preprocessing and oracle queries and uses O(n + m + log e(P_G)) overall time and O(log e(P)) linear oracle queries.
Since reading the input takes at least O(n + m) time, their overall algorithmic runtime is thereby worst-case optimal. 
The bulk of their analysis is dedicated to charging the algorithmic runtime and query time to the working-set bound of their heap, and to handling the special bottleneck vertices. 



  
Contribution.
We consider the setting from <cit.>, where the input is a directed acyclic graph G over X with m edges and where, unlike <cit.>, one does not separate the algorithmic performance between a pre-processing phase using G and a phase that uses queries to O_L. 

We show that this problem formulation  
allows for a surprisingly simple solution:
Remove a maximum-length directed path π from G. 
Iteratively remove an arbitrary source x_i from G, inserting x_i into π using finger search where the finger p_i ∈π is the farthest in-neighbour of x_i in G along π (which we find by simply iterating over all in-neighbors of x_i).  
This algorithm relies upon no involved data structures, and instead only uses a finger search tree and lowest common ancestor queries. 
We use O(n + m + log e(P_G)) time and O(log e(P_G)) queries.
Our proof of correctness is considerably simpler, as it relies upon only one counting argument and one geometric observation. 




§ ALGORITHM



The input is a directed acyclic graph G with vertex set X = (x_1, …, x_n). 
This graph induces a partial order P_G where x_i ≺ x_j if and only if there exists a directed path from x_i to x_j in G. The input also contains an oracle O_L that specifies a linear order L over X. For any distinct x_i, x_j, an (oracle) query answers whether x_i <_L x_j. 
The goal is to output X in its sorted order L.

We describe our algorithm. For completeness, we compare our algorithm to the one from <cit.> in Appendix <ref>. 
Our key observation is that the problem becomes significantly easier when we first extract a maximum-length directed path π from G. 
We iteratively remove an arbitrary source x_i from H = G - π and insert it into π. Once H is empty, we return π.

In our analysis, our logarithms are base 2 and d^*(x_i) denotes the sum of the out-degree and the in-degree of a vertex x_i in G. 



  
Data structures.
We maintain a path π where for all vertices p, q ∈π: p <_L q if and only if p precedes q in π. 
We store π in two leaf-linked binary trees T_π and T_π'. Both trees are subject to finger insertions. T_π is used for a (finger) search, and T_π' is used for a comparison operation:

FingerInsert(q_i, x_i, T). Given vertices x_i ∉π and q_i ∈π, and a tree T storing π, insert x_i into π succeeding  q_i by replacing the leaf in T storing q_i with a node that has (q_i, x_i) as its children. 

Search(x_i, p_i, O_L). Given a vertex x_i ∉π and a vertex p_i ∈π with p_i <_L x_i. Return the farthest vertex q_i along π where q_i <_L x_i. 
Let d_i denote the number of vertices on the subpath from p_i to q_i along π. 
We want to use O(1 + log d_i) time and queries to O_L.    
To achieve this, we store π in a balanced finger search tree T_π. Many implementations exist <cit.>. We choose the level-linked (2-4)-tree by Huddleston and Mehlhorn <cit.>, which supports FingerInsert in amortised O(1)-time.

Compare(p, q). Given p, q ∈π, return q whenever q precedes p in O(1) time (and p otherwise). 
We store π in a tree T'_π which itself is stored in the dynamic Lowest Common Ancestor (LCA) data structure by Cole, and Hariharan <cit.>.
They maintain T'_π subject to FingerInsert in O(1) time. LCA queries can for any pair of leaves (u, v) give their lowest common ancestor (and whether u is in the left subtree) in O(1) time. 
 This data structure does not support rotating T'_π. However, it also does not require T'_π to be balanced.
Observe that
 Compare does not use the oracle O_L.







  
Algorithm and runtime analysis. Our algorithm is straightforward. The pseudo code is given by Algorithm <ref> where each algorithmic step also indicates the running time. We require linear space. 
We first extract a longest directed path π from G, which we store in our two data structures. 
This takes O(n + m) total time. 
If π has n - k vertices, this leaves us with a graph H with k vertices. 

We then iteratively remove an arbitrary source x_i from H. 
Since x_i is a source in H, all vertices p ∈ X that have a directed path to x_i in G must be present in π. 
We iterate over all in-neighbours of x_i in G, and use our Compare operation to find the in-neighbour p_i that is furthest along π. 
If x_i has no in-neighbors, p_i is a dummy vertex that precedes the head of π instead. 
Finally, we proceed in a way that is very similar to the algorithm for topological sorting by Knuth <cit.>: We remove x_i from H, iterate over all out-neighbors of x_i in H and decrement their in-degree, and update the linked list of sources to include the newly found ones. 
Since we inspect each in- and out-edge of x_i only once, this takes O(m) total time.

We then want to find the farthest q_i along π that precedes x_i in 
L.  In the special case where p_i is the dummy vertex preceding the head h of π, we use a query to O_L to check whether x_i <_L h. If so, we return q_i = p_i. Otherwise, we set p_i = h and invoke Search. 
This returns q_i in O(1 + log d_i) time and queries, where d_i is the length of the subpath from p_i to q_i in π (d_i = 1 if p_i = q_i). 

Finally, we insert x_i into T_π and T'_π succeeding q_i in constant time. 
We rebalance the tree T_π, which takes amortised O(1) time. Thus, these operations take O(n) total time over all insertions. 
Therefore, our algorithm uses  O(n + m + ∑_x_i ∈ H (1 + log d_i))  time  and  O(∑_x_i ∈ H (1 + log d_i))  queries.





 §.§ Proof of optimality

Recall that e(P_G) denotes the number of linear extensions of P_G and let H start out with k vertices. 
For ease of analysis, we re-index the vertices X so that the path π are vertices (x_k+1, …, x_n), in order, and x_i for i ∈ [k] is the i'th vertex our algorithm inserts into T_π.
We prove that our algorithm is tight by showing that ∑_i = 1^k (1 + log d_i)  = k + ∑_i = 1^k log d_i ∈ O(log e(P_G)).




 



Let G be a directed acyclic graph, P_G be its induced partial order and π be a longest directed path in G. If π has  n - k vertices then log e(P_G) ≥ k.



Denote ℓ(x) the length of the longest directed path in G from a vertex x.
Denote for i ∈ [n] by L_i :=  | { x ∈ X |ℓ(x) = i } |. 
For each i ∈ [n - k], there is one u ∈π with ℓ(u) = i so: 


    k = ∑_i=1^n - k  (L_i -  1).


Consider a linear order L' that is obtained by first sorting all x ∈ X by ℓ(x) from high to low, and ordering (u, v) with ℓ(u) = ℓ(v) arbitrarily. 
The order L' must extend P_G, since any vertex w that has a directed path towards a vertex u must have that ℓ(w) > ℓ(u). 
We count the number of distinct L' that we obtain in this way to lower bound e(P_G):



    e(P_G) ≥∏_i=1^n - k L_i !   ⇒    e(P_G) ≥∏_i=1^n - k 2^(L_i - 1) = 2^( ∑_i=1^n - k (L_i - 1) )  ⇒    e(P_G) ≥  2^k


Here, the first implication uses that x! ≥ 2^x - 1 and the second implication uses Equation <ref>.


What remains is to show that ∑_i = 1^k log d_i ∈ O(log e(P_G)).
To this end, we create a set of intervals:


    
     Let π^* be the directed path that Algorithm <ref> outputs. 
      For any i ∈ [n] denote by π^*(x_i) the index of x_i in π^*. 
     We create an embedding E of X by placing x_i at position π^*(x_i). 

         Recall that for i ∈ [k], p_i is the finger from where Algorithm <ref> invokes Search with x_i as the argument. 
     We create as set ℛ of n intervals R_i = [a_i, b_i] ⊆ [1, n] as follows:
     
         
  * If i > k then [a_i, b_i] := [π^*(x_i), π^*(x_i)].
         
  * Else, [a_i, b_i] := [π^*(p_i) + 1, π^*(x_i) ].
     





    Given distinct x_i, x_j ∈ X. If there exists a directed path from x_i to x_j in G then the intervals  R_i = [a_i, b_i] and R_j = [a_j, b_j] are disjoint with  b_i < a_j.  



We consider three cases. 

If j > k and i > k then x_i and x_j are part of the original longest directed path in G. 
Let without loss of generality x_i precede x_j on the original longest directed path. 
Then π^*(x_i) precedes π^*(x_j) and R_i and R_j are distinct singletons where R_i precedes R_j. 

If i ≤ k and j > k then x_i was inserted into the path π with x_j already in π. 
Since π^* is a linear extension of P_G, it follows that x_i was inserted preceding x_j in π. It follows that x_i precedes x_j in π^* and thus R_i = [π^*(p_i) + 1, π^*(x_i) lies strictly before R_j = {π^*(x_j) }. 

If j ≤ k then the vertex p_j must equal or succeed x_i in π^* and thus b_i = π^*(x_i) < a_j = π^*(p_j).



The set ℛ induces an interval order P_ℛ over X, which is the partial order ≺ where x_i and x_j are incomparable whenever R_i and R_j intersect, and where otherwise x_i ≺ x_j whenever b_i < a_j. 
By Lemma <ref>, any linear order L that extends P_ℛ must also extend P_G and so e(P_ℛ) ≤ e(P_G). The number of linear extensions of an interval order are much easier to count. 
In fact, Cardinal, Fiorini, Joret, Jungers and Munro <cit.> and Van der Hoog, Kostityna, Löffler and Speckmann <cit.> already upper bound the number of linear extensions of an interval order.
We paraphrase their upper bound (for completeness, we show in Appendix <ref> that this is correct paraphrasing).
Let for an interval R with integer endpoints, # R denote the number of integers contained in R. Then:


[Lemma 1 in <cit.> and Lemma 3.2 in <cit.>]lemmainterval
    
    Let ℛ = (R_1, … R_n) be a set of n intervals in [1, n] with integer endpoints and P_ℛ be its induced partial order. 
    Then ∑_i=1^n log(# R_i) ∈ O(log e(P_ℛ)).    


We are now ready to prove our main theorem:


    Given a directed acyclic graph G over X, inducing a partial order P_G, and an oracle O_L whose queries specify a linear order L that extends P_G, there exists an algorithm that uses linear space, O(n + m + log e(P_G)) time and O(log e(P_G)) oracle queries to output the sorted order of X. 



    Our algorithm runs in O(n + m + k + ∑_i=1^k log d_i) time and uses O(k + ∑_i=1^k log d_i) comparisons. 
    By Lemma <ref>, k ∈ O(log e(P_G)). 
    The set ℛ of Definition <ref> is a set where each interval R_i has integer coordinates.
    By Lemma <ref>, e(P_ℛ) ≤ e(P_G). 
    For i ≤ k, the size # R_i must be at least d_i since there are per construction at least d_i vertices on the subpath from π^*(p_i) to π^*(q_j) in the embedding E. 
    It follows by Lemma <ref> that ∑_i=1^k log d_i ∈ O(log e(P_ℛ) ) ⊆ O(log e(P_G)). 











§ COMPARING ALGORITHM <REF> TO THE ALGORITHM IN <CIT.>



For completeness, we compare the techniques used by our algorithm for sorting from a directed acyclic graph and the algorithm by Haeupler, Hladík, Iacono, Rozhon, Tarjan, and Tětek <cit.>. 
In <cit.>, the algorithm does not first extract a maximum-length directed path from G. 

Instead, they extract bottleneck vertices:


    Denote for a vertex x by ℓ(x) the length of the longest directed path in G from a vertex x.
Denote for i ∈ [n] by L_i :=  | { x ∈ X |ℓ(x) = i } |. 
A vertex x is a bottleneck vertex whenever ℓ(x) = i and L_i = 1. 
The set B denotes all bottleneck vertices, sorted by ℓ(x).


They prove that whenever x_i, x_j ∈ B and ℓ(x_i) < ℓ(x_j) then x_i ≺ x_j in the partial order. 
We observe for the reader that B is some subsequence of all maximum-length paths. 

As a data structure, they use an adaption from the min-heap H with working set bound  by <cit.>.
The comparison operator of the min-heap is O_L. 
For the formal definition of H, we refer to <cit.> but intuitively such heaps retrieve the minimum-value s from the heap in logω(s) time and queries, instead of log n. Here, ω(s) can be thought of as the number of heap elements inserted after s. 
Their algorithm (Algorithm <ref>) then works as follows:



  
Algorithmic description.
We describe the pseudocode and make some remarks upon its workings. 
Let Z be a graph that starts out as G. B starts out as the set of bottleneck vertices in an array. 
H is the special heap which stores at all times all sources in Z not in B. 
The output π is a doubly linked list that starts out empty. 
They note that the minimum vertex in Z, must be either a source in Z or the first vertex of B. They iteratively do the following:


 First consider the special case that H is empty but B is not. Then the next vertex in π must be the first vertex b of B. They append b to π and remove the out-edges from b from Z and add any new sources in Z (not in B) to H. 

 If H is not empty, they remove the minimum vertex s from H (the s ∈ H where ∀ h ∈ H, h ≮_T s). 
 To find s, their heap uses O(1 + logω(s) ) time and queries to O_L.  Before they append s to π, they first find the maximum prefix B_s of B where ∀ b ∈ B_s: b <_T s.
    
        
  * They use finger search where the finger is the head of B. 
        
  * This finds the d_s elements in B_s in O(1 + log d_s) queries. 
    

They then append B_s and s to π. They remove B_s ∪{ s } from Z, removing all their out-edges from Z. Any new source v (with v ∉B) gets added to H using constant time and queries and they recurse. 
The graph Z is empty if and only if H and B are, at which point they return π.







 §.§ Proof overview and comparison to our analysis

It is straightforward to show that their algorithm uses O(n + m) running time, plus the time spent per source s they remove from H. 
Each time they remove a vertex from H they do two things: they find the minimum s in H (which takes O(1 + logω(s)) time and queries), and they use exponential search over B (which takes O(1 + log d_s) time and queries).
To prove optimality, they show that:

    ∑_s  removed from  H 1    + ∑_ s  removed from  Hlog d_s    + ∑_ s  removed from  Hlogω(s)    ∈ O(log e(P_G)).


The first sum they bound in a similar fashion to Lemma <ref>. 
Let k denote the number of vertices in G - B. They show that e(P_G) ∈Ω(2^k). 
Their bottleneck set does not have the property that for each i, there exists one vertex u ∈ B with ℓ(u) = i (and so k ≠∑_i |L_i| - 1). 
However, they note that for all i for which there is no u ∈ B with ℓ(u) = i, |L_i| is at least two. This fact can be used to show in a similar fashion that e(P_G) ∈Ω(2^k). 


For the second sum, their argument essentially considers for each vertex s where d_s > 1, the interval over B over which it performed the finger search. 
Per construction, the intervals for distinct s and s' are disjoint. 
It follows that there are d_s possible number of locations where s could have inserted itself inside this interval without violating the partial order and thus ∏_s d_s! ≤ e(P_G). 
The key difference between our arguments, is that we exclusively rely upon finger search. The result of that is that we obtain a set of intervals (in our case over the final ordering π^*) that are not pairwise disjoint. Sorting from a set of intervals is previously studied, and we simply invoke a preexisting lemma from <cit.>. 


Finally, we discuss how they upper bound the third sum. 
This analysis forms the bulk of their paper. We only give a very brief overview and refer to <cit.>. 
To relate the working set bound to log e(P_G), they recursively define sets over the run of their algorithm:


    Let S be set of vertices. Denote for each iteration t by S(t) the subset of S in the heap at iteration t. 
The greedy sequence S_1, S_2, … of a set S as follows: let t be the minimum time such that |S(t)| is maximum and S' = S - S(T). If S' is empty then the greedy sequence is σ = S(t). Otherwise, let σ denote the greedy sequence of S' then the greedy sequence of S is σ with S(t) appended to it. 


They use the sizes of S_i in the greedy sequence of G - B  as an upper bound on the working set size of vertices s ∈ S_i that get removed from the heap. 
They then relate the term ∑_S_i ∈σ |S_i| log |S_i| to log e(P) using entropy of sorted orders. 
This analysis is vastly different from this paper. We do not use their heap. We instead show that it suffices to iteratively remove an arbitrary source from the current graph, and we exclusively rely upon finger search. 






§ DERIVING LEMMA <REF>



 Lemma <ref> is a weaker statement than Lemma 1 from <cit.> (which itself is paraphrased Lemma 3.2 from <cit.>). 
We use Lemma 1 from <cit.> since its formulation is artithmatically a bit easier to use. 

*


    Let ℛ be set of intervals with integer endpoints.
    In <cit.>, they define an embedding ℐ of ℛ into [0, 1] as any set of  open  intervals (I_1, …, I_n) where I_i intersects I_j if and only if R_i intersects R_j, and I_i precedes I_j if and only if R_i precedes R_j. They denote by E(ℛ) the set of all embeddings of ℛ into [0, 1] and by |I_i| the size of the open interval. 

    We note that in <cit.> H(ℛ) denotes the entropy of ℛ and that n · H(ℛ) = log e(P_ℛ). 
    Lemma 1 from <cit.> states that: 
    
    
    log (e(P_R)) = sup_ℐ∈ E(ℛ) ∑_I_i ∈ℐlog(n |I_i|).


    Effectively, the inside of the log scales each open interval in [0, 1] to an interval in [0, n] instead, 
    If we denote by E^*(ℛ) the set of all embeddings ℐ^* of ℛ into [0, n], this implies that: 

     
    log e(P_ℛ) = sup_ℐ^* ∈ E^*(ℛ) ∑_I_i ∈ℐ^*log(|I_i|).

    The set ℛ is a set of intervals with integer endpoints in [1, n]. 
    We create a set ℛ' of open intervals by adding for each i the interval (a_i, b'_i + 1). 
    We observe that ℛ' is an embedding ℛ' of ℛ in [0, n] where each open interval (a'_i, b'_i) has length # [a_i, b_i]. 
    Since ℛ' ∈ E(ℛ) it follows that: 
    
    ∑_R_i ∈ℛlog (# |R_i|) =  ∑_R_i ∈ℛ |(a'_i, b'_i)| ≤log e(P_R)









plain



 Paper Title: Finding a Shortest $M$-link Path in a Monge Directed Acyclic Graph.






Finding a Shortest M-link Path in a Monge Directed Acyclic Graph
    Joy Z. Wan
Siebel School of Computing and Data Science
University of Illinois Urbana-Champaign 
    
===================================================================================================



§ ABSTRACT 
A Monge directed acyclic graph (DAG) G on the nodes 1,2,⋯,N has edges
(  i,j) for 1≤ i<j≤ N carrying submodular edge-lengths.
Finding a shortest M-link path from 1 to N in G for any given
1<M<N-1 has many applications. In this paper, we give a contract-and-conquer
algorithm for this problem which runs in O(  √(NM(  N-M)
log(  N-M)  )) time and O(  N) space. It
is the first o(  NM)-time algorithm with linear space
complexity, and its time complexity decreases with M when M≥ N/2. In
contrast, all previous strongly polynomial algorithms have running time
growing with M. For both O(  poly(  log N)  ) and
N-O(  poly(  log N)  ) regimes of M, our
algorithm has running time O(  N· poly(  log N)
), which partially answers an open question rased in <cit.>
affirmatively. 

Keywords: Monge graph; parametric search; contact and conquer






§ INTRODUCTION




Many algorithmic problems <cit.> can be reduced to seeking a
shortest M-link path in a Monge directed acyclic graph (DAG) G on nodes
1,2,⋯,N with 1≤ M≤ N-1. The edge set of G is {(  i,j)  :1≤ i<j≤ N}; and the edge-length (or
edge-weight) function c of G satisfies that for any 1≤ i<j<k<l≤
N,

    c(  i,l)  +c(  j,k)  ≥ c(  i,k)  +c(
    j,l)  .

In addition, the length c(  i,j) of each edge (
i,j) can be evaluated in constant time. A path P in G
specified by the sequence

    s=v_0,v_1,⋯,v_m=t

is said to be an m-link s-t path, and its length is the total length of
edges in P. The path P is called a shortest m-link s-t path
if P has the minimum length among all m-link s-t paths.



As observed by <cit.>, a shortest M-link 1-N path in G can
be computed in O(  NM) time and space by the standard dynamic
programming accelerated by the celebrated SMAWK algorithm <cit.>. A
parametric search scheme was also introduced in <cit.> for
computing a shortest M-link 1-N path in G. When the edge lengths are
restricted to integers, the binary search method yields a weakly
polynomial algorithm <cit.>. A strongly polynomial
algorithm with sub-quadratic complexity was developed in <cit.>, which
is referred to the algorithm AST. The algorithm AST follows Megiddo's
parametric search paradigm <cit.>, and runs in O(  N√(Mlog
N)+Nlog N) time and O(  N√(Mlog N)) space. For
the Ω(  log N) regime of M, the algorithm AST
<cit.> is superior to the O(  NM)-time accelerated
dynamic programming; and the existence of an O(  N· poly(  log
n)  )-time algorithm was raised as an open question in
<cit.>. 



For the same Ω(  log N) regime of M, Schieber
<cit.> gave a recursive parametric search algorithm with
O(  N2^4√((  log M)  (  loglog N)  )
) running time. Schieber's algorithm is superior to the algorithm
AST <cit.> when M=Θ(  N), but may be inferior when
M=Θ(  poly(  log N)  ). Indeed when
M=log^16N, Schieber's algorithm has the same asymptotic time complexity
O(  Nlog^16N)  =O(  NM) as the accelerated
dynamic programming, while the algorithm AST <cit.> has time complexity
O(  Nlog^8.5N) and is asymptotically faster by a factor of
Θ(  log^7.5N). Similarly, when M=log^4N,
Schieber's algorithm has time complexity O(  Nlog^8N)
=O(  NM^2), which is even asymptotically slower by a factor of
Θ(  M) than the accelerated dynamic programming. 



Schieber <cit.> also noted, with no analysis, the linear space
complexity of his recursive algorithm. A careful look into the recursion
reveals that the space complexity hidden within the recursion is more than
linear order. The recursion runs on an auxiliary DAG with modified lengths of
all edges from the node 1. These modified lengths have to be
maintained on the recursion stack, and the space needed for maintaining these
modified lengths grows with the recursion depth and certainly exceeds the
linear order. There is no apparent fix for such recursive algorithm to achieve
the linear space complexity.



In addition to the superlinear space complexity, all of the above strongly polynomial
algorithms have time complexity strictly growing with M. However, the
closeness of M to N could be beneficial for the  computation of a
shortest M-link 1-N path. If M=N-1, then there is a single (
N-1)-link 1-N path. If M=N-2, then there are N-2 (
N-2)-link 1-N paths, each of which can be generated from the
unique (  N-1)-link 1-N path by removing an internal
node. Thus, a shortest (  N-2)-link 1-N path can also be
computed in linear time and space. In fact, there is a symmetry between
these two “largest” cases and the two
“smallest”cases. If M=1, then there is a
single 1-link 1-N path. If M=2, then there are N-2 2-link 1-N
paths, each of which can be generated by adding an internal node. In
general, the number of m-link 1-N paths and the number of (
N-m)-link 1-N paths are both equal to

    N-2m-1=N-2N-m-1.

This symmetry sheds light on the room of improvement when M is close to
N.  



In this paper, we present a contract-and-conquer algorithm for computing a
shortest M-link 1-N path iteratively in O(  √(NM(
N-M)  log(  N-M)  )) time and O(  N)
space. Thus, it is the first o(  NM)-time algorithm with
linear space complexity. For the O(  poly(  log n)
) and N-O(  poly(  log n)  ) regimes of
M, the contract-and-conquer algorithm has an O(  N·
poly(  log n)  ) runtime, and hence partially answers the open
question in <cit.> affirmatively. For all M, the contract-and-conquer
algorithm is superior to the algorithm AST <cit.> in both time and space complexity. For M around N/2, the
contract-and-conquer algorithm is inferior to Schieber's algorithm
<cit.> in time complexity in return for superior space complexity. The
contract-and-conquer algorithm follows the elementary decreasing-and-conquer
paradigm. It is conceptually simple and easy for implementation.



The following notations and terms are used in this paper. For two integers a
and b with a≤ b, the closed integer interval [  a:b]
denotes the set of integers k with a≤ k≤ b; and (a:b] represents
[  a:b]  ∖{  a}. For a positive integer
n, [  n] is a shorthand for [  1:n]. A set
ℒ⊆ℤ^2 is a lattice <cit.> if for any two
members (  i_1,j_1) and (  i_2,j_2) in
ℒ with i_1 < i_2 and j_1 > j_2, both (  i_1
,j_2) and (  i_2,j_1) are also in ℒ. A
real-valued function ρ on a lattice ℒ is submodular <cit.>
if for any two members (  i_1,j_1) and (  i_2
,j_2) in ℒ with i_1 < i_2 and j_1 > j_2,

    ρ(  i_1,j_1)  +ρ(  i_2,j_2)  ≥ρ(  i_1,j_2)  +ρ(  i_2,j_1)  .

A Monge DAG on an integer interval [  s:N] is a
complete DAG on [  s:N] with a submodular edge-length function
on the edge lattice {(  i,j)  :s≤ i<j≤ N}.
Throughout this paper, 1≤ s<N and G_s is a Monge DAG on [
s:N] with edge-length function c_s. 



The remainder of this paper is organized as follows. Section <ref>
presents a parsimonious dynamic programming for computing the lengths of a
collection of shortest m-link paths. Section <ref> introduces the
notion of minimal and maximal shortest-path trees and characterizes their
depth properties. Section <ref> elaborates precisely on the parametric
search scheme for computing a shortest m-link path. Section <ref>
develops a key probe procedure with the hit-or-contract nature. Section
<ref> describes the contract-and-conquer algorithm and analyzes its
complexity. Section <ref> concludes with discussion on possible improvements.





§ A PARSIMONIOUS DYNAMIC PROGRAMMING






Suppose 1≤ s<N and G_s is a Monge DAG on [  s:N] with edge-length function c_s. For each n∈[  s+1:N], there is
an m-link s-n path if and only if m∈[  n-s]. We use
ℒ_s to denote the lattice

    {(  m,n)  :n∈[  s+1:N]  ,m∈[
    n-s]  }  .

For each (  m,n)  ∈ℒ_s, let f_s(
m,n) denote the minimum length of all m-link s-n paths in
G_s, and 𝒫_s^∗(  m,n) denote the set of
all shortest m-link s-n paths in G_s. The following computation task
is needed frequently in our later algorithm: Given (  m,n)
∈ℒ_s with m>1 and s+m<n≤ N, compute f_s(
m,j) for all i∈[  s+m:n] and f_s(
m+1,j) for all j∈[  s+m+1:n]. The outputs are
stored in two global arrays f and f : f_s(  m,j) is stored at f(  j), and f_s(  m+1,j) is
stored at f (  j). In this section, we present a
parsimonious dynamic programming for this task which runs in Θ(
m(  n-s+1-m)  ) time and Θ(  n-s+1-m)
working space. 



All f_s(  k,j) for (  k,j)  ∈ℒ_s
satisfy a variant of the Bellman-Ford recurrence:



  * f_s(  1,j)  =c_s(  s,j) for each
j∈[  s+1:N]; 


  * for each (  k,j)  ∈ℒ_s with k>1, 
    f_s(  k,j)  =min_i∈[  s+m-1:j-1]  [
    f_s(  k-1,i)  +c_s(  i,j)  ]  .




The parsimonious dynamic programming exploits the minimal
recurrence dependence as illustrated in Figure <ref>:



  * The entries f_s(  m,j) for j∈[  s+m:n]
depend exactly on the entries f(  m-1,j) for all j∈[
s+m-1:n-1].


  * In turn, the entries f_s(  m-1,j) for j∈[
s+m-1:n-1] further depend exactly on the entries f_s(
m-2,j) for all j∈[  s+m-2:n-2], and so on.


Recursively, the outputs depend exactly on the (  m-1)
(  n-s+1-m) entries f_s(  k,j) for all
k∈[  1:m-1] and j∈[  s+k:n-m+k].






Accordingly, we get the explicit “minimal”
 recurrence: 



  * f_s(  1,j)  =c_s(  s,j) for each
j∈[  s+1:n-m+1].


  * For each 2≤ k≤ m and each j∈[  s+k:n-m+k],

    f_s(  k,j)  =min_i∈[  s+k-1:j-1]  [
    f_s(  k-1,i)  +c_s(  i,j)  ]  .




  * For each j∈[  s+m+1:n],

    f_s(  m+1,j)  =min_i∈[  s+m:j-1]  [
    f_s(  m,i)  +c_s(  i,j)  ]  .




For each 2≤ k≤ m, the set

    {(  i,j)  :s+k-1≤ i<j≤ n-m+k}

is a sublattice of the edge lattice, and f_s(  k-1,i)
+c_s(  i,j) is submodular in (  i,j) on this
lattice; hence the SWAWK algorithm can be applied to compute f_s(
k,j) for all j∈[  s+k:n-m+k] in Θ(
n-s+1-m) time and space. Similarly, the SWAWK algorithm can be
applied to compute f_s(  m+1,j) for all j∈[
s+m+1:n] in Θ(  n-s-m) time and space. 



A subroutine PBF(  s,m,n) implementing the
parsimonious dynamic programming is outlined in Table <ref>: 



  * Initialize f(  j)  =c_s(  s,j) for each
j∈[  s+1:n-m+1].


  * For k=2 to m, first apply the SWAWK algorithm to compute

    f(  j)  =min_i∈[  s+k-1:j-1]  [
    f(  i)  +c_s(  i,j)  ]

for all j∈[  s+k:n-m+k]; and then overwrite f(
j) with f(  j)  for all j∈[
s+k:n-m+k].


  * Finally, apply the SWAWK algorithm to compute

    f(  j)  =min_i∈[  s+m:j-1]  [
    f(  i)  +c_s(  i,j)  ]

for all j∈[  s+m+1:n].


Clearly, the subroutine PBF(  s,m,n) runs in
Θ(  m(  n-s+1-m)  ) time and needs additional
O(  n-s+1-m) working space by the SWAWK algorithm.









§ MINIMAL AND MAXIMAL SHORTEST-PATH TREES






Suppose 1≤ s<N and G_s is a Monge DAG on [
s:N] with edge-length function c_s. A shortest-path tree
(SPT) in G_s is a directed tree on [  s:N] in which the
tree path from s to each node n is a shortest s-n path in G_s. In
this section, we introduce the notion of minimal SPT and maximal SPT, and
assert that they are also respectively a shallowest SPT and a deepest SPT. 



For each n∈[  s:N], let F_s(  n) be the
minimum length of all s-n paths in G_s. All F_s(  n)
for n∈[  s:N] satisfy the recurrence: F_s(  s)
=0; and for each n∈[  s+1:N],

    F_s(  n)  =min_i∈[  s:n-1]  [  F_s(
    i)  +c_s(  i,n)  ]  .



Denote Π_s(  s)  :={  0}; and for
each n∈[  s+1:N] denote

    Π_s(  n)  :=min_i∈[  s:n-1]  [
    F_s(  i)  +c_s(  i,n)  ]  .

Each SPT in G_s is uniquely defined by a parent selection π:
[  s+1:N]  →[  s:N-1] satisfying that
π(  n)  ∈Π_s(  n) for each n∈[
s+1:N], and vice versa. For each n∈[  s:N], let
π_s^min(  n) (resp., π_s^max(  n))
be the least (resp., greatest) member in Π_s(  n). Note
that π_s^min(  s)  =π_s^min(  s)  =0. As
F_s(  i)  +c_s(  i,n) is submodular in (
i,n) on the edge lattice of G_s, both π_s^min(
n) and π_s^max(  n) increase with
n∈[  s+1:N]. The minimal (resp., maximal) SPT
T_s^min (resp., T_s^max) in G_s is the SPT in G_s
defined by π_s^min (resp., π_s^max). 



For each n∈[  s:N], let D_s(  n) be the set
of numbers of links in all shortest s-n paths in G_s, and d_s
^min(  n) (respectively, d_s^max(  n)) be
the least (respectively, greatest) member in D_s(  n).
Clearly, D_s(  s)  ={  0}. For each n∈[
s+1:N], each shortest s-n path in G_s with m∈ D_s(
n) links must belong to 𝒫_s^∗(  m,n)
and have length f_s(  m,n); hence

    F_s(  n)        =min_(  m,n)  ∈ℒ_s
    f_s(  m,n)  =min_m∈[  n-s]  f_s(
    m,n)  ,
    
    D_s(  n)        =min_m∈[  n-s]  f_s(
    m,n)  .

Thus, the collection of shortest s-n paths in G_s is exactly the union
of 𝒫_s^∗(  m,n) over all m∈ D_s(
n). The theorem below asserts that T_s^min (resp, T_s
^max) is also a shallowest (resp., deepest) SPT.




 The depth of each n∈[  s:N] in T_s^min
(resp., T_s^max) is exactly d_s^min(  n) (resp.,
d_s^max(  n)). In addition, all nodes with the same depth
in T_s^min (resp, T_s^max) are consecutive.




To prove the above theorem, we describe a path swapping operation which
is more direct and explicit than the variants in <cit.>.
Consider two paths

    P      =(  u_0,u_1,⋯,u_m_1)  ,
    
    Q      =(  v_0,v_1,⋯,v_m_2)

in G_s with 1≤ m_1≤ m_2 and u_0≤ v_0<v_m_2≤
u_m_1 (see Figure <ref>). For any m∈[  m_1
:m_2], we construct an m-link v_0-u_m_1 path
Q⊕_mP and an (  m_1+m_2-m)-link u_0-v_m_2 path Q⊖_mP in two steps:






  * Step 1: Compute the least k∈[  m_1]
with u_k≥ v_m-m_1+k. Such k does exist as u_m_1≥
v_m_2≥ v_m=v_m-m_1+m_1. Then u_k-1≤ v_m-m_1+k-1: if k=1 then

    u_k-1=u_0≤ v_0≤ v_m-m_1=v_m-m_1+k-1;

otherwise u_k-1<v_m-m_1+k-1 by the least choice of k. Hence,

    u_k-1≤ v_m-m_1+k-1<v_m-m_1+k≤ u_k.




  * Step 2: Replace the edges (  u_k-1,u_k) in
P and (  v_m-m_1+k-1,v_m-m_1+k) in Q respectively
with the edges (  u_k-1,v_m-m_1+k) and (
v_m-m_1+k-1,u_k) to get

    Q⊕_mP      :=(  v_0,⋯,v_m-m_1+k-1,u_k,⋯,u_m_1
    )  ,
    
    Q⊖_mP      :=(  u_0,⋯,u_k-1,v_m-m_1+k,⋯,v_m_2
    )  .




By the submodularity of c_s, the two new edges have no larger
sum-length than the two old edges. Thus,

    c_s(  P)  +c_s(  Q)  ≥ c_s(  Q⊕
    _mP)  +c_s(  Q⊖_mP)  .





The swapping of two shortest s-n paths with d_s^min(  n) and d_s^max(  n) links respectively has the following
direct consequence.




 Suppose n∈[  s+1:N], and P (resp.,
Q) is a shortest s-n path with d_s^min(  n) (resp.
d_s^max(  n)) links. Then for any m∈[  d_s
^min(  n)  :d_s^max(  n)  ],
Q⊕_mP is a shortest s-n path with m links. Hence, D_s(
n)  =[  d_s^min(  n)  :d_s^max(
n)  ]. 




For any N≥ n_1≥ n_2>s and 1≤ m_1≤ m_2≤ n_2-s, the
swapping of a path in 𝒫_s^∗(  m_1,n_1) and
a path in 𝒫_s^∗(  m_2,n_2) implies
immediately the lemma below which is implicit in <cit.>.




 Suppose N≥ n_1≥ n_2>s and 1≤ m_1≤
m_2≤ n_2-s. Then for any m∈[  m_1:m_2],

    f_s(  m_1,n_1)  +f_s(  m_2,n_2)  ≥
    f_s(  m,n_1)  +f_s(  m_1+m _2-m,n_2)  .

In particular, f_s(  m,n) is a submodular function on
ℒ_s.




The submodularity of f_s(  m,n) on ℒ_s and the
minimizer representation of D_s(  n) in equation
(<ref>) imply the monotonicity of d_s^min(  n) and d_s^max(  n) with n∈[  s+1:N]. As
d_s^min(  0)  =d_s^max(  n)  =0, we get the
following lemma. 




 Both d_s^min(  n) and d_s
^max(  n) increase with n∈[  s:N].




Now are ready to prove Theorem <ref>. Consider any n∈[
s+1:N]. By Lemma <ref>,

    d_s^min(  n)        =1+min_i∈Π_s(  n)  
    d_s^min(  i)  =1+d_s^min(  π_s^min(
    n)  )  ,
    
    d_s^max(  n)        =1+max_i∈Π_s(  n)  
    d_s^max(  i)  =1+d_s^max(  π_s^max(
    n)  )  .

Thus, the first part of Theorem <ref> holds. The second part of
Theorem <ref> then follows from Lemma <ref>.



All algorithms in <cit.> can compute F_s in linear
time and space. Given F_s, π_s^min (resp, π_s^max) can
be computed in linear time and space by a single application of the
SWAWK algorithm. Given π_s^min (resp., π_s^max) ,
d_s^min (resp., d_s^max) can be computed in linear space and
time by a tree traversal. If we only need the depth of N and/or the tree
path from s to N in T_s^min (resp, T_s^max), then a
backtrack from N to s along π_s^min (or π_s^max) is sufficient.



In <cit.>, a tie-breaking modification to the Wilber's algorithm
<cit.> or Klawe's algorithm <cit.> was proposed for computing
a shortest s-N path with the fewest (resp., most) links: Whenever the
lengths of two paths are compared and found to be equal, the path with fewer
(resp., more) links is considered lighter. While ambiguity remains when both
the lengths and the number of links of two paths are compared and found to be
equal, such further tie-breaking apparently still relies on the original
lexicographic rule. The argument for the (non-obvious) monotonicity of the
modified parent selection, which is essential to the application of the
SWAWK algorithm, was missing in <cit.>. In contrast, the
construction of T_s^min (resp, T_s^max) eliminates the need for
tie-breaking by the number of links. 





§ PARAMETRIC SHORTEST PATHS






For each parameter λ∈ℝ, let G_s(  λ)
denote the DAG obtained from G_s by subtracting λ from the
length of each edge. Then, G_s(  λ) is also submodular.
For any (  m,n)  ∈ℒ_s, the collection of shortest
m-link s-n paths in G_s(  λ) is still
𝒫_s^∗(  m,n), and the length of each path in
𝒫_s^∗(  m,n) in G_s(  λ) is f_s(  m,n)  -mλ. Thus, for the purpose of seeking a
path in 𝒫_s^∗(  M,N), we may seek a shortest
M-link s-N path in G_s(  λ) for any
λ∈ℝ. The general idea of the parametric search scheme
<cit.> is to find some parameter λ such that G_s(
λ) has a shortest s-N path with M links. For any such
λ, each shortest s-N path in G_s(  λ) with
M links is a path in 𝒫_s^∗(  M,N), and one
such path can be computed in linear time and space. In this section, we
provide a concise and precise elaboration on the parametric search scheme
<cit.>.



For each n∈[  s:N], let F_s(  λ,n) be
the minimum length of all s-n paths in G_s(  λ),
and D_s(  λ,n)  :=[  d_s^min(
λ,n)  :d_s^max(  λ,n)  ] be the set
of numbers of links in all shortest s-n paths in G_s(
λ). Clearly, F_s(  λ,s)  =0 and
D_s(  λ,s)  ={  0}. For each n∈[
s+1:N],

    F_s(  λ,n)        =min_m∈[  n-s]  [
    f_s(  m,n)  -mλ]  ,
    
    D_s(  λ,n)        =min_m∈[  n-s]  [
    f_s(  m,n)  -mλ]  .

Thus, the collection of shortest s-n paths in G_s(  λ) is exactly the union of 𝒫_s^∗(  m,n) over all m∈ D_s(  λ,n). Let T_s^min(
λ) (resp., T_s^max(   λ)) denote the
minimal (resp., maximal) SPT of G_s(  λ). Then for each
n∈[  s:N], d_s^min(  λ,n)
(resp., d_s^max(  λ,n)) is the depth of n in
T_s^min(  λ) (resp., T_s^max(
λ)) by Theorem <ref>. 



Suppose M∈ D_s(  λ,N).  Then each path in
𝒫_s^∗(  M,N) is a shortest s-N path in
G_s(  λ). A path in 𝒫_s^∗(
M,N) can be computed in linear time and space as follows:



  * Compute T_s^min(  λ) and T_s^max(
 λ) in G_s(  λ), and let P and Q be
the s-N paths in T_s^min(  λ) and T_s^max(  λ) respectively.


  * Construct Q⊕_MP. By Lemma <ref>, Q⊕_MP is
a shortest s-N path in G(  λ) with M links; hence
Q⊕_MP∈𝒫_s^∗(  M,N). 


Thus, computing a path in 𝒫_s^∗(  M,N) is reducible in linear time and space to finding a parameter
λ with M∈ D_s(  λ,N).



In the sequel, we characterize the range of λ such that m∈
D_s(  λ,n) for a given (  m,n)
∈ℒ_s. For any n∈[  s+1:N], let

    f_s(  0,n)  =f_s(  n-s+1,n)  =+∞

as no s-n path in G_s has 0 or n-s+1 links; and let

    δ_s(  m,n)  :=f_s(  m+1,n)  -f_s(
    m,n)

for each 0≤ m≤ n-s. Note that δ_s(  m,n) is
finite for each m∈[  n-s-1], δ_s(  0,n)
=-∞, and δ_s(  n-s,n)  =+∞. By Lemma
<ref>, δ_s(  m,n) increases with m and
decreases with n. The theorem below gives an equivalent condition for
d_s^min(  λ,n)  ≤ m and an equivalent condition for
d_s^max(  λ,n)  ≥ m. 




 For any (  m,n)  ∈ℒ_s and
λ∈ℝ,



  * d_s^min(  λ,n)  ≤ m if and only if
λ≤δ_s(  m,n);


  * d_s^max(  λ,n)  ≥ m if and only if
λ≥δ_s(  m-1,n).






We first show that

    δ_s(  d_s^min(  λ,n)  -1,n)
    <λ<δ_s(  d_s^max(  λ,n)  ,n)
    .

For j=d_s^min(  λ,n), j∈ D_s(
λ,n) and j-1∉ D_s(  λ,n); hence

    δ_s(  j-1,n)  -λ=F_s(  λ,n)
    -[  f_s(  j-1,n)  +(  j-1)  λ]  <0.

For j=d_s^max(  λ), j∈ D_s(
λ,n) and j+1∉ D_s(  λ,n); hence

    δ_s(  j,n)  -λ=[  f_s(  j+1,n)
    +(  j+1)  λ]  -F_s(  λ,n)  >0.

Thus, the two strict inequalities in equation (<ref>) hold. 

Now, we show that

    δ_s(  d_s^max(  λ,n)  -1,n)
    ≤λ≤δ_s(  d_s^min(  λ,n)
    ,n)  .

If d_s^min(  λ,n)  =d_s^max(  λ
,n), the inequalities hold strictly by equation (<ref>).
Suppose d_s^min(  λ,n)  <d_s^max(
λ,n). Then f_s(  j,n)  +jλ=F_s(
λ,n) for j=d_s^min(  λ,n),
d_s^min(  λ,n)  +1, d_s^max(
λ,n)  -1, and d_s^max(  λ,n). Thus, the
two inequalities in equation (<ref>) hold with equality. 

Next, we prove the first part of the theorem. If d_s^min(
λ,n)  ≤ m, then by equation (<ref>)

    λ≤δ_s(  d_s^min(  λ,n)  ,n)
    ≤δ_s(  m,n)  .

If d_s^min(  λ,n)  >m, then by equation
(<ref>)

    λ>δ_s(  d_s^min(  λ,n)  -1,n)
    ≥δ_s(  m,n)  .



Finally, we prove the second part of the theorem. If d_s^max(
λ,n)  ≥ m, then by equation (<ref>)

    λ≥δ_s(  d_s^max(  λ,n)
    -1,n)  ≥δ_s(  m-1,n)  .

If d_s^max(  λ,n)  <m, then by equation
(<ref>)

    λ<δ_s(  d_s^max(  λ,n)  ,n)
    ≤δ_s(  m-1,n)  .



Therefore, the theorem holds. 




By Theorem <ref>, for any (  m,n)  ∈ℒ_s
and λ∈ℝ, m∈ D_s(  λ,n) if and only
if δ_s(  m-1,n)  ≤λ≤δ_s(
m,n). With a slight notational abuse, each closed extended-real
interval excludes its infinite endpoints. For any (
m,n)  ∈ℒ_s, denote

    Λ_s(  m,n)  :=[  δ_s(  m-1,n)
    ,δ_s(  m,n)  ]  .

Then Λ_s(  m,n) is exactly the range of
λ with m∈ D_s(  λ,n).



In the remaining of this section, we derive monotonic properties of
D_s(  λ,n) and Λ_s(  m,n). By
Lemma <ref>, both endpoints of D_s(  λ,n) increase with n∈[  s,N]; they also increase with
λ∈ℝ implied by the lemma below. 




 For any n∈[  s,N] and λ
_1<λ_2, d_s^max(  λ_1,n)  ≤ d_s
^min(  λ_2,n)  .





As D_s(  λ,s)  ={  0}, the lemma holds
trivially for n=s; henceforth we assume n>s. Denote m_1:=d_s^max(  λ_1,n) and m_2:=d_s^min(  λ
_2,n). Then,

    f_s(  m_1,n)  -m_1λ_1     =F_s(  λ
    _1,n)  ≤ f_s(  m_2,n)  -m_2λ_1,
    
    f_s(  m_2,n)  -m_2λ_2     =F_s(  λ
    _2,n)  ≤ f_s(  m_1,n)  -m_1λ_2.

Summing up the above two inequalities yields

    m_1λ_1+m_2λ_2≥ m_2λ_1+m_1λ_2,

and hence m_1(  λ_2-λ_1)  ≤ m_2(
λ_2-λ_1). Thus, m_1≤ m_2.




By Lemma <ref>, both endpoints of Λ_s(  m,n) increase with m∈[  n-s] and decrease with n∈[
s+m+1,N]. In addition, the following “vertical” downward monotonicity holds.




 For any (  m,n)  ∈ℒ_s and any
path (  v_0,⋯,v_m) in 𝒫_s^∗(
m,n),

    Λ_s(  1,v_1)  ⊇Λ_s(  2,v_2)
    ⊇⋯⊇Λ_s(  m,v_m)  .







We show that Λ_s(  i,v_i)  ⊇Λ_s(
i+1,v_i+1) for any 1≤ i<m. Consider any λ∈Λ
_s(  i+1,v_i+1). Then i+1∈ D_s(  λ
,v_i+1); hence the subpath (  v_0,⋯,v_i
,v_i+1) is a shortest s-v_i+1 path in G_s(
λ). Accordingly, the subpath (  v_0,⋯
,v_i) is a shortest s-v_i path in G_s(
λ). So, i∈ D_s(  λ,v_i); hence
λ∈Λ_s(  i,v_i). Thus, Λ_s(
i+1,v_i+1)  ⊆Λ_s(  i,v_i).





For any 1≤ m≤ M≤ N-s-1 and any path (
v_0,⋯,v_M+1) in 𝒫_s^∗(  M+1,N), v_m+1∈[  s+m+1:N-M+m] and δ_s(
m,v_m+1)  ≤δ_s(  M,N).






§ THE M-PROBE






Suppose G_s is a Monge DAG on [  s:N] with edge-length function c_s, and 4≤ M≤ N-s-1. Consider a parameter m∈[
2:M-2]. The m-probe of G_s is the least
r∈[  s+m+1:N-M+m] satisfying that δ_s(
m,r)  ≤δ_s(  M,N). By Corollary
<ref>, such r is well-defined. The m-probe r plays a
pivotal role in seeking a member of Λ_s(  M,N). 



For each j∈[  r:N], let

    h(  j)  :=min_s+m≤ i<r[  f_s(  m,i)
    +c_s(  i,j)  ]  .

Note that h(  j) is exactly the minimum length of all (
m+1)-link s-j paths with the penultimate node among [
s+m:r-1]. The contraction G_r-1 of G_s is a DAG on
[  r-1:N] obtained from G_s by 



  * deleting all nodes in [  s:r-2], and 


  * reassigning a length h(  j) to the edge (
r-1,j) for each j∈[  r:N].


Let c_r-1 be the edge length function of G_r-1. Since r≤
N-M+m,

    2≤ M-m≤ N-r=N-(  r-1)  -1.

The theorem below is the cornerstone to the design of our contract-and-conquer algorithm.

 


 G_r-1 is Monge. If δ_s(  m,r)
∉Λ_s(  M,N), then Λ_r-1(
M-m,N) in G_r-1 coincides with Λ_s(  M,N)
in G_s.





In order to prove G_r-1 is Monge, it suffices to show that the quadruple
inequality

    c_r-1(  r-1,j+1)  -c_r-1(  r-1,j)  ≥
    c_r-1(  r,j+1)  -c_r-1(  r,j)

holds for any r<j<N. Let i∈ s+m:r-1] be such that

    c_r-1(  r-1,j+1)  =f_s(  m,i)  +c_s(
    i,j+1)  .

Then

    c_r-1(  r-1,j)  ≤ f_s(  m,i)  +c_s(
    i,j)  .

Hence,

    c_r-1(  r-1,j+1)  -c_r-1(  r-1,j)  
       ≥ c_s(  i,j+1)  -c_s(  i,j)  
       ≥ c_s(  r,j+1)  -c_s(  r,j)  
         =c_r-1(  r,j+1)  -c_r-1(  r,j)  .

where the second inequality is due to the submodularity of c_s.

Suppose δ_s(  m,r)  ∉Λ_s(  M,N).
Then,

    δ_s(  m,r)  <δ_s(  M-1,N)  .

Consider any M^'∈[  M-1:M+1]. Then, M^'
-m∈[  M-m-1:M-m+1]. We prove that for any shortest (
M^'-m)-link (  r-1)-N path P=(
u_0,u_1,⋯,u_M^'-m) in G_r-1 and any shortest
M^'-link s-N path Q=(  v_0,v_1,⋯,v_M^'
) in G_s, c_r-1(  P)  =c_s(  Q).
Consequently, Λ_r-1(  M-m,N) in G_r-1 is identical
to Λ_s(  M,N) in G_s.

We first claim that v_m<r≤ v_m+1. By Lemma <ref>,

    δ_s(  m,v_m+1)  ≤δ_s(  M^'-1,N)  ≤δ_s(  M,N)  ;

hence r≤ v_m+1 by the least choice of r. Note that s+m≤
v_m<v_m+1. The inequality v_m<r holds trivially if v_m=s+m.
Suppose v_m≥ s+m+1. Then by Lemma <ref> and the two
conditions M^'≥ M-1 and δ_s(  m,r)  <δ
_s(  M-1,N), we have

    δ_s(  m,v_m)  ≥δ_s(  M^',N)
    ≥δ_s(  M-1,N)  >δ_s(  m,r)  ;

hence v_m<r. Thus, the claim holds.

Now, we show that c_s(  Q)  ≥ c_r-1(  P). As
Q is a shortest M^'-link s-N path in G_s, the subpath
(  v_0,⋯,v_m+1) is a shortest (  m+1)-link s-v_m+1 path in G_s. The previous claim yields that

    c_r-1(  r-1,v_m+1)  =c_s(  v_0,⋯,v_m+1)
    .

Let Q^' be the (  M^'-m)-link (
r-1)-N path in G_r-1 obtained from Q by replacing the first
m+1 nodes v_0,⋯,v_m with the node r-1. Then,

    c_s(  Q)  =c_r-1(  Q^')  ≥ c_r-1(
    P)  .



Next, we show that c_s(  Q)  ≤ c_r-1(  P).
Let P^' be the concatenation of a shortest (  m+1)-link s-u_1 path in G_s and the subpath (  u_1
,⋯,u_M^'-m) of P. By the definition of c_r-1,
c_r-1(  P)  =c_s(  P^'). As c_s(
P^')  ≥ c_s(  Q), we have c_r-1(
P)  ≥ c_s(  Q).

Thus, the theorem follows.




In the sequel, we present a procedure Probe(  s,m) on
G_s which 



  * either hits and returns a member δ_s(  m,n) of
Λ_s(  M,N) if there is any,


  * or finds r, contracts G_s into G_r-1, and reduces M by m.


In the latter case, the new lengths of edges out of r-1 in
G_r-1 are stored in a global array h of size N. 



By Theorem <ref>,

    r=min{  n∈(s+m:N-M+m]:d_s^min(  δ_s(
    m,n)  ,N)  ≤ M}

The downward monotonicity of δ_s(  m,n) and d_s
^min(  δ_s(  m,n)  ,N) in n∈(s+m:N-M+m]
enables the discovery of r by a combination of exponential search and
binary search. Throughout the search, an integer search interval
(n^':n^''] containing r is maintained; initially,
n^'=s+m and n^''=N-M+m. A basic sampling operation is
to generate a sample λ=δ_s(  m,n) for some
candidate n in the search interval, compute M^'=d_s^min(
λ,N), and compare M^' against M as follows:



  * If M^'=M, then λ is returned.


  * If M^'>M, then n<r hence n^' is lifted to n.


  * If M^'<M, then n≥ r hence n^'' is reduced to
n.


The procedure Probe(  s,m) runs in three
phases, exponential search, binary search, and contraction, which are
elaborated below.



The exponential search is outlined in Table <ref>. It takes
k:=⌈log(  r-s-m+1)  ⌉ iterations to
either hit a member λ∈Λ_s(  M,N) or reach

    n^'     =(  s+m-1)  +2^k-1,
    
    n^''     =min{(  s+m-1)  +2^k,N-M+m}
    .

For each j∈[  k], the j-th iteration selects the candidate

    n=min{(  s+m-1)  +2^j,N-M+m}  ,

invokes PBF(  s,m,n) on G_s to compute f(
i)  =f_s(  m,i) for s+m≤ i≤ n and f(  i)  =f_s(  m+1,i) for s+m+1≤ i≤ n,
and completes the sampling operation on λ=δ_s(  m,n)
=f(  n)  -f(  n). If the sampling
operation reduces n^'' to n, then the binary search follows,
inheriting f(  i)  =f_s(  m,i) for s+m≤ i≤
n^'' and f(  i)  =f_s(
m+1,i) for s+m+1≤ i≤ n^''. 






The binary search is outlined in Table <ref>. As long as n^''-n^'>1, a binary-search iteration chooses the median
n:=⌈(  n^'+n^'')  /2⌉ and completes the sampling operation on λ=δ_s(  m,n)
=f(  n)  -f(  n). When
n^''-n^'=1, r=n^'' and the membership of
λ=δ_s(  m,r)  =f(  r)
-f(  r) in Λ_s(  M,N) is tested by
comparing M^''=d_s^max(  λ,N) against
M. If M^''≥ M then δ_s(  m,r)
∈Λ_s(  M,N) and is thus returned. Otherwise,

    δ_s(  m,r)  <δ_s(  M-1,N)  ≤δ
    _s(  M,N)  <δ_s(  m,r-1)  .

and the contraction phase follows. 






The contraction phase is outlined in Table <ref>. It first
computes

    h(  j)  =min_s+m≤ i<r[  f(  i)  +c_s(
    i,j)  ]

for each j∈[  r:N]. Since f(  i)  +c_s(
i,j) is submodular in (  i,j) on the lattice [
s+m:r-1]  ×[  r:N],  h(  j) for
j∈[  r:N] can be computed by the SWAWK algorithm.
Subsequently, s is overwritten with r-1 and M is decreased by m.







In the remaining of this section, we derive the time and space complexity of
the procedure Probe(  s,m).




 The procedure Probe(  s,m) runs in

    O(  m(  r-s-m+1)  +(  N-s+1)  log(
    r-s-m+1)  )  .

time and O(  N) space.





The worst-case running time occurs when the contraction phase is reached. The
contraction phase has O(  N-s+1) running time. The total
running time of the other two phases is dominated by the invocations of
PBF(  s,m,n) and the computations of d_s^min(  λ,N) or d_s^max(  λ,N). We
show that the former's total running time is

    O(  m(  r-s-m+1)  )

and the latter's total running time is

    O(  (  N-s+1)  log(  r-s-m+1)  )  ,

from which the lemma follows.

Let

    k=⌈log(  r-s-m+1)  ⌉ .

Then the exponential search takes k iterations. In the j-th iteration with
j∈[  k],

    n=min{(  s+m-1)  +2^j,N-M+m}  ;

hence the invocation PBF(  s,m,n) has running time

    O(  m(  n-s+1-m)  )  =O(  m2^j)  .

Since

    m∑_j=1^k2^j=2m(  2^k-1)  <4m(  r-s-m+1)  ,

the invocations of PBF(  s,m,n) in the exponential
search is

    O(  m(  r-s-m+1)  )  .



The exponential search takes k computations of d_s^min(
λ,N). At the beginning of the binary search,

    n^'     =(  s+m-1)  +2^k-1,
    
    n^''   ≤(  s+m-1)  +2^k.

As n^''-n^'≤2^k-1, the binary search takes at most
k-1 iterations, hence has at most k-1 computations of d_s^min(
λ,N) and one computation of d_s^max(  λ
,N). Thus, there at most 2k computations of d_s^min(
λ,N) or d_s^max(  λ,N) in total, and
each computation takes O(  N-s+1) time. So, the total time by
the computations of d_s^min(  λ,N) or d_s^max(  λ,N) is

    O(  (  N-s+1)  log(  r-s-m+1)  )  .



The linear space complexity of Probe(  s,m) follows
from that both PBF(  s,m,n) and the computation of
d_s^min(  λ,N) or d_s^max(
λ,N) require linear space.






§ THE CONTRACT-AND-CONQUER ALGORITHM






Suppose G_1=G is a Monge DAG on [  N] with edge-length
function c_1=c, and 2≤ M≤ N-2. Denote Λ^∗:=Λ
_1(  M,N). Computing a path in 𝒫_1^∗(
M,N) is reducible in linear time and space to finding a member
λ∈Λ^∗. In this section, we present a contract-and-conquer
(C&C) algorithm for finding a member λ∈Λ^∗ in linear
space and O(  √(NM(  N-M)  log(  N-M)
)) time. 



If  M(  N-M)  ≤4Nlog(  N-M), then the C&C
algorithm simply invokes PBF(  1,M,N) on G_1 and
returns λ=δ_1(  M,N) in linear space and

    O(  M(  N-M)  )  =O(  √(NM(  N-M)
    log(  N-M)  ))

time. In the remaining of this section, we assume

    M(  N-M)  >4Nlog(  N-M)  .

Then 16<M<N-16. Indeed, N-M>16 follows from

    (  N-M)  /log(  N-M)  >4N/M>4,

which further implies

    M>4N/N-Mlog(  N-M)  >4log(  N-M)  >16.





Let

    K:=⌈√(M(  N-M)  /Nlog(  N-M)  
    )⌉ .

Then 2<K<√(M) as

    2<K≤⌈√(M/log(  N-M)  )⌉≤⌈√(M)/2⌉ <√(M).

Hence K/M>√(M)>4. Denote K^':=K-MmodK, and
partition M evenly into K integers m_1,m_2,⋯,m_K
where

    m_k={[      ⌊ M/K⌋ , if 1≤ k≤ K^';;      ⌈ M/K⌉ ,  if K^'<k≤ K. ].

Then, m_k≥4 for each 1≤ k≤ K. 



The C&C algorithm implicitly maintains a Monge DAG G_s on
[  s:N] with edge length function c_s for some s≥1.
Initially, s=1. Each G_s with s>1 is generated from G_1 by
successive contractions and is explicitly represented by a global
array h of size N such that h(  j)  =c_s(  s,j) for each j∈[  s+1:N]. The C&C algorithm proceeds in at
most K successive stages. At the beginning of the stage k≤ K, the
following invariant properties are maintained:  



  * M=∑_i=k^Km_i≤ N-s-1; 


  * Λ_s(  M,N) in G_s is Λ^∗. 


These properties hold trivially for the first stage k=1 where
s=1. The stage k runs as follows depending on whether k=K or not.



Suppose k<K. As

    4     ≤ m_k=M-∑_i=k+1^Km_i≤ M-4,
    
    4     ≤ M≤ N-s-1,

the stage k invokes Probe(  s,m_k) on G_s. If
the invocation of Probe(  s,m_k) finds a member
λ∈Λ_s(  M,N)  =Λ^∗, then the C&C
algorithm terminates with the output λ. Otherwise, the
invocation of Probe(  s,m_k) contracts
G_s by updating s and h and reduces M by m_k. After the
contraction, 



  * M=∑_i=k+1^Km_i≤ N-s-1; 


  * Λ_s(  M,N) in G_s is Λ^∗ by
Theorem <ref>. 


The C&C algorithm then moves on to the stage k+1. 



Suppose k=K. Then the (last) stage K simply invokes PBF(
s,M,N) on G_s, computes λ=δ_s(  M,N),
and terminates with the output λ.  



The data structures needed by the C&C algorithm are just a few global arrays
indexed of size N. The array h is used for representing the graph G_s.
Two arrays f and f are used by the procedure PBF
(  s,m,n). The computation of d_s^min(
λ,N) or d_s^max(  λ,N) and the
invocation of SMAWK algorithm require linear working space. We remark that
there is no need to explicitly maintain the sequence m_1,m_2,⋯
,m_K. They can be easily derived from the stage number k and K^'=K-MmodK. Thus, the C&C algorithm has linear space
complexity.  



Next, we derive the time complexity of the C&C algorithm.




The C&C algorithm has time complexity O(  √(NM(  N-M)
log(  N-M)  )). 





Clearly, the worst-case running time occurs when the stage K is reached. For
each 1≤ k≤ k, let s_k be the root s at the beginning of the
stage k. Then, s_1=1; and for each k<K, s_k+1+1 is exactly the
pivot r in stage k. Thus, for each k<K, s_k+1+1≥ s_k+m_k+1
implying that s_k+1≥ s_k+m_k. At the beginning of the last stage
K, m_K≤ N-s_K-1; hence

    s_K+m_K+1≤ N.



By Lemma <ref>, each stage k<K has running time

    O(  m_k(  s_k+1-s_k-m_k+2)  )  +
         O(  (  N-s_k+1)  log(  s_k+1-s_k-m_k
    +2)  )  .

The stage K has running time

    O(  m_K(  N-s_K-m_K+1)  )  .

So, the total running time is

    O(  ∑_k=1^K-1m_k(  s_k+1-s_k-m_k+2)
    +m_K(  N-s_K-m_K+1)  )  
         +O(  ∑_k=1^K-1(  N-s_k+1)  log(
    s_k+1-s_k-m_k+2)  )

We show the two sums in the big-O notations are bounded respectively by

    M/K(  N-M)  +N+M,
        N(  K-1)  log(  n-M)  .



By the definition of m_k for k∈[  K], we have

    ∑_k=1^K-1m_k(  s_k+1-s_k-m_k+2)  +m_K(
    N-s_K-m_K+1)  
         <∑_k=1^K-1m_k(  s_k+1-s_k-m_k)  +m_K(
    N-s_K-m_K)  +2M
       ≤⌈M/K⌉∑_k=1^K-1(
    s_k+1-s_k-m_k)  +⌈M/K⌉(
    N-s_K-m_K)  +2M
         =⌈M/K⌉(  N-M-1)  +2M
         <M/K(  N-M)  +N+M.



By the concavity of the logarithm function and the inequality in equation
(<ref>), we have

    ∑_k=1^K-1(  N-s_k+1)  log(  s_k+1-s_k
    -m_k+2)  
         <N∑_k=1^K-1log(  s_k+1-s_k-m_k+2)  
       ≤ N(  K-1)  log(  ∑_i=1^K-1(
    s_k+1-s_k-m_k)  /K-1+2)  
         =N(  K-1)  log(  s_K+m_K-M-1/K-1+2)  
       ≤ N(  K-1)  log(  N-M-2/K-1+2)  
       ≤ N(  K-1)  log(  n-M)  .



Finally, by the choice of K in equation (<ref>),

    M/K(  N-M)  ≤M(  N-M)/√(M(  N-M)
    /Nlog(  N-M)  )=√(NM(  N-M)  log(
    N-M)  ).

and

    N(  K-1)  log(  n-M)  ≤ N√(M(
    N-M)  /Nlog(  N-M)  )log(  N-M)  
         =√(NM(  N-M)  log(  N-M)  ).

Therefore, the theorem holds.




The rationale for the choice of K, the number of stages, given by equation
(<ref>) is now clear from the above proof. This choice is to strike
a balance between the invocations of PBF(  s,m,n) and
the computations of d_s^min(  λ,N) or d_s^max(  λ,N). 





§ CONCLUSION






For the O(  poly(  log N)  ) and N-O(
poly(  log N)  ) regimes of M, the C&C algorithm has
running time O(  N· poly(  log N)  ). It
remains open whether there is O(  N· poly(  log N)
)-time algorithm in the regime of M where both M and N-M are at
least Ω(  poly(  log N)  ). It seems quite
possible that with some additional cleverness our algorithm could be made to
run faster. Note that the membership test of λ in Λ^∗=Λ_1(  M,N) via d_s^min(  λ,N) and d_s^max(  λ,N) in G_s(  λ) can also be done via d_1^min(  λ,N) and
d_1^max(  λ,N) in G_1(  λ),
and the same asymptotic upper bound O(  √(NM(  N-M)
log(  N-M)  )) on the total running time is still valid.
Each time we compute d_1^min(  λ,N) or d_1^max(  λ,N), we actually produce the parametric shortest-path
tree T_1^min(  λ,N) or T_1^max(
λ,N). Our current algorithm utilizes only the value
d_1^min(  λ,N) or d_1^max(
λ,N) and throws away all the information about the
shortest-path tree. Possibly some information of the shortest-path trees could
be reused to achieve an improved running time. All strongly polynomial
algorithms seek a member of Λ^∗ from the finite candidate pool of
δ_s(  m,n) for (  m,n)  ∈ℒ_s.
One may expand the finite candidate pool with extra candidates which can be
generated easily and lead to faster progress. Ultimately, the disparate
dependence on M of the running times of different algorithms suggests that a
faster “hybrid” algorithm may be composed
in an adaptive manner.



99                                                                                               


AKM+87A. Aggarwal, M. Klawe, S. Moran, P. Shor, and R. Wilber,
Geometric applications of a matrix-searching algorithm, Algorithmica 2:
195–208, 1987.

AST94A. Aggarwal, B. Schieber, and T. Tokuyama, Finding a minimum
weight K-link path in graphs with Monge property and applications,
Discrete Comput. Geometry 12: 263-280, 1994.

BLP92W. Bein, L. Larmore, and J. Park, The d-edge shortest-path
problem for a Monge graph, Preprint, 1992.

GP90Z. Galil and K. Park, A linear-time algorithm for concave
one-dimensional dynamic programming, Inform. Process. Lett. 33 (6):
309-311. 1990.

Kla89M. Klawe, A simple linear time algorithm for concave
one-dimensional dynamic programming, Technical Report 89-16,
University of British Columbia, Vancouver, 1989.

LS91L. Larmore and B. Schieber, On-line dynamic programming with
applications to the prediction of RNA secondary structure, Journal of
Algorithms 12 (3): 490-515, 1991.

Meg83N. Megiddo, Applying parallel computation algorithms in the
design of serial algorithms, J. Assoc. Comput. Mach. 30: 852-865, 1983.

Sch98B. Schieber, Computing a minimum weight k-link path in
graphs with the concave monge property, Journal of Algorithms 29:
204-222, 1998.

Top11D. Topkis. Supermodularity and complementarity,
Princeton University Press, 2011.

Wil88R. Wilber, The concave least weight subsequence problem
revisited, Journal of Algorithms 9: 418–425, 1988.







 Paper Title: Redefining Lexicographical Ordering: Optimizing Pauli String Decompositions for Quantum Compiling.




Rotational influence on fermions within negative curvature wormholes
     Abdullah Guvendi^ 1[ E-mail: abdullah.guvendi@erzurum.edu.tr  ] ,  Semra Gurtas Dogan^ 2[ E-mail: semragurtasdogan@hakkari.edu.tr (Corr. Auth.) ] ,  R. L. L. Vitória^ 3[ E-mail: ricardo-luis91@hotmail.com ]   

	^ 1 Department of Basic Sciences, Erzurum Technical University, 25050, Erzurum, Türkiye

	^ 2 Department of Medical Imaging Techniques, Hakkari University, 30000, Hakkari, Türkiye

	^ 3 Faculdade de Física, Universidade Federal do Pará, Av. Augusto Corrêa, Guamá, Belém, PA 66075-110, Brazil
    
============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================


















§ ABSTRACT 
In quantum computing, the efficient optimization of Pauli string decompositions is a crucial aspect for the compilation of quantum circuits for many applications, such as chemistry simulations and quantum machine learning. In this paper, we propose a novel algorithm for the synthesis of trotterized time-evolution operators that results in circuits with significantly fewer gates than previous solutions. Our synthesis procedure takes the qubit connectivity of a target quantum computer into account. As a result, the generated quantum circuit does not require routing, and no additional CNOT gates are needed to run the resulting circuit on a target device. We compare our algorithm against Paulihedral and TKET, and show a significant improvement for randomized circuits and different molecular ansatzes. We also investigate the Trotter error introduced by our ordering of the terms in the Hamiltonian versus default ordering and the ordering from the baseline methods and conclude that our method on average does not increase the Trotter error.



Circuit synthesis, Pauli string, Lexicographical ordering, Phase gadgets, Trotter decomposition, compilation, optimization





§ INTRODUCTION

With the increasing size and quality of current quantum computers comes a need for efficient compilation algorithms that can process more complicated circuits in polynomial time without generating more operations than necessary. In this paper, we focus on the synthesis of Hamiltonian time evolution operators to quantum circuits constrained under the qubit connectivity of a target quantum computer. These operators can be found in the ubiquitous Ising model as well as algorithms such as the unitary-coupled cluster ansatz (UCC) <cit.> or the Harrow–Hassidim–Lloyd (HHL) algorithm <cit.>, among others. Similarly, sequences of multiple controlled rotations can also be represented as a sequence of Pauli string operations which are common in e.g. Amplitude Encoding <cit.>, and Linear Combinations of Unitaries <cit.>, among others.
Moreover, they form a universal representation, so any quantum algorithm can be rewritten into a product formula that contains only time evolution operators. 
While time evolution operators in algorithms can be easily determined for classical simulation, transpiling the same operations to gates on a quantum device is not obvious. 

In this context, our proposed method synthesizes a quantum circuit from the first-order Suzuki-Trotter decomposition of the target Hamiltonian's time evolution operator (i.e. a product of exponentiated Pauli strings). Additionally, the algorithm takes qubit connectivity into account during synthesis. As a result, the synthesized circuit is already routed and no additional SWAP gates are required to run the circuit on the target device.  
Along the way, we extend a previous method of ours <cit.> to more effectively synthesize Clifford tableaus by allowing a final permutation either implemented on the quantum circuit or by a permutation of swaps.

Our experiments show that the introduced algorithm significantly improves the number of CNOTs, the circuit depth, and the CNOT depth with respect to Paulihedral <cit.> and TKET <cit.>, both in the constrained and unconstrained case. In the case of targeting a restricted architecture, our proposed method improves these metrics up to an order of magnitude for UCCSD ansatzes.



§ PRELIMINARIES AND RELATED WORK



 §.§ Pauli Gadgets and Pauli Polynomials


In this work, we consider Trotterized time evolution operators written in the form 
    U = e^-i ∑_n (θ_n/2⊗_m P_m )≈(∏_n e^-i θ_n/2r⊗_m P_m)^r,

where P_m is a single-qubit Pauli operator, and r the number of repetitions of the circuit.  The tensor of Pauli gates can also be written as a sequence of the letters representing each Pauli gate i.e. representing X ⊗ I ⊗ X ⊗ Y ⊗ Z as XIXYZ. This sequence is also called a Pauli string because it is a word s of arbitrary length over the alphabet {I, X, Y, Z}, or the four Pauli letters. 

Following the conventions in <cit.> and <cit.>, we define a Pauli gadget ϕ with a Pauli string s and angle θ:

    ϕ(θ, s) = exp(-iθ/2 s )

Additionally, we also utilize their convenient graphical representation of the Pauli gadget in the ZX-calculus:

    exp(-iθ/2IXYZ) = figures/PauliExpDef


 In this representation, each non-identity Pauli letter in s maps to a leg on the corresponding qubit or wire, each attached to a central "spider" containing the angle information, as shown in <ref>.
 Then, given a Hamiltonian described by a sum of weighted Pauli strings, we can approximate the corresponding time evolution operator in terms of Pauli gadgets. We refer to such a representation as a Pauli polynomial. For example, given one such arbitrary Hamiltonian H = α IXYX + β IZZI + α IXYY + β IYYI, where α, β∈ℝ, we could approximate the time evolution operator over a time step t as follows:

    figures/PauliExpTrotter

This notation is equivalent to that used in <cit.> with the difference being that our notation can be considered a dialect of the ZX-calculus <cit.> and, therefore, all equalities presented in this work can be considered mathematical equations. 
Additionally, this representation includes well-defined rules for propagating Clifford gates through Pauli gadgets <cit.> that are key for the proposed methods.
The graphical representations of the Clifford operators relevant to this work are then as follows:

    V = figures/VDef  
    V^†   = figures/VDDef  
    H = figures/HDef  
    CNOT = figures/CNOTDef
    
    S    = figures/SDef   S^† = figures/SDagDef ,

where V := √(X).
Then, propagating a CNOT through gadgets with ZZ-legs or ZY-legs is represented as follows:

    figures/PauliExpCXZZra = figures/PauliExpCXZZrb


This equality is used to remove legs from Pauli gadgets with a set formulation in the proposed method. The remaining propagation rules used in this work to manipulate legs are:


    figures/PauliPropva = figures/PauliPropvb


    figures/PauliPropha = figures/PauliProphb


    figures/PauliPropsa = figures/PauliPropsb








    


 §.§ Steiner-Gray Synthesis

Does this belong in related work?

In this work, we extend a specific compilation algorithm introduced by <cit.>,  which we will refer to as steiner-gray synthesis. The algorithm synthesized Z polynomials. The method relies on the fact that Z-phase gadgets commute, allowing for an arbitrary ordering of the gadgets without loss of generality. Following <cit.>, we can find a process to make this algorithm architecture-aware, grouping it into two main processes: The base recursion and the one recursion. With this, the overall goal is to place as few CNOTs as possible in an architecture-aware fashion.


  §.§.§ Base Recursion

During the base recursion, the overall goal is to select a row q_0 of the Z Polynomial to maximize the number of gadgets, with a leg present or non-present. The key concept hereby is dividing the Z Polynomial into as many regions as possible. 


  §.§.§ One Recursion

The goal of the one recursion step is to remove as many legs from row q_0 as possible. Note, therefore <ref>; we observe that if our Pauli-gadget contains only Z-legs, we will either introduce or remove one leg among propagation of a CNOT. 
At last, the particular case remains, where we encounter no legs at all in the selected row q_1; in this case, we can swap the two rows by applying a combination of CNOTs with control and target (q_0, q_1) and (q_1, q_0).



 §.§ A general compilation scheme for the unitary coupled cluster ansatz


<cit.> provide a general compilation scheme for synthesizing the unitary coupled cluster ansatz, which describes a totterized time evolution operator. The core assumption in this algorithm is that any gadget can be swapped if the angles are small. This allows one to neglect the commutation rules required for swapping the gadgets, consequently allowing a regrouping of commuting regions of Pauli Polynomials. Such regions can then be diagonalized in a second step, meaning that it is allowed to rewrite them as a series of Cliffords, combined with a pure Z Polynomial followed by the conjugated series of Clifford gates.
The Z polynomial can then be synthesized using the gray synth algorithm <cit.>. Clifford regions require no further synthesis step.
In combination, the steps of the algorithm can be summarized as follows:

    
  * Regrouping of the Pauli polynomial to commuting regions
    
  * Diagonalization of the commuting regions
    
  * Synthesis of the Z polynomial regions










 §.§ Trotter error

Once a Pauli polynomial has been specified, an ordering of the Pauli gadgets needs to be determined. 
Normally, Pauli gadgets can only be reordered in a circuit if they commute, but since the gadgets emerge from a sum in the exponent (see <ref>), we can reorder the Pauli strings in the sum and, likewise, the corresponding Pauli gadgets, arbitrarily.

However, the transformation in <ref> is approximate and results in a small Trotter error.
Although arbitrarily reordering the individual Pauli gadgets does not worsen the order of the approximation error in trotterized decompositions, investigations by <cit.> indicate that the variance in Trotter error when reordering non-commuting terms is not trivial if interaction terms are large.

Investigations by <cit.>, <cit.>, <cit.>, and <cit.> also indicate that the ordering of terms also impacts the number of entangling gates generated during synthesis, each proposing ordering strategies that reduce both synthesized gate count and theoretical upper bounds for the resultant Trotter error. Additionally, lexicographical ordering, in which the Pauli strings of each component are treated as words and sorted using a strict letter ordering, is shown to be a good heuristic for obtaining gate cancellations between synthesized Pauli gadgets <cit.>, <cit.>.


In this work, similar to the assumptions made in <cit.> in their Paulihedral implementation, we ignore the Trotter error for arbitrarily ordering Pauli gadgets, focusing mainly on reducing entangling gate count. This choice is grounded in the assumption that entangling gates introduce greater error than that introduced by poor ordering. Furthermore, the effects of poor ordering can be mitigated by limiting time step size and utilizing higher order decomposition methods <cit.>. 


Nevertheless, the proposed algorithm can also be used to synthesize the Pauli gadgets in groups. Although, we do not use this feature in our experiments, nor do we provide a grouping heuristic.





 §.§ Related algorithms

Once a grouping of Pauli gadgets is decided, various algorithms exist to synthesize these sets of gadgets. We use two of these as a baseline to the proposed algorithm.

First, we have <cit.>, which assumes a user-specified grouping and uses the coupling map to group the Pauli gadgets based on cumulative qubit distance and attempts to synthesize each layer such that the gates between layers are maximally canceled.

Secondly, we compare against <cit.> where Pauli gadgets are optionally re-grouped using graph coloring. Afterwards, each group is synthesized by diagonalizing the Pauli gadgets and then synthesizing them using GraySynth <cit.>. The idea of <cit.> is to synthesize the gadgets in order of the Gray code <cit.>, such that each subsequent gadget only requires a single CNOT to be synthesized. 


In this paper, we propose an alternative method for ordering and synthesizing a sequence of Pauli gadgets that is inspired by GraySynth <cit.> and its architecture-aware version <cit.>. 







 §.§ Clifford Tableaus

A final component required by our proposed algorithm is Clifford tableau synthesis. The Clifford tableau is a compact representation introduced by <cit.> that specifies a Clifford circuit or operator. More specifically, an n qubit Clifford circuit can be designated by a 2n × 2n matrix and a vector of size 2n, all in GF(2) and the tableau of an empty circuit is an identity matrix.
Appending and prepending Clifford gates to a Clifford operator corresponds to row and column operations on its Clifford tableau. The prepending operations are visualized in <ref>, and the appending operations act transposed with respect to prepending: they act on the respective columns, rather than the rows. 

Given a Clifford tableau, one can synthesize the equivalent quantum circuit as follows, starting with an empty circuit:

    
  * Generate a Clifford gate and its adjoint.
    
  * Append the gate to the circuit and prepend it to the tableau.
    
  * Continue until the Clifford tableau is an identity matrix.

In this paper, we adapted one of our previous algorithms <cit.>, which uses the structure of the RowCol algorithm <cit.> for CNOT synthesis and applies it to the Clifford tableau synthesis from <cit.>, <cit.>.



    






§ METHODS


The proposed algorithm combines the ideas from the related algorithms into a single architecture-aware strategy for synthesizing these trotterized Hamiltonians. 
The algorithm expects a set of Pauli gadgets that can be decomposed in arbitrary order, and returns a quantum circuit implementing those Pauli gadgets.
The structure of this algorithm is an adaptation of GraySynth <cit.> and its architecture-aware variant <cit.>. The outline of the algorithm is as follows, with the functions  and  defined in <ref>:

    
  *  Choose a qubit q_pivot to remove from the problem, according to heuristic h_pivot.
    
  *  Synthesize any Pauli gadgets that are connected to only a single qubit:  them and place the R_Z(α) gate. Then, remove these gadgets from the problem.
    
  *  Split the Pauli gadgets into groups based on the letters on the legs on q_pivot.
    
  *  Take the Pauli gadgets that are not connected to q_pivot, i.e. with an I on the leg, and go to step <ref> with q_pivot removed from the problem.
    
  *  Choose another qubit q_neighbor that is highly entangled with the chosen qubit according to the remaining Pauli gadgets, according to heuristic h_n.
    
  *  If there are Pauli gadgets not connected to q_neighbor,  as many Pauli gadgets as possible with respect to the first qubit, and place two CNOT gates between the two qubits to  the first qubit.
    
  *  Otherwise,  as many remaining Pauli gadgets as possible by placing at most two single qubit Clifford gates to  some Pauli gadgets (i.e. convert legs to {Y, Z}, see <ref> for specifics) and a CNOT gate between the two chosen qubits to disconnect the gadgets (see <cit.> for an overview).
    
  *  Repeat step <ref>: split the remaining Pauli gadgets.
    
  *  Repeat step <ref>: go to step <ref> with disconnected Pauli gadgets and q_pivot removed from the problem.
    
  *  Go to step <ref> with the remaining remaining Pauli gadgets.

The adjoint of all synthesized Clifford gates are aggregated into a Clifford tableau and later synthesized (e.g. using <cit.>) and all unfinished Pauli gadgets are updated according to the Clifford gate commutation rules <cit.> whenever a Clifford gate is synthesized.
Additionally, the algorithm can be adjusted to synthesize the Pauli gadgets in the given order by iteratively using this procedure on sets of mutually commuting Pauli gadgets. In which case, the Clifford tableau collects the Clifford gates from all iterations and the Clifford gates are propagated through all subsequent Pauli gadgets, including those in future iterations.
Moreover, this algorithm can be trivially made architecture-aware by choosing a q_pivot in step <ref> that does not disconnect the connectivity graph when removed, and restricting  q_neighbor  in step <ref> to neighbors of the chosen qubit. 

Intuitively, this algorithm tries to greedily find an optimal lexicographical order for the letters, i.e. colors, on each Pauli gadget, per qubit. Because of the greedy nature, we assume that I always comes first in the alphabet, such that we never unnecessarily introduce entanglement with a new qubit. The exception is when this is needed for routing purposes in the architecture-aware case. Moreover, as explained in the remainder of this section, when placing the Clifford gates, we essentially partially decompose the Pauli gadgets and assume that the gates on the other side of the Pauli gadget will cancel out. This is done by propagating the adjoint of the added Clifford gates through all remaining Pauli gadgets and gathering them in a Clifford tableau to be synthesized as a final optimization step. Thus, all Clifford gates are generated as late as possible, on an as-needed basis. As a result, the algorithm does not need to guess a good gadget ordering a priori. Instead, the ordering emerges from the structure of the synthesis procedure, while grouping gadgets with the same letters on the same qubits together. A simple example that steps through the synthesis process is shown in <ref>.















 §.§ Gate placement


To be precise, we  gadgets with respect to a single qubit as follows: if the gadget has no leg or a green leg on the qubit (i.e. I, or Z), we are done, otherwise, we place a single qubit Clifford gate and its adjoint according to the following transformations:[Here, we use the dashed lines to separate the diagram into different regions: the left-most region contains the gates added to the circuit, the middle region is the updated Pauli gadgets, and the right-most region contains gates that are stored in a Clifford tableau for re-synthesis.]

    Xfigures/DiagonalizeXa = figures/DiagonalizeXb = figures/DiagonalizeXc



    Yfigures/DiagonalizeYa = figures/DiagonalizeYb = figures/DiagonalizeYc


The introduced gate is propagated through all following Pauli gadgets, and gathered in the Clifford tableau, following the rules in <ref>.
Note that we choose the rule that s as many Pauli gadgets as possible. Typically, not all affected legs are mapped to a green leg and their updated type must be considered.

After diagonalizing, we  as many Pauli gadgets as possible by placing up to a single qubit Clifford gate and two CNOTs. By construction, the first qubit will always be diagonalized.
The simplest case is when the second qubit is already disconnected. Then, we can swap the two qubits. However, because we know the type of the Pauli gadget, we can remove one of the CNOTs since it commutes with the Pauli gadget and cancels out. Thus, we have:^<ref>

    Ifigures/Swapa = figures/Swapb


If the second qubit is connected, we can match the legs of the Pauli gadgets under consideration as one of three cases, each corresponding to a different Clifford operation to be applied:^<ref>

    Z or Yfigures/DisentangleYZa = figures/DisentangleYZb



    Z or Xfigures/DisentangleXZa = figures/DisentangleXZb



    X or Yfigures/DisentangleXYa = figures/DisentangleXYb


Each introduced rule only removes entanglement for two types of legs in the second wire. However, the second wire can contain X, Y or Z legs. Thus, we choose the option where the most Pauli gadgets are matched and place the corresponding Clifford gates. Then, we propagate these gates through all remaining Pauli gadgets and prepend them to the Clifford tableau.
[figure]font=small, skip=0pt



    







    figures/DisentangleYZa = figures/DisentangleYZb


We can convert any two Pauli rotations to Y and Z rotations before remove operations from q_pivot by propagating a single Clifford gate as follows:


    figures/DisentangleXZa = figures/DisentangleXZb



    figures/DisentangleXYa = figures/DisentangleXYb


Finally, if P_0 = P_1 = I,  moves the legs on q_pivot to q_neighbor using four CNOTs.


    figures/Swapa = figures/Swapb


Up to this point, the operations are similar to synthesis steps in prior Pauli polynomial synthesis algorithms. However, unlike in previous work, where the introduced gates sandwich the remainder of the gadget, the proposed algorithm propagates G through the remainder of the unsynthesized Pauli polynomial and prepends it to a Clifford tableau. Thus, each operation returns a series of G^† operations appended to the synthesized circuit and a series of G operations that are collected in a Clifford tableau, which is synthesized only as the final step.[For brevity, only G^† is returned in the psuedocode as G is easily recovered as the adjoint.]




 §.§ Heuristics

The proposed algorithm relies on choosing a good qubit to perform the splitting heuristic on. For our experiments, we have used the following heuristic and cost function:

    c_q(s_q, g)    = k · P_I(s_q[g]) 
       = +  P_max(s_q[g])  -  P_min(s_q[g]), 
    
        h(g, o)    = arg max_q ∈o(c_q(s_q, g)),  
    
        h_pivot(g, G)    = h(g, {q ∈(G)  |  (q,G)}),  
    
        h_n(q_p, g, G)    = h(g, {q ∈(G)  |   (q_p, q)∈(G)}),

where q_p is the chosen pivot qubit, s_q is the string of Pauli letters of all legs on qubit q, g the set of Pauli gadgets examined, and k describes a weighting factor which we parametrized with k=10. P_I(s), P_max(s) and P_min(s) are all functions acting on the Pauli string and returning a number in 𝐍:
P_I(s) counts the amount of  Pauli I's in s, P_max(s) counts the size of the largest non-I region in s, P_min(s) determines the size of the smallest non-I region in s.

It is possible to tweak the cost function in our heuristic to be more specific to the target architecture. For example, the cost can be weighted based on the fidelity of the qubits or the gates, or adjusted to prefer gate parallelisation. In principle, any cost function would result in a correct algorithm, but with a different performance in terms of resulting gate count. We expect that the design of an optimal cost function is architecture dependent and leave analysis to future work.






















 §.§ Clifford tableau synthesis up-to-permutation

The last step of our algorithm is the synthesis of the Clifford tableau with the propagated Clifford gates. For this, we use an adaptation of the method proposed by <cit.>. We extend this algorithm to include the trick from <cit.> that allows us to synthesize the tableau up-to-permutation; emulating the movement of qubits on the quantum computers. Thus, the resulting circuit might have qubits that are moved to a different register than they were originally placed in. This is a normal phenomenon in quantum circuits that have been routed using SWAP gates and it allows us to reduce CNOT count.

Similar to the proposed algorithm, the Clifford tableau synthesis algorithm <cit.> uses a heuristic for picking which qubit to synthesize and remove from the problem. While the final Clifford tableau is typically an identity matrix, we can alternatively end the synthesis procedure when the Clifford tableau is a permutation matrix. The permutation then corresponds to a relocation of the qubits on the quantum computer. We do this by introducing a secondary heuristic for choosing which register (i.e. column in the tableau) the chosen qubit goes to, following the strategy from <cit.>. Lastly, we need to take care that the signs of the qubits are corrected on the new qubit register and not the old one.

When selecting the logical qubit (row), we choose the following heuristic:

    h_row(r)     = ∑_i [𝕀(T_r,i≠ 0 ∨ T_r,i+q≠ 0) .
       .    + 𝕀(T_r+q,i≠ 0 ∨ T_r+q,i+q≠ 0)],

where T is a Clifford tableau, and q is the number of qubits. This heuristic favors the row with the fewest interactions. When choosing a physical qubit (column), we look for the shortest CNOT distance, which is approximated by summing up the distances of rows along the connectivity graph:

    h_col(c)     = ∑_i [𝕀(T_c,i≠ 0 ∨ T_c,i+q≠ 0) .· d_c, i
       .    + 𝕀(T_c+q,i≠ 0 ∨ T_c+q,i+q≠ 0) · d_c, i]

Here d_i,j, describes the shortest path between i and j, something which can be efficiently precomputed using the Floyd-Warshall algorithm <cit.>.




 §.§ Perm Row Col Clifford

In the final step of our algorithm, we use an adaptation of the algorithm proposed by
<cit.> that synthesizes a stabilizer circuit from a Clifford tableau in an architecture-aware fashion. This algorithm, inspired by <cit.>, iteratively selects a non-cutting vertex in the connectivity graph of the underlying architecture and removes its interaction with the rest of the circuit, utilizing Steiner trees to find minimal placements of architecture-conforming CNOTS[We refer the reader to <cit.> for a more in-depth explanation of the algorithm]. However, this scheme requires an initial mapping of logical (rows in the tableau) to physical qubits (columns in the tableau). 

In this work, we utilize an extended variant of the algorithm to synthesize the final Clifford tableau. The extension introduces the PermRowCol scheme from <cit.>, which identifies an improved mapping during the synthesis process. Thus, instead of a single cost function, two are used: one to identify a logical qubit with a small amount of interaction with the rest of the circuit and a second to identify a non-cutting vertex in the connectivity graph to be removed.
When selecting the logical qubit (row), we choose the following heuristic:

    h_row(r)     = ∑_i [𝕀(T_r,i≠ 0 ∨ T_r,i+q≠ 0) .
       .    + 𝕀(T_r+q,i≠ 0 ∨ T_r+q,i+q≠ 0)],

where T is a Clifford tableau, and q is the number of qubits. This heuristic favors the row with the fewest interactions. When choosing a physical qubit (column), we look for the shortest traversal along the resultant Steiner tree, which is approximated by summing up the distances of rows along the connectivity graph:

    h_col(c)     = ∑_i [𝕀(T_c,i≠ 0 ∨ T_c,i+q≠ 0) .· d_c, i
       .    + 𝕀(T_c+q,i≠ 0 ∨ T_c+q,i+q≠ 0) · d_c, i]

Here d_i,j, describes the shortest path between i and j, something which can be efficiently precomputed using the Floyd-Warshall algorithm <cit.>.

The final permutation on the stabilizers can be extracted as follows:

    perm_i = arg max_j T_i, j + 2 T_i+q, j,

which implements the logical to physical qubit mapping.




    
















 §.§ Runtime Complexity Analysis

The following recurrence relation describes the worst-case runtime of our algorithm:

    T(n) = 
    		1     n = 0 
    
    		4T(n-1) + nq    otherwise

where n is the number of gadgets in the Pauli polynomial, and q is the number of qubits. One can see that this is true since our method requires per step at most 𝒪(nq) many operations to compute the heuristics, reorder the gadgets, and propagate Clifford gates through the Pauli polynomial. Secondly, the worst case in splitting the Pauli polynomial is to select one gadget in one of the recursion steps and partition the rest to the others [Note that this would be equivalent to decomposing one gadget and propagating the gates throughout the rest of the Pauli polynomial.]. Furthermore, we can see that <ref> is bound by 𝒪(n^2q + q^4), which yields the closed-form upper bound in terms of runtime. The term 𝒪(q^4) arises from synthesizing the Clifford tableau <cit.>.



 §.§ CNOT Complexity Analysis


Given that per n of the gadgets, at most q many CNOTs are required to synthesize it entirely, and given that there are at most n gadgets, a bound can be found from the fact that there are at most 𝒪(nq) CNOTs required to synthesize the whole Pauli polynomial. Since the remaining gadgets are collected in a Clifford tableau, which requires at most 𝒪(q^2) many CNOTs among synthesis, we arrive at an overall overhead of 𝒪(nq + q^2) CNOTs. We want to emphasize that this bound is quite naive since duplicates are canceled when propagating the CNOTs through the rest of the Pauli Polynomial. So the average bound might be much tighter as indicated by our evaluations.



§ EXPERIMENTS

We investigated the performance of the proposed methods on both architectures with all-to-all connectivity (refereed to as complete architectures) and restricted architectures, namely those available in the IBM Software stack[Our implementation can be found on Github: <https://github.com/daehiff/pauliopt/tree/new_methods>. 
]. In our experiments, we targeted the following IBM backends: quito (5 qubits),  nairobi (7 qubits), guadalupe (16 qubits), mumbai (27 qubits), and ithaca (65 qubits). 

All experiments were run using a process pool where each combination of circuit and synthesis strategy was distributed as tasks in a multi-threaded manner. Each synthesis strategy ran completely serially with no other innate parallelism.

For the randomized experiments, we synthesized 20 random Pauli polynomials with increasing gadget count for each architecture. The leg count was uniformly sampled from {1..q}, where q is the size of the given architecture. The leg positions were randomly selected and its Pauli letter was uniformly sampled from {X,Y,Z}. The gadget angle was uniformly sampled from {π, π/2, π/4, π/8, π/16}. 

Additionally, we synthesized the molecules present in pytket's UCCSD test set. These correspond to Hamiltonians used to estimate the ground state energy of small molecules and were used as benchmarks in <cit.>.

We compare the proposed methods against Paulihedral <cit.>  and the UCCSD pair-wise and set-based synthesis methods in <cit.>. As a baseline, we included a naive Steiner tree-based decomposition which did not use any reordering. An additional routing step utilizing pytket <cit.> is used for methods that are not architecture-aware. To compare apples with apples, all circuits are synthesized to the gateset {CNOT, U3} and evaluated on CNOT count, circuit depth, and CNOT depth. 

Since the gadget ordering found by our algorithm affects the Trotter error, we also calculated the Trotter error of all methods for random circuits and two molecules: H2 (in 631g with parity encoding) and H4 (in sto3g with parity encoding).



 §.§ Random Pauli polynomials

We present the average CNOT count, circuit depth, and two-qubit gate depth of the synthesized circuit in <ref> and <ref>, for restricted and complete architectures respectively.
For both cases, the proposed algorithm improves across the board for deep circuits (>50 gadgets). We hypothesize that this is a consequence of collecting operations in a Clifford tableau, which avoids the construction of the full CNOT ladder (i.e. sequence of CNOTs) in gadget synthesis as we propagate the second half of the ladder through the remainder of the polynomial. Thus, subsequent gadgets can now produce transverse two-qubit gates. 
Interestingly, we see that for shallow circuits (<50 gadgets), the proposed method performs worse on CNOT count, we attribute this to the greedy choosing of rows with large numbers of I legs, effectively routing rotations through long chains of I. Additionally, the proposed algorithm uses a naive initial placement of the qubits while both Paulihedral and TKET are able to find a better qubit mapping as a starting point for synthesis.



 §.§ UCCSD molecular ansatzes

Comparison of the three metrics for the various examined algorithms can be found in <ref>, <ref>, and <ref>. In this experiment, we synthesized each molecule for the smallest IBM device that would fit the circuit. We applied a time-out of 60 minutes but we found that in some cases the threads had been suspended resulting in incorrect runtimes. For a fair comparison, we decided to only present the molecules for which all methods finished and to omit runtime results.

From the tables, we can see that the proposed algorithm shows a clear improvement over the other examined methods; the only exception is the three smallest molecules. We hypothesize that this is, once again, due to the lack of qubit mapping and the greedy heuristic .




 §.§ Evaluation of the Trotter error

As the chosen ordering of Pauli gadgets is determined heuristically, the new order may increase the resulting Trotter error. Hence, we investigated the unitary overlap of the exact time evolution operator U_exact = exp( -i θ/2 H)  and the synthesized circuit U_circuit, as in  <ref>:

    overlap = ⟨0| U_exact U_circuit^†|0⟩

We used 20 randomly generated Pauli polynomials with six qubits and 160 gadgets. Each gadget had uniformly distributed legs across the six qubits with a type in [X, Y, Z]. The rotation angle was uniformly sampled from: [ π/32, π/64, π/128]. Additionally, we performed this investigation on molecules  and  from pytket's UCCSD test set <cit.>. For those molecules, we again picked the angles of the individual gadgets at random from the set [ π/32, π/64, π/128] to facilitate a fair comparison among the experiments.

We examined the overlap for all cases over multiple timesteps in [0:2π], and the results are plotted in <ref>. We omit TKET UCCSD (pair) from the figure as it does not change the ordering of the Pauli gadgets and the Trotter error would be equal to that of naive synthesis.

Across the various cases, we see that the proposed method is comparable to default Trotterization. Still, the best possible performance of each algorithm depends on the molecule's structure.
myTableStyletabular=|l|l|c|c|r|r|r|r|r|,
        table head=Molecule.     Backend.     # Qubits.     Naive     Paulihedral     TKET (set)     TKET (pair)     Proposed 
,
        late after line=
,
        head to column names,
        respect underscore=true
        














§ CONCLUSION

In this work, we introduce a novel method for architecture-aware Pauli polynomial synthesis, which propagates synthesized gates through the remainder of the polynomial. As a consequence, we introduce an alternative lexicographical grouping methodology that emerges from the structure of the proposed algorithm. We additionally describe an extension to the architecture-aware synthesis introduced in <cit.> that allows Clifford tableau synthesis up-to-permutation. We observe that the introduced method outperforms other examined methods on both restricted and complete architectures and, for the small set of test cases observed, does not seem to introduce significant Trotter error when compared with similar algorithms. 

Although investigation of the Trotter error associated with the proposed method is preliminary, we note that the error introduced by the noisy gates in the resulting circuits of alternative methods vastly outweighs the potential difference in Trotter error in cases where the proposed method worsens Trotter error. Considering the scale of improvement in gate counts and depth as observed with our method, reducing Trotter error will become a factor in fault tolerant devices.

Nevertheless, there are several areas for future improvement. One key weakness of our introduced algorithm is the cost function for pivot selection; for shallow regions, it removes interactions inefficiently. This means that the final recursions in the algorithm likely introduce unnecessary two-qubit operations. This can be addressed by improving or tuning the cost function or by introducing methods such as reverse traversal <cit.> to improve the initial qubit mapping. The current algorithm also does not find a good qubit placement during synthesis, incorporating a scheme similar to PermRowCol may be further improve its overall performance.

We additionally note that the time to solution for the proposed method is not ideal, taking up to 30 minutes on a local workstation for the largest, deepest circuits in our experiments. Although this can be partially attributed to unoptimized python code, algorithmic improvements may be necessary for future larger devices. Methodologies such as `parallel-in-time' may be interesting to investigate if the cost of propagated Clifford tableaus through synthesized regions is low and does not impact performance significantly. The current algorithm can also beextended to support the synthesis of higher-order symmetric product formulas mentioned in <cit.> or other higher-order decompositions 
<cit.>. Additionally, the algorithm can be represented as row additions in a 2q× g matrix, where q is the number of qubits and g the number of Pauli gadgets, which suggests that an efficient GPU implementation is possible.

In summary, the architecture-aware synthesis of Pauli gadgets offers a powerful alternative to existing methods to synthesize Pauli-based product formulas on restricted architectures; architecture-conforming algorithms reduce routing overhead tremendously, a key step to enable effective quantum hardware usage in the near term.







IEEEtran

  





 Paper Title: Log Diameter Rounds MST Verification and Sensitivity in MPC.


Changing-look Active Galactic Nuclei from the Dark Energy Spectroscopic Instrument. II. 

Statistical  Properties from the First Data Release 

    [
    August 5, 2024
===============================================================================================================================================



§ ABSTRACT 
We consider two natural variants of the problem of minimum spanning tree () of a graph in the parallel setting: verification (verifying if a given tree is an ) and the sensitivity analysis of an  (finding the lowest cost replacement edge for each edge of the ). These two problems have been studied extensively for sequential algorithms and for parallel algorithms in the model of computation. In this paper, we extend the study to the standard model of Massive Parallel Computation ().

It is known that for graphs of diameter D, the connectivity problem can be solved in O(log D + loglog n) rounds on an with low local memory (each machine can store only O(n^δ) words for an arbitrary constant δ > 0) and with linear global memory, that is, with optimal utilization. However, for the related task of finding an ,  we need Ω(log D_) rounds, where D_ denotes the diameter of the minimum spanning tree. The state of the art upper bound for is O(log n) rounds; the result follows by simulating existing algorithms. While this bound may be optimal for general graphs, the benchmark of connectivity and lower bound for suggest the target bound of O(log D_) rounds, or possibly O(log D_ + loglog n) rounds. As for now, we do not know if this bound is achievable for the problem on an with low local memory and linear global memory. In this paper, we show that two natural variants of the problem: verification and sensitivity analysis of an , can be completed in O(log D_T) rounds on an with low local memory and with linear global memory, that is, with optimal utilization; here D_T is the diameter of the input “candidate ” T. The algorithms asymptotically match our lower bound, conditioned on the 1-vs-2-cycle conjecture.




§ INTRODUCTION

Over the last decade, the heightened need to solve problems on ever-increasing volumes of data has motivated the successful development of massively parallel computation frameworks, such as MapReduce, Hadoop, Dryad, and Spark, see, e.g., <cit.>.
In turn, the prevalence of these frameworks has led to a huge interest in the design of efficient parallel algorithms.

The Massively Parallel Computing () model is a theoretical model which abstracts these massively parallel computation frameworks.
The model was first introduced by Karloff, Suri, and Vassilvitskii <cit.>, and is now the standard theoretical model for these systems (see also, e.g., <cit.>).

An is a parallel computing system with machines.
Each of these machines has words of local memory; in total the system has · = global memory.
The input to an algorithm is arbitrarily distributed among the machines.
Computation in the model takes place in synchronous rounds.
In each round, each machine does some computation on the data in its local memory.
Then, machines exchange messages: each machine may send as many 1-word messages as it likes to any other machine, as long as in total, each machine sends and receives at most words in any given round.
The complexity of an algorithm is measured in the number of rounds.

For graph problems, our input is an edge-weighted graph G = (V, E) with n vertices, m edges, and weighting function w: we assume that the weight of any edge can be expressed with O(1) words. In this paper, we focus on the design of low-space (fully scalable) algorithms, where the local memory of each machine is = O(n^δ) for some (arbitrary) constant δ∈ (0, 1). Our focus is on designing algorithms with optimal utilization, that is, those achieving linear global memory: for graph problems, this means that = Θ(m+n). The goal is to design algorithms that for a given with for local memory = O(n^δ) and with linear global memory minimizes its complexity (the number of rounds performed). Of course, optimally, we would like to achieve a constant number of rounds, but for many problems, the best we could hope for is a sub-logarithmic number of rounds.

The low-space regime, which we consider in this paper, is the most challenging of the local memory regimes usually considered in the model.
Nevertheless, it is a more powerful model than the model: a step of can be simulated in O(1) rounds of the model 
and sorting or computing the prefix-sum of N values can be done in O(1) rounds on an with local memory = O(N^δ), see, e.g., <cit.>.

In this paper, we study the complexity of important variants of the fundamental graph problem of Minimum Spanning Tree (). The problem has been extensively studied for many decades. After many years of extensive research, we know the problem can be solved by a randomized algorithm in O(m)-time <cit.>, though we still do not know the exact deterministic complexity of the problem (see, e.g., <cit.>). Similar efforts have been also taking place for parallel algorithms, largely focusing on algorithms, where O(log n)-time algorithms can be achieved with almost optimal total work. Given the importance of the problem, there has been also extensive research studying its variations, most prominently the natural variants of verification and sensitivity problems, see, e.g., <cit.>.



Given a graph G=(V, E) with edges weighted by a function w: E →ℕ, and a tree T ⊆ E, the goal is to determine whether T is an of G.




The sensitivity problem is for a given graph G=(V, E) and an T ⊆ E, to calculate a sensitivity value (e) for all e ∈ E. We define (e) as:


  * for e ∈ T: the amount by which w(e) would have to be increased (with all other edges remaining the same weight) for e to no longer be part of an of G;

  * for e ∈ E ∖ T: the amount by which w(e) would have to be decreased (with all other edges remaining the same weight) for e to be part of an of G.



The problem has been studied also in the model, extending the earlier research for the sequential model and the .

For super-linear local space (= O(n^1+δ)) and linear local space (= O(n)), 
constant-round algorithms have been developed <cit.> with optimal utilization. However, for the setting of low-space , which is the main focus of our paper, the situation is fundamentally different. Let  denote the smallest diameter of a minimum spanning tree of G. We do not expect a constant-rounds algorithm to exist and while there is an O(log) round algorithm (optimal according to a conditional lower bound) if we are allowed polynomial extra global space <cit.>, the best result known with optimal global memory and utilization runs in O(log n) rounds (e.g., by a simulation of algorithms). This is quite a large gap, especially for low-diameter network topologies which are common in real-world settings, and whether this gap can be closed is a major open problem in the area of algorithms. In this paper, similarly as it has been done before for sequential and models, we study two natural variants of the minimum spanning tree () problem in the model: the verification and sensitivity problems.



 §.§ Our Results


We demonstrate that while we do not know whether the problem can be solved in an optimal number of rounds on an in the low-memory regime and with optimal utilization, the verification and sensitivity problems can be solved optimally.[Throughout this paper, by high probability we mean the result is correct with probability at least 1-1/(n).]


Our first main result is an algorithm for the verification.

<Ref>Verification Algorithm
Let δ be an arbitrarily small positive constant. Let G = (V, E) be an edge-weighted input graph and let T ⊆ E be a tree. Suppose the diameter of T is .

One can decide with high probability whether T is an of G in O(log) rounds on an with local memory = O(n^δ) and optimal global memory = O(m+n).


We extend our verification algorithm to the more challenging problem of sensitivity, still obtaining a O(log) round algorithm that uses optimal global memory:

<Ref>Sensitivity Algorithm
Let δ be an arbitrarily small positive constant. Let G = (V, E) be an edge-weighted input graph and let T ⊆ E be an of G with diameter .

The problem of sensitivity can be solved in O(log) rounds (with high probability) on an with local memory = O(n^δ) and optimal global memory = O(m+n).


Finally, we complement <Ref> by showing that this result is optimal: conditioned on the widely believed 1-vs-2-cycle conjecture, Ω(log) rounds are required for verification if our input T is an arbitrary set of n-1 edges of G.

<Ref>Verification Lower Bound
Let δ < 1 be an arbitrary positive constant. Let G = (V, E) be an edge-weighted graph of diameter D.

Let T ⊆ E be a set of n-1 edges of G and let  be the diameter of T.

Deciding whether T is a minimum spanning forest of G requires Ω(log) rounds, on an with local memory = O(n^δ), unless the 1-vs-2-cycle conjecture is false.


We remark that our algorithms can also deal with the problems above even when the input graph G is not connected, in which case our goal is to study the variants of the minimum spanning forest (MSF) problem. All our algorithms can be easily extended to this more general setting since it is known that finding the connected components in a forest can be solved optimally in the sublinear-memory model; see also <Ref>.







 §.§ Technical Challenges and Contributions

To date, the problem of finding an in low-space has been resistant to efficient algorithms with optimal global memory. Our results on the related problems of verification and sensitivity overcome several interesting technical challenges.
Take verification for example: a naive approach to the problem would involve collecting for each vertex u, a path from u to the root of T.
Then, we can use prefix-sum in O(1) rounds to, for each ancestor v of u, find the largest edge on a path from u to v in T.
Then for all non-tree edges {u, v}, where v is an ancestor of u we can check (using sorting) whether the weight of the non-tree edge is smaller than the largest edge on the path from u to v in T.
Doing this for all edges in parallel is the same as checking whether T is an .

The problem with this approach, however, is that it requires O() memory per vertex, and therefore O(m + n·) global memory; in the worst case, O(n^2) global memory, which is extremely undesirable, particularly for sparse graphs. 
To get around this problem, we use an approach of hierarchical clustering (<Ref>).
Initially, each vertex of the graph is a cluster; for O(log) iterations, we contract an independent set of edges in the tree to form larger and larger clusters.
Each iteration reduces the number of clusters by a constant factor (by a result of <cit.>); after O(log) rounds, the number of clusters has been reduced by a factor of (). 
Then, we have enough global memory per cluster to execute our more naive approach, after which we can (if necessary) “un-contract” the clusters and obtain a result for the original graph.

This approach comes with some challenges, however.
In particular, we have to be very careful when performing cluster contraction to preserve enough information to solve the problem.
For example, for verification, for each cluster c, we must preserve the highest weight of an edge on all paths from vertices below c to vertices above it.
For sensitivity (<Ref>) and all-edges (<Ref>) it is significantly more challenging to preserve the necessary information.
We note that our hierarchical clustering is different from a recent clustering employed by <cit.> in a paper on dynamic programming in trees (in particular, our clusters are all of height 2, relative to previous clusters).
We believe that our approach, using clusters to “compress” an input tree to allow for greater space-flexibility, could have further applications for efficient algorithms involving trees in low-space .



 §.§ Related Work

The problem is a fundamental textbook graph optimization problem that has been extensively studied for many decades (see <cit.> for the historical background of the research before 1985). We know the problem can be solved sequentially by a randomized algorithm in O(m)-time <cit.>, but its deterministic complexity still has some small gap (see though <cit.>), with the fastest algorithm to date <cit.> achieves the running time of mα(m,n), where α is a certain natural inverse of Ackermann's function. This research has been extended to the model, where, e.g., Cole <cit.> gave an optimal O(log n)-time randomized algorithm for the problem.

The problem of verifying if a given spanning tree in an edge-weighted graph is an is very closely related to the problem, but unlike the latter, we understand its sequential and complexity very well. Following an early work of Komlos <cit.>, Dixon <cit.> and King <cit.> developed deterministic sequential linear-time algorithms for the problem. In parallel setting, Dixon and Tarjan <cit.> gave an optimal O(log n)-time CREW algorithm which was later extended to the EREW model <cit.>.

For the sensitivity problem, the classical algorithm of Tarjan <cit.> solves it sequentially in O(m α(m,n)) time. Dixon <cit.> designed two sensitivity algorithms, one running in expected linear time and another which is deterministic and provably optimal, but whose complexity is  bounded by O(m α(m,n)). Pettie <cit.> improved this bound and designed a new sensitivity analysis algorithm running deterministically in O(m logα(m,n)) time.

In the last few years, there has been a series of work extending the study of the problem to the model.
For the setting of “super-linear” (where each machine has = O(n^1+δ) local memory), Lattanzi <cit.> gave a O(1) round algorithm for .

For the setting of linear , where each machine has = O(n) memory, a line of work culminated also in O(1) round algorithms for the problem, first randomized <cit.> and then deterministic <cit.>.
Once again, these algorithms relied heavily on the use of connectivity as a subroutine, and these papers also gave randomized and deterministic connectivity algorithms.


For low-space , which is the focus of this paper, results for and related problems have been limited.
A long and celebrated line of work on connectivity culminated in a O(log D + loglog n) round deterministic algorithm for the problem <cit.>, and there is a (conditional) Ω(log D) round lower bound <cit.>. A recent discovery reveals an optimal O(log D) rounds algorithm when the input graph is a forest <cit.>. For , while there is an algorithm which takes O(log) rounds <cit.>, it requires polynomially extra (= O(m^1 + γ) for any positive constant γ) global memory, and hence it does not achieve the optimal utilization.
It recursively partitions the input instance into O(m^γ/2) sub-instances of , each of which also has (proportionally) polynomial extra global memory.
At each level of the recursion, computing the connected components of each sub-instance is required: with extra global memory, this takes O(log) rounds.
Since the algorithm uses O(1) levels of recursion and each level requires a series of connectivity algorithms with extra global memory to be run in parallel (taking O(log) rounds), the algorithm takes O(log) rounds in total.
The algorithm can be implemented to work with optimal global memory, but then the number of rounds degrades to Ω(log n), since the recursion can branch by at most a constant factor. For global space = O(m^1 + γ) for γ = o(1) and γ = Ω(1/log n), one can find in O(1/γmin{loglog(1/γ), log n}) rounds on an with local memory = O(n^δ) (see <cit.>).
In particular, if one wants to focus on the regime with global memory at most (n+m) (n) (i.e., γ = O(loglog n/log n)), then the number of rounds is log n ·min{log, log n/loglog n}.

Observe that except when the global memory is large, we do not know of any algorithm (with sublinear local memory) that solves exactly in o(log n) rounds, even for graphs with small diameter. The approaches used in <cit.> and other related works <cit.> that lead to O(log D + loglog n)-rounds connectivity algorithms seem unsuitable to obtain even O(log n)-rounds algorithms for . (Still, notice that an optimal O(log n)-rounds algorithm can be obtained by simulating algorithms, e.g., from <cit.>.)

Similarly to the connectivity conditional lower bound of Ω(log D)
, there is also a conditional Ω(log) round lower bound for finding an <cit.>, which, for the sake of completeness, we sketch in <Ref>.


For low-diameter graphs the gap between O(log) and O(log n) is potentially huge, and it is not clear how to even obtain (say) an O() round algorithm for the problem. Whether the Ω(log n) round barrier can be broken with optimal global memory is a major open question in the area.


§ PRELIMINARIES AND TOOLS

In this section, we present some notation and preliminaries, along with two important technical tools: a hierarchical clustering approach, which transforms a tree T into a set of n/ clusters; as well as a procedure for finding the lowest common ancestor in the tree of the endpoints of each non-tree edge.

In a rooted tree, let p(v) denote the parent of v; for the root of the tree r, p(r) = r. Further, let p_i(v) denote the ith ancestor of v, i.e. p_1(v) = p(v) and p_i(v) = p(p_i-1(v)).

We introduce a  notion of a non-tree edge covering a tree edge:



    We say that a non-tree edge e covers a tree edge t if t is one of the edges on the path in T between the endpoints of e.


Observe that the problem of verification is the same as asking: is any tree edge t covered by an edge e with lower weight?

We remark that, without loss of generality, we can assume that our input tree T is a rooted spanning tree:


  Our verification  and sensitivity algorithms can assume that T is a rooted spanning tree of G.


    We can check whether the given tree T is a spanning tree or not by just counting whether the number of vertices in T is n. We can  identify the root of the tree in O(log) rounds (deterministically, and using optimal global memory) by using tree rooting algorithm of <cit.>.



Furthermore, in the following, we remark that both algorithms can assume knowledge of D_T, the diameter of tree T.


    Our verification  and sensitivity algorithms  can  assume the value of D_T.


 Recall the connectivity algorithm on forest by <cit.>. The algorithm takes O(log D) rounds, where D is the diameter of the forest (i.e, the diameter of any component of the forest). Moreover, the algorithm can determine a value D such that D ≤D≤ 2D. So, by applying the algorithm of <cit.> on input T, we get a 2-approximation to D_T (which is good enough for our verification algorithm  and sensitivity algorithm).    

 Finally, we remark that all of our algorithms given here can be extended to forests:


  Our verification  and sensitivity algorithms can be easily extended to the case where G is disconnected and the input tree T is a forest.


First, we solve connectivity on forest T by using the algorithm in <cit.>. The algorithm takes O(log D_T) rounds. Then, we can partition the edges of G by connected component (all vertices know their connected component since they know which tree in T they are in).
    Then, since they are independent, it suffices to run in parallel our verification or sensitivity algorithm for each component.




 §.§ Clusters





We now introduce our notion of clusters, which we use to “compress” our input tree T so that we can run algorithms that require extra global memory per vertex.
We give a depiction of our clustering approach in <Ref>, and they are formally defined as follows:



    A cluster is a set of vertices whose induced subgraph in T is connected.
    The leader of a cluster is the root of the subtree induced by the vertices in it.
    By ℓ(v) we denote the leader of the cluster containing v (and so ℓ(u) = ℓ(v) iff u and v are in the same cluster).

    We denote the set of clusters at some point in time as C.
    Initially, each vertex forms a singleton cluster: i.e., ℓ(v) = v.
    We maintain as an invariant that the union of the clusters at any time is V; i.e., the vertices are partitioned into clusters.

    Two clusters c_1 and c_2 are connected if some u ∈ c_1 and v ∈ c_2 are connected by an edge in T.
    Note that there can be at most one such edge, for each pair of clusters.
    
    If T is rooted, the graph on clusters forms a rooted cluster-tree T_C, with ancestor/descendant relationships being defined based on the cluster leaders.

    We say that a vertex v is a leaf of a cluster c if it is either a leaf of T, or the parent in T of a root of a different cluster.


Next, we introduce cluster contraction, the process by which clusters are created.



    Let c ∈ C be a cluster and let c_1 … c_k be some non-empty subset of its child clusters in T_C.
    
    When we contract c, we make a new cluster c' comprised of all vertices in c, c_1, … c_k.
    The leader of c' will be the leader of c.
    We call c, c_1 …, c_k the sub-clusters of c': in particular we call c the senior sub-cluster and c_1 … c_k the junior sub-clusters.




    During our algorithm, we will perform the process described in <Ref> in parallel for a subset of clusters, ensuring that for all c_1, c_2, c_3 ∈ C, we do not simultaneously contract both c_1 into c_2 and c_2 into c_3.

    This parallel contraction of a subset of clusters is called a contraction step.


We recall that, as an immediate consequence of <cit.> (derandomizing a result of <cit.>), given a rooted tree, we can contract a set of edges in O(1) rounds to reduce the number of vertices by a constant fraction:



    Given a rooted tree T with n vertices, there is a deterministic, O(1)-round algorithm which contracts a set of edges, reducing the number of vertices in T to 0.99n.
    
    The algorithm uses = O(n^δ) local memory (for some constant δ), and = O(m+n) global memory.


We note that given a cluster-tree, <Ref> performs a contraction step as in <Ref>.

Next, we formalize the notion of a hierarchical clustering, a series of contraction steps which we perform in our , verification, and sensitivity algorithms.



    When we perform k contraction steps according to <Ref>, we call clusters formed during the i-th (i ∈ [k]) step level-i clusters.

    We denote the set of all clusters present after contraction step i as C_i (note that not all of these clusters will necessarily be level-i clusters). 
    The singleton clusters at the beginning of the algorithm are all level-0 clusters.

    We denote the cluster in C_i which contains v as c_i(v); the leader of this cluster is denoted as ℓ_i(v).


Finally, we observe that there are a linear number of clusters in total, and the total size of all cluster-trees is linear.

[Size of Hierarchical Clustering]

    In a hierarchical clustering of the graph as in <Ref>, there are at most O(n) clusters, across all levels.

    Additionally, if each contraction step reduces the number of vertices by a constant fraction (as <Ref> does), then the total size of the cluster-trees across all contraction steps is O(n).





 §.§ All-edges LCA and Ancestor-Descendant Graphs



Both of our problems take an input graph G as well as a tree T. We can assume that G is connected.

We will find it useful for our verification and sensitivity algorithms to work with ancestor-descendant graphs: that is, input instances for which all edges in E ∖ T are between ancestors and descendants in T.
Formally, we define them as follows:



    Let G=(V, E) be a graph and let T ⊆ E be a rooted spanning tree of G.
    G is said to be an ancestor-descendant graph with respect to T if all edges in E ∖ T are between vertices with an ancestor-descendant relationship in T.


In order to transform our input into an ancestor-descendant graph, we split each non-tree edge {u, v} into two edges {u, (u, v)} and {v, (u, v)} with the same weights, where (u, v) is the lowest common ancestor of u and v in T.
We are not able to compute the of every pair of vertices, since this requires Θ(n^2) global memory.
Instead, we compute the for each pair of endpoints of an edge in E ∖ T, which requires Θ(m) memory.
This computation is the subject of the rest of this section.

First, we remark that we can compute the DFS numbering of a rooted tree using a result of Andoni, Stein, and Zhong:


 

    Given a rooted tree T with diameter D, there is an O(log D)-round algorithm which finds the DFS sequence of T.
    The algorithm uses = O(n^δ) local memory (for some constant δ), and = O(n) global memory.
    It succeeds with high probability.


We extend the DFS sequence to a DFS interval labeling, which we define as follows:


    A DFS interval labeling of a rooted tree T is, for each vertex v ∈ T, an interval I(v) = [v_low, v_high], where v_low is the smallest DFS number in the subtree of T rooted at v, and v_high is the largest DFS number in the subtree of T rooted at v.

    Observe that iff u is an ancestor of v in T, then u_low≤ v_low≤ v_high≤ u_high. In other words, I(v) ⊂ I(u). If u and v are not in an ancestor-descendant relation in T, then I(u) ∩ I(v) = ∅.


We observe that this interval labeling can be computed using recently developed dynamic programming techniques for the model:



    Given a rooted tree T with diameter , there is an O(log)-round algorithm which produces a DFS interval labeling of T.
    The algorithm uses = O(n^δ) local memory (for some constant δ), and = O(m+n) global memory. It succeeds with high probability.


    <Ref> can be applied to produce a DFS sequence of T in O(log) rounds with global memory O(m+n) and succeeds with high probability.
    By definition, v_low is the DFS number of v, so it remains for each vertex v to learn v_high.
    
    This is easily done as a consequence of arguments in <cit.>: the authors mention computing the maximum of input labels in each subtree as a computation which their approach allows.
    Their computation requires O(log) rounds, deterministically; overall our algorithm succeeds with high probability (since the DFS numbering succeeds only with high probability).


The goal of the remainder of this section is to prove the following claim:



    Given a graph G, and a rooted tree T with diameter , there is an O(log)-round algorithm to compute, for each edge {u, v}∈ E ∖ T in parallel, (u, v).
    
    The algorithm uses = O(n^δ) local memory (for some constant δ), and = O(m+n) global memory. It succeeds with high probability.


It seems that the above theorem follows from <cit.>. However, we give the proof explicitly here to provide context for the following sections. Though our proof of <Ref> and the proof of <cit.> are fundamentally similar, the details are different. 





We start by showing that we can create, for each vertex u in a tree in parallel, edges to the parent of u, the 2-parent of u, the 4-parent of u, and so on (as in lines 3–5 of <Ref>):



    Let T be a tree with n vertices and diameter .
    In O(log) rounds, we can create edges from each vertex v to p_1(v), p_2(v), p_4(v), p_8(v)… p_n(v).
    This requires = O(n ·log) global memory.


    Each vertex v starts with a single edge (v, p(v)). Machines start by appending a 1 to these tuples (our example becomes (v, p(v), 1)), and creating a copy of the edge with the direction reversed and with a -1 appended (in our example, (p(v), v, -1).
    
    Then all edges are sorted lexicographically across machines in O(1) rounds; this leaves, for each vertex v, the parent and children of v on consecutive machines.
    Machines can now locally create edges between the parent of v and the children of v, and append 2 to the resulting tuple.
    
    The tuples ending with -1 can then be set aside and the process can be repeated for the edges at distance 2. This process can be repeated O(log) times (each iteration using edges of distance i to create edges of distance 2i), and clearly this creates edges from v to p_1(v), p_2(v), p_4(v), and so on; and requires O(log) rounds and global memory per vertex.




Next, we argue the correctness and implementation of <Ref>: the algorithm which finds, for each non-tree edge, the cluster in which the of their endpoints is contained.



    <Ref> can be implemented in O(log) rounds of sublinear with O(m+n) global memory.
    After its execution, the cluster containing the in T_C of c(u) and c(v) for each non-tree edge {u, v}∈ E ∖ T is correctly computed.


    Consider some non-tree edge {u,v}∈ E ∖ T.

    First, note that line 2 ensure that if c(u) and c(v) have an ancestor-descendant relationship in T_C, then whichever is the ancestor is selected as (u, v).
    Therefore, assume that this is not the case.

    It suffices to find the smallest i such that the i-th ancestor of (w.l.o.g.) c(u) is also an ancestor of v: we argue that lines 4–8 accomplish this.
    The approach taken in the for-loop in lines 5–7 moves the candidate χ for the up as much as possible such that χ is not an ancestor of c(v): therefore at the end of the for-loop, the parent of χ is the in T_C of c(u) and c(v).

    It remains to show that <Ref> can be implemented in with the specified memory and round requirements.
    First, note that as a precondition to this algorithm auxiliary edges from each cluster to their parent in T_C, 2-parent in T_C, 4-parent in T_C, etc. were established.
    Suppose (w.l.o.g) the information about the i-parent of c(u) is stored as an (u, i, p_i(u)) triple.
    We store the relevant information about each non-tree edge as (χ, c(v), I(χ), I(c(v)) tuples.
    In each iteration of the for-loop we sort the i-parent triples along with the candidate tuples, so that the first element of each are stored on consecutive machines.
    We use prefix sum to ensure that a copy of each i-parent triple of u is on each machine which has tuples where χ=c(u).
    With these conditions, machines can perform the necessary computations on line 6  locally.
    The computation takes O(log) rounds, and the total memory is linear.


Next, we argue the correctness and implementation of <Ref>: the algorithm which undoes the contraction steps and finds the s for all non-tree edges.


    <Ref> can be implemented in O(log) rounds of sublinear with O(m+n) global memory.
    After its execution, the of the endpoints of each non-tree edge {u, v}∈ E ∖ T is correctly computed.


    First, we argue that for each non-tree edge {u, v}∈ E ∖ T, _C(u, v)—the of c(u) and c(v) in T_C, computed in <Ref>—contains the LCA of u and v in T, i.e, that c((u, v)) = _C(u, v).

    Note that for any vertex u, ℓ(u) (the root of the cluster containing u) is an ancestor of u in T.
    If ℓ(u) is an ancestor of (u, v) then c((u, v)) = c(u) and line 2 of <Ref> would return _C(u, v) = c((u, v)) as required.
    Suppose otherwise that ℓ(u) and ℓ(v) are both descendants of (u, v).
    Recall that <Ref> correctly computes the  in T_C of c(u) and c(v) (<Ref>).
    Therefore there is no c' which is an ancestor of c(u) and c(v) as well as a descendant of _C(u, v), and it follows that c((u, v)) = _C(u, v).

    We now show that <Ref> finds (u, v).
    Each of cluster contraction steps is undone in reverse order: a cluster c produces its senior sub-cluster (c_p), and the junior sub-clusters c_1… c_k.
    In each iteration, for each non-tree edge {u, v}∈ E ∖ T, we check (line 5) whether any of the roots of the junior sub-clusters are a common ancestor of u and v.
    If this is the case for some child cluster c_i then by arguments as above c_i must contain (u, v), and so we set the candidate of u and v (_C(u, v)) to c_i (line 5).
    If this is not the case, then by elimination (u, v) must be in the senior sub-cluster, and so we set _C(u, v) to c_p.
    One can see that this finds a vertex which is an ancestor of both u and v and that it finds the lowest such vertex (since the child clusters are checked first).
    After all of the cluster contraction steps have been undone, C = V. Then, there is only one possible value for (u, v), and lines 11 set this value.

    Finally, each iteration of the for-loop in lines 1–10 can be implemented using a constant number of sorts and prefix-sums (sorting the interval labels of the roots of the junior sub-clusters along with the non-tree edge endpoints, and using prefix-sum to determine to which junior sub-cluster u and v belong), and therefore <Ref> takes O(log) rounds.
    It is easy to see that the global memory used is linear.


Finally, we show the main result of this section:


    Correctness, and the implementation of lines 8 and 9 follows immediately from <Ref>.
    Implementation of lines 3–5 follows from <Ref>.


By simple applications of sorting and prefix sum (and with only a constant factor increase in global memory), we can use <Ref> to turn our input graph into an ancestor-descendant graph:



    Given a graph G, and a rooted tree T with diameter , there is an O(log)-round algorithm which replaces each non-tree edge {u, v}∈ E ∖ T with two edges {u, (u, v)} and {v, (u, v)}.

    The algorithm uses = O(n^δ) local memory (for some constant δ), and = O(m+n) global memory. It succeeds with high probability.


Finally, we observe that the transformation of the input given by <Ref> does not affect the computation of verification or sensitivity:

[<cit.>]

    Let G = (V, E) be an edge-weighted graph, and let T ⊆ E be a candidate .

    Replacing each non-tree edge {u, v}∈ E ∖ T with edges {u, (u, v)} and {v, (u, v)} (of the same weight) does not affect the result of verification, or the sensitivity of tree edges.
    After the replacements, the sensitivity of non-tree edges is equal to the minimum sensitivity of the two replacements.





§ VERIFICATION



In this section we present our algorithm for verification, and prove <Ref>.



Let δ be an arbitrarily small positive constant. Let G = (V, E) be an edge-weighted input graph and let T ⊆ E be a  tree. Suppose the diameter of T be . Then one can decide with high probability whether T is an of G in O(log) rounds on an with local memory = O(n^δ) and optimal global memory = O(m+n).


We recall that, due to <Ref>, T can be assumed to be a rooted spanning tree of G, because we can verify this in O(log) rounds. From <Ref>, we can assume that the algorithm knows the value of D_T. Also, recalling <Ref>, our verification algorithm, while stated for trees, can easily be extended to forests. We may also assume that G is an ancestor-descendant graph with respect to T (<Ref>). If this is not the case then we can use <Ref> to transform our input into an ancestor-descendant graph, with asymptotically the same number of edges. By <Ref>, this transformation does not affect the output of the verification problem.


A naive algorithm for the verification problem might be to collect, for each vertex u, the path from u to the root of T.
Using prefix-sum in O(1) rounds, we can then compute, for each vertex u' on the path from u to T, the highest-weight edge on the path from u to u'.
Then, for each non-tree edge e = {u, v} in parallel (where v is an ancestor of u in T), we can use sorting and prefix-sum and the previously computed prefix-sum of the path from u to the root to compute the highest weight of an edge on the path from u to v.
Suppose this weight is x_e: if x_e < w(e) (and this is true for all non-tree edges), then T is a minimum spanning tree; otherwise it is not.

There is a problem with this algorithm, which is that to collect the path to the root for all vertices might require Ω(n ·) global memory, which might be ω(m+n).
If we were able to somehow reduce the number of vertices in the graph to n/, then this approach would work.


The challenge is therefore to preserve the information required to evaluate for each non-tree edge {u, v}, the highest weight of an edge from u to (u, v), while reducing the number of vertices by a factor of D. The  (effective) number of vertices/clusters reduces by a constant factor in each round by applying contraction. If we forget about the weights of the tree edges between contracted vertices, we may lose relevant information. 

Initially, we have a set of n clusters where each cluster is a singleton vertex and over rounds these clusters are contracted. We need to preserve enough information about the weights of edges in the clusters to check whether any edge in E ∖ T ought to be in a minimum spanning tree.
To do this, we define the notion of a weight preserving labeling to keep track of two labels throughout the cluster contraction process (as formally defined in <Ref>).
We apply the contraction process on T for O(log D_T) rounds until we have a tree of O(n/D_T) clusters.
Then, we can find the path from every cluster to the root cluster using O(n) global space (<Ref>).
Finally, we argue that this path information along with the weight preserving labeling of clusters that we have maintained, is enough information to decide whether T is an MST. 



 §.§ Weight-Preserving Labeling

In this subsection we introduce the notion of a weight-preserving labeling. As already discussed, the intuition is that we need to reduce the number of vertices by a factor of Ω() so that subsequent steps of the algorithm have Ω() global memory per vertex to work with. We do this using cluster contraction steps as outlined in <Ref>.



    Let G = (V, E) be a graph with an edge-weighting function w : E → [W], T ⊂ E be a candidate , and C be a partition of V into a set of clusters.
    Assume that G is an ancestor-descendant graph with respect to T.
    A weight-preserving labeling of (G, w, T, C) is a pair (, ) such that:
    
        
  * for each edge {c_c, c_p}∈ T_C (where c_p is the parent of c_c in T), a label (c_c, c_p) which takes a value in [W]; and
        
  * for each edge {u, v}∈ E ∖ T, labels (u,v) and (v, u) which take values in [W] ∪{-∞}.
    

    These labels represent the following:
    
        
  * For each edge {c_p, c_c}∈ T_C, let c_p be the parent cluster and let c_c be the child cluster.
        
        (c_p, c_c) is the highest weight of an edge on the path from ℓ(c_p) to p(ℓ(c_c)) in T.
        
        
  * For each edge {u, v}∈ E ∖ T, let P be the path from u to v in T.
        
        (u, v) is the highest weight edge on P  where both endpoints are in c(u); (v, u) is defined analogously.

        If there are no such edges, then (u, v) = -∞.
        Clearly, if v ∈ c(u), then (u, v) = (v, u).
    


These labels, along with the weights of some edges which we do not contract, sufficiently capture all information necessary to evaluate the highest weight of an edge in T which some edge {u, v}∈ E ∖ T covers:



    Consider a graph G=(V, E) with a weighting function w, a rooted candidate T, and a set of clusters C.
    Suppose that G is an ancestor-descendant graph with respect to T, and let (, ) be a weight-preserving labeling of (G, w, T, C).

    For any edge {u, v}∈ E ∖ T, let u be an ancestor of v and let P_C = (c(v)… c(u)) be the path of clusters in T_C which the path from u to v in T passes through.
    Then, the highest weight of an edge on the path from u to v in T is:
    
    max
        {(u, v), (v, u), 
            max_(c_c, c_p) ∈ P_C | c_p ≠c(u){(c_p, c_c)}, 
            max_(c_c, c_p) ∈ P_C{ w({ℓ(c_c), p(ℓ(c_c))}) }
        }



We now argue that when we perform cluster contraction steps, we are able to efficiently maintain a weight-preserving labeling of the current clustering:



    Consider a graph G=(V, E) with a weighting function w, a rooted tree T, and a set of clusters C.
    Suppose that G is an ancestor-descendant graph with respect to T, and let (, ) be a weight-preserving labeling of (G, w, T, C).
    
    After a cluster contraction step is performed, returning a new set of clusters C', we can compute a new weight-preserving labeling (', ') of (G, w, T, C') using only , , and the weights of edges between vertices in different clusters in C.



    First, note that if some cluster c ∈ C is also a cluster in C' (i.e., c is not involved in a contraction), then for all vertices u ∈ c and all non-tree edges {u, v}, (u, v) = '(u, v).
    Also, for each child c_i of c in C, (c_i, c) = '(c*_i,c), where c*_i is the cluster which the vertices in c_i are part of in C'.

    So we focus on clusters which have undergone a contraction step.
    Consider a cluster c ∈ C: suppose it has children c_1… c_k in T_C, and that it forms cluster c' ∈ C' when contracted.

    Let c_i' be a child cluster of c' in T_C'. 
    We handle each type of label separately and show that they can be properly computed:
    
        
  * We show that we can compute '(c_i', c').
        Recall that '(c_i', c') is the highest-weight edge on a path in T from the leader of c' to the parent of the leader of c_i'.
        
        Since c_i' is a child of c' in T_C', it must have been a child of some c_i in T_C.
        The path from the leader of c (also the leader of c') to the leader of c_i' must pass through c_i, and it suffices to take '(c_i',c') = max((c_i', c_i), w({ℓ(c_i), p(ℓ(c_i))}) (c_i, c)).
        
        
  * We show that we can compute '(u, v).
        Let {u, v}∈ E ∖ T and suppose u ∈ c'. Let P be the path from u to v in T.
        Recall that '(u, v) is the maximum-weight edge on P where both endpoints are in the cluster in C' containing u.
        
        Let c_i be an arbitrary child of c in T_C.
        There are 5 sub-cases here based on the positions of u and v w.r.t. clusters that we are contracting:
        
            
  * v ∈ c': In this case, either u and v were in the same cluster in C (in which case (u, v) = '(u, v)); or u and v were in different clusters in C.
            In the latter case note our assumption that all non-tree edges are ancestor-descendant, so suppose w.l.o.g. that u was in c and v was in a child c_i of c.
            Then, since all but one edge had endpoints either both in the cluster containing u or both in the cluster containing v, '(u, v) = max{(u, v), w(ℓ(c_i), p(ℓ(c_i)), (v, u)}.
           
            
  * u ∈ c, and P does not go through any child of c in T_C: In this case P must leave c via its leader.
            This means that the section of the path in the cluster containing u contains the same edges, and so we have '(u, v) = (u, v).
            
            
  * u ∈ c, and P goes through cluster c_i in T_C. Since c' ∈ C' contains all vertices in both c and c_i, '(u, v) must represent the highest-weight encountered when leaving c, taking the edge between c to c_i, and then leaving c_i via one of its child clusters (say c_i_j) in C. Then '(u, v) = max{(u, v), w(ℓ(c_i), p(ℓ(c_i))), (c_i_j, c_i)}.
            
            
  * u ∈ c_i, and P does not go through c in T_C. 
            In this case P must leave c_i via one of its children in C. The contraction of c with its children does not affect the edges encountered when leaving c_i via one of its children, and so '(u, v) = (u, v).
            
            
  * u ∈ c_i, and P goes through c in T_C, and exits c via its leader. 
            This case is analogous to case 3: we have '(u, v) = max{(u, v), w(ℓ(c_i), ℓ(p(c_i))), (c_i, c)}.     
    


We argue that we are able to implement the above approach in sublinear , using optimal global memory:



    Let G be a graph with a set C of clusters and a weight-preserving labeling (, ).
    There is an algorithm which, in O(1) rounds, outputs a new set of clusters C' such that |C'| ≤ |C| / α (for some constant α > 1), along with a weight-preserving labeling (', ') for C'.
    The algorithm uses = O(n^δ) and = O(n+m).


    Observe that the computation of '(·, c) for a cluster c only depends on (c_i, c) and (·, c_i) for all children c_i of c; this computation can be performed locally along with the contractions.

    Similarly, the computation of '(u, v) depends on (u, v). It also depends on which case of <Ref> applies, and depending on the case a constant amount of additional information (values and the weight of edges which are being contracted), which can be made locally available using sorting.
    The applicable case can be computed locally using the interval labeling of the vertices, and the constant amount of additional information for each non-tree edge can be placed on the same machine as the edge and used to compute '(u, v).

    Since there is one label for each cluster in C_i, and |C_i| < n; and there are two labels for each non-tree edge, of which there are m, the algorithm requires O(m+n) total memory.


We now argue that we can perform O(log) cluster contraction steps, while keeping track of a weight-preserving labeling, in O(log) rounds of sublinear with optimal global memory.



    Applying the algorithm from <Ref> on the input instance O(log) times gives a graph with a weight-preserving labeling and n/() clusters.





 §.§ The Rest of the Algorithm


We now show that we can use the weight-preserving labeling from the previous section, along with the approach sketched earlier, to solve the problem of verification.

First, we argue that we can collect, for each vertex u in a tree, the path from u to the root of the tree, in O(log) rounds with an extra factor of  global memory:



    Let T be a tree with n vertices and diameter .
    In O(log) rounds, we can, in parallel for each vertex v, collect the path from v to the root r of T. This uses = O(n ·) global memory.


A similar procedure can be used as in <Ref>, except after each iteration the edges with distance i are not discarded. This still takes O(log) rounds, but now  global memory per vertex is required, since the entire path to the root is being stored.


Finally, we conclude by proving the main result of the section:


    We start by computing a clustering using <Ref>, along with a weight-preserving labeling (, ) of (G, w, T, C).

    Note that the diameter of T_C is at most .
    We can execute <Ref> on T_C (taking O(log) rounds and using O(|C| · D_T) = O(n) global memory), and then for each cluster c ∈ C, the path from c to the root of T_C is stored on consecutive machines.
    We can see that, for each cluster c in the path from c(u) to r, we can compute the maximum  value on the path from c(u) to c: this can be done with prefix-sum in O(1) rounds.
    In a similar way, we can compute the maximum inter-cluster edge on the path from c(u) to c (for each of the ancestors of u in T_C, c), in O(1) rounds.

    For each non-tree edge {u, v}∈ E ∖ T, it suffices to collect (u, v), (v, u), w({u, v}), one of these maximum  values, and one of these maximum inter-cluster edge values.
    Then, it can be determined locally whether {u, v} is of larger weight than all edges on the path from u to v in T.
    This information can be collected onto a single machine using O(1) rounds of sorting, after which the necessary computation can be performed locally.
    In total the information required for each non-tree edge {u, v} is of constant size.

    Finally, we note that all steps are deterministic, except for the computation of the DFS interval labeling (<Ref>): therefore, the algorithm as a whole succeeds with high probability.





§ MST SENSITIVITY



In this section we present our sensitivity algorithm.
The conclusion of this section is the following: 


Let δ be an arbitrarily small positive constant. Let G = (V, E) be an edge-weighted input graph and let T ⊆ E be an of G with diameter .

The problem of sensitivity can be solved in O(log) rounds (with high probability) on an with local memory  = O(n^δ) and optimal global memory = O(m+n).


We recall that, given <Ref> we can assume that T is a rooted spanning tree. From <Ref>, we can assume that the algorithm knows the value of D_T. Given <Ref>, while our algorithm is stated for trees it can easily be extended to forests; and that, given <Ref> and <Ref>, we can assume that G is an ancestor-descendant graph (<Ref>) with respect to T.

We also recall that we can

compute a DFS interval label for all vertices in O(log) rounds (<Ref>).

First, we note that our verification algorithm works by computing, for each non-tree edge e, the highest weight of an edge which e covers in T.
Since this is the information which is relevant for computing the sensitivity of non-tree edges, this almost gives us an sensitivity algorithm for non-tree edges immediately.
It remains to compute, for each pair of edges {u, (u, v)}, {v, (u, v)}, which has the lowest sensitivity.
This is easily accomplished using sorting and prefix-sum in O(1) rounds, and so we have the following:



The verification algorithm outlined in <Ref> can be extended to compute the sensitivity of edges in E ∖ T.


Finally, we observe that the problem of sensitivity is (for tree edges) the same computing the minimum weight of a covering edge:



    To compute the sensitivity of a tree edge e ((e), see <Ref>), it suffices to compute the minimum weight of a non-tree edge which covers e (see <Ref>).
    Let (e) be the minimum weight of a non-tree edge which covers e.
    Then (e) = (e) - w(e).


For ease of notation, we will work with rather than values in this section.
We can set aside a series for machines for keeping track of and updating values: this requires an additive O(n) global memory (and so does not affect the total asymptotically).
These machines can process O(n) updates to the values of vertices in O(1) rounds, using sorting and prefix sum.

We will use an approach to solve the problem of sensitivity which employs a similar method to our verification algorithm: reduce the number of vertices by a factor of Ω(()) using a hierarchical clustering; use an algorithm which requires an additional Ω(()) memory per vertex; and finally use this information to compute the sensitivity values for the original edges of the tree.


However, this approach is much more complex than it was for the verification algorithm.
In particular, for verification it sufficed to summarize information about the clusters.
For sensitivity we have to be careful to preserve enough information about the clusters so that, when we undo the clustering, we can eventually compute the sensitivity of the edges inside them. Informally speaking, we need to be able to retrieve the information related to clusters from any intermediate step. Since there are O(log D_T) many intermediate steps before obtaining final clusters, O(log D_T) rounds are enough to retrieve the information. 

In <Ref>, we discuss our contraction process for sensitivity. Note that, at the end of the contraction process (as in <Ref>), we have a clustering C, a tree T_C of O(n/()) clusters, and a graph G' (obtained by replacing some of the original edges).
In <Ref>, we discuss how to find the sensitivity of the edges between adjacent clusters in C (See in <Ref>).
This is made possible by the extra () global space we have per cluster.
Finally, in <Ref>, we discuss how we “unwind” the relevant information w.r.t. intermediate clusters in O(log D_T) rounds to determine the sensitivity of the edges in T which we contracted into clusters during the contraction phase (see <Ref>).

Our overall algorithm is as follows:






 §.§ Contraction into Clusters

To run our sensitivity algorithm in <Ref>, we need to have () global memory per vertex. To accomplish this, we first perform a hierarchical clustering, producing a set of clusters C. We then run our sensitivity algorithm on T_C.

We are going to want to maintain the invariant that, at each step of the hierarchical clustering, if an endpoint of a non-tree edge is in a cluster c, it does not cover any of the edges inside c.

When we perform a contraction, we maintain this invariant by “cutting off” any ends of a non-tree edge which would violate the invariant. Suppose there is a non-tree edge e = {u, v}, and after a contraction step u is inside a cluster c. Let u' be the last vertex on the path from u to v which is also in c. Suppose u ≠ u': in this case the invariant would be violated. We keep the part of the edge which is outside of the cluster ({u', v}) and carry it forward to future contraction steps. For the part of the edge inside the newly-formed cluster c, we first observe that (because the invariant was preserved from the previous contraction step) this part forms a path, from the root of one sub-cluster to one of its leaves.

We create what we call a root-to-leaf note: a reminder of the part of the edge which we do not carry forward, to be dealt with later in the algorithm. We formally define this note as follows:



    A root-to-leaf note is a tuple (r, l, i, w), where: 
    
        
  * r is the root of a cluster c;
        
  * l is one of the leaves of c;
        
  * i is the index of the contraction step in which the cluster c was formed;
        
  * w is a weight.
    


Note that if we simultaneously create multiple root-to-leaf notes where r, l, and i are the same, it suffices to keep only the root-to-leaf note with the minimum w.
The intuition behind root-to-leaf notes is that some non-tree edge covers a root-to-leaf path within some (now contracted) cluster. When expanding out the contracted out clusters (see <Ref>) we ensure that we take the root-to-leaf notes into account when computing the value for all edges which they cover.



The process of performing cluster contraction steps while maintaining the invariant above is depicted in <Ref> formally described as follows:



Assume that we are at contraction step i.
When we contract child clusters c_1 … c_k into cluster c to form c', for each non-tree edge e = {u, v} there are five possibilities:

    
  * u is in one of the junior sub-clusters, and v is in the senior sub-cluster.
    Since {u, v} does not cover any edges in clusters by assumption, u must be the root of the junior sub-cluster and v must be one of the leaves of the senior sub-cluster.
    It suffices to set ({u, v}) min(({u, v}), w(e)).
    
    
  * u is in the senior sub-cluster, and v is an ancestor of u.
    By the invariant, u must be the root of the senior sub-cluster.
    In this case the invariant is automatically maintained and no action is necessary.
    
    
  * u is in a junior sub-cluster, and v is a descendant of u.
    By the invariant, v must be a leaf of a junior sub-cluster.
    In this case the invariant is automatically maintained and no action is necessary.

    
  * u is in a junior sub-cluster, and v is an ancestor of c'.
    By the invariant, u must be the leader of its junior sub-cluster.
    In this case we replace e with an edge {ℓ(c'), v} (recall: ℓ(c') is the leader of c').
    Since we have shortened the edge, we create a root-to-leaf note (ℓ(c'), p(u), i, w({u, v})), where i is the index of the contraction step in which c was formed.
    We also set ({u, p(u)}) min(({u, p(u)}, w(e)).

    
  * u is in a senior sub-cluster, and v is an descendant of one of the junior sub-clusters of c', c_j.
    By the invariant, u must be a leaf of its junior sub-cluster.
    In this case we replace e with an edge {l, v}, where l is the leaf of c' on the path from u to v in T.
    Since we have shortened the edge, we create a root-to-leaf note (ℓ(c_j), l, i, w({u, v})), where i is the index of the contraction step in which c_j was formed.
    We also set ({ℓ(c_j), u}) min(({ℓ(c_j), u}), w(e).


We note that if both endpoints require the creation of root-to-leaf notes, then we create both.


We now argue that this only results in O(n) root-to-leaf notes being produced, and so our global memory constraints are not violated:


    Performing the above operation for all non-tree edges in parallel after each cluster contraction step (<Ref>) results in a total of O(n) root-to-leaf notes.


    Follows from <Ref>.
    Fix a cluster c formed in step i. Then:
    
        
  * In case 4, the number of distinct root-to-leaf notes created is at most the number of junior sub-clusters of c.
        The total number of junior sub-clusters is at most the number of vertices in T_C_i: summing this over all contraction steps gives at most O(n) such root-to-leaf notes.
        
  * In case 5, the number of distinct root-to-leaf notes created is at most the number of leaves of c which have a child which is a cluster leader.
        Similarly, the total number of these is the number of vertices in T_C_i: summing over all contraction steps gives at most O(n) such root-to-leaf notes.  


We now argue that we can actually perform this computation while we do a cluster contraction step:



    <Ref> can be implemented deterministically on an with = O(n^δ) and = O(n+m) in O(log) rounds.


    It suffices to show that one iteration of <Ref> can be implemented in O(1) rounds within the specified memory constraints.
    The edges which are to be contracted in each iteration can be identified in O(1) rounds (by <Ref>).
    It remains to show that we can identify for each non-tree edge e ∈ E' whether case 1, 4, or 5 of <Ref> applies.

    Fix some non-tree edge e ∈ E', and suppose that e = {u, v}, and that u is an ancestor of v.

    
    
  * It is easily checked whether case 1 of <Ref> applies to e, since this is the case if and only if e is the same as one of the edges which are being contracted.

        
  * For case 4, we need to check whether some edge {u, u'} is being contracted, where I(u) ⊂ I(u'). If this is the case then case 4 applies.
        We need to set ({u, u'}) = min{({u, u'}), 
 w(e)}; create a root-to-leaf note (ℓ(u'), u, i, w); and truncate e so that it goes between ℓ(u') and v.
        
        This can be accomplished by sorting the edges in E' along with the edges to be contracted, and using prefix-sum to communicate the edge {u, u'} to all edges in E' with u as an endpoint (if any).
        Then, machines can perform the necessary changes to the graph locally (sending the update to the machines dedicated to storing and updating those values).

        
  * For case 5, we need to check whether some edge {v, v'} with I(v) ⊃ I(v') is being contracted. If so, then case 5 applies.
        
        There is one added complication here: we need to find the correct leaf for the root-to-leaf note (that is, the leaf of the cluster containing v' through which the u-v path in T passes).
        Since for any cluster c we know what its children in T_C are, we know what the leaves of c are (they are the parents of the roots of the children of c in T_C; they cannot be leaves of T since the u-v path could not pass through them).
        So by sorting the DFS interval labels of the leaves of the cluster along with the edges in E' (and using prefix-sum), we can find this leaf: let us call it l.

        We need to set ({v, v'}) = min{({v, v'}), w(e)}; create a root-to-leaf note (ℓ(v), l, i, w); and truncate e so that it goes between l and u.
    

    Since all cases can be identified and the correct action taken within O(1) rounds and linear global memory (using constantly many applications of sorting and prefix sum), the lemma result follows.


Finally, we present the algorithm for this first step as a whole:





 §.§ Sensitivity with n/(D) Vertices



After executing <Ref>, we have a clustering of the vertices in V into a set of n / (D) clusters C_τ.
We note that the diameter of T_C_τ is at most : for simplicity here we will assume that it is .

We will now present an algorithm for sensitivity, which works in O(log) rounds but with (D) space per node.
We will run this algorithm on the cluster tree T_C_τ, and use the result to compute the sensitivity of edges in T.

Our algorithm works in a similar way to the algorithm of Pettie <cit.> in the centralized setting.

In this section, we denote the depth of a cluster v in T_C by (v): it is defined as the distance of v from the root cluster r.

We first define a useful array for our algorithm:


    For each non-root cluster c ∈ C_τ, A_c is an array of length  such that for each i ∈ []

    A_c[i]={[ min_{{u, v}∈ E”: c(u) = c ∧ c(v) = x}{w({u,v}):(x)<i 
     
     }                                                 1 ≤ i ≤(c);                                                          ∞                                                    i > (c);                                                            ].



Note that we compute this array relative to a set of edges E”. These edges are slightly truncated versions of the edges in E', and we will compute this set during the algorithm.





    After executing <Ref> we have correctly computed:
    
        
  (i)  values for each edge in T_C_τ; and
        
  (ii) for each pair of clusters c_c, c_p ∈ C_τ such that c_c is a child of c_p, the minimum weight of an edge in E' which covers the path from ℓ(c_p) to p(ℓ(c_c)).
    


For part (i), it is enough to show that <Ref> correctly computes the values for each edge in T_C.
Recall that the value of a tree edge e is the minimum weight of any non-tree edge which covers e.
Note that lines 1–5 of <Ref> split each edge into two parts: the topmost “arc” {v, v'} of the edge {u, v}, and the rest of the edge ({u, v'}).
By line 4, (v, v') is at most the weight of the topmost arc, and so it remains to consider whether lines 6–11 correctly compute the values for each tree edge relative to the edges in E” after line 5.

As we assume as a precondition that the vertices of any non-tree edges are in an ancestor-descendant relation, we have, for each edge {u, p(u)}∈ T_C:

    ({u, p(u)}) 
     
         =   min((u, p(u)), min{w({v,v'}): 
           })
    
         =   min((u, p(u)), min_min{w({v,v'}): })


Applying the definition of A_u[i], 

    ({u,p(u)})=min((u, p(u)), min_ A_v[(u)]).


For part (ii), we argue that the minimum weight non-tree edge covering the path from ℓ(c_p) to p(ℓ(c_c)) is exactly 𝗆𝗂𝗇𝖠(c_c).
First, note that we have already shown that 𝗆𝗂𝗇𝖠(c_c) is the minimum weight of a non-tree edge in E” which covers the tree edge {ℓ(c_c), 
 p(ℓ(c_c)}.
We prove part (ii) of the lemma by showing that the set of edges in E” which cover the tree edge {ℓ(c_c), p(ℓ(c_c))} is the same as the set of edges in E” which cover the path from ℓ(c_p) to p(ℓ(c_c)).

Fix some e = {u, v}∈ E', and suppose that v is an ancestor of u.
Let c_1 = c_τ(u), c_k = c_τ(v), and let c_2… c_k-1 be the other clusters on a path from c_1 to c_k in T_C_τ.

Then, note that, since in <Ref> we maintain the invariant that all edges in E' cover no edges in the clusters containing their endpoints, u must be the root of c_1 and p(ℓ(c_k-1)) = v.
It it easy to see that e covers the edges between c_1 and c_2, c_2 and c_2 …c_k-1 and c_k.
It also covers the path from p(ℓ(c_1)) to ℓ(c_2), from p(ℓ(c_2)) to ℓ(c_3)…, and from p(ℓ(c_k-2)) to ℓ(c_k-1). 

Edges in E” are the same as edges in E', except that the topmost arc (in the example above, the edge between c_k-1 and c_k) have been removed.
It is easy to check that once this is done, iff an edge in E” covers the edge between c_i and c_i+1, it also covers the path from p(ℓ(c_i)) to ℓ(c_i+1), and so we are done.


Next, we argue that we can implement <Ref> in O(log) rounds of sublinear , with optimal global space.



    <Ref> can be implemented deterministically on an with = O(n^δ) and = O(n + m) in O(log) rounds.


We can compute the depth (c) in T_C_τ of each cluster c ∈ C_τ, and we have already computed the DFS interval labeling of ℓ(c).
These steps can be implemented in O(log D_T) rounds.
Recall that, with the DFS interval labeling of two clusters c and c', we can decide whether c and c' are in an ancestor-descendant relationship.

For lines 1–6 of <Ref>, we can sort the edges in T_C along with the non-tree edges in E' by the topmost endpoint.
Let {u, v} be a non-tree edge in E' where v is an ancestor of u.
By the invariant maintained in <Ref>, the child of v on the path from v to u in T is the root of a cluster.
Therefore, using prefix-sum, we can then identify which child v' of v in T is on the path from v to u in T, for all such edges in parallel.
Lines 4 and 5 then follow easily.

For lines 7–10 of <Ref>, let us dedicate a set of consecutive machines M_c,i for each non-root cluster c ∈ C_τ and each depth i ∈ [D_T].
For each c and i ∈ [D_T], all the edges in E” from a node in c to an ancestor can be gathered onto M_c,i using sorting in O(1) rounds.
Then, for each c and i, we can find the minimum weight of an edge on M_c, i.

For lines 11–15 of <Ref>, we can compute 𝗆𝗂𝗇𝖠(c) for all clusters c ∈ C using O() parallel applications of the algorithm in <cit.> for finding in parallel the minimum label in all subtrees in a tree.
This requires an additional O() global space for each node in T_C, but since there are O(n/) nodes in T_C, this is a total global space of O(m+n), as required.






Note that the total space used in our implementation is O(nD_T) since we are storing an array of size D_T for each non-root vertex.




 §.§ Unwinding Cluster Contraction and Computing Sensitivity


For all edges in T_C_τ, we now have computed the  (and thus ) values.
It remains to compute the  values of the vertices within the vertices of T_C_τ, which correspond to the clusters of C_τ.

As part of our sensitivity algorithm in the previous section, for each cluster c ∈ C_τ, for each child c_1, c_2… c_k of c in T_C_τ, we computed a root-to-leaf note for the paths from ℓ(c) to p(ℓ(c_1)), p(ℓ(c_2)) …, p(ℓ(c_k)).

In this section we combine these with the root-to-leaf notes which were set aside during the cluster contraction part of the algorithm (<Ref>), and ensure that the value for each intra-cluster edge is at most the minimum weight of a root-to-leaf note which covers that edge, when we undo the cluster contraction steps.

Our algorithm is as follows.



We first argue that the values which are computed during <Ref> are correct:



    The values computed at the end of <Ref> are correct: i.e., for all v ∈ V, (v) is the cost of the minimum edge which non-tree edge which covers (<Ref>) v.


    Firstly, note that for all edges in T_C_τ (those edges which aren't “inside” clusters), values have been computed correctly (<Ref> (i)).

    We now argue that for all edges in T ∖ T_C_τ, values have been correctly computed.
    To do this, we look from the other perspective and show that each edge in E ∖ T is at least as large as the value for each edge in T ∖ T_C_τ which it covers.

    Let e = {u, v}∈ E ∖ T be a non-tree edge and let P be the path in T between u and v.
    Recall that the endpoints of all non-tree edges are between ancestors and descendants.
    Note that P comprises edges in T_C_τ (which we have already accounted for) and edges inside clusters in C_τ.
    Let c ∈ C_τ be a cluster.
    There are two cases:
    
        
  * Suppose u is an ancestor of ℓ(c) and v is in a descendant cluster of c.
        Then the section of the path which passes through c must go from the root of c to a leaf of c.
        By <Ref> (ii), the minimum weight of an edge in E' which covers each root-to-leaf path in c has been correctly computed, and e must weigh at least this value.
        
        
  * Suppose that u is inside c and P covers at least one edge in c.
        Then, during the cluster contraction process (<Ref>), (possibly several) root-to-leaf notes were created to account for this end-segment of P which is inside a cluster.
        The only place in our subroutines where root-to-leaf notes are deleted is when another note covering the same path but with a lower weight is also present; therefore e must weight at least as much as the root-to-leaf note covering this segment of P.
    

    Therefore root-to-leaf notes of at most weight w(e) are created for every edge in P ∖ T_C_τ (since edges in T_C_τ are accounted for).

    It remains to show that, for each edge e on the path covered by a root-to-leaf note (·, ·, ·, w), that (e) ≤ w.
    This is ensured by lines 6–9 of <Ref>.
    Root-to-leaf notes are split into three parts: a root-to-leaf note in the senior sub-cluster; a root-to-leaf note in a junior sub-cluster; and the edge between the two has its value updated, if applicable.
    Eventually all edges on the path of a root-to-leaf notes will have their value updated to the weight of that root-to-leaf note (if applicable), and will finish with at most that weight.


Finally, we show that <Ref> can be implemented in sublinear in O(log) rounds and with optimal global memory:


    
    <Ref> can be implemented deterministically on an with = O(n^δ) and = O(n+m) in O(log) rounds.


    We start by claiming that, at all times, N contains at most O(n) root-to-leaf notes.

    
    
        Throughout the execution of <Ref>, N = O(n).
    

    As a simple consequence of <Ref>, we can, for each cluster, maintain a record of its subclusters and which iteration they were formed in.
    This information can be stored along with each cluster in C_i.
    When evaluating which values to update and how and which root-to-leaf notes to create, machines have this information locally.
    
    We can set aside a set of machines dedicated to keeping track of and updating values for all tree edges.
    Since there are at any time O(n) root-to-leaf notes being dealt with in the for-loop from lines 4–10 (<Ref>), there are at most O(n) updates to these values per loop (line 6).
    These machines can use sorting and prefix-sum to update their stored values in O(1) rounds and O(n) memory.

    <Ref> implies that when deduplicating the root-to-leaf notes (which can be done in O(1) rounds using sorting and prefix-sum), the global memory bounds are not exceeded.

    It remains to prove <Ref>:

    
        It suffices to bound the total possible number of non-duplicate root-to-leaf notes at any point, since when we potentially create additional duplicate notes (lines 8 and 9), this is only a constant-factor increase before we remove duplicates again in line 12.

        We will start by bounding the total number of root-to-leaf notes where the “leaf” has at least one child in T.
        Fix an iteration i and a corresponding cluster decomposition C_i, and consider a root-to-leaf note (r, l, i, w).
        All children of l in T (at least one exists by assumption) must be leaders of a cluster in C_i.
        Further, note that for each choice of i and l there is a unique r (the root of the cluster containing l in iteration i).
        Therefore, we can charge each choice of i and l (where l has a child in T) to a vertex in T_C_i.
        Using <Ref>, there at most O(n) clusters over all levels of the hierarchical clustering.

        It remains to bound the number of root-to-leaf notes where the leaf is also a leaf of T.
        Consider one such leaf l.
        We claim, that, at any time, that there is at most one root-to-leaf note with l as a leaf.
        This follows from two facts:
        
            
  * Only one root-to-leaf note containing l is created during <Ref>. Once a root-to-leaf note containing l is created (and the edge in question is truncated), case 4 or 5 of <Ref> cannot apply to l anymore (l will always be in a junior sub-cluster but will never be the root of it).

            
  * When a root-to-leaf note is processed in <Ref>, exactly one root-to-leaf note containing l is created.
        
        This completes the proof of the claim. 
    




Finally, we conclude the section as a whole with the proof of <Ref>:

    By Observations <ref> and <ref>, it suffices to compute the values of for each tree-edge.
    It is easy to see that given the values for all non-tree edges, we can compute the values for all non-tree edges in O(1) rounds.

    The correctness of <Ref> follows from <Ref>.
    Running time and memory constraints of <Ref> follow from <Ref>.

    All steps are deterministic except for the computation of the interval labeling (<Ref>), which means that the algorithm as a whole succeeds with high probability.










§ LOWER BOUND FOR VERIFICATION


In this section we give a simple lower bound result which shows that, conditioned on a popular 1-vs-2-cycle conjecture, our algorithm for verification is optimal.

First, we recall the 1-vs-2-cycle conjecture.



Let δ < 1 be an arbitrary positive constant. The problem of distinguishing one cycle of length n from two cycles of length n/2 requires Ω(log n) rounds on an with local memory = O(n^δ).




Let δ < 1 be an arbitrary positive constant. Let G = (V, E) be an edge-weighted graph. 



Let T ⊆ E be a set of n-1 edges of G and let  be the diameter of T.

Deciding whether T is a minimum spanning forest of G requires Ω(log) rounds

, on an with with local memory = O(n^δ), unless the 1-vs-2-cycle conjecture (<Ref>) is false.


    
    

    Let G be a complete graph on some vertex set V, and suppose all edges in G have weight 1.
    Let T ⊂ G be a spanning subgraph of G with n-1 edges.
    
    Note that D =  = 1, but  might be much larger.

    Since all graphs with n-1 edges have the same weight, the problem of determining whether T is a minimum spanning tree of G is reduced to determining whether T is connected.
    Suppose there is a o(log) round algorithm for deciding whether T is an of G.
    This would imply that we can decide whether T is connected in O(1) rounds.
    However, by <cit.>, this requires Ω(log) rounds, conditioned on the 1-vs-2-cycle conjecture.


alpha






§ CONDITIONAL MST LOWER BOUND



For the sake of completeness of our arguments, we sketch a simple proof of a claim that, conditioned on the 1-vs-2-cycles conjecture, there is no o(log n)-rounds algorithm with = O(n^δ) local memory and polynomial global memory = (n) for the minimum spanning tree problem.



Conditioned on the 1-vs-2 cycles <Ref>, there is no o(log)-rounds algorithm for finding a minimum spanning tree, on sublinear with polynomial global memory.


Let G = (V,E) be an input graph with the promise that G is either an n-vertex cycle or it consists of two disjoint n/2-vertex cycles. Define a new weighted graph G^* with vertex set V^* = V ∪{v^*} with v^* ∉ V and edge set E^* = E ∪{{v^*,u}: u ∈ V}, and with edge weight w: E^* →ℛ defined as follows:


    w(e)     =
        
            1     if  e ∈ E                      
    
            2     if  e ∈{{v^*,u}: u ∈ V}


Notice that G^* is connected, has n+1 vertices, 2n edges, and diameter 2. The diameter of a minimum spanning tree is Θ(n) (whether G is one or two cycles).

Next, observe that if G is an n-vertex cycle then a minimum spanning tree algorithm, when run on G^*, returns a spanning tree of weight n+1, but if G consists of two disjoint n/2-vertex cycles, then we get a spanning tree of weight n+2.

This implies that if there is a minimum spanning tree algorithm which runs in o(log n) rounds (even for constant diameter graphs) on sublinear with polynomial global memory then the 1-vs-2-cycles conjecture fails.

This does not preclude the existence of an O(log) round algorithm for the problem (in the proof, O(log) = Ω(log n)).
In fact, such an algorithm exists with larger global memory <cit.>.
The proof does rule out the existence of an o(log) algorithm however, since o(log) = o(log n) for all values of . 




 Paper Title: Online Computation of String Net Frequency.











P. Guo et al.




School of Computing and Information Systems, 
The University of Melbourne

zifengg@student.unimelb.edu.au,
william.umboh@unimelb.edu.au,
awirth@unimelb.edu.au,
jzobel@unimelb.edu.au

School of Computer Science, The University of Sydney

anthony.wirth@sydney.edu.au

ARC Training Centre in Optimisation Technologies, Integrated Methodologies, and Applications (OPTIMA)


Online Computation of String Net Frequency
    
Peaker Guo10000-0002-9098-1783 Seeun William Umboh1,30000-0001-6984-4007 Anthony Wirth1,20000-0003-3746-6704 Justin Zobel10000-0001-6622-032X

    
===================================================================================================================================================



§ ABSTRACT 
The net frequency (NF) of a string, of length m, in a text, of length n, is the number of occurrences of the string in the text with unique left and right extensions.
Recently, Guo et al. [CPM 2024] showed that NF is combinatorially interesting and how two key questions can be computed efficiently in the offline setting.
First, : reporting the NF of a query string in an input text.
Second, : reporting an occurrence and the NF of each string of positive NF in an input text.
For many applications, however, facilitating these computations in an online manner is highly desirable.
We are the first to solve the above two problems in the online setting, and we do so in optimal time, assuming, as is common, a constant-size alphabet: in (m) time and in (n) time.
Our results are achieved by first designing new and simpler offline algorithms using suffix trees, proving additional properties of NF, and exploiting Ukkonen's online suffix tree construction algorithm and  results on implicit node maintenance in an implicit suffix tree by Breslauer and Italiano.










§ INTRODUCTION


The net frequency (NF) of a string S, of length m, in a text T, of length n, is 
the number of occurrences of S in T 
with unique left and right extensions.
For example, let T be .
Among the five occurrences of , only the underlined occurrence 
has a unique left extension  and a unique right extension .
In contrast, the other occurrences of  either have 
a repeated left extension ( and ),
or a repeated right extension ().
Thus the NF of  is 1 in T.
Introduced by Lin and Yu <cit.>,
NF has been demonstrated to be useful
for Chinese phoneme-to-character (and character-to-phoneme) conversion 
and other NLP tasks <cit.>.

Recently, Guo et al. <cit.> reconceptualised NF and simplified the original definition.
They thus identified strings with positive NF, including
in Fibonacci words.
They also showed that there could be at most n distinct strings in T with positive NF.
They then bounded the sum of lengths of strings with positive NF in T of length n 
between Ω(n) and (n logδ),
where δ := max{ S(k)/k : k ∈ [n] } and S(k) is the number of distinct strings of length k in T.

Although NF can be efficiently computed in the offline setting <cit.>, 
it is also useful to determine NF in an online setting in
which a text is being dynamically extended.
In this setting, at all times we have read the first n characters from a stream and further characters are to be read in turn, that is, n is being incremented.
As each character arrives,
the data structure is updated and 
a query on NF computation can be answered.
Throughout our inspection of the online setting, T is an input text of which we have read the first n characters,
while S is a length-m query string. 
We consider the following two problems in the online setting.
: report the NF of S in T[1… n].
: for each string of positive NF in T[1… n], report one occurrence and its NF.


We have found that adapting the existing offline approach based on a suffix array
to the online setting is not trivial.
In the offline setting,
suppose we have read n characters of an input text T so far,
after building the structure for T[1 … n],
should we append a single character to T, we would have to build the structure 
for T[1 … n+1] from scratch, without reusing the structure for  T[1 … n].
In contrast, in this paper,
the structure for T[1 … n+1] derives from the structure for T[1 … n].
This setting aligns with 
the online suffix tree construction algorithm 
by Ukkonen <cit.>,
which is widely used 
due to its simplicity and online nature, cited in numerous follow-up works <cit.>.





  §.§.§ Our contribution.

In this work, we first introduce a new characteristic of NF 
(<ref>), 
specifically designed for NF computation with a suffix tree.
With this characteristic and Weiner links,
assuming a constant-size alphabet,
we present our optimal-time offline algorithm 
(<ref>).
Applying this characteristic in an asynchronous fashion,
our optimal-time offline algorithm 
(<ref>) using suffix links
is arguably simpler than the state-of-the-art suffix array-based solution.
We then adapt our offline algorithms to the online setting – to our knowledge online algorithms have not previously been reported.
With additional properties of NF and 
prior results on implicit nodes in an implicit suffix tree,
we obtain optimal (m)-time online and (n)-time online algorithms
(<ref> and <ref>). 





§ PRELIMINARIES





  §.§.§ Strings.

Let Σ be a constant-size alphabet throughout this paper. 
The constant-size assumption follows previous work on suffix trees <cit.>.
Let 𝑆𝑃≡ S · P be the concatenation of two strings, S and P.
Let [n] denote the set {1,2,…,n}.
A substring of string T with starting position i ∈ [n] 
and end position j ∈ [n] is written as T[i … j]. 
A substring T[1… j] is called a prefix of T, 
while T[i … n] is called a suffix of T.
Let T_i denote the i^th suffix of T, T[i… n].
An occurrence in the text T is a pair of 
starting and ending positions (i, j) ∈ [n] × [n].
We say (i, j) is an occurrence of string S if S = T[i … j],
and i is an occurrence of S if S = T[i … i + |S| - 1].
An occurrence (i', j') is a sub-occurrence of (i, j)
if i ≤ i', while j' ≤ j.
The frequency of S (in T), denoted by f(S), 
is the number of occurrences of S in T.




  §.§.§ Net frequency.


The NF of a string was originally defined by Lin and Yu <cit.>,
and reconceptualised and simplified by Guo et al. <cit.>.
The NF of a unique string is defined to be zero;
the NF of a repeated string S, written as (S), 
is the number of occurrences of S with unique left and right extensions.









An occurrence (i, j) is a net occurrence if
f( T[i   … j  ] ) ≥ 2, 
f( T[i-1 … j  ] ) = 1, and
f( T[i   … j+1] ) = 1.
When i=1, f( T[i-1 … j  ] ) = 1 is assumed to be true;
when j=n, f( T[i   … j+1] ) = 1 is assumed to be true.



NF can be also formulated in terms of symbols from Σ, 
rather than occurrences. 



Given a repeated string S,

    (S) =  | {  
    (x,y)∈Σ×Σ : f(xS)=1  and   f(Sy)=1  and  f(xSy)=1 
     }|  .



Here, strings xS, Sy, and xSy are the  
left, right, and bidirectional extensions of S, respectively.
Note that in <ref>, the condition 
on the bidirectional extension f(T[i-1 … j+1])=1 is not needed because 
it is implied by f( T[i-1 … j  ] ) = 1 and f( T[i   … j+1] ) = 1.
A string S is branching in T if  
S is the longest common prefix of two distinct suffixes of T.
The following result says that branching strings are the only strings 
that could have positive NF.


If S is not a branching string, then (S)=0.




  §.§.§ Suffix trees.

Introduced by Weiner <cit.>,
the suffix tree is arguably one of the most significant and versatile 
data structures in string processing with a wide range of 
applications <cit.>. 
The suffix tree of T is a rooted directed tree 
whose edges are labelled with substrings of T.
It contains n leaf nodes, each labelled from 1 to n.
For each i ∈ [n], the concatenation of the edge labels 
on the path from the root to leaf i forms the suffix T_i. 
Each non-root and non-leaf node, known as a branching node, has at least two children,
and the first character of the label on the edge to each child is distinct. 


It is commonly assumed that a unique sentinel character $∉Σ 
is appended to the text.
This ensures that no suffix is a prefix of another,
thereby ensuring that each suffix is represented as a distinct leaf in the suffix tree.
Given a node u, the path label of u, denoted by u, 
is the concatenation of the edge labels 
on the path from the root to u.
We call |u| the string depth of u, denoted by u.


In suffix-tree construction algorithms <cit.>, 
a type of pointer 
called a suffix link[
A suffix link is also referred to as a vine pointer in the
Prediction by Partial Matching algorithm <cit.> 
or as a failure link in the
Aho–Corasick algorithm <cit.>.
]
helps traverse the suffix tree efficiently; it is
a key ingredient in achieving linear time.
In our algorithms, besides suffix links,
we also use Weiner links, 
also known as reverse suffix links.
Given a branching node, u, the suffix link of u
points from u to another branching node, v,
where v is the string obtained by removing the first character of u, that is, the longest proper suffix of u.
Whenever there is a suffix link from u to v,
there is a Weiner link
from v to u.
Suffix links and Weiner links are usually only needed among branching nodes,
but some applications also require them 
among leaf nodes <cit.>.

We now define the following notations in a suffix tree used in subsequent sections.
Consider a node u.
Let u be the starting position of some occurrence of u in the text.
Let u be the parent node of u.
Let uy be the child node v of u such that 
the label of the edge uv starts with symbol y,
and  if such v does not exist.
Let u := { (v, y) : v = uy≠}.
Let u be the node that receives the suffix link from u.
Let ux be the node v that receives a Weiner link from u and whose path label is v = x ·u, and  if such v does not exist.
Let u := { (v, x) : v = ux≠}. 



A suffix tree of T can be also defined as a trie for all the suffixes of T
where each non-branching path is compressed into a single edge. 
A locus in a suffix tree corresponds to a node in the uncompressed trie.
More precisely,
it is a location in the suffix tree 
specified as a pair (u, d) 
where u is a node
and d is an integer that satisfies u < d ≤u.



Given a substring S of T, after traversing the suffix tree 
from the root following the characters in S,
the traversal always ends at a unique locus, (u, d). 
We say the traversal ends within an edge if d < u
and ends at a node if d = u.
Observe that the frequency of S equals the number of leaf nodes in the subtree rooted at u.
So S is unique if u is a leaf node and 
is repeated if u is a branching node.
Also note that 
S = u[1 … d].



  §.§.§ Implicit suffix trees.


The implicit suffix tree of a text can be defined by modifying its suffix tree as follows. 
First, every edge with only the sentinel character, $, as its label is removed.
Then, for each node u with only one child, v, we perform these operations: let w := u;
remove node u, together with  edges wu and uv;
and create a new edge from w to v with edge label
T[v+w…v+v],
the concatenation of the edge labels of wu and uv.
The tree obtained is called an implicit suffix tree.
In an implicit suffix tree, branching nodes and leaf nodes are referred to as explicit nodes.
Note that in a suffix tree, each suffix is unique and corresponds to a distinct leaf node.
However, in an implicit suffix tree, repeated suffixes
do not correspond to leaf nodes. 
For example, the repeated suffixes of the text 
are the strings , ,  , and . 



An implicit node (u, d) is a 
locus such that u[1… d] is a repeated suffix of the text.


Each implicit node in an implicit suffix tree 
corresponds to a branching node in the suffix tree
with only two children and one of them is $.
Note that if an implicit node satisfies d = u,
then it coincides with a branching node in the implicit suffix tree.
<ref> demonstrates the major aspects of the suffix tree and implicit suffix tree.
On its right, among the implicit nodes numbered 10–12,
node 12 coincides with a branching node.

The key idea of Ukkonen's algorithm is successive building 
of implicit suffix trees for each prefix of the text,
then adding the $ at the end.
The algorithm maintains a pointer called the active point
to the locus of the longest repeated suffix of the text.
One limitation of Ukkonen's algorithm is that
the locations of the implicit nodes are not maintained
during suffix tree construction.
Breslauer and Italiano <cit.>
provide techniques for such task and extend Ukkonen's algorithm.
They also further classify edges and nodes in an implicit suffix tree.


An edge uv is called an external edge if v is a leaf node
and an internal edge otherwise.
An implicit node u is called an internal implicit node
if u is within an internal edge and an external implicit node otherwise.


If the locus each suffix corresponds to has an outgoing suffix link (including leaf and implicit nodes),
 then these suffix links 
form a path, which is called the suffix chain by Breslauer and Italiano. 
The path starts from the leaf labelled by T and 
ends at the root, going through each suffix and
satisfying the following.


The suffix chain can be partitioned into the following consecutive segments: 
leaves, external implicit nodes, internal implicit nodes, and 
implicit nodes that coincide with branching nodes.


On the right of <ref>,
these segments are: nodes 1–8, 9–10, 11, and 12.

The main result by Breslauer and Italiano that we use
together with Ukkonen's online suffix tree construction algorithm
is summarised as follows.


An implicit suffix tree on the first n characters of T , together with the suffix links and Weiner links can be built in (n) amortized time.
A query returning the implicit nodes within a specific suffix tree edge takes worst-case (1) time.


Breslauer and Italiano showed that there is at most one implicit node within an internal edge.
Although each external edge may contain multiple implicit nodes, 
their representation as an arithmetic progression can be returned in (1) time <cit.>.
This result also supports other queries in the online setting <cit.>.












§ OFFLINE NF COMPUTATION WITH SUFFIX TREES


We present our suffix-tree based approaches for offline NF computation,
which are arguably simpler than the suffix-array based approaches <cit.>. 
We adapt them from the offline to the online setting in the following section.




 §.§ Offline Algorithms




The NF characteristic for suffix array might lead to 
explicit character matching in a suffix tree.
Moreover, when leaf nodes do not have incoming Weiner links, 
we are unable to enumerate unique left extensions of a string; 
so <ref> is unhelpful with a suffix tree.
We therefore introduce a new characteristic,
which is more suitable for computing NF in a suffix tree.
Essentially, it bypasses enumerating unique left extensions of the string.



Given a repeated string S,
let L(S) := { x ∈Σ : f(xS) ≥ 2 }
and r(S) := { y ∈Σ : f(Sy) = 1 }, then

    (S) = |r(S)| - ∑_x ∈ L(S) | r(xS) ∩ r(S) |   .





We first define the following three sets:

    L_=1   := { (x,y)∈Σ×Σ : f(xS) =1  and  f(Sy) = 1  and  f(xSy)=1 },
    
    L_≥ 1   := { (x,y)∈Σ×Σ : f(xS) ≥ 1  and  f(Sy) = 1  and  f(xSy)=1 },  and 
    
    L_≥ 2   := { (x,y)∈Σ×Σ : f(xS) ≥ 2  and  f(Sy) = 1  and  f(xSy)=1 }.

Observe that |L_=1| = |L_≥ 1| - |L_≥ 2| and
(S) = |L_=1|.
Next, note that for each y ∈Σ, 
if f(Sy) = 1, then
f(xSy) ≤ 1 holds for each x ∈Σ.
Further, if f(xSy) = 1 then f(xS) ≥ 1;
otherwise, f(xSy) = 0 and f(xS) = 0.
Thus, we have
|r(S)| = |L_≥ 1|.
Finally, 
we derive that 
∑_x ∈ L(S) |r(xS) ∩ r(S)| 
= 
|  ⋃_x ∈ L(S)  r(xS) ∩ r(S) |
=
|L_≥ 2|.
Therefore, we have proved the desired result. 

Take T= and S= as an example.
We have r(S) = {, , } and 
L(S) = {, }.
When x=, r(xS) = {, } 
and r(xS) ∩ r(S) = {}.
When x=, r(xS) = {, }
and r(xS) ∩ r(S) = {}.
Thus, (S) = 3 - (1 + 1) = 1.
The following informs checking of whether a right extension is unique.


Consider a branching node u and y ∈Σ.
Let  S := u, then, Sy is unique if uy is a leaf.


<ref> immediately suggests a criterion
for early termination of the algorithm when it is determined that 
the NF of the query string is zero.



If |r(S)|=0, then (S)=0.


<ref> was introduced to narrow down candidates
with a potentially positive NF when solving .
However, due to certain limitations of a suffix array, 
the result could not be efficiently applied to . 
Now, with a suffix tree, 
we can utilise this result to detect a zero NF input string for .


Our algorithm using a  suffix tree 
is presented in <ref>. 
It uses <ref> and <ref> for zero NF detection.
The algorithm computes the two terms in <ref> separately and 
also utilises Weiner links for left extension enumeration.
The correctness of the algorithm follows from <ref>.




Given a string S, <ref> 
runs in (|S|) time in the worst case.
Locating the locus of S in the tree takes (|S|) time.
Computing |r(S)| takes at most (|Σ|) time,
a constant in our analysis.
Then the time to compute ∑_x ∈ L(S) | r(xS) ∩ r(S) |
is bounded by 
|Σ|^2,
also a constant.











 §.§ Offline Algorithm


From <ref>, only branching strings 
could have positive NF.
In this section, we present an offline algorithm that 
extracts and stores the NF of each branching string
in its corresponding branching node in the suffix tree.
The stored positive NF values can be reported afterwards.


In <ref>, 
the two terms in in <ref> 
are computed in separate steps of the algorithm.
For our algorithm, we compute these two terms 
in an asynchronous fashion:
before we finish computing the NF of one branching string,
we might start computing the NF of another branching string.
In other words, the NF of each branching string 
is partially computed and updated as the algorithm progresses.
Specifically, suppose we are visiting a branching node v, 
let u := v,
xS := v, and S := u.
We update the NF for both xS and S as follows.
We compute |r(xS)| to update (xS) and 
compute | r(xS) ∩ r(S) | to update (S).
Note that, after visiting node v,
it is possible that neither (xS) nor (S)
has the correct value, as they may have only been partially computed. 
But at the end of the algorithm, each NF value will be correct.


Our offline algorithm 
is listed in <ref>
and illustrated in  <ref>.
It does not require traversing
the branching nodes in a particular order, and
runs in (n) time 
in the worst case.
Since checking whether a node is a leaf takes (1) time,
the overall time usage is bounded by the number of nodes 
visited throughout execution. 
Given a branching node, u,
each of its child nodes, w, is visited exactly once; 
each node in the suffix tree is 
the child node of exactly one branching node.
Moreover, there are at most n branching nodes in the tree.
Thus, the total number of nodes visited is bounded by (n).













§ ONLINE NF COMPUTATION WITH IMPLICIT SUFFIX TREES


With our offline algorithms, we first introduce additional properties
of NF then present our online algorithms based on these results.



 §.§ Online Algorithm



Our offline algorithm 
computes the two terms in <ref> 
for a query string whose locus is a branching node.
In the online setting, our online approach is still based on <ref>,
but also taking implicit nodes into account in the implicit suffix tree.
We first reconsider <ref>, as <ref>.


Consider a branching node, u, 
and y ∈Σ.
Let S := u, then, 
Sy is unique if v := uy is a leaf and edge uv has no implicit node.



Let (u, d) be the locus of the query string S.
In the offline case, |r(S)| in <ref>  
is computed by simply counting the number of leaf child nodes of u.
But it is more involved in the online setting. 






Consider an implicit node (u, d) and
let ρ(u, d) denote the number of unique right extensions of u[1 … d].



Consider an implicit node (u, d) and let S := u[1 … d].
The following cases are illustrated in <ref>.


  *  If (u, d) is an internal implicit node, then ρ(u, d) = 1.

  *  If (u, d) is an internal implicit node that coincides with a branching node,
then ρ(u, d) equals one plus the number of leaf child nodes of u
whose leading edge does not contain an implicit node.

  *  If (u, d) is an external implicit node,
then  ρ(u, d) = 2 if (u, d) is the deepest such on the edge,
and ρ(u, d) = 1 otherwise.
 



In case-1, the only unique right extension character is the $.
case-2 follows from <ref>, and we add one for the $.
In case-3, the deepest such has the $ and a leaf child, while the others only has the $.



The NF of the longest repeated suffix is given as follows.

Consider an implicit node (u, d) and let S := u[1 … d].
If S is the longest repeated suffix of T,
then (S) = ρ(u, d).


Observe that each occurrence of S has a unique left extension character as otherwise S would not be the longest repeated suffix.
So, (S) = ρ(u, d).


The following result provides another zero NF detection mechanism. 


Consider an implicit node (u, d) and let S := u[1 … d].
If S is not the longest repeated suffix and 
(u, d) does not coincide with a branching node,
then (S) = 0.



First consider each occurrence of S that is 
not a sub-occurrence of an occurrence of the longest repeated suffix:
the left extension character of such occurrence is always T[n-d].
Next, consider each occurrence of S except the rightmost one:
since (u, d) does not coincide with a branching node,
the right extension character of such occurrence is always T[i+d]
for any occurrence i of S with i < n-d.
Thus, no occurrence of S is a net occurrence and (S) = 0.



For the remaining case, not covered by <ref> 
or <ref>,
the NF of the query string cannot be easily deduced.
Further computation, assisted by Weiner links, is required.
In <ref>,
the recipient of each Weiner link is a branching node,
however, for online , implicit Weiner links, 
whose recipients are implicit nodes, are also needed. 
We present the following result on how to compute an implicit Weiner link.
The result is illustrated in <ref>.



Consider an implicit node (u, d) 
that coincides with a branching node.
Let (q, ℓ) be another implicit node such that 
q[1 …ℓ] = x ·u[1 … d]
for some x ∈Σ.
Define w := q.
If there exists an ancestor v of u such that 
vx exists, then
w = v^*x
where v^* is the lowest such ancestor of u;
otherwise, w is the root.




The proof is illustrated in <ref>.

If v^* exists,
let w' := v^*x and 
assume, by contradiction, that w' ≠ w.
Let P := v^*, then w' = xP.
Since xP is a prefix of xS,
w' is an ancestor of w.
Let P' := w[2 …w],
then xP' = w.
Since w is a branching node,
there exists a branching node v' with v' = P'.
This implies that v'x = w.
Since v' is an ancestor of u,
this contradicts that v^* is the lowest such ancestor.
Thus, our assumption is false and w = w'.

If v^* does not exist,
assume, by contradiction, that w is not the root.
Similarly, since w is a branching node,
there exists a branching node v' such that v'x = w.
Since v' is an ancestor of u,
this contradicts that v^* does not exist.
Thus, our assumption is false and w is the root.









Note that the concept of implicit Weiner links has also been described before <cit.>,
but with either a different definition or way of computing them.
We next introduce a corollary of <ref>
that splits the set L(S) into two disjoint sets.


Consider a locus (u, d) with d = u. 
Let S := u, 

    L_𝑒𝑥𝑝(S)    :=
    { x ∈Σ : f(xS) ≥ 2  and the locus of  xS  is an explicit node}, 
    
    L_𝑖𝑚𝑝(S)    :=
    { x ∈Σ : f(xS) ≥ 2  and the locus of  xS  is an implicit node},

and let
λ(x) := | r(xS) ∩ r(S) |, then

    (S) = |ρ(u, d)| 
    - ∑_x ∈ L_𝑒𝑥𝑝(S)λ(x) 
    - ∑_x ∈ L_𝑖𝑚𝑝(S)λ(x)   .



Using <ref> and <ref>,
together with the results introduced in this section earlier,
we present our online algorithm in 
<ref>.
Computing implicit Weiner links takes (|S| · |Σ|^2) ⊆(|S|) time, assuming a constant-size alphabet.
The rest of the analysis follows from the analysis of <ref>
and we have the following result.



Online can be solved in worst-case (|S|) time.










 §.§ Online Algorithm


Our arguably very simple offline algorithm 
forms the basis of our online approach.
Similar to the online algorithm,
we need to deal with left extensions whose loci are implicit nodes.
We make an additional observation.



Consider a repeated suffix S and its left extension, xS,
which is also a repeated suffix.
If the locus of xS coincides with a branching node,
then the locus of S also does.
If the locus of S does not coincide with a branching node,
then the locus of xS also does not.


Consider the suffix chain in <ref> in reverse
and we have the desired result.


With <ref>, observe that at most one string might require 
implicit Weiner links: namely, the longest repeated suffix whose locus
coincides with a branching node.
The other repeated suffixes whose locus coincides with a branching node
do not have implicit Weiner links.
Our online algorithm is adapted from our offline algorithm as follows.
We first compute the NF of the longest repeated suffix.
We then invoke offline , but use <ref> 
instead of <ref>. 
While traversing each branching node,
we keep track of string depth and find τ,
the longest repeated suffix whose locus coincides with a branching node.
Once we do, we invoke online on τ.
Overall, the cost is bounded by (n + |τ|) ⊆(n) where 
(n) is the cost for offline and
(|τ|) is the cost for online on τ.

Online can be solved in worst-case (n) time.











§ CONCLUSION AND FUTURE WORK


In this work, we present, to our knowledge,
the first and, indeed, optimal-runtime online algorithms 
for both and .
Having unsuccessfully investigated online approaches based
on suffix arrays – the basis of previous offline
methods – we turned our attention to suffix trees,
using which we found offline and online
algorithms that are runtime-optimal.
The results are based on new characteristics and properties of net frequency
and prior results on auxiliary pointers in suffix trees
and on implicit node maintenance. 

An avenue of future work is design and engineering an efficient implementation
of our solution, in particular the structures required for 
implicit nodes such as structures for dynamic nearest marked ancestors in trees <cit.>
and structures for ancestor relationships <cit.>. 

 




  §.§.§ 
 
The authors thank Patrick Eades for insightful discussions during the early stage of this work.
The authors also
thank the anonymous reviewers for their suggestions.
This work was supported by the Australian Research Council, 
grant number DP190102078, 
and an Australian Government Research Training Program Scholarship.










splncs04





 Paper Title: Settling the Pass Complexity of Approximate Matchings in Dynamic Graph Streams.




 
 















Umathx45
Umathxmn
      <5> <6> <7> <8> <9> <10>
      <10.95> <12> <14.4> <17.28> <20.74> <24.88>
      mathx10
      
mathxUmathxmn
1mathx"91


skins,breakable
enhanced jigsaw














propertypropertyProperty
property(#1)#2#3
equationeqEq
equation(#1)#2#3








arrows
arrows.meta
shapes
backgrounds
positioning
decorations.markings
decorations.pathreplacing 
patterns
calc
fit
decorations





-@thistlm




[itemize]leftmargin=20pt
[enumerate]leftmargin=20pt








theoremTheorem
lemmaLemma[section]
proposition[lemma]Proposition
corollary[lemma]Corollary
claim[lemma]Claim
fact[lemma]Fact
assumption[lemma]Assumption
invariant[lemma]Invariant

conj[lemma]Conjecture
definition[lemma]Definition
problemProblem

*claim*Claim
*assumption*Assumption
*proposition*Proposition
*lemma*Lemma

observation[lemma]Observation
propertyProperty


*theorem*Theorem

lemmaLemmaLemmas
claimclaimclaims
propertyPropertyProperties
invariantInvariantInvariants

mdresultResult
result[backgroundcolor=lightgray!40,topline=false,rightline=false,leftline=false,bottomline=false,innertopmargin=2pt]





remark[lemma]Remark


definition

mdproblemProblem
Problem[backgroundcolor=ForestGreen!15,topline=false,bottomline=false, innerbottommargin=12pt,innertopmargin=12pt]
*mdproblem*Problem
Problem*[hidealllines=false,innerleftmargin=10pt,backgroundcolor=gray!10,innertopmargin=5pt,innerbottommargin=5pt,roundcorner=10pt]
mddefinition[lemma]Definition
Definition[hidealllines=false,innerleftmargin=10pt,backgroundcolor=white!10,innertopmargin=5pt,innerbottommargin=5pt,roundcorner=10pt]
*mddefinition*Definition
Definition*[hidealllines=false,innerleftmargin=10pt,backgroundcolor=white!10,innertopmargin=5pt,innerbottommargin=5pt,roundcorner=10pt]
mdremarkRemark
Remark[hidealllines=false,innerleftmargin=10pt,backgroundcolor=gray!10,innertopmargin=5pt,innerbottommargin=5pt,roundcorner=10pt]

ourbox[hidealllines=false,innerleftmargin=10pt,backgroundcolor=white!10,innertopmargin=2pt,innerbottommargin=5pt,roundcorner=10pt]


mdalgorithmAlgorithm
Algorithm


lemrestateinnerLemma


restate (restated)..5em#3
restate
*restate





































































































tbox[
		enlarge top by=5pt,
		enlarge bottom by=5pt,
		 breakable,
		 boxsep=0pt,
                  left=4pt,
                  right=4pt,
                  top=10pt,
                  arc=0pt,
                  boxrule=1pt,toprule=1pt,
                  colback=white
                  ]
	










































































































































































































































 






Settling the Pass Complexity of Approximate Matchings 
 in Dynamic Graph Streams
    Sepehr Assadi[(sepehr@assadi.info) Cheriton School of Computer Science, University of Waterloo. 
Supported in part by a  Sloan Research Fellowship, an NSERC
Discovery Grant, a University of Waterloo startup grant, and a Faculty of Math Research Chair grant. ] 

 University of Waterloo Soheil Behnezhad[(s.behnezhad@northeastern.edu) Khoury College of Computer Sciences, Northeastern University. ]
 
 Northeastern University Christian Konrad[(christian.konrad@bristol.ac.uk) School of Computer Science, University of Bristol, UK. 
Supported by EPSRC New Investigator Award EP/V010611/1. ] 
 University of Bristol Kheeran K. Naidu[(kheeran.naidu@bristol.ac.uk) School of Computer Science, University of Bristol, UK.
Supported by EPSRC Doctoral Training Studentship EP/T517872/1. ] 
 University of Bristol Janani Sundaresan[(jsundaresan@uwaterloo.ca) Cheriton School of Computer Science, University of Waterloo. Supported in part by a David R. Cheriton Scholarship from Cheriton School of Computer Science, Faculty of Math Graduate Research Excellence Award, and Sepehr Assadi's NSERC Discovery Grant. ] 
 University of Waterloo

    
===========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================






§ ABSTRACT 



A semi-streaming algorithm in dynamic graph streams processes any n-vertex graph by making one or multiple passes over a stream of insertions and deletions to edges of the graph and
using O(n ·(n)) space. Semi-streaming algorithms for dynamic streams were first obtained 
in the seminal work of Ahn, Guha, and McGregor in 2012, alongside the introduction of the graph sketching technique, 
which remains the de facto way of designing algorithms in this model and a highly popular technique for designing graph algorithms in general. 



We settle the pass complexity of approximating maximum matchings in dynamic streams via semi-streaming algorithms by improving the state-of-the-art in both upper and lower bounds: 


	
  * We present a randomized sketching based semi-streaming algorithm for O(1)-approximation of maximum matching in dynamic streams using O(loglogn) passes. 
	The approximation ratio of this algorithm can be improved to (1+) for any fixed > 0 even on weighted graphs using standard techniques. 
	
	
	This exponentially improves upon
	several O(logn) pass algorithms developed for this problem since the introduction of the dynamic graph streaming model. 
	
	
	
  * We prove that any semi-streaming algorithm (not only sketching based) for O(1)-approximation of maximum matching in dynamic streams requires Ω(loglogn) passes. 
	
	This presents the first multi-pass lower bound for this problem, which is already also optimal, settling a longstanding open question in this area.  






roman







arabic









§ INTRODUCTION


In the dynamic graph streaming model, we have a graph G=(V,E) with vertices V := [n]. 
The edges in E are defined by a sequence of insertions and deletions in a stream σ := (σ_1,…,σ_N) of length N which
is often assumed to be some (n). Each entry σ_i of the stream is either inserting a new edge (u_i,v_i) to E or deleting an already inserted edge from it. 
The goal is to make one or a few passes over the stream, use a limited memory—ideally, O(n ·log(n)) bits, referred to as semi-streaming space—and
compute the answer to a given problem on the graph G at the end of the last pass. We focus on the maximum matching problem in this model. 

Maximum matching is arguably the most studied problem in the graph streaming model at this point (including both dynamic and insertion-only streams); we refer the interested reader to <cit.> that lists various lines of work on this problem. 
The history of this problem, focusing solely on O(1)-approximation algorithms and in dynamic graph streams, is as follows: 


	
  * The first such algorithms for matchings were obtained in <cit.> alongside the introduction of the dynamic graph streaming model itself. 
	The authors in <cit.> observed that the prior techniques of <cit.> (in the MapReduce/MPC model) also imply an O(logn)-pass semi-streaming algorithm for 2-approximation of maximum matching in dynamic streams.
	[Technically, the algorithms of <cit.>, and some subsequent ones, use n^1+1/p-space in O(p) passes. This translates 
	to an O(log(n)/loglog(n))-pass algorithm in semi-streaming space. Yet, to keep the focus on the bigger picture, we 
	ignore this lower-order term improvement and refer to these algorithms as O(logn) passes still.]
	
  * In the same work, <cit.>, building on <cit.>, further improved the approximation ratio of the algorithm of <cit.> to (1+)-approximation for any fixed > 0 using O(log^2(n)) passes
	on general graphs and O(logn) passes on bipartite graphs. 
	
  * The algorithms of <cit.> were subsequently improved in <cit.> to an O(logn)-pass algorithm for (1+)-approximation even on weighted (general) graphs. 
	Very recently, this algorithm was simplified and slightly improved in <cit.>. Yet another algorithm with similar guarantees for unweighted bipartite graphs was obtained in <cit.>. 
	
	
  * In addition, some generic reductions from general to bipartite <cit.> or weighted to unweighted matchings <cit.> developed over the years 
	can be applied to the algorithms of <cit.> to obtain O(logn)-pass algorithms for (1+)-approximation for fixed > 0.[These algorithms generally have a (much) worse dependence on the parameter  
	compared to the ones in the bullet point above, but for constant > 0, their guarantees are still asymptotically the same.] 

	 
  * In parallel to the line of work on multi-pass algorithms, a series of work studied single-pass algorithms for this problem <cit.>. In particular, <cit.>
	 proved that any O(1)-approximation of matchings via single-pass algorithms requires n^2-o(1) space and <cit.> improved this to an optimal Ω(n^2) space lower bound.  

This constitutes the state-of-the-art for matchings in dynamic graph streams: 

For semi-streaming algorithms on dynamic streams, O(1)-approximation to maximum matching is possible in ≈logn passes and not possible in a single pass. 

Closing this huge gap between upper and lower bounds for dynamic streaming matchings has been a longstanding open question in the graph streaming literature. 
This is precisely the contribution of our work: we fully settle the pass complexity of O(1)-approximation of maximum matching in dynamic streams by improving both the upper and lower bounds for this problem. 
 
 



 §.§ Our Contributions
 


Our first main result shows that surprisingly—at least to the authors—the right answer to the problem is not even close to ≈logn passes:




one can exponentially improve the pass complexity of 
different algorithms developed for this problem in <cit.>. 


	There is a randomized O(loglogn)-pass O(1)-approximation semi-streaming algorithm for the maximum matching problem in dynamic streams. 
	The result continues to hold even for (1+)-approximation of weighted (general) matching for any constant > 0. 


We find our main contribution in <Ref> to be the O(1)-approximation algorithm, which relies on different sets of techniques compared to the prior work on this problem.
The improvement to (1+)-approximation and weighted graphs follows from this novel algorithm using the existing reductions developed in <cit.>. 
We emphasize that previously, no better than O(logn/loglogn)-pass dynamic semi-streaming algorithms were known even for log(n)-approximation of matchings in its simplest form, namely, for 
unweighted bipartite matching. 



Prior to our work, the only other problem with a similar pass complexity in dynamic streams that we are aware of is the maximal independent set (MIS) problem, which also admits an O(loglogn) pass algorithm <cit.> (this 
result is related to ours as we will discuss in <Ref>). For the maximum matching problem itself, the best approximation ratio achievable by O(loglogn)-pass 
algorithms was n^O(1/loglogn)-approximation that follows from <cit.>. 


Furthermore, in addition to our algorithmic improvement, we can also improve the single-pass lower bounds of <cit.> all the way to Ω(loglogn) passes. 


	Any randomized semi-streaming algorithm for O(1)-approximation of maximum matching in dynamic streams with constant probability of success 
	requires Ω(loglogn) passes. The lower bound holds even on (unweighted) bipartite graphs. 


The only other semi-streaming lower bounds of similar nature are the very recent  Ω(loglogn)-pass and Ω(logn)-pass lower bounds for, respectively, MIS in insertion-only streams <cit.> 
and exact minimum spanning tree (MST) in dynamic streams <cit.> (these work are related to ours technique-wise and we shall discuss them in <Ref>). 
For the maximum matching problem itself, we only knew Ω(logn)-pass lower bounds for finding exact maximum matchings <cit.> and a conditional Ω(log(1/))-pass lower bound for (1+)-approximation for small constant ∈ (0,1) <cit.>;
see also <cit.> for two-pass lower bounds for small approximation ratios (way) below 2; all these lower bounds for matchings hold even for insertion-only streams[The focus of these results is qualitatively different than ours; in insertion-only stream, obtaining a 2-approximation is trivial in a single pass, whereas in dynamic streams, 
the whole question is on obtaining some O(1)-approximation.]. 

Proving multi-pass semi-streaming lower bounds has been generally a challenging question (compared to the wealth of single-pass lower bounds; see the short survey in <cit.> for some discussion of this topic). 
With a few notable exceptions <cit.>, “strong” multi-pass semi-streaming lower bounds have only been obtained very recently for different problems, starting from two-pass algorithms <cit.> and now even for multi-pass ones <cit.>. 
<Ref> also contributes to this line of work and is among the very few optimal lower bounds (together with <cit.>). 

In conclusion, <Ref> and <Ref> together establish that the optimal pass complexity of approximate matchings in dynamic graph streams 
is Θ(loglogn) passes. 



Before moving on from our results, a quick detour is in order.  Similar to all other dynamic graph streaming algorithms, our algorithm is based on the graph sketching technique (see, e.g. <cit.> for the definition). 
	Our <Ref>, put differently, states that:
	
	There is an adaptive sketching algorithm that in O(loglogn)-rounds and (n)-size sketches can recover an O(1)-approximate matching with high probability.
	 
	Such a result is interesting on its own given the generality of graph sketching and its implications to other models as well. 
	
	For instance, this implies a Massively Parallel Computation (MPC) algorithm for approximating matchings in O(loglogn) rounds with
	machines of (n) memory (even O(n/log(n)) memory) and only (n) working memory. Prior work in <cit.> achieved MPC algorithms with similar guarantees 
	using various other techniques (and to our knowledge, all with n^1+Ω(1) working memory). Our result shows that graph sketching technique itself, which is one of the oldest techniques in the MPC model as well, 
	can achieve such bounds in a conceptually simpler way (and with the additional benefit of using a smaller working memory). As this is not the focus of the paper, we omit the definition and details of the model and instead
	refer the interested reader to the aforementioned papers for more details. 




 §.§ Our Techniques



Our upper and lower bounds are intimately connected to each other by looking at matching through the lens of maximal independent sets. Specifically:


  * Our upper bound uses the O(loglogn)-pass semi-streaming algorithm of <cit.> for MIS as a subroutine (in a non blackbox way) and borrows ideas and inspiration from the recent work of <cit.> that relates MIS to the vertex cover problem (the dual problem of maximum matching);

  * Our lower bound builds on and adapts the recent communication complexity techniques developed for proving an Ω(loglogn)-pass semi-streaming lower bound for MIS in <cit.>. 

We briefly discuss the techniques behind our work in this subsection and postpone a more elaborate discussion to our technical overview in <Ref>. 



  
Upper bound. The first main technical ingredient of our algorithm in <Ref> is a model-independent reduction from O(1)-approximate fractional matchings to the randomized greedy MIS algorithm[This is the algorithm that iterates over the vertices in a random order and greedily adds a vertex to the MIS as long as none of its neighbors that appear before it in the ordering are already chosen in the MIS.]. This reduction is inspired by the brilliant recent
work of <cit.> that showed that the complement of the randomized greedy MIS is a 2-approximate vertex cover in expectation! 
On the other hand, we show that in every step of the randomized greedy MIS, we can assign a fractional value to the edges in the 2-hop neighborhood of vertices that join the MIS, to instead form
a large fractional matching in expectation. 
It is worth noting that <cit.>, similar to us, relies on a primal-dual analysis and exhibits a 2-approximate fractional matching in the reduction; nevertheless, that fractional matching 
is only an analytical tool and in fact is a function of the randomized greedy MIS over all possible ordering of vertices and cannot be found by an algorithm[We shall note that while <cit.> has been
an important source of inspiration for us—and in the first place suggested to us that randomized greedy MIS might also be relevant to approximate matchings—our specific reduction and the techniques in its analysis
are almost entirely disjoint from <cit.>; see <Ref> for a more detailed comparison.].

The second main technical ingredient of our algorithm is a partial implementation of the above reduction in O(loglogn) passes of dynamic streams. To do this, 
we rely on the semi-streaming implementation of the randomized greedy MIS in O(loglogn) passes by <cit.>. We show that we can run this algorithm and additionally collect enough auxiliary information 
to also be able to somewhat recover the associated fractional matching defined in the reduction as well. The challenge is that this fractional matching, quite crucially, works with edges in the
 2-hop neighborhood of vertices that join the MIS; these edges however are not even visited by the randomized greedy MIS algorithm and its simulation in <cit.>. As a result, we are only able to work
 with them through certain “proxy” edges that we can sample algorithmically, and then delegate some part of the computation of this fractional matching to the analysis instead (the algorithm itself only returns a maximum matching
 of the sampled edges). 
 
 

  
Lower bound. Our lower bound follows the recently-developed hierarchical embedding technique of <cit.> (inspired by <cit.>) that (i) creates hard instances for p-pass streaming algorithms for a problem P
 by embedding many (p-1)-pass hard instances of P in a single graph G; and, (ii) applies a generalized round elimination argument to prove the lower bound (see <cit.> for the original round elimination
 and <cit.> for its generalization). There are two main differences in implementing this strategy in our work compared to <cit.> however. 
 
 The first key difference is in the combinatorial construction of hard instances. <cit.> designed a family of extremal graphs, based on a generalization of (RS) graphs <cit.>, that pack many induced collections of vertex-disjoint 
 “small” graphs inside a single “base” graph. This allows them to embed the (p-1)-pass hard instances as small graphs inside a single p-pass hard instance as the base graph. The inducedness guarantee of the base 
 graph now ensures that these embedded (p-1)-pass hard instances do not interfere with each other (e.g., do not add edges between vertices of each other) and thus remain hard even inside a single graph. 
 Instead, we create our hard instances by exploiting the power of edge deletions following the approach of <cit.> for proving 
 single-pass dynamic streaming lower bounds for approximate matchings. This way, our hard instances consists of a stream that inserts many (p-1)-pass hard instances together, not  necessarily with any induced subgraph collections (unlike <cit.>), followed by deletions of edges in many of these instances so that effectively only one large induced collection of (p-1)-pass instances remain. We show that in the context of O(1)-approximate matchings, 
 this is enough to force any algorithm for the p-pass instance to also solve many (p-1)-pass hard instances. 
 
 The second key difference is in the information-theoretic arguments. The new round elimination argument established in <cit.> crucially relies on
 the independence of the inputs of players in the corresponding communication game used to establish the streaming lower bound. In contrast, such an independence cannot hold for us given that 
 we need to ensure the input of one player is only deleting edges already inserted by another player (otherwise, the stream may delete edges that have not been inserted). Addressing this issue requires
 a careful sharing of the input of players with each other to guarantee that no not-inserted edge gets deleted, while making sure there is also not too much correlation between their inputs (correlation generally makes the task of proving these lower bounds
 harder or even impossible). 
 This part borrows ideas from the recent work of <cit.> in proving multi-pass dynamic streaming lower bounds for MST. Finally, proving the general round elimination argument 
 with these restrictions also requires a different direct-sum result
 based on internal information complexity <cit.> and a corresponding message compression argument for internal information <cit.> (in contrast to the external information complexity direct sum <cit.> used in <cit.> and its own message compression technique from <cit.>). 
 
 
 

 
 

 














 
























































§ TECHNICAL OVERVIEW


We use this section to unpack the main ideas behind our work and give a streamlined overview
of our approach. This section oversimplifies many details and the discussions
will be informal for the sake of intuition. Thus, while this section provides ample intuition and introduction to our approach, the rest of the paper is written in an independent way, and the reader 
can entirely skip this section and directly jump to technical arguments. Moreover, given the disjoint sets of techniques used in our upper bounds versus lower bounds, 
the following two subsections are entirely independent of each other and can be read in any order (this is also true of the rest of the paper). 



 §.§ Overview of Upper Bound


The starting point of our algorithm is a recent reduction of <cit.> from vertex cover to randomized greedy MIS, and a decade-old result of <cit.> that finds
the randomized greedy MIS in dynamic streams in O(loglogn) passes. Let us start with a quick overview of these works.



  §.§.§ Prior Work in <cit.>




  
Dynamic-streaming MIS algorithm of <cit.> Recall that in the randomized greedy MIS, we go over vertices in a random order, pick the first vertex in the MIS ℐ, remove all its neighbors from consideration from now on, 
and continue this way until we have visited all vertices.  

The algorithm of <cit.> is based on the following key observation: the effective degree of vertices, their degrees to not-yet-removed vertices, drops quite rapidly as we go through 
the random ordering of the vertices (this is often referred to as the “residual sparsity property” of the greedy algorithm <cit.>). Specifically, by the time we are processing
the k-th vertex, we expect the degree of each remaining vertex to be ≲ n/k. Intuitively, this is because a high degree vertex has a high chance of becoming a neighbor to one of the first k random
vertices in the beginning of this ordering and thus be removed itself (the actual argument is more nuanced because not all of the first k vertices of the ordering actually join the MIS; see <Ref>).  

<cit.> uses this property to simulate running the randomized greedy MIS in batches: pick a random ordering σ of vertices and let U_1 be the first batch of ≃ n^1/2 vertices of this ordering. 
Store all edges between them in a single pass using sparse-recovery (see <Ref>) since this subgraph can only have ≃ n edges. 
Using these edges, we can identify which vertices in U_1 will join the MIS in the algorithm, say, set ℐ_1 ⊆ U_1. Go over the stream one more time and this time mark each vertex 
that is neighbor to ℐ_1 as removed (this can be done by maintaining a counter for each vertex, to count the total number of insertions and deletions of its incident edges to ℐ_1). 

At this point, we have simulated the first ≃ n^1/2 iterations of the algorithm in O(1) passes. The residual sparsity property implies that degree of remaining vertices is only ≲ n^1/2. 
This means that we can now consider the next batch of ≃ n^3/4 vertices of the ordering as the set U_2 and with high probability still be able to store all their edges in ≃ n space[Sampling ≃ n^3/4 vertices
randomly or alternatively sampling each vertex w.p. ≃ n^-1/4 (implied by the random ordering of σ) means each sampled vertex only has ≲ n^-1/4· n^1/2 = n^1/4 neighbors in the sample.], and compute the 
independent set ℐ_2 ⊆ U_2. 
We can thus continue like this with batches U_2,U_3,…,U_t and by the time t ≃loglogn, all vertices are processed. This leads to an O(loglogn) pass semi-streaming algorithm that with high probability 
 simulates the randomized greedy MIS faithfully and outputs the same MIS. 



  
Model-independent reduction of <cit.>. A straightforward fact about any independent set of any graph G is that its complement must be a vertex cover. <cit.> made a beautiful discovery that 
the complement of the randomized greedy MIS on any graph G is in fact a 2-approximate vertex cover of G in expectation! This allows for “translating” many of the nice properties of the randomized greedy MIS
for obtaining a 2-approximation of vertex cover as well. 

The proof of this result is an elegantly simple application of LP duality. For a random order σ of vertices, we say an edge e ∈ E is blocking if one of its endpoints 
belongs to the MIS ℐ and it is the first neighbor (in ordering σ) of the other endpoint that joins the vertex cover 𝒞 = V ∖ℐ. I.e., e  is “blocking” this endpoint from joining ℐ and places it in the vertex cover instead. 
Let p_e denote the probability that e is blocking where the probability is over the randomness of σ. We have: 

    𝒞 = ∑_e p_e 
       for all v ∈ V:  ∑_e ∋ v1/2· p_e = v ∈𝒞≤ 1.

The first equation holds because for each vertex v that joins 𝒞, there is exactly one blocking edge incident on v. 
The second equation is more tricky and roughly holds because of the following: for any edge e=(u,v), conditioned on e being blocking, 
the probability that each of u or v belongs to the MIS is exactly half. This in turn implies that

    v ∈𝒞  = ∑_e ∋ ve is blocking∧ v ∈𝒞 = ∑_e ∋ v1/2· p_e,

where the first equality holds because these events are mutually exclusive (a vertex that joins 𝒞 can only have one incident blocking edge; this is not true of vertices that join ℐ). 
The upshot is that the assignment p_e/2 to every edge e ∈ E is a fractional matching of G 
with total value exactly half the size of the vertex cover 𝒞 of G. By duality of matching and vertex cover, these imply that 𝒞 is a 2-approximate vertex cover and p_e/2_e ∈ E is a 2-approximate fractional matching. 


It is worth pointing out that a direct combination of the above two works implies a semi-streaming algorithm that finds  a 2-approximate vertex cover in dynamic streams. We now discuss the challenges of extending these ideas to 
matching and how we address these challenges. 



  §.§.§ A Model-Independent Reduction from Matching to MIS
 




  
A similar reduction as in <cit.> for matching? While the reduction of <cit.> explicitly finds a 2-approximate vertex cover (in expectation), the fractional matching p_e/2_e∈ E introduced above 
is only an analysis tool: the algorithm itself is not actually finding this fractional matching; while the algorithm can identify the set of blocking edges used in the definition of p_e's for a single run of the randomized greedy MIS, these
edges are quite far from being any matching (see <Ref>). 










  
Our approach. We design a new scheme for finding a fractional matching from a single run of the randomized greedy MIS. We start with the following assignment x ∈^E to the edges: 

	
  * Whenever a vertex v joins the vertex cover 𝒞 (i.e., becomes incident to the MIS ℐ for the first time), assign
	a value of 1/(v) to every edge (v,w) with (w)≤(v). Here, the graph considered (including number of vertices or their degrees) is the one obtained
	by removing all vertices and their incident edges added in the previous iterations to ℐ and 𝒞. See <Ref>.



 



For now, let us ignore the technical (but necessary) condition that we only assign a value to edges (v,w) incident on v with (w) ≤(v) and instead assume we write 1/(v) over all remaining edges of v (we will  get back to this later). 
An easy observation now is that 

    ∑_e ∈ E x_e = 𝒞,

 because whenever a vertex v joins 𝒞, we increase total x-values by (v) · 1/(v) = 1. We want to establish that x is also not “far from” a fractional matching, meaning
that the x-value incident on any one vertex is not (much) more than one (thus a rescaling turns it into a fractional matching). 



Consider some vertex w ∈ V. There are two sources of x-value on edges of w: the ones that originate from w 
if and when it joins 𝒞, and the ones borrowed by w from its neighbors v that join 𝒞 before w is removed from the graph. The contribution of the first assignment is exactly 1 as argued for <Ref> and is thus bounded. As such, we only 
need to focus on the second assignment. 
 



This is where our crucial observation lies: in each iteration of the algorithm, if the expected borrowed assignment by a vertex is “high”, then this vertex also has an equally “high” chance of being removed from consideration after this iteration. 

Let us formalize this. Consider any iteration wherein we pick some vertex u in the random ordering to join ℐ in the algorithm. Firstly, 



    borrowed assignment of w in this iteration   = ∑_(v,w) ∋ wv joins 𝒞 in this iteration·1/(v)as v joining 𝒞 results in assigning 1/(v) value to one edge of w
       = ∑_(v,w) ∋ w(v)/n·1/(v)v joins 𝒞 if u ∈ N(v) and by the choice of σ, vertex u is chosen uniformly from remaining vertices = (w)/n.

Secondly, 

    w is removed in this iteration   = w joins ℐ or 𝒞 in this iteration = (w)+1/n,

where the second equality holds because w joins ℐ if u=w and joins 𝒞 if u ∈ N(w). Combining the above two equations gives us that
for any vertex w ∈ V, 

    borrowed assignment of w in this iteration≤w is removed in this iteration.



This brings us to an interesting probabilistic question. Fix a vertex w ∈ V and let X^w_1,X^w_2,…,X^w_n be n random variables where X^w_i is the borrowed assignment of w in iteration i of 
the randomized greedy MIS algorithm. We are interested in upper bounding: 

    ∑_i=1^n X^w_i  and  ∑_i=1^n X^w_i  subject to
    for all i ∈ [n]:     X^w_i | X^w_1,…,X^w_i-1≤X^w_i+1=⋯=X^w_n = 0 | X^w_1,…,X^w_i-1.

In words, we have a probabilistic experiment wherein the expected loss incurred in each step, no matter the history, is upper bounded by the probability of terminating the experiment at this step, and
we want to upper bound the total loss of the experiment. 

Suppose we could bound the expectation in <Ref> by O(1) and the variance by an O(1)-factor of the expectation. Then, using a somewhat careful application 
of Chebyshev's inequality, we can bound the expected “overflow” of the assignment x in total. In other words, we can say that (i) if we remove a constant fraction (less than one) of the x-value from 
vertices that have “too much” x-value on their edges, and (ii) further scale down x by some constant factor, we will end up with a fractional matching[While this step is non-trivial, it is mostly a careful calculation
and  there is not much more illuminating information that can be provided about it in this overview; so, we postpone more details of it to the actual proof.]. In conclusion, we can obtain a true fractional matching by “trimming down” x by a constant factor; combined with <Ref> and the duality of matchings and vertex covers,
this implies that the resulting fractional matching is an O(1)-approximation in expectation. 

Unfortunately however, we actually cannot achieve the desired bounds to the problem in <Ref> since the variables X^w_i can be unboundedly large. This is where our technical condition 
in the assignment of x comes in handy. In the actual definition of x, we are only assigning a value of 1/(v) to an edge (v,w) of a vertex v that joins 𝒞 if (w) ≤(v). Thus, for each vertex w, 
the total borrowed assignment in each iteration will be at most 

    ∑_(v,w) ∋ w 
    (w) ≤(v)1/(v)≤∑_(v,w) ∋ w 
    (w) ≤(v)1/(w)≤(w) ·1/(w) = 1.

In other words, in the problem of <Ref>, we additionally have that for every i ∈ [n], 0 ≤ X^w_i ≤ 1 holds deterministically. This extra condition is now enough to 
bound the expectation and the variance of this problem as desired, using a careful probabilistic analysis. 

Unfortunately, we now have one other problem. Under this actual definition of x, <Ref> no longer 
holds since the x-value we assign to edges of a vertex joining 𝒞 is no longer 1. However, we can analyze this step more carefully, and obtain an approximate version of this equation in expectation, i.e., prove that

    ∑_e ∈ E x_e≥1/2·𝒞.

This is sufficient to perform the above primal-dual analysis. 

In conclusion, we designed a “light weight” reduction that given a single execution of the randomized greedy MIS, finds an O(1)-approximate fractional matching in expectation. 



  §.§.§ Our Dynamic Streaming Algorithm for Matchings


The next step is to incorporate our reduction from fractional matchings to randomized greedy MIS in the semi-streaming implementation of <cit.>. 
We will be running the algorithm of <cit.> and then maintain enough auxiliary information along the way to be able to implement our own reduction
for finding a fractional matching. 
The issue here is to figure out which edges should be assigned a fractional matching, and with what value. Addressing this issue requires bypassing several challenges that we outline below, but we should right away note that we will not be able 
to  implement this reduction in a black-box way, and need to settle for some relaxations.  



  
Challenge 1: Large support in fractional matchings. An obvious but easy-to-address issue is that the support of the fractional matching x ∈^E returned by our reduction can be quite large (e.g., on a clique, it involves all the edges). 
Hence, we simply cannot hope to recover it with a semi-streaming algorithm. However, given that our original goal was not to recover this particular fractional matching, but rather find some large matching in the input graph, 
we can use a standard trick: we only need to sample each edge of the graph independently with probability ≃ x_e ·ln(n). Then, one can use a standard analysis[We emphasize that the independence in sampling is crucial here and is the key difference between our fractional matching and the one used in the analysis of <cit.>. Running the randomized greedy MIS and picking the blocking edges does indeed sample each edge with probability proportional to some fractional matching; however, the choice of edges are positively correlated, hence forming many stars instead of a large matching; see <Ref>.] to argue 
that the set of sampled edges contains an integral matching with size within a constant factor of the original fractional matching x. 

As such, our goal in implementing the reduction is to be able to determine the value of x_e for each edge in the stream at the time when an update to this edge happens (either insertion or deletion); then, using 
standard sparse-recovery primitives, we will be able to perform the sampling step above and recover a large enough matching. 



  
Challenge 2: Determining neighbors of a vertex v joining the vertex cover. In the fractional matching x ∈^E, 
whenever a vertex v joins the vertex cover 𝒞, it will assign a value of 1/(v) to (a subset of) its neighbors that are still present in the graph. 
But this requires the semi-streaming implementation to be able to determine the neighborhood of every vertex at the time it joins the vertex cover, despite the fact that <cit.> processes the input in large batches 
of vertices without looking at the entire graph. See <Ref>. 




To address this, we augment the semi-streaming algorithm to add a time stamp t(v) to each vertex v that joins the vertex cover: this is the index of the vertex u ∈ N(v) in the random ordering whose choice
in the MIS led the algorithm to add v to the vertex cover. If we compute these time stamps, then, for any vertex v, the set of its neighbors that are still present in the graph when v joins the vertex cover is all vertices w ∈ N(v) with t(w) ≥ t(v). 

But we now have another challenge: how can we compute these time stamps? As argued earlier, in <cit.>, figuring out if a vertex v needs to join the vertex cover after processing a batch U_i, amounts to finding 
if v has any neighbor to the newly added vertices ℐ_i ⊆ U_i to the MIS. This can be handled using a simple counter. But, figuring out the time stamps of v requires finding the smallest-index neighbor of v in ℐ_i.
In general, finding the minimum entry of an array of length m (corresponding to vertices in U_i) undergoing insertion and deletions is not possible in m^o(1) space and o(logm) passes which is way above our budget 
(indeed, this fact is the basis of the Ω(logn)-pass lower bound of <cit.> for findings MSTs in dynamic streams). 

Fortunately, it turns out the minimum-entry problem we need to solve here has a special form. To see this, we once again rely on the residual sparsity property of the randomized greedy MIS.
This time, we further partition each batch U_i into O(logn) sub-batches of geometrically increasing sizes. We can then prove that, with high probability, for every vertex v, 
the first sub-batch that contains at least one neighbor of v in ℐ_i, can also only have ≲logn neighbors of v (in ℐ_i) in total. In other words, except for a negligible probability, 
it is not possible that an “empty” sub-batch with no neighbor of v is followed by a “full” sub-batch with many neighbors of v. Using this property and standard sparse-recovery ideas, we show that 
we can run <cit.> as is, and then spend O(1) passes and O(n ·log(n)) space and recover the time stamps of all vertices as well. 



  
Challenge 3: Determining which edges receive fractional matchings. Recall that the fractional matching x ∈^E in our reduction, for each vertex v joining the vertex cover,  adds 1/(v) to each edge (v,w)
when (w) ≤(v) and not all neighbors of v; this was the crucial technical modification we needed for the correctness of the reduction. What we described so far allows us to determine the value of (v) at the time v joins the vertex cover. 
But to know which edges can receive this fractional value, we additionally need to compute (w) at the time v joins the vertex cover and not w itself. This is simply way too much information to even store, yet alone compute,
and we cannot hope to achieve this in the semi-streaming space at all. 

The solution to this challenge is to delegate some computation of the fractional matching in the reduction to the analysis instead. Specifically, in our semi-streaming implementation, we are simply going to
compute the time stamps as described before. Then, for every vertex v, we can figure out the remaining neighbors of v at the time v joins the vertex cover and sample ≃logn/(v) fraction of remaining neighbors of v. 
The total number of edges sampled this way will be ≃ nlogn edges still and we can find them using a sparse-recovery approach (albeit, for technical reasons, this part of the argument is more subtle and needs to work with limited-independence
hash functions). The rest of the algorithm is to simply return a maximum matching of these sampled edges. For the analysis only, we perform a simple rejection sampling idea to recover a sub-sampled version of the fractional matching x 
in the reduction, using the already sampled set of edges, and use this to argue about existence of a large matching among the sampled edges. 

In conclusion, our dynamic semi-streaming algorithm involves: (i) running the O(loglogn)-pass semi-streaming algorithm of <cit.> for simulating the randomized greedy MIS; (ii) spending O(1) passes to 
recover the time stamps of all vertices and using them to sample ≃ nlogn edges from the graph guided by our reduction of matching to greedy MIS; and finally (iii) returning
a maximum matching of the sampled edges. This gives an O(1)-approximate semi-streaming algorithm for maximum matching in O(loglogn) passes. As stated earlier, we can then use this algorithm in existing boosting frameworks 
for matchings to improve the approximation ratio to (1+) for any constant > 0 within the same asymptotic space and number of passes. 












 §.§ Overview of Lower Bound


Our lower bound uses the very recently developed technique of hierarchical embeddings in <cit.> and adapts it to proving dynamic streaming lower bounds, as opposed to insertion-only ones in <cit.>. 
We start by providing a quick overview of this technique and the challenges along the way in adapting it for our purpose. We then describe our fixes for them which also involve borrowing ideas from 
prior work in <cit.>—for single-pass dynamic streaming matching—to construct hard instances of the problem and <cit.>—for multi-pass dynamic streaming MST—as part of the information-theoretic 
analysis of these instances.  



Before starting the rest of this section, a quick comment in order. Our lower bounds (as well as prior work in <cit.> and almost all other streaming lower bounds) rely heavily on communication complexity arguments. 
As such, we go back and forth freely between communication and streaming in our discussions. A reader unfamiliar with communication complexity may want to review <Ref> for a basic introduction and its connection to streaming before proceeding. 



  §.§.§ The Hierarchical Embedding Technique of <cit.>


The Ω(loglogn) pass lower bound proven in <cit.> for finding MIS in insertion-only streams is based on a new communication/streaming lower bound technique termed hierarchical embeddings. 
At a (very) high level, this works as follows: A hard instance for p-pass 
streaming algorithms that solve MIS on n_p-vertices is constructed by `embedding' a collection of a × b hard instances 

    := G_i,j_i ∈ [a],j ∈ [b]

 for (p-1)-pass algorithms of MIS on smaller n_p-1-vertex graphs. All these smaller instances in  are put together inside a single graph G in such a way that: (i) finding MIS of G requires solving a special subset _ := _,j_j ∈ [b] of b of these (p-1)-hard 
instances for some ∈ [a]; but, (ii) these specific instances are hidden in the first pass of the algorithm, i.e.,  is not known to the algorithm, until effectively the end of its first pass. See <Ref>
for a rough illustration. 



Based on this construction, <cit.> proves that any algorithm now effectively has two choices: 

	
  * Either spends Ω(a · b) space to learn some non-trivial information about all the sub-instances in  with the hope of learning something non-trivial about the b special hidden ones; 
	
  * Or, spends its first pass simply to learn  only and then in the remaining p-1 passes, solve all the b special (p-1)-hard instances in _ independently, each on a different n_p-1-vertex graph. 

Let us use s_p(n) to denote the minimum space needed for solving MIS on p-pass instances of this distribution on graphs with n vertices. Then, the above two choices imply that 

    s_p(n_p) ≳mina · b , b · s_p-1(n_p-1);

the second term is because in the second scenario above, the algorithm has effectively learned nothing non-trivial about the special hidden instances and now only has (p-1) passes to solve b independent (p-1)-pass hard instances; 
thus, by induction and a direct-sum type argument, we can expect this task to require b · s_p-1(n_p-1) space. 

Working out the right parameters and using existing lower bound of s_1(n) = Ω(n^2) previously established <cit.> for the induction base implies that 

    s_p(n) ≳ n^1+1/2^Ω(p),

which in turn implies an Ω(loglogn)-pass lower bound for semi-streaming algorithms. 

Despite the clean plan above, formalizing this idea in <cit.> is quite challenging and involves handing the following two disjoint aspects of this approach: 



  
Combinatorial aspects. We need to pack many subgraphs of  inside a single graph G while ensuring that they do not interfere with 
each other so as to not “corrupt” their (p-1)-pass hardness properties. At the same time, the graph G should also force the algorithm—that is only tasked with solving MIS on a single graph G—to also solve MIS of all the special hidden instances in _, 
without revealing the identity of ∈ [a] in the first pass.  
This in particular requires the induced subgraph[This is actually only true about the graph appearing in the first half of the stream (which is oblivious to the choice of ) and not the entire graph; 
while this is a crucial aspect in <cit.>, we skip it in this informal discussion.]  of G on each of the sets _i for i ∈ [a] to consists of solely the edges of subgraphs in _i. This is a quite stringent combinatorial requirement and 
is handled in <cit.> by the introduction of a new family of extremal graphs that generalize (RS) graphs <cit.>; as this will be too much of a detour, we refer the reader to <cit.> for more details here.



  
Information-theoretic aspects. While the two scenarios for different types of semi-streaming algorithms outlined above provide a good intuition about  natural strategies, 
in reality, algorithms are not forced to follow such strategies. For instance, they may decide to correlate the b special instances in the remaining (p-1) passes 
instead of treating them independently. Analyzing arbitrary algorithms requires maintaining different (conditional) independence properties between different parts of the inputs and then using various information theory tools. 
This in particular includes information complexity direct sum arguments <cit.> and message compression techniques <cit.> on one hand, 
and generalizing standard round elimination arguments in <cit.> on the other. We again refer the reader to <cit.> for more details. 

We now mention the additional challenges of applying this technique for our purpose of proving a dynamic streaming lower bound for O(1)-approximation of matchings. 



  §.§.§ Challenges of Applying Hierarchical Embeddings for Approximate Matchings
 


To apply the hierarchical embedding technique of <cit.> for our purpose, we need to change both the above aspects of this technique entirely, due to the following challenges. 



  
Challenge 1: Combinatorial aspects of O(1)-approximate matchings. In the language of <cit.>, to force a p-pass O(1)-approximation algorithm for matchings on a graph G to have to solve
the (p-1)-pass instances of the matchings in the special hidden instances _, we need the majority of edges in all large matchings in G to come solely from instances _. This means that except for the edges of _, all other edges of G should admit a vertex cover with o(n) vertices. If we attempt to create our hard instances in the same way as <cit.>, 
this, at the very least, requires every _i for i ∈ [a] to contain an induced matching of size n-o(n) in the graph. This is way too stringent of a combinatorial requirement, and it is easy to argue that any graph admitting such a 
property can only contain O(n) edges in total (see <cit.>). Thus, the semi-streaming algorithm can simply store this graph in its memory and solve the problem exactly. 

Of course, it is no surprise that this approach does not work for matchings, since it is tailored toward  insertion-only streams (which admit a simple 2-approximation single-pass algorithm). 
For our purpose, we instead use an idea due to <cit.> for proving single-pass O(1)-approximation lower bounds for matchings in dynamic streams. This effectively allows us let go of the group-structure 
of sub-instances (i.e., their partitioning into _1,…,_a) and create an instance that involves only one induced set of (p-1)-pass instances (instead of many groups of them but then picking one group to be special as in <cit.>). 
We discuss our fix here in <Ref>. 



  
Challenge 2: Information-theoretic aspects of O(1)-approximate matchings. Addressing the previous challenge using edge deletions creates a significant hurdle in applying the information-theoretic arguments of <cit.>. 
On one hand, to ensure that we are working with correct dynamic streams, we need to ensure that the edges deleted in the second half of the stream already have appeared in its first half. 
But this means that the inputs in the second half and the first half of the stream have to be highly correlated, which breaks the independence properties 
used in <cit.> for their information-theoretic arguments. 

To address this challenge, we further borrow ideas from arguments of <cit.> for their single-pass lower bounds using augmented Index communication problem – roughly speaking, augmented Index
can be seen as the base case of the “augmented” round elimination technique of <cit.> (which <cit.> generalizes in the “non-augmented” case). Fortunately for us, <cit.> 
have recently showed a way to properly augment the input of players even for multi round/pass algorithms on dynamic streams, namely, which parts of the inputs of players to share, and which to keep hidden, 
in a way that generalizes the augmented Index the “right way”. Thus, to obtain our result, we need to generalize the augmented round elimination lemma of <cit.> and its dynamic streaming version in <cit.>, 
 in a similar manner that <cit.> did for the non-augmented round elimination in <cit.>. We discuss our approach in <Ref>. 



  §.§.§ Addressing Challenge 1: Our Combinatorial Construction


We now discuss our fix to challenge 1 above, starting with an overview of the prior work of <cit.>. 



  §.§.§ Single-pass lower bound construction of <cit.>
 

The authors in <cit.> proved an Ω(n^2)-space lower bound for O(1)-approximation of matchings in single-pass dynamic streams. Prior to <cit.>, all semi-streaming lower bounds for approximate matchings 
in insertion-only streams <cit.> or dynamic streams <cit.> relied on various combinatorially complex constructions 
based on RS graphs. On the other hand <cit.> designed an elegant method of replacing these combinatorial constructions in dynamic streams with much simpler graphs by crucially exploiting the edge deletions in the stream. 

Consider the following communication problem. 


  * Alice receives an n × n matrix A encoding the bipartite adjacency matrix of a random bipartite graph G between two sets of vertices L and R, each of size n. 
Each entry of A is independently chosen to be 0 or 1 with probability half. 

We think of the input to Alice as the insertions of edges  at the beginning of the stream. 

  * The input to Bob is random permutations σ_r and σ_c of [n] 
that reorder rows and columns of A, respectively. Bob is also given the following submatrix B of A: reorder the rows and columns of A according to σ_r and σ_c; then, 
for some previously-fixed = n-o(n), consider the (×) submatrix of A at the bottom right corner of A (after the reordering). Provide this sub-matrix except for its diagonal entries as B, and let 
diagonal entries of B be 0's instead. 

We think of the input to Bob as the deletion of edges  in the second half of the stream (based on the bipartite adjacency matrix). Since B is a submatrix of A, all edges deleted by Bob are already inserted by Alice. 
The input graph G at the end of the stream is then the bipartite graph on bipartition L and R and edges ∖. 


It is not hard to see that the graph G created this way has an induced matching M of size n/2-o(n) with high probability (inside the submatrix B of A with edges A - B). 
Moreover, the graph G ∖ M has a vertex cover of size o(n) (by picking the o(n) vertices not part of B). This implies that any O(1)-approximate matching algorithm
on the graph ∖ needs to recover many edges of M. See <Ref> for an illustration. 



In <cit.>, it was shown that given only A and without the knowledge of σ_r and σ_c, majority of edges in  have an equal chance of appearing as the edges of the induced matching M. 
Thus, from Alice's perspective, most edges in  can become important in finding a large matching in ∖. Hence, Alice needs to communicate Ω(n^2) bits before Bob can output
an O(1)-approximate matching in the graph (this argument misses the crucial information-theoretic aspect that Bob has the knowledge of  and thus knows “a lot” about A already; but we postpone this part to the discussion in <Ref>). 



  §.§.§ Our multi-pass lower bound construction
 

We are now finally ready to state how we create our hard instances. We define a new two-player communication problem, called Augmented Hidden Matrices (AHM), 
inspired by the construction of <cit.> described earlier. We then use the standard connection between streaming and communication complexity (<Ref>) to turn r-round communication lower bounds 
for AHM into Θ(r)-pass lower bounds for streaming algorithms. 

An r-round instance of AHM consists of two matrices A and B and is denoted by AHM_r(A,B). 
As before, matrix A (resp. B) corresponds to bipartite adjacency matrix of a bipartite graph on n vertices (resp. n-o(n) vertices) on each side. 
Moreover, A will determine edges  to be added to the graph and B will determine ⊆ to be deleted[ This is actually only true when r is an odd number but we will ignore this subtlety for this discussion; however, we 
note that in our streaming lower bounds, r will always be chosen to be odd.]. These edges are  such that any O(1)-approximation of matchings on the graph ∖ 
allows for solving the instance AHM_r(A,B). Crucially different from <cit.> however, it is not the case that A is entirely an input to Alice and B is input to Bob (but rather both players receive different parts of both matrices). 

Following the hierarchical embedding technique, an instance of AHM_r(A,B) is created from many instances of AHM_r-1 as follows (see <Ref> for an illustration): 

	
  * Let n_r and n_r-1 denote, respectively, the number of vertices in instances AHM_r and AHM_r-1, and t_r := n_r/n_r-1. 
	Start with a (t_r × t_r) matrix of (r-1)-hard instances 
	
    ℐ := (r-1_i,j, r-1_i,j)_i ∈ [t_r], j ∈ [t_r],

	where each (r-1_i,j,r-1_i,j) is an instance of AHM_r-1 on n_r-1 vertices. 
	
	
  * Matrix A is an (n_r × n_r) matrix 
	defined as follows. Partition the rows and columns of A into t_r groups of size n_r-1 (say, the first n_r-1 are in group one, the second in group two, and so on and so forth). 
	Then, matrix A is obtained by plugging matrix r-1_i,j between group i of rows and group j of columns.[It is worth making two remarks. Firstly, in a typical round elimination argument, we often remove the first round of 
	a protocol that Alice speaks first to obtain an (r-1)-round protocol wherein Bob speaks first. But, this means that for the underlying instances, the role of Alice and Bob keeps switching, hence, here the B_i,j-matrices (which one typically associated 
	with Bob's input) are instead defining A (which again is typically associated with Alice's input). Secondly, even though the matrices r-1_i,j are not used at the moment, some information about them actually will be revealed to Alice and Bob 
	which is crucial for the lower bound; this will be discussed later on.]
	
	In terms of the underlying graph, we think of each r-1_i,j inside A as defining edges between two distinct sets of n_r-1 vertices in the bipartite graph G (over the same grouping of vertices as rows and columns of A). 

	The set  of edges to be inserted to the graph are defined this way by the matrix A. 
	






	
  * Matrix B is an (n_r - o(n_r) × n_r - o(n_r)) matrix defined as follows. We pick two random permutations σ_r and σ_c of [t_r]; these correspond
	to reordering the row-groups and column-groups of the matrix A, or equivalently rows and columns of the instance-matrix ℐ.
	For some previously-fixed = t_r - o(t_r), define the instance-matrix ℐ_induced⊆ℐ as the (×) submatrix of ℐ 
	 in the bottom right corner after we apply the reorderings σ_r and σ_c. 
	 Similarly, define ℐ_special as the collection of  instances in the diagonals of ℐ_induced. Matrix B consists of submatrices r-1_i,j on 
	 the off-diagonal entries of ℐ_induced, i.e., instances in ℐ_induced∖ℐ_special and submatrices r-1_i,j on the diagonal entries, i.e., instances in ℐ_special. 
	
	In terms of the underlying graph, the sub-matrices in B are again mapped to the edges of the graph G in a similar way as matrix A. However, this time edges in B are being deleted from the graph G 
	and thus define the set  instead. 
	 	
	


The conclusion of this construction is that in the graph G, all edges inserted by A corresponding to instances in ℐ_induced∖ℐ_special are being deleted by B, 
while for the instances in ℐ_special, we will end up having a graph corresponding to an instance of AHM_r-1 (their B-side is inserted and their A-side is deleted here). This way, the graph G consists of 
a collection of = t_r - o(t_r) induced hard (r-1)-round instances in ℐ_induced on a set of n_r - o(n_r) vertices; if we ignore edges of these instances, then the entire graph 
has a vertex cover of size o(n_r). 







To see the intuition behind why such instances should be hard consider the following. Graph G created this way contains a very large induced subgraph consisting of vertex-disjoint copies of hard (r-1)-round instances, namely, 
the ones in ℐ_special. Moreover, all other edges of the graph can only form matchings of size o(n_r) given they are incident on o(n_r) vertices (i.e., the vertex cover argument above). 
This means that any O(1)-approximate matching algorithm needs to find large matchings from many of the AHM_r-1 instances in ℐ_special; in other words, it needs to “solve” these instances as well. 
In the language of hierarchical embeddings, we reduced AHM_r to t_r instances of AHM_r-1 (albeit with some loss in the parameters, which will be handled carefully in the proof). 



  
What about the parameters? Let us again consider the two natural choices of the algorithms: 

	
  * Either spend Ω(t_r^2) communication/space to learn something non-trivial about the t_r hidden instances in ℐ_special; the reason behind this “discounting” of information by a factor of t_r 
	is that, similar to the construction of <cit.>,  it is the case that the t_r instances in ℐ_special are effectively uniform (although only marginally) among the majority of the t_r^2 instances in ℐ; 
	
  * Or, spend communication/space proportional to what is needed to solve (most of) the t_r instances in ℐ_special in only (r-1)-rounds and independently. 

By using s_r(n_r) to denote the communication/space needed for solving AHM_r on n_r-size instances, the above suggests that 

    s_r(n_r) ≳mint_r^2 , t_r · s_r-1(n_r-1) = minn_r/n_r-1^2 , n_r/n_r-1· s_r-1(n_r-1).

Using s_1(n_1) = Ω(n_1^2) as the base case by the lower bound of <cit.>, we obtain 

    s_2(n_2) ≳minn_2/n_1^2 , n_2 · n_1 = n_2^4/3,

by letting n_2 = (n_1)^3. Repeating this inductively using <Ref> allows us to prove that 

    s_r(n) ≳ n^1+1/2^Ω(r).

This implies that Ω(loglogn) rounds are needed by (n)-communication protocols for AHM_r and in turn Ω(loglogn) passes are needed by semi-streaming algorithms for O(1)-approximation of matchings. 





  
How is the input partitioned? One thing that we have neglected so far is specifying what the input to Alice and Bob precisely are in the AHM_r(A,B) problem. 
Naturally, Alice receives the matrix A and Bob receives the submatrix B. But since these matrices have quite a lot of overlap with each other on one hand, and the recursive nature of the instances, on the other hand,
we need to specify this more accurately (for instance, in the special induced instances in ℐ_special, Alice again receives some parts of B, and recursively like this). 
Specifying full details of this partitioning recursively is beyond the scope of this overview, but roughly speaking this is how the partitioning of inputs looks like (see <Ref>): 
 


[20]r0.45
    
    < g r a p h i c s >

An illustration of the input partitioning of Alice and Bob in an instance of AHM_r with the sub-matrix of Bob shown (in blue). 
Here, A refers to some r-1_i,j∈ℐ given to (r-1)-round Alice and B similarly is for some r-1_i,j∈ℐ
given to (r-1)-round Bob. In the AHM_r instance, Alice receives all the B's and Bob receives all the A's, and additionally the B's on the off-diagonal sub-matrix (shown in bold).



	
  * The r-round Alice in AHM_r(A,B) receives all the inputs that (r-1)-round Bob receives (recursively) in all instances of ℐ. 
	
	
	
  * The r-round Bob in AHM_r(A,B) receives: 
	
	
  * all the inputs that both (r-1)-round Alice and (r-1)-round Bob (recursively defined) in all non-special (= off-diagonal) induced instances, i.e., in ℐ_induced∖ℐ_special; 
	
  * and, all the inputs of only (r-1)-round Alice (recursively defined) in the special (= diagonal) induced instances, i.e., in ℐ_special. 
	


With this input partitioning, Alice can insert all edges in B and Bob is able to delete all edges inserted by Alice in the off-diagonal instances to create the “inducedness property”, 
and delete just enough edges from the diagonal instances to make them truly a hard (r-1)-round instance (we  caution the reader that this view is only true for odd values of r; see <Ref>). 



It is also worth mentioning that edges entirely out of the sub-matrix B of Bob do not form any real instance of AHM_r, given that the other parts of their inputs is never added to the graph. 
However, these are the edges that are incident on the o(n_r) size vertex cover of the graph G minus edges of special instances in ℐ_special; our lower bound construction does not require any property
from these edges beside that they do not form a large matching which is guaranteed by the vertex cover argument. As such, not having real instances here is not a problem from the combinatorial aspect. At the same, 
information-theoretically it is quite crucial that Bob has no knowledge of this part of the graph, and we shall use this crucially in the next part. We remark that this way of partitioning the input in our work
has also appeared recently in the multi-pass dynamic streaming lower bound of <cit.> for MSTs to facilitate their information-theoretic arguments. 

The remaining and the most technical part of the argument is to formalize the intuitions in this subsection for the hardness of our instances and prove <Ref> information-theoretically. 













  §.§.§ Addressing Challenge II: Information-Theoretic Arguments


We now discuss the proof ideas in the communication lower bound in <Ref>. Let us go back to the one-round lower bound of <cit.> and the part we explicitly left out for here. Already in the one-round problem, 
why it should be the case that Alice's o(n^2)-size message cannot reveal much information about diagonal entries Bob needs to output, despite Bob knowing a great deal about Alice's matrix A, i.e., 
all the off-diagonal entries of B, which form the vast majority of A. 

The proof in <cit.> actually showed a weaker guarantee than what we advertised before (and need in our proofs). Specifically, <cit.> only proves that the entry A[σ_r()][σ_c()] (the top left entry of the diagonal) 
cannot be revealed by a small message from Alice even given Bob's matrix B. They then used this fact in a separate randomized reduction to extend this lower bound to O(1)-approximation of matchings. 
This proof however does not work in the  plan we outlined above, which requires the lower bound for solving many lower-round instances instead of just one. 

To handle this, we are going to provide a different proof here compared to <cit.> which is in fact a technical contribution of our work. In particular, this already shows that none of the diagonal entries of B (to be more accurate A on rows and columns of B) can be revealed by Alice's message (this is in a marginal sense, i.e., the information revealed about any one entry on the diagonal is o(1) bits, even conditioned on all the other diagonal values).   



  
A new one-round lower bound. Consider the input permutations σ_r and σ_c of [n] given to Bob and suppose our goal is to return the j-th diagonal entry, i.e., 
return A[σ_r(n-+j)][σ_c(n-+j)]. Define the following two sets of rows and columns (see <Ref> for an illustration):

	
  * T_row: the rows in the entire A that cover rows of B except for the j-th one, i.e., 
	
    T_row := σ_r(n),σ_r(n-1),…,σ_r(n-)∖σ_r(n-+j).

	
  * T_col: the columns in the entire A that cover columns of  B except for the j-th one, i.e., 
	
    T_col := σ_c(n),σ_r(n-1),…,σ_c(n-)∖σ_c(n-+j).
 




It is easy to see that if we provide Bob with A[T_row][T_col] (namely, A on the entries in T_row and T_col) we have provided him with more information than his original input in the off-diagonal entries of B. 
On the other hand, a critical observation is that conditioned on the choices of T_row,T_col  (but crucially not σ_r and σ_c), the special entry A[σ_r(n-+j)][σ_c(n-+j)]
is chosen uniformly from all unfixed entries of A, namely, A ∖ A[T_row][T_col]. This is sufficient (using a simple application of chain rule of mutual information) for proving that a 
message of size ≪ (n-T_row) · (n-T_col) cannot reveal more than o(1) bits about the special entry Bob needs to output, even conditioned on A[T_row][T_col] (which fixes off-diagonal entries of B). 
This proves the one-round lower bound. 

We note that these types of chain rule arguments (by conditioning on partial parts of permutations) have also appeared in somewhat similar contexts elsewhere, e.g., in <cit.>. 



  §.§.§ Our multi-round lower bound

 At last, we are ready to review our approach for proving our multi-round lower bound for the AHM_r problem introduced in <Ref>, namely, prove <Ref>.  
This follows the three-step approach put forward by <cit.> in proving their general round elimination argument, but with a different argument for each step, as we outline below. 



  
Step 1. Turn an r-round protocol _r for AHM_r with communication cost s to an r-round protocol 1_r for solving AHM_r-1 with communication cost s but information cost (see <Ref>) ≲ s/t_r. 
	
	The intuition behind this step is that any protocol for AHM_r needs to solve = t_r-o(t_r) independent instances of AHM_r-1. As such, we expect that the information it reveals about a random such instance
	to be 1/t_r times the total information cost of the protocol which is upper bounded by its communication cost. This is basically a direct sum argument. 
	
	The difference between our approach and <cit.> is in the nature of this direct sum argument. Specifically since our input distributions are not product, 
	we use internal information cost to implement this step (as opposed to external information in <cit.>). 
	A quick description of this step for a reader already
	familiar with internal information cost direct sum arguments (e.g. <cit.>) is the following[This is not the exact way we sample the input distribution and we have been slightly flexible in the overview.]: (i) Using public randomness, Alice and Bob sample j ∈ [] and all off-diagonal induced instances, 
	(ii) embed the given instance of AHM_r-1 at the j-th diagonal entry of the the special induced instances, and (iii) for every remaining instances (diagonal or entirely out of Bob's submatrix), 
	sample one part of the input publicly and the other privately (this way, we can sample from non-product distributions correctly). The exact choice of this public-private sampling is a function of the input sharing of the players
	and is similar in nature to <cit.>. 
	






  
Step 2. Turn the r-round protocol 1_r for AHM_r-1 with information cost s/t_r to an r-round protocol 2_r for solving AHM_r-1 with communication cost ≲ s/t_r ·(r). 
	
	This step is based on existing message compression arguments that allow for compressing the communication of a limited round protocol, down to its information cost. 
	The difference in this step between our approach and <cit.> is that we use the compression technique of <cit.> for internal information cost whereas <cit.> uses <cit.> 
	for external information. 
	


  
Step 3. Turn the r-round protocol 2_r for AHM_r-1 with communication cost s/t_r ·(r) to an (r-1)-round protocol _r-1 for solving AHM_r-1 with the same communication, 
while incuring an additional o(1) additive factor on error probability as long as s ≪ t_r^2. 
	
	This step is the real round elimination step, wherein we finally obtain an (r-1)-round protocol. This part of the argument is quite problem-specific and is entirely disjoint from <cit.>. Specifically, 	
	the additive factor in the error probability comes from a similar argument as our one-round lower bound outlined above. The choice of a 
	random special instance in ℐ_special among the t_r^2 instances in ℐ used in creating an instance of AHM_r, is random 
	among ≃ t_r^2 instances even conditioned on the input of Bob (namely, the off-diagonal entries in ℐ_induced∖ℐ_special). 
	As argued earlier, Alice's first message should only be able to reveal o(s/t_r^2) information about a random diagonal AHM_r-1 instance _r-1 is solving even conditioned on Bob's input in the entire AHM_r instance (and not only AHM_r-1). Thus, even if we ignore the first message of 2_r and instead run it from its second run onwards, as long as s ≪ t_r^2, we should expect 
	a very similar outcome for the underlying instance AHM_r-1 as if we run the whole protocol. 
	
	Given the technical nature of this step, we postpone more details of this step to the actual proof, and only mention that this step, is the heart
	of our information theoretic arguments.  
	



  
Concluding the proof. 

After these steps, we obtain that as long as s ≪ t_r^2, the resulting (r-1)-round protocol _r-1 for AHM_r-1 succeeds with a non-trivial probability. But, given that communication cost of _r-1 is s/t_r ·(r), 
we obtain that 

    s/t_r·(r) ≳ s_r-1(n_r-1),

where s_r-1(n_r-1) is the communication cost of protocols for AHM_r-1 on n_r-1-size inputs we have inductively established. Stated differently, this implies that either 

    s ≳ t_r^2     or     s ≳1/(r)· t_r · s_r-1(n_r-1),

which establishes <Ref> (the (r)-term is negligible for our purpose as r=O(loglogn) always). 



In conclusion, this way we can establish a lower bound of n^1+1/2^Ω(r) communication for r-round protocols for AHM_r. By our reduction to the matching problem, this in turn
implies that any p-pass streaming algorithm for O(1)-approximation of matchings requires n^1+1/2^Ω(p) space; in particular, semi-streaming algorithms require Ω(loglogn) passes as desired. 










































§ PRELIMINARIES




  
Notation. Throughout, for any integer n ≥ 1, we define [n] := 1,…,n. 
For a vector x ∈^n, we use x_0 to denote the number of non-zero entries in x. 


We use S_n to denote the set of all permutations over [n] for any n ≥ 1. 
For any permutation σ∈ S_n, we use σ(i) to denote the element in [n] that σ maps i to for each i ∈ [n]. 

For any tuple (x_1,…,x_n) and i ∈ [n],  
we define x_<i := (x_1,…,x_i-1). We define x_>i and x_-i, analogously. For a set of tuples (x,y) | x ∈ X, y ∈ Y for some 
sets X and Y, and any x ∈ X, we define (x,*) := (x,y) | y ∈ Y. 

For any matrix Z of dimensions m × n for integers m,n≥ 1, we use Z[i,j] to denote the value at row i and column j for i ∈ [m], j ∈ [n]. 

For a graph G=(V,E) and any vertex v ∈ V, we use N(v) to denote the neighbors of v and v := N(v) to denote its degree.  For any U ⊆ V, we use G[U] to denote the subgraph of G induced on vertices in U. 
We further use μ(G) to denote the maximum matching size in G. 



  
Random variables and information theory notation. When there is room for confusion, we use sans-serif letters for random
variables (e.g. ) and normal letters for their realizations (e.g. A). We use  and  to denote the distribution and support of , respectively. 

For random variables ,, we use  to denote the Shannon entropy
and  to denote the mutual information. For two distributions μ and ν on the same support, μν denotes their total variation distance 
and μν is their KL-divergence. <Ref> contains the definitions of these notions and standard
information theory facts that we use in this paper. 



  
Fractional matchings.  A fractional matching in a graph G=(V,E) is any assignment x ∈^E to the edges E of G with the following properties: 

    for all e ∈ E:   0 ≤ x_e ≤ 1;   and  for all v ∈ V:   x_v := ∑_e ∋ v x_e ≤ 1.

We use x := ∑_e ∈ E x_e to denote the size of the fractional matching x. 

It is easy to see that incidence vector of a matching M is also a fractional matching of size M. The following standard fact (see, e.g. <cit.>) provides the other direction as well. 


	For any graph G=(V,E), and any fractional matching x ∈^E, we have μ(G) ≥ 2/3 ·x. Moreover, if G is bipartite, then μ(G) ≥x. 





 §.§ Concentration Inequalities


We use the following standard form of Chernoff bound and its extension to negatively correlated variables in <cit.>. 


	Let X_1,…,X_n be n independent random variables in [0,1] and X := ∑_i=1^n X_i. For any δ > 0 and μ_min≤X≤μ_max, 
	
    X ≥ (1+δ) ·μ_max≤exp-δ^2 ·μ_max/2+δ   ,   X ≤ (1-δ) ·μ_min≤exp-δ^2 ·μ_min/2.
 	
	Moreover, the upper tail bound continues to hold as long X_1,…,X_n are negatively correlated, i.e., for every S ⊆ [n], 
	
    ∏_i ∈ S X_i≤∏_i ∈ SX_i.



We also need the extension of Chernoff-Hoeffding bounds to limited independence random variables. We define limited independence hash functions first. 


For integers r, t, k ≥ 1, a family  of hash functions from [r] to [t] is called a k-wise independent hash function iff for any two k-subsets a_1, a_2, …, a_k ⊆ [r] and b_1, b_2, …, b_k ⊆ [t], 

    h ∼(h(a_1) = b_1, h(a_2) = b_2, …, h(a_k)  = b_k) = 1/t^k.



k-wise independent hash functions behave like random functions, as long as sets of size at most k are considered. 
We know that we can store and access these functions in limited space. 


	For any integers r, t, k ≥ 1, there is a k-wise independent hash function family = h : [r] → [t] such that sampling and storing a function h ∈ takes O(k · (log (r· t))) space. 


We can now state the extension of Chernoff bounds for limited independence hash functions.


	Let X_1, X_2, …, X_n be k-wise independent random variables in [0,1] and X := ∑_i=1^n X_i. Then, for any δ≥ 1 and X≤μ_max, we have,
	
    (X ≥ (1+δ) ·μ_max) ≤exp-min{k/2, δ/3·μ_max}
.
		We also have the following lower tail bound for any δ'≤ 1 and μ_min≤X.
	
    (X ≤ (1-δ')·μ_min) ≤exp-min{k/2, (δ')^2/3·μ_min}.






 §.§ Sketching and Streaming Toolkit




  §.§.§ Sparse-Recovery Algorithms
 



We use standard sparse-recovery algorithms combined with a simple randomized test to ensure it can also detect non-sparse inputs; see, e.g. <cit.> that construct this using Vandermonde matrices and an equality test 
(see also <cit.> that explicitly shows how to use a PRGs for degree-2 polynomials in <cit.> to ensure that the latter algorithm does not need to store many random bits either). 


	There exists a single-pass deterministic algorithm that given integers q,n,m ≥ 1 and a dynamic stream defining a vector ϕ∈ [m]^n, 
	uses O(q ·log(m · n)) bits of space and recovers ϕ as long as vector ϕ is q-sparse (meaning ϕ_0 ≤ q). 
	
	Moreover, there is a single-pass randomized algorithm that given δ > 0 can test if the vector ϕ∈^n is q-sparse with probability at least 1-δ 
	using O(q ·log(m · n) + log(n/δ)) bits of space. 


We note that the use of sparse-recovery algorithms in graph sketching already dates back to the seminal work of <cit.>. Moreover, many dynamic streaming algorithms 
use a particular application of sparse-recovery in form of ℓ_0-samplers <cit.> that allows for sampling a single element of a given vector ϕ in a dynamic stream
in log(n) space (instead of recovering the entire vector only if it is sparse). However, for our applications, working with sparse-recovery algorithms directly is more convenient and thus 
we opted to skip using ℓ_0-samplers altogether. 






















  §.§.§ Prior Sketching and Streaming Tools for Matchings
 

We use a vertex sampling approach due to <cit.>  that allows for reducing the number of vertices in a graph in an oblivious manner, while preserving its largest matching approximately (see also <cit.> for a related but slightly different result). This is a key subroutine used for finding matchings in dynamic streams in a single pass also. We use the following formulation from <cit.> that presents this result explicitly. 


	Let G=(V,E) be any graph with maximum matching size μ(G) = ω(logn). For any ∈ (0,1), suppose we partition the vertices of G randomly into t ≥ 8μ(G)/ groups U_1,…,U_t 
	by sending each vertex to one group chosen independently and uniformly at random. Let E_U ⊆ E be a subset of edges such that for any pair of groups U_i,U_j for i ≠ j ∈ [t], we pick one arbitrary edge
	(x,y) with x ∈ U_i and y ∈ U_j (if at least one such edge exists). Then, with high probability, μ(E_U) ≥ (1-) ·μ(G). 




We also use the standard framework of boosting O(1)-approximation algorithms for maximum matching to (1+)-approximation algorithms in dynamic streams for any > 0. 
The original version of this framework is due to <cit.> which was de-randomized in <cit.> and extended to weighted graphs in <cit.>; for bipartite graphs, more efficient reductions are shown in <cit.>. 




	For any ∈ (0,1) and any integer n ≥ 1, suppose we have an O(1)-approximation algorithm for finding a maximum matching on n-vertex unweighted graphs in dynamic streams using s(n)-space and p(n)-passes with high probability. 
	Then, there is a dynamic streaming algorithm with O(f() · s(n))-space and O(f() · p(n))-passes that with high probability finds a (1+)-approximation to maximum matching even in weighted graphs, for some function f() that depends only on . 
	
	Furthermore, for general weighted graphs, we can set f() = (1/)^Θ(1/^2), for general unweighted graphs, set f() = (1/)^Θ(1/), and for (un)weighted bipartite graphs, set f() = (1/). 




 §.§ Two-Party Communication Complexity


We work in the standard two party communication model; we provide some basic definitions here and refer the interested reader to the excellent textbooks <cit.> for more details. 

There are two players Alice and Bob who receive input from  and  respectively. The players jointly compute some function f with domain ×. The players follows some protocol  to compute f.
They have access to a shared tape of randomness, referred to as public randomness, in addition to their own private randomness.  


Alice first sends a message to Bob, followed by a message from Bob to Alice and so on. The last player who receives a message has to output the answer. The total number of rounds is the total number of messages passed between Alice and Bob. 
Moreover, the message sent by any player only depends on their private input, the communicated messages so far, the public randomness, and the private randomness.






	For any protocol , the communication cost of , denoted by , is defined as the worst-case (maximum) total length of messages, measured in bits, communicated by the players
	on any input. We assume that all transcripts, i.e., the set of all messages sent by any player, in  have the same worst-case length (by padding).



The following standard result relates communication protocols and streaming algorithms. 


	For any p ≥ 1, s ≥ 1, and δ∈ (0,1), suppose there is a p-pass s-space streaming algorithm A for some problem  that succeeds with probability at least δ. Then, there also exists a two-party protocol  with 2p-1 rounds, communication cost = O(p · s), and success probability at least δ for the same problem . 


	Consider the stream σ = σ_A ∘σ_B where σ_A (resp. σ_B) is the input to Alice (resp. Bob) in  (ordered arbitrarily in the stream). 
	Alice runs A on σ_A and sends the memory content to Bob, which allows Bob to continue running A on σ_B, and send
	the memory content back to Alice to continue running the next pass. This allows the players to run one pass of A using communication cost at most O(s) and 2 rounds of communication.  
	The players can continue this, faithfully simulating the p passes of the algorithm, and at the end of the last pass, Bob can output the answer of A, instead of replying back to Alice. This 
	requires 2p-1 rounds of communication and O(p · s) communication, and has the same success probability as the algorithm A. 

<Ref> allows us to translate communication lower bounds into streaming ones. 





 §.§ Information Cost and Message Compression

We also work with the notion of information cost of protocols that originated in <cit.> and has since
found numerous applications (see, e.g., <cit.> for an excellent survey of this topic). There are various definitions of information cost that have been considered depending on the application.  
The following definition due to <cit.> is best suited for our purpose. 

	For any two-party protocol  whose inputs are distributed according to some distribution μ, the (internal) information cost is defined as: 
	
    μ := |,  + |, ,

	where , denote the random variable for the inputs X, Y sampled from μ,  denotes the random variable corresponding to the communicated messages, and  is the public randomness. 


Since a single bit of communication can only carry one bit of information, we can upper bound information cost by the communication cost. 
 
 	For any protocol  on any distribution μ, 
 	μ≤.
 

We also use message compression to reduce communication cost of limited-round protocols close to their information cost. 
The following is a simplified version of <cit.>.   


For r ≥ 1, any ∈ (0,1), and input distribution μ, any r-round protocol  can be simulated with error at most  in r-rounds by a protocol ' with communication at most

    ·r/·μ + r^2/

for some absolute constant ≥ 1. The simulation by ' uses a source of public randomness that is independent from any randomness used in .





































§ THE UPPER BOUND
 

We present our algorithms in this section. 
We start with a randomized greedy algorithm for finding an approximate fractional matching by growing a random maximal independent set (MIS). 
This algorithm is the power horse of our approach, and, given its general nature, we provide it in an entirely model-independent manner. 
We then show how this algorithm—in a non black-box way—can be implemented in dynamic graph streams as an O(loglogn)-pass semi-streaming algorithm.  
Finally, we show how to improve this algorithm to yield an approximation factor of 1+ and prove the following theorem, which formalizes <Ref>. 


	There is a randomized algorithm that, given any n-vertex graph G=(V,E) presented in a dynamic stream, finds an O(1)-approximate maximum matching in G using O(n ·(n)) space
	and O(loglogn) passes with high probability. 
	
	Moreover, for any > 0, the algorithm can be improved to finding a (1+)-approximation even in weighted graphs by increasing the space and number of passes with some f() factor,
	for some function f that only depends on  (and takes different forms depending on whether or not the graph is bipartite or weighted). 


The rest of this section is dedicated to the proof of this theorem. 





 §.§ A Random-Order Greedy Algorithm for Matching
 

We present a model-independent algorithm for computing an approximate fractional matching. 




The algorithm follows the strategy of <cit.> by computing a random order greedy MIS and letting its complement be a vertex cover. In addition to this, whenever the algorithm inserts a new vertex into the vertex cover, it also puts a certain fractional mass distributed uniformly on some subset of the not-yet-covered edges incident to this vertex. At the end, the algorithm further “trims down” these fractional values to turn them into a fractional matching, by reducing the mass on every vertex to become at most one explicitly. Formally, the algorithm is as follows. 



 An input graph G=(V,E) and an approximation parameter[We note that β is not exactly the approximation ratio that this algorithm achieves, but rather a quantity that governs this ratio.] β∈ (0,1/8). 



	
		
  * Let = ∅ and x_e = 0 for all e ∈ E. 
		
  * While G is not an empty graph: 
		
			
  *  Pick a vertex u uniformly at random from G. 
			
  * Add all neighbors v ∈ N(u) to .  
			
  *  For any v ∈ N(u) and e=(v,w) with (w) ≤(v) set x_e = β/(v). 
			
  * Remove u ∪ N(u) and all their edges from G. 
		
		
  *  Create y ∈^E initialized with y = x. Then, for any vertex v ∈ V with y_v := ∑_e ∋ v y_e > 1, reduce y_v to 1 by arbitrarily reducing the fractional values on incident edges of v. 
		
  * Return  as a vertex cover, x as an intermediate solution, and y as a fractional matching. 
	


The following theorem captures the main properties of this algorithm that are important for our purposes. Given how we use this result in the subsequent sections, we provide separate guarantees for the assignments x and y. 


	Given any graph G=(V,E) and parameter β < 1/8, <Ref> outputs an integral vertex cover , an intermediate solution x ∈^E, and a fractional matching y ∈^E such that 
	
    ∑_e ∈ E x_e≥β/2·, 
       ∑_e ∈ E y_e≥1-8β/1-2β·∑_e ∈ E x_e.



Notice that since  is always a vertex cover, the inequality ≥μ(G) always holds, and, thus, combining <Ref> and <Ref> in <Ref> also directly implies that 

    ∑_e ∈ E y_e≥1-8β/1-2β·β/2·μ(G).

In other words, the fractional matching y returned by the algorithm is a multiplicative approximation in terms of β. However, 
we need the separate guarantees of <Ref> for the analysis of our dynamic streaming algorithm. 

We now start the proof of <Ref>. 
Let T denote the number of iterations of the while-loop in <Ref> (which is a random variable). For each iteration t ∈ [T] of the while-loop, we define: 

    : the graph G in this iteration; 
       : the number of vertices in ; 
       : the number of edges in ; 
       : the vertex u chosen from G in this iteration in Line (<ref>); 
       : vertices added to  in this iteration;
    v   : for each v ∈,  the neighbors of v in ; 
    v   : for each v ∈,  the degree of v in ; 
    e   : for each e ∈,  the value added to x_e in this iteration; 
       : the entire random choices made in iterations 1,…,t-1 by the algorithm.


The first lemma relates the expected size of the vertex cover computed by <Ref> and 
the intermediate solution x that it computes, thus proving <Ref> in <Ref>. 


	For the intermediate solution x ∈^E computed in <Ref>, we have
	
    ∑_e ∈ E x_e≥β/2·.



	Fix any iteration t ≥ 1 in the algorithm and condition on all randomness  up until this iteration. This fixes the graph . 
	Over the randomness of iteration t, we have, 
	
    | = ∑_v ∈v ∈| = ∑_v ∈v/ = 2/,

	where the first equality is by the linearity of expectation, the second is because v joins  if  is chosen from v, and the last is by the handshaking lemma. 
	
	On the other hand, we have, 
	
    ∑_e ∈ Ge|
       =  ∑_u ∈(  = u |·∑_v ∈uw ∈v: w≤v·β/v) by the definition of the algorithm
       =  1/∑_v ∈∑_u ∈vw ∈v: w≤v·β/vas  is chosen uniformly from  and by re-ordering the sum for each edge
       = 1/∑_v ∈∑_w ∈v𝕀w≤v·βas v = v by definition and 𝕀· is the indicator function
       ≥β·/,

	since for each (v,w) at least one of 𝕀w≤v or 𝕀v≤w is true. 
	
	Combining the above two equations implies that, for any choice of , 
	
    ∑_e ∈ Ge|≥β/2·|,

	which, by the law of total expectation, implies that 
	
    ∑_e ∈ Ge≥β/2·.

	Noting that 
	
    ∑_e ∈ G x_e    = ∑_t ≥ 1∑_e ∈ Ge    and      = ∑_t ≥ 1,

	and linearity of expectation concludes the proof. 


While the size of x by <Ref> is sufficiently large, unfortunately, x 
is not necessarily a fractional matching. As such, we do need to run the update in Line (<ref>) to “trim down” x into y, which becomes a fractional matching. 
The main step of the proof is to show that this step is not going to reduce the size of x dramatically, proving <Ref> in <Ref>.  


	For the intermediate solution x ∈^E and fractional matching y ∈^E in <Ref>, 
	
    ∑_e ∈ E y_e≥1-8β/1-2β·∑_e ∈ E x_e.


To continue, we need a couple of more notation. For any iteration t ≥ 1, define: 

    v   : for each v ∈, v := ∑_e ∋ ve; 
    v   : for each v ∈, the value added to v by v itself; 
    v   : for each v ∈, the value added to v by any vertex other than v.

This way, for every v ∈ V and t ≥ 1, we have, 

    v = v + v.

Notice that v is non-zero in at most one iteration, wherein v joins . For that iteration t, 

    v = w ∈v: w≤v·β/v≤β.

This implies that 

    x_v := ∑_t ≥ 1v≤β + ∑_t ≥ 1v.

Thus, we only need to focus on bounding v across the iterations. We do this in the following claims. Note that in <Ref>, 
the vertices w in Line (<ref>) are the ones that have their w increase in this iteration; thus, to avoid confusion, we use w 
in place of v in the following. 

We first show that the total sum that can be assigned to w across the iterations is upper bounded by β in expectation. For technical reasons that will become clear shortly, 
we prove this bound in a more general form (in the following claim, the statement above corresponds to setting t' = 0). 

	For any iteration t' ≥ 1, any w ∈ V, and choice of all the random bits t' before iteration t', we have,
	
    ∑_t ≥ t'w|t'≤β.



	We know that the given choice of random bits before iteration t', t' fixes the graph t'. If w is no longer present in t', t'w = 0, and it remains zero for every iteration after t' also. Hence, proving the statement is trivial. Thus, we assume that the vertex w is present in t'.

For any iteration t ≥ t', and any choice of random bits  for all preceding iterations,
	
    w|   = ∑_v ∈w𝕀v≥w·v ∈|·β/vby the definition of the algorithm
       ≤w·v/·β/vas v belongs to  if  belongs to v
       = β·w/.

	On the other hand, for every vertex w ∈ define the event: 
	
    _w(t): vertex w is removed from  by being picked as  or joining .

	We have, 
	
    _w(t) | = ∈w∪w = w+1/.

	Thus, we have that 
	
    w|≤β·_w(t) |.

	Intuitively, this means that if w is expected to be “large”, then there is also a “good chance” that w is removed from  at this iteration and thus no longer receives w in the subsequent iterations. 
	We formalize this as follows: 
	
    ∑_t ≥ t'w|t'
       = ∑_t ≥ t'∑_𝕀w belongs to  after |t'·|t'·w|, t'by the law of total expectation
       ≤∑_t ≥ t'∑_𝕀w belongs to  after |t'·|t'·β·_w(t) |, t'by <Ref>
       = ∑_t ≥ t'w belongs to G^(t'),…,G^(t) but not G^(t+1)|t'·βby the definition of _w(t) and the probability in the inner sum
       = w is removed from some  with t ≥ t'·βas the events in the sum are mutually exclusive and partition the space
       = β, as w will be removed at some iteration after t'

	concluding the proof. 


We can also observe that the value of w in any iteration t is upper bounded by β. 


	For every t ≥ 1, regardless of the choice of , w≤β. 


	We have,
		
    w≤∑_v ∈w𝕀v≥w·β/v≤w·β/w = β.



Lastly, using <Ref> and <Ref>, we can show that the variance of the total value assigned to w is also low, enabling us to prove the required concentration bounds later. 


	For every w ∈ V, 
	
    ∑_t ≥ 1w≤ 3β·∑_t ≥ 1w .



	We can write the variance as,
	
    ∑_t ≥ 1w   = ∑_t ≥ 1w + 2  ·∑_t_1 < t_2 t_1w, t_2was ∑_iX_i = ∑_iX_i + ∑_i ≠ jX_i,X_j for any random variables X_1,X_2,⋯
       ≤∑_t ≥ 1(w)^2 + 2 ·∑_t_1 < t_2t_1w·t_2was X≤X^2 for any random variable X
       ≤β·∑_t ≥ 1w + 2 ·∑_t_1 < t_2t_1w·t_2wsince by <Ref>, we have w≤β

We will bound the second term by 2 β·∑_t ≥ 1w to complete the proof. 

    ∑_t_1 < t_2t_1w·t_2w   = ∑_t_1∑_t_2 ≥ t_1+1t_1w·t_2w
       = ∑_t_1∑_t_1+1t_1+1·∑_t_2 ≥ t_1+1t_1w·t_2w|t_1+1by the law of total expectation
       = ∑_t_1∑_t_1+1t_1+1·t_1w|t_1+1·∑_t_2 ≥ t_1+1t_2w|t_1+1as the value of t_1w is fixed when conditioned on t_1+1
       ≤∑_t_1∑_t_1+1t_1+1·t_1w|t_1 +1·βby <Ref>
       = β·∑_t_1t_1wby the law of total expectation
       = β·∑_t ≥ 1w, by the linearity of expectation

finishing the proof. 


We use <Ref> to bound the probability that w reaches a “too large” value. 


	For every w ∈ V and every θ≥ 1-β, 
	
    ∑_t ≥ 1w > θ≤3β/(θ-β)^2·∑_t ≥ 1w.



Let X := ∑_t ≥ 1w. Note that X is a sum of at most n random variables as there are at most n iterations in <Ref> (in each iteration, at least one vertex is removed). 

We have,

    ∑_t ≥ 1w > θ   = X> θ≤X/(θ-X)^2by Chebyshev's inequality
       ≤3β·X/(θ-X)^2by <Ref>
       ≤3β/(θ-β)^2·∑_t ≥ 1w. as X = ∑_t ≥ 1w≤β < θ, by <Ref> and since β < 1/8

This proves the claim. 







We are now ready to prove <Ref>. 


For every vertex v ∈ V, define 

    v := min∑_t ≥ 1v - (1-β), 0.





We first have

    v   = ∑_θ = (1-β)^∞∑_t ≥ 1v = θ· (θ-(1-β)) 
       ≤∑_θ = (1-β)^∞∑_t ≥ 1v = θ·θas β < 1/8 and thus removing -(1-β) can only increase the sum
       = ∫_θ=(1-β)^∞∑_t ≥ 1v≥θ· dθas for any non-negative variable X, X = ∫_0^∞ (1-F_X(x))dx where F_X(·) is the CDF function
       ≤∫_θ=(1-β)^∞3β/(θ-β)^2·∑_t ≥ 1v· dθby <Ref>
       =3β·∑_t ≥ 1v·∫_θ=(1-β)^∞1/(θ-β)^2 dθ
       = 3β·∑_t ≥ 1v·1/1-2β.
    	  as ∫ 1/x^2 dx = -1/x + constant

Finally, we have, 

    ∑_e ∈ E y_e   ≥∑_e ∈ E x_e  - ∑_v ∈ Vvby the update in Line (<ref>) and <Ref>. 
       ≥∑_e ∈ E x_e - 3β/(1-2β)·∑_v ∈ V∑_t ≥ 1v
       ≥1-8β/1-2β·∑_e ∈ E x_eas ∑_v ∈ V∑_t ≥ 1v≤ 2·∑_e ∈ E x_e

concluding the proof. 


The proof of <Ref> now follows from <Ref> for <Ref> and <Ref> for <Ref>. 











 





















 §.§ The Dynamic Streaming Implementation of <Ref>


We now show how to implement <Ref> in dynamic streams. For this, we follow the approach of <cit.> for implementing the randomized greedy MIS algorithm, 
which also forms the backbone of <Ref>. The main new step here is to find the assignments x and y to the edges of the graph in the algorithm (although we will not be able to explicitly find these, but rather a “proxy” to them). 
To do this, we need a procedure that can determine the exact iteration each vertex is being removed from the graph. This is done via <Ref> that we design. 


<Ref> finds the set  in <Ref>, and assigns a time stamp to each
vertex that indicates in which iteration of the while-loop this vertex was removed, namely, was settled. This algorithm, similar to <cit.>, processes the 
graph in O(loglogn) batches of vertices with growing sizes. A key new subroutine allows us to determine the time stamp of all vertices. 

 An input graph G=(V,E) in a dynamic stream. 
	
	

	
		
  * Set the time t=0 and let = ∅ and =∅. Let σ be a random permutation of V. 
		
  * For i=1 to loglogn batches: 
		
			
  * Let k_i := 2 · (n^1-1/2^i - n^1-1/2^i-1) and U_i := (u_1,…,u_k_i) be the next k_i vertices in σ to be processed[If the remaining graph has <k_i vertices, we let U_i be all remaining vertices.].  
			
  *  In a single pass over the stream, store G[U_i ∖ (∪)] using <Ref> below. 
			
  *  At the end of the pass: for j=1 to k_i do the following: 
			
				
  * If u_j is settled already, move to the next vertex of the for-loop in Line (<ref>). 
				
  *  Else, increase t ← t+1 and add u_j to  with t(u_j) = t and mark neighbors of u_j in U_i ∖ (∪) as settled. 
			
			
  *  In a single pass over the stream, for every v ∈ V ∖, find the vertex u ∈ N(v) ∩ with the smallest value of t(u) 
			using <Ref> (to be defined in <Ref>); if such a vertex u is found for v, add v to , set t(v) = t(u), and mark v as settled. 
		
	


We start by arguing that this algorithm faithfully simulates <Ref>. 


	For any graph G=(V,E), the set (v,t(v)) | v ∈ V in <Ref> is sampled from the same distribution as in <Ref> where t(v) in the latter refers 
	to the iteration of the while-loop wherein v joins  or is picked as the vertex u (i.e., is removed from the graph). 


	In <Ref>, we can think of sampling a vertex u uniformly from the remaining graph in each iteration of the while-loop, as first sampling a random permutation σ, and 
	then picking the remaining vertex of G with the smallest value of σ in each iteration of the while-loop. Moreover, we have that,
	
    ∑_i=1^loglogn k_i = 2 · n^1-1/2^loglogn = 2n/n^1/logn = n,

	and thus any remaining vertex will be sampled in the last iteration of the algorithm and will be processed. Then, it is easy to verify that the two algorithms are performing the same 
	exact computation, finalizing the proof.  


An important remark is in order here. Given the greedy nature of <Ref>, for the purpose of the analysis (and by using <Ref>), we can also consider the choice of vertices  right after 
we process a vertex u in <Ref> (to be added to ), even though in reality, vertices in  are only added after the batch is fully processed. In other words, in the analysis, we can add neighbors of u to  
right at that point even though these vertices will be added to  at the end of the batch. 

Let us define some useful notation about the random variables in <Ref> before we proceed. 

    i   : the graph G[U_i ∖ (∪)] that is stored in batch i; 
    i   := 2n^1-1/2^i = ∑_j=1^i k_j, which is the number of vertices in all of U_1 ∪ U_2 ∪…∪ U_i; 
    i   :  the set of i vertices in U_1 ∪ U_2 ∪…∪ U_i;  
    i(w)    : for any vertex w ∈i, this is the neighborhood of w in graph i.

(We emphasize that in the above notation, n_i is not the number of vertices in G_i and is larger.) 

We prove a helper lemma that allows us to bound the space complexity of this algorithm in Line (<ref>). This is a standard result at this point—originally due to <cit.>—and is often
referred to as the “residual sparsity property” of the greedy (MIS) algorithm <cit.>. We thus provide the proof only for completeness. 



	For 1 < i ≤loglog n, let Δ(i) denote the maximum degree of i. Then, with high probability, 
	
    Δ(i) ≤ 100 · (i/i-1) ·lnn.



	We prove the statement for i+1 with i ≥ 1.
	Fix the i+1 vertices in i+1, but not their order in the permutation σ. 
	
	We can think of sampling the set i as picking i vertices u_1,…,u_i uniformly at random from the set i+1 one at a time (without replacement). Now, consider a vertex v in i+1 
	and for j ∈ [i], let d_j(v) denote the degree of v in G[i+1∖ (^j ∪^j)] where ^j ∪^j includes the part of  and  that will be added due to the 
	choices of vertices u_1,…,u_j-1 and their neighbors. Finally, let d(v) 
	denote the degree of v in G_i+1. 
	We have,
	
    v ∈i+1∧ d(v) ≥ 100 ·i+1/i·lnn   ≤∏_j=1^iu_j is not in current neighbors of v| u_1,…,u_j-1as v remaining in G_i+1 means
    		none of its neighbors are sampled in 
       ≤∏_j=1^i1-d_j(v)/i+1as each u_j is chosen without replacement from i+1-1-(j-1) vertices at this point
       ≤1-100 · (i+1/i) ·lnn/i+1^ias d_j(v) ≥ d(v) since the degrees drop monotonically as  and  grow
       ≤exp-i· 100  ·lnn/ias 1-x ≤ e^-x = n^-100.

	 A union bound over all the vertices concludes the proof. 





	Line (<ref>) of <Ref> can be implemented in O(nlog^2n) space with high probability. 


	The statement holds vacuously for i = 1, because the total number of vertices in G_1 is k_1 = n_1 = 2√(n); hence, we can store a counter between all pairs of vertices in G_1 
	during the stream and recover all the edges in O(n log n) space trivially. 
	
	Consider each batch 1 <i ≤loglogn of the algorithm. By <Ref>, with high probability, we can bound the maximum degree of the graph i. We 
	We also know that the total number of vertices stored in batch i is k_i ≤i =  2n^1-1/2^i. Thus, the total number of edges in i is at most,
	
    i·Δ(i) ≤ 100 · (i^2/i-1)·lnn  = 100 · (4 n^2-2/2^i / 2 n^1-2^i-1) ·lnn = 200 · n ·lnn,

	where the first inequality is by <Ref> and the second equality is by the choice of i and i-1.

	
	We now run a sparse recovery algorithm to recover all edges of G[U_i ∖ (∪)] in Line (<ref>). Specifically, define ϕ∈0,1^m to be 
	the indicator vector of edges of this subgraph. Given that the algorithm explicitly stores U_i, , and , 
	we can define ϕ on the fly when seeing the updates to the edges of G. 
	
	The total number of non-zero elements of ϕ is O(n log n), by <Ref>. Thus, we can run the deterministic sparse-recovery of <Ref> with a single pass 
	over ϕ, and the choice of q = O(nlogn) using O(nlog^2n) bits of space. This concludes implementation of Line (<ref>). 




  §.§.§ Finding Time Stamps in <Ref>


We now show how to find the time stamps in Line (<ref>) of <Ref>. We devise the following algorithm for each batch i ∈ [loglogn]. 
Note that at this point, the algorithm has computed  and their time stamp for the current batch i but have not done so for  and that is the task of the following algorithm. 


	 
	For implementing Line (<ref>) of <Ref> in each batch i ∈ [loglogn]. 
	
	
		
  * Partition the set U_i into b = logk_i groups based on geometrically increasing sizes, 
		namely, for every j ∈ [b], U_i,j contains the next 2^j elements of U_i in the order of permutation σ:[The last group b may contain less than 2^b elements, as it only has all the remaining elements of U_i.]
		
    U_i,j = u_2^j-1, u_2^i, …, u_2^j+1-2.

		
  * For every v ∈ V and j ∈ [b], define the vector ϕ(v,j) ∈0,1^V as the indicator vector of N(v) ∩ U_i,j∩. 
		Note that by the end of Line (<ref>) of <Ref>, the set ∩ U_i,j is known and each update (u,v) to the dynamic stream for edges of the input graph G can be used to also update the vectors ϕ(u,j) and ϕ(v,j) for all j ∈ [b]. 
		
		
  * Let q := 200lnn and for every v ∈ V and j ∈ [b], run a randomized q-sparse recovery algorithm of <Ref> on ϕ(v,j) and test if ϕ(v,j) is q-sparse or not, using δ = 1/n^200. 
		
		
  * Let j ∈ [b] be the smallest index such that <Ref> declares 0 < ϕ(v,j)_0 ≤ q and returns ϕ(v,j); let u ∈ be the vertex with the minimum t(u) in the support of ϕ(v,j). 
		
		Return (u,t(u)) as the choice for the vertex v in Line (<ref>) of <Ref> (if no such j is found for v, return no u exists for v). 
	



	With high probability, <Ref> finds the time-stamps in 
	Line (<ref>) of <Ref> and can be implemented in O(nlog^3n) space. 


We will show that for any vertex v ∈ V ∖, <Ref> finds the required time-stamp t(v) with high probability.
	
 Consider the smallest index ∈ [b] where ϕ(v,)_0 > 0; if no such  exists then v is not a neighbor to any vertex in  and thus will not be added to . Otherwise, 
	the neighbor u of v in  with the smallest value of t(u) belongs to U_i,. Thus, returning such u is the correct answer. 

Let us see how the algorithm performs for any j ∈ [b], and enumerate the sources of error.
	
	 
  * For any j <, we know that ϕ(v, j)_0 = 0, but the randomized sparse-recovery may return that ϕ(v,j)_0 > q with probability at most δ. 
	 
  * For j =, it may be the case that ϕ(v, j)_0 > q or if ϕ(v,j)_0 ≤ q, but randomized sparse-recovery returns otherwise. 
	
	
	Firstly, let us condition on the fact that randomized sparse-recovery performs correctly and retrieves ϕ(v,j) for all v ∈ V ∖ and j ∈ [b]. 
	Using union bound over all vertices and j ∈ [b], we get that this event happens with probability at least 1-n^-198 for the choice of δ = n^-200. 
	

	Now, we only need to bound the probability that the case ϕ(v, )_0 > q happens.  We do so using the following intermediate claim.
	
	
	

		For any j > 1 and any vertex v ∈ V ∖, if ϕ(v,j-1)_0 = 0, then ϕ(v,j)_0 ≤ q with high probability. 


	 Let us fix the vertices U_i which are picked to be in σ, but not the order in which they are processed, i.e., we know the k_i vertices that belong to U_i but not the vertex groupings of U_i,j for j ∈ [b].
	We define some useful notation to prove this claim. 
	
    G_i,j   : the graph G[U_i ∖ (∪)] at the beginning of sampling U_i,j, where, ∪
       include all the vertices in U_i settled by  all the vertices in σ till U_i,j-1;
    
    	d_j(v)   :the degree of v in G_i,j; 
    
    	k_i,j   :k_i - (2^1 + 2^2 + … + 2^j-1),  the number of vertices left in U_i after
       U_i,1, U_i,2, …, U_i,j-1 are sampled


 For any j < b with 2^j ≤ k_i,j (group j is not the last group), we can think of picking U_i,j as sampling 2^j vertices from the k_i,j vertices of U_i ∖ (U_i,1∪ U_i,2∪…∪ U_i,j-1) without replacement. Each vertex  is picked in U_i,j with probability p_j, where,
	
    p_j := 2^j/k_i,j.


	Suppose d_j(v) < 100lnn/p_j. Then, in expectation, we know that there are at most 100 ln n neighbors of v in G ∖ (∪). We use Chernoff bound for negatively correlated random variables in <Ref> (because of sampling without replacement) to argue that 
	with high probability, we cannot have more than 200lnn = q neighbors of v in G ∖ (∪) that are sampled in U_i,j; even if all of those neighbors join , 
	we will still have that sparsity of ϕ(v,j) is at most q as desired. 
	
	Now we need to argue the case when d_j(v) ≥ 100lnn/p_j. This implies that, 
	
    d_j(v)   ≥ 100lnn/p_j  as the set ∪ only grows
       = 100lnn·k_i,j/2^jby value of p_j in <Ref>
       = 50 lnn·k_i,j/2^j-1
       = 50 lnn·1/p_j-1·k_i,j/k_i,j-1. given that p_j-1 = 2^j-1/k_i,j-1
       = 50 lnn·1/p_j-1·k_i,j-1-2^j-1/k_i,j-1by definition of k_i,j
       = 50 lnn·1/p_j-1· (1-p_j-1) 
       ≥ 25 lnn· (1/p_j-1). k_i,j-1≥ 2^j + 2^j-1≥ 2 · 2^j-1, we get p_j-1≤ 1/2

When group j is the last group with 2^j ≥ k_i,j (here p_j = 1), we have,

    d_j(v) ≥ 100 lnn≥ 25 lnn· (1/p_j-1),

 where we have used that k_i,j-1 < 2^j-1 + 2^j < 4 · 2^j-1, and  p_j-1≥ 1/4.

We have argued that d_j(v) ≥ 25 lnn/p_j-1 in all cases. Among these d_j(v) vertices, none of them are sampled in U_i,j-1 as v is not settled in U_i,j. However, in expectation, 25 lnn of these vertices must have been sampled in U_i,j-1. 
We use the same argument as in <Ref> to say that at least one of these d_j(v) vertices will be sampled in U_i,j-1 and v will have a neighbor in  already inside U_i,j-1, with high probability. This contradicts our assumption that ϕ(v,j-1)_0 = 0. 


	Thus, in this case j cannot be the first index with non-empty support in ϕ(v,j). clm:finding-label-min
	

	
	To finalize the proof, we have that if = 1, U_i,1 has only 2 vertices and ϕ(v, 1) is 2-sparse; for any >1, we use <Ref> to argue that for any vertex v, ϕ(v, ) is q-sparse with high probability. 
	This proves the correctness of the algorithm as argued earlier. 

We can now bound the space of the algorithm. For every v ∈ V, we are maintaining O(logn) randomized sparse-recovery algorithms, each for recovering an O(logn)-sparse vector from a domain of size ≤ n and error probability δ=1/(n); thus, 
by <Ref>, this needs O(log^3n) space per vertex, and O(nlog^3n) space in total, concluding the proof of <Ref>. 




  §.§.§ Finding a Large Matching from <Ref> via the Reduction of <Ref>


<Ref> allows us to recover the time stamps of all vertices in a single run of the randomized greedy MIS algorithm in O(loglogn) passes over a dynamic stream. 
We now use this information alongside our reduction of approximate matching to randomized greedy MIS in <Ref>, to recover a large matching from the input graph. 

Let us first recall some notation about some variables in <Ref>: 

    : the graph G at iteration t; 
    v   : for each v ∈, denotes the degree of v in ; 
    
    	x_e    :the value given to edge e in x ∈^E from <Ref>
    
    	y_e    : the value given to edge e in fractional matching y ∈ [0,1]^E from <Ref>.

As we have stated earlier, given the support of the fractional matching y can be too large, we cannot hope to recover it explicitly. Instead, 
our goal is to sample the edges of the graph with probabilities proportional to their y-values, and then use the sampled edges to find a large matching. 
Specifically, for every e ∈ E, define: 

    p_e:= min(1, y_e · 200 log n).

We would like to sample each edge of the graph with probability p_e. The challenge however is that we will not be able to actually recover the values of y (or even x) explicitly and learn p_e's, and thus need to use a “proxy” for them algorithmically. 




To start with, we have the time stamps of all the vertices. Let us show that this also gives us the degrees of all the vertices at the time in which they are settled. 

	Given the time stamps t(v) for all v ∈ V, using one pass and O(nlogn) space, we can find t(v)(v) for all vertices v ∈ V. 


	For any vertex v, t(v)(v) only includes the edges of v to vertices w ∈ V which have t(w) ≥ t(v). We know the labels of all vertices explicitly, so it is easy to count the total number of edges from v to vertices with labels after v
	using a counter per vertex. 


Equipped with <Ref>, we can assume we also have the remaining degree of every vertex v ∈ V at the time it is settled. This fixes the value x will assign to the edges of v. 
The problem however is that we still do not have sufficient information to perform the check in Line (<ref>) of <Ref> to know which incident edges of v receive
a non-zero fractional matching, i.e., which edges (v,w) satisfy (w) ≤(v); this is because for this check, we need to know the degree of w at the time v is being settled not w itself. 

We side step this issue in the following by defining an intermediate assignment z ∈^E which we can explicitly find for any pair of vertices. 
To formally define the vector z, we describe the notion of assigning a vertex pair to one of the vertices. 

[Assignment of vertex pairs to vertices] For any pair of vertices u,v,  we say the pair u,v is assigned to vertex u, denoted by (u,v), iff:


  *   u is settled before vertex v, i.e., t(u) < t(v), or else,

  *  u, v are removed at the same time with t(u) = t(v) and u ∈ while v ∈, or else,

  *  t(u) = t(v), u, v ∈, and t(u)(u) ≥t(v)(v) (breaking the ties between u and v in case of the equality consistently, say, based on whichever appear in σ first).



Note that by <Ref>, every pair u,v of vertices, regardless of whether or not is an edge, is assigned to one of its endpoints. 
We then define z_uv for a pair u,v∈ V as, 

    z_uv := 200 log n/t((u,v))((u,v));

that is z_uv is proportional to the inverse of the degree of its assigned vertex, at the time this assigned vertex was settled. 
When vertices u,v do contain an edge e = (u,v) in the input graph, we use z_e and (e) also to denote z_uv and (u,v) interchangeably. 

We observe that for any vertex pair u,v, the value of z_uv can be found easily.

	For any vertex pair u,v, the value of z_uv can be determined given the information collected by the algorithm.  


	The only information required to find (e) is the time stamps, the sets  and , and the degrees at the time of removal, and lastly the permutation σ, all of which is stored in the memory explicitly (using <Ref>
	and <Ref>). 
	Thus, we can find for each vertex pair what (u,v) is, and then, determining z_uv is trivial.


The following claims shows the relevance of z-values for us. 


	For every edge e ∈ E, p_e ≤ z_e where p_e ∈ [0,1] is from <Ref>.


	It is sufficient to show that x_e · 200log n ≤ z_e given that y_e ≤ x_e always (y is obtained from x by reducing some of its values) and by the definition of p_e based on y_e in <Ref>. 
	
	For any edge e = (u,v) ∈ E, the value of x_e is updated in at most one iteration of the loop in Line (<ref>) of <Ref>, i.e., the iteration where either of u or v are settled. We will argue that
	
    x_e ≤β/t((e))((e)).

	We have multiple cases to consider:
	
		
  * When v is settled (strictly) before u, that is t(v) < t(u), we have that (e) = v from Line <ref> of <Ref>. We know that x_e is set as β/t(v)(v) if t(v)(u) ≤t(v)(v),  otherwise x_e is set as zero. In either case, x_e is less than β/t((e))((e)). This is similarly true when u is settled (strictly) before v. 
		
  * When v and u are settled at the same time, with t(u) = t(v), and if u goes to  at this iteration, then v ∈, and x_e is again updated as β/t(v)(v). We have that (e) = v by Line <ref> of <Ref> and can apply the above reasoning.
		
  * When both u,v go to  and have the same timestamps, the value of x_e is set as β/t(v)(v) if v is the higher degree vertex among u,v at time t(u) = t(v). Again, we have that (e) = v by Line <ref> of <Ref> and can apply the above reasoning.
	
	The claim follows by observing that, 
	
    x_e · 200 ·log n ≤β· 200 ·log n/t((e))((e))≤200 ·log n/t((e))((e)) =  z_e,

	where we have used that β < 1.


Given <Ref>, for algorithmic purposes, we can instead sample the edges with probability proportional to z-values, which we can compute. 
We now need to check this can be done efficiently in dynamic streams (and that the size of the sampled edges are not too large, given z is  not a fractional matching).
Our sampling is done in two steps: we first sample all pairs u,v based on their value z_u,v to obtain a vector ϕ_z ∈^V2 and then maintain a sparse-recovery algorithm over ϕ_z to 
recover the actual edges inside this sample. Furthermore, we need to sample ϕ_z itself with limited independence hash functions (defined in <Ref>) 
and work with ϕ_z implicitly given that its size is larger than the allowed space. We now formalize this: 



  
Sampling process. Let κ := 200logn and sample a κ-wise independent hash function from <Ref> with domain of the set of vertex pairs and the range of [0,1]
[ For the simplicity of exposition, we let the range of the hash function to be the interval [0,1]. For algorithmic purposes, one needs to further discretize this range to integers. Specifically, use the range as {1, 2, …, (n)} for some large polynomial in n and consider a mapping of [0,1] to this range in a standard way. The distribution when sampling from the hash family with this large discrete domain varies from the range [0,1] 
by at most 1/(n) in total variation distance, and this negligible difference can be added to the probability of error of the algorithm.]:

    h : n2 → [0,1].

Let Φ_z ⊆V2 be the set of pairs such that h(u,v) ≤min(1,z_u,v) and ϕ_z ∈0,1^Φ_z be the incidence vector of E_z:= E ∩Φ_z. This way, the elements in the support of ϕ_z 
are obtained from E by sampling each edge e ∈ E, using a κ-wise independent hash function, with probability z_e. 



We now analyze this sampling process. The size of Φ_z may still be too large for us but we show that the total number of actual edges sampled, i.e., the support of ϕ_z will not be large
and can be found and stored explicitly by the algorithm. 


	The set E_z can be found and stored in O(n log^2 n) space explicitly with high probability. 


	We will prove that size of E_z is O(nlogn) with high probability (over the randomness of h alone). 
	This will be sufficient to prove the claim since we can implicitly maintain the set Φ_z using the hash function h, which itself can be stored in O(κ·logn) = O(log^2n) space using <Ref> (see also <Ref>); then, we will store a randomized sparse-recovery of <Ref> for the vector ϕ_z and each relevant update on the graph G can be passed to this vector given the implicit access to Φ_z. This way, 
	we can recover  E_z, the support of ϕ_z, in O(nlog^2n) space with high probability. 
	
	It thus suffices to prove the bound on the size of E_z.  For any vertex v ∈ V, let A(v) be the set of edges e ∈ E that are assigned to v, i.e., (e) = v. 
	We claim that A(v) ∩ E_z is of size O(logn) with high probability which implies the bound on E_z immediately since the set A(v) | v ∈ V covers all edges of the graph. 
	
	Let us fix a vertex v ∈ V. Let d_v = t(v)(v) be the degree of v at the time it is settled. 
	We argue that A(v)≤ d_v. This is because any edge e = (v,w) assigned to v satisfies t(w) ≥ t(v) and thus belongs to the graph at the time v is settled. 
	If d_v ≤ 200logn, we are already done, so in the following we assume d_v > 200logn. 
	
	For e ∈ A(v), define the indicator random variable X_e ∈0,1 which is 1 iff e is sampled in A_z. By <Ref>, we have X_e = 200logn/d_v
	and thus by the argument above
	
    E_z ∩ A(v) = A(v)·200logn/d_v≤ d_v ·200logn/d_v = 200logn.

	Moreover, Z_e_e ∈ A(v) are chosen via a κ-wise independent hash function. Thus, by <Ref>, 
	
    E_z ∩ A(v)≥ 400logn≤exp-minκ/2, 2/3· 200logn≤ n^-100,

	by the choice of κ = 200logn. A union bound over all the vertices concludes the proof.


We have proved that our sampling process does not violate the space constraint and we can obtain the set E_z
as well. We now finalize the argument by showing that E_z contains a large matching in expectation by relating it to the fractional matching y of <Ref>.  
This is a combination of the standard fact that sampling a fractional matching leads to a large matching as well (slightly modified to work even with limited-independence sampling), and a rejection sampling argument 
in the analysis to relate sampling with probability z_e to the one with p_e needed for the fractional matching sampling. 


	There exists a matching M in the sampled edges E_z with 
	
    M≥1-8β/1-2β·β/10·μ(G).



	Fix a choice of random ordering σ in <Ref> and its simulation in <Ref> and let y ∈^E be the fractional matching defined by this process. 
	Let R denote the entire randomness of these algorithms, which we condition on in the following proof. Thus, the only randomness remained at this point is in the sampling process of E_z. 


	Consider any choice of the hash function h in the sampling process from earlier. Define the following alternative sampling process for obtaining a set E_p as opposed to E_z: 
	add any edge e ∈ E to E_p iff h(e) ≤ p_e (recall p_e = min(1,200logn· y_e) by <Ref>). Since p_e ≤ z_e by <Ref>, for any choice of h, the set E_p ⊆ E_z. We can thus think of E_p as 
	obtained from E_z by rejecting the edges with p_e < h(e) ≤ z_e. We emphasize that we are not algorithmically finding E_p but rather only define it for the analysis. Thus, picking the random hash function h 
	defines a sampling process for picking E_p as well. 
	
	
	We now argue that 
	
    μ(E_p) | R≥1/5y,

	where y = ∑_e ∈ E y_e. This is sufficient to conclude the proof since, 
	
    μ(E_z)   = _R μ(E_z) | R≥_R μ(E_p) | Rby the law of total expectation and since μ(E_z) ≥μ(E_p) given E_p ⊆ E_z
       ≥1/5·_R y| R = 1/2·yby <Ref> and the law of total expectation again
       ≥1/5·1-8β/1-2β·β/2·μ(G) ·1-1/(n),

	where the final inequality holds by <Ref> for the choice of y in <Ref> with the additional 1-1/(n) accounting from the correctness probability  
	of <Ref> in <Ref>. 
	
	It thus remains to prove <Ref>. 
	Define the following assignment _e for each edge e ∈ E: 
	
    _e:= 
    			y_e        if e ∈ E_p and y_e ≥ 1/(200 log n),
    
    			y_e/p_e        if e ∈ E_p and y_e < 1/(200log n),
    
    			0        otherwise.

	This way, _e | R = y_e for all e ∈ E: if y_e ≥ 1/(200logn), we have p_e = 1 and thus h(e) ≤ p_e always meaning e ∈ E_p and _e = y_e deterministically. 
	Otherwise, e belongs to E_p with probability p_e < 1 and thus _e = p_e · y_e/p_e = p_e. 
	
	We have 
	
    ∑_e ∈ E_e | R  = ∑_e ∈ E y_e = y,

	and at the same time  is only supported on the edges in E_p. We are going to prove that, with a proper scaling,  can actually become a fractional matching. This means E_p contains a 
	fractional matching with expected size ≈y which will be sufficient to prove <Ref>. 
	
	Fix a vertex v ∈ V and define,

    _v := ∑_e ∋ v y_e ·(y_e ≥ 1/(200 log n))   and  _v  := ∑_e ∋ v_e ·(y_e < 1/(200log n)).

It is easy to see that _v ≤ 1 as y ∈^E is a fractional matching. Define E_p(v) as the edges in E_p that are incident on v. 
We can also observe that,

    _v = ∑_e ∋ v_e ·(y_e < 1/(200log n))    ≤1/200 log n·E_p(v).

because, when y_e < 1/(200log n), we know that y_e/p_e = 1/(200 log n). We have, 

    E_p(v)| R = ∑_e ∋ v p_e = ∑_e ∋ v y_e · (200logn) ≤ 200logn,

again using the fact that y is a fractional matching. Moreover, E_p(v) is a sum of κ-wise independent random variables (by the choice of h) and thus, by <Ref>, 

    E_p(v)≥ 400logn| R≤exp-minκ/2, 2/3· 200logn≤ n^-100,

by the choice of κ = 200logn. Plugging in this in <Ref> implies that with high probability, 

    _v ≤1/200 log n· 400logn = 2.

All in all, we have that for every vertex v ∈ V, with high probability

    ∑_e ∋ v_e ≤ 3.

A union bound over all the vertices, implies that /3 is with high probability a fractional matching. We thus have, 

    /3|/3 is a fractional matching, R≥y/3· (1-1/(n)).

To conclude the proof of <Ref>, we have, 

    μ(E_p) | R   ≥2/3·/3 is a fractional matching| R·/3|/3 is a fractional matching, R
       ≥2y/9· (1-1/(n)) > y/5;

the first inequality holds by the integrality gap of fractional matchings in <Ref> for the first term, and the trivial lower bound of μ(E_p) ≥ 0 when /3 is not a fractional matching; 
the second inequality holds by the fact that /3 is with high probability a fractional matching and the expectation calculated above. 





  §.§.§ The Final Dynamic Streaming Algorithm: Concluding the Proof of <Ref>


We are almost done with the proof of <Ref>. Up until now, we have already established that for any given graph G=(V,E), 


  * We can run <Ref> in O(nlog^3n) space and recover the time stamps of all vertices with high probability (<Ref>);

  * We can then extract the vector z ∈^E from the information collected above in an additional O(nlogn) space and O(1) passes deterministically (<Ref> and <Ref>);

  * We can further sample the edges E_z ⊆ E in another O(nlog^2n) space and O(1) passes with high probability (<Ref>);

  * Finally, we find a maximum matching in E_z; conditioned on the high probability events above, this gives us a matching M of expected size (<Ref>):

    M≥1-8β/1-2β·β/10·μ(G).



The main missing pieces are to (i) boost the probability of success of this algorithm to a high probability bound instead of an expectation-guarantee, and, subsequently, (ii) boost the approximation ratio of the algorithm 
to a (1+)-approximation (and extend it even to weighted graphs). We show that both these tasks can be achieved using the existing sketching and streaming results listed in <Ref>. 
The proofs in the following are pretty standard. 



  
Boosting the probability of success. Let G=(V,E) be the input graph. We can assume without loss of generality that μ(G) ≥log^2(n); the total number of edges in any graph is at most 2n ·μ(G) 
and thus we can run a randomized sparse-recovery in <Ref> for recovering 2nlog^2(n) edges in O(nlog^3n) space with high probability; if μ(G) < log^2(n), this algorithm succeeds in recovering the entire graph
and finding a maximum matching of G exactly. Otherwise, we continue with the main algorithm. 

Let = 1/2 and run the vertex-sampling approach of <Ref> for O(logn) guesses of μ(G) as powers of 2 between log^2(n) to n and run our algorithm for each guess separately in parallel. 
We  specify this more details in the following. 

For a given guess μ̃,
at the beginning of the stream, we partition the vertices randomly into groups U_1,…,U_t for t = 8μ̃/ = 16μ̃. This allows us to define a graph H := H(μ̃) on new vertices u_1,…,u_t (representing the groups U_1,…,U_t) and edges between u_i and u_j iff there exists at least one edge (x,y) ∈ E with x ∈ U_i and y ∈ U_j (note that multiple edges in E can be mapped to a single edge in H but H does not have multi-edges). Moreover, 
an update to the dynamic stream defining E can be also directly translated to an update to the graph H and thus we can run our algorithms over H.[We should mention a minor point here. 
There is a slight difference between the dynamic stream defining E(H) versus for E. In particular, we should treat the dynamic stream on E(H) as a vector ϕ∈^t2 where ϕ_u_i,u_j > 0 (but not necessarily ϕ_u_i,u_j = 1) is interpreted as the the existence of the edge (u_i,u_j) ∈ E(H) (whereas for the dynamic stream defining E, the vector ϕ∈0,1^V2 will be the characteristic vector of E). Nevertheless, our algorithms work the same exact 
way over H. This is because the only access 
of these algorithms to the edges of the graph was via sparse-recovery algorithms and these algorithms return the support of the vector ϕ (or whichever subsets of it they are being run on).
Moreover, since the entries of ϕ are still (n) bounded, the space complexity of the algorithm is exactly as before (as a function of n itself, i.e., we do not aim for a better dependence based on t ≤ n).]

Now consider, the guess μ̃ such that μ(G) ≤μ̃≤ 2 ·μ(G). Firstly, by <Ref>, we have that with high probability μ(H) ≥μ(G)/2.
As such, for this choice and by picking β = 1/16 in our algorithm, for the returned matching M, we have that 

    M≥1-8β/1-2β·β/10·μ(H) ≥1/40·μ(G).

On the other hand, in H, we deterministically have that M≤ t/2 since it is a matching and H has at most t vertices. This means that we also always have 

    M≤ 16 μ(G).

This implies that 

    M≥1/50·μ(G)≥1/3200

as otherwise 

    M < 1/50·μ(G) + 1/3200· 16μ(G) < 1/50+1/200·μ(G) = 1/40·μ(G),

a contradiction. Repeating this algorithm now O(logn) times and returning the largest matching implies that with high probability, we will find a matching of size at least μ(G)/50. 
Note that given a matching in H, we can spend O(1) more passes and O(nlog^2n) space to find a matching in G of the same size: for any edge (u_i,u_j) in the matching of H, we need
to just find a single edge between the vertices of the group U_i and U_j which we know exists. This can be done using a standard sampling trick and sparse-recovery algorithms: basically, we first count the number c_i,j of 
edges between U_i and U_j in a single pass and in the second pass, we sample ≃log(n)/c_i,j fraction of vertex-pairs between U_i and U_j and run a sparse-recovery algorithm for ≃ (logn)-sparse
vectors on this subsampled pairs. With high probability, the number of sampled edges is indeed ≲logn and the recovery algorithm finds at least one of those edges. 

In conclusion, by running our main algorithm O(log^2(n)) times in parallel for different guesses of μ(G) and different repetitions for each guess, we 
obtain an O(1)-approximation algorithm to the maximum matching of any given graph G=(V,E) in a dynamic stream with high probability[To simplify the proof, we have been quite cavalier with the choice
of constants in the analysis of the algorithm and only prove a 50-approximation guarantee. Given that we are going to boost the approximation ratio of this algorithm in a black-box way in the next step, 
any constant-approximation works for us and thus we did not optimize the approximation ratio of this base algorithm. A more careful analysis of the bounds can reduce this ratio dramatically, but we suspect the limit will be 
close to 6-approximation (or possibly 4 for bipartite graphs).]. Moreover, this algorithm
uses O(nlog^5n) space and O(loglogn) passes. 



  
Boosting the approximation ratio. Now that we have an O(1)-approximation algorithm that succeeds with high probability, this step becomes a black-box application of <Ref>. 



This concludes the proof of <Ref>. 









§ THE LOWER BOUND


We provide our multi-pass lower bound for approximate matchings in the dynamic streaming model in this section, formalizing <Ref>. 



Any semi-streaming algorithm that given any n-vertex graph in a dynamic streams, outputs an O(1)-approximation to the maximum matching problem with any constant probability of success requires Ω(loglog n) passes.


We prove <Ref> using the connection between the streaming and communication models (<Ref>). Our proof consists of two separate parts proven in the subsequent sections.

	
  * Part 1. In <Ref>, we define a new two-party communication problem for r-round protocols called Augmented Hidden Matrices (_r, see <Ref>) and prove the following lower bound on its communication complexity in <Ref>.

	
	
		For any sufficiently large n_r ∈, positive integer r = O(loglog(n_r)), positive number α≤ 1 - n_r^-1/2r and constant ≥ 1, any r-round protocol that successfully solves _r(n_r, α) with
		probability of success at least 
    1/2·1 + r/20 ·· (r+1)
 must have a communication cost of at least 
		
    s_r = n_r1+1/2^r-1·1-αr·2^r/2^r-1·(α/(1-α))^2/(·^2 · 80^2)^r · ((r+1)!)^3 .

	

	
  * Part 2. In <Ref>, we construct graph instances corresponding to the _r(n_r, α) problem. We prove the following connection between any p-pass dynamic streaming algorithm for approximate maximum matching and _r where r = 2p -1 in <Ref>.
	
	
		For any sufficiently large n_r ∈, integers p,s ≥ 1, and number ≥ 1, let  by any p-pass s-space
		dynamic streaming algorithm that computes a -approximate maximum matching on a (4n_r)-vertex bipartite graphs with probability of success at least 1-1/(n).
		Then, for r = 2p-1 and α = 1/(4 ·· r), there exists an r-round protocol  for _r(n_r, α) with 
		probability of success 
		
    ≥1/2·(1 + 1/3)

		and
		communication cost 
		
    ≤ r · s + O(r · n_r log(n_r)).

		



We now prove <Ref> using the above two lemmas.


	Without loss of generality, we can solely focus on proving the lower bound for semi-streaming algorithms that succeed with high probability instead of constant probability. 
	This is due to the following standard reduction.
	 
	Simply run a constant probability of success streaming algorithm in parallel O(logn) times 
	and consider all the outputs; then, spend one more pass to filter out all the ones that output an edge that does not belong to the graph (because they failed), and among the rest, output the largest matching. 
	This way, we still obtain a semi-streaming algorithm with just one more pass (which is negligible in this context) and a high probability of success. As such, in the rest of the proof, we focus on high-probability-of-success algorithms. 
	
	For sufficiently large n ∈, integers p,s ≥ 1 and any constant ≥ 1,
	let  be any p-pass s-space dynamic streaming algorithm that computes a -approximate maximum matching on any (4n)-vertex graph with probability of success at least 1-1/(n). 
	
	By <Ref> with r = 2p-1 and α = 1/(4 ·· r), there exists an r-round protocol  for _r(n, α) where 
	
    ≥1/2·(1 + 1/3)     and    ≤ r · s + O(r^2 · n log n).

	By <Ref> with n_r = n and =, we have that ≥ s_r since 
	
    ≥1/2·1+1/3≥1/2·1 + r/20 ·· (r+1).

	Then, by combining the bounds on  and re-arranging the inequality, we obtain the following lower bound on the space of  using the fact that  and β are constants (and thus α = Θ(1/r)):
	
    s    ≥s_r/r - O( n log n) 
       = n1+1/2^r-1·1-αr·2^r/2^r-1·(α/(1-α))^2/(·^2 · 80^2)^r · ((r+1)!)^3·1/r - O(n log n) 
       ≥n1+1/2^r-1· r^-Θ(r) - O(n log n).

	
	Overall, by considering  with p = o(loglog n) and thus r = 2p -1 = o(loglog n), we have that the space used by the algorithm is s ≫ n · (n) using <Ref>.
	Therefore, any dynamic streaming algorithm that uses n · (n) space, namely, a semi-streaming algorithm, to compute an O(1)-approximate maximum matching must use Ω(loglog n) passes.




 §.§ Augmented Hidden Matrices


For any r ≥ 1, the _r(n_r, α) problem is defined recursively using b_r^2 many instances of the _r-1(n_r-1, α) problem where n_r, b_r, n_r-1∈ℕ and α∈ (0,1).
The output of any instance is a single bit, pointed to by a search sequence (to be defined soon).


[Augmented Hidden Matrices]

The Augmented Hidden Matrices problem, denoted by _r(n_r, α), is defined as follows (see <Ref> for an illustration):

	
  * For 𝐫 = 0. Alice does not receive any input, i.e., 0 = ∅, and Bob receives a single 
	bit 0∈{0,1}. There is no communication and Alice has to output 0. 
	
  * For 𝐫 ≥ 1. Start with b_r^2 instances of the players' inputs in _r-1(n_r-1, α), denoted by (r-1_i,j, r-1_i,j) for i, j ∈ [b_r].
	Alice receives r = where  is a b_r × b_r matrix such that [i,j] = r-1_i,j for i, j ∈ [b_r]. 
	Bob receives the input r = (, , ) where , ∈ S_b_r are permutations of [b_r] and  is a b_r × b_r matrix such that, for i, j ∈ [b_r],
	 
    [i,j] =
    		(r-1_i,j, r-1_i,j)    if  b_r ·α <(i) ≠(j) ≤ b_r, 
    r-1_i,j   if  b_r ·α < (i) = (j) ≤ b_r, 
    ∅   otherwise.

	
	Alice starts the communication. After all the messages are sent, 
	the player receiving the last message is given a search sequence, which is a tuple of r integers, (r, r-1, …, 1) with i∈ [b_i · (1-α)]. This player must output the solution to _r-1 instance (r-1_i,j, r-1_i,j) where (i) = (j) = b_r ·α + r using the search sequence (r-1, r-2…1) .
	





We expound more on the defintion of _r problem, and give some useful terminology next. 

For r = 0 case, we set n_0 = 1, and _0(1, α) is also denoted by  _0(1). This is a base case that is trivially hard for 0-round protocols. 

For each of the b_r^2 many _r-1 instances (r-1,r-1) used in an instance of _r, the roles of Alice and Bob are swapped, i.e., Alice holds r-1 and Bob holds r-1.
Out of these instances, we call the set of the k_r := b_r · (1- α) many _r-1 instances (r-1_i,j, r-1_i,j) where b_r ·α < (i) = (j) ≤ b_r as the special sub-instances in an instance of _r.
Since each special sub-instance identifies another set of k_r-1 many _r-2 special (sub-)sub-instances, recursively applying this for all special sub-instances of _r identifies a set of k_r · k_r-1·…· k_1 many _0 special base instances, where each one corresponds to a single bit 0. 

It is useful to point to the number of special base instances explicitly for later. 


	In any instance of _r(n_r, α), there are k_r · k_r-1·…· k_1 many special base instances where k_i = b_i · (1- α) for each i ∈ [r].


Furthermore, we call the set of k_r^2 - k_r many _r-1 instances (r-1_i,j, r-1_i,j) where b_r ·α < (i) ≠(j) ≤ b_r as the off-diagonal sub-instances in an instance of _r. We define some more notation to point to the sub-instances. 



  
*Notation.
In any instance of _r, denoted by (r, r), we use the following notation.
We denote each of the k_r many special sub-instances as (_k, _k) = (r-1_i,j, r-1_i,j) where (i) = (j) = b_r ·α + k and i,j ∈ [b_r] for k ∈ [k_r].
We collectively denote these special sub-instances as (,) where 

    = (_1, _2, …, _k_r)   and   = (_1, _2, …, _k_r).
 

We denote the collection of the k_r^2 - k_r many off-diagonal sub-instances as (, ) where 

    = (r-1_i,j : b_r ·α < (i) ≠(j) ≤ b_r)  and   = (r-1_i,j : b_r ·α < (i) ≠(j) ≤ b_r).

We let  be the remaining b_r^2 - k_r^2 sub-instances  r-1_i,j where (i) ≤ b_r ·α or (j) ≤ b_r ·α.




  
Search Sequences.
After all the messages are sent, the search sequence given to the player who receives the last message is always uniformly random and independent of the players' inputs. That is, a search sequence (r, r-1, …, 1) is chosen where for i ∈ [r], i is chosen uniformly at random and independently from [b_i · (1-α)]. 
The solution to any instance of _r given (r, r-1, …, 1) is the same as the solution to the uniformly chosen special sub-instance (_r, _r) on the search sequence (r-1, …, 1).
Continuing this until the last index 1 in the search sequence ultimately identifies a uniform random special base instance, i.e., an instance of _0, whose solution is the solution to the _r instance.

Our definition of the _r(n_r, α) communication problem is non-standard as the uniformly random search sequence, which is a part of the input, is given to the final player at the very end of a protocol.
In particular, the search sequence is crucial to defining the output of the problem, but does not form part of the input held by the players throughout the protocol.

Although the search sequence defines the communication problem in a non-standard way, the easy direction of Yao's minmax theorem is still applicable.
Thus, 
we prove <Ref> by considering deterministic protocols for _r(n_r, α) where the players' inputs (r, r) are sampled from the hard distribution (which we define shortly). 


	The definition of _r(n_r, α) (<Ref>) always includes the uniform random search sequence, which is independent of the players' inputs and how they are distributed.
	However, when referring to the _r(n_r, α) problem, we do not explicitly mention the given search sequence if this is clear from context.








Next, we fix the parameters of the problem, and then define our hard distribution _r(n_r, α). 



  
Parameter Choices.
For all r ≥ 1, it is sufficient for us to consider the 
_r problem for parameters that satisfy the following conditions:

    n_r    = n_r-1· b_r 
    
    	b_r    = n_r2^r-1/2^r-1·1-αr· 2^r-1/2^r-1-1
    
    	n_r-1   = n_r2^r-1-1/2^r-1 / 1-αr·2^r-1/2^r-1 - 1.

From now on, we only consider _r(n_r, α) with these parameter choices.



	

	Hard Distribution _r(n_r, α) for _r(n_r, α):
	
		
  * For 𝐫=0. 
		Sample 0∈{0,1} uniformly and independently. We also use _0(1) to denote this distribution.
		
  * For 𝐫 ≥ 1. 
		Sample the b_r^2 instances (r-1_i,j, r-1_i,j) from _r-1(n_r-1, α) independently for each i, j ∈ [b_r] where b_r, n_r-1 are as defined in <Ref>. Sample the permutations , ∈ S_b_r uniformly and independently.
		
	


Recall that the distribution of the search sequence was already defined to be uniformly random, and independent of all other inputs. 

We have the following obvious observation. 


    Any 0-round protocol (wherein Alice outputs the answer) for solving _0(1) succeeds with probability at most 1/2 when the input is sampled from _0(1).





	




The proof of <Ref> relies on a round-elimination argument that shows that if there is a good deterministic protocol for _r(n_r, α) under the input distribution _r(n_r, α), then there must be a good deterministic protocol for _r-1(n_r-1, α) under the input distribution _r-1(n_r-1, α). 
We prove the following key lemma in <Ref>.


 
	For any r ≥ 1, sufficiently large n_r ∈, α,δ∈ (0,1), and integer s ≥ 1,
	suppose there exists a deterministic r-round protocol _r for _r(n_r, α) with
	
    _r≤ s

	and probability of success at least δ when the input is sampled from _r(n_r, α).  
	
	Then, for any ∈ (0,1), there exists a deterministic (r-1)-round protocol _r-1 for _r-1 with 
	
    _r-1≤· (r/) ·s/k_r + r,

	 and probability of success 
	 
    _r-1≥δ -  -√(s/2 · b_r^2 ·α^2)
 
	 when the players' input is sampled from _r-1(n_r-1, α).





With that, we have the main tools required to prove of our lower bound for _r(n_r, α).


  §.§.§ The Lower Bound for Augmented Hidden Matrices: Proof of <Ref>


	We prove this result by first assuming the existence of a deterministic r-round protocol _r for _r that is `too good to be true' (w.r.t. the statement of the lemma) on inputs sampled from _r(n_r, α). Then, by iteratively applying the round-elimination argument in <Ref>, we ultimately obtain a deterministic 0-round protocol _0 for _0 that is trivially `too good to be true' on inputs sampled from _0(1) (given <Ref>), a contradiction.
	
	Formally, we prove this by induction on r.
	
Base case for 𝐫=1.
Suppose that there exists a deterministic 1-round protocol _1 for _1(n_1, α) with communication cost 

    _1 < s_1 = n_1^2 ·α^2/·^2 · 80^2 · 8

and probability of success

    _1≥1/2·(1 + 1/40 ·)

when the input is sampled from _1(n_1, α).
Then, using <Ref> with ε = 1/(160 ·), we obtain a deterministic 0-round protocol _0 for _0(1) which has no communication cost (since no messages are communicated) and succeeds with probability

    _0   ≥1/2·(1 + 1/40 ·) - 1/160 · - √(n_1^2 ·α^2/·^2 · 80^2 · 16 · b_1^2 ·α^2)
       ≥1/2·(1 + 1/80 · - √(n_1^2/^2 · 160^2 · b_1^2)) since ≥ 1
        = 1/2·(1 + 1/160 ·) since b_1 = n_1 by <Ref>

when the input is sampled from _0(1).
This, however, contradicts <Ref> and thus proves the result for the base case when r = 1.

Inductive step for 𝐫 ≥ 2. Having proven the base case, we now prove the result for any r ≥ 2 given the result holds for r-1, i.e., the inductive hypothesis. Suppose that there exists a deterministic protocol _r for _r(n_r, α) with communication cost 

    _r < s_r = n_r1+1/2^r-1·1-αr·2^r/2^r-1·(α/(1-α))^2/(·^2 · 80^2)^r · ((r+1)!)^3

and probability of success

    _r≥1/2·(1+r/20 ·· (r+1))

when the input is sampled from _r(n_r, α).
Then, using <Ref> with
ε = 1/(40 ·· (r+1)^2),
we obtain a deterministic (r-1)-round protocol _r-1 for _r-1(n_r-1, α) with cost

    _r-1 < · (40 ·· (r+1)^2 · r) ·( s_r/k_r + r )

and probability of success

    _r-1≥1/2·(1+r/20 ·· (r+1)) - 1/40 ·· (r+1)^2 - √(s_r/2 · b_r^2 ·α^2)

when the input is sampled from _r-1(n_r-1, α).

We now argue that protocol _r-1 contradicts the result for r-1, namely, the inductive hypothesis.
In particular, we show that _r-1 < s_r-1 and 

    _r-1≥1/2·1 + (r-1)/20 ·· r.

The rest of the proof is a careful but rather tedious calculation of the values we obtain using the above reduction for the communication cost and probability of success of the protocol. 

To bound the communication cost, we first reiterate the relation between n_r and n_r-1 from <Ref> as follows:

    n_r1/2^r-1   = n_r-11/2^r-1-1·1-αr·2^r-1/2^r-1 - 1·1/2^r-1-1
       = n_r-11/2^r-1 -1·1-α(r-2)·2^r-1+1/(2^r-1) · (2^r-1-1).

Next, we use this to simplify the expression for the term s_r/k_r in <Ref>.

    s_r/k_r   = n_r1+1/2^r-1·1-αr·2^r/2^r-1·(α/(1-α))^2/(·^2 · 80^2)^r · ((r+1)!)^3_s_r·1/b_r · (1-α)_1/k_r
       = n_r/b_r·n_r1/2^r-1·1-αr · 2^r/2^r - 1 - 1·(α/(1- α))^2 /(·^2 · 80^2)^r · ((r+1)!)^3
       = n_r-1·n_r1/2^r-1·1-αr·2^r/2^r-1-1as n_r = n_r-1· b_r by <Ref>·(α/(1-α))^2/(·^2 · 80^2)^r · ((r+1)!)^3
       = n_r-11 + 1/2^r-1-1·1-αx·(α/(1-α))^2/(·^2 · 80^2)^r · ((r+1)!)^3. by <Ref>

	where the exponent of (1-α) in the above equation is

    x    = (r-2)·2^r-1+1/(2^r-1) · (2^r-1-1) + r·2^r/2^r-1 - 1 
       =(r-2)·(2^r-1-1)+1 + r-2/(2^r-1) · (2^r-1-1) + (r-1)·2^r+1/2^r-1
       =1/2^r-1·(r-1)2^r + 1 + (r-2) + r-1/2^r-1-1
       = (r-1)/2^r-1· (2^r + 1 + 1/2^r-1-1) 
       = (r-1)/2^r-1· (2^2r-1-2^r + 2^r-1-1 + 1/2^r-1-1) 
       = (r-1)/2^r-1· (2^2r-1-2^r-1/2^r-1-1) 
       = (r-1) · 2^r-1/2^r-1-1 .

Therefore, we have that

    s_r/k_r   =  n_r-11 + 1/2^r-1-1·1-α(r-1) · 2^r-1/2^r-1-1·(α/(1-α))^2/(·^2 · 80^2)^r · ((r+1)!)^3
       = s_r-1·1/·^2 · 80^2 · (r+1)^3.

By plugging this back into <Ref>, we obtain

    _r-1   < · (40 ·· (r+1)^2 · r)  ·s_r-1·1/·^2 · 80^2 · (r+1)^3 + r
       ≤1/^2 · 160· s_r-1 + 40 ··· (r+1)^4 using r ≤ r +1
       ≤ s_r-1 , as r^4 ≪ s_r-1 for r = O(loglog n) and α≤ 1 - n_r^-1/2r

which is our desired bound on the communication cost of _r-1.

To bound the probability of success, we first reiterate the following useful relation from <Ref>:

    b_r^2    = n_r2 · 2^r-1/2^r-1·1-αr· 2 · 2^r-1/2^r-1-2
       = n_r1 + 1/2^r -1·1-αr· 2^r/2^r-1 / (1- α)^2  .

Using this, we now simplify the term s_r/(2· b_r^2 ·α^2) in <Ref>.

    s_r/2 · b_r^2 ·α^2   = n_r1+1/2^r-1·1-αr·2^r/2^r-1·(α/(1-α))^2/(·^2 · 80^2)^r · ((r+1)!)^3_s_r·1/2 · b_r^2 ·α^2
       = b_r^2 ·α^2/(·^2 · 80^2)^r · ((r+1)!)^3·1/2 · b_r^2 ·α^2by <Ref>
       = 1/2 · (·^2 · 80^2)^r · ((r+1)!)^3  .

By plugging this back into <Ref>, we have that

    _r-1   ≥1/2·(1+r/20 ·· (r+1)) - 1/40 ·· (r+1)^2 - √(1/2 · (·^2 · 80^2)^r · ((r+1)!)^3)
       ≥1/2·(1+r/20 ·· (r+1)) - 1/40 ·· (r+1)^2 - √(1/^2 · 80^2 · (r+1)^4)since ≥ 1 and 2 · ((r + 1)!)^3 ≥ (r + 1)^4 for r ≥ 1
       = 1/2·(1+r/20 ·· (r+1)) - 1/· 80 · (r+1)^2
       = 1/2·(1+r/20 ·· (r+1) - 1/40 ·· (r+1)^2) 
       ≥1/2·(1+r-1/20 ·· r) ,

which is our desired bound.

Overall, we have that the deterministic protocol _r-1 constructed from _r using <Ref> contradicts the lemma for r-1 (inductive hypothesis) and thus the lemma must hold for deterministic r-round protocols when the input is sampled from the distribution _r for every r ≥ 1.
Finally, by the easy direction of Yao's minmax principle, the same result holds for any (even randomized) r-round protocol for any instance of _r (given a uniform random search sequence).










  §.§.§ The Round Elimination Argument: Proof of <Ref>


We now get to the main part of the argument, which is the proof of <Ref>, restated below. 

[<Ref>]
	For any r ≥ 1, sufficiently large n_r ∈, α,δ∈ (0,1), and integer s ≥ 1,
	suppose there exists a deterministic r-round protocol _r for _r(n_r, α) with
	
    _r≤ s

	and probability of success at least δ when the input is sampled from _r(n_r, α).  
	
	Then, for any ∈ (0,1), there exists a deterministic (r-1)-round protocol _r-1 for _r-1 with 
	
    _r-1≤· (r/) ·s/k_r + r,

	 and probability of success 
	 
    _r-1≥δ -  -√(s/2 · b_r^2 ·α^2)
 
	 when the players' input is sampled from _r-1(n_r-1, α).


 Starting with a deterministic r-round protocol _r for _r(n_r, α) where _r≤ s and _r≥δ under _r as in the statement of <Ref>, we construct a deterministic (r-1)-round protocol _r-1 for _r-1(n_r-1, α) that proves the lemma in three steps:

	
  * 
	 (Input Embedding) Construct a randomized r-round protocol 1_r under _r-1 with success probability the same as _r under _r, i.e., 1_r≥δ, and internal information cost less than the communication cost of _r by a k_r multiplicative factor, i.e., 
	
    1_r_r-1≤s/k_r.

	
  *  (Message Compression) Construct a randomized r-round protocol 2_r under _r-1 with success probability less than that of 1_r under _r-1 by at most an additive ε factor, i.e., 2_r≥δ - ε, and with communication cost similar to the internal information cost of 1_r under _r-1, i.e., 
	
    2_r≤·r/ε·1_r_r-1 + r≤·r/ε·s/k_r + r.

	
  *  (Guessing the First Message) Construct a deterministic (r-1)-round protocol _r-1 under _r-1 with success probability less than that of 2_r under _r-1 by at most an additive ≃√(s/(b_r^2 ·α^2)) factor, i.e, _r-1≥δ - ε - √(s/(2 · b_r^2 ·α^2)), and with communication cost no more than that of 2_r, i.e., 
	
    _r-1≤2_r≤·r/ε·s/k_r + r.
 




  §.§.§ Step <ref>: A Low Information Cost Protocol via Input Embedding


We construct a low information cost r-round protocol 1_r for _r-1 by considering an input (r-1, r-1) ∼_r-1(n_r-1, α) and  embedding it in a simulated input instance (r, r) ∼_r(n_r, α) for _r such that its output can be used to solve (r-1, r-1).
Then, the players simulate a run of the protocol _r in r rounds using the simulated input. 


To simplify the exposition, we disambiguate the players in the construction of 1_r (and _r-1 later in step <ref>).
We use Alice and Bob to denote the players in the input instance of _r-1 where Alice holds = r-1 and Bob holds = r-1. 
On the other hand, we use X and Y to refer to the players in the simulated input instance of _r where
player X holds r = and player Y holds r = (, , ).





	

	An r-round protocol 1_r for _r-1(n_r-1,α) on input (,) ∼_r-1(n_r-1, α) where (r-1, r-2, …, 1) is the given uniform random search sequence: 
	
		
  * Using public randomness, independently sample a uniform random search index ∈ [k_r]. Then, jointly sample the following from _r(n_r, α): 
		
			
  * The uniform random permutations , of [b_r];
			
  * Bob's part of all the k_r^2 - k_r many off-diagonal sub-instances 
			
    = (r-1_i,j : b_r ·α < (i) ≠(j) ≤ b_r);

			
  * Alice's part of -1 many special sub-instances _<  = (_k : 1 ≤ k < );
			
  * Bob's part of k_r- many special sub-instances _>  = (_k :  < k ≤ k_r).
		
		Let , ∈ [b_r] be such that (i) = (j) = b_r ·α +, which both players can compute since ,, are sampled using public randomness.
		
  * Bob takes on the role of player X and sets [,] =. 
		Bob privately samples  from _r(n_r,α) conditioned on all the random variables from step <ref> and [,], i.e., the remainder of X's input r.
		
  * Alice takes on the role of player Y and sets [,] =. 
		Alice privately samples  from _r(n_r, α) conditioned on all the variables from step <ref> and [,], i.e., the remainder of player Y's input r.
		
  * The players X (= Bob) and Y (= Alice) simulate a run of protocol _r in r rounds using their respective inputs r = and r = (,,) and starting with player X.
		
  * At the end of the protocol, the player that receives the final message gets the uniform random search sequence (r-1, r-2, …, 0) and then returns the answer of _r on the search sequence (, r-1, r-2, …, 0).
	




	In protocol 1_r, (r, r) in the simulation of _r is sampled from _r(n_r, α) and (, r-1, r-2, …, 0) is a uniform random search sequence. 



	The input to the simulation of _r is (r, r) where r = and r = (, , ).
	All variables of the input are jointly sampled from _r(n_r, α) except for Alice and Bob's embedded instance (, ) ∼_r-1(n_r-1, α) where [, ] = and [,] =.
	
	Since the instance of _r-1 corresponding to ([, ], [,]) is independent of all other variables in the distribution _r(n_r, α), all other variables are jointly distributed according to _r(n_r, α).
	It remains to show that ([, ], [,]) distributed according to _r-1(n_r-1,α), which is required in _r(n_r, α).
	This is immediate from the embedding as ([, ], [,]) = (, ) ∼_r-1(n_r-1, α)

	Each search index in (r-1, r-2, …, 0) is uniformly sampled. Then, since ∈ [k_r] is also uniformly sampled, we have (, r-1, r-2, …, 0) is a random search sequence as required.	


With this observation, we have that Alice and Bob have successfully simulated _r for _r(n_r, α) on the correct distribution, as the search sequence (, r-1, r-2, …, 0) is uniformly random and the players' inputs are distributed according to _r(n_r, α).
Since the messages communicated by the players are exactly the messages of the simulated protocol _r, the communication cost of 1_r is the same as _r. Although the communication cost is large, we now show that its internal information cost (about input (, )) is smaller by a multiplicative k_r factor.




  
Notation.
We use , to denote the random variables corresponding to the input instance of _r-1 given to Alice and Bob, which are distributed according to _r-1. We use  to denote the random variable corresponding to the set of messages sent by both Alice and Bob. For i ∈ [r], _i denotes the message sent in round i and _i denotes the random variable corresponding to _i. 
We use , , , , to denote the random variables corresponding to ,, ,  = (_1, _2, …, _k_r), = (_1, …, _k_r), respectively. 


The following claim proves that information cost of 1_r about its input sampled from _r-1 is 1/k_r times smaller than the information cost of _r about its own input sampled from _r. 


	In protocol 1_r, we have that
	
    1_r_r-1(n_r-1, α)≤1/k_r·_r_r(n, α).




	
	By the definition of internal information cost (<Ref>),
	
    1_r_r-1(n_r-1, α)   = |, , , , _>, _<_public randomness of 1_r, 
       + |, , , , _>, _<_public randomness 1_r, .

Each mutual information term corresponds to the amount of information communicated by each player about their input, and we bound them separately.

For Alice's mutual information term in <Ref>, we have that

    |, , , , _>, _<, 
       = 1/k_r·∑_k ∈ [k_r]|, , ,  = k, _> k, _<k, by the definition of conditional mutual information and the uniform distribution of 
       = 1/k_r·∑_k ∈ [k_r]_k|, , ,  = k, _≥ k, _<kas = _k,  = _k in protocol 1_r when = k
       = 1/k_r·∑_k ∈ [k_r]_k|, , , _≥ k, _<k;

 the last part holds because the joint distribution of (_≤ k,_≥ k, , , , ) is independent of the value of . 
In particular, if we sample any input (r, r) from _r(n, α) (which does not include = r), the values of , , , _≤ k, _≥ k are fixed and the value of  is also fixed as _r is deterministic. Hence, the distribution of  remains uniform over [k_r] irrespective of the instance (r, r).

Continuing the bounding of Alice's mutual information term, we have that

    1/k_r·∑_k ∈ [k_r]_k|, , , _≥ k, _<k
       ≤1/k_r·∑_k ∈ [k_r]_k|, , , , _<kby <Ref> as _<k⊥_k |, , , _<k
    	by the definition of distribution _r
       = 1/k_r·|, , , by the chain rule of mutual information, chain-rule
       ≤1/k_r·|, , , , by <Ref>, as ⊥|, , , by
    	the definition of distribution _r
       = 1/k_r·, |, , , , as  is fixed
       ≤1/k_r·, , , , |, , by the chain rule (chain-rule) and non-negativity of mutual information (info-zero)
       = 1/k_r·r|rrecall that input of Y (resp. X) simulated by Alice (resp. Bob) in 1_r is r (resp. r).


For Bob's mutual information term in <Ref>, following a similar argument, we have

    |, , , , _>, _<, 
       = 1/k_r·∑_k ∈ [k_r]_k|, , ,  = k, _>k, _≤ kby definition of conditional mutual information and , and the uniform distribution of 
       = 1/k_r·∑_k ∈ [k_r]_k|, , , _>k, _≤ kas in the previous case for Alice, for any k ∈ [k_r], ( = k) ⊥ (_≥ k, _≤ k, , ,)
       ≤1/k_r·∑_k ∈ [k_r]_k|, , , _>k, by <Ref>, as _>k⊥_k |,,,_> k by the definition of distribution _r
       = 1/k_r·|, , , by chain rule of mutual information, chain-rule
       ≤1/k_r·|, , , , by <Ref>, as ⊥|, , , by the definition of distribution _r
       ≤1/k_r·, , |, , , , by the chain rule (chain-rule) and non-negativity of mutual information (info-zero)
       = 1/k_r·r|rrecall that input of X (resp. Y) simulated by Bob (resp. Alice) in 1_r is r (resp. r).


With both these bounds, we can upper bound the LHS of <Ref> and obtain

    1_r_r-1   ≤1/k_r·( r|r + r|r) 
       = 1/k_r·_r_r,

where the last step follows since the messages communicated in 1_r are exactly the messages communicated in the simulation of _r and since (r, r) ∼_r in 1_r by <Ref>. 


We now obtain the following main lemma of this step of the argument:

	Protocol 1_r is an r-round protocol for _r-1(n_r-1, α) where Bob speaks first with communication cost at most s, probability of success at least δ, and internal information cost at most s/k_r when the input is sampled from _r-1(n_r-1, α).



	In protocol 1_r, the instance (r, r) used to simulate _r is constructed without any communication, so the total number of bits communicated in 1_r is at most the total number of bits communicated in _r, which is _r≤ s as in the statement of <Ref>. 
	Bob takes on the role of X in the simulation and thus Bob speaks first.

	By construction, protocol 1_r outputs the same answer as _r since the solution to (r, r) ∼_r on search sequence (, r-1, r-2, …, 0) is the same as the solution to the input (_, _) = (, ) ∼_r-1 on the search sequence (r-1, r-2, …, 0). Therefore, 1_r succeeds with probability at least δ. 
	Finally, the bound on the internal information cost of 1_r follows from <Ref> and the fact that the communication cost of _r, namely, s, is an upper bound of its internal information cost.




  §.§.§ Step <ref>: A Low Communication Cost Protocol via Message Compression


In this step, we compress the communication cost of 1_r using standard message compression techniques. As a direct corollary of <Ref>, we get the following:


	For any 0 < <1, there exists an r-round protocol 2_r for _r-1(n_r-1,α) where Bob speaks first with 
	
    2_r≤· (r/) ·s/k_r +  r.

	and probability of success at least δ - when the input is sampled from _r-1(n_r-1,α).



	We use <Ref> on protocol 1_r to get protocol 2_r such that the simulation fails with probability at most . Then, we have that
	
    2_r   ≤·r/·1_r_r-1 + r^2/≤· (r/) ·s/k_r +  r. by <Ref>

The simulation of 1_r using compressed messages fails with probability at most , so 2_r succeeds with probability at least δ-, as desired. 


Since this step only compresses the messages sent in 1_r, protocol 2_r is constructed in the same way as 1_r with an additional message compression step that uses an independent source of public randomness. 
In particular, 2_r is a simulation of _r on an instance of _r sampled from _r, but with communication cost smaller by a ≃ k_r multiplicative factor and with a slightly smaller probability of success.



  §.§.§ Step <ref>: An (r-1)-Round Protocol via Guessing the First Message


In this final and the most important step, we take the r-round protocol 2_r for _r-1 where Bob communicates first and we eliminate the first message by making the players guess it using public randomness, thus beginning the protocol from the second round. 
Therefore, we obtain an (r-1)-round protocol _r-1 for _r-1 where Alice communicates first as required.
This alters the joint distribution of the input and thus affects the guarantees of the protocol (as in <Ref>), but we will show that the effect is small.




	

	An (r-1)-round protocol _r-1 for _r-1 on inputs (r-1,r-1) ∼_r-1(n_r-1, α) where (r-1, r-2, …, 1) is the given uniform random search sequence: 
	
		
  * Using public randomness, jointly sample the first message _1 and the search index  from the protocol 2_r. Then, jointly sample the following from _r(n_r, α) conditioned on _1,:
		
			
  * The uniform random permutations , of [b_r];
			
  * Bob's part of all the k_r^2 - k_r many off-diagonal sub-instances 
			
    = (r-1_i,j : b_r ·α < (i) ≠(j) ≤ b_r);

			
  * Alice's part of the -1 many special sub-instances _<  = (_k : 1 ≤ k < );
			
  * Bob's part of the k_r- many special sub-instances _>  = (_k :  < k ≤ k_r).
		
		Let , ∈ [b_r] be such that (i) = (j) = b_r ·α +, which both players can compute since ,, are sampled using public randomness.

		
  * Bob takes on the role of player X and sets [,] =. 
		Bob privately samples  from _r(n_r,α) conditioned on all the random variables from step <ref> and [,], i.e., the remainder of X's input r.
		
  * Alice takes on the role of player Y and sets [,] =. 
		Alice privately samples  from _r(n_r, α) conditioned on all the variables from step <ref> and [,], i.e., the remainder of player Y's input r.
		
  * The players X (= Bob) and Y (= Alice) simulate protocol 2_r using their respective inputs r = , r = (,,) and the search sequence (, r-1, r-2, …, 1).
		They use _1 as a guess of the first message sent from X to Y and thus only simulate r-1 rounds of 2_r starting with the second round, i.e., player Y communicates first.
	


Observe that, similar to the construction of 2_r (which is identical to 1_r, except for the message compression), protocol _r-1 embeds the input for _r-1 sampled from _r-1 into a simulated instance (r, r) of _r.
Then, the players simulate a run of 2_r using (r, r) where, to remove the first round of communication, the first message is guessed using public randomness.
However, due to the random guessing of the first message, the simulated instance is no longer distributed according to _r(n_r, α) (recall <Ref>), i.e., the guarantees of 2_r do not hold for _r-1. 
Despite this, we show that the simulated instance and first message are statistically close  to being distributed as they are in 2_r and thus similar guarantees hold.

Let  denote the joint distribution of (r, r, _1, ) as it is in _r-1 and let  denote the joint distribution of (r, r, _1, ) as it is in 2_r.

Let 

    := (_1, , , , , _>, _<)

denote the public randomness used in step <ref> of _r-1. 
We show in <Ref> that the distributions  and  only differ in the way that the input (, ) = (_, _) is sampled.

 
	We have that
	
    = ×   _, _   ×, _> |, _×, _<|, _, 
       = ×_, _|×, _> |, _×, _<|, _.


	

	We first consider (r, r, _1, ) directly as it is sampled in _r-1.
	The random variable  in _r-1 is jointly sampled in step <ref>.
	Then, Alice and Bob embed (, ) ∼_r-1 as _ = and _ =, i.e., (_, _) ∼_r-1, which is not conditioned on .
	Finally, Bob and Alice privately sample the remainder of  and  (and thus the remainder of r and r), respectively, which is only conditioned on  and their respective embedded inputs. This defines .

	We then obtain  from  by including all previously sampled random variables in the conditioning of the subsequently sampled random variables. That is, we obtain
	
    = 
       ×_, _|
       ×, _> |, _, _
       ×, _<|, _, , _≥.

	It is easy to verify that this is exactly the distribution of (r, r, _1, ) as it is in 2_r.

	Finally, we simplify the third and fourth terms in  to show that they are identical to the corresponding terms in , which follows directly from the claims that 
	
    (, _>) ⊥_|, _  and  _<, ⊥, _≥|, _,

	respectively. 
	To prove these claims, it is sufficient to bound the corresponding mutual information terms as follows:
	
    , _>_|, _
       ≤, _>_≤, |, _by the chain rule (chain-rule) and non-negativity of mutual information (info-zero)
       =  , _>_≤, |_1, , , , , _>, _≤by the definition of 
       ≤, _>_≤, , _1 |, , , , _>, _≤by the chain rule (chain-rule) and non-negativity of mutual information (info-zero)
       = , _>_≤, |, , , , _>, _≤as _1 is fixed by , ,
       = 0, by info-zero and construction of distribution _r

	and
	
    _<, , _≥|, _
       ≤_<, , _1, _≥|, , , , _≥, _≤by the chain rule (chain-rule) and non-negativity of mutual information (info-zero)
       = _<, , _≥|, , , , _≥, _≤as _1 is fixed by , ,
       = 0 by info-zero and construction of distribution _r.

	This completes the proof.


We note here that the simulated instance (r, r) in  is sampled according to _r(n_r, α) (recall <Ref>). 
However, this is not true in  since (, ) = (_, _) is sampled according to =_r-1 instead of _r |.
Thus, to bound the total variation distance between  and , we show that the information revealed by the random variable 


about the input (, ) in 2_r, i.e., under distribution , is not too large.
We need an independence claim (<Ref>) and then a crucial bound on the information carried by the first message (<Ref>).


	
    _<⊥_|_1, , , , , _>, _<.



	Again, we bound the mutual information between the terms. Let  represent the independent source of public randomness used in the message compression in step <ref>. Then,

    _<_|_1, , , , , _>, _<
       ≤_<_, _1 |, , , , _>, _<moving _1 by chain rule in chain-rule, and non-negativity of mutual information info-zero
       ≤_<_, , |, , , , _>, _<by data processing inequality in data-processing, _1 is fixed by , , ,
       = _<_, |, , , , _>, _<since  is an entirely independent source of randomness
       ≤ 0. by info-zero and construction of _r



The following claim is the heart of the entire proof. 


	For any k ∈ [k_r], 
	
    _k_1 |, , , _<k, _>k≤s/b_r^2 ·α^2.




	Let , be the inverse of ,, and let , denote the random variables corresponding to , respectively.
	For ease of exposition, we represent any permutation ρ on [b_r] as an ordered set S := {ρ(ℓ) : ℓ∈ [b_r] } with the ordering that ρ(ℓ) < ρ(ℓ') for ℓ < ℓ'.
	Using this representation, we allow for partial definitions of permutations, i.e., ordered subsets T ⊂ S.
	In particular, we  require the following partial definitions of  and :
	
		
  * Let  be an ordered set 
    = (ℓ) | b_r ·α  <ℓ≤ b_r, ℓ≠ b_r·α +k

		of size b_r · (1-α) -1, which is the set of rows that corresponds to  except for the row corresponding to _k. Let  denote its random variable.
		
  * Let  be an ordered set 
		
    =  (ℓ) | b_r ·α  <ℓ≤ b_r, ℓ≠ b_r·α +k

		of size b_r · (1-α) -1, which is the set of columns that corresponds to  except for the column corresponding to _k. Let  denote its random variable.  
	
	We give an illustration of these definitions in <Ref>.

	

	This now allows us to write the indices i,j ∈ [b_r] of the instances corresponding to  and  using , , ,:
	
		
  * For any ℓ∈ [k_r], _ℓ is the same as the random variable _(b_r·α + ℓ), (b_r ·α + ℓ)
		where we omit the superscript r-1 as it is clear from context; 
		
  * , _<k, _>k is the union of combinatorial rectangles formed by 
		
    (×),    (×(b_r·α +k)),     ((b_r ·α + k)×).

	
	Finally, let  be defined as, 
	
    := (, _<k, _>k).

	With these at hand, we can start bounding the mutual information term in the claim. Firstly, it is easy to see that,

    _k_1 |, , , _<k, _>k = _k_1 |, , ,

by definition of . 

We need the following intermediate claim for our proof. 

    _k, _1, |,  = _k, _1, |, ,  (b_r ·α + k), (b_r ·α + k).



	Let ([b_r ·α]) and ([b_r ·α]) denote the random variables (i) and (i) for all i ∈ [b_r ·α] respectively. 
We know that random variable  is fixed by , as they are inverses of each other. Random variable  is in turn fixed by all the values each element of [b_r] is mapped to, i.e., (i) for i ∈ [b_r]. 

Hence, it is sufficient to argue that,

    (_k, _1, ) ⊥([b_r ·α]), ([b_r ·α])  |, , (b_r ·α +k), (b_r ·α + k),

to prove the claim. 
We know that _k, is the random variable corresponding to the instances in r inside the combinatorial rectangle 

    (∪{(b_r ·α +k)}) × (∪{(b_r ·α +k)}).

The entirety of this rectangle is fixed by the conditioning. 

Proving the claim amounts to proving that the joint distribution of r-1_i,j for a fixed set of positions of r (the ones inside the rectangle fixed by conditioning), and the transcript _1 is independent of the permutation of the rest of the positions of r. This is true because X, who sends  _1, does not have access to either of the permutations  or  (held by Y).clm:ind-rest-of-sigma



We can continue to bound the mutual information now. 

    _k_1 |, , 
       =  _k_1 |, , , (b_r ·α + k), (b_r·α + k)by <Ref>
       = _(,) 
    ∼ ( , )_k_1 |,  = ,  = , (b_r ·α + k), (b_r·α + k)by  definition of conditional mutual information
       (1)1/b_r^2 ·α^2_(,) 
    ∼ ( , )∑_i ∈ [b_r] ∖, 
     j ∈ [b_r] ∖_i,j_1 |, , , (b_r ·α + k) = i, (b_r·α + k) = j
       (2)1/b_r^2 ·α^2_(,) 
    ∼ ( , )∑_i ∈ [b_r] ∖, j ∈ [b_r] ∖_i,j_1 |,  = ,  = 
       (3)1/b_r^2 ·α^2∑_i ∈ [b_r] ∖, j ∈ [b_r] ∖_i,j_1 |, ,

where 
(1) holds by the definition of conditional mutual information since, conditioned on any = and =, the values of (b_r ·α + k) and (b_r ·α + k) are uniformly chosen from [b_r]\ and [b_r]\ (each of size b_r ·α + 1), respectively; 
(2) holds because, conditioned on any choice of = and =,  the event (b_r·α + k) = j, (b_r ·α + k) = i is independent of (_i,j, _1, ); and 
(3) holds by the linearity of expectation and the definition of conditional mutual information.


We re-index both the sets [b_r] ∖ and [b_r] ∖ as [b_r ·α + 1] for ease of exposition just for this final part of the proof. 
We know that _i,j for any i, j ∈ [b_r] are sampled independently of each other in distribution _r.
Hence, using <Ref>, we have that 

    1/b_r^2 ·α^2∑_i ∈ [b_r] ∖, j ∈ [b_r] ∖_i,j_1 |, , 
       ≤1/b_r^2 ·α^2∑_i ∈ [b_r ·α + 1], j ∈ [b_r ·α + 1] _i,j_1 |_i, >j, _>i,  , , 
       = 1/b_r^2 ·α^2·_1,1, …, _1, b_r·α + 1,_2,1, …, _b_r·α+1, b_r·α+1_1 |, , by chain rule of mutual information, chain-rule
       ≤1/b_r^2 ·α^2·r_1 |, , by the chain rule (chain-rule) and non-negativity of mutual information (info-zero)
       ≤s/b_r^2 ·α^2. as r_1 |, , ≤_1≤ s by uniform

This proves the claim.


We now use these claims to show that the information revealed by random variable  about the input (, ) is not too large in .


    _, _≤s/ b_r^2 ·α^2.




	First, by chain rule of mutual information (chain-rule), we have that
	
    _, _   = _ + _|_.

We can prove that the second term is zero as follows: Let  represent the independent source of public randomness used in the message compression in step <ref>. Then,  

    _|_
       = __1, , , , , _>, _<|_by expanding 
       = _, , , , _>, _<|_ + __1 |_, , , , , _>, _<by  chain rule in chain-rule
       = 0 + __1 |_, , , , , _>, _<. by info-zero and construction of _r
       ≤_, _<, |_, , , , , _>, _<. by data processing inequality data-processing as _1 is fixed by , , ,
       = _, _<|_, , , , , _>, _<. since  is an entirely independent source of randomness
       = 0 by info-zero and construction of _r.

Therefore, an upper bound on _ is an upper bound on _, _. We have, 

    _
       ≤_,_<by the chain rule (chain-rule) and non-negativity of mutual information (info-zero)
       = __1, , , , , _>, _<,_<by expanding 
       = _, , , , _>, _<,_<
        + __1 |, , , , _>, _<,_<by  chain rule in chain-rule
       = 0 + __1 |, , , , _>, _<,_<by info-zero and construction of _r
       ≤__1 |, , , , _>,_<removing _< in the conditioning by <Ref> and <Ref>
       = 1/k_r·∑_k ∈ [k_r]_k_1 |, , , =k, _>k, _<kby the definition of conditional mutual information
       = 1/k_r·∑_k ∈ [k_r]_k_1 |, , , _>k, _<kas event = k is independent of (, , _1, , ) (see proof of <Ref>)
       ≤s/b_r^2 ·α^2,

by applying <Ref> to bound each term, completing the proof. 


We are now ready to show that  and  are statistically close. 

	
    ≤√(s/2 · b_r^2 ·α^2).




Firstly, we use weak chain rule over total variation distance (<Ref>) using the definitions of distributions  and  established in <Ref> to obtain

    ≤_R ∼_, _| = R_, _
       ≤_R ∼√(1/2·_, _|=R_, _)by Pinsker's inequality in <Ref>
       ≤1/√(2)·√(_R ∼_, _|=R_, _)by Jensen's inequality as the function √(·) is concave
       = 1/√(2)·√(_, _)by the relation between mutual information and KL-divergence in <Ref>
       ≤√(s/2 · b_r^2 ·α^2)by <Ref>,

proving the lemma.


Finally, we complete the proof of the main round-elimination argument.


	By construction, we know that the total communication of protocol _r-1 is upper bounded by the communication of protocol 2_r (since the messages of the former are a subset of the ones for the latter). 
	Using <Ref>, we get that the communication of _r-1 is at most 
	
    _r-1≤· (r/) ·s/k_r + r.

	Furthermore, by construction, protocol _r-1 is an (r-1)-round protocol where Alice communicates first.
	
	We know, again from <Ref>, that the probability of success of 2_r is at least δ - when the simulated input (r, r) is sampled from _r, i.e., the random variables follow distribution . 
	However, in _r-1, due to the fact that we sample the first round message at random, the simulated input is only statistically close to being sampled from _r, i.e., the random variables follow distribution .
	Therefore, the probability of success of _r-1, using <Ref>, is bounded as follows:
	
    _r-1   ≥2_r  succeeds on input  - 
       ≥δ- -√(s/2· b_r^2 ·α^2).


Lastly, to get a deterministic protocol out of _r-1, we use an averaging argument and fix the random bits of _r-1 so that we have the same performance guarantee over the input distribution _r-1(n_r-1, α). This 
gives us the desired (r-1)-round deterministic protocol for _r-1(n_r, α) when the players' inputs are sampled from _r-1(n_r-1, α), and the search sequence is uniformly random. 










 §.§ Reduction to Bipartite Matching in Dynamic Streams
 
In this section, we prove the connection between maximum bipartite matching in the dynamic streaming model and the Augmented Hidden Matrices (_r) problem, which is presented as <Ref>.
We repeat this lemma for the convenience of the reader here. 

[<Ref>]
		For any sufficiently large n_r ∈, integers p,s ≥ 1, and number ≥ 1, let  by any p-pass s-space
		dynamic streaming algorithm that computes a -approximate maximum matching on a (4n_r)-vertex bipartite graphs with probability of success at least 1-1/(n).
		Then, for r = 2p-1 and α = 1/(4 ·· r), there exists an r-round protocol  for _r(n_r, α) with 
		probability of success 
		
    ≥1/2·(1 + 1/3)

		and
		communication cost 
		
    ≤ r · s + O(r · n_r log(n_r)).

	
	

The key to proving <Ref> is to construct a bipartite graph G = (L ∪ R, \), which is defined by edge insertions  and deletions , 
from any input instance for _r with the following property. An O(1)-approximate maximum bipartite matching in G can be used to solve _r on the
search sequence with a non-trivial advantage over randomly guessing the answer.






  §.§.§ The Bipartite Graph Construction using _r


Let us first recall the important aspects of _r. 
It is defined recursively using b_r^2 many _r-1 sub-instances, which are denoted (r-1_i,j, r-1_i,j) for i,j ∈ [b_r] (see <Ref> in <Ref>).
An instance of _r identifies k_r many special sub-instances (,). 
Each of these has its own k_r-1 many special (sub-)sub-instances and, continuing this, ultimately corresponds to the k_r · k_r-1·…· k_1 many special base instances, where each one corresponds to a single bit as they are instances of _0. 
Then, given the uniform random search sequence, which is provided at the end of a protocol, solving _r requires solving a uniform random special base instance.

We begin by showing how the base instances (or bits) are represented in our graph.
We will use the following basic bipartite graph construction on four vertices, called a bit graph, to encode bits in our construction of G. 



[Bit Graph]
	Given a bit x ∈{0,1 } and a graph G = (L ∪ R, E) with L = {ℓ_1, ℓ_2} and R = {r_1, r_2}, graph G is said to be the bit graph of x if
	
		
  * E = {(ℓ^1, r^1), (ℓ^2, r^2)} when x = 0, and E = {(ℓ^1, r^2), (ℓ^2, r^1)} when x = 1.
	
	The bit x can be identified by either of the edges in E. See <Ref> for an illustration.








With that, given an instance (r, r) of _r(n_r, α), we give the following recursive procedure that separately encodes r and r as the edges of a bipartite graph on the vertex sets L and R, where,


    L = {t1, t2| t ∈ [n_r]}    and     R = {t1, t2| t ∈ [n_r]}.

For ease of notation, we let 

    L[i] = t1, t2| (i-1) · n_r-1 < t ≤ i · n_r-1⊆ L

 for i ∈ [b_r], and we let R[j] ⊆ R for j ∈ [b_r] be defined similarly. 
The edges we add corresponding to the sub-instance (r-1_i,j, r-1_i,j) will be only across vertices in L[i] and R[j]. 

We also use (t) and (t) to denote the t × t matrix of all ones and all zeroes, respectively.
The construction of the graph is as follows. 



	

	(r, Z, L, R) where Z ∈{r, r, (n_r), (n_r) } with L = R = 2n_r:
	
		
  * For 𝐫=0. 
		
			
  * When Z ∈{0,1}, return the edges of the bit graph corresponding to Z.
			
  * When Z  = ∅, return the empty set of edges.
		
		
  * For 𝐫 ≥ 1. 
		
			
  * When Z ∈{(n_r), (n_r)}, return the edges 
    ⋃_i,j ∈ [b_r](r-1, Z', L[i], R[j])

			where Z' is the n_r-1× n_r-1 matrix with all its entries the same as the entries in Z.
			
  * When Z = r, return the edges 
    ⋃_i,j ∈ [b_r](r-1, r-1_i,j, L[i], R[j]).

			
  * When Z = r, return the edges[This procedure ignores = (r-1_i,j : b_r ·α < (i) ≠(j) ≤ b_r).]
			
    (⋃_i,j ∈ [b_r] 
     b_r ·α <(i) ≠(j) ≤ b_r(r-1, r-1_i,j, L[i], R[j])) 
       ∪(⋃_i,j ∈ [b_r] 
     b_r ·α <(i) = (j) ≤ b_r(r-1, r-1_i,j, L[i], R[j])).

			If r is even, in addition to the above, return the edges
			
    ⋃_i,j ∈ [b_r] 
    (i) ≤ b_r·α or (j) ≤ b_r·α((0, (n_r-1), L[i], R[j]) ∪(0, (n_r-1), L[i], R[j]) ).

		
	
See <Ref> for an illustration.




Note that this procedure does not yet define the graph G. However, it allows Alice and Bob to construct edges (insertions or deletions) from their respective inputs, which we now show can be done without any communication.



	For any r ≥ 0, given an instance (r, r) of _r(n_r, α), Alice and Bob can compute (r, r, L, R) and (r, r, L, R), respectively, without any communication.


 

	The proof of the claim is by induction on r where the base case when r = 0 is trivial, i.e., both (0, 0, L, R) and (0, 0, L, R) can be constructed without communication.
	
	For any r ≥ 1, the player holding r has access to all r-1_i,j for i, j ∈ [b_r]. Thus, the player can construct the required set of edges (r-1, r-1_i,j, L[i], R[j]) for all i,j ∈ [b_r] without any communication by the induction hypothesis. 
	The player holding r has access to permutations , and the following:
	
		
  * r-1_i,j for b_r ·α <(i) ≠(j) ≤ b_r and thus the player can construct construct the required 
		
    (r-1, r-1_i,j, L[i], R[j])

		without any communication by the induction hypothesis; and
		
  * r-1_i,j when b_r ·α <(i) = (j) ≤ b_r and thus the player can construct 
		
    (r-1, r-1_i,j, L[i], R[j])

		 without any communication, again, by the induction hypothesis.
	
Additionally, when r is even, this player constructs 

    (r-1, (n_r-1), L[i], R[j])  and  (r-1, (n_r-1), L[i], R[j])

 when (i) ≤ b_r ·α or (j) ≤ b_r ·α, which is trivial and does not need any communication since it only requires the knowledge of ,.




Using the above recursive definition, we obtain the main procedure for constructing a bipartite graph G  from any instance (r, r) of _r(n_r, α).

One player will be solely responsible for adding edges to G, and the other player only deletes edges from G. The particular roles of Alice and Bob depends on the parity of r. 






(r, r) for instance (r, r) of _r(n_r, α):

	
  * When r is odd, Alice inserts the edges = (r, r, L, R) and Bob deletes the edges = (r, r, L, R);
	
  * When r is even, Bob inserts the edges = (r, r, L, R) and Alice deletes the edges = (r, r, L, R). 

Return graph G = (L ∪ R, \). See <Ref> for an illustration of G.




Now, let us show that the instances we create are indeed valid graphs. 

	For any r ≥ 0, the graph G = (L ∪ R, \) = (r, r) is a valid graph, namely, ⊆.



	
	By construction, the player that inserts the edges and the player that deletes the edges depends on the parity of r.
	When r is odd, = (r, r, L, R) and = (r, r, L, R), and when r is even, the roles are reversed.
	Hence, we prove the claim by induction on r where, when r is odd, 
    (r, r, L, R) ⊂(r, r, L, R),
, and when r is even, the  vice-versa holds. 
	
	When r = 0 (even case), there are no edge deletions since (0, 0, L, R) = ∅, so the claim vacuously holds. 
	When r ≥ 1, we consider the cases where r is odd and even separately.
	

    Odd r.

	We consider the following groupings of the edges separately:
	
		
  * When b_r ·α <(i) ≠(j) ≤ b_r, the edge set (r-1, r-1_i,j, L[i], R[j]) held by Bob is directly contained in the edges (r, r, L, R) held by Alice.
		
  * When b_r ·α <(i) = (j) ≤ b_r, Bob holds the edge set (r-1, r-1_i,j, L[i], R[j]) and Alice holds the edge set (r-1, r-1_i,j, L[i], R[j]).
		Immediately by the induction hypothesis, since r-1 is even, we have that (r-1, r-1_i,j, L[i], R[j]) ⊆(r-1, r-1_i,j, L[i], R[j]).
		
	

	

    Even r.
 
Here, we have three different cases:
	
		
  * When b_r ·α < (i) ≠(j) ≤ b_r, the edges (r-1, r-1_i,j, L[i], R[j]) held by Alice are directly contained in the edges (r, r, L, R) by Bob. 
		
  * When b_r ·α < (i) = (j) ≤ b_r, by the induction hypothesis as r-1 is odd, we have that (r-1, r-1_i,j, L[i], R[j]) ⊆(r-1, r-1_i,j, L[i], R[j]) and are thus contained in (r, r, L, R).
		
  * When (i) ≤ b_r ·α or (j) ≤ b_r ·α, the edges (r-1, r-1_i,j, L[i], R[j]) are trivially a subset of (r-1, (n_r-1), L[i], R[j]) ∪(r-1, (n_r-1), L[i], R[j]), which are all included in (r, r, L, R) since r is even.
	


Overall, we have that ⊆ for any choice of r ≥ 0 and thus G = (L ∪ R, \) = (r, r) is a valid graph.




With that, we have that the players can take an instance (r, r) of _r and construct a valid graph G = (L ∪ R, \) without any communication. In the next section, we will show some structural properties of G that relate it to (r, r).



  §.§.§ Properties of the Constructed Graph

We need some notation before we begin proving the desirable properties of our construction. 
We define the following sets of special vertices: For i, j ∈ [b_r],

    _k := L[i]  when (i) = b_r ·α  + k    and    _k := R[j]  when (j) = b_r ·α  + k

for all k ∈ [k_r], and

    := ⋃_k ∈ [k_r]_k     and     := ⋃_k ∈ [k_r]_k.

See <Ref> for an illustration of the special vertices.
In the following claim, we show that the special vertices do, in fact, correspond to the special sub-instances (, ) of (r, r).


	For r ≥ 1, the subgraph of G = ( r, r) induced by the vertices ∪ is exactly the vertex-disjoint union of graphs  ( _k, _k) for all k ∈ [k_r].


	We only prove the claim when r is odd, as the case when r is even follows similarly. 
	
	Observe first that the only possible edges between  and  are the edges between L[i] and R[j] corresponding to (r-1_i,j, r-1_i,j) for any i , j ∈ [b_r] with b_r ·α <(i), (j) ≤ b_r.
	Considering only these edges, we split our analysis into two cases:
	
		
  * When b_r ·α < (i) ≠(j) ≤ b_r, Alice adds the edges corresponding to r-1_i,j,
		
		which is exactly the set of edges deleted by Bob. 
		Hence, none of these edges are present in G. 
		
  * When (i) = (j) = b_r ·α + k for k ∈ [k_r], Alice adds the edges corresponding to r-1_i,j,
		
		whereas Bob deletes the edges corresponding to r-1_i,j.
		
		As r-1 is even, these edge insertions and deletions exactly correspond to ( r-1_i,j, r-1_i,j).
		
		
		
		
		
	It then follows that the subgraph of G induced by L[i] ∪ R[j] = _k ∪_k is an exact copy of ( _k, _k).
	
	
	Finally, for any k_1, k_2 ∈ [k_r], _k_1∪_k_1 is disjoint from _k_2∪_k_2. Hence, the subgraph induced by ∪ is a vertex-disjoint union of the graphs (_k, _k) for k ∈ [k_r], proving the claim.


To highlight another key structural property in our construction of G, recall from <Ref> that any instance (r, r) of _r defines k_r · k_r-1·…· k_1 many special base instances.
We identify these special base instances and their corresponding sets of special base vertices in L and R using the tuples in [k_r] × [k_r-1] ×…× [k_1]. Formally, we have the following notation:



  
Notation.
Any tuple s = (s_r, s_r-1, …, s_1) identifies the special sub-instance (_s_r, _s_r) of (r, r), then the special sub-instance (_s_r-1, _s_r-1) inside (_s_r, _s_r), and so on until finally pointing to a single special base instance (_s_1, _s_1).
We denote this special base instance as (_s, _s). 
Furthermore, we use (, ) to denote the collection of special base instances (_s, _s) for all s = (s_r, s_r-1, …, s_1) ∈ [k_r] × [k_r-1] ×…× [k_1].


Any tuple s = (s_r, s_r-1, …, s_1) also identifies the sets of vertices _s_r⊆ L and _s_r⊆ R, then the sets _s_r-1⊆_s_r and _s_r-1⊆_s_r, and so on until identifying the sets of special base vertices _s_1⊆_s_2 in L and _s_1⊆_s_2 in R.
We denote these two sets of special base vertices as _s and _s. We further define

    := ⋃_s ∈ [k_r] × [k_r-1] ×…× [k_1]_s     and     := ⋃_s ∈ [k_r] × [k_r-1] ×…× [k_1]_s.


With this notation, we can now show that the special base vertices ∪ correspond to the special base instances (, ) using <Ref>.


	For r ≥ 1, the subgraph of G = (r, r) induced by the vertices ∪ is exactly the vertex-disjoint union of the bit graphs ( _s, _s) for all s ∈ [k_r] × [k_r-1] ×…× [k_1]. 	


	We prove this by induction on r.
	
	Base case for 𝐫=1. 
	
	For every s_1 ∈ [k_1], we have the following directly from the above definitions:
	
    _s = _s_1, _s = _s_1, _s = _s_1, _s = _s_1.
 
	Therefore, = and =. Then, by <Ref>, we have that the subgraph induced by the vertices  and  is a vertex-disjoint union of graphs 
	
    (_s_1, _s_1) = (_s_1, _s_1)
 
	for all s_1 ∈ [k_1]. 
	Furthermore, for each s_1 ∈ [k_1], (_s_1, _s_1) is a bit graph since it corresponds to the special base instance (_s_1, _s_1), which is an instance of _0.

	Inductive step for 𝐫 ≥ 2.
	Let := G[∪] be the subgraph in the statement.
	It will also be useful for us to consider the subgraph := G[∪].
	Since ⊆ and ⊆, we have that,
	
    = G[∪] = [∪].


	Now, by <Ref>,  is a vertex-disjoint union of subgraphs 
	_s_r := (_s_r, _s_r) for s_r∈ [k_r].
	Therefore, we only need to show that, for each s_r∈ [k_r], the subgraph _s_r, when restricted to the vertices in ∪ is exactly a vertex-disjoint union of the bit graphs (_s, _s) for all s ∈{s_r}× [k_r-1] ×…× [k_1].

	Since the only vertices of ∪ that are in _s_r are exactly its special base vertices, what we want immediately follows from the induction hypothesis applied to _s_r for each s_r∈ [k_r].
	
	
	
	
	
	
	
	
	
	
	
	
	
	


We can also show that these graphs have perfect matchings. 


	For r ≥ 0 and any (r, r), the graph G = (r, r) contains a perfect matching, i.e., of size 2n_r.




	


	

	

	






	We prove this claim by induction on r where the base case when r= 0 is trivial, i.e., we have that (0, 0) is a single bit graph, which has a perfect matching by <Ref>.

	When r ≥ 1, let H = G[∪] be its subgraph induced on the special vertices. By <Ref> and the induction hypothesis, we immediately have that H contains a perfect matching. Hence, it remains to argue that there is a perfect matching in the subgraph 
	
    H' = G[L \∪ R \].


By definition of the special vertices, L \ corresponds to L[i] where (i) ≤ b_r ·α and, similarly, R \ corresponds to R[j] where (j) ≤ b_r ·α for i,j ∈ [b_r].
	Then, to show that there is a perfect matching in H', it is sufficient to argue that 
	
    G[L[i] ∪ R[j]]  for each  i,j ∈ [b_r]  where (i) = (j) ≤ b_r ·α
 
	has a perfect matching since these are vertex disjoint graphs that cover all of L \ and R \.
We consider the case when r is odd and even separately.

	

    Odd r.
 
	By construction, Alice adds edges corresponding to r-1_i,j. 
	In order to obtain (r-1_i,j, r-1_i,j), which has a perfect matching by the induction hypothesis, Bob would need to delete the edges corresponding to r-1_i,j since r-1 is even.
	Instead, Bob deletes no edges so G[L[i] ∪ R[j]] is a superset of (r-1_i,j, r-1_i,j), which implies that it also has a perfect matching.

	

    Even r.
 By construction, Alice deletes the edges corresponding to r-1_i,j. 
	In order to obtain (r-1_i,j, r-1_i,j), which has a perfect matching by the induction hypothesis, Bob would need to add the edges corresponding to r-1_i,j since r-1 is odd.
	Instead, Bob adds a superset of these edges since he adds all possible edges 
	
    ((r-1, (n_r-1), L[i], R[j]) ∪(r-1, (n_r-1), L[i], R[j])).
 
	Therefore, (r-1_i,j, r-1_i,j)  is a subgraph of G[L[i] ∪ R[j]] and has a perfect matching. 


Finally, using these key structural properties, we show that any graph G has a perfect matching and that any -approximate maximum matching in G includes many edges that correspond to the bit graphs of the special base instances.



	For r ≥ 1, any -approximate maximum matching M in G = (r, r) identifies the bits of at least 
	
    n_r · (1/ - 2α r)
 
	many special base instances in (r, r).


	By <Ref>, we know that the edges in H = G[∪] are able to identify the bits of the special base instance.
	Therefore, we first obtain a bound on the number of edges in M that must have both endpoints in ∪, i.e., the number of its edges in H.

	Observe that the number of edges in M that are not in H have at least one endpoint not in ∪, i.e., there are at most |(L ∪ R) \ (∪)| many such edges.
	Therefore, M has at least 
	
    |M| - |(L ∪ R) \ (∪)|

	edges in H.
	Then, by definition of the special base vertices ∪ and the choice of parameters in <Ref> and <Ref>, we have that 
	
    || = || = 2 · k_r · k_r-1·…· k_1 = 2 n_r · (1-α)^r

	and 
	
    |(L ∪ R) \ (∪)| = 4n_r - 4 n_r · (1-α)^r = 4n_r (1 - (1- α)^r).

	Now, by <Ref> and since M is a -approximation, we have that M is of size at least 2n_r/, which gives us the following bound:
	
    |M| - |(L ∪ R) \ (∪)|    ≥ 2n_r/ -  4n_r (1 - (1- α)^r) 
       = 4n_r(1/2 - 1 + (1 - α)^r).


	Finally, by <Ref>, the only edges in H are the edges of the vertex-disjoint union of the bit graphs (_s, _s) for s ∈ [k_r] × [k_r-1] ×…× [k_1]. 
	By <Ref>, each bit graph is a matching of exactly two edges, each of which can be used to identify the underlying bit of the special base instance. Therefore, in the worst case, every two edges of M in H identifies a single bit of a special base instance and thus at least 
	
    2n_r(1/2 - 1 + (1 - α)^r)    ≥ 2n_r (1/2 - 1 + 1 - α· r) by Bernoulli's inequality
        = n_r · (1/ - 2α· r)

	many such bits are identified by M.




  §.§.§ A Protocol for _r(n_r, α) using a Dynamic Streaming Algorithm


Using the above graph construction and its key properties, we can now construct a protocol  for any instance (r, r) of _r(n_r, α) that simulates a run of any p-pass s-space dynamic streaming algorithm  for -approximate maximum matching on the bipartite graph G = (r, r).


We then use this protocol to prove <Ref>.


	

	A protocol  for _r(n_r, α) on any input (r,r) using the p-pass s-space dynamic streaming algorithm  where r = 2p-1:
	
		
  * Alice computes the edge insertions E_A = (r, r, L, R) and then constructs an arbitrary ordering σ_A of the edges E_A.
		Similarly, Bob computes the edge deletions E_B = (r, r, L, R) and then constructs an arbitrary ordering σ_B of the edges E_B.
		
  * The players simulate each pass of  on the stream of insertions σ_A followed by deletions σ_B in the usual manner: To simulate a single pass, Alice runs  on the insertions in σ_A then sends the memory state to Bob, who continues  on the deletions  in σ_B and sends the memory state back to Alice. In only the final pass, Bob computes the output matching M of  instead of sending its memory state.

		
  * In parallel to the simulation, Alice and Bob also exchange messages to identify the labels of all the special base instances in (,), each of which is identified by a tuple (s_r, s_r-1, …, s_1) ∈ [k_r] × [k_r-1] ×…× [k_1] as follows. 
		
			
  * In the first round, Alice does not send anything. In the second round, Bob sends the two input permutations , of [b_r] along with the message to Alice, using which Alice can identify k_r many special sub-instances of _r. 
			
  * For any round 2 < t ≤ r, the player who receives the message of round t-1 identifies the k_r · k_r-1·…· k_r-t+3 many special instances of _r-t+2 (sub-instances of _r-t+3). In round t, this player sends 2 · k_r · k_r-1·…· k_r-t+3 many permutations of [b_r-t+2], corresponding to the two input permutations of each of these instances of _r-t+2. 
			
  * After receiving message of round r, Bob is able to identify the k_r · k_r-1·…· k_2 many special instances of _1. Bob already knows the two input permutations of [b_1] associated with all these special instances of _1, and thus knows the labels of all the special base instances.
		










		
  * At the end of the protocol, the final player receives a uniform random search sequence s^* = (r, r-1, …, 1). Then, using the information obtained in the previous step, the player identifies the special base instance (_s^*, _s^*) and corresponding special base vertices _s^* = {ℓ_1, ℓ_2} and _s^* = { r_1, r_2 }. 
		The player returns x_s^* as the output of the protocol, which is determined as follows:
		
			
  * If M contains the edge (ℓ_1, r_1) or (ℓ_2, r_2), x_s^* = 0;
			
  * If M contains the edge (ℓ_1, r_2) or (ℓ_2, r_1), x_s^* = 1;
			
  * Otherwise, x_s^* is a uniform random bit.
		
	
	




We now use this constructed protocol to prove the desired connection between maximum bipartite matching in the dynamic streaming model and the _r problem, 
thus proving <Ref>. 


	To prove this lemma, we show that  is an r-round protocol with 
	
    ≤ r · s + O(r^2 · n_r log n_r)   and  ≥ 1/2 + 1/6

	where, as in the statement of the lemma, r = 2p-1, α = 1/(4  r), and ≥ 1 is the approximation guarantee of the maximum matching returned by .

	First, we argue the number of rounds of communication required by each step separately: 
	
		
  * By <Ref>, Alice and Bob can compute their edges E_A and E_B without any communication. 
		
  * In the simulation of , each pass of the algorithm is simulated using two rounds of communication, one message from Alice and one message from Bob, except for the final pass, which only requires one round, i.e., one message from Alice. Since  has p passes, simulating it requires r = 2p -1 rounds of communication. 
		
  * Identifying the labels of the special base instances (which is only required at the end to output the solution) also requires r rounds of communication since, at the end of each round t ∈ [r], k_r · k_r-1·…· k_r-t+1 many special instances of _r-t are identifiable by the player that receives the message.
		
  * Returning the output of protocol  is solely computed from the output of  and the identified labels, which can be done without any further communication.
	
	Since the simulation of  and identifying the labels is done in parallel, protocol  is an r-round protocol.

	Next, we argue the communication cost of  by considering separately the only two steps that require communication.
	To simulate , the players only exchange the memory state of . Since this requires at most s bits for each of the r messages, the overall communication required in the simulation is at most r · s bits.
	
		Next, we give an upper bound on the communication required to communicate the labels. In round t for 2 ≤ t ≤ r, the player sends 2 · k_r · k_r-1·…· k_r-t+3 many permutations of [b_r-t+2]. 
	Using <Ref>, we can say, in total,
		
    2 · k_r · k_r-1·…· k_r-t+3· b_r-t+2·log (b_r-t+2)    ≤ 2· b_r · b_r-1·…· b_r-t+3· b_r-t+2·log(b_r-t+2) 
       =  O(n_r ·log (n_r))

		bits are sent. In r rounds, the total number of bits to find the labels of all special instances is O(r · n_r ·log (n_r)).
	Therefore, ≤ r · s + O(r · n_r log n_r).

	Finally, we argue the probability of success of . The goal for solving the instance (r, r) of _r(n_r, α) is to output the bit of the special base instance (_s^*, _s^*) where s^* = (r, r-1, …, 1) is the uniform random search sequence given to the final player, i.e., Bob since r = 2p-1 is odd, at the end of the protocol. 
	In protocol , the predictor x_s^* of the solution is obtained from the matching M returned by  or is a uniform random guess.

	When  succeeds, which occurs with 1-1/(n) probability, it is guaranteed to output a -approximate maximum matching M in the bipartite graph (r, r).
	By <Ref>, the edges of M identify the bits of at least n_r · (1/ - 2α r) many special base instances, which are n_r · (1- α)^r many in total by <Ref>.
	Since s^* uniformly selects one of the special base instances to correspond to the solution bit, M identifies it with probability at least 
	
    1/ - 2α r/(1- α)^r≥ 1/ - 2α r = 1/ - 1/2 = 1/2

	since α = 1/(4  r) ∈ (0,1).

	Thus, we have, 
	
		
  * When  succeeds and M correctly identifies the solution bit, the predictor x_s^* returned by  is correct (with probability 1);
		
  * When  succeeds but M does not identify the solution bit, the predictor x_s^* returned by  is a random guess and thus is correct with probability 1/2;
		
  * When  fails, there is no guarantee on the predictor bit, and we might as well assume the answer is wrong (with probability 1); 
	
	As such, we have that the protocol succeeds with probability at least 
	
    1-1/(n)·1/2· 1 + 1-1/2·1/2 + 1/(n)· 0 ≥1/2·1+1/3,

	since β is a constant. This concludes the proof. 



	In the construction of (r, r), when r is even, Alice deletes the edges before Bob adds them: for the corresponding streaming problem, this corresponds to deleting edges that have not been inserted (although the final stream
	still ensures that any edge that is deleted will be inserted); this is not consistent with the definition of dynamic graph streams. 
	Nevertheless, in our construction, we only use the _r lower bound when r = 2p-1 and thus is odd. Here, Alice adds edges to the graph, and Bob deletes the edges after all the edges are added. As a result, in the corresponding
	streaming problem, no edge is deleted before it is inserted, thus adhering to the restriction of the dynamic graph streams. 





halpha-abbrv








PART: 
*Appendix



§ BACKGROUND ON INFORMATION THEORY


We now briefly introduce some definitions and facts from information theory that are needed in this thesis. We refer the interested reader to the text by Cover and Thomas <cit.> for an excellent introduction to this field, 
and the proofs of the statements used in this Appendix. 

For a random variable , we use  to denote the support of  and  to denote its distribution. 
When it is clear from the context, we may abuse the notation and use  directly instead of , for example, write 
A ∼ to mean A ∼, i.e., A is sampled from the distribution of random variable . 



  * We denote the Shannon Entropy of a random variable  by
, which is defined as: 

    := ∑_A ∈ = A·log1/ = A
 


  * The conditional entropy of  conditioned on  is denoted by | and defined as:

    | := _B ∼| = B,

where 
| = B is defined in a standard way by using the distribution of  conditioned on the event = B in Eq (<ref>). 

 

  * The mutual information of two random variables  and  is denoted by
 and is defined:

    := A - A |  B = B - B |  A.



  * The conditional mutual information is defined as |:= | - |,.




 §.§ Useful Properties of Entropy and Mutual Information


We shall use the following basic properties of entropy and mutual information throughout. 
Proofs of these properties mostly follow from convexity of the entropy function
and Jensen's inequality and can be found in <cit.>. 


  Let , , , and  be four (possibly correlated) random variables.
   
  
  *  0 ≤≤log. The right equality holds
    iff  is uniform.
  
  *  |≥ 0. The equality holds iff  and
     are independent conditioned on .
  
  *  Conditioning on a random variable reduces entropy:
    |,≤|.  The equality holds iff ⊥|.



  
  *  Chain rule for mutual information: ,| = | + |,.
  
  *  Data processing inequality: for a function f() of , f()|≤|. 
   












We also use the following two standard propositions on effect of conditioning on mutual information.


  For random variables , , ,, if ⊥|, then, 
  
    |≤|,  .


 
  Since  and  are independent conditioned on , by
  cond-reduce, (|) = (|, ) and (|, ) ≥(|, , ).  We have,
	 
    |   = (|) - (|, ) = (|, ) - (|, ) 
       ≤(|, ) - (|, , ) = |, .

	



  For random variables , , ,, if ⊥|,, then, 
  
    |≥|, .


 
 Since ⊥|,, by cond-reduce, (|,) = (|,,). Moreover, since conditioning can only reduce the entropy (again by cond-reduce), 
  
    |   = (|) - (|,) ≥(|,) - (|,) 
       = (|,) - (|,,) = |,.


























 §.§ Measures of Distance Between Distributions


We use two main measures of distance (or divergence) between distributions, namely the Kullback-Leibler divergence (KL-divergence) and the total variation distance. 



  
KL-divergence. For two distributions μ and ν over the same probability space, the Kullback-Leibler (KL) divergence between μ and ν is denoted by μν and defined as: 

    μν:= _a ∼μlogμ(a)/ν(a).

We also have the following relation between mutual information and KL-divergence. 

	For random variables ,,, 
	
    | = _(B,C) ∼(,)|=B,=C|=C.
 























  
Total variation distance. We denote the total variation distance between two distributions μ and ν on the same 
support Ω by μν, defined as: 

    μν:= max_Ω' ⊆Ωμ(Ω')-ν(Ω') = 1/2·∑_x ∈Ωμ(x) - ν(x).

We use the following basic properties of total variation distance. 

	Suppose μ and ν are two distributions for , then, 
	μ() ≤ν() + μν.











We also have the following (chain-rule) bound on the total variation distance of joint variables.


	For any distributions μ and ν on n-tuples (X_1,…,X_n), 
	
    μν≤∑_i=1^n_X_<i∼μμ(X_i | X_<i)ν(X_i | X_<i).


































The following Pinsker's inequality bounds the total variation distance between two distributions based on their KL-divergence, 

[Pinsker's inequality]
	For any distributions μ and ν, 
	μν≤√(1/2·μν). 


































