A two-level graph partitioning problem arising in mobile wireless communications

In the k-partition problem (k-PP), one is given an edge-weighted undirected graph, and one must partition the node set into at most k subsets, in order to minimise (or maximise) the total weight of the edges that have their end-nodes in the same subset. Various hierarchical variants of this problem have been studied in the context of data mining. We consider a ‘two-level’ variant that arises in mobile wireless communications. We show that an exact algorithm based on intelligent preprocessing, cutting planes and symmetry-breaking is capable of solving small- and medium-size instances to proven optimality, and providing strong lower bounds for larger instances.


Introduction
Telecommunications has proven to be a rich source of interesting optimisation problems [RP07]. In the case of wireless communications, the hardest (and most strategic) problem is wireless network design, which involves the simultaneous determination of cell locations and shapes, base station locations, power levels and frequency channels (e.g., [MRRS07]). On a more tactical level, one finds various frequency assignment problems, which are concerned solely with the assignment of available frequency bands to wireless devices (e.g., [AvHK + 07]).
Recently, we came across a rather different optimisation problem, in the context of mobile wireless communications. The technology is the new 4G (LTE) standard, and the essence of the problem is as follows. There are a number of devices with known locations. Each device must be assigned a positive integer identifier. In the LTE standard, this is called a Physical Cell Identifier or PCI, but to keep the discussion general we will simply use the term ID. If two devices are close to each other (according to some measure of closeness), they are said to be neighbours. Two neighbouring devices must not have the same ID. We are also given two small integers k, k 2. If the IDs of two neighbouring devices are x vc be a binary variable, taking the value 1 if and only if vertex v has colour c. For each edge e∈E, let y e be an additional binary variable, taking the value 1 if and only if both end-nodes of e have the same colour. Then we have the following optimization problem: y uv x uc +x vc −1 ({u, v}∈E, c=1, . . . , k) (2) x uc x vc +y uv −1 ({u, v}∈E, c=1, . . . , k) (3) x vc x uc +y uv −1 ({u, v}∈E, c=1, . . . , k) (4) x vc ∈{0, 1} (v∈V, c=1, . . . , k) y uv ∈{0, 1} ({u, v}∈E).
The equations (1) force each node to be given exactly one colour, and the constraints (2)-(4) ensure that the y variables take the value 1 when they are supposed to. Note that this IP has O(m+nk) variables and constraints, where m=|E|. It therefore seems suitable when k is small and G is sparse. Unfortunately, it has a very weak linear programming (LP) relaxation. Indeed, if we set all x variables to 1/k and all y variables to 0, we obtain the trivial lower bound of 0. Moreover, it suffers from symmetry, in the sense that given any feasible solution, there exist k! solutions of the same cost. (See Margot [Mar10] for a tutorial and survey on symmetry issues in integer programming.) The second IP formulation is obtained by dropping the x variables, but having a y variable for every pair of nodes. That is, for each pair of nodes {u, v}, let y uv be a binary The constraints (5), called clique inequalities, ensure that, in any set of k+1 nodes, at least two receive the same colour. The constraints (6) enforce transitivity; that is, if nodes u and w have the same colour, and nodes v and w have the same colour, then nodes u and v must also have the same colour. A drawback of the second IP formulation is that it has O(n 2 ) variables and O(n k+1 ) constraints, and it cannot exploit any special structure that G may have (such as sparsity).

Cutting planes
Chopra & Rao [CR93] present several families of valid linear inequalities (i.e. cutting planes), which can be used to strengthen the LP relaxation of the above formulations. For our purposes, the most important turned out to be the generalised clique inequalities. In the case of the first IP formulation, they take the form where C ⊆V is a clique (set of pairwise adjacent nodes) in G with |C|>k, and t and r denote |C|/k and r=|C| mod k, respectively. In the case of the second IP formulation, they must be defined for any C ⊆V with |C|>k (since every set of nodes forms a clique in a complete graph). In either case, they define facets of the associated polytope when k 3 and r =0. Note that they reduce to the clique inequalities (5) when |C|=k+1.

Separation algorithms
For a given family of valid inequalities, a separation algorithm is an algorithm which takes an LP solution and searches for violated inequalities in that family [GLS88].
By brute-force enumeration, one can solve the separation problem for the inequalities (2)-(4) in O(km) time, for the transitivity inequalities (6) in O n 3 time, and for the clique inequalities (5) in O n k+1 time. It is stated in [CR93] that separation of the generalised clique inequalities (7) is N P-hard. An explicit proof, using a reduction from the max-clique problem, is given in [Eis01]. Heuristics for clique and generalised clique separation are presented in [Eis01,KPP11].
Separation results for other inequalities for the first IP formulation can be found in [CR93,LF16]. Separation results for the second formulation can be found in, e.g., [GW89,DGL92,CF96,BW00,ORS09,Let01,MS02]. For some computational results with various separation algorithms, see [dAL16].

Formulation and Valid Inequalities
In this section, we give an IP formulation of the 2L-PP (Subsection 3.1) and derive some valid inequalities (3.2). We also show how to modify the formulation to address issues of symmetry (3.3).

Integer programming formulation
An instance of the 2L-PP is given by an undirected graph G=(V, E), integers k, k 2, and weights w, w ∈R, with w≥w >0. Each node in V corresponds to a device, and a pair of nodes is connected by an edge if and only if the corresponding devices are neighbours. The weights w and w represent the importance given to interference modulo k and modulo kk , respectively. Now, let us call the integers in {0, . . . , kk −1} colours. Assigning the colour c to a node corresponds to giving the corresponding device an ID that is congruent to c modulo kk . Then, the 2L-PP effectively calls for a colouring of the nodes of G such that the following quantity is minimised: w times the number of edges whose end-nodes have the same colour, plus w times the number of edges whose end-nodes have the same colour modulo k.
To formulate the 2L-PP as an IP, we modify the first formulation mentioned in Subsection 2.2. We have three set of binary variables. For each v∈V and for c=0, . . . , kk −1, let x vc be a binary variable, taking the value 1 if and only if vertex v has colour c. For each edge e∈E, define two binary variables y e and z e , taking the value 1 if and only if both end-nodes of e have the same colour modulo k, or the same colour, respectively. Then we have: z uv x uc +x vc −1 ({u, v}∈E, c=0, . . . , kk −1) (11) x vc ∈{0, 1} (v∈V, c=0, . . . , kk −1) (12) The objective function (8) is just a weighted sum of the two kinds of interference. The constraints (9) state that each node must have a unique colour. The constraints (10) and (11) ensure that the two kinds of interference occur under the stated conditions. The remaining constraints are just binary conditions. Note that the above IP has kk n+2m variables and n+k(k +1)m linear constraints. In practice, this is manageable, since k and k are typically small and G is typically sparse.

Valid inequalities
Unfortunately, our IP formulation of the 2L-PP shares the same drawbacks as the first formulation of the k-PP mentioned in Subsection 2.2: it has a very weak LP relaxation (giving a trivial lower bound of zero), and it suffers from a high degree of symmetry.
To strengthen the LP relaxation, we add valid linear inequalities from three families. For a clique C⊂V , let y(C) and z(C) denote {u,v}⊂C y uv and {u,v}⊂C z uv , respectively. The first two families of inequalities are straightforward adaptations of the generalised clique inequalities (7) for the k-PP: Proposition 3.1 The following inequalities are satisfied by all feasible solutions of the 2L-PP: • "y-clique" inequalities, which take the form: where C ⊆V is a clique with |C|>k, t= |C|/k and r=|C| mod k; • "z-clique" inequalities, which take the form: where C ⊆V is a clique with |C|>kk , T = |C| kk and R=|C| mod kk .
Proof. This follows from the result of Chopra & Rao [CR93] mentioned in Subsection 2.3, together with the fact that, in a feasible IP solution, the y and z vectors are the incidence vectors of a k-partition and a kk -partition, respectively.
The third family of inequalities, which is completely new, is described in the following theorem.
Theorem 3.1 For all cliques C ⊆V with |C|>k , the following "(y, z)-clique" inequalities are valid: where t = |C|/k and r =|C| mod k .
Proof. See the Appendix.
The following two lemmas and theorem give necessary conditions for the inequalities presented so far to be non-dominated (i.e., not implied by other inequalities).
Lemma 3.1 A necessary condition for the y-clique inequality (15) to be non-dominated is that r =0.
Lemma 3.2 A necessary condition for the (y, z)-clique inequality (17) to be non-dominated is that r =0.
Proof. Suppose that r =0. The (y, z)-clique inequality for C can be written as: Now let v be an arbitrary node in C. The (y, z)-clique inequality for the set C \{v} can be written as: Summing this up over all v∈C yields Dividing this by |C|−2 yields the inequality (18).
Theorem 3.2 A necessary condition for the z-clique inequality (16) to be non-dominated is that 1<R<kk −1.

Proof. See the Appendix.
Our experiments with the polyhedron transformation software package PORTA [CLS97] lead us to make the following conjecture: Conjecture 3.1 The following results hold for the convex hull of 2L-PP solutions: • y-clique inequalities (7) define facets if and only if r =0.
In any case, we have found that all three families of inequalities work very well in practice as cutting planes. Moreover, in our preliminary experiments, we found that the y-clique inequalities were the most effective at improving the lower bound, with the yz-clique inequalities being the second most effective.
Remark: The trivial inequality y e z e is also valid for all e∈E. In our preliminary experiments, however, these inequalities proved to be of no value as cutting planes.

Symmetry
Another issue to address is symmetry. Note that any permutation σ on the set of colours {0, . . . , kk −1} such that σ(c) mod k=c mod k will preserve all k and kk conflicts. Since there are k ! such permutations, for any colouring (which makes use of all available colours) there are at least k ! other colourings which yield the same cost.
One easy way to address this problem, at least partially, is given in the following theorem: Theorem 3.3 For any colour c∈{0, . . . , kk −1}, let φ(c) denote c/k +(c mod k). Then, one can fix to zero all variables x vc for which φ(c) v, while preserving at least one optimal 2L-PP solution.
Proof. See the Appendix.

Exact Algorithm
We now describe an exact solution algorithm for the 2L-PP. The algorithm consists of two main stages: preprocessing and cut-and-branch. Preprocessing is described in Subsection 4.1, while the cut-and-branch algorithm is described in Subsection 4.2. Throughout this section, for a given set of nodes V ⊆V , we let G[V ] denote the subgraph of G induced by the nodes in V . Figure 1: A graph (left) and its (unique) 3-core (right).

Preprocessing
In the first stage, an attempt is made to simplify the input graph G and, if possible, decompose it into smaller and simpler subgraphs. This is via two operations, which we call k-core reduction and block decomposition. Although we focus on the 2L-PP the following results also apply to the k-PP.
A k-core of a graph G is a maximal connected subgraph whose nodes all have degree of at least k. The concept was first introduced in [Sei83], as a tool to measure cohesion in social networks. An example is given in Fig. 1, but it should be borne in mind that, in general, a graph may have several (node-disjoint) k-cores. The k-cores of a graph can be found easily, in O n 2 time, via a minor adaptation of an algorithm given in [SW68]. Details are given in Algorithm 1.
Algorithm 1: Algorithm for finding k-cores of a graph input : graph G=(V, E) output: k-cores of G V :=V ; do The reason that k-cores are of interest is given in the following proposition: Proposition 4.1 For any graph G, the cost of the optimal 2L-PP solution is equal to the sum of the costs of the optimal solutions of the 2L-PP instances given by its k-cores.
Proof (sketch). Let v ∈V be any node whose degree in G is less than k. Suppose we solve the 2L-PP on the induced subgraph G[V \{v}]. Then we can extend the 2L-PP solution to the original graph G, without increasing its cost, by giving node v a colour Figure 2: Blocks of the 3-core (left) and 3-cores of the blocks (right).
that is not congruent modulo k to the colour of any of its neighbours. The result follows by induction.
We refer to the process of the replacement of G with its k-core(s) as k-core reduction. We will say that a graph is k-core reducible if it is not equal to the union of its k-cores. Now, a vertex of a graph is said to be an articulation point if its removal causes the graph to become disconnected. A connected graph with no articulation points is said to be biconnected. The biconnected components of a graph, also called blocks, are maximal induced biconnected subgraphs. For example, the graph on the right of Fig. 1 has two blocks, which are displayed on the left of Fig. 2. The blocks of a graph G=(V, E) can be computed in O(|V |+|E|) time [HT73].
It has been noted that many optimisation problems on graphs can be simplified by working on the blocks of the graph instead of the original graph; see, e.g., [Hoc93]. The following proposition shows that this is also the case for the 2L-PP.
Proposition 4.2 For any graph G, the cost of the optimal 2L-PP solution is equal to the sum of the costs of the optimal solutions of the 2L-PP instances given by its blocks.
Proof (sketch). If G is disconnected, then the 2L-PP trivially decomposes into one 2L-PP instance for each connected component. So assume that G is connected but not biconnected. Let v∈V be an articulation point, and let V 1 , . . . , V t be the vertex sets of the connected components of G[V \{v}]. Now consider the subgraphs G[V i ∪{v}] for i=1, . . . , t. Let S(i) be the optimal solution to the 2L-PP instance on G[V i ∪{v}], represented as a proper kk -colouring of V i ∪{v}, and let c(i) be its cost. Since each edge of E appears in exactly one of the given subgraphs, the quantity t i=1 c(i) is a lower bound on the cost of the optimal 2L-PP solution on G. Moreover, by symmetry, we can assume that node v receives colour 1 in S(1), . . . , S(t). Now, for a given u∈V \{v}, let i(u)∈{1, . . . , t} be the unique integer such that u∈V i(u) . We can now construct a feasible solution to the 2L-PP on G by giving node v colour 1, and giving each other node u∈V \{v} the colour that it has in S(i(u)). The resulting 2L-PP solution has cost equal to t i=1 c(i), and is therefore optimal.
We call the replacement of a graph with its blocks block decomposition. Interestingly, a graph which is not k-core reducible may have blocks which are; see again Fig. 2. This leads us to apply k-core reduction and block decomposition recursively, until no more reduction or decomposition is possible.
At the end of this procedure, we have a collection of induced subgraphs of G which are biconnected and not k-core reducible, and we can solve the 2L-PP on each subgraph independently. Given the optimal solutions for each subgraph, we can reconstruct an optimal solution for the original graph by recursively constructing solutions for the predecessor graph of a reduction or decomposition.

Cut-and-branch algorithm
For each remaining subgraph, we now run our cut-and-branch algorithm. Let G =(V , E ) be the given subgraph. We set up an initial trivial LP, with only one variable y e for each edge e∈E , and run a cutting-plane algorithm based on y-clique inequalities. Next, we add the z variables and run another cutting-plane algorithm based on z-clique and yzclique inequalities. Finally, we add the x-variables and run branch-and-bound. The full procedure is detailed in Algorithm 2.
Algorithm 2: Cut-and-branch algorithm to solve 2L-PP input : subgraph G , 2L-PP problem parameters k, k , continuous parameter >0, integer parameter t>0 Enumerate all cliques in G of size greater than k; Construct the (trivial) LP relaxation min e∈E y e s.t. y non-negative; do Solve LP relaxation; Search for violated y-clique inequalities (15); If any are found, add the t most violated ones to the LP; while Violated inequalities found ; Delete all y-clique inequalities with slack greater than ; Change objective function to (8) and add one non-negative variable z e for all e∈E ; do Solve LP relaxation; Search for violated z-clique inequalities (16) and yz-clique inequalities (17); If any are found, add the t most violated ones to the LP; while Violated inequalities found ; Delete all inequalities with slack greater than ; Add x variables and constraints (9)-(14), and apply symmetry-breaking; Solve resulting 0-1 LP with branch-and-bound; The key feature of this approach is that the LP is kept as small as possible throughout the course of the algorithm. Indeed, (a) the z and x variables are added to the problem only when they are needed, (b) only a limited number of constraints are added in each cutting-plane iteration, and (c) slack constraints are deleted after each of the two cuttingplane algorithms has terminated. The net result is that both cutting-plane algorithms run very efficiently, and so does the branch-and-bound algorithm at the end.
We now make some remarks about the separation problems for the three kinds of clique inequalities. Since all three separation problems seem likely to be N P-hard, we initially planned to use greedy separation heuristics, in which the set C is enlarged one node at a time. We were surprised to find, however, that it was feasible to solve the separation problems exactly, by brute-force enumeration, for typical 2L-PP instances encountered in our application. The reason is that the original graph G tends to be fairly sparse in practice, and each subgraph G generated by our preprocessor tends to be fairly small. Accordingly, after the preprocessing stage, we use the Bron-Kerbosch algorithm [BK73] to enumerate all maximal cliques in each subgraph G . It is then fairly easy to solve the separation problems by enumeration, provided that one takes care not to examine the same clique twice in a given separation call. We omit details, for brevity.
We remark that, although an arbitrary graph with n nodes can have as many as 3

Computational Experiments
We now present the results of some computational experiments. In Subsection 5.1, we describe how we constructed the graphs used in our experiments. In Subsection 5.2, we test the preprocessing algorithm for different values of k. In Subsection 5.3, we present results from the cutting-plane algorithms. Finally, in Subsection 5.4, we study the performance of the algorithm as a whole. Throughout these experiments, the value of k varies between 2 and 5, while for simplicity, we fix k =2, since the value of k does not affect the performance of the graph preprocessing algorithm. All experiments have been run on a high performance computer with an Intel 2.6 GHz processor and using 16 cores. Graph preprocessing and clique enumeration was done using igraph [CN06] and the linear and integer programs were solved using Gurobi v.6.5 [GO16].

Graph construction
The strength of a signal at a receiver decays in free space at a rate inversely proportional to the square of the distance from the transmitter, but in real systems often at a faster rate due to the presence of objects blocking or scattering the waves. Therefore, beyond a certain distance, two transceivers can no longer hear each other, and therefore there cannot be a direct conflict between their IDs. In our application, however, a conflict also occurs if a pair of devices have a neighbour in common. (Essentially, this is because each device needs to be able to tell its neighbours apart.) Accordingly, we initially constructed our graphs as follows. We first sample a specified number of points uniformly on the unit square. Edges are created between pairs of points if they are within a specified radius of each other. (This yields a so-called disk graph; see, e.g., [LZN + 10].) The graph is then augmented with edges between pairs of nodes which  Figure 3.
It turned out, however, that neighbourhood graphs constructed in this way yielded extremely easy 2L-PP instances. The reason is that nodes near to the boundary of the square tend to have small degree, which causes them to be removed during the preprocessing stage. This in turn causes their neighbours to have small degree, and so on. In order to create more challenging instances, and to avoid this "boundary effect", we decided to use a torus topology to calculate distances between points in the unit square before constructing the graphs.

Preprocessing
In order to understand the potential benefits of the preprocessing stage, we have calculated the effect of preprocessing on our random neighbourhood graphs for different values of k and disk radius, while fixing n=100. In particular, for radius 0.01, . . . , 0.2 and k=3, 4, 5, we calculate the mean proportion of edges eliminated and the mean proportion of vertices in the largest remaining component. The results are shown in Figure 4. The means were estimated by simulating 1000 random graphs for each pair of parameters.
The results show that, for all values of k, the proportion of edges eliminated decays to zero rather quickly as the disk radius is increased. The proportion of nodes in the largest component also tends to one as the radius is increased, but at a slower rate than the convergence for edge reduction.
In order to gain further insight, we also explored how the average degree in our random neighbourhood graphs depends on the number of nodes and the disk radius. The results are shown in Figure 5. A comparison of this figure and the preceeding one indicates that, as one might expect, preprocessing works best when the average degree is not much larger than k.

Cutting planes
Next, we present some results obtained with the cutting-plane algorithms. For n=100, and for disk radii ranging from 0.08 to 0.14, we constructed 50 random neighbourhood graphs. The same sets of points were used to construct the graphs for each disk radius. We also considered three different values of k, namely 2, 3 and 4. The weights w, w were both set to 1 for simplicity. For each of the resulting 1050 2L-PP instances, we ran the preprocessing algorithm, followed by the cut-and-branch algorithm.
As mentioned in Subsection 3.2, the yz-clique inequalities (17) turned out to be more effective at improving the lower bound than the z-clique inequalities (16). In order to make this clear to the reader, we have divided the second cutting-plane phase into two sub-phases, whereby yz-clique inequalities are added in the first subphase and z-clique inequalities are added in the second subphase.
In Table 1, we present the average gap between the lower bound and optimum, expressed as a proportion of the optimum, after each of the three kinds of cuts have been added. We see that, for each value of k, the gap increases as we enlarge the disk radius. Nevertheless, the gap always remains below 5% for the radii considered. Note that the z-clique inequalities help only when k=2. This may be because z-clique inequalities are defined only for cliques containing more than kk nodes, and not many such cliques are present when k>2.
In Table 2 we present the average number of cuts added during each cutting-plane phase. We see that the number of cuts increases with the disk radius. This is to be expected, since, when the radius is large, there are more large cliques present. On the other hand, the number of cuts decreases as the value of k increases. The explanation for this is that y-clique inequalities are defined only for cliques containing more than k nodes, and the number of such cliques decreases as k increases. Radius y-cut gap yz-cut gap z-cut gap y-cut gap yz-cut gap z-cut gap y-cut gap yz-cut gap z-cut gap Radius # y-cuts # yz-cuts # z-cuts # y-cuts # yz-cuts # z-cuts # y-cuts # yz-cuts # z-cuts

Overall algorithm
Finally, we report results obtained with the overall exact algorithm. Table 3 presents the running times of the cutting plane and branch-and-bound phases of the algorithm. As expected, the running time increases as the disk radius increases and the graph becomes more dense. On the other hand, perhaps surprisingly, it decreases as k increases. This is partly because the preprocessing stage removes more nodes and edges when k is larger but also because fewer edge conflicts occur when we use more colours. We also see that, for all values of k and disk radii, the running time of the cutting-plane stage is negligible compared with the running time of the branch-and-bound stage. This is so, despite the fact that we are using enumeration to solve the separation problems exactly.

Conclusions
In this paper we have defined and tackled the 2-level graph partitioning problem which, as far as we are aware, has not previously been addressed in the optimization or data-mining literature. Although this model was motivated by a problem in telecommunications it may have other applications, such as in hierarchical clustering. The instances encountered in our application were characterised by small values of k and k , and large, sparse graphs. For instances of this kind, we proposed a solution approach based on aggressive preprocessing of the original graph, followed by a novel multilayered cut-and-branch scheme, which is designed to keep the LP as small as possible at each stage. Along the way, we also derived new valid inequalities and symmetry-breaking constraints.
One possible topic for future research is the derivation of additional families of valid inequalities, along with accompanying separation algorithms (either exact or heuristic). Another interesting topic is the "dynamic" version of our problem, in which devices are switched on or off from time to time. and z(S c )= Suppose |S c |=p c k +r c where 0 r c <k . Then the second summation is minimized when |W c+tk |=p c +1 for t=0, . . . , r−1 =p c for t=r, . . . , k −1. Hence, The last expression is minimized when k−1 c=0 r c (k −r c ) is minimized. Noting that k−1 c=0 r c mod k |C| mod k =R, we see that this expression is minimized when r 0 =R and r c =0 for c=1, . . . , k−1. Hence, which is equivalent to the (y, z)-clique inequality (17).
Proof of Theorem 3.2: Let R=|C| mod kk . For the case R=0, the z-clique inequality is implied by other z-clique inequalities (see [CR93]). For the cases R=1 and R=kk −1, we show that the associated z-clique inequality is implied by y-clique and (y, z)-clique inequalities. First, suppose that R=1, i.e., that |C|=T kk +1 for some positive integer T . In this case, the z-clique inequality takes the form: The y-clique inequality on C takes the form: and the (y, z)-clique inequality on C takes the form: k z(C)−y(C) −T k k 2 =k (k/2)(T −k T ).
We prove that such a permutation exists by induction on the number of nodes in V . For the case n=1, the result holds trivially. Suppose that the result holds n≤l, and let us now consider the case n=l+1. Using our induction hypothesis, we suppose, for notational convenience, that φ(C(v))<v for v=1, . . . l. Now, let C(l+1)=pk+r. If φ(C(l+1))=p+r<l+1 then the colouring already satisfies the required condition so we assume that this is not true.
We consider two cases. In the first case, suppose that C(v) mod k =r for all v=1, . . . , l. This can be split into two further subcases. In the first subcase, we assume that l+1 k. We now define an objective-preserving permutation which assigns the colour l to node l+1. Note that by induction hypothesis, none of the nodes v=1, . . . , l are assigned to colour l. Define permutations σ 1 and σ 2 as follows: then σ 2 •σ 1 •C(l+1)=l and so we have φ (σ 2 •σ 1 •C(l+1))=l<l+1 as required.
In the second case, we suppose that the set C rl :={1≤v ≤l:C(v) mod k =r} is nonempty, and let u=max C rl . Then, for some 0≤s<p we have C(u)=sk+r. We now define the required permutation: σ: pk+r →(s+1)k+r (s+1)k+r →pk+r c →c otherwise.