Abstract 1 Introduction 2 Hardness Results 3 Fixed Parameter Algorithms References Appendix A An FPT Algorithm for Pinwheel Packing

Hardness and Fixed Parameter Tractability for Pinwheel Scheduling Problems

Yusuke Kobayashi ORCID Research Institute for Mathematical Sciences, Kyoto University, Japan Bingkai Lin ORCID School of Computer Science, Nanjing University, China
Abstract

In the Pinwheel Packing problem, we are given a set of recurring tasks, each associated with a positive integer ai for task i. The objective is to select one task to perform each day such that every task i is performed at least once within every ai consecutive days. The exact computational complexity of this problem, where 1/ai=1, has remained an open question for more than 30 years; in particular, it is still unknown whether the problem is 𝖭𝖯-hard. The first contribution of this paper is to show that Pinwheel Packing cannot be solved in polynomial time under a standard complexity assumption, improving upon the hardness result shown by Jacobs and Longo. Additionally, we present fixed-parameter algorithms for variants of Pinwheel Packing, parameterized by the number of tasks.

Keywords and phrases:
Pinwheel Scheduling, Polynomial-time Solvability, Packing and Covering, Fixed Parameter Algorithms
Funding:
Yusuke Kobayashi: JSPS KAKENHI Grant Numbers JP22H05001 and JP24K02901.
Copyright and License:
[Uncaptioned image] © Yusuke Kobayashi and Bingkai Lin; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Design and analysis of algorithms
; Theory of computation Computational complexity and cryptography
Editors:
Ho-Lin Chen, Wing-Kai Hon, and Meng-Tsung Tsai

1 Introduction

1.1 Pinwheel Scheduling

The (packing version of) Pinwheel Scheduling problem was introduced by Holte et al. [12] in 1989 as a formalization of a real-time scheduling problem. In the problem, we are given k recurring tasks and a positive integer ai for each task i[k]={1,,k}. The objective is to select one task to perform each day so that each task i is performed at least once every ai days. In other words, we want to find pairwise disjoint sets S1,,Sk such that

|[m,m+ai)Si|1 (1)

for all i[k] and m, where Si represents the set of days on which task i is performed. Note that each Si can be an infinite set. A natural computational problem is to determine the existence of such sets S1,,Sk, which is formally described as follows. Note that we call this problem Pinwheel Packing in this paper, because we will discuss the corresponding covering variant later.

Pinwheel Packing
Input: A sequence of positive integers A=(ai)i[k].
Task: Determine whether there exist pairwise disjoint sets S1,,Sk such that |[m,m+ai)Si|1 for all i[k] and m.

Despite the simplicity and naturalness of the problem setting, little is known about the computational complexity of this problem. It has been shown in [12, Corollary 2.2] that Pinwheel Packing is in 𝖯𝖲𝖯𝖠𝖢𝖤; however, it is unknown whether this problem is in 𝖭𝖯. Furthermore, it is unknown whether this problem is 𝖭𝖯-hard. See [19] for details.

Since each task i has to be performed on at least a 1ai fraction of a sufficiently long consecutive sequence of days, if A=(ai)i[k] is a yes-instance of Pinwheel Packing, then i=1k1ai (called the density of A) is at most 1. An instance A=(ai)i[k] is called dense if its density is exactly 1. As we see in Section 1.2, for dense instances, Pinwheel Packing is equivalent to several other problems, highlighting that dense instances form an interesting special case. However, the exact complexity of dense instances of Pinwheel Packing has been open for more than 30 years. In fact, it is noted in [12, Section 4] that the 𝖭𝖯-hardness of this problem remains an open question, and it is explicitly conjectured by Kawamura and Soejima [21, Conjecture 19] that Pinwheel Packing for dense instances is 𝖭𝖯-complete. Note that the 𝖭𝖯-hardness has been shown when the input sequence is represented in a concise notation; see [12, Theorem 4.12] and [19, Theorem 5]. Jacobs and Longo showed in their preprint [16] that (dense instances of) Pinwheel Packing cannot be solved in polynomial time unless 𝖲𝖠𝖳 with n variables has a randomized algorithm running in expected time nO(lognloglogn).

1.2 Exact Packing and Covering

As mentioned in the previous subsection, for dense instances, Pinwheel Packing is equivalent to several other problems.

Observe that, if S1,Sk form a solution for a dense instance A=(ai)i[k] of Pinwheel Packing, then they satisfy (1) with equality. Using this observation, for dense instances, Pinwheel Packing is equivalent to the following exact variant.

Exact Pinwheel Packing
Input: A sequence of positive integers A=(ai)i[k].
Task: Determine whether there exist pairwise disjoint sets S1,,Sk such that |[m,m+ai)Si|=1 for all i[k] and m.

Note that the desired condition of this problem means that each task i is performed exactly once every ai days. Therefore, Si satisfies |[m,m+ai)Si|=1 for all m if and only if it is a residue class modulo ai, i.e., Si={ri+aiq:q} for some integer ri. Independently of its connection to Pinwheel Packing, Exact Pinwheel Packing is an interesting problem in its own right. Indeed, Exact Pinwheel Packing has been studied under the name (1-server) periodic maintenance problem [3, 25, 30] in the context of scheduling problems, and its solution has also garnered attention in discrete mathematics under the name disjoint residue classes [15, 21, 28]. It is shown in [3, 16, 21, 25] that Exact Pinwheel Packing is 𝖭𝖯-complete, where we note that the input is not necessarily dense.

We can also consider a problem that is, in a sense, dual to (Exact) Pinwheel Packing, which is called (Exact) Pinwheel Covering [19]. Consider a scenario where a single task must be performed every day, and it is to be handled by k agents. Each agent i[k] is assigned a positive integer ai, which represents the condition that the agent can perform the task at most once (or exactly once) every ai days. In this setting, the problem of determining the assignment of agents corresponds to finding a collection of sets S1,,Sk such that i[k]Si= and

|[m,m+ai)Si|1(or |[m,m+ai)Si|=1)

for all i[k] and m, where Si represents the set of days on which agent i performs the task. That is, the problem is formally described as follows.

Pinwheel Covering (resp. Exact Pinwheel Covering)
Input: A sequence of positive integers A=(ai)i[k].
Task: Determine whether there exist sets S1,,Sk such that i[k]Si= and |[m,m+ai)Si|1 (resp. |[m,m+ai)Si|=1) for all i[k] and m.

Pinwheel Covering was introduced and studied under the name point patrolling in [21]. Similarly to the packing problem, this problem is in 𝖯𝖲𝖯𝖠𝖢𝖤, and it is unknown whether this problem is 𝖭𝖯-hard. In contrast, very recently, it was shown that Exact Pinwheel Covering is 𝖭𝖯-hard [20]. Note that feasible solutions for Exact Pinwheel Covering are known as Erdős covering systems and have been actively studied by number theorists; see [2, 14].

Since each agent i can perform a task on at most a 1ai fraction of a sufficiently long consecutive sequence of days, if A=(ai)i[k] is a yes-instance of Pinwheel Covering, then its density i=1k1ai is at least 1. Similarly to the packing problem, if the density is exactly 1, then Pinwheel Covering and Exact Pinwheel Covering are equivalent. Furthermore, if the density of A=(ai)i[k] is exactly 1 and S1,,Sk satisfy |[m,m+ai)Si|=1 for all i[k] and m, then we see that i[k]Si= if and only if S1,,Sk are pairwise disjoint. By combining these facts, we arrive at the following observation.

Observation 1 (see [19, Section 5]).

For instances with density exactly 1, the four above problems, i.e., (Exact) Pinwheel Packing and (Exact) Pinwheel Covering, coincide.

For brevity, Pinwheel Packing, when restricted to dense instances, is referred to as Dense Pinwheel Packing. Then, Observation 1 implies that Dense Pinwheel Packing is a special case of all the four above problems.

1.3 Our Contributions

As described in Section 1.1, it was shown by Jacobs and Longo [16] that Dense Pinwheel Packing cannot be solved in polynomial time unless 𝖲𝖠𝖳 with n variables has a randomized algorithm running in expected time nO(lognloglogn). The first contribution of this paper is to strengthen this result by showing that Dense Pinwheel Packing cannot be solved in polynomial time under a weaker complexity assumption, partially addressing the open question in [12, Section 4] and [21, Conjecture 19].

Theorem 2.

Dense Pinwheel Packing cannot be solved in polynomial time unless 𝖭𝖯𝖣𝖳𝖨𝖬𝖤(nO(logn)).

Here, 𝖭𝖯𝖣𝖳𝖨𝖬𝖤(nO(logn)) means that every problem in 𝖭𝖯 can be solved in nO(logn) time, where n is the input size of the problem. The assumption 𝖭𝖯𝖣𝖳𝖨𝖬𝖤(nO(logn)) is weaker than the assumption in [16] in two key aspects: the running time is improved from nO(lognloglogn) to nO(logn), and our assumption does not rely on randomization. Note that the assumption 𝖭𝖯𝖣𝖳𝖨𝖬𝖤(nO(logn)) is weaker than the Exponential Time Hypothesis (ETH) and 𝖭𝖯𝖰𝖯 (see Corollary 10), while it is stronger than 𝖯𝖭𝖯. Theorem 2 implies that Pinwheel Packing and Pinwheel Covering cannot be solved in polynomial time under the same assumption.

Corollary 3.

Neither Pinwheel Packing nor Pinwheel Covering can be solved in polynomial time unless 𝖭𝖯𝖣𝖳𝖨𝖬𝖤(nO(logn)).

In our proof for Theorem 2, we refine the argument in [16]. We first prove that Exact Pinwheel Packing is hard even when lcm(A) is not particularly large (see Theorem 6), where lcm(A) denotes the least common multiple of a1,,ak for A=(ai)i[k]. We then reduce Exact Pinwheel Packing to Dense Pinwheel Packing by appending multiple copies of integer lcm(A), thereby proving the hardness of Dense Pinwheel Packing. The primary technical challenge lies in ensuring that lcm(A) does not become excessively large.

To achieve this, Jacobs and Longo [16] reduce an 𝖭𝖯-hard problem of size n to a new problem called Partial Coding, and then further reduce it to Exact Pinwheel Packing. These reductions show that Exact Pinwheel Packing is hard even when lcm(A)=nO(lognloglogn). In contrast, we directly and carefully reduce an 𝖭𝖯-hard problem to Exact Pinwheel Packing, which enables us to achieve a tighter bound of lcm(A)=nO(logn). To derandomize our reduction step, we utilize a sophisticated tool known as (n,k)-universal sets [26] in a non-trivial manner, which constitutes the most technical aspect of our proof. For details, see Section 2.

Theorem 2 suggests that (Exact) Pinwheel Packing and (Exact) Pinwheel Covering are unlikely to be solvable in polynomial time. It is then natural to consider the fixed-parameter tractability of these problems. Indeed, Gąsieniec et al. [10] showed that Pinwheel Packing can be solved in FPT time when parameterized by k. Our second contribution is to show that the remaining three variants can also be solved in FPT time with respect to the parameter k.

Theorem 4.

Pinwheel Covering and Exact Pinwheel Covering can be solved in O(n)+kO(2k) time, where n:=i=1klogai is the input size of the problem.

Theorem 5.

Exact Pinwheel Packing can be solved in (logk)O(k2)nO(1) time, where n:=i=1klogai is the input size of the problem.

We here describe proof ideas for these theorems, while formal proofs are given in Section 3. Our proof for Theorem 4 is based on the following intuition: if some ai is extremely large, then removing ai does not affect the feasibility of the problems. Our technical contribution lies in formalizing this intuition. We then show that it is sufficient to consider the case where each ai is bounded by a function of k, leading to FPT algorithms.

It should be noted that this argument does not apply to Exact Pinwheel Packing, as removing a large ai could affect the feasibility of the problem. For instance, if A consists of two large integers a1 and a2 that are coprime, then A is a no-instance. However, removing either a1 or a2 would result in a yes-instance. Therefore, we adopt a completely different approach to obtain Theorem 5. We observe that a solution to Exact Pinwheel Packing consists of sets Si={ri+aiq:q}, where each set is determined by an integer ri. Treating r1,,rk as integer variables, we show that the constraints for ri can be formulated as an integer linear program by introducing several auxiliary variables. Since the integer linear programming problem can be solved in FPT time, parameterized by the number of variables, this yields an FPT algorithm for Exact Pinwheel Packing.

Moreover, to highlight the similarities and differences between Pinwheel Packing and (Exact) Pinwheel Covering, an FPT algorithm for Pinwheel Packing with an explicit running time bound is provided in Appendix A.

1.4 Related Work

A generalization of Pinwheel Packing has been studied under the name of Windows Scheduling Problem. While Pinwheel Packing can be viewed as a scheduling problem involving a single machine where all tasks have the same size, Windows Scheduling Problem extends this to a setting with multiple machines and tasks of varying sizes [4, 5, 16, 22].

Bamboo Garden Trimming problem is an optimization variant of Pinwheel Packing. Here, the objective is to find the smallest positive number h such that (hai)i[k] is a yes-instance of Pinwheel Packing. Hardness results and approximation algorithms have been investigated for this problem [9, 11, 29].

For Pinwheel Packing, there has been extensive research on sufficient conditions for the density of the input A to be a yes-instance. It is not so difficult to show that A is a yes-instance if its density is at most 12 [12]. A central question in this area is whether the same statement holds when 12 is replaced with a larger number α. The maximum such number α is called the density threshold. Since A=(2,3,m) is a no-instance with a density of 56+1m for any integer m, the density threshold is at most 56. Building on extensive research on the density threshold [6, 7, 10, 24], Kawamura [18] recently showed that the density threshold is exactly 56, resolving the conjecture proposed by Chan and Chin [6]. A threshold depending on the smallest element in A is investigated in [11]. It is also shown that if A consists of at most two distinct values and its density is at most 1, then it is a yes-instance [13].

2 Hardness Results

The objective of this section is to show the hardness of Dense Pinwheel Packing (Theorem 2). To achieve this, we reduce a well-known 𝖭𝖯-hard problem called 3-Coloring in Graphs with Maximum Degree Four; see [8]. In 3-Coloring in Graphs with Maximum Degree Four, the input is a graph G=(V,E) with maximum degree four and the objective is to decide whether G is 3-colorable, that is, to decide whether we can color V with three colors so that adjacent vertices have different colors.

We first show in Section 2.1 that 3-Coloring in Graphs with Maximum Degree Four with n vertices can be reduced to Exact Pinwheel Packing with lcm(A)=nO(logn). Recall that lcm(A) denotes the least common multiple of a1,,ak for A=(ai)i[k]. Then, in Section 2.2, we reduce Exact Pinwheel Packing with lcm(A)=nO(logn) to Dense Pinwheel Packing of size nO(logn).

2.1 Reduction to Exact Pinwheel Packing

Theorem 6.

Let G=(V,E) be a graph with |V|=n whose maximum degree is four. In nO(1) time, we can construct a sequence of positive integers A with lcm(A)=nO(logn) such that G=(V,E) is 3-colorable if and only if A is a yes-instance of Exact Pinwheel Packing.

Proof.

We give a reduction from 3-Coloring in Graphs with Maximum Degree Four to Exact Pinwheel Packing. It suffices to consider the case where n is sufficiently large.

Reduction.

Let G=(V,E) be a graph with |V|=n whose maximum degree is four. We first construct a set T and a family (Tv)vV of subsets of T by applying the following technical lemma, whose proof is postponed to Section 2.3.

Lemma 7.

Let G=(V,E) be a graph with |V|=n whose maximum degree is four. In nO(1) time, we can construct a set T with |T|=O(logn) and its subsets TvT each indexed by vV such that vertices v and v are adjacent in G if and only if TvTv=.

We pick |T| distinct primes (pi)iT indexed by T such that n<pi<2n for each iT. Note that such primes exist when n is sufficiently large, because the prime number theorem guarantees that, for any positive integer N, there are Θ(NlogN) primes less than or equal to N. For every vV, let

av=3iTvpi.

Then, we obtain an instance A=(av)vV of Exact Pinwheel Packing. The construction can be done in nO(1)-time, and

lcm(A)3(maxiTpi)|T|=nO(logn).
Completeness.

We show that if G is 3-colorable, then A=(av)vV is a yes-instance of Exact Pinwheel Packing. Suppose G=(V,E) has a 3-coloring c:V[3]. Let be a bijection from V to [n]. For each vV, let rv be an integer such that

rvc(v)mod3, (2)

and

rv(v)modiTvpi, (3)

whose existence is guaranteed by the Chinese remainder theorem. Let Sv={rv+avq:q} for vV. We claim that (Sv)vV is a solution to the Exact Pinwheel Packing instance A=(av)vV, that is, SvSv= holds for any pair of distinct v,vV. We consider the following two cases separately.

  • Suppose that v and v are adjacent in G. Then, we have c(v)c(v) as c is a coloring, and hence rvrv(mod3) by (2). Thus, for all q,q,

    rv+avqrv+avq,

    because both av and av are divisible by 3. This shows that SvSv=.

  • Suppose that v and v are not adjacent in G. Then, TvTv holds by the construction in Lemma 7. Let i be an element in TvTv. Since pi>n>|(v)(v)|1, we have (v)(v)(modpi), which implies that

    rv(v)(v)rvmodpi

    by (3). Thus, for all q,q,

    rv+avqrv+avq,

    because both av and av are divisible by pi. This shows that SvSv=.

Soundness.

We show that if A=(av)vV is a yes-instance of Exact Pinwheel Packing, then G is 3-colorable. Suppose that (Sv)vV is a solution to the Exact Pinwheel Packing instance A=(av)vV. For each vV, since Sv is a residue class modulo ai, there exists an integer rv such that Sv={rv+avq:q}. For vV, let c(v) be the integer in {1,2,3} such that c(v)rv(mod3). This defines a function c:V[3]. We claim that c is a coloring of G. Let v,vV be vertices that are adjacent to each other. Then, we have TvTv=, and hence gcd(av,av)=3, where gcd denotes the greatest common divisor. Since SvSv= is equivalent to rvrv(modgcd(av,av)) by the Chinese remainder theorem (see e.g. [3, Lemma 12]), we obtain

c(v)rvrvc(v)mod3.

Therefore, c is a 3-coloring of G.

 Remark 8.

Theorem 6 gives an alternative proof of the 𝖭𝖯-completeness of Exact Pinwheel Packing, which has already been shown in [3, 16, 21, 25]. The condition lcm(A)=nO(logn) is not required to prove the 𝖭𝖯-completeness of Exact Pinwheel Packing. However, it is used to show the hardness of Dense Pinwheel Packing in the next subsection.

2.2 Hardness of Dense Pinwheel Packing

In this subsection, we prove the hardness of Dense Pinwheel Packing using Theorem 6.

Theorem 9.

Let G=(V,E) be a graph with |V|=n whose maximum degree is four. In nO(logn) time, we can construct an instance A^=(ai)i[k] of Dense Pinwheel Packing such that k=nO(logn), ai=nO(logn) for each i[k], and G=(V,E) is 3-colorable if and only if A^ is a yes-instance of Dense Pinwheel Packing.

Proof.

Let G=(V,E) be a graph with |V|=n whose maximum degree is four. By Theorem 6, in nO(1) time, we construct a sequence of positive integers A=(ai)i[] with lcm(A)=nO(logn) such that G=(V,E) is 3-colorable if and only if A is a yes-instance of Exact Pinwheel Packing. We may assume that the density of A is at most 1, since otherwise we can just return a trivial no-instance.

We construct an instance A^ of Dense Pinwheel Packing from A by appending multiple copies of integer lcm(A) so that the density becomes 1. That is, we define A^=(ai)i[k] by

k=+(1i=11ai)lcm(A),
a+1=a+2==ak=lcm(A).

Then, we see that klcm(A)=nO(logn) and ailcm(A)=nO(logn) for each i[k]. This implies that A^ can be constructed in nO(logn) time.

It remains to show that G=(V,E) is 3-colorable if and only if A^ is a yes-instance of Dense Pinwheel Packing. To this end, we prove that A is a yes-instance of Exact Pinwheel Packing if and only if A^ is a yes-instance of Dense Pinwheel Packing.

Suppose first that A^ is a yes-instance of Dense Pinwheel Packing and let (Si)i[k] be a solution for it. Then, (Si)i[] is a solution to the Exact Pinwheel Packing instance A.

Suppose next that A is a yes-instance of Exact Pinwheel Packing and let (Si)i[] be a solution for it. Since each Si is a residue class modulo ai, it is the union of lcm(A)ai residue classes modulo lcm(A). Then, i=1Si is the union of lcm(A)i=1lcm(A)ai=k residue classes modulo lcm(A). Therefore, we can take residue classes S+1,,Sk modulo lcm(A) so that (Si)i[k] is a solution to the Dense Pinwheel Packing instance A^.

We are now ready to prove Theorem 2, which we restate here.

Theorem 2. [Restated, see original statement.]

Dense Pinwheel Packing cannot be solved in polynomial time unless 𝖭𝖯𝖣𝖳𝖨𝖬𝖤(nO(logn)).

Proof.

We prove 𝖭𝖯𝖣𝖳𝖨𝖬𝖤(nO(logn)) assuming that Dense Pinwheel Packing can be solved in polynomial time. Suppose we are given an instance of a problem in 𝖭𝖯 whose input size is n. Then, we can construct an equivalent instance of 3-Coloring in Graphs with Maximum Degree Four whose size is nO(1), because 3-Coloring in Graphs with Maximum Degree Four is NP-hard (see [8]). By Theorem 9, we construct an equivalent instance of Dense Pinwheel Packing whose size is nO(logn). These reductions show that, if Dense Pinwheel Packing can be solved in polynomial time, then the original problem in 𝖭𝖯 can be solved in nO(logn) time. Therefore, 𝖭𝖯𝖣𝖳𝖨𝖬𝖤(nO(logn)) holds under the assumption that Dense Pinwheel Packing can be solved in polynomial time.

Using the same reduction, we can also show that Dense Pinwheel Packing cannot be solved in quasi-polynomial time (i.e., 2polylog(n) time) under a stronger complexity assumption. Note that the same hardness result holds also for Pinwheel Packing and Pinwheel Covering, because Dense Pinwheel Packing is a special case of these problems.

Corollary 10.

Dense Pinwheel Packing cannot be solved in quasi-polynomial time unless 𝖭𝖯𝖰𝖯, where 𝖰𝖯 is the class of problems that can be solved in quasi-polynomial time, i.e., 𝖰𝖯=𝖣𝖳𝖨𝖬𝖤(2polylog(n)).

Proof.

As in the proof of Theorem 2, any problem in 𝖭𝖯 with input size n can be reduced to Dense Pinwheel Packing with size N=nO(logn). If Dense Pinwheel Packing can be solved in quasi-polynomial time, then the original problem can be solved in 2polylog(N)=2polylog(n) time. Therefore, 𝖭𝖯𝖰𝖯 holds under the assumption that Dense Pinwheel Packing can be solved in quasi-polynomial time.

2.3 Proof of Lemma 7

In this subsection, we give a proof of Lemma 7. Let G=(V,E) be a graph with |V|=n whose maximum degree is four. A vertex subset IV is called an independent set if no two vertices in I are adjacent to each other. Our idea is to find a family of independent sets in G such that

(I)

for any pair of non-adjacent vertices v,vV, there exists I such that {v,v}I.

Claim 11.

Suppose we are given an independent set family of size O(logn) with property (I). Then, in polynomial time, we can construct a set T and a subset TvT for each vV satisfying the conditions in Lemma 7.

Proof of Claim 11.

Let be an independent set family of size O(logn) with property (I). Then, we can simply set T= and let Tv={I:vI} for vV. We easily see that such T and (Tv)vV satisfy the conditions in Lemma 7 as follows.

  • It is obvious that |T|=||=O(logn).

  • If vertices v and v are adjacent, then they are not contained in the same independent set in G, and hence TvTv=.

  • If vertices v and v are not adjacent, then there must exist an independent set I such that {v,v}I by property (I), and hence ITvTv.

This completes the proof of the claim.

To find an independent set family of size O(logn) that satisfies property (I), we use an argument inspired by the color-coding technique [1]. For every vV, let N[v] denote its closed neighborhood, i.e., N[v]={uV:vuE}{v}. Observe that |N[v]N[v]|10 for any distinct vertices v,vV as G is a graph with maximum degree four. We show that it suffices to construct a family 𝒰2V of vertex subsets with |𝒰|=O(logn) such that

(U)

for any pair of distinct vertices v,vV, there exists a vertex subset U𝒰 such that U(N[v]N[v])={v,v}.

Claim 12.

Suppose we are given a family 𝒰2V of vertex subsets that satisfies property (U). Then, in polynomial time, we can construct an independent set family of size at most |𝒰| with property (I).

Proof of Claim 12.

For each U𝒰, let IU be an inclusionwise maximal independent set in G subject to IUU. Then, set ={IU:U𝒰}, which can be computed in polynomial time. It is obvious that |||𝒰|.

Let v,vV be a pair of distinct non-adjacent vertices. By property (U), there exists a vertex subset U𝒰 such that U(N[v]N[v])={v,v}. Since any maximal independent set contained in U contains both v and v, we obtain {v,v}IU. This shows that satisfies property (I).

By Claims 11 and 12, to prove Lemma 7, it remains to construct in polynomial time a family 𝒰2V with |𝒰|=O(logn) that satisfies property (U). Below, we describe a simple probabilistic construction of 𝒰, followed by a deterministic construction using a sophisticated tool known as the (n,k)-universal sets.

Probabilistic Construction of 𝓤

Consider a random vertex subset UV that contains each vertex independently with probability 12. Then, for any pair of distinct vertices v,vV, U(N[v]N[v])={v,v} holds with probability

12|N[v]N[v]|1210.

We pick such a random vertex subset U independently many times to obtain a family 𝒰. Then, for a pair of distinct vertices v,vV, U(N[v]N[v]){v,v} holds for every U𝒰 with probability at most

(11210)|𝒰|.

By the union bound, with probability at least 1|V|2(11210)|𝒰|, 𝒰 satisfies property (U). When |𝒰|=Θ(log|V|)=Θ(logn), we can generate such a family 𝒰 with constant probability in polynomial time.

Deterministic Construction of 𝓤

We use the (n,k)-universal sets to construct a desired family 𝒰 deterministically.

Definition 13 ((n,k)-universal set).

For positive integers n and k, an (n,k)-universal set is a set of vectors W{0,1}n such that for any index set S[n] of size k, the projection of W on S contains all 2k possible configurations.

Theorem 14 ([26, Theorem 2]).

For any positive integers n and k with kn, an (n,k)-universal set of cardinality O(k2klogn) can be constructed deterministically in time O((nk)k22knk/2).

Setting n=|V| and k=10, by Theorem 14, we construct an (n,k)-universal set W of size O(k2klogn)=O(logn) in time O((nk)k22knk/2)=nO(1). Using an arbitrary bijection from V to [n], W{0,1}n can be regarded as a subset of {0,1}V. By identifying a subset of V and its characteristic vector in {0,1}V, W defines a family 𝒰2V. Then, |𝒰|=|W|=O(logn).

We see that 𝒰 satisfies property (U) as follows. Let v,vV be distinct non-adjacent vertices. Since W is a (|V|,10)-universal set and |N[v]N[v]|10, there exists a vector wW whose projection on N[v]N[v] is the characteristic vector of {v,v}. This means that the set U𝒰 corresponding to w satisfies U(N[v]N[v])={v,v}.

3 Fixed Parameter Algorithms

In this section, we present fixed parameter algorithms for (Exact) Pinwheel Covering and Exact Pinwheel Packing. We prove Theorems 4 and 5 in Sections 3.1 and 3.2, respectively.

3.1 Pinwheel Covering and Exact Pinwheel Covering

In this subsection, we deal with Pinwheel Covering and Exact Pinwheel Covering simultaneously and prove Theorem 4. We first present the following claim. Although this claim was already shown in [21, Section 4.1] for Pinwheel Covering, we here give a proof for completeness.

Claim 15 ([21, Section 4.1]).

Pinwheel Covering and Exact Pinwheel Covering can be solved in (i=1kai)O(1) time.

Proof of Claim 15.

We first consider Pinwheel Covering. Construct a digraph G with i=1kai vertices, each of which corresponds to a k-tuple (b1,,bk) with bi{0,1,,ai1} for each i[k]. This vertex corresponds to a state in which agent i must wait for bi days before handling the task again. We add an arc from a vertex (b1,,bk) to a vertex (b1,,bk) when there is i[k] such that bi=0, bi=ai1, and bj=max{0,bj1} for j[k]{i}. Since a feasible solution of Pinwheel Covering corresponds to an infinite walk in G, A is a yes-instance if and only if G contains a dicycle. This can be checked in (i=1kai)O(1) time.

To deal with Exact Pinwheel Covering, we modify the definition of the edge set as follows: we add an arc from a vertex (b1,,bk) to a vertex (b1,,bk) when there is i[k] such that bi=0, bi=ai1, and (bj,bj)=(0,aj1) or bj=bj1 for j[k]{i}.

Then, A is a yes-instance if and only if the digraph contains a dicycle. This can be checked in (i=1kai)O(1) time.

By this claim, to obtain an FPT algorithm for (Exact) Pinwheel Covering, it is sufficient to bound each ai by a function of k. To achieve this, we prove the following two claims.

Claim 16.

Suppose that A=(ai)i[k] is a no-instance of (Exact) Pinwheel Covering and (Si)i[k] is a family of subsets of such that

|[m,m+ai)Si|1(or |[m,m+ai)Si|=1)

for all i[k] and m. Then, no i=1kai consecutive integers are covered by i=1kSi, that is,

|[m,m+i=1kai)(i=1kSi)|1 (4)

for all m.

Proof of Claim 16.

Suppose that A=(ai)i[k] is a no-instance of (Exact) Pinwheel Covering. Then, the digraph in the proof of Claim 15 contains no dicycle. Therefore, the digraph contains no walk of length i=1kai, which means that no i=1kai consecutive integers are covered by i=1kSi.

Claim 17.

Let A=(ai)i[k] be a sequence of positive integers with a1a2ak, and let [k1]. If A is a yes-instance of (Exact) Pinwheel Covering and A=(ai)i[] is a no-instance of (Exact) Pinwheel Covering, then a+1(k)i=1ai.

Proof of Claim 17.

Let (Si)i[k] be a feasible solution for the instance A. Since A=(ai)i[] is a no-instance of (Exact) Pinwheel Covering, by Claim 16, no i=1ai consecutive integers are covered by i=1Si. Therefore, in any i=1ai consecutive integers, at least one integer is covered by S+1Sk. This implies that

1i=1ai1a+1++1akka+1,

and hence a+1(k)i=1ai.

We are now ready to prove Theorem 4, which we restate here.

Theorem 4. [Restated, see original statement.]

Pinwheel Covering and Exact Pinwheel Covering can be solved in O(n)+kO(2k) time, where n:=i=1klogai is the input size of the problem.

Proof.

Let A=(ai)i[k] be an instance of (Exact) Pinwheel Covering. Without loss of generality, we may assume that a1a2ak. It suffices to consider the case where a1k, since otherwise we can immediately conclude that A is a no-instance.

If aik2i1 for every i[k], then we can check the feasibility of A in (i=1kai)O(1)=kO(2k) time by Claim 15. Otherwise, let [k1] be the minimum integer with a+1>k2, which can be computed in O(n) time. Then, we obtain

a+1>k2=ki=1k2i1>(k)i=1k2i1>(k)i=1ai, (5)

where the last inequality is by the minimality of and a1<k211. We observe that (ai)i[k] is a yes-instance if and only if (ai)i[] is a yes-instance, as the “if” part is trivial and the “only if” part follows from Claim 17 and (5). We can check whether (ai)i[] is a yes-instance or not in (i=1ai)O(1) time by Claim 15, and this running time is bounded by kO(2k).

3.2 Exact Pinwheel Packing

In this subsection, we deal with Exact Pinwheel Packing and prove Theorem 5.

Theorem 5. [Restated, see original statement.]

Exact Pinwheel Packing can be solved in (logk)O(k2)nO(1) time, where n:=i=1klogai is the input size of the problem.

Proof.

Let A=(ai)i[k] be an instance of Exact Pinwheel Packing. Recall that the objective is to find pairwise disjoint sets S1,,Sk such that Si is a residue class modulo ai for i[k]. This is equivalent to finding ri for i[k] such that

Si={ri+aiq:q} and Sj={rj+ajq:q} are disjoint (6)

for all distinct i,j[k]. By the Chinese remainder theorem (see e.g. [3, Lemma 12]), (6) is equivalent to

rirjmodgcd(ai,aj). (7)

We now reduce this problem to the integer linear programming problem. We treat r1,,rk as integer variables. In addition to these, for all distinct i,j[k], we introduce new integer variables qi,j and i,j, and consider the following linear constraints:

rirj=qi,jgcd(ai,aj)+i,j, (8)
1i,jgcd(ai,aj)1. (9)

Then, we obtain an integer linear program with O(k2) variables and O(k2) constraints. Since ri and rj satisfy (7) if and only if (8) and (9) hold for some integers qi,j and i,j, Exact Pinwheel Packing is reduced to the integer linear program defined by (8) and (9).

It is known that the integer linear programming problem can be solved in FPT time, parameterized by its variable number p; see e.g., [17, 23, 27], and the current smallest parameter dependency is (logp)O(p) [27]. Using this result, we obtain a (logk)O(k2)nO(1) time algorithm for Exact Pinwheel Packing.

References

  • [1] Noga Alon, Raphael Yuster, and Uri Zwick. Color-coding. J. ACM, 42(4):844–856, July 1995. doi:10.1145/210332.210337.
  • [2] Paul Balister. Erdős Covering Systems, pages 31–54. London Mathematical Society Lecture Note Series. Cambridge University Press, 2024.
  • [3] Amotz Bar-Noy, Randeep Bhatia, Joseph Naor, and Baruch Schieber. Minimizing service and operation costs of periodic scheduling. Mathematics of Operations Research, 27(3):518–544, 2002. doi:10.1287/moor.27.3.518.314.
  • [4] Amotz Bar-Noy and Richard E. Ladner. Windows scheduling problems for broadcast systems. SIAM Journal on Computing, 32(4):1091–1113, 2003. doi:10.1137/S009753970240447X.
  • [5] Amotz Bar-Noy, Richard E. Ladner, and Tami Tamir. Windows scheduling as a restricted version of bin packing. ACM Trans. Algorithms, 3(3):Article 28, 2007. doi:10.1145/1273340.1273344.
  • [6] Mee Yee Chan and Francis Chin. Schedulers for larger classes of pinwheel instances. Algorithmica, 9:425–462, 1993. doi:10.1007/BF01187034.
  • [7] Peter C. Fishburn and J. C. Lagarias. Pinwheel scheduling: Achievable densities. Algorithmica, 34(1):14–38, 2002. doi:10.1007/S00453-002-0938-9.
  • [8] M. R. Garey and D. S. Johnson. Computers and intractability: A guide to the theory of NP-completeness. W.H. Freeman and Co, 2003.
  • [9] Leszek Gąsieniec, Ralf Klasing, Christos Levcopoulos, Andrzej Lingas, Jie Min, and Tomasz Radzik. Bamboo garden trimming problem (perpetual maintenance of machines with different attendance urgency factors). In Bernhard Steffen, Christel Baier, Mark van den Brand, Johann Eder, Mike Hinchey, and Tiziana Margaria, editors, SOFSEM 2017: Theory and Practice of Computer Science, pages 229–240, Cham, 2017. Springer International Publishing. doi:10.1007/978-3-319-51963-0_18.
  • [10] Leszek Gąsieniec, Benjamin Smith, and Sebastian Wild. Towards the 5/6-density conjecture of pinwheel scheduling. In Cynthia A. Phillips and Bettina Speckmann, editors, Proceedings of the Symposium on Algorithm Engineering and Experiments, ALENEX 2022, Alexandria, VA, USA, January 9-10, 2022, pages 91–103. SIAM, 2022. doi:10.1137/1.9781611977042.8.
  • [11] Leszek Gąsieniec, Tomasz Jurdziński, Ralf Klasing, Christos Levcopoulos, Andrzej Lingas, Jie Min, and Tomasz Radzik. Perpetual maintenance of machines with different urgency requirements. Journal of Computer and System Sciences, 139:103476, 2024. doi:10.1016/j.jcss.2023.103476.
  • [12] Robert Holte, Aloysius Mok, Louis Rosier, Igor Tulchinsky, and Donald Varvel. The pinwheel: a real-time scheduling problem. In Proceedings of the Twenty-Second Annual Hawaii International Conference on System Sciences. Volume II: Software Track, volume 2, pages 693–702 vol.2, 1989. doi:10.1109/HICSS.1989.48075.
  • [13] Robert Holte, Louis Rosier, Igor Tulchinsky, and Donald Varvel. Pinwheel scheduling with two distinct numbers. Theoretical Computer Science, 100(1):105–135, 1992. doi:10.1016/0304-3975(92)90365-M.
  • [14] Bob Hough. Solution of the minimum modulus problem for covering systems. Annals of Mathematics, 181(1):361–382, 2015. doi:10.4007/annals.2015.181.1.6.
  • [15] A.P. Huhn and L. Megyesi. On disjoint residue classes. Discrete Mathematics, 41(3):327–330, 1982. doi:10.1016/0012-365X(82)90030-9.
  • [16] Tobias Jacobs and Salvatore Longo. A new perspective on the windows scheduling problem, 2014. arXiv:1410.7237.
  • [17] Ravi Kannan. Minkowski’s convex body theorem and integer programming. Mathematics of Operations Research, 12(3):415–440, 1987. doi:10.1287/moor.12.3.415.
  • [18] Akitoshi Kawamura. Proof of the density threshold conjecture for pinwheel scheduling. In Proceedings of the 56th Annual ACM Symposium on Theory of Computing, STOC 2024, pages 1816–1819, New York, NY, USA, 2024. Association for Computing Machinery. doi:10.1145/3618260.3649757.
  • [19] Akitoshi Kawamura. Perpetual scheduling under frequency constraints. In Shin-ichi Minato, Takeaki Uno, Norihito Yasuda, Takashi Horiyama, Ken-ichi Kawarabayashi, Shigeru Yamashita, and Hirotaka Ono, editors, Algorithmic Foundations for Social Advancement: Recent Progress on Theory and Practice. Springer, 2025. doi:10.1007/978-981-96-0668-9.
  • [20] Akitoshi Kawamura, Yosuke Kusano, and Yusuke Kobayashi. Pinwheel covering. In The 14th International Conference on Algorithms and Complexity (CIAC), pages 185–199, 2025. doi:10.1007/978-3-031-92935-9_12.
  • [21] Akitoshi Kawamura and Makoto Soejima. Simple strategies versus optimal schedules in multi-agent patrolling. Theoretical Computer Science, 839:195–206, 2020. doi:10.1016/j.tcs.2020.07.037.
  • [22] Jan Korst, Emile Aarts, and Jan Karel Lenstra. Scheduling periodic tasks. INFORMS Journal on Computing, 8(4):428–435, 1996. doi:10.1287/ijoc.8.4.428.
  • [23] Hendrik W Lenstra Jr. Integer programming with a fixed number of variables. Mathematics of operations research, 8(4):538–548, 1983. doi:10.1287/moor.8.4.538.
  • [24] Shun-Shii Lin and Kwei-Jay Lin. A pinwheel scheduler for three distinct numbers with a tight schedulability bound. Algorithmica, 19:411–426, 1997. doi:10.1007/PL00009181.
  • [25] Al Mok, Louis Rosier, Igor Tulchinsky, and Donald Varvel. Algorithms and complexity of the periodic maintenance problem. Microprocessing and Microprogramming, 27(1):657–664, 1989. Fifteenth EUROMICRO Symposium on Microprocessing and Microprogramming. doi:10.1016/0165-6074(89)90128-2.
  • [26] Moni Naor, Leonard J Schulman, and Aravind Srinivasan. Splitters and near-optimal derandomization. In Proceedings of IEEE 36th Annual Foundations of Computer Science, pages 182–191. IEEE, 1995. doi:10.1109/SFCS.1995.492475.
  • [27] Victor Reis and Thomas Rothvoss. The subspace flatness conjecture and faster integer programming. In 2023 IEEE 64th Annual Symposium on Foundations of Computer Science (FOCS), pages 974–988, 2023. doi:10.1109/FOCS57990.2023.00060.
  • [28] Zhi-Wei Sun. On disjoint residue classes. Discrete Mathematics, 104(3):321–326, 1992. doi:10.1016/0012-365X(92)90454-N.
  • [29] Martijn van Ee. A 12/7-approximation algorithm for the discrete bamboo garden trimming problem. Operations Research Letters, 49(5):645–649, 2021. doi:10.1016/j.orl.2021.07.001.
  • [30] W.D Wei and C.L Liu. On a periodic maintenance problem. Operations Research Letters, 2(2):90–93, 1983. doi:10.1016/0167-6377(83)90044-5.

Appendix A An FPT Algorithm for Pinwheel Packing

As described in Section 1.3, an FPT algorithm for Pinwheel Packing was already presented in [10] (without an explicit running time bound). In this section, to highlight the similarities and differences between Pinwheel Packing and (Exact) Pinwheel Covering, building on the argument in [10], we present an FPT algorithm for Pinwheel Packing that runs in O(n)+kO(2k) time.

An instance (ai)i[k] of Pinwheel Packing is called a strong yes-instance if there exist pairwise disjoint sets S1,,Sk such that i=1kSi contains an infinite number of integers. We first present the following claim that was shown in [10] with a different terminology.

Claim 18 (see [10, Proposition 2.1]).

Pinwheel Packing can be solved in (i=1kai)O(1) time. We can also check whether a given instance (ai)i[k] is a strong yes-instance in (i=1kai)O(1) time.

Proof of Claim 18.

We construct a digraph G with i=1kai vertices, each of which corresponds to a k-tuple (b1,,bk) with bi{0,1,,ai1} for each i[k]. This vertex corresponds to a state where task i must be performed within bi days from the present. We define two types of arcs in G, which we call normal arcs and lazy arcs. We add a normal arc from a vertex (b1,,bk) to a vertex (b1,,bk) when there is i[k] such that bi=ai1, and bj=bj1 for j[k]{i}. We add a lazy arc from a vertex (b1,,bk) to a vertex (b1,,bk) when bj=bj1 for j[k]. Note that traversing a normal arc corresponds to performing task i, while traversing a lazy arc corresponds to performing no task. Since a feasible solution of Pinwheel Covering corresponds to an infinite walk in G, A is a yes-instance if and only if G contains a dicycle. Similarly, A is a strong yes-instance if and only if G contains a dicycle containing a lazy arc. Both conditions can be checked in (i=1kai)O(1) time using depth first search.

In a similar way to (Exact) Pinwheel Covering, we prove the following two claims to bound each ai by a function of k.

Claim 19.

Suppose that A=(ai)i[k] is a strong yes-instance of Pinwheel Packing. Then, there exists a feasible solution (Si)i[k] such that at least one integer is not covered by i=1kSi in every consecutive i=1kai integers, that is, (4) holds for all m.

Proof of Claim 19.

If A is a strong yes-instance, then the digraph in the proof of Claim 18 has a dicycle containing a lazy arc. Let (Si)i[k] be a feasible solution of Pinwheel Packing that corresponds to an infinite walk traversing such a dicycle repeatedly. Since the length of the dicycle is at most i=1kai, in every consecutive i=1kai steps along this walk, we traverse at least one lazy arc. This means that, in every consecutive i=1kai days, there is at least one day on which no task is performed. Therefore, (4) holds for all m.

Claim 20.

Let A=(ai)i[k] be a sequence of positive integers with a1a2ak, and let [k1]. If A=(ai)i[] is a strong yes-instance of Pinwheel Packing and a+1(k)i=1ai, then A is a yes-instance of Pinwheel Packing.

Proof of Claim 20.

Suppose that A=(ai)i[] is a strong yes-instance of Pinwheel Packing and a+1(k)i=1ai. By Claim 19, there exist pairwise disjoint sets S1,,S such that at least one integer is not covered by i=1Si in every consecutive i=1ai integers. Let (xj)j be an infinite sequence of all integers not covered by i=1Si, which are arranged in ascending order. For h{+1,+2,,k}, set

Sh={xj:jhmodk}.

Then, obviously, S1,,Sk are pairwise disjoint. For h{+1,+2,,k}, since

xj+kxj(k)i=1aia+1ah

holds for every j, we see that task h is performed every ah days. Therefore, (Si)i[k] is a feasible solution for the instance A.

We are now ready to show the following theorem.

Theorem 21 (see [10, Corollary 3.2]).

Pinwheel Packing can be solved in O(n)+kO(2k) time, where n:=i=1klogai is the input size of the problem.

Proof.

Let A=(ai)i[k] be an instance of Pinwheel Packing. Without loss of generality, we may assume that a1a2ak. If a1k, then A is a yes-instance, as we can simply perform each task exactly once every k days. Thus, it suffices to consider the case where a1<k.

If aik2i1 for every i[k], then we can check the feasibility of A in (i=1kai)O(1)=kO(2k) time by Claim 18. Otherwise, let [k1] be the minimum integer with a+1>k2, which can be computed in O(n) time. Then, we obtain

a+1>k2=ki=1k2i1>(k)i=1ai (10)

in the same way as (5). We observe that (ai)i[k] is a yes-instance if and only if (ai)i[] is a strong yes-instance, as the “only if” part is trivial and the “if” part follows from Claim 20 and (10). Therefore, it suffices to determine whether (ai)i[] is a strong yes-instance or not, which can be done in (i=1ai)O(1) time by Claim 18. This running time is bounded by kO(2k), because aik2i1 for i[].