Finding Cut-Offs in Leaderless Rendez-Vous Protocols is Easy

In rendez-vous protocols an arbitrarily large number of indistinguishable finite-state agents interact in pairs. The cut-off problem asks if there exists a number B such that all initial configurations of the protocol with at least B agents in a given initial state can reach a final configuration with all agents in a given final state. In a recent paper [17], Horn and Sangnier prove that the cut-off problem is equivalent to the Petri net reachability problem for protocols with a leader, and in for leaderless protocols. Further, for the special class of symmetric protocols they reduce these bounds to and , respectively. The problem of lowering these upper bounds or finding matching lower bounds is left open. We show that the cut-off problem is -complete for leaderless protocols, -complete for symmetric protocols with a leader, and in for leaderless symmetric protocols, thereby solving all the problems left open in [17].


Introduction
Distributed systems are often designed for an unbounded number of participating agents.Therefore, they are not just one system, but an infinite family of systems, one for each number of agents.Parameterized verification addresses the problem of checking that all systems in the family satisfy a given specification.
In many application areas, agents are indistinguishable.This is the case in computational biology, where cells or molecules have no identities; in some security applications, where the agents' identities should stay private; or in applications where the identities can be abstracted away, like certain classes of multithreaded programs [GS92, AAD + 06, SCWB08, BMWK09, KKW10, NB15].Following [BMWK09,KKW10], we use the term replicated systems for distributed systems with indistinguishable agents.Replicated systems include population protocols, broadcast protocols, threshold automata, and many other models [GS92, AAD + 06, EFM99, DSTZ12, GKS + 14].They also arise after applying a counter abstraction [PXZ02,BMWK09].In finite-state replicated systems the global state of the system is determined by the function (usually called a configuration) that assigns to each state the number of agents that currently occupy it.This feature makes many verification problems decidable [BJK + 15, Esp16].
Surprisingly, there is no a priori relation between the complexity of a parameterized verification question (i.e., whether a given property holds for all initial configurations, or, equivalently, whether its negation holds for some configuration), and the complexity of its corresponding single-instance question (whether the property holds for a fixed initial configuration).Consider replicated systems where agents interact in pairs [GS92, HS20, AAD + 06].The complexity of single-instance questions is very robust.Indeed, checking most properties, including all properties expressible in LTL and CTL, is PSPACE-complete [Esp96].On the contrary, the complexity of parameterized questions is very fragile, as exemplified by the following example.While the existence of a reachable configuration that populates a given state with at least one agent is in P, and so well below PSPACE, the existence of a reachable configuration that populates a given state with exactly one agent is as hard as the reachability problem for Petri nets, and so non-primitive recursive [Ler21,Las22,CO21].This fragility makes the analysis of parameterized questions very interesting, but also much harder.
Work on parameterized verification has concentrated on whether every initial configuration satisfies a given property (see e.g.[GS92, EFM99, BMWK09, KKW10, DSTZ12]).However, applications often lead to questions of the form "do all initial configurations in a given set satisfy the property?","do infinitely many initial configurations satisfy the property?",or "do all but finitely many initial configurations satisfy the property?".An example of the first kind is proving correctness of population protocols, where the specification requires that for a given partition I 0 , I 1 of the set of initial configurations, and a partition Q 0 , Q 1 of the set of states, runs starting from I 0 eventually trap all agents within Q 0 , and similarly for I 1 and Q 1 [EGLM17].An example of the third kind is the existence of cut-offs; cut-off properties state the existence of an initial configuration such that for all larger initial configurations some given property holds [EK02, BJK + 15].A systematic study of the complexity of these questions is still out of reach, but first results are appearing.In particular, Horn and Sangnier have recently studied the complexity of the cut-off problem for parameterized rendez-vous networks [HS20].The problem takes as input a network with one single initial state init and one single final state fin, and asks whether there exists a cut-off B such that for every number of agents n ≥ B, the final configuration in which all agents are in state fin is reachable from the initial configuration in which all agents are in state init.
Horn and Sangnier study two versions of the cut-off problem, for leaderless networks and networks with a leader.Intuitively, a leader is a distinguished agent with its own set of states.They show that in the presence of a leader the cut-off problem is decidable and at least as hard as reachability for Petri nets, which shows that the cut-off problem is Ackermann-hard and therefore not primitive recursive [Ler21,Las22,CO21].For the leaderless case, they show that the problem is in EXPSPACE.Further, they also consider the special case of Cut-off - [HS20] Asymmetric rendez-vous Symmetric rendez-vous Presence of a leader Decidable and Ackermann-hard PSPACE Absence of a leader EXPSPACE NP Cut-off -This paper Asymmetric rendez-vous Symmetric rendez-vous Presence of a leader NP-complete Absence of a leader P-complete NC Table 1: Summary of the results for the cut-off problem by [HS20] and this paper.
Bounded-loss -This paper Asymmetric rendez-vous Symmetric rendez-vous Absence of a leader P-complete NL-complete Table 2: Summary of the results for the bounded-loss cut-off problem symmetric networks, for which they obtain better upper bounds: PSPACE for the case of a leader, and NP in the leaderless case.These results are summarized at the top of Table 1.
In [HS20] the question of improving the upper bounds or finding matching lower bounds is left open.In this paper we close it with a surprising answer: All elementary upper bounds of [HS20] can be dramatically improved.In particular, our main result shows that the EXPSPACE bound for the leaderless case can be brought down to P. Further, the PSPACE and NP bounds of the symmetric case can be lowered to NP and NC, respectively, as shown at the bottom of Table 1.We also obtain matching lower bounds.Finally, we provide almost tight upper bounds for the size of the cut-off B; more precisely, we show that if B exists, then B ∈ 2 n O(1) for a protocol of size n.
Our results follow from two lemmas, called the Scaling and Insertion Lemmas, that connect the continuous semantics for Petri nets to their standard semantics.In the continuous semantics of Petri nets transition firings can be scaled by a positive rational factor; for example, a transition can fire with factor 1/3, taking "1/3 of a token" from its input places.The continuous semantics is a relaxation of the standard one, and its associated reachability problem is much simpler (polynomial [FH15,Blo20] instead of non-primitive recursive).The Scaling Lemma states that given two markings M, M ′ of a Petri net, if M ′ is reachable from M in the continuous semantics, then nM ′ is reachable from nM in the standard semantics for some n ∈ 2 m O(1) , where m is the total size of the net and the markings.This lemma is implicitly proved in [FH15], but the bound on the size of n is hidden in the details of the proof, and we make it explicit here.The Insertion Lemma states that, given four markings M, M ′ , L, L ′ , if M ′ is reachable from M in the continuous semantics and the marking equation L ′ = L + Ax has a solution x ∈ Z T (observe that x can have negative components), then nM ′ + L ′ is reachable from nM + L in the standard semantics for some n ∈ 2 m O(1) .We think that these lemmas can be of independent interest.
Further we also consider the following question which was proposed in [HS20] as a variant of the cut-off problem: Given a network with initial state init and final state fin, decide if there is a bound B such that for any number of agents, the initial configuration in which all agents are in the state init can reach a configuration in which at most B agents are not in the final state fin.We call this the bounded-loss cut-off problem.Intuitively, in the cut-off problem, we ask if for any sufficiently large population size, all agents can be transferred from the state init to the state fin.In the bounded-loss cut-off problem, we ask if it is always possible to "leave out" a bounded number of agents, and transfer everybody else from the state init to the state fin.By adapting the techniques developed for the cut-off problem, we prove that the bounded-loss cut-off problem is P-complete for leaderless networks and NL-complete for symmetric leaderless networks.
This paper is an extended version of the conference paper [BER21] published at FoSSaCS 2021.Compared to the conference version, this paper contains full proofs of our results.Moreover all the results pertaining to the bounded-loss cut-off problem are new.
The paper is organized as follows.Section 2 contains preliminaries; in particular, it defines the cut-off problem for rendez-vous networks and reduces it to the cut-off problem for Petri nets.Section 3 gives a polynomial time algorithm for the leaderless cut-off problem for acyclic Petri nets.Section 4 introduces the Scaling and Insertion Lemmas, and Section 5 presents the novel polynomial time algorithm for the cut-off problem for general Petri nets.Section 6 presents the polynomial time algorithm for the bounded-loss cut-off problem for rendez-vous protocols.Sections 7 and 8 present the results for symmetric networks, for the cases without and with a leader, respectively.

Preliminaries
Multisets.Let E be a finite set.For a semi-ring (S, +, •), a vector from E to S is a function v : E → S. The set of all vectors from E to S will be denoted by S E .Given a vector v ∈ S E and an element α ∈ S, we let α • v be the vector given by (α • v)(e) = α • v(e) for all e ∈ E. For the sake of brevity, whenever there is no confusion, we sometimes abbreviate α • v as αv.In this paper, the semi-rings we will be concerned with are the natural numbers (N, +, •), the integers (Z, +, •) and the non-negative rationals (Q ≥0 , +, •).The support of a vector v is the set v := {e : M (e) ̸ = 0} and its size is the number ∥v∥ = e∈ M abs(M (e)) where abs(x) denotes the absolute value of x.Vectors from E to N are also called discrete multisets (or just multisets) and vectors from E to Q ≥0 are called continuous multisets.
Given two vectors v, v ′ (over either N, Z or Q ≥0 ) we say that v ≤ v ′ if v(e) ≤ v ′ (e) for all e ∈ E and we let v + v ′ be the vector given by (v + v ′ )(e) = v(e) + v ′ (e) for all e ∈ E. Further, if v and v ′ are vectors over S where S ∈ {Z, Q ≥0 }, then we define v − v ′ as the vector given by (v − v ′ )(e) = v(e) − v ′ (e) for all e.On the other hand, if v and v ′ are multisets (i.e., vectors over N) such that v ′ ≤ v, then we define (v − v ′ )(e) = v(e) − v ′ (e) for all e.
Given an I × J matrix A with I and J sets of indices, I ′ ⊆ I and J ′ ⊆ J, we let A I ′ ×J ′ denote the restriction of A to rows indexed by I ′ and columns indexed by J ′ .
2.1.Rendez-vous Protocols and the Cut-off Problem.Let Σ be a fixed finite set which we will call the communication alphabet and we let RV (Σ) = {!a, ?a : a ∈ Σ}.The symbol !a denotes that the message a is sent and ?a denotes that the message a is received.
Definition 2.1.A rendez-vous protocol P is a tuple (Q, Σ, init, fin, R) where Q is a finite set of states, Σ is the communication alphabet consisting of a finite set of messages, init, fin ∈ Q are the initial and final states respectively and The size |P| of a protocol is defined as the number of bits needed to encode P using some standard encoding.A configuration C of P is a multiset of states, where C(q) should be interpreted as the number of agents in state q.We use C(P) to denote the set of all configurations of P.An initial (resp.final) configuration C is a configuration such that C(q) = 0 if q ̸ = init (resp.C(q) = 0 if q ̸ = fin).We use C n init (resp.C n fin ) to denote the initial (resp.final) configuration such that C n init (init) = n (resp.C n fin (fin) = n).The operational semantics of a rendez-vous protocol P is given by means of a transition system between the configurations of P. Suppose a is a message in Σ and r = (p, !a, p ′ ) and r ′ = (q, ?a, q ′ ) are two rules of R. For any two configurations C and C ′ , we say that Intuitively, the configuration C has agents at states p and q, and the agent at state p sends the message a and moves to p ′ and the agent at state q receives this message and moves to q ′ .We let C ⇒ C ′ denote that there exist rules r, r ′ for which C r,r ′ = = ⇒ C ′ and if this is the case, then we say that there is a transition from C to C ′ .As usual, * = ⇒ denotes the reflexive and transitive closure of ⇒.
The cut-off problem for rendez-vous protocols, as stated in [HS20], is then defined as the following decision problem.
Given: A rendez-vous protocol P Decide: Does there exist fin for every n ≥ B ?If such a B exists then we say that P admits a cut-off and that B is a cut-off for P.
Example 2.2.Let us consider the following protocol, which is taken from a slightly modified version of the family of protocols described in Figure 5 of [HS20].We can show that 4 is a cut-off for this protocol.Indeed, if n ≥ 4, then we have the run The first transition involves sending and receiving the message a from the state init and the other two involve sending the message b from q 1 and receiving it from init.Once we reach (n − 4) • init + 4 • fin , we can reach C n fin by repeatedly using the rules (fin, !b, fin) and (init, ?b, fin).
Further, we can show that no number strictly less than 4 can be a cut-off for this protocol.Indeed, suppose Since we need at least two agents for a transition to occur, it follows that n ≥ 2. By construction of the protocol, the first transition along this run must be , then the run gets stuck at this configuration, because no agent is at a state capable of receiving a message.If n = 3, then the only transition that is possible is init + 2 • q 1 ⇒ q 1 + 2 • fin , at which point we reach a configuration where no agent is capable of receiving a message.This implies that n ≥ 4 and so no number strictly less than 4 can be a cut-off for this protocol.
2.2.Petri Nets.We now formally define Petri nets and see how we can relate rendez-vous protocols to Petri nets.
Definition 2.3.A Petri net is a tuple N = (P, T, Pre, Post) where P is a finite set of places, T is a finite set of transitions, Pre and Post are matrices whose rows and columns are indexed by P and T respectively and whose entries belong to N. The incidence matrix A of N is defined to be the P × T matrix given by A = Post − Pre.Further by the weight of N , we mean the largest absolute value appearing in the matrices Pre and Post.
The size |N | of a Petri net N is defined as the number of bits needed to encode N using some suitable encoding.For a transition t ∈ T we let A marking of a Petri net is a multiset M ∈ N P , which intuitively denotes the number of tokens that are present in every place of the net.For t ∈ T and markings M and M ′ , we say that M ′ is reached from M by firing t, denoted by A firing sequence is any sequence of transitions σ = t 1 , t 2 , . . ., t k ∈ T * .The support of σ, denoted by σ , is the set of all transitions which appear in σ.We let σσ ′ denote the concatenation of two sequences σ and σ ′ and we let σ k denote the concatenation of σ with itself k times.
Given a firing sequence σ = t 1 , t 2 , . . ., t k , we let M σ − → M ′ denote that there are markings In the following, we will use the notation The monotonicity property.Throughout the paper, we will repeatedly use the following property of Petri nets, called the monotonicity property.It roughly states that adding more tokens to a marking does not stop us from firing a firing sequence which was fireable before.
Proof.By induction on the length of σ.
Marking equation of a Petri net system.A Petri net system is a triple (N , M, M ′ ) where N is a Petri net and M and M ′ are markings.The marking equation for (N , M, M ′ ) is the equation is the Parikh image of σ, defined as the vector whose component − → σ [t] for a transition t is equal to the number of times t appears in σ.Therefore, if integer solution of the marking equation.However, the converse does not hold.
We now show that rendez-vous protocols can be seen as a special class of Petri nets.Indeed, rendez-vous protocols can be thought of as Petri nets in which no tokens are created or destroyed during a run.
Let P = (Q, Σ, init, fin, R) be a rendez-vous protocol.Create a Petri net N P = (P, T, Pre, Post) as follows.The set of places is Q.For each message a ∈ Σ and for each pair of rules r = (q, !a, s), r ′ = (q ′ , ?a, s ′ ) ∈ R, add a transition t r,r ′ to N P and set Intuitively, the transition t r,r ′ affects only the places in the set {q, q ′ , s, s ′ }.Firing t r,r ′ involves removing two tokens from q if q = q ′ , and otherwise one token each from q and q ′ .Then, after removing these tokens, we put back two tokens in s if s = s ′ , and otherwise we put one token each in s and s ′ .
Due to the way N P is defined, we have that any configuration of the protocol P is also a marking of N P , and vice versa.Further, we have the following proposition, whose proof immediately follows from the definition of N P .
Proposition 2.5.For any pair of configurations C, C ′ and any pair of rules r, r ′ we have that We can now define the cut-off problem for Petri nets in the following manner.
If such a B exists, then we say that (N , M, M ′ ) admits a cut-off and that B is a cut-off for P. By Proposition 2.5, note that B is a cut-off for a protocol P if and only if B is a cut-off for the Petri net system (N , init , fin ).Hence, the cut-off problem for Petri nets generalizes the cut-off problem for rendez-vous protocols.
Example 2.6.Let us consider the rendez-vous protocol P from Example 2.2.Its associated Petri net N P is given in Figure 2. The three places of the Petri net correspond to the three states of the protocol P. We also have three transitions: t 1 corresponds to the pair (init, !a, q 1 ), (init, ?a, q 1 ), t 2 corresponds to the pair (q 1 , !b, fin), (init, ?b, fin) and t 3 corresponds to the pair (fin, !b, fin), (init, ?b, fin).By Proposition 2.5 and by the argument given in Example 2.2, we can show that C n init * − → C n fin is a run in the Petri net N P if and only if n ≥ 4. Hence, 4 is a cut-off for (N P , init , fin ) and no number less than 4 can be a cut-off.
Our main result in this paper is the following: Theorem 2.7.The cut-off problem for Petri nets is decidable in polynomial time.
Since the construction of N P can be done in polynomial time in the size of P, by Proposition 2.5, we then get that: Corollary 2.8.The cut-off problem for rendez-vous protocols is decidable in polynomial time.

The cut-off problem for acyclic Petri nets
As a warm-up to the cut-off problem, we first show that the cut-off problem for acyclic Petri nets can be solved in polynomial time.The reason for considering this special case first is that it illustrates one of the main ideas of the general case in a very pure form.
Let us fix a Petri net system (N , M, M ′ ) for the rest of this section, where N = (P, T, P re, P ost) is acyclic and A is its incidence matrix.It is well-known that in acyclic Petri nets the reachability relation is characterized by the marking equation.This proposition shows that the reachability problem for acyclic Petri nets reduces to the feasibility problem (i.e., deciding the existence of a solution) for systems of linear Diophantine equations over the nonnegative integers.So the reachability problem for acyclic Petri nets is in NP, and in fact both the reachability and the feasibility problems are NP-complete [EN94].
There are two ways to relax the conditions on the solution so as to make the feasibility problem solvable in polynomial time.Feasibility over the non-negative rationals and feasibility over all integers for systems of linear equations are both in P. Indeed, the feasibility problem over the non-negative rationals is simply an instance of the linear programming problem, which is in polynomial time.Further, feasibility in Z can be decided in polynomial time after computing the Smith or Hermite normal forms of the matrix in the marking equation (see e.g.[PZ89]), which can themselves be computed in polynomial time [KB79].We now show that the cut-off problem for acyclic Petri net systems can be reduced to solving a polynomial number of instances of the linear programming problem and the feasibility problem for systems of linear equations over integers.
3.1.Characterizing acyclic systems with cut-offs.Horn and Sangnier proved in [HS20] a very useful characterization of cut-off admitting rendez-vous protocols: A rendez-vous protocol P admits a cut-off if and only if there exists n ∈ N such that fin .Their proof immediately generalizes to the case of Petri nets.Here, we refine their characterization and proof in a small, but important way, which will be helpful later on.Lemma 3.2 [HS20, Lemma 23].A Petri net system (N , M, M ′ ) (acyclic or not) admits a cut-off if and only if there exists n ∈ N and firing sequences σ, σ Moreover if such n, σ and σ ′ exist, then n 2 is a cut-off for the system.
Proof.Suppose (N , M, M ′ ) admits a cut-off.Hence there exists B ∈ N such that for all n ≥ B, there is a firing sequence σ n satisfying nM σn −→ nM ′ .Let T ′ = {t 1 , . . ., t k } be the set n≥B σ n .For every transition t i in T ′ , let n i be such that σ n i contains an occurrence for each i, by the monotonicity property we have nM σ − → nM ′ .Since σ contain at least one occurrence of each transition in T ′ , if we set σ ′ = σ n+1 , the claim is satisfied.
Suppose there exists n ∈ N and firing sequences σ, σ . We can write s as s = qn + r for some q ∈ N and some r such that 0 ≤ r ≤ n − 1.Since s ≥ n 2 , it follows that q ≥ n > r.Hence, we can rewrite s as s = r(n + 1) + (q − r)n.By the monotonicity property, it then follows that sM Hence, n 2 is a cut-off for the system.
Using this lemma, we give a characterization of those acyclic Petri net systems that admit a cut-off.
(⇐): Suppose x ∈ Q T ≥0 and y ∈ Z T are solutions of the marking equation such that y ⊆ x .Let µ be the least common multiple of the denominators of the components of x, and let α be the largest absolute value of the numbers in the vector y.By definition of µ we have α(µx) ∈ N T .Also, since y ⊆ x , it follows by definition of α that αµx + y ⊆ αµx and α(µx) + y ≥ 0. Since M ′ = M + Ax and M ′ = M + Ay we get αµM ′ = αµM + A(αµx) and (αµ + 1)M ′ = (αµ + 1)M + A(αµx + y) Taking αµ = n, by Proposition 3.1 we get that there are firing sequences σ and σ ′ such that Intuitively, the existence of the rational solution x ∈ Q T ≥0 guarantees that nM * − → nM ′ for infinitely many n, and the existence of the integer solution y ∈ Z T guarantees that for one of those n we have (n + 1)M * − → (n + 1)M ′ as well.
Example 3.4.Consider the acyclic net system given by the net on Figure 3 along with the markings M = i and M ′ = f .We claim that 2 is a cut-off for this system.Indeed, first notice that for every k ≥ 1, we have 2kM Hence, 2 is a cut-off for this system.
We now show that the conditions of Theorem 3.3 are satisfied for this system.Notice that the marking equation for M and M ′ gives the following five equations: (Equation for the place i) (Equation for the place f ) Notice that x = ( 1 5 , 1 5 , 1 5 , 1 5 ) and y = (−1, 1, 1, 1) are both solutions to these equations.Further, since y ⊆ x , the conditions of Theorem 3.3 are satisfied.3.2.Polynomial time algorithm.We derive a polynomial time algorithm for the cut-off problem from the characterization of Theorem 3.3.The first step is the following lemma.A very similar lemma is proved in [FH15], but since the proof is short we give it for the sake of completeness.Lemma 3.5.If the marking equation is feasible over Q ≥0 , then one can compute in polynomial time a solution u such that for every solution y, y ⊆ u .
Proof.If y, z ∈ Q T ≥0 are solutions of the marking equation, then we have M ′ = M + A((y + z)/2) and y ∪ z ⊆ (y + z)/2 .Hence if the marking equation is feasible over Q ≥0 , then there is a solution u such that for every solution y, y ⊆ u .
To find such a solution in polynomial time we proceed as follows.For every transition t we solve the linear program M ′ = M + Av, v ≥ 0, v t > 0. (Recall that solving linear programs over the non-negative rationals can be done in polynomial time).Let {t 1 , . . ., t n } be the set of transitions whose associated linear programs are feasible over Q T ≥0 , and let {u 1 , . . ., u n } be solutions to these programs.Then u = 1/n • n i=1 u i is a solution of the marking equation that satisfies the desired property.
We now have all the ingredients to give a polynomial time algorithm.
Theorem 3.6.The cut-off problem for acyclic net systems can be solved in polynomial time.
Proof.First, we check that the marking equation has a solution over the non-negative rationals.If such a solution does not exist, by Theorem 3.3 the given net system does not admit a cut-off.
Suppose such a solution exists.By Lemma 3.5 we can find a non-negative rational solution x with maximum support in polynomial time.Let U contain all the transitions t such that x t = 0. We now check in polynomial time if the marking equation has a solution y over Z T such that y t = 0 for every t ∈ U .By Theorem 3.3 such a solution exists if and only if the net system admits a cut-off.

The Scaling and Insertion lemmas
Similar to the case of acyclic net systems, we would like to provide a characterization of net systems admitting a cut-off and then use this characterization to derive a polynomial time algorithm.Unfortunately, for general net systems there is no characterization of reachability akin to Proposition 3.1 for acyclic systems.To this end, we prove two intermediate lemmas to help us come up with a characterization for (general) net systems which admit a cut-off.We believe that these two lemmas could be of independent interest in their own right.Further, the proofs of both the lemmas are provided so that it will enable us later on to derive a bound on the cut-off for net systems.
4.1.The Scaling Lemma.The Scaling Lemma shows that, given a Petri net system (N , M, M ′ ), deciding whether nM * − → nM ′ holds for some n ≥ 1 can be done in polynomial time; moreover, if nM * − → nM ′ holds for some n, then it holds for some n which can be described by at most (|N |(log ∥M ∥ + log ∥M ′ ∥)) O(1) bits.The name of the lemma is due to the fact that the firing sequence leading from nM to nM ′ is obtained by scaling up a continuous firing sequence from M to M ′ ; the existence of such a continuous firing sequence can be decided in polynomial time due to a result by Fraca and Haddad [FH15].
In the rest of the section we first recall continuous Petri nets and the characterization of [FH15], and then present the Scaling Lemma.As mentioned in the introduction, this lemma is implicitly proved in [FH15], but the bound on n is hidden in the details of the proof, and we make it explicit here.
, but the converse does not hold.In [FH15], Fraca and Haddad strengthen this necessary condition to make it also sufficient, and use the resulting characterization to derive a polynomial time algorithm.
Theorem 4.1 [FH15, Theorem 20 and Proposition 27].Let (N , M, M ′ ) be a Petri net system.Then the following statements are true:

Scaling. It follows easily from the definitions that nM
where n is the smallest number such that nλ 1 , . . ., nλ k ∈ N, and For the other direction if nM σ − → nM ′ holds for some n ≥ 1 and some is true where σ/n is the continuous firing sequence given by σ/n = t 1 /n, t 2 /n, . . ., t k /n.So Theorem 4.1 immediately implies that we can decide in polynomial time if there is a number n ≥ 1 satisfying nM * − → nM ′ .The following lemma also gives a bound on n.Lemma 4.2.Let (N , M, M ′ ) be a Petri net system with weight w such that M σ −→ Q M ′ for some continuous firing sequence σ.Let m be the number of transitions in σ and let ℓ be ∥ − → σ ∥.Let k be the smallest natural number such that k − → σ ∈ N T .Then, there exists a firing We shall first give an intuitive idea behind the proof of Lemma 4.2.Assume that For the purpose of studying this firing sequence, we can remove from the net, all transitions that do not occur in σ, and all places that are neither input nor output places of some transition of σ.Let N ′ be the resulting net.We show that βM * − → βM ′ for a sufficiently large β.In a first step, we show in Lemma 4.3, that for a sufficiently large n we can find markings M 1 and M 2 that mark every place of N ′ and satisfy the following properties: is true for a sufficiently large n ′ , then by the monotonicity property, we would have we would be done.To show that such an n ′ exists, we apply a folklore lemma showing that if L 2 = L 1 + A(mx) for some number m and some x ∈ N T , and where τ m denotes the concatentation of τ with itself m times (Lemma 4.4).Finally, we show in Lemma 4.3 itself that M 1 and M 2 can be chosen so that for sufficiently large n ′ , the markings L 1 := n ′ M 1 and L 2 := n ′ M 2 satisfy the preconditions of Lemma 4.4.
We now proceed to prove Lemmas 4.3 and 4.4 and then we prove Lemma 4.2 using these two lemmas.Let m be the size of σ and let w be the weight of N .Then there exists a firing sequence Proof.Let t 1 , t 2 , . . ., t m be the transitions of σ , sorted according to the order of their first occurrence in σ.Let β 0 = 1, β i = (w + 1) i for every i ∈ {1, . . ., m} and define the sequence For each i ∈ {0, . . ., m}, we now show that there exists a firing sequence τ i and a marking i and also that τ m = σ .Hence, the lemma would then follow by taking L := M m .Therefore, all that remains is to prove the claim which we do by induction on i.
and t i appears in σ after t 1 , . . ., t i−1 , it follows that every place p ∈ • t i has at least (w + 1) tokens at the marking (w + 1) Hence, if we take τ i to be the sequence τ (w+1) i−1 t i , then the proof of the induction step becomes complete.

2:14
Lemma 4.4.Let (N , M, M ′ ) be a Petri net system, and let σ be a firing sequence such that We proceed by induction on n.
Induction hypothesis: Assume that for some number n and for all Petri net systems (N , M, M ′ ) and firing sequences σ for which Induction step: We now prove the claim for n Further, let σ 0 := ϵ and σ be the cyclic permutation of σ starting at t i+1 (or equivalently, ending at t i ).By the definition of the marking K i we have We also need the following minor proposition.
Proposition 4.5.Let w be the weight of the net N .Suppose M is a marking and σ is a firing sequence such that M (p) ≥ w • − → σ (t) for every t ∈ σ and for every p ∈ Proof.By induction on ∥ − → σ ∥.
Using the above three auxiliary results, we are now ready to prove Lemma 4.2.
Proof of Lemma 4.2.Let β := (w + 1) m and γ := 4w βkℓ.We split the proof into three parts, by providing the desired firing sequence as a concatenation of three firing sequences of the form for some markings L 1 and L 2 .
First firing sequence: , by Lemma 4.3 there exists a firing sequence τ 1 and a marking M By the monotonicity property, we have that 4kβM Once again by the monotonicity property, we have 4kβγM τ γ 1 − → γL 1 , thereby completing the first part of the run.We note that by construction of L 1 , we have (γL 1 )(p) ≥ γ for every p ∈ Third firing sequence: The third part is similar to the first part, except that we apply Lemma 4.3 to the reverse net.Notice that since in the reverse net N −1 where N −1 := (P, T, Post, Pre) and σ −1 is the reverse of σ.Using Lemma 4.3, we can get a firing sequence τ ′ 2 and a marking M 2 such that Second firing sequence: By construction of τ 1 and τ 2 we have that Once again by construction of τ 1 and τ 2 we have that Further by construction of the number k, it follows that all the non-zero components of 4kβ − → σ are at least 4β.Hence, if we define then v is a non-negative integer vector.Let τ 3 be any firing sequence such that − → τ 3 = v.We claim that γL 1 Notice that if this claim is true, then by Lemma 4.4 we have that γL 1 τ γ 3 − → γL 2 and then the second part of equation (4.1) will also be done.All that is left to prove are the three claims.As remarked at the end of the first part of the construction, notice that (γL 1 )(p) ≥ γ for every p ∈ By the same argument applied to the reverse net N −1 , we get that γL 2 Finally, notice that and so γ . Since all the three claims have been proven, it follows that equation (4.1) is true.Now, let us analyse the support and the norm of the Parikh image of the final firing sequence that we obtain.Notice that the sequence that we construct is 4kβγM . This then completes the proof of Lemma 4.2.
We can now prove our main result of this subsection, namely the Scaling Lemma.
Lemma 4.6 (Scaling Lemma).Let (N , M, M ′ ) be a net system such that M σ −→ Q M ′ for some σ.Then there exist n and m which can be described by a polynomial number of bits in there is a formula ϕ(M, M ′ , v) in the existential theory of linear rational arithmetic Th(Q, +, <), whose size is linear in the size of the net N such that ϕ(M, M ′ , x) is true if and only if To this formula, let us add the constraints v t > 0 ⇐⇒ t ∈ U and let the resulting formula be ξ.Note that ξ(M, M ′ , x) is true if and By [Son85, Lemma 3.2] if a formula in the existential theory of linear rational arithmetic is satisfiable, then it is satisfiable by a solution which can be described using a polynomial number of bits in the size of the formula.Hence, applying this result to the formula ξ(M, M ′ , v), we get that there exists τ ′ such that M τ ′ −→ Q M ′ , τ ′ = σ and the numerator and denominator of every entry of − → τ ′ can be described using a polynomial number of bits in |N |(log ∥M ∥ + log ∥M ′ ∥).Notice that the smallest natural number k such that k • − → τ ′ ∈ N T is at most the least common multiple of the denominators of all the numbers in the vector − → τ ′ .Since the size of τ ′ is at most the number of transitions of N , if we let w be the weight of the net N , then it is easy to verify that the quantities (w + 1) τ ′ , ∥ − → τ ′ ∥ and k can all be described using a polynomial number of bits in |N |(log ∥M ∥ + log ∥M ′ ∥).Applying Lemma 4.2 now finishes the proof.4.2.The Insertion Lemma.In the acyclic case, the existence of a cut-off is roughly characterized by the existence of solutions to the marking equation over Q T ≥0 and Z T .Intuitively, in the general case we replace the existence of solutions over Q T ≥0 by the conditions of the Scaling Lemma, and the existence of solutions over Z T by the Insertion Lemma: Proof.We first provide an intuition behind the proof.In a first stage, we asynchronously execute multiple "copies" of the firing sequence σ from multiple "copies" of the marking M , until we reach a marking in which all places of • σ contain a sufficiently large number of tokens.At this point we temporarily interrupt the executions of the copies of σ to insert k firing sequences each with Parikh mapping α − → σ + y.The net effect of this sequence is to transfer αk copies of M to M ′ , leaving the other copies untouched, and exactly k copies of L to L ′ .In the third stage, we resume the interrupted executions of the copies of σ, which completes the transfer of the remaining copies of M to M ′ .We now proceed to the formal proof.
Let x be the Parikh image of σ, i.e., x = − → σ .Since M σ − → M ′ , by the marking equation we have First stage: Let λ x = ∥x∥, λ y = ∥y∥ and µ = αk + αλ x nw + λ y nw .Let σ := r 1 , r 2 , . . ., r j and let M =: M 0 Since each of the markings in {M ip } p∈ • σ can be obtained from M by firing a (suitable) prefix of σ, by the monotonicity property, it follows that starting from the marking µM + kL = αkM + kL + (αλ x nw + λ y nw )M , we can reach the marking L 0 given by L 0 := αkM + kL + p∈ • σ (αλ x w + λ y w )M ip .This completes our first stage.
Let ξ be any firing sequence such that − → ξ = αx + y and let Inter := p∈ • σ (αλ x w + λ y w )M ip .Notice that for each place p ∈ • σ , Proposition 4.5 and the marking equation, we have that for each i ≥ 0, L i ξ − → L i+1 .Hence, starting from L 0 , we reach the marking L k = αkM ′ + kL ′ + p∈ • σ (αλ x w + λ y w )M ip .This completes our second stage.
Third stage: Notice that for each place p ∈ • σ , by construction of M ip , there is a firing sequence which takes the marking M ip to the marking M ′ .By the monotonicity property, it then follows that there is a firing sequence which takes the marking L k to the marking αkM ′ + kL ′ + p∈ • σ (αλ x w + λ y w )M ′ = µM ′ + kL ′ .This completes our third stage and also completes the desired firing sequence from µM + kL to µM ′ + kL ′ .

The cut-off problem for general Petri nets
Let (N , M, M ′ ) be a net system with N = (P, T, P re, P ost), such that A is its incidence matrix.As in Section 3, we first characterize the Petri net systems that admit a cut-off, and then provide a polynomial time algorithm to decide the existence of a cut-off for Petri nets (and hence also for rendez-vous protocols).
Further, by the marking equation we have (⇐): Assume that there exists a continuous firing sequence σ and a vector y ′ ∈ Z T such that We first claim that we can find a vector y such that y ⊆ σ , M ′ = M + Ay and y can be described using a polynomial number of bits in s.Indeed, let t 1 , . . ., t k be the set of transitions not in σ and consider the system of equations given by We know that there is at least one integer solution to this system, namely y ′ .It is well known that if a system of linear equations over the integers is feasible, then there is a solution which can be described using a number of bits which is polynomial in the size of the input (see e.g.[KM78]).Applying this result to our system of equations proves our claim.Now, since M σ −→ Q M ′ , by Lemma 4.6 there exists n, m (both of which can be described using a polynomial number of bits in s) and a firing sequence τ such that τ = σ , ∥ − → τ ∥ ≤ m and nM τ − → nM ′ .Since y can be described by a polynomial number of bits in s, by Lemma 4.7, there exists µ (which can once again be described using a polynomial number of bits in s) such that µnM + M * − → µnM ′ + M ′ .By Lemma 3.2 the system (N , M, M ′ ) admits a cut-off which can be described by a polynomial number of bits in s.
Notice that we have actually proved that if a net system admits a cut-off then it admits a cut-off which is expressible by a polynomial number of bits in its size.Since the cut-off problem for a rendez-vous protocol P can be reduced to the cut-off problem for the Petri net system (N P , init , fin ), it follows that: Corollary 5.2.If the system (N , M, M ′ ) admits a cut-off then it admits a cut-off which is expressible by a polynomial number of bits in |N |(log ∥M ∥ + log ∥M ′ ∥).Hence, if a rendez-vous protocol P admits a cut-off then it admits a cut-off which is at most 2 |P| O(1) .
It is already known from [HS20, Section 6.3] that there are protocols whose smallest cut-off is at least exponential in the size of the protocol.Hence, the above corollary gives almost tight bounds on the smallest cut-off of a protocol.
Example 5.3.Let us consider the Petri net N P from Figure 2 given in Example 2.6.We have seen that 4 is the smallest cut-off for the system (N P , init, fin).We now show that the conditions of Theorem 5.1 are satisfied for this system.Note that if we set fin is a valid run of this net.Further, the marking equation for this system is: (Equation for the place init) (Equation for the place q 1 ) 1 = 0 + 2v t 2 + v t 3 (Equation for the place f ) Notice that y = (1, 2, −3) is a solution to the marking equation such that y ⊆ σ .Hence, the conditions of Theorem 5.1 are satisfied.

Polynomial time algorithm.
We use the characterization given in the previous section to provide a polynomial time algorithm for the cut-off problem.The following lemma, which is very similar to Lemma 3.5, was proved in [FH15] and enables us to find a firing sequence between two markings with maximum support.
Lemma 5.4 [FH15, Lemma 12 and Proposition 26].Let F S be the set of all continuous firing sequences τ such that Then, there exists a sequence σ ∈ F S such that τ ⊆ σ for every τ ∈ F S. Moreover, the support of such a sequence σ can be computed in polynomial time.
We now have all the ingredients to prove the existence of a polynomial time algorithm.
Theorem 5.5.The cut-off problem for Petri nets can be solved in polynomial time.
Proof.The proof is exactly the same as the proof of Theorem 3.6, except that instead of checking if the marking equation over Q ≥0 is feasible, we first check if M can reach M ′ over the continuous semantics and if so, obtain the maximum support of all the firing sequences τ such that M τ −→ Q M ′ and then use this maximum support to construct additional constraints for the marking equation over the integers.5.3.P-hardness.We now have the following lemma, which enables us to derive a Pcompleteness result for the cut-off problem.
Lemma 5.6.The cut-off problem for rendez-vous protocols is P-hard.
Proof.We give a logspace reduction from the Circuit Value Problem (CVP) which is known to be P-hard [Lad75].
CVP is defined as follows: We are given a Boolean circuit C with n input variables x 1 , . . ., x n and m gates g 1 , . . ., g m .We are also given an assignment v for the input variables and a gate out.We have to check if the output of the gate out is 1, when the input variables are assigned values according to the assignment v .
We represent each binary gate g as a tuple (•, s 1 , s 2 ) where • ∈ {∨, ∧} denotes the operation of g and s 1 , s 2 ∈ {x 1 , . . ., x n , g 1 , . . ., g m } are the inputs to g.In a similar fashion each unary gate g is represented as a tuple (¬, s).
Let v (x i ) ∈ {0, 1} denote the value assigned to the variable x i by the assignment v .Similarly, let v (g i ) denote the output of the gate g i when the input variables are assigned values according to the assignment v .Hence, the problem is to determine if v(out) is 1.
• For each binary gate g = (•, s 1 , s 2 ) and for each b 1 , b 2 ∈ {0, 1}, we have the rules ).These rules say that if the output of s 1 is b 1 and the output of • For each unary gate g = (¬, s) and each b ∈ {0, 1}, we have the rules (q b s , !(g, b), q ¬b g ) and (q b s , ?(g, b), q ¬b g ).These rules guarantee that the output of g is the negation of the output of s.
• Finally we have the rule (q 1 out , !z, q 1 out ) and also the rule (q, ?z, q 1 out ) for every state q.These rules guarantee that once a process reaches the state q 1 out , it can make all the other processes reach q 1 out as well.We then set our final state fin to be q 1 out .Notice that this construction can be performed using a logarithmic amount of space.Constructing the states and the letters of the alphabet can be accomplished by iterating over all the input variables and the gates of the circuit which can be performed using a logarithmic amount of space on the work-tape.Constructing each rule requires a constant number of pointers to the input, which can also be maintained by using a logarithmic amount of space.Hence, the entire reduction can be carried out by using only a logarithmic amount of space on the work-tape.Some preliminary observations.Before we proceed to the correctness of the construction, we set up some notation and make some preliminary observations.For a state q and an initial configuration C k init , we say that C k init can cover q if there exists a run C k init * = ⇒ D such that D(q) > 0. We say that q is coverable if it can be covered from some initial configuration C k init .Remark 5.7.In our construction the final state fin is taken to be q 1 out .Notice that we have the rule (fin, !z, fin) in our protocol and also the rules (q, ?z, fin) for every state q.By using this collection of rules, it is easy to see that if D is a configuration such that D(fin) > 0 and |D| = k, then D can reach the configuration C k fin .This implies that C k init can cover fin if and only if C k init can reach C k fin .Remark 5.8.By definition of coverability, notice that if C k init can cover a state q then C l init can also cover q for any l ≥ k.By the previous remark this means that there exists some B such that C B init can cover fin if and only if there exists some B such that for all k ≥ B, C k init can reach C k fin .By these two remarks, to prove that the reduction is correct it suffices to prove the following statement: v(out) = 1 if and only if fin is coverable.
Proof of correctness.We prove a stronger statement than what is required.We claim that For any h ∈ {x 1 , . . ., x n , g 1 , . . ., g m }, v(h) = b if and only if the state q b h is coverable.
(⇒): Let h 1 , . . ., h n+m be a topological ordering of the underlying DAG of the circuit C. We will prove by induction on this ordering that if v(h) = b for some gate h, then q b h is coverable.For the base case of h = h 1 , notice that since h 1 has no predecessors, it must be some input gate x i .Let v(x i ) = b.By definition of the rules (init, !a, q b x i ) and (init, ?a, q b x i ), it follows that from C 2 init we can cover q b x i .For the induction step, suppose for some i > 1, we have already proved the claim for all h ∈ {h 1 , . . ., h i−1 }.Let v(h i ) = b i .There are now multiple cases: • Suppose h i is an input gate.Then by the same argument which was given for the base case, we can show that q b i h i is coverable.• Suppose h i is an unary gate of the form (¬, h j ) where j < i.Let v(h j ) = b j .We then have v(h i ) = b i = ¬b j .By induction hypothesis, q b j h j is coverable and so there is some k such that C k init can cover q b j h j .Hence, this means that from C 2k init we can reach a configuration D such that D(q b j h j ) ≥ 2. From D, by using the rules (q are coverable and so there exist some ℓ and ℓ ′ such that C ℓ init can cover q b j h j and C ℓ ′ init can cover q b k h k .Hence, this means that from C ℓ+ℓ ′ init we can reach a configuration D such that D(q b j h j ) ≥ 1 and D(q b k h k ) ≥ 1.From D, by using the rules (q (⇐): We now show that if for some h, there is a k such that We do this by induction on the length of the run from C k init to D. For the base case of a single step given by C k init r,r ′ = = ⇒ D, notice that since we start from a configuration where all the agents are in the state init, it must be the case that r = (init, !a, q v(x i ) x i ) and r ′ = (init, ?a, q v(x j ) x j ) for some input variables x i and x j .Hence, h can only be either x i or x j and in both of these cases, the claim is true.
For the induction step, assume that we have proven the claim for all runs of length at most i and suppose for some ℓ, we have a run from C ℓ init to D of length i + 1 satisfying then by induction hypothesis we are already done.Otherwise, by construction of the protocol P, one of the following cases must hold: ) and r ′ = (init, ?a, q v(x j ) x j ) for some input variables x i and x j : This case is similar to the base case.
• r = (q b s , !(h, b), q ¬b h ) and r ′ = (q b s , ?(h, b), q ¬b h ) where b ∈ {0, 1} and h is an unary gate of the form h = (¬, s).Hence D ′ (q b s ) > 0 and so by induction hypothesis, we have that s 1 ) > 0 and D ′ (q b 2 s 2 ) > 0 and so by induction hypothesis, we have that v(s 1 ) = b 1 and v(s • r = (q 1 out , !z, q 1 out ) and r ′ = (q, ?z, q 1 out ) for some state q.In this case, notice that h must be q out and b must be 1.By construction of the run, it must be the case that D ′ (q 1 out ) > 0 and so by induction hypothesis we are already done.Hence, the induction step is complete and we have proved our claim, which also completes the proof of correctness of the reduction.
Since rendez-vous protocols are a special case of Petri nets, this also proves that the cut-off problem for Petri nets is P-hard.Therefore we get: Theorem 5.9.The cut-off problems for Petri nets and rendez-vous protocols are P-complete.

The bounded-loss cut-off problem for rendez-vous protocols
In this section, we consider the following bounded-loss cut-off problem for rendez-vous protocols, which was suggested as a variant of the cut-off problem in Section 7 of [HS20].
Given: A rendez-vous protocol P = (Q, Σ, init, fin, R) Decide: Is there B ∈ N such that for every n ∈ N, there is a configuration If such a B exists, then we say that the protocol P has the bounded-loss cut-off property and that B is a bounded-loss cut-off for P.
Intuitively, the cut-off problem asks if for all large enough population sizes n, we can move n agents from the state init to the state fin.The bounded-loss cut-off problem asks if there is a bound B such that for all population sizes n, we can move n − B agents from the state init to the state fin and leave the remaining B agents in any state of the protocol P. Intuitively, we are allowed to "leave out" a bounded number of agents while moving everybody else to the final state.
Example 6.1.Let us consider the protocol P from Figure 1 given in Example 2.2.We have seen that 4 is a cut-off for P. Let us modify P so that we get the protocol in Figure 4. We first observe that this protocol does not admit a cut-off.Indeed, the only possible step from any initial configuration consists of moving two agents from the state init to q 1 by using the message a.However, since there are no outgoing rules from q 1 , it follows that these two agents can never leave q 1 from here on.Hence, this protocol does not admit a cut-off.But 2 is a bounded-loss cut-off for this protocol because once we move 2 agents from init to q 1 , we can move all the remaining agents from init to fin by using the rules (q 1 , !b, q 1 ) and (init, ?b, fin).
Our main result in this section is that Theorem 6.2.The bounded-loss cut-off problem is P-complete.
We prove this by adapting the techniques developed for the cut-off problem.Similar to the cut-off problem, we first give a characterization of protocols having the bounded-loss cut-off property and then use this characterization to give a polynomial-time algorithm for deciding the bounded-loss cut-off problem.
6.1.Characterization of protocols having a bounded-loss cut-off.For the rest of this section, we fix a rendez-vous protocol P = (Q, Σ, init, fin, R).We need a couple of notations to state the required characterization.Given the protocol P, we consider the Petri net N P = (P, T, P re, P ost) with incidence matrix A = P ost − P re that we constructed in Section 2, and then consider the associated Petri net system (N P , init , fin ).In this Petri net, we say that init can cover fin by a continuous firing sequence σ if there exists a marking M such that init σ −→ Q M and M (fin) > 0. We now prove that Theorem 6.3.The protocol P has a bounded-loss cut-off if and only if in the Petri net system (N P , init , fin ), init can cover fin using a continuous firing sequence σ and the marking equation has a solution y ∈ Q T ≥0 such that y ⊆ σ .Proof.(⇒): Assume P has the bounded-loss cut-off property.By Proposition 2.5, there must exist B ∈ N such that for all n ∈ N, there exists Consider the infinite sequence of markings D 1 , D 2 , . . . .Notice that in all of these markings, at most B tokens are not in the place fin.This means that there must exist a subsequence D i 1 , D i 2 , . . .with B < i 1 < i 2 < . . .and a marking D of size B ′ ≤ B such that each Construct the continuous firing sequence Since D i l (fin) > 0, this means that init can cover fin using σ.
Further, by the marking equation we have D gives us that fin = init +Ay.By assumption on k and l, it follows that y ∈ Q T ≥0 and y ⊆ σ i l = σ .(⇐): Assume that there exists a continuous firing sequence σ and a vector y ∈ Q T ≥0 such that y ⊆ σ , init can cover fin using σ and fin = init + Ay.
Let init We now claim that B := µn + k is a bounded-loss cut-off for P. To prove this, we have to show that for any a ∈ N, there exists D a with C a init * − → D a and D a (fin) ≥ a − B. Suppose a ≤ µn + k.Then we simply set D a to be C a init .On the other hand, suppose a > µn + k.Let b = a − µn − k.Write b as b = qk + r for some q ∈ N and some r such that 0 ≤ r ≤ k − 1.By equation (6.1) and the monotonicity property, it follows that C a init = (µn + (q + 1)k + r) Hence, we can set D a to be µM ′ + (q + 1)k • fin + r • init , which completes the proof.
Note that this characterization is very similar to the characterization for the cut-off property, where the reachability condition is replaced with a coverability condition and the condition of the marking equation having a solution over the integers is replaced with it having a solution over the non-negative rationals.
Example 6.4.Let us consider the protocol from Figure 4. We have seen that 2 is a bounded-loss cut-off for this protocol.The Petri net corresponding to this protocol is given in Figure 5.We now show that the conditions of Theorem 6.3 are satisfied here.Indeed, if we set σ = t 1 /4, t 2 /2 then init can cover fin using σ.Further, the marking equation for the markings init and fin is given by, (Equation for the place init) 0 = 0 + 2v t 1 (Equation for the place q 1 ) 1 = 0 + v t 2 (Equation for the place f ) Notice that y = (0, 1) is a solution to the marking equation such that y ⊆ σ .Hence, the conditions of Theorem 6.3 are satisfied.

Polynomial time algorithm.
We use the characterization given in the previous subsection to provide a polynomial time algorithm for the bounded-loss cut-off problem.Similarly to Lemma 5.4, we have the following lemma which could be inferred from the results of [FH15].
Lemma 6.5 [FH15, Lemma 12 and Proposition 29].Let F S be the set of all continuous firing sequences τ such that init can cover fin .Then, there exists a sequence σ ∈ F S such that τ ⊆ σ for every τ ∈ F S. Moreover, the support of such a sequence σ can be computed in polynomial time.
We now have all the ingredients to prove the existence of a polynomial time algorithm.
Theorem 6.6.The bounded-loss cut-off problem can be solved in polynomial time.
Proof.First, we check that init can cover fin over the continuous semantics, which can be done in polynomial time [FH15,Proposition 29].If this is not true, then by Theorem 6.3, we can immediately reject.Otherwise, using Lemma 6.5, in polynomial time we compute the maximum support U of all the firing sequences τ such that init can cover fin using τ .We now check in polynomial time, if the marking equation over (N P , init , fin ) has a solution x over the non-negative rationals such that x t = 0 for any t / ∈ U .By Theorem 6.3 such a solution exists if and only if the protocol admits a bounded-loss cut-off.
6.3.P-Hardness.We now have the following lemma, which enables us to derive a Pcompleteness result for the bounded-loss cut-off problem.
Lemma 6.7.The bounded-loss cut-off problem is P-hard.
Proof.Similar to the P-hardness proof of the cut-off problem, we reduce from CVP.Let C be a Boolean circuit and let v be an assignment to the input variables of C. We consider the same rendez-vous protocol P that we constructed in the reduction for the cut-off problem in Lemma 5.6.We claim that P has a cut-off if and only if P has a bounded-loss cut-off.
Note that if this claim is true, then by the reduction in Lemma 5.6, this would immediately imply P-hardness for the bounded-loss cut-off problem.We now proceed to prove this claim.
Suppose B is a cut-off for P.This means that for every n ≥ B, C

The cut-off and bounded-loss cut-off problems for symmetric rendez-vous protocols
In [HS20], Horn and Sangnier introduced symmetric rendez-vous protocols, where sending and receiving a message at each state has the same effect, and showed that the cut-off problem for this class of protocols is in NP.We improve on their result and show that we can decide this problem in NC.We now formally define symmetric protocols.
Definition 7.1.A rendez-vous protocol P = (Q, Σ, init, fin, R) is symmetric if its set of rules is symmetric under swapping !a and ?a for every a ∈ Σ, i.e., for every a ∈ Σ, we have that (q, !a, q ′ ) ∈ R if and only if (q, ?a, q ′ ) ∈ R.
Remark 7.2.Since (q, !a, q ′ ) ∈ R if and only if (q, ?a, q ′ ) ∈ R for a symmetric protocol P, in the following, we will simply denote rules of a symmetric protocol as a tuple in Q × Σ × Q, with the understanding that (q, a, q ′ ) denotes that there are two rules of the form (q, !a, q ′ ) and (q, ?a, q ′ ) in the protocol.
Example 7.3.Let us consider the symmetric protocol in Figure 6, where the alphabet Σ is taken to be {a, b, c}.Notice that 2 is a cut-off for this protocol.Indeed, starting from any initial configuration of size at least 2, we can first move 2 agents from init to fin by making them pass through q 1 .Once we have put these two agents in the fin state, we can move all the remaining agents from the init state to the fin state by means of the rules (fin, !c, fin) and (init, ?c, fin).
7.1.Characterization of symmetric protocols admitting a cut-off.Let us fix a symmetric protocol P = (Q, Σ, init, fin, R) for the rest of this section.Horn and Sangnier proved the following nice characterization of symmetric protocols that admit a cut-off.
Proposition 7.4 [HS20, Lemma 18].The protocol P admits a cut-off if and only if there exists an even number e and an odd number o such that C e init can reach C e fin and C o init can reach C o fin .We will now translate this characterization into one that is more amenable to algorithmic analysis.To begin with, we use the symmetric protocol P to define a graph G P whose vertices are the states of P and there is an edge between q and q ′ in G P if and only if there exists a ∈ Σ such that (q, a, q ′ ) ∈ R. The following lemma is immediate from the definition of P.
Lemma 7.5.There exists k ∈ N such that C 2k init can reach C 2k fin in P if and only if there is a path from init to fin in the graph G P .
Proof.The left-to-right implication follows from the definition of G P .For the other direction, suppose there is a path init, q 1 , q 2 , . . ., q m−1 , fin in the graph G P .Then notice that 2 Intuitively, the above lemma takes care of the "even" case in the characterization given in Proposition 7.4.To handle the "odd" case, we first need a couple of definitions.
A state q of P will be called good if there is a path from init to q and a path from q to fin in the graph G P .A state which is not good is bad.Given the protocol P, we consider the Petri net N P = (Q, T, P re, P ost) with incidence matrix A = P ost − P re that we constructed in Section 2. Note that the set of places of N P is the set of states of P. A transition t of N P is called useless if • t ∪ t • contains a bad state.We now have the following propositions about good states.
Proof.Since q is good, there are paths init, p 1 , . . ., p n , q and q, q 1 , . . ., q m , fin in G P .By definition of symmetric protocols, it follows that 2 fin are valid runs of P. By Proposition 2.5, these two runs are also valid in the Petri net N P .
The next proposition intuitively asserts that in any run from an initial configuration to a final configuration, only good states may occur.
fin ) for some n.Then for every q such that C(q) > 0, there is a path from init to q (resp.from q to fin) in the graph G P .
Proof.In both of these cases, we can prove the claim by induction on the length of the underlying run.
The following lemma now allows us to handle the "odd" case in the characterization of symmetric protocols that admit a cut-off.Proof.We first provide an intuition behind the proof.The left-to-right implication is true because we can perform a "modulo 2" operation on both sides of the marking equation.For the other direction, we use an idea similar to the Insertion Lemma (Lemma 4.7).Let x be a solution to the marking equation over F 2 such that x[t] = 0 for every useless transition t.Using Proposition 7.6, we first populate all the good states of Q with enough agents such that all the good states except init have an even number of agents.Then, we fire exactly once all the transitions t such that x[t] = 1.Since x satisfies the marking equation over F 2 , we can now argue that in the resulting configuration, the number of agents at each bad state is 0 and the number of agents in each good state except fin is even.Hence, we can once again use Proposition 7.6 to conclude that we can move all the agents which are not at fin to the final state fin.We now proceed to the formal proof.fin .We claim that − → σ [t] = 0 for every useless transition t.For the sake of contradiction, suppose By definition of a useless transition, it follows that there is a bad state q such that either C(q) > 0 or C ′ (q) > 0. However, this is a direct contradiction to Proposition 7.7.Hence, − → σ [t] = 0 for every useless transition t. (⇐): Suppose the marking equation has a solution x over F 2 such that x[t] = 0 for every useless transition t.Let T ′ be the set of all transitions t such that x[t] = 1.Let n = 2|Q| + 3.
We will now construct a run from C n init to C n fin as follows: First stage -Saturate: Let G ⊆ Q be the set of good states and let ℓ = 2|Q| − 2|G|.By Proposition 7.6 and the monotonicity property, from C n init we can reach the marking First := (2l + 3) • init + q∈G 2q .
Second stage -Insert: Since x[t] = 0 for every useless transition t, it follows that for every transition t ∈ T ′ , • t ∪ t • ⊆ G. Hence, every transition t ∈ T ′ is enabled at First.Therefore, we can fire all these transitions exactly once, in any order, from First to reach some marking Second.Since we fire only transitions from T ′ , it follows that Second(q) = 0 for any bad state q.
We now claim that Second(q) is even for every q ̸ = fin and Second(fin) is odd.Indeed, suppose q / ∈ {init, fin}.Since we fired each transition in T ′ exactly once to go from First to Second and since T ′ = {t : x[t] = 1}, by the marking equation for (N P , First, Second) it follows that Second(q) − First(q) = t∈T A[q, t] • x[t].Since x is also a solution to the marking equation for (N P , init , fin ) over the field F 2 , it follows that t∈T A[q, t] • x[t] ≡ 0 mod 2, and so we can conclude that Second(q) − First(q) is even.Since First(q) is even, it follows that so is Second(q).Similarly we can argue that Second(init) is even and Second(fin) is odd.
Third stage -Desaturate: Hence, we have shown that Second(q) = 0 for any bad state q and Second(q) is even for every good state q ̸ = fin.By Proposition 7.6 and by the monotonicity property, it follows that from Second(q) we can reach the configuration C n fin , thereby constructing the required run.
Example 7.9.Consider the symmetric protocol P from Figure 6.We have seen that 2 is a cut-off for this protocol.The Petri net associated with this protocol is given in Figure 7.We Figure 7: Petri net corresponding to the protocol from Figure 6 now show that the conditions of Lemmas 7.5 and 7.8 are satisfied in this protocol.Indeed, it is easy to see that there is a path from init to fin in the graph of P and that there is no bad state.Further, notice that the entries in the incidence matrix A of this Petri net are all either 0, 2 or −2, except for A[init, t 3 ] and A[fin, t 3 ] which are -1 and 1 respectively.It follows that if we were to write down the marking equation for the markings init and fin over the field F 2 , then the only non-trivial equations that we would get are 0 = 1 − v t 3 and 1 = v t 3 , which are the equations corresponding to the places init and fin respectively.Hence if we set x = (0, 0, 1, 0, 0), then x is a solution to the marking equation over the field F 2 .Since there are no useless transitions in this net, it follows that the conditions of Lemmas 7.5 and 7.8 are satisfied.
7.2.An NC algorithm.We now use Proposition 7.4 and Lemmas 7.5 and 7.8 to give an NC algorithm for the cut-off problem for symmetric protocols.Recall that NC is the class of problems that can be solved by parallel random access machines (PRAMs) in polylogarithmic parallel time with a polynomially many processors [Pap07].Intuitively, a PRAM is a parallel computer with some number of random access machines M 1 , M 2 , . . ., M k , also known as processors, and a central memory which can be accessed by any of these processors.These processors have random access to any of the cells in the central memory and they can all read and write to these cells as dictated by their instruction set.A single step of the PRAM consists of all of these processors executing a single step, with contradictory writes to the same cell avoided by adopting the convention that the write of the processors with the smallest index prevails.A uniform family of polynomial-sized PRAMS is a set {P n : n ∈ N} such that each P n only has a polynomial number of processors in n and there is a logarithmic space Turing machine, which when given input 1 n can output P n .A language L is said to be in NC if there is a uniform family of polynomial-sized PRAMS {P n : n ∈ N} such that given input x, the PRAM P |x| correctly decides if x ∈ L and the number of steps P |x| takes is polylogarithmic in the size of |x|.Similarly, we can define the notion of a uniform family of polynomial-sized PRAMS computing a function, and hence a reduction between two languages.From the definition of NC, it follows that this class is closed under intersection of languages.Further, it also follows that if L ∈ NC and there is a NC-reduction from another language L ′ to L, then L ′ ∈ NC.With these two facts in mind, by Proposition 7.4, to prove that the cut-off problem for symmetric protocols is in NC, it suffices to give two NC algorithms: one to check if there is an even number e such that C e init can reach C e fin and another to check if there is an odd number o such that C o init can reach C o fin .
Algorithm for the even case.We now give an NC algorithm to determine if there is an even number e such that C e init can reach C e fin .To do this, we show that given the protocol P as input, we can construct the graph G P using an NC algorithm.By Lemma 7.5, we have then reduced the problem to an instance of graph reachability, which is in NC [Pap07].Since NC is closed under NC-reductions, the required claim will then follow.
Let P = (Q, Σ, init, fin, R).We assume that P is given as input in the central memory in some fixed encoding, i.e., the first |Q| cells contain the encoding of the states, the next |Σ| cells contain the encoding of the alphabet and so on.To construct G P , we will have n + n 2 • |Σ| processors working in parallel, where n = |Q|.The i th processor in this collection will simply write down the encoding of the i th state onto the memory.Each of the other n 2 •|Σ| processors uniquely correspond to an element from Q×Σ×Q.A processor responsible for the triple consisting of the i th and the j th states and the k th letter first checks if there is a rule in R for this triple by means of random access to the input.Depending on this check, it will then write down whether or not there is an edge in G P corresponding to the i th and the j th states.Notice that we only have a polynomial number of processors and each of these processors only performs a polylogarithmic amount of work.Hence, we have shown how to construct G P using an NC algorithm, which completes the proof of the claim.
Algorithm for the odd case.We now give an NC algorithm to determine if there is an odd number o such that C o init can reach C o fin .First note that similar to the NC algorithm which constructs G P from P, we can prove that there is an NC algorithm which constructs N P from P. So we can assume that we have access to both G P and N P for our NC algorithm.We now show that there is an NC algorithm which allows us to identify the set of all bad states and useless transitions of N P .
Let n = |Q|.Suppose the NC algorithm to decide graph reachability on n vertices requires f (n) processors and takes g(n) (parallel) steps.Then, to compute the set of bad states of G P , we take 2nf (n) processors.For each i, the i th collection of f (n) processors will decide if there is a path from init to the i th state of P in G P and the (n + i) th collection of f (n) processors will decide if there is a path from the i th state of P to fin in G P .Notice that each collection of f (n) processors can work in a parallel manner and hence the overall (parallel) time of this algorithm will still be g(n).Finally, we will have n processors, one for each state, which will wait for the result from the processors responsible for graph reachability and based on this decide if the state corresponding to themselves is bad or not.
Once we have computed the set of bad states, computing the set of useless transitions is easy.The shared memory will have one bit for each transition of N P , initially set to 0. For each transition t and each place p of N P , we will have one processor which will check if p ∈ • t ∪ t • and also check if p is a bad state.If this is the case, then that process changes the bit corresponding to t to 1 and otherwise, it does nothing.
Finally, we show that given N P and its set of useless transitions, there is an NC algorithm which constructs the marking equation for (N P , init , fin ) and additionally adds constraints specifying that the solution must be 0 on all useless transitions.Composing this NC algorithm, with the ones for constructing N P and useless transitions, by Lemma 7.8, we have then reduced the problem to an instance of solving equations over the field F 2 , which is in NC [Mul87] and so the required claim will then follow.
To construct the marking equation, we will have one processor responsible for each entry of the equation.We will have n processors for constructing the column corresponding to the marking init and another n processors for the column corresponding to the marking fin .Further, for each transition t and each place p, we will have one processor for outputting A[p, t].This processor will consult the memory and get the values of P re[p, t] and P ost[p, t] and will then compute A[p, t].Finally, we will have one processor for each transition t, which will check if t is a useless transition (by consulting the memory) and then depending on this check, will write down a constraint specifying that the solution to the marking equation must have value 0 corresponding to the index t.This completes the construction of the NC algorithm and so we get, Theorem 7.10.The cut-off problem for symmetric protocols is in NC.

7.3.
The bounded-loss cut-off problem.We can also consider the bounded-loss cut-off problem for symmetric protocols.However, in the case of symmetric protocols, this problem becomes rather easy.More specifically, the bounded-loss cut-off problem is NL-complete for symmetric protocols.
Indeed, for a symmetric protocol to have a bounded-loss cut-off, it is easy to see that there must be a path from init to fin in the graph G P .Moreover, this is also a sufficient condition, because if such a path exists, then by Proposition 7.6 and the monotonicity property, for every k ≥ 1, (2k − 1) • fin and so we can simply take the bounded-loss cut-off to be 1.Notice that we can compute G P from P by a reduction which uses a logarithmic amount of space.This proves that the bounded-loss cut-off problem for symmetric protocols reduces to graph reachability which is known to be NL-complete.
Moreover, given a graph reachability instance (G, s, t), we can interpret it in a straightforward manner as the graph of a symmetric protocol P whose communication alphabet is a single letter and where the initial state is s and the final state is t.This then immediately implies that P would have a bounded-loss cut-off if and only if s can reach t in the graph G, which leads to NL-hardness of the bounded-loss cut-off problem for symmetric protocols.

The cut-off problem for symmetric rendez-vous protocols with a leader
In [HS20], Horn and Sangnier proposed an extension to symmetric rendez-vous protocols by adding a special agent called a leader.They defined the cut-off problem for that extension and showed that it is in PSPACE.We improve on their result and and prove that the problem is NP-complete.We proceed by introducing this new model and its cut-off problem.
Definition 8.1.A symmetric rendez-vous protocol with a leader, or simply a symmetric leader protocol, is a pair of symmetric protocols P = (P L , P F ) where P L = (Q L , Σ, init L , fin L , R L ) is the leader protocol and Intuitively, we will have exactly one agent in our collection executing the leader protocol and all the other agents will execute the follower protocol.To this end, we define a configuration of a symmetric leader protocol P as a multiset over C n fin ) denote the initial (resp.final) configuration of P given by C(init L ) = 1 (resp.C(fin L ) = 1) and C(init Suppose a is a message in Σ and r = (p, a, p ′ ) and r ′ = (q, a, q ′ ) are two rules of R L ∪ R F .For any two configurations C and C ′ , we say that C r,r ′ = = ⇒ C ′ if C ≥ p, q and C ′ = C − p, q + p ′ , q ′ .Since we allow exactly one agent to execute the leader protocol, given a configuration C, we let lead(C) denote the unique state q of the leader protocol such that C(q) > 0. The cut-off problem for symmetric leader protocols is defined as the following decision problem.
Given: A symmetric leader protocol P = (P L , P F ). Decide: If there exists B ∈ N such that for all n ≥ B, C n init * = ⇒ C n fin .If such a B exists, then we say that P admits a cut-off and that B is a cut-off for P.
Example 8.2.Let us consider the symmetric leader protocol P = (P L , P F ) where P L is given in Figure 8 and P F is given in Figure 9.Note that the follower protocol is obtained from the one in Figure 6, by removing the self-loop at the state fin.We claim that 4 is a cut-off for this protocol.Indeed, notice that by only using the message c we have the run In addition to these steps, if we also make the leader take the rules corresponding to the messages a and b at p 1 and p 5 respectively we have the run init L + 5 If n ≥ 4 and n is even (resp.odd), notice that C n init can reach the configuration C 4 init + n − 4 • fin F (resp.C 5 init + n − 5 • fin F ) by using the rules in the follower protocol corresponding to the message c.From this observation and from the above paragraph, it follows that 4 is a cut-off for this symmetric leader protocol.

Further, suppose ρ
fin is a valid run for some k.We shall now give an informal sketch of a proof that there must be an occurrence of at least one of the rules in {(p 1 , a, p 1 ), (p 4 , a, p 4 )} along ρ.Let S := {(init L , c, p i ), (p i , c, p 3 ) : 1 ≤ i ≤ 2} ∪ {(p 3 , c, p i ), (p i , c, fin L ) : 4 ≤ i ≤ 5}.By the construction of the leader protocol, it follows that there are exactly 4 occurrences of rules from S in the run ρ.For every i, notice that the rule (init F , c, fin F ) can appear exactly once in the pair (r i , r ′ i ) if and only if the other rule which appears in the pair is in S. It then follows that the number of occurrences of (init F , c, fin F ) along ρ is even.Since we begin with an odd number of agents in init F , it follows that an odd number of agents must have taken the rule (init F , a, q 1 ) along ρ.Once again notice that for every i, the rule (init F , a, q 1 ) can appear exactly once in the pair (r i , r ′ i ) if and only if the other rule which appears in the pair is in {(p 1 , a, p 1 ), (p 4 , a, p 4 )}.Since (init F , a, q 1 ) is fired by an odd number of agents, it follows that there must be an occurrence of at least one of the rules in {(p 1 , a, p 1 ), (p 4 , a, p 4 )} along ρ.
A generalization of this protocol along with the argument given above will be useful to prove the lower bound on the cut-off problem in Subsection 8.2.
The main theorem of this section is that Theorem 8.3.The cut-off problem for symmetric leader protocols is NP-complete.
The following characterization of symmetric leader protocols that admit a cut-off, proved by Horn and Sangnier, will be central to us for proving both the upper bound and the lower bound from Theorem 8.3.8.1.The upper bound: An NP algorithm.Let P 1 = (P L 1 , P F 1 ) be a symmetric leader protocol where Preprocessing the protocol.As a first step, we preprocess the protocol to remove certain states, whilst preserving the cut-off property.Since the protocols P L 1 and P F 1 are symmetric, we can consider the graphs G P L 1 and G P F 1 as defined in Section 7. Recall that a bad state of a symmetric protocol is one which either does not have a path from the initial state or to the final state in the graph of its protocol.Similar to Proposition 7.7, we have the following proposition for symmetric leader protocols, which intuitively states that we can discard all the bad states of P L 1 and P F 1 without sacrificing the validity of the cut-off property.Proposition 8.5.Suppose C is such that fin ) for some n.Then for every q ∈ Q F 1 such that C(q) > 0, there is a path from init F 1 to q (resp.from q to fin F 1 ) in the graph G P F 1 .Similarly for every q ∈ Q L 1 such that C(q) > 0, there is a path from init L 1 to q (resp.from q to fin L 1 ) in the graph G P L 1 .
Proof.Straightforward induction on the length of the underlying run.
Let P L (resp.P F ) be the symmetric protocol obtained from P L 1 (resp.P F 1 ) by removing all of its bad states (and the associated rules) and let P = (P L , P F ).Note that P can be constructed from P 1 in polynomial time.By Proposition 8.5, it follows that, Lemma 8.6.P admits a cut-off if and only if P 1 admits a cut-off.
Proof.The left-to-right implication is true because P is obtained from P 1 by potentially discarding some of its transitions and so if a configuration C can reach a configuration C ′ in P, then the same is true for P 1 as well.For the other direction, suppose ρ : fin is a valid run in P 1 .By Proposition 8.5, it follows that if C i (q) > 0 for any 1 ≤ i ≤ n and any state q, then q is not a bad state of either P L 1 or P F 1 .Since we obtained P from P 1 by only pruning the bad states of the underlying protocols, it follows that ρ is also a valid run in P. Hence, if P 1 admits a cut-off, then P also admits a cut-off.
Because P F is symmetric and does not contain any bad states, we have the following fact, which is easy to verify.Proposition 8.7.If q L and q F are states of P L and P F respectively, then q L + 2 In the rest of this subsection, we will concern ourselves with only P = (P L , P F ) and show how to decide if it admits a cut-off.
Constructing a Petri net.Similar to the case of rendez-vous protocols, we will construct a Petri net N P from the symmetric leader protocol P = (P L , P F ).However, the construction is a bit different now because of the leader protocol.
Let P L = (Q L , Σ, init L , fin L , R L ) and P F = (Q F , Σ, init F , fin F , R F ).Our Petri net N P = (P, T, P re, P ost) will be constructed as follows: The set of places P will be Q L ∪ Q F .For each a ∈ Σ and r = (q, a, s), r ′ = (q ′ , a, s ′ ) ∈ R L ∪ R F such that not both r and r ′ belong to R L , we will have a transition t r,r ′ in N P satisfying • P re[p, t r,r ′ ] = 0 for every p / ∈ {q, q ′ }, P ost[p, t r,r ′ ] = 0 for every p / ∈ {s, s ′ } • If q = q ′ then P re[q, t r,r ′ ] = 2, otherwise P re[q, t r,r ′ ] = P re[q ′ , t r,r ′ ] = 1 • If s = s ′ then P ost[s, t r,r ′ ] = 2, otherwise P ost[s, t r,r ′ ] = P ost[s ′ , t r,r ′ ] = 1.
The transitions defined here have the same intuitive meaning as the ones defined in Subsection 2.3.The reason we only consider pairs of rules (r, r ′ ) such that not both of them belong to R L is that since we will only have one agent executing the leader protocol, we can never have a step between configurations in which two rules in R L are executed.
If t r,r ′ is a transition such that exactly one of r and r ′ is in R L , then it will be called a leader transition.All other transitions will be called follower-only transitions.Notice that if t is a leader transition, then there is a unique place t.from ∈ • t ∩ Q L and a unique place t.to ∈ t • ∩ Q L .As usual, we let A = P ost − P re denote the incidence matrix of N P .The next proposition follows from the construction of N P .The notion of compatibility.To give our NP algorithm, we define the notion of compatibility between a configuration C and a vector x ∈ N T , where T is the set of transitions of N P .We show that compatible pairs of the form (C, x) admit certain nice properties in terms of runs in the net N P .
For any set of leader transitions S of N P , define a graph G(S) as follows: The set of vertices of G(S) is given by {t.from : t ∈ S} ∪ {t.to : t ∈ S} and its set of edges is in G(x i ) is reachable from p and since G(x i ) has at least one edge, it follows that there is at least one out ∈ Out such that in] = 0 for every in ∈ In and since C i (p) = 1, it follows that there is exactly one out ∈ Out such that x i [out] > 0. Hence, by construction of G(x i ), there is exactly one outgoing edge from p in G(x i ), which we will denote by r.
Let t i+1 := r, C i+1 be the configuration satisfying C i r − → C i+1 and x i+1 := x i − r.By arguments that are similar to the one given in Case 1, we can conclude that (C i+1 , x i+1 ) satisfies Conditions (1), (2), (3), (4) and also that All that is left to prove is that every vertex in G(x i+1 ) is reachable from lead(C i+1 ) which by construction is r.to.Note that G(x i+1 ) is necessarily a subgraph of G(x i ) which further satisfies the property that if tr ̸ = r is some transition in G(x i ), then tr is also present in G(x i+1 ).Now, let s be any vertex of G(x i+1 ).Since G(x i+1 ) is a subgraph of G(x i ), it follows that s is also present in G(x i ).By compatibility of (C i , x i ), s is reachable from p in G(x i ).Let p, tr 1 , s 1 , tr 2 , s 2 , . . ., s l , tr l+1 , s be a path in G(x i ).Since p has only one outgoing edge in G(x i ) (which is r), it follows that tr 1 = r and s 1 = r.to.Hence s 1 , tr 2 , s 2 , . . ., s l , tr l+1 , s is a path in G(x i+1 ) and so the proof of this case is also complete.
x and so the claim of the lemma is true.
Characterization of symmetric leader protocols that admit a cut-off.We use the Compatibility lemma to prove another characterization of symmetric leader protocols that admit a cut-off, which will help us construct our final NP algorithm.
. ., t l be leader transitions sorted by the order in which they first appear in σ.We have to show that for every i, the states t i .fromand t i .toare reachable from init L in G(x).Since σ is a firing sequence from C k init to C k fin , it must be the case that for each t i , the place t i .from∈ {init L , t 1 .to,t 2 .to, . . ., t i−1 .to}.Our claim then follows by means of this observation and induction on i.
(⇐): Suppose there exist n ∈ N, x ∈ N T such that n ≡ par mod 2, (C n init , x) is compatible and C n fin = C n init + Ax.We will now find a k ∈ N such that k ≡ par mod 2 and This characterization immediately suggests the following NP algorithm.We first nondeterministically guess a set S of leader transitions and check if every vertex in G(S) is reachable from init L .Then, we write a polynomial sized non-negative integer linear program as follows: We let v denote |T | variables, one for each transition in T and we let n be another variable, with all of them ranging over the non-negative integers.The constraints of the linear program are given by C 2n fin = C 2n init + Av and v[t] = 0 ⇐⇒ t / ∈ S. Once we have constructed this linear program, we solve it, which we can do in non-deterministic polynomial time [Pap81].If there exists a solution, then we accept.Otherwise, we reject.
From our characterization and the construction of our algorithm, it follows that at least one of the runs of our non-deterministic algorithm is accepting if and only if there exists k ∈ N such that C 2k 8.2.NP-hardness.We now complement our upper bound by proving NP-hardness of the cut-off problem for symmetric leader protocols.
Lemma 8.13.The cut-off problem for symmetric leader protocols is NP-hard.
Proof.We prove NP-hardness by giving a reduction from 3-SAT.
be a 3-CNF formula with variables x 1 , . . ., x n , where each clause C j is of the form C j := ℓ j 1 ∨ ℓ j 2 ∨ ℓ j 3 for some literals ℓ j 1 , ℓ j 2 , ℓ j 3 .We now construct a symmetric leader protocol P = (P L , P F ) as follows.
Communication alphabet.First, we specify our alphabet Σ.For each clause C j , we will have a letter c j .Further, we will also have a special letter α.
States of the leader protocol.For each variable x j , the leader will have three states p j , ⊤ j and ⊥ j .The leader's initial and final states will be p 0 and p n respectively.
States of the follower protocol.For each clause C j , the follower will have a state q j .The follower's initial and final states will be q 0 and q m respectively.
Rules of the leader protocol.For each 0 ≤ j ≤ n − 1, the rules for the leader at the state p j are given by the gadget in Figure 10.Intuitively, if the leader decides to move to ⊤ j+1 (resp.⊥ j+1 ) then she has decided to set the variable x j+1 in the formula φ to true (resp.false).Hence, upon moving to ⊤ j+1 (resp.⊥ j+1 ), the leader tries to let the followers know of the clauses which become true because of setting x j+1 to true (resp.false).Rules of the follower protocol.For each 0 ≤ j ≤ m − 1, there is a rule (q j , c j+1 , q j+1 ).Finally, there is a special rule (q 0 , α, q m ).Intuitively, by taking a rule of the form (q j , c j+1 , q j+1 ) a follower either moves with another follower taking the same rule or the follower has heard from the leader that the clause c j+1 becomes true because of the choices that the leader has made.Further, if a follower takes the special rule (q 0 , α, q m ), then either that follower is moving with another follower taking the same rule or the follower is helping the leader traverse some gadget of the leader protocol.
Intuition behind the construction.We now give an intuition behind the construction of the protocol.By a straightforward argument, we can show that there always exists an even number e such that C e init can reach C e fin in this protocol.Hence, the interesting part of the proof is to show that the formula φ is satisfiable if and only if there exists an odd number o such that C o init can reach C o fin .Now, assume that we have an odd number o of followers which start at q 0 and the leader starts at p 0 .By construction, whenever the leader traverses a gadget, two followers would have to take the special rule (q 0 , α, q m ) in order for the leader to take the two rules associated with the letter α in each gadget.Further, in addition to this, if at any given point in time, a follower takes the special rule (q 0 , α, q m ) then another follower would be forced to take the same rule at that point in time as well.Hence, it follows that if C o init can reach C o fin , then only an even number of followers along this run can use the special rule (q 0 , α, q m ).Since all the followers must reach q m at the end, it must be the case that at least an odd number of followers go from q 0 to q m via the "long" path, i.e., using the rules (q 0 , c 1 , q 1 ), (q 1 , c 2 , q 2 ), . . ., (q m−1 , c m , q m ).Now, for each rule (q i , c i , q i+1 ), either a follower can "pair up" with another follower and take this rule or a follower can wait for the leader to take any one of her rules corresponding to the letter c i .Since an odd number of followers take this long path, not all of them can pair up with another follower.Hence, it must be the case that for each c i , at least one follower waits for the leader to take a rule corresponding to c i .Since this can happen only if the leader has made a sequence of choices for the variables x 1 , . . ., x m which make the clause c i true, it would then follow that C o init can reach C o fin if and only if the formula φ is satisfiable.
Proof of correctness of the reduction.We claim that there is a cut-off for this symmetric leader protocol if and only if the formula φ is satisfiable.First, note that from the configuration C 2n init we can reach C 2n fin .Indeed, the following run, which only uses rules corresponding to the letter α, is a valid run from C 2n init to C 2n fin : p 0 , 2n • q 0 → ⊤ 1 , (2n − 1) • q 0 , q m → p 1 , (2n − 2) • q 0 , 2 • q m → ⊤ 2 , (2n − 3) • q 0 , 3 • q m → p 2 , (2n − 4) • q 0 , 4 • q m → • • • → ⊤ n−1 , q 0 , (2n − 1) • q m → p n , 2n • q m .Therefore, for our reduction to be correct, by Proposition 8.4, it suffices to prove that there exists k such that there is a run from C 2k+1 init to C 2k+1 fin if and only if the formula φ is satisfiable.
(⇐): Suppose φ is satisfiable.Let T be a satisfying assignment of φ.Let var(x j ) be ⊤ j if T (x j ) is true and let it be ⊥ j otherwise.Let k := m + n.We now construct a run from C 2k+1 init to C 2k+1 fin .By construction, the follower protocol does not have any bad states.Hence, by Proposition 8.7 and the monotonicity property, from C 2k+1 init we can reach the configuration First := C 2n+1 init + 1≤i≤m 2 • q i .Hence, it suffices to construct a run from First to C 2k+1 fin .Let U be the empty set.From the configuration First, we construct a run which moves the leader from p 0 to p n .To begin with, the leader is at the state p 0 in the configuration First.Now, suppose we are currently in some configuration where the leader is at the state p j for some index j and we want the leader to go to the state p j+1 .First, we move the leader from p j to var(x j+1 ) and a single follower from q 0 to q m by using the rules (p j , α, var(x j+1 )) and (q 0 , α, q m ) respectively.Then as long as the leader is at the state var(x j+1 ), we do the following: • If there is a rule (var(x j+1 ), c k , var(x j+1 )) such that c k / ∈ U , then we keep the leader at var(x j+1 ) by using the rule (var(x j+1 ), c k , var(x j+1 )) and move one follower from q k−1 to q k by using the rule (q k−1 , c k , q k ).Then, we add the letter c k to the set U .
• If there is no such rule, then we move the leader from var(x j+1 ) to p j+1 by using the rule (var(x j+1 ), α, p j+1 ) and move one follower from q 0 to q m by using the rule (q 0 , α, q m ).
Let us analyze this run a bit more closely.Fix some letter c k .Notice that the number of times a rule corresponding to the message c k is fired by the leader is at most once.Indeed, if we consider the first point in our run when such a rule is fired, a necessary precondition for that to happen is that c k is not present in the contents of U at that point.However, once we fire such a rule, we immediately add c k to our set U , thereby preventing the firing of any such rule in the future.
Further, since T is a satisfying assignment to φ, there must be a smallest index j such that setting the value of the variable x j to T (x j ) satisfies the clause C k .By construction of the gadgets of the leader protocol, this means that when the leader moves to the state var(x j ) along this run, the letter c k is not present in the contents of U at that time and there is a rule (var(x j ), c k , var(x j )) in the leader protocol.According to our construction of the run, this means that the leader fires the rule (var(x j ), c k , var(x j )).Hence, it follows that for every 1 ≤ k ≤ m, a leader rule corresponding to the letter c k is fired exactly once during this run.
With this observation, let us examine the effect of this run on the followers.For each 0 ≤ j ≤ n − 1, for the leader to traverse the gadget from p j to p j+1 , exactly two followers fire the rule (q 0 , α, q m ).In addition to this, we know that for each c k , the leader fires exactly one rule corresponding to c k during the run.Whenever, the leader fires such a rule, the run also forces a follower to fire the rule (q k−1 , c k , q k ).Hence, it follows that for each k, exactly one follower moves from q k−1 to q k .Therefore, at the end of this run, we would have reached the configuration Second := C 2n+1 fin + 1≤i≤m 2 • q i .Using Proposition 8.7 and the monotonicity property, from Second we can reach C 2k+1 fin , thereby completing the construction of the required run.
(⇒): Suppose there exists k such that there is a run ρ from C 2k+1 init to C 2k+1 fin .First, observe that for every 1 ≤ j ≤ n, by construction of the protocol, the leader has to visit exactly one of the states ⊤ j or ⊥ j along this run.To be more precise, there is exactly one state s j ∈ {⊤ j , ⊥ j } for which there exists a configuration C j along this run such that C j (s j ) > 0. This suggests a natural assignment T for the variables of φ: Set T (x j ) to true if s j = ⊤ j and otherwise, set T (x j ) to false.The rest of the proof is devoted to proving that T is a satisfying assignment of φ.To prove this, we will actually show that for every 1 ≤ j ≤ m, there is an occurrence of a leader rule corresponding to the message c j at some point along the run ρ.By construction of our assignment T and the leader protocol, this would immediately imply that T is a satisfying assignment for φ. fin .For every 0 ≤ j ≤ n − 1, let R j α = {(p j , α, ⊤ j ), (p j , α, ⊥ j ), (⊤ j , α, p j+1 ), (⊥ j , α, p j+1 )}.We claim that for every j, there are exactly two occurrences of rules from R j α in ρ.First, only at most two rules of R j α can appear in ρ, since otherwise it would mean that the leader visited both ⊤ j and ⊥ j , which we have already established as a contradiction.Further, for the leader to move out of the state p j and go to p n , by construction of the protocol, at least two of these rules must be fired.It then follows that if we set R α := 0≤j≤n−1 R j α , then there are exactly 2n occurrences of rules from R α in ρ.
Let us now observe the parity of the number of occurrences of the rule r := (q 0 , α, q m ) along ρ.Notice that for every i, the rule r can appear exactly once in the pair (r i , r ′ i ) if and only if the other rule in the pair belongs to R α .Since the number of occurrences of rules from R α is exactly 2n, it follows that the number of occurrences of the rule r in ρ is even.Since the initial configuration has an odd number of follower agents in q 0 , it follows that the number of occurrences of the rule r c 1 := (q 0 , c 1 , q 1 ) is odd and hence non-zero.By definition of the run ρ and the follower protocol, for every i, the number of times the rule r c i := (q i−1 , c i , q i ) occurs in ρ must be equal to the number of times the rule r c i+1 := (q i , c i+1 , q i+1 ) occurs in ρ.It then follows that the all the rules in the set {r c i : 1 ≤ i ≤ m} occur an odd number of times in ρ.
Let us fix some 1 ≤ j ≤ m and let us consider the rule r c j .Since it appears an odd number of times in ρ, there must be an index i such that exactly one rule in the pair (r i , r ′ i ) is r c j .The only possibility for the other rule in that pair is a leader rule of the form (p, c j , p) for some state p.Hence, we have shown that there is at least one occurrence of a leader rule corresponding to the message c j along the run ρ.Since j was an arbitrary number between 1 and m, the proof is complete.

Conclusion
We have shown that the cut-off problem for Petri nets and rendez-vous protocols is Pcomplete.For the special case of symmetric rendez-vous protocols we have proved that the cut-off problem is in NC for the leaderless case and is NP-complete in the presence of a leader.Further, we have also studied the bounded-loss cut-off problem and shown that it is P-complete and NL-complete for leaderless rendez-vous and leaderless symmetric protocols respectively.Many of these results follow from two lemmas, the Scaling and Insertion lemmas, which we believe might be of independent interest.As future work, it might be worth studying other variants of the cut-off problem dealing with different types of properties such as liveness specifications.

Figure 1 :
Figure 1: An example of a rendez-vous protocol

C
r,r ′ = = ⇒ C ′ over the protocol P if and only if C t r,r ′ −−→ C ′ over the Petri net N P .Consequently, it follows that C * = ⇒ C ′ over the protocol P if and only if C * − → C ′ over the Petri net N P .

Figure 2 :
Figure2: Petri net corresponding to the protocol from Figure1 Proposition 3.1 [Mur89, Theorem 16].Let (N , M, M ′ ) be an acyclic Petri net system.For every vector x ∈ N T , x is a solution of the marking equation if and only if there is a firing sequence σ such that − → σ = x and M σ − → M ′ .Consequently, M * − → M ′ if and only if the marking equation has a nonnegative integer solution.

4.1. 1 .
Reachability in continuous Petri nets.Petri nets can be given a continuous semantics (see e.g.[AD98, RHS10, FH15]), in which markings are continuous multisets; we call them continuous markings.A continuous marking M enables a transition t with factor λ ∈ (0, 1] if M (p) ≥ λ • P re[p, t] for every place p; we also say that M enables λt.If M enables λt, then λt can fire or occur, leading to a new marking M ′ given by M ′ (p) = M (p) + λ • A[p, t] for every p ∈ P .We denote this by M λt −→ Q M ′ , and say that M ′ is reached from M by firing λt.A continuous firing sequence is any sequence of the form σ Lemma 4.3.Let M be a marking such that M σ −→ Q for some continuous firing sequence σ.
and the claim is proved.By the claim we have M 1 σ − →; moreover σ − → M ′ , and n − → σ is a solution of the marking equation for Lemma 4.7 (Insertion Lemma).Let k ∈ N and let M, M ′ , L, L ′ be markings of N satisfying M σ − → M ′ for some σ and L ′ = L + Ay for some y ∈ Z T such that y ⊆ σ .Then µM + kL * − → µM ′ + kL ′ for µ = αk + α∥ − → σ ∥nw + ∥y∥nw , where α ∈ N is the smallest number such that α1 + y ≥ 0, w is the weight of N and n is the number of places in • σ .

5. 1 .
Characterizing systems with cut-offs.We generalize the characterization of Theorem 3.3 for acyclic Petri net systems to general ones.Theorem 5.1.A Petri net system (N , M, M ′ ) admits a cut-off if and only if there is a continuous firing sequence σ such that M σ −→ Q M ′ and the marking equation has a solution y ∈ Z T such that y ⊆ σ .Proof.(⇒): Assume (N , M, M ′ ) admits a cut-off.By Lemma 3.2, there exist n ∈ N and firing sequences τ, τ ′ such that nM τ

Figure 4 :
Figure 4: A modification of the protocol from Figure 1

M
′′ .By the Scaling lemma (Lemma 4.6), there exists some n ∈ N and some firing sequence τ such that n • init τ − → n • M ′′ and τ = σ .Further, since y ∈ Q T ≥0 , it follows that there exists a k ∈ N such that ky ∈ N T and so the smallest number α ∈ N such that α1 + ky ≥ 0 is in fact 0. Let M = n • init and M ′ = n • M ′′ .To summarize, we have that M τ − → M ′ and k • fin = k • init + A(ky) where ky = y ⊆ σ = τ .Let µ = ∥y∥n ′ w , where n ′ is the number of places in • τ and w is the weight of N P .By the Insertion lemma (Lemma 4.7), it follows that for any s ∈ N, µM + sk • init * − → µM ′ + sk • fin .Unpacking the definition of M , it follows that for any s ∈ N, (µn + sk) • init * − → µM ′ + sk • fin (6.1)

Figure 5 :
Figure 5: Petri net corresponding to the protocol from Figure 4 Figure 6: A symmetric protocol

Lemma 7. 8 .
There exists k ∈ N such that C 2k+1 init * − → C 2k+1 fin if and only if the marking equation for (N P , init , fin ) has a solution x over the field F 2 such that x[t] = 0 for every useless transition t.

(
⇒): Suppose there exists k ∈ N and a firing sequence σ such that C 2k+1 init σ − → C 2k+1 By the marking equation it follows that C 2k+1 fin = C 2k+1 init + A − → σ .Taking modulo 2 on both sides of this equation, we have that − → σ mod 2 is a solution to the marking equation over the field F 2 .

Figure 9 :
Figure 8: The leader protocol Proposition 8.4 [HS20, Lemma 18].A symmetric leader protocol admits a cut-off if and only if there exist an even number e and an odd number o such that C e init can reach C e fin and C o init can reach C o fin .

Proposition 8. 8 .
For any two configurations C and C ′ we have that C * = ⇒ C ′ over the protocol P if and only if C * − → C ′ over the Petri net N P .Because of Proposition 8.8 and Proposition 8.4 to decide whether P admits a cut-off, it suffices to give an NP algorithm which decides if there is an even number e and an odd number o such that C e init can reach C e fin and C o init can reach C o fin over N P .The forthcoming subsections are dedicated to proving that such an NP algorithm exists.

Lemma 8. 11 .
For every par ∈ {0, 1}, there exists k ∈ N such that C k init * − → C k fin and k ≡ par mod 2 if and only if there exist n ∈ N, x ∈ N T such that n ≡ par mod 2, (C n init , x) is compatible and C n fin = C n init + Ax.Proof.(⇒): Suppose there exist k ∈ N and a firing sequence σ such that k ≡ par mod 2 and C k init σ − → C k fin .Let x = − → σ .By the marking equation C k fin fin .Similarly we can check if there exists l ∈ N such that C 2l+1 init * − → C 2l+1 fin .
Figure 10: Gadget at state p j .Here C k 1 , . . ., C kr denote the set of all clauses in which the literal x j appears and C l 1 , . . ., C lw denote the set of all clauses in which the literal x j appears.
Let ρ := C 2k+1 init r 1 ,r ′ 1 = == ⇒ C 1 r 2 ,r ′ 2 = == ⇒ C 2 . . .rw,r ′ w = === ⇒ C 2k+1 Suppose B is a bounded-loss cut-off for P. Hence, for every n, there exists a markingD n such that C n init can reach D n and D n (fin) ≥ n − B.In particular for any n > B, it follows that C n init can reach a marking D n such that D n (fin) > 0. By Remark 5.7, it follows that C n init can reach C n fin .Hence, for every n > B, C n init can reach C n fin and so B + 1 is a cut-off for P.
n be C n init and for n ≥ B, let D n be C n fin .By definition of B, it follows that for every n, C n init can reach D n and D n (fin) ≥ n − B. Hence, B is also a bounded-loss cut-off for P.
• |Q F | and let k = λ + n.Note that k ≡ par mod 2. Similar to the proof of the Insertion Lemma (Lemma 4.7), we now construct the required run in three stages.First, by Proposition 8.7 and the monotonicity property, from C k init we can reach the marking First := C n init + q∈Q F 2∥x∥ • q .Next, notice that since (C n init , x) is compatible, so is (First, x).By the Compatibility lemma (Lemma 8.10), it follows that there is a firing sequence ξ and a configuration Second such that − → ξ = x and First By the marking equation, it follows that Second = C n fin + q∈Q F 2∥x∥ • q .Finally, by Proposition 8.7 and the monotonicity property, we can reach the marking C k fin from Second, which concludes the construction.Lemma 8.12.Given a symmetric leader protocol, deciding whether it admits a cut-off can be done in NP.Proof.By Proposition 8.4, it suffices to decide if there exist an even number e and an odd number o such that C e By Lemma 8.11, this is possible if and only if there exist k ∈ N and x ∈ N T such that (C 2k init , x) is compatible and C 2k fin = C 2k init + Ax.By definition of compatibility, this is equivalent to saying that there exist k ∈ N, x ∈ N T and a subset S of leader transitions such that x = S, C 2k fin = C 2k init + Ax and every vertex is reachable from the vertex init L in the graph G(S).