European Journal of Operational Research Perfect Periodic Scheduling for Binary Tree Routing in Wireless Networks

Keywords: Scheduling OR in telecommunications Mobile and Ad hoc NETworks (MANETs) Combinatorial optimization Chinese Remainder Theorem a b s t r a c t In this paper we tackle the problem of coordinating transmission of data across a Wireless Mesh Network. The single task nature of mesh nodes imposes simultaneous activation of adjacent nodes during transmission. This makes the coordinated scheduling of local mesh node traffic with forwarded traffic across the access network to the Internet via the Gateway notoriously difficult. Moreover, with packet data the nature of the coordinated transmission schedule has a big impact upon both the data throughput and energy consumption. Perfect Periodic Scheduling, in which each demand is itself serviced periodically, provides a robust solution. In this paper we explore the properties of Perfect Periodic Schedules with modulo arithmetic using the Chinese Remainder Theorem. We provide a polynomial time, optimisation algorithm, when the access network routing tree has a chain or binary tree structure. Results demonstrate that energy savings and high throughput can be achieved simultaneously. The methodology is generalisable.


Introduction
The emerging technology of Wireless Mesh Networks (WMN) [1] provides a promising paradigm for the flexible and low-cost provision of global Inter-net communication. Mesh routers facilitate multi-hop wireless transmission to relay data over extended distances without need for the cost, delay and disruption of installing cabled access points. Packet scheduling facilitates improved throughput, fairness between clients, reduced delays and energy conservation [2]. However, specialized scheduling methodology is required to exploit these features.
Mesh routers are typically mounted on the sides of buildings and operate in two ways: firstly they service the clients who connect directly to a mesh router to gain broadband access; secondly they act as a relay to other mesh routers in forwarding content to a particular mesh router that acts as the gateway to wired infrastructure. Within each local star network the mesh router can communicate with at most one client at a time. The packet nature of transmission imposes a discrete, unit time, nature on transmission schedules. Moreover, schedules which are periodic for each client are highly desirable because they provide clients with predefined transmission times between which they can conserve resources and avoid contention. The regularity of transmission reduces jitter and thus improves Quality of Service. In addition, the issue of fairness between clients can be enforced by imposing Perfect Periodic Schedule (PPS), in which clients each have periodic sub-schedules of appropriate relative periodicity. Across a mesh network mesh routers may therefore impose local scheduling on their own clients but then need to interweave global scheduling on forwarding traffic to another mesh router. Since mesh routers are unable to multi-task, the problem of coordinating transmission across the entire routing network in the WMN is considerable. Improvement in throughput is captured by the Minimum Frame Length Schedule Problem (MFLSP) which seeks to find a schedule of minimum total duration which may then be repeated. In this article we therefore focus on MFLSP using centrally co-ordinated periodicities to schedule packets across the network.
Several studies have been undertaken on problems of local access. Local traffic is serviced by a mesh router, and forms a local star network, each in a periodic fashion within a perfect periodic (sub)schedule. Bar-Noy et al. [3] prove that the problem of finding a feasible perfect periodic schedule is an NP-hard problem in general. Kim and Glass [4] derive a simple test for the existence of a feasible schedule for problems with two or three distinct periodicities in total. They also provide a method of constructing a feasible schedule, if one exists, using modulo arithmetic. In practice, clients' level of requested demand may vary considerably. Due to the difficulty of finding a feasible perfect periodic schedule to satisfy the particular combination of requested periodicities, heuristics are used to allocated close values, according to specific criteria. Bar-Noy et al. [5] consider two objective measures of maximum and weighted average ratios between the allocated and requested periodicities. They present a few efficient heuristic algorithms to develop a perfect periodic schedule using a methodology, called tree scheduling, since it is based on hierarchical round-robin where the hierarchy is a form of tree. Bar-Noy et al. [6] develop tree based approximation algorithms for perfect periodic schedule with the objective of minimizing weighted average ratios between the allocated periodicity and requested periodicity. Brakerski et al. [7] study the question of dispatching in a perfect periodic schedule, namely how to find the next item to schedule, given the past schedule. There are few other papers which consider PPS for telecommunications, namely [8,9,10,7], but none applied to WMNs.
Some studies have been undertaken on problems of data transmission across a mesh network to carry the data from individual mesh nodes to the Internet Gateway. Different interference models have been proposed in the wireless scheduling literature. Notably, the graph interference model [11,12,13,14,15,16,17], where nodes interfere with other nodes in a predefined neighborhood within the network a conflict graph. If the interference is restricted to the 1-hop neighborhood, then the scheduling problem reduces to the Chromatic Number Problem. More recently the physical interference model has been proposed [18,19,20,21,22,23,24,25,26,2] where signal power attenuation is taken explicitly into account via the Signal to Interference plus Noise Ratio (SINR) constraint that represents the actual physical interference in the wireless network. In the WMN context, interference related to broadcast noise is less of a feature. The main characteristic of the technology is blocking of transmission on adjacent links due to the single-task nature of mesh nodes. The problem thus resembles 1-hop edge colouring. However, the strongest feature in our context is the periodic nature of transmission through a link.
One article [27] explores the means of coordinating local mesh schedules which are periodic, but not necessarily so restrictive as to be perfectly periodic. The authors consider the scenario of pre-set local periodic schedules at the mesh nodes, and develop an heuristic to integrate them into a global schedule through the access network. An access link between two adjacent nodes can only be active when there is a simultaneous gap in local transmission at each of the two nodes. Thus, the first natural mechanism for co-ordinating local schedules is to control their relative start times. However, this is rarely sufficient even with sparse local schedules. Allen et al. [27] develop an optimization scheduling algorithm which in addition equitably reduces the service time to local clients. Their algorithm works well for 25-node routing networks. However, by the nature of the problem, a large reduction in throughput was required to achieve a feasible schedule. Their computational work thus highlights the necessity of co-ordinating the periodicities of the local schedules if service levels are to be maintained. When transmission is co-ordinated in practice this necessity is satisfied with the standard mode of a Common Cycle.
We tackle the problem of scheduling both local and global data transmissions in a mesh network in perfectly periodic fashion. In a perfect periodic schedule, each transmission is undertaken at a regular, though not necessarily common, time interval.
We develop a methodology for the problem focusing upon uniform client demand, uniform link capacities and binary and chain routing trees. This is in line with the common practice of imposing routing through tree subnetworks of binary, or near binary, form. Moreover, both the results and the methodology are generalisable. Results are compared with the simpler periodic form used in practice of a Common Cycle, termed round robin, to gauge their advantage. The problem is formulated and the solution space defined in terms of congruent arithmetic in the next section. The case of a chain routing tree is then analysed in Section 3 and reduced to just two potentially optimal forms. The following three sections are dedicated to finding minimum time frame schedules for a binary routing tree. We first analyse properties of feasible, and then optimal, schedules for half of a binary tree, namely one which has (up to) two branches on all but the node adjacent to the Gateway. Using these results, in Section 5 we reduce the number of candidates for an optimal schedule of a full binary tree. The forms of an optimal binary tree are then further reduced and enumerated in section 6, along with closed form expressions for the corresponding time frames. The outcome is an optimisation algorithm, which depends only upon prime factorisation of an integer of reasonable size, namely the total number of peripheral clients in the network. A polynomial time approximation scheme (PTAS), which is computable in practice, is also provided. The impact of transmission from different parts of the network, and the effectiveness gain over the Common Cycle schedule, are also analysed. The behaviour of algorithm OptPPS in practice is evaluated in section 7, where experimental results reveal that ef-ficiency gains of over 35% is normal, and 100% is reached for some relatively small networks.

Background
The routing of messages through a Wireless Mesh Network is done in practice within a predetermined routing tree subnetwork whose root is the single gateway to the Internet. The packet nature of data transmission results in transmissions of homogeneous size. Data all originate at local clients and in the absence of further information we assume identical demand from each client in the network.
In practice, transmission into and out of the gateway are generally performed separately. We focus upon flow into the gateway, as outflow transmission can be treated in an identical manner. In this context a mesh node may have several incoming links within the routing tree, but only a single outgoing link. It is simplest to consider the case of homogeneous link capacity, which we will calibrate to be one unit of data per time unit. Now recall that any two links adjacent to a star-node cannot be active simultaneously. Thus, at a mesh node a schedule consists of an assignment of each time slot to at most one of the adjacent links: to a local client; to one of the incoming access links; or else the single outgoing access link. The imperative of improved throughput is captured by the Minimum Frame Length Schedule Problem (MFLSP) which seeks to find a schedule of minimum total duration. In this context, we wish to find a periodic schedule, of minimum length, in which all data make a single hop along the routing tree and each link being itself scheduled periodically. The problem may be formulated as follows.

Notations:
G index for the Gateway Mesh node j index for a non-Gateway Mesh node n number of Mesh nodes, other than the Gateway l j the link in the routing tree out of Mesh node j w j total amount of data flow through link j, i.e. the amount of data output by node j L G the set of links in the access network ending at the the Gateway Mesh node L j the set of links in the access network ending or beginning at Mesh node j Y j the set of links from local clients into Mesh node j y j = |Y j |, the number of local clients of Mesh node j τ j first time slot in which link l j is activated τ the list of first time-slots τ j q j periodicity of data transmission for the out-flow from Mesh node j, along link l j q the list of periodicities q j S = S(τ , q) the perfect periodic schedule defined by τ and q T = T (τ , q) or T (S), the length of a complete cycle of the perfect periodic schedule S(τ , q). We say that a solution S is dominated by another solution S ′ if T (S ′ ) ≤ T (S). Observe that the input data consists of the network links, the l j 's, and the local data captured by the y j values. Since there is conservation of data-flow at each Mesh node, the total amount of in-flow has to be the same as the total amount of out-flow at each Mesh node. Thus, the demand for data flow along links in the network, w j , is fully determined by the amount of local data entering the network at Mesh nodes, y j for j = 1, . . . , n, in the routing tree. Numbering star-nodes to respect the direction of flow along the routing tree, the w j values may thus be determined recursively by the formula: Problem: For a given routing tree with a single Gateway node, and n additional nodes with y j clients at node j, for j = 1, . . . , n, find time-slots τ j and periodicities q j satisfying the following constraints: and ∑ and ∑ for which the overall periodicity T (q) of the corresponding schedule satisfies T is a multiple of lcm(q 1 , . . . , q n ), T ≥ w j q j for all j, and τ j , q j ∈ N, for all j.
The objective is to minimize the schedule cycle length T = T (τ , q).
Constraint (1) prohibits simultaneous transmission on access links adjacent to the same node. Constraints (2) and (6) respectively ensure that at each mesh node there is some gap, and that the number of gaps in the complete schedule is sufficient to accommodate all of the local traffic. The capacity restriction at the Gateway node is captured in constraint (3). Constraint (5) ensures that all of the data w j at each node j is transmitted within the schedule cycle. While constraint (4) ensures that the periodicity of each sub-schedule is accommodated within the whole schedule.
The following useful result follows directly from the Chinese Remainder Theorem (CRT) [28,Theorem 3.12].

Lemma 1.
A solution τ j and q j for j = 1, . . . , n satisfies condition (1) if and only if
For two positive integers, a and b, let R(a, b) denote the remainder function of a and b, that is, R(a, b) = a − b ⌊a/b⌋, and a | b denotes that a divides b.

Chain Network
In this section, we study a chain network where each node has at most one adjacent node from which it receives data. Observe that since local clients each require only one data unit to be transfered in each cycle, they can be fitted into an available time slot without violating the perfect periodic nature of the schedule. It is therefore convenient to have a simple diagrammatic representation of the multiple local clients of a node. We use a triangle node for this purpose, and index the nodes by depth from the gateway, as depicted in Figure 1.
Observe that nodes at depth 3 onward have no explicit effect on the T . However, reducing the chain to depth 1 reduces T to 2w 1 .

Example 1.
Consider a chain network of depth 3 with input data y 1 = 3, y 2 = 2 and y 3 = 1 as shown Figure 2 (a). By Theorem 1, an optimal PPS is provided by q = (q 1 , q 2 , q 3 ) = (2, 4, 4), τ = (τ 1 , τ 2 , τ 3 ) = (0, 1, 0) and T = min{3w 1 , 4w 2 } = 12. The corresponding full set of time slots in which links are activated within each full cycle is indicated in Figure 2 (b). Each local client's link is activated once in every full cycle of length 12. Now consider how a standard routing protocol using a Common Cycle of periodicity q C would schedule data transfer. It requires q C ≥ 3, to satisfy condition (2) since node 2 has three links. Since T C ≥ q C w 1 , q C = 3 provides the optimal Common Cycle schedule. Thus, for Example 1, T C = 3 * 6 = 18 compared with T * = 12 and T C /T * = 3/2. More generally, when 3w 1 ≥ 4w 2 , from Theorem 1, giving the following result. Theorem 2. For a chain network, perfect periodic schedule accommodates up to 50% more capacity than the standard Common Cycle approach.

Binary tree network with a single link to the Gateway
When a routing tree has multiple Mesh nodes adjacent to the Gateway, the PPS problem is NP-hard [4]. We study the special case of a routing tree in which each mesh node has at most two incoming access links, namely a binary tree network. For ease of analysis, we first study the case with only one Mesh node adjacent to the Gateway, defined as half binary tree network. We then extend this result to the case where there are two Mesh nodes adjacent to the Gateway in the next section.
We use the following convention for a half binary tree which we refer to as a canonical indexing. Nodes are indexed with respect to the distance (in the number of edges) from the gateway, and an edge has the same index as its start node. Links going into a specific node are indexed in non-increasing transmission requirement, eg. w 2 ≥ w 3 . In addition, we may refer to the two incoming links at node j as j 1 and j 2 where w j 1 ≥ w j 2 by convention. We assume throughout that the input data flow rates is not too large at any single node. More precisely, y j ≤ w j 2 for all j.
Our approach is to identify a limited number of possible dominant solutions for half of a binary (sub)tree before proceeding to consider optimal solutions for whole binary tree. It is sufficient to consider three classes of feasible schedules, one for each values of q 1 , namely S 2 for q 1 = 2, S 3 for q 1 = 3 and S a for q 1 = a and a ≥ 4. a and b, the schedule S 2 (a, b) where a ≥ 2 and ab ≥ 3, defined by

Lemma 5.
For a network containing a half binary subtree with q 1 = 2, there exists an optimal PPS having one of following forms with the corresponding constraints on the value of T : Proof. Take a feasible PPS for a half binary tree with q 1 = 2 and the corresponding T . Both q 2 and q 3 have to be a multiple of 2 since q 1 , q 2 and q 3 cannot be pairwise coprime by Corollary 1. Due to transmissions of the link 3, ie. w 3 > 0, we have that q 2 ≥ 4. We consider the cases q 2 = 4 and q 2 = 2a for a ≥ 3, separately. Suppose that q 2 = 4. Note that q 3 must be a multiple of 4, q 3 = 4b say, by Lemma 4, and b ≥ 2 to allow time for the local transmissions of the node 1, y 1 . Conditions (4) and (5) imply that T is a multiple of 4b and that T ≥ max{2w 1 , 4w 2 , 4bw 3 } = max{4w 2 , 4bw 3 } by Appendix A. Thus, T ≥ 4b max{⌈w 2 /b⌉ , w 3 } and 4b | T . Observe that both these conditions are precisely the constraints on the value of T in S 2 (2, b) from Lemma 3. Now suppose that q 2 = 2a and a ≥ 3. Since 3w 2 ≥ w 1 and a ≥ 3, conditions (4) and (5) imply that T ≥ max{2w 1 , 2aw 2 } = 2aw 2 and 2a | T . Observe that this condition is precisely the constraints on the value of T in S 2 (a, 1) from Lemma 3.

Case of base periodicity 3
Lemma 6. For a network containing a half binary subtree with q 1 = 3, there exists an optimal PPS having the following form with the corresponding Proof. We first show that S 3 (a) for a ≥ 2 is feasible, with T ≥ 3a max {⌈w 1 /a⌉ , w} and 3a | T , where w = max {w 2 r +1 : r = 1, . . . , ⌊log 2 n⌋}. Observe that τ j , τ j 1 and τ j 2 satisfy condition (1) by Lemma 1 for all j. Condition (2) is satisfied since a ≥ 2 and ∑ Condition (3) is trivially satisfied since G has only one element. Thus, S 3 (a) is feasible. Observe that w = max{w 2 r +1 : 0 ≤ r ≤ ⌊log 2 n⌋} = max j∈J\J 1 {w j }, where J = {1, . . . , n} and J 1 = {2 r : 0 ≤ r ≤ ⌊log 2 n⌋}, because a star-node j for j ∈ J \ J 1 transmits its data to the gateway via a star-node j for j ∈ {2 r + 1 : 0 ≤ r ≤ ⌊log 2 n⌋}. Thus, condition (5) (4) imposes that T is divisible by 3a and strengthens the bound on T to T ≥ 3a max {⌈w 1 /a⌉ , w}. Note that T ≥ q j 2 w j 2 ≥ 6y j since q j 2 = 3a ≥ 6 and w j 2 ≥ y j for all j. Thus, Thus, condition (6) is satisfied. Take a feasible solution S with q 1 = 3. Let r denote the smallest index among nodes for which Since q j = 3 for j ∈ {2 r : 0 ≤ r ≤ r}, we have that q j for j ∈ J 2 are each multiples of 3 by Corollary 1. Since q j > 3 for j ∈ J 2 to accommodate local transmission at star-node 2 r for r = 0, . . . , r, we have that q j is of the form 3a for some integer a and a ≥ 2. Thus, T (S) is constrained by condition (4) to have 3a | T (S) and by condition (5) to have T (S) ≥ max{3w 1 , 3aw j } = 3a max{⌈w 1 /a⌉ , w j }. Since w 2 r +1 ≥ w 2 j +1 for j ≥ r+2, from the definition of j, we have that w j ≥ max{w 2 r +1 : 0 ≤ r ≤ ⌊log 2 n⌋} = w. Therefore, T (S) ≥ 3a max{⌈w 1 /a⌉ , w j } ≥ 3a max{⌈w 1 /a⌉ , w} = T (S 3 (a)), which implies that there exists an optimal PPS with the form of S 3 (a).

Optimal solutions a for half-binary tree
From the results of Lemmas 5 and 6 based upon periodicities 2 and 3 respectively, we obtain a complete set of optimal PPSs for a half binary tree in Theorem 3.

Theorem 3.
For a half binary tree, there is an optimal PPS of one of the following forms: and if there exists an integer a such that a | w 2 and 3 ≤ a < w 2 /w 3 , and if there exists an integer a such that a | w 1 and 3 ≤ a < w 1 / w, Proof. There are three cases to consider: q 1 = 2, q 1 = 3 and q 1 ≥ 4. When q 1 = 2, by Lemma 5, it is sufficient to consider only schedules S 2 (2, a) for a ≥ 2 with T = 4a max {⌈w 2 /a⌉ , w 3 } and S 2 (a, 1) for a ≥ 3 with T = 2aw 2 . By Appendix B for T /4, T is mimimized to { 4w 2 if there exists an integer a such that a | w 2 and 3 ≤ a < w 2 /w 3 , 8 max {⌈w 2 /2⌉ , w 3 } otherwise, by S 2 (2, a) and S 2 (2, 2), respectively. Moreover, S 2 (a, 1) for a ≥ 3 achieves the smallest T value by setting a = 3 to give T = 6w 2 .
For completeness, observe that in the context of a larger tree, it might be necessary to consider solutions with q 1 ≥ 4.

Lemma 7.
For a network containing a half binary subtree with q 1 = a ≥ 4, there exists an optimal PPS, S a , having the following form q j = a for j = 1, . . . , n, τ 1 = 0, τ j 1 = R(τ j + 1, a) for all j, τ j 2 = R(τ j + 2, a) for all j, with periodicity T constrained by the two conditions T ≥ w 1 a and a | T.
Proof. We first show that the solutions S a for a ≥ 4 is feasible. Observe that τ j , τ j 1 and τ j 2 satisfy condition (1) by Lemma 1 for all j. Condition (2) is satisfied since Condition (3) is trivially satisfied since G has only one element. Observe that a | T and T ≥ w 1 a are precisely conditions (4) and (5). Moreover, condition (6) is satisfied since Take a feasible PPS with q 1 = a and a ≥ 4. Then, by conditions (4) and (5), a | T and T ≥ w 1 a. Observe that both these conditions are precisely the constraints on the value of T in S a .

Binary routing tree network: properties of an optimal schedule
We now extend the results for the half binary tree to the whole binary tree. Figure 7 depicts the structure of the whole binary tree which can be decomposed into two half binary trees. We index the two half binary trees independently using canonical indexing, and assume without loss of generality that w A1 ≥ w B1 . We assume throughout that the input data flow rates is not too large at any single node. More precisely, y kj ≤ w kj 2 for k = A, B and all non-peripheral nodes j (j 2 being undefined for peripheral nodes). Let n A and n B denote the numbers of star-nodes in the left-hand side half binary tree and the right-hand side half binary tree, respectively, where n = n A + n B . We define a composite function • for combining two feasible schedules, one for each of the two for two half binary trees, into a single schedule for the whole binary tree. The composite periodicity vector q = q A • q B leaves the periodicities unchanged, while τ = τ A • τ B retain the relative start time within each subschedule but shift the timing for one tree by one time-unit to avoid overlap at the gateway. Thus, τ Aj ← τ Aj for j = 1, . . . , n A and τ Bj ← R(τ Bj + 1, q Bj ) for j = 1, . . . , n B . Observe that feasibility of the composite tree S A • S B is inherited from feasibility of S A and S B independently and conditions (1) and (3) at the gateway. Condition (1) holds by Corollary 1 because | τ A1 − τ B1 | = 1 and gcd(q A1 , q B1 ) ≥ 2. Condition (3) holds because q A1 ≥ 2, q B1 ≥ 2 and y G = 0. Moreover, there are no additional constraints on T other than those imposed by subtrees S A and S B , since (4) -(6) are edge conditions and the single condition associated with the new gateway node, condition (6), is automatically satisfied since it is assumed to have no direct input, y G = 0.
We find an optimal solution for the whole binary tree by coordinating limited number of feasible solutions for the half binary tree. Proof. Suppose that there exists an optimal schedule S with q A1 ≥ 4. From condition (5), the solution has (2), providing the required contradiction.

Lemma 9.
For any instance of the whole binary tree network, there exists an optimal solution with q A1 ≤ 3 and q B1 ≤ 4.

Proof.
Take an optimal schedule S = S A • S B . Without loss of generality, we assume that τ A1 = 0. From Lemma 8 q A1 = 2 or 3. Now suppose that the Lemma does not hold, and thus q B1 ≥ 5, and hence q B1 ≥ 6 by Corollary 1 applied to the gateway node. Let a = q A1 and b = q B1 . Construct new Observe that τ ′ Bj , τ ′ Bj 1 and τ ′ Bj 2 satisfy condition (1) by Lemma 1 for j = 1, . . . n B . Condition (2) is satisfied because Condition (3) holds because q ′ A1 ≥ 2, q ′ B1 ≥ 2 and y G = 0. Thus, S ′ is feasible. It remains to show that schedule S ′ is accommodated in T (S), or equivalently that conditions (4) -(6) are satisfied for the given value of

T (S). Condition (4) is satisfied because T (S) is divisible by both
and thus, condition (6) is satisfied. From Lemmas 8 and 9, it is sufficient to consider only solutions with q A1 = 2, 3 and q B1 = 2, 3, 4. Moreover, since q A1 and q B1 cannot be co-prime from Corollary 1, when q A1 = 2 the value of q B1 is 2 or 4, and when q A1 = 3 q B1 is 3. We now consider each of these three cases in turn.

Lemma 10.
Any feasible PPS for a whole binary tree with q A1 = 3 is dominated by a solution S 3 (a)•S 3 (a) with T = 3a max {⌈w A1 /a⌉ , w} for some integer a ≥ 2, where w = max { w k(2 r +1) : r = 1, . . . , ⌊log 2 n k ⌋ and k = A, B } . Proof. Take a feasible schedule S A • S B with q A1 = 3. As observed above, q B1 = 3 from Corollary 1. Thus, by Lemma 6, S A and S B are dominated by S 3 (a A ) and S 3 (a B ), respectively, where 3a Lemma 11. Any feasible PPS for a whole binary tree with q A1 = q B1 = 2 is dominated by one of the following solutions S 2 (2, a) • S 2 (2, a) for some integer a ≥ 2 with Proof. From the result for a network containing a half binary subtree in Lemma 5, it is sufficient to consider all combinations of S A = S 2 (2, a) for a ≥ 2 or S A = S 2 (a, 1) for a ≥ 3 and S B = S 2 (2, b) for b ≥ 2 or S B = S 2 (b, 1) for b ≥ 3. We consider these cases separately. Case 1: S A = S 2 (2, a) for a ≥ 2 and S B = S 2 (2, b) for b ≥ 2. By Lemma 5, we have that 4a|T , 4b|T and T ≥ 4 max {a max {⌈w A2 /a⌉ , w A3 } , b max {⌈w B2 /b⌉ , w B3 } Thus, an optimal T value is of the form a) for a ≥ 2 and S B = S 2 (b, 1) for b ≥ 3. We first consider the subcase when a = 2 and b = 3. In this subcase, by Lemma 5, we have that 24 | T and T ≥ max{4w A2 , 8w A3 , 6w B2 }. Thus, We now consider the subcase when a = 2 and b ≥ 4. By Lemma 5, we have that 8 | T , 2b | T and implying that in this subcase, any solution can be dominated by a solution S 2 (2, 2) • S 2 (2, 2). Finally, we consider the subcase when a ≥ 3 and b ≥ 3. Then, by Lemma 5, we have that 4a | T , 2b | T and T ≥ max{4w A2 , 4aw A3 , 2bw B2 }. Thus, an optimal T value is of the form This case is similar to Case 2 but with the roles of a and b reversed. If a = 3 and b = 2, If a ≥ 3 and b ≥ 3, then Case 4: S A = S 2 (a, 1) for a ≥ 3 and S B = S 2 (b, 1) for b ≥ 3. by Lemma 5, we have that 2a | T , 2b | T and Thus, the solution is dominated by a solution S 2 (3, 1) • S 2 (3, 1).

Lemma 12.
Any feasible PPS for a whole binary tree with q A1 = 2 and q B1 = 4, which is not dominated by a solution with q A1 = q B1 = 2, is dominated by one of the following solutions S 2 (2, a) • S 4 for some integer a ≥ 3 with Proof. Note that any feasible PPS S A • S B with q B1 = 4 is dominated by a solution with S B = S 4 by Lemma 7. Since q A1 = 2, by Lemma 5 there are two cases to consider: S A = S 2 (2, a) for a ≥ 2, and S A = S 2 (a, 1) for a ≥ 3. Case 1: S 2 (2, a) • S 4 for a ≥ 2 By Lemmas 5 and 7, we have that 4a | T and T ≥ max{4w A2 , 4aw A3 , 4w B1 }. If a = 2, then implying that the solution is dominated by S 2 (2, 2) • S 2 (2, 2). If a ≥ 3, then Case 2: S 2 (a, 1) • S 4 for a ≥ 3 By Lemmas 5 and 7, conditions on T are 4|T , 2a|T and T ≥ max{2aw A2 , 4w B1 }. Thus, when a = 3, Now take a ≥ 4 and compare S 2 (a, 1) • S 4 and its time frame T with the alternative schedule S 2 (2, a) • S 4 . The alternative schedule is feasible with q ′ A2 = 4 < 2a = q A2 , q ′ Aj = q Aj = 2a or 4, for all other values of j, and thus 4 | T ′ , 2a | T ′ and q ′ Aj ≤ q Aj for all values of j. Hence, T ′ ≤ T and S 2 (a, 1) • S 4 is dominated by S 2 (2, a) • S 4 .

Binary routing tree network: optimal algorithm
In the previous section we classified the forms which we need to consider for an optimal PPS for a binary tree in Lemmas 10 to 12. Several of these forms are parameterised by the variable a and it is therefore useful to reduce the range of potential values of a, which we now do in the following Lemma. Algorithm OptPPS and Theorem 4 then draws these results together. The efficiency of the optimisation algorithm OptPPS is considered at the end of the section, along with its effectiveness relative to the standard round robin, Common Cycle, schedule.

Algorithm OptPPS
Find the minimum T value amongst the following forms, and output in addition a corresponding schedule: Proof. We have established in the previous section that only solutions with q A1 = q B1 = 3 and q A1 = 2 with q B1 = 2 or 4, described in Lemmas 10, 11 and 12 need be considered. When q A1 = q B1 = 3 potential optimal solutions are of the form S 3 (a) • S 3 (a) with periodicity T = 3a max {⌈w A1 /a⌉ , w} from Lemma 10. Now w A1 ≥ 2 w, since w A1 ≥ w B1 and w k1 ≥ w k2 r−1 = w k2 r +1 + w k2 r + y k2 r−1 > w k2 r +1 +w k2 r ≥ 2w k2 r +1 because w k2 r ≥ w k2 r +1 from the indexing convention, for r = 1, . . . , ⌊log 2 n k ⌋ and k = A, B. Hence, ⌈w A1 /2⌉ ≥ w and from the result in Appendix B applied to T /3, for a ≥ 2 if there exists an integer a such that a | w A1 and 3 ≤ a < w A1 / w, 6 ⌈w A1 /2⌉ otherwise, giving rise to the first two forms.
The solution S 2 (2, a) • S 2 (2, a) for a ≥ 2 has from Lemma 11 and Appendix B. The list of solutions from Lemmas 11 combined with the upper limit on the value of a is given in Lemma 13, thus give rise to the third to the ninth solution forms. The last two forms arise from Lemma 12, with additional restrictions on the range of a imposed by Lemma 13. Observe that the eleven expressions considered by Algorithm OptPPS as having potentially minimum values for the time frame, T, are each closed form, and that only the second expression may need evaluating more than 8 times. It is sufficient to consider the second expression only for values of a no greater than √ w A1 . The second and ninth expressions involve prime factorisation of an integer no greater than w A1 . While factorisation is N Phard in general, it can be performed quickly for any integer up to 40 digits long [29]. Since w A1 represents the total number of peripheral clients in the network, an optimal PPS for a full binary tree network can, in practice, be found in polynomial time.
Observe that if the value of w A1 were to be too large for prime factorisation by the available software, then a potential optimal solution S 3 (a) • S 3 (a) with value T = 3w A1 might be missed. However, the solution found by the algorithm would nonetheless be a (1 + 1/w A1 ) approximation, by comparison with the value T = 6 ⌈w A1 /2⌉ for S 3 (2) • S 3 (2).
Having established the efficiency of our optimal algorithm, we now turn our attention to its effectiveness. The standard approach to perfect periodic scheduling is a Common Cycle, or round robin, schedule and we therefore use this as the benchmark.

Lemma 14.
For a whole binary tree, an optimal solution with a common periodicity is S 4 • S 4 with periodicity q C = 4 and value T C = 4w A1 .

Theorem 5.
For any binary tree the application of the optimal PPS algorithm provides up to 100% additional capacity over the optimal Common Cycle schedule, i.e., T C T * ≤ 2.

Computational study
A set of experiments was carried out to explore the behaviour of our algorithm OptPPS. A benchmark dataset of instances was devised to take account of various characteristics: size of the network, using depth of 2, 4 and 6 links from the Gateway node; scale of demand, with maximum user demand up to 10, 50, and 100; and the distribution of demand both within and between the two sides of the binary tree as described below. Local demand is generated randomly from a uniform distribution for each node in the network (other than the Gateway) for 20 instances. The benchmark test suite is included as a supplement to the electronic version of this article. The results of applying OptPPS to the benchmart test suite are reported for each of the data sets in Table 1.
The first section of Table 1 provides the values given in the form of capacity gain compared to default alternative of a, in fact the best, Common Cycle (CS). The second section shows the total number of times a candidate solution achieves the optimal value within each set, and is generally greater than 20 due to multiple optima. The 100% capacity gain of OptPPS over CS, postulated in Theorem 5, is achieved for some of the small instances. However, the maximum value and the spread in capacity gain within a data set reduces as the size of the network increases, with the gain narrowing to within 1% of 33% consistently for networks extending 6 links from the Gateway.
The effect of the level of demand is explored by extending the range of demand from [1,10] to [1,50] and then [1,100] for each node in the network. The impact is small on both the range of optimal solutions and their values, and possibly not statistically significant. Indeed, the underlying natural  variation in efficiency values between sets of experiments is highlighted by comparing the first line of results in each of the test sets, as they are randomly generated with the same parameter settings. The average gains differs by 7.
The balance of demand within each side of the binary tree is explored by doubling and then quadrupling average demand at one of the nodes one link from the Gateway on each side. The increase in demand had a similar effect to increasing the size of the network, with average gain reducing with imbalance but remaining above 33% on average.
The effect of the imbalance between the two sides of the binary tree is quite different. As demand on one side of the binary tree, side A, is scaled up, the efficiency gain reported in Table 1 increases, and optimal solutions become restricted to those with periodicity 2, and never 3, at the Gateway. The gain in capacity is always above 75% once demand is imbalanced by 4 to 1. Note that each candidate solutions considered by algorithm OptPPS is optimal for some test instance. However, the spread in the structure of optimal PPS solutions narrows with the size of the network, until periodicity 3 at the Gateway always provides an optimal solution, whereas periodicity 2 at the Gateway is usually appropriate for the smallest networks (n = 6).
Algorithm OptPPS runs in less than 1 sec. and has proved effective on a wide range of instances, demonstrating a benefit over any common cycle solution of at least 22% in additional capacity in all cases.

Conclusion
This paper examined packet scheduling in a Wireless Mesh access Network with a single Gateway to the Internet and identical link capacities, and focus upon perfectly periodic schedules with the minimum time frame in which each peripheral client receives the same level of service. It focuses upon routing trees with a chain or a binary tree structure, producing optimal schedules for co-ordinating local traffic generation with transmission across the access network which run in polynomial time. In doing so the research complements work on perfect periodic schedules at a single mesh node by Kim and Glass [4], and on transmit schedules across the access network to the Internet Gateway respecting pre-generated periodic local mesh schedules [27].
The algorithms which we propose for a perfect periodic schedule along a chain, and through a binary tree network, form the basis of a robust operat-ing mechanism for WMNs. The chain algorithm runs in polynomial time and is up to 50% more effective than the optimal Common Cycle schedule. The binary tree scheduling algorithm effectively runs in polynomial time, of less than 1 minute. Theoretically it is only demonstrably a PTAS relying on factorisation of an integer. However, the integer under consideration represents the number of clients in the network which is small enough to be factorised quickly with current computer algorithms. The contribution of our algorithm is to provide up to double the throughput compared to the optimal Common Cycle schedule for a binary tree. Moreover, the nature of an optimal schedule makes it easy to convey to local nodes, and each solution remains optimal within a range of tolerance which depends only upon the relative cumulative transmission loads through the links within two hops of the Gateway. Even outside the tolerance range the solution will remain feasible with only an incrementally increased time frame.
An important property revealed by this research is that for a binary routing tree in a uniform link capacity WMN, the minimum total time frame of a PPS transmitting information to the Gateway is determined solely by the flow of data required through the six nodes closest to the gateway. For a chain routing network it is the relative traffic on the two links adjacent to the Gateway which determines the form of an optimal solution for maximising the throughput. Observe that these properties may be used when assigning the routing tree within the wireless access network, or indeed for designing the access network itself. Thus, the simplicity and speed of our scheduling algorithms ensure that they can be used to design the routing network. The methodology developed in this paper provides analytic tools for tackling more general routing trees. Future extensions might include non-binary routing tree structures in WMNs, taking account of secondary interference of two or more hops, and scheduling of other types of MANETs with similar equipment.