{'fraction_non_alphanumeric': 0.05618885580603998, 'fraction_numerical': 0.014632071458953637, 'mean_word_length': 3.7767167817960177, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Better Bounds for Incremental Frequency Allocation in Bipartite Graphs

We study frequency allocation in wireless networks. A wireless network is modeled by an undirected graph, with vertices corresponding to cells. In each vertex we have a certain number of requests, and each of those requests must be assigned a different frequency. Edges represent conflicts between cells, meaning that frequencies in adjacent vertices must be different as well. The objective is to minimize the total number of used frequencies. The offline version of the problem is known to be NP-hard. In the incremental version, requests for frequencies arrive over time and the algorithm is required to assign a frequency to a request as soon as it arrives. Competitive incremental algorithms have been studied for several classes of graphs. For paths, the optimal (asymptotic) ratio is known to be 4/3, while for hexagonal-cell graphs it is between 1.5 and 1.9126. For k-colorable graphs, the ratio of (k+1)/2 can be achieved. In this paper, we prove nearly tight bounds on the asymptotic competitive ratio for bipartite graphs, showing that it is between 1.428 and 1.433. This improves the previous lower bound of 4/3 and upper bound of 1.5. Our proofs are based on reducing the incremental problem to a purely combinatorial (equivalent) problem of constructing set families with certain intersection properties.


Introduction
Static frequency allocation. In the frequency allocation problem, we are given a wireless network and a collection of requests for frequencies. The network is modeled by a (possibly infinite) undirected graph G, whose vertices correspond to the network's cells. Each request is associated with a vertex, and requests in the same vertex must be assigned different frequencies. Edges represent conflicts between cells, meaning that frequencies in adjacent vertices must be different as well. The objective is to minimize the total number of used frequencies. We will refer to this model as static, as it corresponds to the scenario where the set of requests in each vertex does not change over time.
A more rigorous formulation of this static frequency allocation problem is as follows: Denote by v the load at a vertex v of G, that is the number of frequency requests at v. A frequency allocation is a function that assigns a set L v of frequencies (represented, say, by positive integers) to each vertex v and satisfies the following two conditions: (i) |L v | = v for each vertex v, and (ii) L v ∩ L w = ∅ for each edge (v, w). The total number of frequencies used is | v∈G L v |, and this is the quantity we wish to minimize. We will use notation opt(G,¯ ) to denote the minimum number of frequencies for a graph G and a demand vector¯ .
If one request is issued per node, then opt(G,¯ ) is equal to the chromatic number of G, which immediately implies that the frequency allocation problem is NP-hard. In fact, McDiarmid and Reed [7] show that the problem remains NP-hard for the graph representing the network whose cells are regular hexagons in the plane, which is a commonly studied abstraction of wireless networks. (See, for example, the surveys in [8,1]). Polynomial-time 4 3 -approximation algorithms for this case appeared in [7] and [9].
Incremental frequency allocation. In the incremental version of frequency allocation, requests arrive over time and an incremental algorithm is required to assign frequencies to requests as soon as they arrive. An incremental algorithm A is called asymptotically R-competitive if, for any graph G and load vector¯ , the total number of frequencies used by A is at most R · opt(G,¯ ) + λ, where λ is a constant independent of¯ . We allow λ to depend on the class of graphs under consideration, in which case we say that A is R-competitive for this class. We refer to R as the asymptotic competitive ratio of A. As in this paper we focus only on the asymptotic ratio, we will skip the word "asymptotic" (unless ambiguity can arise), and simply use terms "R-competitive" and "competitive ratio" instead. Following the terminology in the literature (see [2,3], for example), we will say that the competitive ratio is absolute when the additive constant λ is equal 0.
Naturally, research in this area is concerned with designing algorithms with small competitive ratios for various classes of graphs, as well as proving lower bounds. For hexagonal-cells graphs, Chan et al. [2,3] give an incremental algorithm with competitive ratio 1.9216 and prove that no ratio better than 1.5 is possible. A lower bound of 4/3 for paths was given in [4], and later Chrobak and Sgall [6] gave an incremental algorithm with the same ratio. Paths are in fact the only non-trivial graphs for which tight asymptotic ratios are known. As pointed out earlier, there is a strong connection between frequency allocation and graph coloring, so one would expect that the competitive ratio can be bounded in terms of the chromatic number. Indeed, for ξ-colorable graphs Chan et al. [2,3] give an incremental algorithm with competitive ratio of (ξ + 1)/2. (This ratio is in fact absolute.) On the other hand, the best known lower bounds on the competitive ratio, 1.5 in the asymptotic and 2 in the absolute case [2,3], hold for hexagonal-cell graphs, but no stronger bounds are known for graphs of higher chromatic number.
Our contribution. In this paper, we prove nearly tight bounds on the optimal competitive ratio of incremental algorithms for bipartite graphs, showing that it is between 10/7 ≈ 1.428 and (18 − √ 5)/11 ≈ 1.433. This improves the lower and upper bounds for this version of frequency allocation. The best previously known lower bound was 4/3, which holds in fact even for paths [4,6]. The best upper bound of 1.5 was shown in [2,3] and it holds even in the absolute case.
Our proofs are based on reducing the incremental problem to a purely combinatorial (equivalent) problem of constructing set families, which we call F-systems, with certain intersection properties. A rather surprising consequence of this reduction is that the optimal competitive ratio can be achieved by an algorithm that is topology-independent; it assigns a frequency to each vertex v based only on the current optimum value, the number of requests to v, and the partition of the vertex v; that is, independently of the actual frequencies already assigned to the neighbors of v.
To achieve a competitive ratio below 2 for bipartite graphs, we need to use frequencies that are shared between the two partitions of the graph. The challenge is then to assign these shared frequencies to the requests in different partitions so as to avoid collisions -in essence, to break the symmetry. In our construction, we develop a symmetry-breaking method based on the concepts of "collisions with the past" and "collisions with the future", which allows us to derive frequency sets in a systematic fashion. We believe that these two ideas -the concept of F-systems and our symmetry-breaking method -can be extended to frequency assignment problems in other types of graphs.
Other related work. Determining optimal absolute ratios is usually easier than for asymptotic ratios and it has been accomplished for various classes of graphs, including paths [4] and bipartite graphs in general [2,3], and hexagonal-cell graphs and 3-colorable graphs in general [2,3]. The asymptotic ratio model, however, is more relevant to practical scenarios where the number of frequencies is typically very large, so the additive constant can be neglected.
In the dynamic version of frequency allocation each request has an arrival and departure time. At each time, any two requests that have already arrived but not departed and are in the same or adjacent nodes must be assigned different frequencies. As before, we wish to minimize the total number of used frequencies. As shown by Chrobak and Sgall [6], this dynamic version is NP-hard even for the special case when the input graph is a path.
It is natural to study the online version of this problem, where we introduce the notion of "time" that progresses in discrete steps, and at each time step some requests may arrive and some previously arrived requests may depart. This corresponds to real-life wireless networks where customers enter and leave a network's cells over time, in an unpredictable fashion. An online algorithm needs to assign frequencies to requests as soon as they arrive. The competitive ratio is defined analogously to the incremental case. (The incremental static version can be thought of as a special case in which all departure times are infinite.) This model has been well studied in the context of job scheduling, where it is sometimes referred to as time-online. Very little is known about this online dynamic case. Even for paths the optimal ratio is not known; it is only known that it is between 14 9 ≈ 1.571 [6] and 5 3 ≈ 1.667 [4].

Preliminaries
For concreteness, we will assume that frequencies are identified by positive integers, although it does not really matter. Recall that we use the number of frequencies as the performance measure.
In some literature [4,5,3], authors used the maximum-numbered frequency instead. It is not hard to show (see [6], for example, which does however involve a transformation of the algorithm that makes it not topology independent) that these two approaches are equivalent. For a bipartite graph G = (A, B, E), it is easy to characterize the optimum value. As observed in [4,6], in this case the optimum number of frequencies is For completeness, we include a simple proof: Trivially, opt(G,¯ ) ≥ u + v for each edge (u, v).
On the other hand, denoting by ω the right-hand side of (1), we can assign frequencies to nodes as follows: for u ∈ A, assign to u frequencies 1, 2, . . . , u , and for u ∈ B assign to u frequencies ω − u + 1, ω − u + 2, . . . , ω. This way each vertex u is assigned u frequencies and no two adjacent nodes share the same frequency. Throughout the paper, we will use the convention that if c ∈ {A, B}, then c denotes the partition other than c, that is {c, c } = {A, B}.

Competitive F-Systems
In this section we show that finding an R-competitive algorithm for bipartite graphs can be reduced to an equivalent problem of constructing certain families of sets that we call F-systems.
Suppose that for any c ∈ {A, B} and any integers t, k such that 0 < k ≤ t, we are given a set F c t,k of positive integers (frequencies). Denote by F = F c t,k the family of those sets. Then F is called an where λ is a constant independent of t. The competititive ratio of F is the smallest R for which F is R-competitive.
The requests are issued in phases numbered t = 1, 2, . . .. In phase t, for each node (t, k) c , we issue k requests to this node. Let F c t,k be the set of frequencies that A assigns to (t, k) c . After phase t, by the definition of H and by (1), the optimum number of frequencies is t, so A uses at most Rt + λ frequencies, for some λ. In other words, (2) holds. Thus F = F c t,k is an R-competitive F-system.
(⇐) Let F be an R-competitive F-system. We use F to define an incremental algorithm A that works as follows. Let G = (A, B, E) be the given bipartite graph. Consider one step of the computation in which a new request arrives at a vertex u ∈ c, where c ∈ {A, B}. Denote by t the current optimum number of frequencies, that is t = max (v,w)∈E ( v + w ). Choose any frequency f ∈ F c t,k , for k = u , that is not yet used on u and assign f to this request. Such f exists, because by property (F1) we have |F c t,k | ≥ k and the number of frequencies assigned so far to u is k − 1. Trivially, all frequencies assigned by A to one node are different. We claim that adjacent nodes will be assigned different frequencies as well. Consider again a step where a frequency f is assigned to a kth request to a vertex u, when the optimum value is t, as described above. So k = u .
Without loss of generality, assume u ∈ A. For an edge (u, v) ∈ E, let k = v be the current load at v. If g is any frequency assigned by A to v then, by the definition of A, we have that g ∈ F B t ,k for some t ≤ t and k ≤ min(t , k ). Thus k + k ≤ k + k ≤ t, by the definition of t. Using condition (F2), we now get that F A t,k ∩ F B t ,k = ∅, and therefore f = g. Finally, when the optimum value is t, then any frequency used by A is from some set F c τ,κ for κ ≤ τ ≤ t. Therefore A is R-competitive, by the property (2) of F.

An Upper Bound
In this section we prove that there is an R 0 -competitive incremental algorithm, for R 0 = (18 − √ 5)/11 ≈ 1.433. Using Lemma 3.1, it is sufficient to design an R 0 -competitive F-system.
Intuitions. Our construction below may appear rather mysterious, so we begin by gradually introducing its main ideas. We will distinguish between two types of frequencies: private and shared. A-private frequencies will be used only in sets F A t,k , B-private frequencies will be used only in sets F B t,k , while shared frequencies can be used in some sets from both partitions A and B. Competitive ratio 2 can be easily achieved using only private frequencies. For each c ∈ {A, B}, let P c denote an infinite pool of c-private frequencies, with P A and P B disjoint. We simply let F c t,k consist of the first k frequencies from P c . Conditions (F1) and (F2) are trivially true. For any given t, the set on the left-hand side of inequality (2) contains 2t frequencies, so (2) holds for R = 2.
We now show how to improve the ratio to 1.5. To accomplish this, we must use some shared frequencies. Let S denote an infinite pool of shared frequencies, where S is disjoint with P A ∪ P B . To avoid collisions (that is, violations of (F2)), we need to use these shared frequencies judiciously. The main idea is this: for any given c, t, k, F c t,k will only contain some of the first t/2 c-private frequencies and some of the first t/2 shared frequencies. (For simplicity, we temporarily ignore the fact that t/2 may not be integer.) This will guarantee that we will use at most 1.5t frequencies for all sets F c τ,κ with τ ≤ t. If k ≤ t/2, then we have enough c-private frequencies to completely fill F c t,k . Otherwise, for k > t/2, in addition to the first t/2 c-private frequencies, F c t,k we use k − t/2 last shared frequencies with indices at most t/2. So these frequencies will be indexed between t/2 − (k − t/2) = t − k and t/2. Clearly, F c t,k has at least k frequencies, so (F1) holds. The intuition behind (F2) is this: Suppose t ≤ t. Then F A t,k conflicts with each F B t ,k for k ≤ t − k. As k ≤ t − k, the "worst" such conflict is with F B t−k,t−k , which is disjoint with F A t,k , by our choice of shared frequencies.
To make it more precise, for any real number x ≥ 0 let S x = the first x frequencies in S , P c x = the first x frequencies in P c , for c ∈ {A, B}.
We now let F = F c t,k , where for c ∈ {A, B} and k ≤ t we have We claim that F is a 1.5-competitive F-system. If k ≤ t/2 + 1, then |F c t,k | ≥ k is trivial. If k ≥ t/2 + 2, then t − k ≤ t − t/2 − 2 ≤ t/2, so S t−k ⊆ S t/2 and thus |F c t,k | ≥ t/2 + 1 + ( t/2 − t − k ) ≥ k. So (F1) holds. To verify (F2), pick any two pairs k ≤ t and k ≤ t with k + k ≤ max(t, t ). Without loss of generality, assume t ≤ t and c = A. If k ≤ t /2 + 1, then Finally, for any c ∈ {A, B} and κ ≤ τ ≤ t, we have F c τ,κ ⊆ P A t/2+1 ∪ P B t/2+1 ∪ S t/2 , so the inequality (2) holds with R = 1.5 and λ = 2. We can thus conclude that this F is 1.5-competitive.
A geometric interpretation of the used sets of frequencies is is shown in Figure 1. For k > t/2, set F c t,k conflicts with F c τ,τ for τ = t − k and F c τ,τ uses shared frequencies numbered at most τ /2 = (t − k)/2. Thus all shared frequencies that "conflict with the past" are within the region below the line x = (t − k)/2. This region is disjoint with the shaded region assigned to F c t,k , whose boundary is the line x = t − k.
Construction of an R 0 -competitive F-system. To improve the ratio further, the idea is to use even fewer private frequencies, but to assign shared frequencies more carefully. We will actually have three types of shared frequencies, called A-shared, B-shared and symmetric-shared.
To achieve ratio smaller than 1.5 we need to use some shared frequencies even for k < t/2. Obviously, to do this we must break symmetry, as F A t,k and F B t,k cannot use any common shared frequency for k < t/2. This is the reason why we introduce A-shared and B-shared frequencies. For sets F c t,k , as k increases, we first use c-private frequencies, then c-shared frequencies, then symmetricshared frequencies, and finally, if k gets sufficiently large, we also "borrow" c -shared frequencies to include in this set. More precisely, we use some c-shared frequencies for any k > t/φ 2 ≈ 0.382t, while we use symmetric-shared frequencies for k > t/2 and c -shared frequencies only for k > t/φ ≈ 0.618t. We remark here that symmetric frequencies are still needed. If we restrict ourselves to only private and c-shared frequencies then the best ratio we are able to achieve is ≈ 1.447. A geometric interpretation of the used sets of shared frequencies is is shown in Figure 2. The algorithm with ratio 1.5 used the shaded region shown in Figure 1, to avoid collisions with the past, that is with frequencies already assigned to sets F c τ,τ for τ < t. As observed earlier, the line x = t − k is not tight; it can be lowered to x = (t − k)/2 without creating conflicts. With this modification, only some of the shared frequencies above this line are needed. However, this modification is not sufficient to reduce the ratio below 1.5, because of symmetry: we still will have conflicts for F c t,k for k = t/2. To avoid such conflicts, we also consider, preemptively, "conflicts in the future", namely with sets F c t ,k for t > k. These conflicts are represented in the figure by the half-plane below the line x = γk, for an appropriate γ while now the conflicts with the past are represented by the half-plane below the line γ (t − k). The optimization of the parameters for all three types of shared frequencies leads to our new algorithm.
The pools of c-shared and symmetric-shared frequencies are denoted S c and Q, respectively. As before, for any real x ≥ 0 we define S c x = the first x frequencies in S c , for c ∈ {A, B}. Q x = the first x frequencies in Q.
Our construction uses three constants, defined as ≈ 0.217, and where φ = ( √ 5 + 1)/2 is the golden ratio. A useful fact is the identity 2α + 2β + ρ = R 0 . We define F = F c t,k , where for any t ≥ k ≥ 0 we let We now show that F is an R 0 -competitive F-system. To this end, we show that F satisfies properties (F1), (F2) and (2).
Next, we show (F2). By symmetry, we can assume that t ≤ t in (F2), so k ≤ t − k. Then and this set is disjoint with F A t,k by definition (3). Thus F A t,k ∩ F B t ,k = ∅, as needed. Finally, we prove (F1), namely that |F c t,k | ≥ k. We distinguish two cases.
Case 1: k > t/φ. This implies that min(t, φk) = t, so in (3) we have S c β·min(t,φk) = S c βt and Q ρ·min(t,φk) = Q ρt . Thus using the substitutions α = 2β and ρ = β/φ. Note that this case is asymptotically tight as the algorithm uses all three types of shared frequencies (and the corresponding terms are non-negative).
Case 2: k ≤ t/φ. The case condition implies that φk ≤ t, so S c β·min(t,φk) = S c φβk , Q ρ·min(t,φk) = Q φρk , and S c βk \ S c φβ(t−k) = ∅. Therefore using α = 2β and ρ = β/φ again. Note that this case is (asymptotically) tight only for k > t/2 when c-shared and symmetric-shared frequencies are used. For k ≤ t/2, no symmetric-shared frequencies are used and the corresponding term is negative.
Summarizing, we conclude that F is indeed an R 0 -competitive F-system. Therefore, using Lemma 3.1, we get our upper bound: There is an R 0 -competitive incremental algorithm for frequency allocation on bipartite graphs, where R 0 = (18 − √ 5)/11 ≈ 1.433.

A Lower Bound
In this section we show that if R < 10/7, then there is no R-competitive incremental algorithm for frequency allocation in bipartite graphs. By Lemma 3.1, it is sufficient to show that there is no R-competitive F-system. The general intuition behind the proof is that we try to reason about the sets for a suitable constant γ. These sets should correspond to the symmetric-shared frequencies from our algorithm, for γ such that no c -shared frequencies are used. If Z t is too small, then both partitions use mostly different frequencies and this yields a lower bound on the competitive ratio. If Z t is too large, then for a larger t and suitable case, the frequencies cannot be used for either partition, and hopefully this allows to improve the lower bound. We are not able to do exactly this. Instead, for a variant of Z t , we show a recurrence essentially saying that if the set is too large, then for some larger t, it must be proportionally even larger, leading to a contradiction. We now proceed with the proof. For c ∈ {A, B}, let F c t = κ≤τ ≤t F c τ,κ . Towards contradiction, suppose that an F-system F is R-competitive for some R < 10/7. Then F satisfies the definition of competitiveness (2) for some positive integer λ. Choose a sufficiently large integer θ for which R < 10/7 − 1/θ.
We first identify shared frequencies in F. Recall that F c t = κ≤τ ≤t F c τ,κ , for c ∈ {A, B}. Thus the definition of R-competitiveness says that Proof. This is quite straightforward.
Now, let S 2t,t = S 2t ∩ (F A 2t,t ∪ F B 2t,t ) be the level-2t shared frequencies that are used in F A 2t,t or F B 2t,t . Each such frequency can only be in one of these sets because F A 2t,t ∩ F B 2t,t = ∅. Lemma 5.2. For any t, we have |S 2t,t | ≥ (6 − 4R)t − 2λ.
by definition, and thus (2) implies where the identities follow from the inclusion-exclusion principle, disjointness of F A 2t,t and F B 2t,t , and the definition of S 2t,t .
Transforming this inequality, we get as claimed, by property (F1) and Lemma 5.1.
For any even t define Z 3t/2,t = F A 3t/2,t ∩ F B 3t/2,t . In the rest of the lower-bound proof we will set up a recurrence relation for the cardinality of sets S t ∪ Z 3t/2,t . The next step is the following lemma.
Proof. From the definition, the two sets S t ∪ Z 3t/2,t and S 2t,t are disjoint and they are subsets of S 2t − Z 3t,2t . (See Figure 3 for illustration.) This immediately implies the lemma.
Lemma 5.4. For any even t, where the identities follow from the inclusion-exclusion principle, the fact that F A 3t,2t ∪ F B 3t,2t and S t ∪ Z 3t/2,t are disjoint, and the definition of Z 3t,2t .
Theorem 5.5. If A is an R-competitive incremental algorithm for frequency allocation on bipartite graphs, then R ≥ 10/7 ≈ 1.428.
As a final remark we observe that our lower bound works even if the additive constant λ is allowed to depend on the actual graph. I.e., for every R < 10/7 we can construct a single finite graph G so that no algorithm is R-competitive on this graph. In our lower bound, we can restrict our attention to sets F c t i ,t i , F c 2t i ,t i , F c 3t i ,2t i , and F c 3t i /2,t i , for i = 0, 1, . . . , θ and c = A, B. Then, in the construction from the proof of Lemma 3.1 for the lower bound sequence we obtain a finite graph together with a request sequence. However, for a fixed θ, the graphs for different values of λ are isomorphic, as all the indices scale linearly with λ. So, instead of using different isomorphic graphs, we can use different sequences corresponding to different values of λ on a single graph G.