Abstract 1 Introduction 2 Our contributions 3 Semi-streaming algorithms for CFCN and CFON colorings 4 Semi-streaming algorithm for CFON coloring using (𝟏+ϵ)𝚫 colors 5 Concluding remarks References Appendix A Proof of Lemma 2 Appendix B Proof of Lemma 13 Appendix C Streaming algorithm for CFON coloring using 𝑶(𝒏) colors

Streaming Algorithms for Conflict-Free Coloring

Rogers Mathew ORCID Department of Computer Science and Engineering, IIT Hyderabad, India Fahad Panolan ORCID School of Computer Science, University of Leeds, UK Seshikanth Department of Computer Science and Engineering, IIT Hyderabad, India
Abstract

Conflict-free coloring of a hypergraph =(V,) using k colors is a function f:V{1,2,,k} such that for all E, there exists a vertex vE with a unique color. That is, f(v)f(u) for all uE{v}. The minimum k for which has a conflict-free coloring using k colors is called the conflict-free chromatic number of . For a simple graph G, a conflict-free coloring of the hypergraph with vertex set V(G) and edge set being the set of all closed neighborhoods of the vertices in G is called a conflict-free closed neighborhood (CFCN) coloring of G. CFCN chromatic number, denoted by χCN(G), is the minimum number of colors used in a conflict-free closed neighborhood coloring of G. Analogously, we define conflict-free open neighborhood (CFON) coloring and CFON chromatic number, χON(G), of a graph G.

There are various works on proving upper and lower bounds of χON(G) and χCN(G). In this work, we develop streaming algorithms for CFCN and CFON coloring of a graph where the number of colors used matches the best-known upper bounds of χON(G) and χCN(G). Our algorithms use as input an edge stream of the graph G in the insertion-only model. Our results and the best-known bounds for χON(G) and χCN(G) are given below.

  1. 1.

    Pach and Tardos [Combinatorics, Probability and Computing, 2009] showed that, for any n vertex graph G, χCN(G)=O(ln2n). Glebov, Szabó and Tardos [Combinatorics, Probability and Computing, 2014] showed the existence of graphs G with χCN(G)=Ω(ln2n). We design a randomized single-pass semi-streaming algorithm (i.e., it uses O(nlnn) space111The space complexity is in terms of number of words. that, given an n-vertex graph G, outputs a CFCN coloring of G using O(ln2n) colors with probability at least (12n).

  2. 2.

    Bhyravarapu, Kalyanasundaram, Mathew [Journal of Graph Theory, 2021] showed that for a graph G with maximum degree Δ, χCN(G)=O(ln2Δ). The methods used by our algorithms give rise to a simpler, alternate proof for this bound.

  3. 3.

    It is known that χON(G)1/2+2n+1/4 (See Pach and Tardos [Combinatorics, Probability and Computing, 2009] and Ph.D. thesis of Cheilaris). This bound is asymptotically tight.

    • We design a deterministic single-pass O(nn) space streaming algorithm that, given a graph G on n vertices, finds a CFON coloring using 2n colors.

    • We design a randomized, single-pass, semi-streaming algorithm to find a CFON coloring of a graph G using O(nln2n) colors with success probability at least (12n).

  4. 4.

    It is known that χON(G)Δ+1, where Δ is the maximum degree of a vertex in G. Further, there are graphs G known with χON(G)=Δ+1. We design a randomized two-pass semi-streaming algorithm (uses O(1ϵ2nln3n) space) that outputs a CFON coloring of G using (1+ϵ)Δ colors, for any ϵ>0, with a probability at least (11n).

Keywords and phrases:
Streaming algorithm, conflict-free coloring, vertex coloring, randomized algorithms
Copyright and License:
[Uncaptioned image] © Rogers Mathew, Fahad Panolan, and Seshikanth; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Streaming, sublinear and near linear time algorithms
Editors:
Pat Morin and Eunjin Oh

1 Introduction

Conflict-Free coloring (or CF coloring) of a hypergraph is a coloring of its vertices in which each hyperedge sees some color exactly once. The minimum number of colors required for the CF coloring of a hypergraph , denoted by χCF(), is called the conflict-free chromatic number of . Motivated by its application in a frequency assignment problem in cellular networks, conflict-free coloring was introduced in 2002 by Even, Lokter, Ron, and Smorodinsky [17].

Cellular networks consist of base stations and mobile agents. Base stations, represented as vertices, are stationary and serve as the network’s core, while mobile agents are clients served by base stations. Each base station operates on a fixed frequency, represented by a color. To establish a connection with a base station, an agent’s device must tune itself to that base station’s frequency. Agents can be within the range of multiple base stations. The range of communication for each agent is defined by a hyperedge, which represents the set of base stations it is capable of communicating with. To prevent interference, frequencies must be assigned to base stations in a conflict-free manner as described below. Every mobile agent should be able to find some base station in its vicinity that operates in a frequency that is distinct from that of all the other base stations in its vicinity. In combinatorial terms, this is about coloring the base stations in such a way that every agent sees a base station of a unique color in the hyperedge associated with it. While assigning n different frequencies to n base stations can solve the problem, it is expensive. Therefore, a scheme that allows the reusing of frequencies, whenever possible is preferred to minimize expenses.

Recently, conflict-free coloring and its variants were used in [19] to get improved results on a problem in coding theory, namely the Pliable Index Coding problem. Also, CF coloring has found applications in battery consumption analysis in sensor networks, in certain problems related to RFID protocols, in the vertex ranking problem (also known as ordered coloring, which finds applications in various fields, such as VLSI design and operations research), etc. See [25, 24, 19, 17, 14, 16, 18, 23, 21, 15] for more details.

We define below two popular variants of the conflict-free coloring of graphs that have been extensively studied. Given a graph G, the open neighborhood of a vertex v in G, denoted by NG(v), is the set of vertices adjacent to v in G. The closed neighborhood of a vertex v in G, denoted by NG[v], is defined as {v}NG(v). A coloring of the vertices of G using k colors is a Conflict-Free Closed Neighborhood coloring (CFCN coloring) if every vertex v sees some color exactly once in its closed neighborhood NG[v]. The minimum k for which such a coloring exists is called the Conflict-Free Closed Neighborhood chromatic number (or CFCN chromatic number) of G. It is denoted by χCN(G). Analogously, one can define Conflict-Free Open Neighborhood coloring (CFON coloring) and Conflict-Free Open Neighborhood chromatic number (CFON chromatic number) of a graph by replacing “closed neighborhood” with “open neighborhood” in the above definitions. It is denoted by χON(G). It is easy to see that for any graph G, χCN(G) is at most its chromatic number as in any proper coloring of G, every vertex v sees its color exactly once in its closed neighborhood NG[v]. However, there are graphs G for which χON(G) is arbitrarily larger than its chromatic number. For any positive integer r, Example 4 gives bipartite graphs (and hence its CFCN chromatic number is at most 2) with CFON chromatic number at least r. It is known that for any graph G with maximum degree Δ, (i) χCN(G)=O(ln2Δ) (see [12]), and (ii) χON(G)Δ+1 (see [23]). Both these bounds are asymptotically tight (see Section 2 for more details).

In this paper, we focus on semi-streaming algorithms (Refer [22] for more information on graph streams) for conflict-free coloring of graphs. We consider only graph streams that are insert-only. Below, we define an insert-only graph stream. We consider streams consisting of a sequence of undirected edges e=(u,v), where u,v[n]={1,2,,n}. Such a stream, S=e1,e2,,em naturally defines an undirected graph G=(V,E), where V=[n] and E={e1,,em}. We assume the stream elements are distinct, and therefore, the resulting graph is a simple graph. An algorithm for graphs is a semi-streaming graph algorithm if it takes as input a graph stream and does all the computations using O(npolylog(n)) bits of space, where n is the number of vertices of the graph. The efficiency of a graph algorithm in a streaming model is measured by the space it uses, the time it requires to process each edge, and the number of passes it makes over the graph stream. Extensive research has been conducted on semi-streaming algorithms for proper coloring of graphs, as demonstrated in several notable works [4, 5, 8, 3, 9, 1]. Similarly, edge coloring has been thoroughly explored in the context of streaming algorithms, with notable contributions found in [7, 2]. However, to the best of our knowledge, there is no streaming algorithm known for conflict-free coloring of graphs. We describe our results and methods in the section below.

2 Our contributions

First, we state a few results from the literature. Then we explain our results and briefly describe the key ideas involved. Please note that the space used by the algorithms mentioned below is in terms of the number of words.

Auxiliary results from the literature.

The following results on conflict-free coloring are due to Pach and Tardos [23].

Proposition 1 (Theorem 1.1 in [23]).

Let =(V,) be a hypergraph, where every vertex is present in at most Δ hyperedges. Then χCF()Δ+1. Moreover, there is a deterministic O(nΔ) time (and hence O(nΔ) space) algorithm that obtains such a coloring.

Proposition 2 (Theorem 1.2 in [23]).

For any positive integers t and Γ, the conflict-free chromatic number of any hypergraph in which each edge is of size at least 2t1 and each edge intersects at most Γ others is O(tΓ1tlnΓ).

As a corollary of Proposition 2, it is proved that χON(G)12+2n+14. Cheilaris gave an alternate proof to to this result [14].

Proposition 3 (Proposition 4.40 in [14]).

For every graph G, χON(G)2n.

From Example 4, we infer that the bound in Proposition 3 is asymptotically tight.

Example 4.

Let Kr denote the graph obtained from a complete graph on r vertices by subdividing every edge exactly once. This graph with (r2)+r vertices and with a maximum degree of r1 is known to have a CFON chromatic number of r. Here, subdividing an edge uv means introducing a new vertex w and replacing the edge uv with edges uw and wv.

Our methods and results.

Pach and Tardos [23] showed that, for any graph G, χCN(G)=O(ln2n) where n is the number of vertices in G. Glebov, Szabó and Tardos [18] showed the existence of graphs G with χCN(G)=Ω(ln2n).

Result 1: There is a randomized, single-pass, O(nlnn) space streaming algorithm that, given an n-vertex graph G, outputs a CFCN coloring of G using O(ln2n) colors with probability at least (12n).

Our algorithm partitions the vertex set into two parts: Part A, which is made of vertices of degree at least 2clnn for some constant c, and Part B, which is the set of all the remaining vertices (which are of degree less than 2clnn). Part A is further partitioned into two parts, namely A and A′′. The set A′′ is made of all vertices in A that have no neighbor in B. We choose a random coloring for the vertices in A from a geometric distribution. Then, we will show that, with high probability, every vertex in A′′ sees some color exactly once in its open and closed neighborhood.

Next, we construct a hypergraph =(B,), where ={NG[v]B:vAB}{NG(v)B:vAB,NG(v)B)}. Observe that the maximum degree of is at most 2clnn and hence can be CF colored by the greedy procedure given in Proposition 1 using 2clnn+1 colors. Finally, we observe that the union of the two colorings explained above (let this coloring be c) is a CFCN coloring of G and obtain Result 1. Moreover, we observe that for many vertices, there is a unique color in its open neighborhood as well. More specifically, let B1={bB:NG(b)B=}. We prove that for any vertex vV(G)B1, there is a unique colored vertex in NG(v). Also, notice that for all bB1, |NG(b)|=O(lnn) and NG(b)A. So in the semi-streaming algorithm, we store the neighborhood information of the vertices in B1 and obtain a CFON coloring c of the graph induced on AB1 using at most O(n) colors. Then, the coloring co defined as co(v)=(c(v),c(v)) for all v, is a CFON coloring of G using O(nln2n) colors. Here, for convenience, assume that c(v)=1 if vAB1. This gives us the following result on CFON coloring.

Result 2: There is a randomized, single-pass, semi-streaming algorithm that, given a graph G on n vertices, finds a CFON coloring using O(nln2n) colors and in polynomial time with probability at least (12n).

From Proposition 3, we know that χON(G)2n. This bound is asymptotically tight due to Example 4. Our next result, whose proof has been moved to the appendix due to the paucity of space, is the following.

Result 3: There is a deterministic, single-pass, O(nn) space streaming algorithm that, given a graph G on n vertices, finds a CFON coloring using 2n colors.

For a graph G, with maximum degree Δ, Pach and Tardos [23] in the year 2009 showed that χCN(G)=O(ln2+ϵΔ) for any ϵ>0. As mentioned above, in 2014, Glebov, Szabó, and Tardos [18] proved that there exist graphs G on n vertices with χCN(G)=Ω(ln2n) (and thereby Ω(ln2Δ)). In the year 2021, Bhyravarapu, Kalyanasundaram, and Mathew [12] tightened the upper bound to show that χCN(G)=O(ln2Δ). The methods we use in proving Result 1 give us an alternate, shorter proof (which is given below).

Proof of 𝝌𝑪𝑵(𝑮)=𝑶(𝐥𝐧𝟐𝚫).

We partition V(G)=AB, where A={vV(G):degG(v)2t1}, B=V(G)A and t=lnΔ. Further, let A=A1A2 where A1={aA:(NG(a)B)} and A2=AA1. We define a hypergraph 2=(A,2) where 2={NG[a]:aA2}. From the definition of A2,NG[a]A,aA2. Applying Proposition 2 with t=lnΔ,Γ=Δ2, we get χCN(2)=O(log2Δ). This coloring of the vertices of A ensures that every vertex in A2 sees some color exactly once in its closed neighborhood in G. We define another hypergraph 1=(B,1),1={NG[v]B:vA1B}. Since the degree of a vertex in B in graph G is at most 2lnΔ2, we can conclude that every vertex in 1 is present in at most 2lnΔ1 hyperedges. Applying Proposition 1 on 1, we get χCN(1)2lnΔ. We make sure that the set of colors used to color 2 is disjoint from the set of colors used to color 1. This coloring of the vertices of B ensures that every vertex in A1B sees some color exactly once in its closed neighborhood in G.

It is known that χON(G)Δ+1, where Δ is the maximum degree of a vertex in G (follows from Proposition 1). From Example 4, we know that this bound is tight. Our next result is the following.

Result 4: There is a two-pass semi-streaming algorithm (uses O(1ϵ2nln3n) space) that outputs a CFON coloring of G using (1+ϵ)Δ colors, for any ϵ>0, with probability at least (11n).

In our algorithm of Result 4, we use the pallete sparsification lemma of Assadi, Chen, and Khanna [4]. For each vertex vV(G), we sample a set L(v) of O(1ϵlnn) colors from [(1+ϵ)Δ]. In the first pass of the stream, for each vertex v, we identify a special vertex s(v) that will get a unique color among NG(v) in our coloring. In the second pass, using the list of colors and special vertices, we find a sketch H of G of size O(1ϵ2nln2n). Finally, we do a greedy procedure on H to get a CFON coloring.

We observe that any O(1)-pass streaming algorithm that determines if the CFCN (CFON) chromatic number of an input graph is at most 2 or not, requires Ω(n) space. The proofs of both the results are by reductions from the two player communication problem Disjointness (refer [20]). In this problem, Alice and Bob are given two strings of length n (say the strings given to them are p1pn and q1qn, respectively), and they are disjoint if there is no i[n] such that pi=1 and qi=1. It is known that any protocol (even randomized) solving Disjointness requires at least Ω(n) space.

Proof of lower bound for CFCN.

Figure -2: pi=0, qi=0, χCN=2.
Figure -1: pi=1, qi=0, χCN=2. We get similar graph for pi=0, qi=1.
Figure 0: pi=1, qi=1, χCN=3.
Figure 1: An illustration of the cases in the construction of the graph G(I). The CFCN chromatic number of the rightmost graph is 3, and the CFCN chromatic number of the other two graphs is 2.

Consider an instance I of the Disjointness Problem where Alice is given an n-bit string p1pn and Bob is given an n-bit string q1qn. Together they construct a graph G(I) on 5n vertices whose vertices are ai,bi,ci,di,xi, where 1in. For every i, Alice adds the edges aibi, bici, cidi, diai to form n 4-cycles. Further, for every i, (i) if pi=1, then Alice adds the edge bixi, and (ii) if qi=1, then Bob adds the edge cixi. For each i, they create one or two components of G(I) which is isomorphic to one of the graphs in Figure 1. The graph when both the corresponding bits intersect (i.e., pi=qi=1) require at least 3 colors for any CFCN coloring. It can be verified that the graph G(I) thus constructed has its CFCN chromatic number at most 2 if and only if I is a YES instance of the Disjointness problem.

Proof of lower bound for CFON.

Figure -1: pi=0, qi=0, χON=2.
Figure 0: pi=1, qi=0, χON=2. We get similar graph for pi=0, qi=1.
Figure 1: pi=1, qi=1, χON=3.
Figure 2: An illustration of the cases in the construction of the graph H(I). The CFON chromatic number of the rightmost graph is 3, and the CFON chromatic number of the other two graphs is 2.

For this purpose, given an instance I, Alice and Bob together construct a graph H(I) on 6n vertices, namely ai,bi,ci,di,ei,fi, 1in, as described below: For every i, Alice adds the edges aibi,cidi,diei,eifi. Further, for every i, (i) if pi=1, then Alice adds the edge aifi, and (ii) if qi=1, the Bob adds the edge bici. If there exists i such that pi=qi=1, then H(I) has a connected component which is a cycle of length 6 and we need at least 3 colors in any CFON coloring of it. Otherwise each connected component of H(I) is a path and its CFON chromatic number is at most 2. See Figure 2 for an illustration.

3 Semi-streaming algorithms for CFCN and CFON colorings

In this section, we prove the following theorems.

Theorem 5.

There exists a randomized, single-pass, semi-streaming algorithm that, given a graph G with n vertices, with probability at least (12n), finds a CFCN coloring using O(ln2n) colors, using O(nlnn) space and in polynomial time.

Theorem 6.

There exists a randomized, single-pass, semi-streaming algorithm that, given a graph G on n vertices, with probability at least (12n), finds a CFON coloring using O(nln2n) colors, using O(nlnn) space and in polynomial time.

Towards that, we first prove the following lemma about conflict-free coloring. The bound obtained on the number of colors used to do a conflict-free coloring of the hypergraph defined in this lemma can be obtained by directly substituting the values t=2lnr and Γ=2n in the statement of Proposition 2 that was proved in [23]. However, Proposition 2 would only ensure that such a coloring exists with positive probability. In the lemma below, we modify the proof of this proposition to obtain such a coloring with high probability. For the sake of completeness, we provide the proof of this lemma in the appendix.

Lemma 7 ().
222Proof of results marked with are deferred to the appendix.

Let =(V,) be a hypergraph with |V|=n, ||2n, and |E|4lnr1 for all E, where rmax{7,n} is a positive integer. Then, Algorithm 1, which takes as input V runs in O(nln2r) time, uses O(n) space and with probability greater than (12r) returns a conflict-free coloring of that uses at most 16eln2r colors.

Algorithm 1 Randomized Algorithm for CF coloring of .

Next, we prove the following lemma that gives a coloring such that a subset of the vertices with “large” degree gets a unique color in its open and closed neighborhoods.

Lemma 8.

Let G1 be a graph on n1 vertices, where V(G1)=XY. Suppose for all xX,degG1(x)4lnr11, where r1 is a positive integer with r1max{n1,7}. Let c1 be the coloring c1:V(G1)[16eln2r1] obtained by invoking Algorithm 1 with V(G1) as input. Then, with probability 12r1, every vertex in X sees some color exactly once in its open and closed neighborhoods.

Proof.

Proof follows from the application of Lemma 2 with 1=(𝒱1,1) defined as 𝒱1=V(G1) and 1={NG1[v]:vX}{NG1(v):vX}.

Algorithm 2 Deterministic Algorithm for conflict-free coloring of G2.
Lemma 9.

Let r2+ and let G2 be a graph on n2 vertices, where V(G2)=XY with the following properties: (i) X is an independent set, (ii) for all xX,NG2(x)Y, and (iii) for all yY,degG2(y)<4lnr21. Then, Algorithm 2 is a greedy, deterministic algorithm that runs in O(n2lnr2) time and O(n2lnr2) space, and outputs a coloring of vertices in Y using at most (8lnr2) colors with the following properties.

  1. (a)

    Every vertex in V(G2) sees some color exactly once in its closed neighborhood.

  2. (b)

    Every vertex vV(G2) with NG2(v)Y sees some color exactly once in its open neighborhood.

Proof.

The hypergraph 2 constructed in step 1 of Algorithm 2 takes O(n2lnr2) space because the degree of this hypergraph is at most 8lnr2. It is easy to see that a conflict-free coloring of 2 will ensure properties (a) and (b). Proposition 1 gives a conflict-free coloring of 2 in O(n2lnr2) time and O(n2lnr2) space using at most 8lnr2 colors.

Algorithm 3 Algorithm for conflict free coloring.
Lemma 10.

Let G be a graph on n vertices, where

  • V(G)=AB, A=AA′′, A={aA:NG(a)B},A′′=AA,

  • for all aA,degG(a)(4lnn1), and

  • for all bB,degG(b)<(4lnn1).

Algorithm 3 takes as input (i) the sets A,A′′,B, (ii) NG(a)B for all aA, and (iii) NG(b) for all bB, runs in O(nln2n) time, uses O(nlnn) space and gives a coloring c of V(G) using O(ln2n) colors such that with probability greater than (12n) the following holds.

  1. (i)

    c is a CFCN coloring of G.

  2. (ii)

    For every vV(G){bB:NG(b)B=}, v sees some color exactly once in its open neighbourhood.

Proof.

We apply Lemma 8 with the following inputs: G1=(A,E1), where E1={(u,v):u,vA}, X=A′′, Y=A, and r1=n. The algorithm mentioned in Lemma 2, runs in O(nln2n) time, as n1r1=n. It uses O(n) space and outputs the coloring function c1:A[16eln2n]. With probability greater than (12n), every vertex in A′′(=X) will see some color exactly once in its open and closed neighborhoods under the coloring c1 (as well as in c).

Next, we invoke Algorithm 2 with the following inputs: the graph G2=(AB,E2), where X=A, Y=B, r2=n, and E2=E(G)E1. It is important to note that (i) G2 is well-defined as every edge in E2 has both its endpoints in AB, and (ii) A is an independent set in G2. According to Lemma 9, Algorithm 2 outputs the coloring c2:B{16eln2n+1,,16eln2n+8lnn} in O(nlnn) time, using O(nlnn) space, since n2r2=n. By property (a) of Lemma 9, every vertex in AB sees some color exactly once in its closed neighborhood under the coloring c2 (as well as in c). Therefore, we have proved that c is a CFCN coloring of G.

Furthermore, based on the reasoning above, our algorithm takes O(nln2n) time and O(nlnn) space. We have already proved that with probability greater than (12n), every vertex in A′′ will see some color exactly once in its open neighborhoods under the coloring c. By the property (b) of Lemma 9, we know that every vertex v in {uV(G2):NG2(u)Y}=A{bB:NG(b)B}, sees some vertex exactly once in its open neighborhood under the coloring c2 (as well as in c). This proves property (ii) mentioned in the lemma.

Proof of Theorem 5.

The proof follows from the application of Lemma 10 and the following partitioning of the vertex set V:=V(G). We start by partitioning the vertex set V into two sets, namely A and B, where A={vV:degG(v)(4lnn1)} and B=VA using the following procedure . Here, A represents the set of high-degree vertices, while B represents the set of low-degree vertices.

To facilitate the partitioning process, we maintain a list L(v)={u:uNG(v)}. Initially, we set A:= and L(v)=. As each edge (u,v) passes through the stream, we update L(u)=L(u){v} if uVA and L(v)=L(v){u} if vVA. Additionally, if a vertex w satisfies |L(w)|(4lnn1), then we update A:=A{w}. At the end of the stream, we define B:=VA. It is important to note that for any vertex bB, |L(b)|<(4lnn1). Up to this point, the storage requirement for vVL(v) is O(nlnn) space.

Next, for all aA, update L(a) as L(a)={bB:aL(b)}. That is L(a) is the set NG(a)B. Observe that updating L(a)’s can only double the total space used so far. After updating L(a), for all aA, we define A={aA:L(a)} and A′′=AA. We have thus obtained (i) the sets A,A′′,B, (ii) NG(a)B, for all aA, and (iii) NG(b) for all bB. We can now invoke Algorithm 3 with the required inputs to obtain a CFCN coloring function c:V(G)[16eln2n+8lnn]. From Lemma 10, we know that Algorithm 3 requires only O(nlnn) space and runs in polynomial time.

Proof of Theorem 6.

Given a graph G=(V,E), we follow the same partitioning procedure mentioned in Theorem 5. That is, A={vV:degG(v)(4lnn1)}, and B=V(G)A. We again partition BV into two sets: B=B1B2, where B1={bB:NG(b)B=} and B2=BB1 That is, using similar steps as in the case of Theorem 5, we get the partition of V(G) into AA′′B1B2. Moreover, we also get L(b)=NG(b) for all bB in O(nlnn) space. Now we invoke Algorithm 3 with the required inputs to obtain a coloring c:V(G)[16eln2n+8lnn]. From Lemma 10, we know that Algorithm 3 requires only O(nlnn) space and runs in polynomial time. Moreover, with probability greater than 12n, for every vV(G){bB:NG(b)B=}, v sees some color exactly once in its open neighbourhood.

We now invoke Proposition 3 (or an algorithmic version of it (see Theorem 18)) on the graph G=(AB1,E) where E={(a,b)E(G):aA,bB1} and get a CFON coloring c:V(G)[2n] of G. Notice that |E|=O(nlnn) and hence c can be obtained in O(nlnn) space and polynomial time (see Theorem 18). Now, consider the coloring co on V(G) defined as follows.

co(v)={(c(v),c(v)), if vAB1(c(v),1), otherwise 

Now it is easy to see that co is a CFON coloring because for each vV(G)B1, there is a unique color in the open neighborhood of v due to the coloring c and for each vB1, there is a unique color in the open neighborhood of v due to the coloring c. Notice that the number of colors used in co is O(nln2n).

4 Semi-streaming algorithm for CFON coloring using (𝟏+ϵ)𝚫 colors

In this section we prove a two-pass randomized semi-streaming algorithm for finding a CFON coloring of the input graph G using (1+ϵ)Δ colors, where Δ is the maximum degree of G. The theorem is formally stated below.

Theorem 11.

There is a two-pass randomized semi-streaming algorithm (uses O(1ϵ2nln3n) space) that given a graph G and ϵ>0, outputs a CFON coloring of G using (1+ϵ)Δ colors or reports fail. It outputs a CFON coloring with probability at least (11n3). Here, Δ is the maximum degree of G.

We would like to mention that prior knowledge of Δ is not required. During the first pass of the edge stream, we find the maximum degree Δ of G, and for each vertex uV(G), a special vertex s(u) as explained below. Let V(G)={v1,,vn} and let Π be a fixed order v1,v2,,vn. For each uV(G),s(u)=vi, where i is the least index such that viNG(u). We would like to mention that if our algorithm outputs a coloring, then for each vertex uV(G), s(u) will get a unique color among NG(u). It is easy to note that one can find the maximum degree Δ from the first pass using O(n) space by keeping n counters, one per vertex. One can find out the special vertices from the first pass of the edge stream using the following procedure. We maintain an array (call it “a”) of size n in memory. The array keeps track of the special vertices, i.e., the minimum indexed vertex in the open neighborhood of every vertex in the graph seen until now. Initially, all the elements in the array are set to NULL. When an edge (vi,vj) comes in the stream, we update a[i] as follows.

  • If a[i]=NULL, then set a[i]=vj.

  • If a[i]=w for some vertex wV(G), then we set a[i]=vj iff vj<Πw.

  • Similarly, we update the entry a[j].

Notice that the space used in the first pass is O(nlnn). In the second pass of the stream, we construct a sketch H of G. Before the beginning of the second pass, for each vertex vV(G), we sample a set of colors L(v) of size t=4ϵlnn from [(1+ϵ)Δ] uniformly and independently at random with replacement. Note that L(v) is a multiset as the colors are sampled at random with replacement.

Definition 12 (Sketch of G with respect to L).

A sketch of G with respect to L is the subgraph H of G defined as follows: V(H)=V(G), and

E(H)={(u,v):(L(u)L(s(v)))((L(s(u))L(v))))}

It is easy to store the sketch H of G in the second pass. For each edge (u,v) encountered in the edge stream, we check if (u,v)E(H) by checking the condition (L(u)L(s(v)))((L(s(u))L(v)))). Thus, by the end of the second pass, we have the sketch H of G with respect to L.

Finally, we do a coloring c:V(G)[(1+ϵ)Δ] using a greedy procedure on H explained as follows. We color the vertices in the order v1,,vn. In the ith step we color the vertex vi as follows. Let Si={s(u):uNG(vi)}{v1,,vi1}.

Note that for each uNG(vi),s(u)Πvi and Si is the set of special vertices, of “all” the neighbors of vi, that are on the left side of vi in the ordering Π. Let Zi=L(vi){c(w)wSi}. That is, Zi is the set of colors from L(vi) that are not used to color the vertices in Si. Now we color vi as per the following.

  • If Zi=, then report FAIL. That is no color is available in the list L(vi) that is not equal to the color of the special vertices in Si.

  • Otherwise c(vi)=minZi.

For convenience, the pseudocode of the algorithm is available in Algorithm 4. Next we prove the following lemma which will be used to prove Theorem 11.

Algorithm 4 Algorithm for CFON coloring of graph G.
Lemma 13 ().

With probability at least 0.99, |E(H)|1600ϵ2nln2n.

Lemma 14.

If Algorithm 4 produces a coloring c then c is a CFON coloring of G. Moreover, Algorithm 4 produces a CFON coloring with probability at least (11n3).

Proof.

Suppose Algorithm 4 outputs a coloring c. To prove that it is a CFON coloring of G, we need to prove that for each vV(G), there is a vertex in NG(v) with unique color. We will prove that for each vertex vV(G), s(v) becomes the uniquely colored vertex in NG(v). Recall that s(v) is the first vertex in Π among NG(v). So Algorithm 4 colors s(v) before coloring the vertices in NG(v){s(v)}. Step 6 of Algorithm 4 implies that each vertex in NG(v){s(v)} gets a color different from the color of s(v). So, c is the CFON coloring of G.

We now find the probability that Algorithm 4 reports fail. Suppose Algorithm 4 reports FAIL in the ith iteration of step 6. It means that Zi=. That is, L(vi){c(x)|xSi}. We know that |Si||NG(vi)|Δ. Here, we want to calculate Pr[L(vi)Si]. This is calculated as follows.

Pr[L(vi)Si]=(|Si|((1+ϵ)Δ))t(Δ(1+ϵ)Δ))t=1(1+ϵ)t=1(1+ϵ)4ϵlnn1n4

Here, the second inequality follows from the fact that |Si|Δ. Notice that there are n iterations, and by the union bound, the probability that the algorithm reports FAIL in any one of these iterations is at most 1n3.

Proof of Theorem 11.

We run Algorithm 4 lnn times parallelly. In each execution of the algorithm, if the space used by it exceeds 1600ϵ2nlnn, then we abort it. Finally, if any of the execution outputs a coloring, we output one such coloring. Otherwise, we output FAIL. The probability that each execution is either aborted or output FAIL is upper bounded by 1100+1n30.02. The probability that all the executions fail with probability is at most 0.02lnn1n3. This implies that the overall probability that Algorithm 4 succeeds is at least (11n3). Notice that each execution of Algorithm 4 takes O(1ϵ2nln2n) space and hence the total space is O(1ϵ2nln3n).

5 Concluding remarks

Most of the study on CFCN and CFON coloring so far has been towards proving tighter bounds in terms of various graph parameters like maximum degree, order of the graph, pathwidth, etc. Showing improved bounds for special graph classes like planar graphs, line graphs, unit-disc graphs, etc. has also been explored. CFCN and CFON coloring problems have also been explored from a parameterized complexity setting [13, 10, 11]. To the best of our knowledge, this is the first paper exploring semi-streaming algorithms for these coloring problems. The bounds (on the number of colors used) we obtain in Theorems 5, 11, and 18 are asymptotically tight. Yet these leave us with many more intriguing open questions, some of which are listed below. Given as input an edge stream of an n-vertex graph G with maximum degree Δ,

  1. 1.

    Is it possible to obtain a deterministic single pass semi-streaming algorithm that does a CFCN coloring using O(ln2n) colors? The algorithm given by Theorem 5 is randomized.

  2. 2.

    Is it possible to improve Theorem 6 to obtain a semi-streaming (deterministic or randomized) algorithm that gives a CFON coloring using O(n) colors?

  3. 3.

    Is it possible to obtain a semi-streaming algorithm that outputs a CFON coloring of G using Δ+1 colors? Theorem 11 gives a two-pass randomized semi-streaming algorithm that outputs a CFON coloring using at most (1+ϵ)Δ colors. And, Theorem 18 can be modified to obtain a deterministic single-pass streaming algorithm for CFON coloring of G using Δ+1 colors that uses O(nn) space (the algorithm given by the theorem works, if Δ2n1. Otherwise, we store the entire graph and color it offline). As far as classical coloring is concerned, there are randomized single-pass semi-streaming algorithms that output a Δ+1-coloring with high probability (see [6]). At the same time, it is known (see [8]) that any single-pass streaming algorithm that outputs a (d+1)-coloring of G requires at least Ω(n2) space, where d is the degeneracy of G (the graph G is k-degenerate if its vertices can be arranged in a line such that every vertex has at most k neighbors to its left. The minimum k for which G is k-degenerate is called its degeneracy. Clearly, this parameter is at most Δ). Coming back to the CFON coloring problem, any CFON coloring of G would want some vertex, say s(v), in the neighborhood of each vertex v to receive a color distinct from that of the other neighbors of v. If we construct an auxiliary graph of G by adding edges between s(v) and all the other neighbors of v, for every v, such a graph would have a maximum degree of Θ(Δ2) and degeneracy of Δ. And a classical coloring of this auxiliary graph would yield a CFON coloring of G. This makes the question of obtaining a semi-streaming algorithm for (Δ+1)-CFON coloring of G all the more interesting.

References

  • [1] Noga Alon and Sepehr Assadi. Palette sparsification beyond (Δ+1) vertex coloring. International Workshop and International Workshop on Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques 2020, 2020. doi:10.4230/LIPIcs.APPROX/RANDOM.2020.6.
  • [2] Mohammad Ansari, Mohammad Saneian, and Hamid Zarrabi-Zadeh. Simple streaming algorithms for edge coloring. In 30th Annual European Symposium on Algorithms (ESA 2022). Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.ESA.2022.8.
  • [3] Sepehr Assadi, Amit Chakrabarti, Prantar Ghosh, and Manuel Stoeckl. Coloring in graph streams via deterministic and adversarially robust algorithms. PODS ’23: Proceedings of the 42nd ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, 2022.
  • [4] Sepehr Assadi, Yu Chen, and Sanjeev Khanna. Sublinear algorithms for (Δ+ 1) vertex coloring. In Proceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 767–786. SIAM, 2019. doi:10.1137/1.9781611975482.48.
  • [5] Sepehr Assadi, Pankaj Kumar, and Parth Mittal. Brooks’ theorem in graph streams: a single-pass semi-streaming algorithm for Δ-coloring. In Proceedings of the 54th Annual ACM SIGACT Symposium on Theory of Computing, pages 234–247, 2022.
  • [6] Sepehr Assadi and Helia Yazdanyar. Simple sublinear algorithms for (Δ+ 1) vertex coloring via asymmetric palette sparsification. In 2025 Symposium on Simplicity in Algorithms (SOSA), pages 1–8. SIAM, 2025. doi:10.1137/1.9781611978315.1.
  • [7] Soheil Behnezhad and Mohammad Saneian. Streaming edge coloring with asymptotically optimal colors. arXiv preprint arXiv:2305.01714, 2023. doi:10.48550/arXiv.2305.01714.
  • [8] Suman K. Bera, Amit Chakrabarti, and Prantar Ghosh. Graph Coloring via Degeneracy in Streaming and Other Space-Conscious Models. In Artur Czumaj, Anuj Dawar, and Emanuela Merelli, editors, 47th International Colloquium on Automata, Languages, and Programming (ICALP 2020), volume 168 of Leibniz International Proceedings in Informatics (LIPIcs), pages 11:1–11:21, Dagstuhl, Germany, 2020. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ICALP.2020.11.
  • [9] Anup Bhattacharya, Arijit Bishnu, Gopinath Mishra, and Anannya Upasana. Even the easiest(?) graph coloring problem is not easy in streaming! In James R. Lee, editor, 12th Innovations in Theoretical Computer Science Conference, ITCS 2021, January 6-8, 2021, Virtual Conference, volume 185 of LIPIcs, pages 15:1–15:19. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPIcs.ITCS.2021.15.
  • [10] Sriram Bhyravarapu, Tim A. Hartmann, Subrahmanyam Kalyanasundaram, and I. Vinod Reddy. Conflict-free coloring: Graphs of bounded clique width and intersection graphs. In Paola Flocchini and Lucia Moura, editors, Combinatorial Algorithms, pages 92–106, Cham, 2021. Springer International Publishing. doi:10.1007/978-3-030-79987-8_7.
  • [11] Sriram Bhyravarapu and Subrahmanyam Kalyanasundaram. A tight bound for conflict-free coloring in terms of distance to cluster. Discrete Mathematics, 345(11):113058, 2022. doi:10.1016/j.disc.2022.113058.
  • [12] Sriram Bhyravarapu, Subrahmanyam Kalyanasundaram, and Rogers Mathew. A short note on conflict-free coloring on closed neighborhoods of bounded degree graphs. Journal of Graph Theory, 97(4):553–556, 2021. doi:10.1002/JGT.22670.
  • [13] Hans L. Bodlaender, Sudeshna Kolay, and Astrid Pieterse. Parameterized complexity of conflict-free graph coloring. SIAM J. Discret. Math., 35(3):2003–2038, 2021. doi:10.1137/19M1307160.
  • [14] Panagiotis Cheilaris. Conflict-free coloring. City University of New York, 2009.
  • [15] Michał Dębski and Jakub Przybyło. Conflict-free chromatic number versus conflict-free chromatic index. Journal of Graph Theory, 99(3):349–358, 2022. doi:10.1002/JGT.22743.
  • [16] Khaled M. Elbassioni and Nabil H. Mustafa. Conflict-free colorings of rectangles ranges. In Bruno Durand and Wolfgang Thomas, editors, STACS 2006, 23rd Annual Symposium on Theoretical Aspects of Computer Science, Marseille, France, February 23-25, 2006, Proceedings, volume 3884 of Lecture Notes in Computer Science, pages 254–263. Springer, 2006. doi:10.1007/11672142_20.
  • [17] Guy Even, Zvi Lotker, Dana Ron, and Shakhar Smorodinsky. Conflict-free colorings of simple geometric regions with applications to frequency assignment in cellular networks. SIAM Journal on Computing, 33(1):94–136, 2003. doi:10.1137/S0097539702431840.
  • [18] Roman Glebov, Tibor Szabó, and Gábor Tardos. Conflict-free colouring of graphs. Combinatorics, Probability and Computing, 23(3):434–448, 2014. doi:10.1017/S0963548313000540.
  • [19] Prasad Krishnan, Rogers Mathew, and Subrahmanyam Kalyanasundaram. Pliable index coding via conflict-free colorings of hypergraphs. In 2021 IEEE International Symposium on Information Theory (ISIT), pages 214–219. IEEE, 2021. doi:10.1109/ISIT45174.2021.9518120.
  • [20] E Kushilevitz and N Nisan. Communication complexity, cambridge univ. Press, Cambridge, UK, 1997.
  • [21] Nissan Lev-Tov and David Peleg. Conflict-free coloring of unit disks. Discrete Applied Mathematics, 157(7):1521–1532, 2009. doi:10.1016/j.dam.2008.09.005.
  • [22] Andrew McGregor. Graph stream algorithms: a survey. ACM SIGMOD Record, 43(1):9–20, 2014. doi:10.1145/2627692.2627694.
  • [23] János Pach and Gábor Tardos. Conflict-free colourings of graphs and hypergraphs. Combinatorics, Probability and Computing, 18(5):819–834, 2009. doi:10.1017/S0963548309990290.
  • [24] Shakhar Smorodinsky. Combinatorial problems in computational geometry. PhD thesis, Tel-Aviv University, 2003.
  • [25] Shakhar Smorodinsky. Conflict-free coloring and its applications. Geometry – Intuitive, Discrete, and Convex: A Tribute to László Fejes Tóth, pages 331–389, 2013.

Appendix A Proof of Lemma 2

In any given iteration of the “while” loop, the “for” loop in Step 5 runs at most n times. The while loop in Step 3 runs at most T=16eln2r times. Thus it is easy to see that the algorithm terminates in O(nT)=O(nln2r) steps.

Note that the vertex set V of can be stored in O(n) space. The algorithm does not need to store the edges regardless of the structure of the hypergraph . The algorithm does a randomized coloring of the vertices in V, which is explained in steps 5-8. This can be done in O(n) workspace. Thus, the total space required is O(n).

Consider an execution of Algorithm 1. Let Av denote the event of v not receiving any non-zero color.

Pr[Av] =(1p)T, where p is the probability for Head and p=18elnr
=(118elnr)TeT8elnr1r2(T=16eln2r)

Let A denote the event of some vertex in V not receiving a non-zero color. Then, Pr(A)=Pr(vVAv)vVPr(Av)n1r2r1r2(nr)=1r. Thus, we have Pr(A)1r.

Let A¯ denote the complement of event A. For a hyperedge E, let BE denote the event of E not seeing a uniquely colored vertex. And, let B denote the event of some hyperedge E not seeing a unique color. That is, B denotes the event of the coloring function not being a conflict-free coloring of . From the definition of B, B=EBE. Let B¯ denote the complement of the event B. Then we know that,

Pr(A¯B¯) =Pr(A¯)Pr(B¯|A¯)(11r)Pr(B¯|A¯) (1)

We are left with the task of estimating P(B¯|A¯). We have,

Pr(B¯|A¯)=1Pr(B|A¯)=1Pr(EBE|A¯)1EPr(BE|A¯) (2)

To estimate Pr(BE|A¯), we use the following lemma from [23].

Lemma 15 (Lemma 3.1 in [23]).

Let V be a set of elements and let EV with |E|2t1 for a positive integer t. Let us color each element of V independently, according to the geometric distribution with parameter p. Then the probability that no element of E receives a unique color (one that is not received by any other vertex of E) is at most 2(etp)t.

With respect to the execution of Algorithm 1, given that the event A¯ has happened (that is, the algorithm has assigned a non-zero color for every vertex vV), the coloring c returned by the algorithm is a coloring based on a geometric distribution with parameter p=18elnr. Thus, Lemma 15 gives an upper bound to P(BE|A¯). Applying Lemma 15 with p=18elnr and t=2lnr, we have

Pr(BE|A¯)2(e2lnr18elnr)2lnr2r2.773 (3)

From Equations (2) and (3), we get

Pr(B¯|A¯)1|𝓔|2r2.773=14r1.773(Because ||2n2r) (4)

From Equations (4) and (1), we have

Pr(A¯B¯)(11r)(14r1.773)(11r)2>(12r) (5)

Here, the second inequality follows from the fact that 14r1.773>11r when r7. This completes the proof of the lemma.

Appendix B Proof of Lemma 13

To prove Lemma 13, first we prove the following lemma and then use this lemma.

Lemma 16.

Let (u,v)E(G). Then Pr[(u,v)E(H)]2t2(1+ϵ)Δ.

Proof.

Recall that for all wV(G), L(w) denotes the pallete of colors for the vertex w and |L(w)|=t. The colors are sampled uniformly and independently at random with replacement from the set of colors [(1+ϵ)Δ]. Let E1 be the event (L(u)L(s(v))) and let E2 be the event (L(s(u))L(v)). Now, we have Pr[(u,v)E(H)]=Pr[E1E2]Pr[E1]+Pr[E2]. We now calculate Pr[E1]. Let L(s(v))={r1,,rt}. Recall that L(s(v)) is a multiset.

Pr[E1]=Pr[i[t]riL(u)]i[t]Pr(riL(u))=i[t]t(1+ϵ)Δ=t2(1+ϵ)Δ

Similarly, Pr[E2]t2(1+ϵ)Δ. Thus, we get Pr[(u,v)E(H)]Pr[E1]+Pr[E2]2t2(1+ϵ)Δ. Below we state Markov’s Inequality.

Proposition 17 (Markov’s inequality).

If X is a nonnegative random variable and a>0, then Pr[Xa]E(X)a.

Now, we are ready to prove Lemma 13.

Proof of Lemma 13.

Let 𝕏 be the random variable that denotes |E(H)|. For each vV(H), let 𝕏v denote the degree of vertex v in H. For each (v,u)E(G), 𝕏vu is the indicator random variable defined as follows: 𝕏vu=1 if and only if (v,u)E(H). Then, for any vV(G), 𝕏v=uNG(v)𝕏vu, and E[𝕏v] is calculated as follows.

E[𝕏v]=uNG(v)E[𝕏vu]Δ2t2(1+ϵ)Δ=2t2(1+ϵ) (6)

Here, the second inequality follows from Lemma 16. Notice that 𝕏=12vV(G)𝕏v. Thus, by Equation (6)

E[𝕏]=12vV(G)E[𝕏v]n22t2(1+ϵ)16nln2nϵ2.

By Markov’s inequality, Pr[𝕏>1600nln2nϵ2]1100. Thus, |E(H)|1600ϵ2nln2n with probability at least 0.99.

Appendix C Streaming algorithm for CFON coloring using 𝑶(𝒏) colors

Algorithm 5 Algorithm for CFON coloring of a graph G on n vertices using 2n colors.

Cheilaris proved that, for a graph G on n vertices, χON(G)2n [14]. Pach and Tardos improved this to χON(G)2n [23]. The above upper bounds are asymptotically tight due to Example 4. Cheilaris’s result in Proposition 3 uses a deterministic algorithm to do a coloring of the vertices as follows. When a vertex is present in at least n neighborhoods, then we color that vertex with a new distinct color. Note that this vertex will be a unique color for at least n neighbourhoods. Next, we consider another vertex that is present in at least n neighborhoods with no vertex in this neighborhood colored so far. Then, we color that vertex with a new distinct color and continue this process. At the end of this process, we have used at most n colors because there are only n neighborhoods. Also, at the end of this process, each vertex will be part of at most n neighborhoods with no vertex in these neighborhoods colored so far. Then we use Proposition 1 to color the remaining vertices using at most n new colors. Clearly, this algorithm requires to see the entire input to do the coloring.

In this section, we give a streaming algorithm to do a CFON coloring of G using 2n colors. We prove the following result.

Theorem 18.

There is a deterministic single-pass O(nn)-space streaming algorithm that, given a graph G on n vertices, finds a CFON coloring using at most 2n colors.

Proof.

The pseudocode of our algorithm is given in Algorithm 5. We explain the algorithm here. We use 𝒱 to denote the set of all so-far uncolored vertices. Initially, as all the vertices in V(G) are uncolored, we initialize 𝒱:=V(G). We “mark” a vertex v if it sees some unique coloring in NG(v). Initially, all the vertices are unmarked. For an unmarked vertex v, we shall use the list L(v) to denote the set of neighbors of v that we have seen so far. From the moment v is marked, we maintain L(v) to be an empty set as the “marked” status of v implies it is seeing a uniquely colored vertex in its open neighborhood. When a new edge (u,v) arrives in the stream, the algorithm executes Steps 6 to 27 which are explained below. Note that in these steps while coloring vertices we do not use the same color twice. If u (or v) is already colored then we mark v, (resp., u) as u (resp., v) will act as the uniquely colored vertex in the open neighborhood of v (resp., u). As mentioned above, as soon as a vertex is marked, its list (in this case, L(u) or L(v) or both) is reset to the empty set. These steps are executed in Lines 6 to 11. We update the list of u (or v), if it is unmarked, in Lines 12 to 15. If v is not colored and is present in at least n lists, then we assign a new color to v. We remove it from 𝒱 which maintains the set of all uncolored vertices so far. We mark all vertices z that have v in L(z), as v will act as the uniquely colored neighbor of such a vertex z. As mentioned before, we immediately reset L(z) to the empty set. These steps are implemented in Lines 16 to 21. Now, in a similar fashion, if u is not colored and is present in at least n lists, we execute similar steps for the vertex u in Lines 22 to 27.

We claim that we color at most n vertices in total during the various iterations of the while loop (Lines 6 to 27). Every time we color a new vertex in Line 18 or Line 24, we update the status of least n new vertices from unmarked to marked and set their lists to . Since there are only n vertices in total and since we do not unmark a vertex that is already marked, our claim holds. Next, we claim that every vertex that is marked sees some color exactly once in its open neighborhood. Every time a vertex is marked in Lines 10, 21, or 27, it has some colored vertex in its open neighborhood (see the comments below these lines). Since no two vertices receive the same color inside the while loop, our claim holds. To summarise, (i) we have used at most n colors so far, and (ii) every marked vertex is seeing some color exactly once in its open neighborhood.

When we exit the while loop, it is only the unmarked vertices that are yet to see a unique color in their open neighborhood. We take care of them in Line 28. In this step, we construct a hypergraph whose vertex set is the set of so far uncolored vertices (maintained by 𝒱) and whose edge set is all the lists L(v) for which v is unmarked. In other words, is the set of all lists L(v) that are not empty sets. Clearly, such lists L(v) contain only uncolored vertices (that is, vertices in 𝒱); else v would have been marked and L(v) would have been reset to . Further, for any unmarked vertex v, L(v)=NG(v) as our algorithm added every neighbor of v into L(v) as and when they were unveiled (see Lines 13 and 15). Thus, any conflict-free coloring of using a set of new colors would result in every unmarked vertex seeing a unique color in its open neighborhood in G. We claim that the maximum degree of any vertex in (that is, the maximum number of hyperedges any vertex in 𝒱 is present in) is at most n1 and then use Proposition 1 to do a greedy conflict-free coloring of using at most n new colors. We prove the claim by contradiction. Suppose there existed a vertex v𝒱 which was present in n or more hyperedges (or lists) L(w) in . But, then such a vertex v would satisfy the conditions of the if statement in Line 16. Line 20 would then lead to the contradictory situation that v is not a member of 𝒱. This proves the claim.

We have thus shown that the algorithm does give a CFON coloring of G using at most 2n colors. It is easy to see that it is a single-pass, deterministic algorithm. Finally, the amount of memory required is the space required to store the lists L(u) for all u. Notice that each time during the execution of the algorithm each vertex v is present in at most n lists. This implies that the space complexity is O(nn).