Time-critical testing and search problems
aa r X i v : . [ c s . D M ] J a n Time-critical testing and search problems
Alessandro Agnetis a , Ben Hermans ∗ ,b , Roel Leus b , and Salim Rostami c a Dipartimento di Ingegneria dell’Informazione e Scienze Matematiche, Universit`a di Siena, Italy b Research Center for Operations Research & Statistics, KU Leuven, Belgium c I ´ESEG School of Management, France
Abstract
This paper introduces a problem in which the state of a system needs to be determinedthrough costly tests of its components by a limited number of testing units and beforea given deadline. We also consider a closely related search problem in which there aremultiple searchers to find a target before a given deadline. These natural generalizations ofthe classical sequential testing problem and search problem are applicable in a wide range oftime-critical operations such as machine maintenance, diagnosing a patient, and new productdevelopment. We show that both problems are NP-hard, develop a pseudo-polynomialdynamic program for the special case of two time slots, and describe a partial-order-based aswell as an assignment-based mixed integer program for the general case. Based on extensivecomputational experiments, we find that the assignment-based formulation performs betterthan the partial-order-based formulation for the testing variant, but that this is the otherway round for the search variant. Finally, we propose a pairwise-interchange-based localsearch procedure and show that, empirically, it performs very well in finding near-optimalsolutions.
The timely diagnosis of a system constitutes a key task in a wide range of time-critical operations.The downtime of a machine due to a periodic or corrective maintenance, for example, cruciallydepends on the time needed to test which components are functioning correctly. Medical testsoftentimes also have a high time criticality, not only to establish a correct diagnosis, but alsoto identify an effective treatment. When developing a new product, in turn, it is essential tocomplete all tests concerning the product’s safety and performance in time, because a delayedproduct launch could enable competitors to grasp a leading market share with a similar product.Each of the above settings can be generically modeled as a multi-component system whosestate is either up or down (healthy or unhealthy; safe or unsafe) depending on which of its n components are functioning ( ¨Unl¨uyurt, 2004). Consider, for example, a machine that can onlyoperate if all its components are functioning, a patient who only passes a medical examinationif all test results are negative, or a new product that can only be launched if all safety andperformance tests prove to be successful. These are all examples of so-called serial or n -out-of- n systems , in which the state is only up if all of its components are functioning. A parallel or1 -out-of- n system , on the other hand, is up if there is at least one functioning component. Forinstance, it suffices to find a single treatment that works to cure a patient. ∗ The author is funded by a Postdoctoral Fellowship of the Research Foundation – Flanders. sequential testing problem deals with checking the state of a system through costlytests of its components, where each component has a given failure probability ( ¨Unl¨uyurt, 2004).Failures are typically assumed to occur independently with a probability that is known from,for example, the analysis of historical data. The cost to test a component can measure bothmonetary expenses as well as intangible aspects such as how inconvenient the test is to a patient.Once the system’s state is known, the testing procedure halts. The goal is then to determinein which sequence to test the different components so as to minimize the total expected testingcost.In this paper, we consider a variant of the classical sequential testing problem in which everytest takes unit time and in which the system’s state has to be known within a given deadline T .In order to comply with such timeliness requirements, there are m testing units on which testscan take place simultaneously, and the testing procedure is thus no longer purely sequential. Assoon as the system’s state is known, all testing units are halted. This leads to what we callthe time-critical testing problem , where the goal is to schedule the n tests on the m availabletesting units so as to determine the system’s state within the deadline T at minimum expectedcost. Although we focus on serial systems, all our results are also directly applicable to parallelsystems. Indeed, if we invert the interpretation of a test’s outcome and of the definition of asystem’s up and down state, then the testing of a 1-out-of- n system becomes equivalent to thetesting of a n -out-of- n system ( ¨Unl¨uyurt, 2004).We also study a closely related time-critical search problem in which there are m searchersand n possible locations that could contain a given target, and the objective is to find the targetbefore a deadline T at minimum expected cost. This is a variant of the time-critical testingproblem where the tests are dependent in the sense that exactly one of the system’s components isdefective, and where we need to identify this component (Wagner and Davis, 2001). Applicationsto this problem include a malfunctioning component of a machine that needs to be identifiedbefore a certain deadline, a terrorist that needs to be captured before an attack takes place, ora person in distress who needs to be found in the context of a search and rescue operation.The main contributions of this paper are as follows. We formally define the time-critical test-ing problem and the time-critical search problem, and establish that both problems are stronglyNP-hard in general. We show in particular that the time-critical search problem reduces to thetime-critical testing problem, which extends an earlier result of Kelly (1982) towards multipletesting units. For the special case where T = 2, we establish weak NP-hardness and describe apseudo-polynomial dynamic program as well as a fully polynomial-time approximation scheme(FPTAS). Next, we introduce a partial-order-based and an assignment-based mixed integer pro-gramming (MIP) formulation for each of the problem variants, and show how to adapt these for-mulations to solve the precedence-constrained sequential testing problem (Monma and Sidney,1979) and the batch-testing problem (Daldal et al., 2016). To the best of our knowledge, nocompact exact MIP formulations were previously available for the latter two problems. Finally,we illustrate that intuitive approaches such as a greedy heuristic or a pairwise-interchange-basedlocal search procedure fail to provide a constant-factor approximation guarantee.Based on extensive computational experiments, we find that the assignment-based formula-tion performs better than the partial-order-based formulation for the testing variant, while thisis the other way round for the search variant. Moreover, instances for the time-critical testingproblem are considerably harder to solve than those for the search variant. Despite its lack of atheoretical worst-case guarantee, we also find that, empirically, our local search procedure seemsto perform very well in finding near-optimal solutions in limited computation times.The remainder of this paper is organized as follows. After the literature review in Section 2,we formally define the time-critical testing problem and search problem in Section 3. Next, weexamine the structural properties of an optimal schedule in Section 4, analyze the problems’2omplexity in Section 5, and consider the special case of two time slots in Section 6. Sections 7and 8, in turn, discuss our proposed MIP formulations and local search heuristic, whose perfor-mance is evaluated in the computational experiments reported in Section 9. Section 10, finally,concludes and indicates directions for further research. Since the U.S. Air Force highlighted the importance of the sequential testing problem (Johnson,1956), it has received considerable attention in the literature. For a serial system without prece-dence constraints, the following intuitive result has been established independently in a variety ofdifferent contexts (Mitten, 1960; Boothroyd, 1960; Kadane, 1969): every sequence that inspectsthe components in non-decreasing order of their cost-to-failure-probability ratio is optimal. Thisidea has subsequently been generalized into polynomial-time algorithms for the sequential test-ing problem with series-parallel precedence constraints (Garey, 1973; Monma and Sidney, 1979;Berend et al., 2014). For general precedence constraints, the problem is NP-hard (Kelly, 1982;De Reyck and Leus, 2008); Rostami et al. (2019) describe a branch-and-price algorithm as wellas a dynamic program for this case. We refer to ¨Unl¨uyurt (2004) for an excellent and detailedreview of the sequential testing literature.Most closely related to our work is the batch-testing problem for serial systems as introducedby Daldal et al. (2016). In this variant of the sequential testing problem, tests can be performedsimultaneously in batches and there is a fixed set-up cost per batch. Daldal et al. (2016) developan approximation algorithm for the problem with a 6 .
829 + ε worst-case guarantee factor and aninteger program that approximates the optimal solution within a factor 1 + ε , where ε ∈ (0 , m on the batch size, and no fixed set-up cost perbatch. For this reason, the approximation algorithms as proposed by Daldal et al. (2016) andSegev and Shaposhnik (2018) do not seem to be directly modifiable towards our setting. Theassignment-based formulation to be described in Section 7, however, can be adapted such thatit also solves the batch-testing problem.Agnetis et al. (2009) define a problem where n unreliable jobs with given revenues are tobe processed on m machines. If a job fails, then all subsequent jobs on the same machine areblocked, and their revenue is lost. The goal is then to assign the jobs to machines so as tomaximize the expected revenue. Agnetis et al. (2009) give a polyhedral characterization for thecase of one machine and show that the problem is NP-hard for two machines. In subsequentarticles, Agnetis et al. (2014) show that a list scheduling algorithm based on the so-called Z-ratioleads to a 0 . . m machines (Agnetis and Lidbetter, 2020). Our work differs from theaforementioned articles since we minimize the expected cost rather than maximize the expectedrevenue, and since we assume that the testing procedure halts on all units as soon as the system’sstate is known.Another related problem is the salvo policy problem , in which there are a limited number ofmoments in time (the so-called salvos) at which multiple missiles can be fired simultaneously tostop an incoming object (Gould, 1984). If all the missiles fired at a certain salvo are unsuccessful,the missiles scheduled at the next salvo must be fired. Each missile fired at a certain salvo has ahit probability that only depends on the salvo, and the goal is to minimize the expected number3f missiles that need to be fired. Van Ee (2020) develops algorithms to solve different variantsof the problem, and we refer to his article as well as the work of Glazebrook and Washburn(2004) for a more detailed literature review. The main difference with our work is that, in oursetting, the failure probabilities and testing costs are time-independent and can differ betweencomponents. Hence, we can also interpret the time-critical testing problem as a variant of thesalvo policy problem where there are T salvos and n missiles with different time-independentcosts and hit probabilities, and where no more than m missiles can be fired at each salvo. Tothe best of our knowledge, this problem variant has not been studied before.If we identify success probabilities with job weights and search costs with job processingtimes, then the classical sequential search problem (i.e., the time-critical search problem witha single searcher and no deadline) is equivalent to the problem 1 || P w j C j of minimizing thetotal weighted completion time of a job set on a single machine. Interestingly, numerous resultsfor 1 || P w j C j parallel those for the sequential testing problem: without precedence constraintsit is optimal to search the different locations in non-decreasing order of their cost-to-probabilityratio (Smith, 1956; Gluss, 1959), this rule can be generalized to solve the case with series-parallelprecedence constraints efficiently (Lawler, 1978; Sidney, 1975), and the problem is strongly NP-hard for general precedence constraints (Lenstra and Rinnooy Kan, 1978). In fact, Kelly (1982)shows that the sequential testing problem is at least as hard as the problem 1 || P w j C j .Our results generalize these findings to a time-critical setting with multiple testing units, sincewe show in Section 5 that the time-critical search problem reduces to the time-critical testingproblem.In the rich literature on search theory (see for instance the books of Stone (2007) or Alpern et al.(2013) for a detailed overview), there are a number of articles that consider search problems withmultiple searchers (Li and Huang, 2018), general cost and weight functions (Fokkink et al., 2019;Happach et al., 2020), or an unknown deadline (Lin and Singham, 2016; Lidbetter, 2020). Theseproblems, however, are overall quite different from our setting, and the time-critical search prob-lem as defined in this paper appears to be novel. Consider an n -out-of- n system whose state is up if and only if all of its n components arefunctioning; otherwise, the system is down. Each component j ∈ N := { , . . . , n } is functioningwith a given success probability p j ∈ [0 , ∩ Q , where this event is independent of the outcomefor other components, and we can determine whether a component is functioning by means ofa test with testing cost c j ∈ N . We assume that a test requires one time unit, that the costof a test is borne regardless of its outcome, and that tests are perfect in the sense that neithertype-1 nor type-2 errors may occur. There are m ≤ n identical testing units or machines onwhich tests can take place simultaneously, and we require that all tests be completed within a deadline T ≤ n . To ensure feasibility, we assume that n ≤ mT . If a test fails, then the processstops on all machines and we conclude that the system is down. The objective is to schedule all n tests on the m available machines so as to determine the system’s state at minimum expectedcost within the deadline T .Since all tests require unit time, we can divide the time horizon into T equal time slots .Moreover, since the testing procedure is halted on all machines as soon as the system’s state isknown, it is not relevant which machine a given test is assigned to. Hence, we can represent afeasible solution or schedule by an ordered partition σ = ( S , . . . , S T ) of the set N into T sets,where S t ⊆ N with | S t | ≤ m denotes the set of tests scheduled in time slot t = 1 , . . . , T . For anarbitrary schedule σ = ( S , . . . , S T ), denote by A t := S t − k =1 S k the set of all tests scheduled before4ime slot t ∈ { , . . . , T } , where A = ∅ . Given a subset S ⊆ N and a sequence ( a j ) j ∈ N of realnumbers, we use the conventional notation that a ( S ) := P j ∈ S a j , and we let P j ∈∅ a j = 0 and Q j ∈∅ a j = 1. The time-critical testing problem (TCTP) then asks for a schedule σ = ( S , . . . , S T )that minimizes the expected testing cost z ( σ ) := T X t =1 c ( S t ) Y j ∈A t p j . (1)Here, each index t associates the cost c ( S t ) with the probability that the tests in S t need to beperformed because all components tested before time t were successful (and the system’s state isthus still unknown). A TCTP instance is completely defined by the tuple ( m, n, T, ( c j , p j ) j ∈ N ),and we refer to m -TCTP as the special case of the problem when the number of machines isfixed to m .We also consider a search problem related to TCTP, where a given target is hidden in exactlyone out of n possible locations. Each location j ∈ N := { , . . . , n } has a probability π j ∈ [0 , ∩ Q to contain the target, where P j ∈ N π j = 1. Searching location j takes unit time and leads toa cost c j ∈ N . Given that there are m ≤ n available searchers and that the object needs tobe found before a certain deadline T ≤ n , where n ≤ T m , the question is when to search eachlocation so as to minimize the expected cost. Using the same notation as above, a feasibleschedule can be represented by an ordered partition σ = ( S , . . . , S T ) of the set N into T setswith | S t | ≤ m for each t = 1 , . . . , T . The time-critical search problem (TCSP) then asks for aschedule σ = ( S , . . . , S T ) that minimizes the expected search cost ¯ z ( σ ) := T X t =1 c ( S t ) T X k = t π ( S k ) . (2)Here, the index t in the outer summation reflects the fact that we incur cost c ( S t ) when thetarget is in one of the locations searched in time slots k = t, . . . , T , which occurs with probability P Tk = t π ( S k ). A TCSP instance is completely defined by the tuple ( m, n, T, ( c j , π j ) j ∈ N ), and werefer to m -TCSP as the special case with a fixed number of m searchers.The difference between TCTP and TCSP consists in the way in which both variants modelthe probability that a job (i.e., testing a component or searching a location) needs to performed.While for TCTP the success probabilities are taken to be independent, we assume for TCSP thatexactly one location contains the target and the probabilities thus add up to one. For TCTP, theprobability that a job needs to be performed then equals the product of success probabilities overall jobs scheduled in preceding time slots. For TCSP, in turn, this probability equals one minusthe probability that one of the locations searched in preceding time slots contains the target. If there is only a single testing unit or searcher, then TCTP and TCSP reduce to the sequentialtesting problem and to the problem 1 || P w j C j of minimizing the weighted completion time ona single machine, respectively. Hence, as mentioned in Section 2, every sequence that tests thecomponents or searches the locations in non-decreasing order of, respectively, the ratio c j / (1 − p j )or c j /π j is optimal. Lemma 1, stated below, implies that the resulting schedule is also optimal forthe setting with multiple machines or searchers if the deadline allows for this. That is, the onlyreason to perform tests or to search locations simultaneously is to comply with a deadline T < n . Lemma 1.
For each TCTP or TCSP instance there exists an optimal schedule σ ⋆ = ( S ⋆ , . . . , S ⋆T ) in which S ⋆t is non-empty for all t ≤ T . roof. Since the proof is completely analogous for TCTP and TCSP, we only consider the formercase. For an arbitrary TCTP instance, let σ = ( S , . . . , S T ) be an optimal schedule that does notsatisfy the property. By a straightforward pairwise interchange argument on Equation (1), wecan assume without loss of generality that all non-empty sets are scheduled before the empty setsin σ . Call t the first time slot for which | S t | ≥
2; such a slot must exist because otherwise σ wouldsatisfy the property (recall that our definition of a TCTP instance assumes that T ≤ n ). Nowtake an arbitrary test j ∈ S t and define a new schedule σ ′ = ( S , . . . , S t \{ j } , { j } , S t +1 , . . . , S T − ).Equation (1) then yields that z ( σ ) − z ( σ ′ ) = Y i ∈A t p i ! − Y i ∈ S t \{ j } p i c j ≥ . Repeating this argument at most n times yields an optimal schedule that satisfies the property.The following lemma generalizes the ratio rule to the setting of multiple machines. In partic-ular, given a subset S ⊆ N for a TCTP instance, define the cost-to-probability ratio as ρ ( S ) := c ( S )1 − Q j ∈ S p j if Q j ∈ S p j = 1, and ρ ( S ) := + ∞ otherwise. For an instance of TCSP, in turn, we define the ratio¯ ρ ( S ) := c ( S ) π ( S )if π ( S ) = 0, and ¯ ρ ( S ) := + ∞ otherwise. Lemma 2 below implies that, for both TCTP andTCSP, there exists an optimal schedule that sequences the different sets in non-decreasing orderof the corresponding ratios. Lemma 2.
Reordering the sets S t of a schedule σ = ( S , . . . , S T ) in non-decreasing order of theratio ρ ( S t ) or ¯ ρ ( S t ) does not increase the expected testing or search cost, respectively.Proof. Since the proof is again completely analogous for TCTP and TCSP, we only consider theformer case. Let σ = ( S , . . . , S T ) be a schedule with ρ ( S t ) > ρ ( S t +1 ) for some t < T and definethe schedule σ ′ from σ in which S t and S t +1 have been interchanged. Equation (1) then yieldsthat z ( σ ) − z ( σ ′ ) = Y j ∈A t p j − Y j ∈ S t +1 p j c ( S t ) − − Y j ∈ S t p j c ( S t +1 ) , which is non-negative. Repeating this procedure at most T times then yields the result.Based on Lemma 2, one might propose a greedy approach where we test in each time slota subset S of the remaining components for which the ratio ρ ( S ) is minimal among all setsthat contain sufficient tests to meet the deadline. The next example, however, shows thatthis approach does not lead to a constant-factor approximation guarantee for TCTP. A similarexample shows that an analogous greedy approach that minimizes the ratio ¯ ρ ( S ) also fails toprovide a constant-factor approximation guarantee for TCSP.6 xample 1. Consider a TCTP instance with n = 3 tests, m = 2 machines, and deadline T = 2.Given an integer M >
0, we define the costs and success probability of each job as follows: c = 1, p = 1 /M , c = 0, p = 1 − /M , c = M , and p = 1 − /M . The greedy approachdescribed above would then test component 2 in the first time slot (its ratio equal to 0 isclearly minimal), and the remaining components { , } in the second time slot. This leads to anexpected testing cost equal to z greedy = c + p ( c + c ) = 0 + (1 − /M )( M + 1) = M − /M .The schedule that tests { } first and { , } next, however, attains an expected testing cost equalto z ⋆ = c + p ( c + c ) = 1 + (1 /M ) M = 2. Hence, the ratio z greedy /z ⋆ is Ω( M ) and thus cannotbe bounded by a constant.The next lemma reveals that, for TCTP, the range between the minimal and maximal ex-pected testing cost, and thus the potential benefit of identifying an optimal schedule, increasesas the joint success probability Q j ∈ N p j decreases. Intuitively, if the system has a higher proba-bility to be up, then it becomes more likely that all tests need to be performed, and their specificordering becomes less influential. Observe that an analogous result does not hold for TCSP,since the probability P j ∈ N π j is fixed to one for this problem. Lemma 3.
Given a TCTP instance, let σ ⋆ = ( S ⋆ , . . . , S ⋆T ) be an optimal schedule. For everyschedule σ = ( S , . . . , S T ) it then holds that z ( σ ⋆ ) ≥ z ( σ ) Q j ∈ N p j .Proof. Consider an arbitrary schedule σ = ( S , . . . , S T ). Since z ( σ ) ≤ c ( N ), we obtain that z ( σ ⋆ ) = T X t =1 c ( S ⋆t ) Y j ∈A ⋆t p j ≥ T X t =1 c ( S ⋆t ) Y j ∈ N p j = c ( N ) Y j ∈ N p j ≥ z ( σ ) Y j ∈ N p j . In this section we analyze the complexity of TCTP and TCSP. First, we show in Section 5.1 thatTCSP is NP-hard even if T = 2 and that the m -TCSP is strongly NP-hard for every m ≥ Given a constant α ∈ Q , consider the decision version of TCSP, which we call TCSP-D, that askswhether there exists a schedule σ such that ¯ z ( σ ) ≤ α . To establish the complexity of TCSP-D,we will use the following lemma: Lemma 4.
For every r ∈ N numbers a , . . . , a r ∈ R with a fixed sum A := P ri =1 a i it holds that r X i =1 r X j = i a i a j ≥ ( r + 1) A r , with equality holding if and only if a i = A/r for every i = 1 , . . . , r .Proof. For arbitrary numbers r ∈ N and A ∈ R , define the set X := { ( x , . . . , x r ) ∈ R r : P ri =1 x i = A } and the function f : X → R : ( x , . . . , x r ) P ri =1 P rj = i x i x j . It then suffices to show that f attains its unique minimum if x i = A/r for each i = 1 , . . . , r . To see that this is the case, observethat the function g : R r − → R : ( x , . . . , x r ) f ( A − P ri =2 x i , x , . . . , x r ) is strictly convex withpartial derivatives equal to zero if and only if x j = A − P ri =2 x i for each j = 2 , . . . , r .7CSP-D is in NP since, for a given schedule σ , we can use Equality (2) to verify in polynomialtime whether ¯ z ( σ ) ≤ α . The next theorem uses a reduction from the NP-complete Partition problem (Garey and Johnson, 1979) to show that TCSP-D is NP-complete even for the specialcase of two time slots.
Theorem 1.
TCSP-D is NP-complete, even if T = 2 .Proof. Consider an instance of the
Partition problem where, given q ∈ N natural numbers u , . . . , u q ∈ N with A := P qi =1 u i , the question is whether there exists a set S ⊆ { , . . . , r } such that u ( S ) = A/
2. Now define a TCSP-D instance with m = q searchers, deadline T = 2,and n = q locations with c j = u j and π j = u j /A for all j = 1 , . . . , q . Finally, we let α = 3 A/ σ = ( S , S ), Lemma 4 (with r = 2 and identifying a i with u ( S i ) for i = 1 ,
2) yields that X t =1 c ( S t ) X k = t π ( S k ) = 1 A X t =1 2 X k = t u ( S t ) u ( S k ) ≥ A A A α. Hence, the answer to the TCSP-D instance is ‘yes’ if and only if there exists a schedule σ =( S , S ) for which the above inequality holds with equality. From Lemma 4, this occurs if andonly if u ( S ) = u ( S ) = A/
2, i.e., if and only if the answer to the
Partition instance is ‘yes’.The following theorem shows that TCSP-D, where T is part of the input, is strongly NP-complete for every fixed number m ≥ problem (Garey and Johnson, 1979). Theorem 2.
TCSP-D with a fixed number m ≥ of searchers is strongly NP-complete.Proof. The proof uses a reduction from the problem. Given q, B ∈ N , con-sider 3 q integers u , . . . , u q with P qj =1 u j = qB and B/ < u j < B/ j = 1 , . . . , q .The problem then asks whether { u , . . . , u q } can be partitioned into q subsets U , . . . , U q with equal sum u ( U t ) = B for each t = 1 , . . . , q . Observe that, since B/ < u i < B/ i = 1 , . . . , q , the subset U t must have equal cardinality | U t | = 3 for each t = 1 , . . . , q .For an arbitrary instance ( q, B, u , . . . , u q ), define a TCSP-D instance with α = ( q + 1) B/
2, a fixed number of m ≥ T = q , and n = 3 q locations with c j = u j and π j = u j / ( qB ) for every j ∈ N .For every schedule σ = ( S , . . . , S T ) it follows from Lemma 4 (by taking r = T = q , and byidentifying the numbers a i with u ( S i ) for i = 1 , . . . , T ) that T X t =1 c ( S t ) T X k = t π ( S k ) = 1 qB T X t =1 T X k = t u ( S t ) u ( S k ) ≥ qB ( q + 1)( qB ) q = ( q + 1) B α. Hence, the answer to the TCSP-D instance is ‘yes’ if and only if there exists a schedule σ =( S , . . . , S T ) for which the above inequality holds at equality. From Lemma 4, this occurs if andonly if u ( S t ) = qB/q = B for all t = 1 , . . . , T . Observe that, since B/ < u i < B/ i = 1 , . . . , q , this latter condition can only be satisfied if σ schedules exactly three jobs in everytime slot, such that the schedule is feasible with respect to the machine capacity m ≥ We define the decision version TCTP-D of TCTP as follows: given a constant β ∈ Q , does thereexist a schedule σ such that z ( σ ) < β ? To show that TCSP-D reduces to TCTP-D in Theorem 3,8e apply a similar approach as the one used in Hermans et al. (2019) to decompose and to bounda product of probabilities. In particular, we need the following lemma, which can be shown byinduction. Lemma 5 (Hermans et al., 2019) . Let r ∈ N and a , . . . , a r ∈ R , then r Y i =1 (1 − a i ) = 1 − r X i =1 a i + r X i =1 r X j = i +1 a i a j r Y k = j +1 (1 − a k ) . Theorem 3.
TCSP-D reduces to TCTP-D.Proof.
Given an instance of TCSP-D ( α, m, n, T, ( c j , π j ) j ∈ N ), let W ∈ N be the smallest integersuch that w j := π j W is integer for all j ∈ N . Since all probabilities ( π j ) j ∈ N are rationalnumbers, W is polynomially bounded in the input size. Define an associated TCTP-D instancewith p j = 1 − w j /M for every j ∈ N , where M := c ( N )( nW ) , and with all other parametersequal to the corresponding ones of the TCSP-D instance. Moreover, let γ := ( c ( N ) − α ) W and β = c ( N ) − ( γ − /M . We want to show that there exists a schedule σ with ¯ z ( σ ) ≤ α if andonly if there exists a schedule σ for the TCTP instance such that z ( σ ) < β .Let σ = ( S , . . . , S T ) be an arbitrary schedule, then it follows from Equation (1) and thedefinition of ( p j ) j ∈ N that z ( σ ) = T X t =1 c ( S t ) Y j ∈A t (cid:16) − w j M (cid:17) . (3)Now define for every set S ⊆ N the number Q ( S ) = X i ∈ S X j ∈ S : j>i w i w j M Y k ∈ S : k>j (cid:16) − w k M (cid:17) , (4)and note that, by choice of M , it holds for each i, j, k ∈ S that0 ≤ w i w j M < c ( N ) n and 0 < − w k M ≤ . Since Equation (4) contains strictly less than n terms, this implies that 0 ≤ Q ( S ) < / ( M c ( N ))for each S ⊆ N . Hence, by using Lemma 5 to rewrite Equation (3), we obtain that z ( σ ) = T X t =1 c ( S t ) (cid:18) − M w ( A t ) + Q ( A t ) (cid:19) < c ( N ) + 1 M − M T X t =2 c ( S t ) w ( A t ) (5)and z ( σ ) ≥ c ( N ) − M T X t =2 c ( S t ) w ( A t ) . (6)If P Tt =2 c ( S t ) w ( A t ) ≥ γ , then Inequality (5) implies that z ( σ ) < c ( N ) − ( γ − /M = β .Conversely, if P Tt =2 c ( S t ) w ( A t ) < γ , then we also know that P Tt =2 c ( S t ) w ( A t ) ≤ γ − c j ) j ∈ N and ( w j ) j ∈ N are integer. Inequality (6) then yields that z ( σ ) ≥ c ( N ) − ( γ − /M = β .Hence, we obtain that T X t =2 c ( S t ) t − X k =1 w ( S k ) = T X t =2 c ( S t ) w ( A t ) ≥ γ = ( c ( N ) − α ) W (7)9f and only if z ( σ ) < c ( N ) − ( γ − /M = β .Finally, Equation (2) combined with π ( N ) = P Tk =1 π ( S k ) = 1 and w j = π j W yields that( c ( N ) − ¯ z ( σ )) W = T X t =1 c ( S t ) T X k =1 π ( S k ) − T X k = t π ( S k ) ! W = T X t =2 c ( S t ) t − X k =1 w ( S k ) . A schedule σ thus satisfies Inequality (7) if and only if ¯ z ( σ ) ≤ α , which completes the proof.TCTP-D is in NP since, for a given schedule σ , we can use Equality (1) to verify in polynomialtime whether z ( σ ) < β . Hence, together with Theorems 1, 2, and 3, we obtain this section’smain result. Corollary 1.
TCTP-D is NP-complete even if T = 2 . If T is part of the input, then the problemis strongly NP-complete for every fixed number m ≥ of machines. We now develop a pseudo-polynomial dynamic program for the special case of TCTP where T = 2and show how it can be converted into a fully polynomial-time approximation scheme (FPTAS).Together with Corollary 1 this yields that TCTP is weakly NP-hard when T = 2. Our ap-proach is inspired by the standard pseudo-polynomial dynamic program for the knapsack prob-lem (Kellerer et al., 2004). An analogous procedure also solves TCSP with T = 2, but we omitits description for the sake of brevity.If T = 2, then every feasible schedule is uniquely defined by the set that is tested in thefirst time slot. For an optimal sequence σ ⋆ = ( S ⋆ , N \ S ⋆ ), we refer to the set S ⋆ as an optimaltesting set . We assume that n = mT , which is without loss of generality because one can alwaysadd dummy tests with cost 0 and success probability 1 until the instance satisfies this condition.The goal of our dynamic program is to identify such an optimal testing set through a backwardrecursion based on the index number i ∈ { , . . . , n } of a job.For every stage i ∈ { , . . . , n } and state ( b, s ) ∈ { , . . . , c ( N ) } × { , . . . , m } , we define the value function v i ( b, s ) as the minimum joint probability Q j ∈ S p j of a set S ⊆ { i, . . . , n } withcost c ( S ) = b and cardinality | S | = s . That is, among the jobs corresponding to the current stageand the higher-indexed stages, we want to select a subset such that, if we schedule these jobs inthe first time slot, then the probability that we need to perform the tests in the second time slotis minimal. Here, the state ( b, s ) specifies the cost and the number of elements that this subsetshould attain. If b and s are such that no set S ⊆ { i, . . . , n } with c ( S ) = b and | S | = s exists,then we define v i ( b, s ) := + ∞ .We now discuss how to compute the value function v i ( b, s ) for every stage and state recursively.As the boundary condition, let v n +1 ( b, s ) := 1 if b = s = 0 and v n +1 ( b, s ) := + ∞ otherwise. Forevery stage i ∈ { , . . . , n } and state ( b, s ) ∈ { , . . . , c ( N ) } × { , . . . , m } , it then holds that v i ( b, s ) = min { p i v i +1 ( b − c i , s − , v i +1 ( b, s ) } (8)if v i +1 ( b − c i , s −
1) is defined and finite, and v i ( b, s ) = v i +1 ( b, s ) otherwise. Here, the op-tion p i v i +1 ( b − c i , s −
1) corresponds to selecting test i in that stage and state, whereas the otheroption refers to not selecting test i . Starting from stage n , Equation (8) allows us to computethe value function v ( b, s ) for every state ( b, s ) through a backward recursion. By keeping trackof the selected tests, we also obtain a testing set that minimizes the joint probability.Once we know the value function v ( b, m ) for every b ∈ { , , . . . , c ( N ) } , we can solve TCTPwith T = 2 by enumerating over all these possible costs b and selecting one b ⋆ that minimizes b +10 ( b, m )( c ( N ) − b ). The accompanying set of tests that attains this cost b ⋆ with minimumjoint probability v ( b ⋆ , m ) then forms an optimal testing set. Observe that we can indeed limitourselves to states ( b, s ) with s = m in the first stage since we know that exactly m jobs need tobe scheduled in the first time slot as a consequence of our assumption that n = mT = 2 m .Since the computational effort depends on the number c ( N ), the dynamic program has apseudo-polynomial running time. By appropriately rounding the costs ( c j ) j ∈ N , however, we canconvert this pseudo-polynomial dynamic program into a FPTAS. This procedure is analogousto the standard scaling approach for the knapsack problem (Kellerer et al., 2004). Theorem 4,proven in Appendix A, summarizes this result. Theorem 4.
Given a TCTP instance ( m, n, T, ( c j , p j ) j ∈ N ) with T = 2 , let σ ⋆ = ( S ⋆ , N \ S ⋆ ) be an optimal testing sequence. For each ε > , we can obtain a sequence σ ε = ( S ε , N \ S ε ) with z ( σ ε ) ≤ (1 + ε ) z ( σ ⋆ ) in time O ( n /ε ) .Proof. See Appendix A.
In this section, we describe a partial-order-based and an assignment-based mixed integer pro-gramming formulation for both TCTP and TCSP. We first address the testing variant in detailand then indicate how the corresponding formulation can be adapted to also solve the searchvariant. The partial-order-based formulation can be easily modified to also incorporate prece-dence constraints and, as such, it can be used to solve the precedence-constrained sequentialtesting problem (Monma and Sidney, 1979). The assignment-based formulation, in turn, can bemodified to incorporate a fixed cost for every used time slot and thus to solve the batch-testingproblem (Daldal et al., 2016). This illustrates that our approach, based on a linearization of theobjective function, is sufficiently general to be useful to solve related testing problems as well.
Inspired by Potts (1980) and Wagner and Davis (2001), our first formulation relies on binarydecision variables that indicate the partial order defined by a schedule. Additionally, we includedecision variables that keep track of the probability that a certain component (or location) needsto be tested (or searched).
For every two tests i, j ∈ N , define a binary decision variable δ ij that equals 1 if test i is performedbefore test j and 0 otherwise, and a binary decision variable µ { i,j } that equals 1 if tests i and j are performed simultaneously. The brackets in the subscript of µ { i,j } indicate that the order ofindices i and j is of no importance. Next, for every test i ∈ N and integer j ∈ { , . . . , n } , definea continuous decision variable α ij that equals the probability that test i needs to be performed,conditional on the information that all tests j + 1 , . . . , n will be successful. That is, given a set S ⊂ N of tests performed before test i ∈ N , we want for every j = 0 , . . . , n that α ij = Q l ∈ S : l ≤ j p l and, therefore, that α in = Q l ∈ S p l equals the probability that test i needs to be performed.The following mixed integer program then constitutes a valid formulation for TCTP if n = mT . min X i ∈ N c i α in (9a)11.t. δ ij + δ ji + µ { i,j } = 1 ∀ i, j ∈ N : i = j (9b) µ { i,j } + δ ij + δ jk − δ ik ≤ ∀ i, j, k ∈ N : i = j = k = i (9c) X j ∈ N \{ i } µ { i,j } = m − ∀ i ∈ N (9d) α i = 1 ∀ i ∈ N (9e) α ij ≥ α i,j − − δ ji ∀ i ∈ N and j ∈ { , . . . , n } (9f) α ij ≥ p j α i,j − ∀ i ∈ N and j ∈ { , . . . , n } (9g) δ ij , µ { i,j } ∈ { , } ∀ i, j ∈ N (9h)Objective function (9a) relates the probability that a test needs to be performed with itscost. Constraints (9b)-(9d) together with the binary constraints enforce that the variables δ ij and µ { i,j } define a partial order of the tests such that in each time slot exactly m tests areperformed. Constraints (9e)-(9g) and the non-negative coefficients c i in the objective functionimply that α ij equals the probability that test i needs to be performed conditional on theinformation that all tests j + 1 , . . . , n will be successful, as desired. Indeed, if α i,j − equals theprobability that test i needs to be performed conditional on the information that all tests j, . . . , n will be successful, then α ij equals p j α i,j − if test j is performed before test i , and α ij = α i,j − otherwise. For TCSP we adopt the same definition for δ ij and µ { i,j } , but now we directly let α j reflect theprobability that location j ∈ N needs to be searched. That is, α j equals the probability thatthe target has not been found at the time that location j is searched, and thus that the cost c j needs to be paid. Hence, if we consider the objective functionmin X i ∈ N c i α i and the constraints π i + X j ∈ N \{ i } π j ( µ { i,j } + δ ij ) = α i ∀ i ∈ N instead of Objective function (9a) and Constraints (9e)-(9g) in the partial-order-based formula-tion for TCTP, then we obtain a valid formulation for TCSP. Observe that also for TCSP, theassumption that n = mT is without loss of generality because we can add dummy locations withzero cost and zero probability. Consider a generalization of TCTP or TCSP in which there are precedence constraints defined bya strict partial order A ⊂ N × N on N , where ( i, j ) ∈ A reflects that component j ∈ N can onlybe tested or searched if component i ∈ N has been tested or searched before. Such constraintscan easily be incorporated in our partial-order-based formulations by just adding a constraint δ ij = 1 for each ( i, j ) ∈ A .By additionally requiring that m = 1 and T = n , we obtain a compact mixed integer pro-gram for the precedence-constrained sequential testing problem. Rostami et al. (2019) describea dynamic program and a branch-and-price algorithm for the precedence-constrained sequen-tial testing problem for n -out-of- n systems. Their branch-and-price approach also relies on a12elated linear-order-based formulation, but the authors use a Dantzig-Wolfe decomposition withexponentially many decision variables to linearize the objective. In the MIP formulations below, we use binary decision variables that assign the tests (or searches)to the time slots. Additionally, we include decision variables that keep track of the probabilitythat the system’s state is still unknown (or that the target is not found) at the beginning of atime slot.
For each test j ∈ N and time slot t ∈ { , . . . , T } , define a binary decision variable x jt thatequals 1 if test j is scheduled in time slot t and 0 otherwise, and a continuous decision variable y j equal to the probability that test j will actually be performed. Next, for each j = 0 , . . . , n and t ∈ { , . . . , T } , define a continuous decision variable z jt equal to the probability that alltests scheduled before time t are successful, conditional on the information that all tests i > j intime slot t − z nt equals the probability that the tests scheduled in timeslot t need to be performed. This leads to the following MIP formulation for TCTP.min X j ∈ N c j y j (10a)s.t. T X t =1 x jt = 1 ∀ j ∈ N (10b) X j ∈ N x jt ≤ m ∀ t = 1 , . . . , T (10c) y j ≥ z nt − t X s =1 x js ∀ j ∈ N and t = 1 , . . . , T (10d) z j = 1 ∀ j = 0 , . . . , n (10e) z t = z n,t − ∀ t = 2 , . . . , T (10f) z jt ≥ z j − ,t − x j,t − ∀ j = 1 , . . . , n and t = 2 , . . . , T (10g) z jt ≥ p j z j − ,t ∀ j = 1 , . . . , n and t = 2 , . . . , T (10h) x jt ∈ { , } ∀ j ∈ N and t = 1 , . . . , T (10i)Objective function (10a) combines the probability that a test needs to be performed withits cost. Constraints (10b)-(10c) together with the binary constraints enforce that every test isscheduled in exactly one time slot, and that at most m tests are scheduled within a time slot.Constraints (10d) together with the objective function and the fact that z nt is non-increasingin t make sure that if test j is scheduled in or before time slot t , it will be performed witha probability of at least z nt . Constraints (10e)-(10h), finally, enforce that the probability z jt equals p j z j − ,t if test j is scheduled in time slot t −
1, and z j − ,t otherwise. For TCSP we adopt the same definition for x jt and y j , but now we directly let z t reflect theprobability that the locations scheduled in time slot t ∈ { , . . . , T } need to be searched. That13s, z t equals the probability that the object is hidden in one of the locations searched at time t or later. Hence, if we consider the constraints y j ≥ z t − t X s =1 x js ∀ j ∈ N and t = 1 , . . . , Tz t = T X k = t X j ∈ N π j x jk ∀ t = 2 , . . . , T instead of Constraints (10d)-(10h) in the assignment-based formulation for TCTP, then we obtaina valid formulation for the TCSP. Consider a generalization of TCTP (or TCSP) in which there is a, possibly time-dependent, fixedcost β t ∈ R ≥ to test (or search) a batch of components (or locations) at time t ∈ { , . . . , T } .This cost β t could reflect a fixed start-up cost, but possibly also a penalty for not knowingthe system’s state at time t . We can incorporate such fixed costs into the assignment-basedformulation for TCTP by introducing for each time slot t ∈ { , . . . , T } a decision variable u t thatequals the probability that one or more tests will take place in time slot t . We then add to theobjective function (10a) an additional summation P Tt =1 β t u t , and we also include the constraints u t ≥ z nt − X j ∈ N x jt and u t ≥ t ∈ { , . . . , T } . An analogous approach allows us to include fixed costs intothe assignment-based formulation for TCSP as well.By setting m = T = n such that there is no deadline or constraint on the number of teststhat can be performed in parallel, we obtain a compact exact mixed integer program for thebatch-testing problem. Daldal et al. (2016) also describe an assignment-based formulation forthis problem, but they approximate the objective function to obtain linearity. We now describe a local search procedure for TCTP and TCSP that exploits the fact that, for agiven partition, we can determine an optimal schedule efficiently (Lemma 2). In particular, werepresent a solution by means of an unordered partition { S , . . . , S T } of the set N into T setswith at most m elements each, and translate this partition into a schedule by sequencing the setsin non-decreasing order of their cost-to-probability ratio.The local search procedure for TCTP works as follows. Starting from a partition, a moveconsists of either the pairwise interchange between tests in different sets or the insertion ofa test in another time slot in which less than m machines are being used. Moreover, aftereach interchange or insertion, the sets are again sorted in non-decreasing order of their cost-to-probability ratio. If there exists such a move that leads to a strict improvement, then we restartthe procedure with this new partition. Otherwise, the partition defines a locally optimal testingsequence σ ls = ( S ls1 , . . . , S ls T ) and the procedure ends. The local search for TCSP works in acompletely analogous fashion.As illustrated by the following example, this local search procedure does not provide aconstant-factor approximation guarantee for TCTP in general. The locality gap can in par-14icular be Ω( m ), even if T = 2. The example does not seem to be adaptable to TCSP, as in thislatter problem all probabilities add up to one (i.e., P j ∈ N π j = 1). Example 2.
For given constants c, k, M ∈ N all strictly greater than 1, define p = ( c + kM ) − /k .Consider a TCTP instance with m = 2 k machines, deadline T = 2, and the following n = 2 k + 1tests: • I := { , . . . , k } with p i = p and c i = c − i ∈ I ; • I := { k + 1 , . . . , k } with p i = 1 and c i = M for every i ∈ I ; • i ⋆ := 2 k + 1 with p i ⋆ = 0 and c i ⋆ = c .For given values of c and k , we will derive conditions for the parameter M such that the sched-ule σ ls = ( I , { i ⋆ } ∪ I ) is locally optimal and the schedule σ ⋆ = ( { i ⋆ } , I ∪ I ) is globally optimal.Since, using p = ( c + kM ) − /k and m = 2 k , z ( σ ls ) = k ( c −
1) + p k ( c + kM ) = k ( c −
1) + 1 = m c −
1) + 1 , whereas z ( σ ⋆ ) = c , this would then yield the Ω( m ) locality gap.Observe that the potentially interesting moves from σ ls are to either interchange a test in I with i ⋆ or to move a test in I to the second time slot. Interchanging a test in I with thetest i ⋆ leads to a cost ( k − c −
1) + c = k ( c −
1) + 1 = z ( σ ls ) and, as such, it does notyield a strict improvement. Moving a test in I to the second time slot, in turn, leads to a cost( k − c −
1) + p k − ( c + c − kM ). By substituting the definition of p , we thus obtain that σ ls is a local optimum if( k − c −
1) + 2 c − kMc + kM ( c + kM ) /k ≥ k ( c −
1) + 1 , which is equivalent to requiring that c + ckM c − kM ( c + kM ) − /k ≤ . Since the left-hand side of this latter inequality tends to zero as M increases, there exists avalue M ∈ N such that this inequality is satisfied. For every k, c ∈ N , we can thus choose M sufficiently large such that σ ls is a local optimum, which establishes the Ω( m ) locality gap. This section reports on the computational performance of our proposed solution methods. Afterdescribing the dataset of test instances and the implementation details (Section 9.1), we discussthe performance of our mixed integer programming formulations (Section 9.2) as well as of ourlocal search heuristic (Section 9.3).
A set of TCTP and TCSP instances for different values of m and T , with n = mT , was randomlygenerated as follows. For each j ∈ N , an integer cost c j and weight w j was drawn randomly, i.e.,with uniform probability, from the interval [0 ,
10] and [0 , π j = w j /w ( N ) for each j ∈ N . For TCTP, in turn, a joint success probability q = Q j ∈ N p j . , . . , . . , .
90] depending onthe experimental setting. This probability was subsequently distributed randomly over the testsby setting log( p j ) = log( q ) w j /w ( N ) for each j ∈ N . By controlling the joint success probability,we avoid that the product Q j ∈ N p j becomes very small as n grows, which could cause numericalissues. For each setting, 10 instances were generated, leading to 30 TCTP and 10 TCSP instancesfor each ( m, T )-combination.All our algorithms were implemented using the C++ programming language, compiled withMicrosoft Visual C++ 14.0, and run using an Intel Core i7-4790 processor with 3.60 GHz CPUspeed and 8 GB of RAM under a Windows 10 64-bit OS. To solve the instances, we used thecommercial solver IBM ILOG CPLEX 12.8 with a single thread and a time limit of 30 minutes.Lazy cuts were used to implement Constraints (9c) of the partial-order-based formulation, andthe solution provided by the local search procedure of Section 8 was used as a warm start. Apartfrom this, all CPLEX parameters were set to their default values.To obtain a starting solution for each instance, our local search procedure was run with threedifferent initializations; the resulting solutions were all provided to the solver. For TCTP, theconstruction of an initial partition was based on either the costs c j , the probabilities p j , or theratios c j / (1 − p j ), respectively. In particular, all tests were first sorted in non-decreasing valueof the corresponding quantity (where those tests j ∈ N with p j = 1 are put first in this orderif c j = 0, and last otherwise), and an initial partition was subsequently obtained by filling thedifferent time slots using the resulting order. For TCSP, an analogous approach based on thecosts c j , probabilities π j , or ratios c j /π j was used.In order to evaluate the computational performance of our formulations, we use the averageCPU time in seconds, the number of solved instances within the 30-minute time limit, the averageLP gap, and the average final gap. Here, the LP gap equals the percentage ratio between thevalue of the optimal solution and the lower bound provided by the linear program obtained byrelaxing the integrality constraints in the corresponding MIP formulation. The final gap, in turn,equals the percentage by which the best found solution exceeds the current global lower boundwhen the 30-minute time limit is reached. The average CPU time and LP gap are computedusing solved instances only, whereas the average final gap is computed using unsolved instancesonly. If all instances for a given ( m, T )-combination remained unsolved by a method, then noinstances with higher values for m and T were attempted with that method. Table 1 displays the computational performance of our TCTP and TCSP formulations. The firstand most remarkable aspect emerging from this table is that TCSP appears to be considerablyeasier to solve than TCTP. While we can solve almost all TCSP instances with n = mT ≤ m and T , we have to settle for a much smaller instance size n ≤ T and m exceed 2. This is somewhat surprising, given that its LP gap is significantly smaller than the oneof the assignment-based formulation. One possible explanation is that the partial-order-basedformulation, with O ( n ) constraints, is relatively large. This makes the formulation stronger,but it also increases the time needed to solve the LP relaxation in every node of the branch-and-bound tree. For both formulations, the performance seems to be more sensitive to the value ofthe deadline T than to the number m of testers. In fact, while all instances with m = 4 and T = 4 can be solved to optimality, there is only one solved instance with m = 2 and T = 8.16able 1: Computational performance of partial-order-based and assignment-based formulationsfor TCTP and TCSP. The averages for the CPU time (in seconds) and percentage LP gap (%LP)are computed using solved instances only ( Time-critical testing problem Time-critical search problemPartial order Assignment Partial order Assignment m T
CPU . .
08 0 . .
45 0 . .
06 0 . .
222 3 0 . .
68 0 . .
48 0 . .
63 0 . .
802 4 0 . .
77 0 . .
01 0 . .
56 0 . .
242 5 14 . .
02 4 . .
34 0 . .
45 0 . .
452 6 113 . .
30 0 .
20 152 . .
47 0 . .
50 1 . .
062 7 439 . .
76 1 .
55 843 . .
72 18 .
70 0 . .
49 20 . .
322 8 0 6 .
10 777 . .
44 44 .
37 0 . .
29 514 . .
35 8 .
302 9 0 62 .
04 0 . .
24 207 . .
98 15 .
482 10 0 . .
27 261 . .
93 22 .
284 2 0 . .
68 0 . .
46 0 . .
18 0 . .
444 3 271 . .
20 1 .
11 0 . .
62 0 . .
47 0 . .
754 4 0 5 .
50 237 . .
04 0 . .
05 0 . .
054 5 0 31 .
12 0 . .
54 349 . .
57 3 .
684 6 1 . .
43 0 12 .
804 7 3 . .
394 8 140 . .
224 9 224 . .
594 10 213 . .
356 2 277 . .
41 0 .
47 0 . .
39 0 . .
01 0 . .
096 3 0 11 .
41 28 . .
26 0 . .
29 0 . .
466 4 0 24 .
19 0 . .
39 61 . .
426 5 3 . .
38 883 . .
27 11 .
466 6 140 . .
37 0 30 .
326 7 107 . .
27 0 .
306 8 157 . .
19 0 .
216 9 220 . .
16 0 .
246 10 0 0 .
278 2 921 . .
61 4 .
02 0 . .
45 0 . .
00 0 . .
608 3 0 14 .
44 574 . .
52 1 .
94 0 . .
26 0 . .
878 4 0 38 .
08 8 . .
29 637 . .
43 5 .
938 5 66 . .
31 0 23 .
808 6 448 . .
27 0 .
178 7 458 . .
17 0 .
308 8 108 . .
09 0 .
158 9 0 0 . .
96 0 . .
39 0 . .
02 0 . . , . .
97 13 .
10 1 . .
26 32 . . .
30 22 . .
25 0 9 . . . . .
25 0 . . (a) Partial-order based formulation for TCSP with larger values for the deadline T . m = 2 m = 4 T CPU . .
20 1 , . .
12 0 . . .
14 0 0 . . . . . . .
05 0 . . .
03 0 . . .
02 0 . . (b) Partial-order based formulation for TCSP with larger values for the number of searchers m . T = 2 T = 3 T = 4 T = 5 m CPU . .
01 4 . .
19 246 . .
31 113 . .
09 0 . . .
02 6 . .
06 370 . .
19 612 . .
04 0 . . .
00 12 . .
05 472 . .
09 0 .
28 1 , . .
04 0 . . .
01 26 . .
01 713 . .
07 0 .
12 205 . .
00 0 . . .
00 97 . .
05 757 . .
02 0 .
16 0 0 . . .
00 246 . .
07 1 , . .
09 0 . . .
03 457 . .
08 567 . .
02 0 . . .
00 395 . .
04 0 .
31 0 0 . . .
00 497 . .
02 0 .
53 0 0 . . .
00 1 , . .
01 0 .
89 0 0 . For TCSP, in contrast, the partial-order-based formulation clearly outperforms the assignment-based formulation. This superior performance is most likely explained by the remarkably smallLP gap, which is several orders of magnitude below the gap of the assignment-based formulation.As such, our results are consistent with the earlier finding that partial-order-based formulationstypically perform well for scheduling problems with a total weighted completion time objectivefunction (see for instance Potts, 1980 or Keha et al., 2009).Table 2 reports on the computational performance for the partial-order-based formulationfor larger TCSP instances. It shows that the time limit appears to become binding only when n = mT reaches 60. When comparing Tables 2a and 2b, we observe that, similarly to TCTP,instances with low T and high m seem to be easier to solve than instances with high T and low m in general. For the special case where m = 2, however, the partial-order-based formulation canstill solve instances with a fairly high value for T . Observe in this respect that, although we haveestablished in Section 5 that m -TCSP is strongly NP-hard if m ≥
3, the complexity status ofTCSP in the special case where m = 2 is still open.Table 3 further details the computational performance for TCTP by disaggregating the resultson the basis of the success probability q . Here, instances with lower values of q seem to berelatively more tractable. To explain this behavior, recall that a smaller q results in a wider rangefor the values that the objective function can attain across the various solutions (Lemma 3). Thiswider range might then be exploited by the solver to differentiate more easily among differentsolutions. The effect of q on the LP gap is also consistent with Lemma 3.For T = 2, the dynamic program described in Section 6 provides an alternative approach toobtain an optimal schedule. To test the computational performance of this dynamic program,we have performed additional experiments using the same set of instances as described above,except that we have re-generated the costs from intervals of increasing sizes (instead of the[0 ,
10] interval as used previously) to examine how this affects performance. Table 4 reports on18able 3: Computational performance of the TCTP formulations for different values of q = Q j ∈ N p j . Partial-order-based formulation Assignment-based formulation q ∈ [0 . , . q ∈ [0 . , . q ∈ [0 . , . q ∈ [0 . , . q ∈ [0 . , . q ∈ [0 . , . m T CPU . .
31 0 . .
96 0 . .
95 0 . .
59 0 . .
04 0 . .
732 3 0 . .
84 0 . .
63 0 . .
58 0 . .
31 0 . .
37 0 . .
772 4 0 . .
58 0 . .
19 0 . .
54 0 . .
59 0 . .
36 0 . .
082 5 12 . .
04 10 . .
03 21 . .
98 1 . .
93 5 . .
55 6 . .
532 6 103 . .
86 78 . .
38 164 . .
24 18 . .
51 155 . .
25 282 . .
642 7 754 . .
86 312 . .
05 124 . .
09 843 . .
722 8 777 . .
444 2 0 . .
49 0 . .
67 0 . .
88 0 . .
98 0 . .
35 0 . .
054 3 139 . .
31 308 . .
19 426 . .
65 0 . .
25 0 . .
49 0 . .
134 4 94 . .
99 217 . .
94 399 . .
216 2 49 . .
96 295 . .
40 541 . .
09 0 . .
78 0 . .
94 0 . .
456 3 13 . .
44 27 . .
65 44 . .
688 2 789 . .
49 1 , . .
33 0 . .
08 0 . .
33 0 . .
948 3 417 . .
63 602 . .
86 795 . . . .
05 0 . .
88 0 . . , . . Table 4: CPU time in seconds for the assignment-based formulation and the dynamic program(DP) of Section 6, for TCTP and TCSP instances with T = 2 and m = 10, depending on therange from which the costs c j are drawn. TCTP TCSPInterval for c j Assignment DP Assignment DP[0 ,
10] 0 . . . . , . . . . , . . . . ,
10 000] 0 . . . . ,
100 000] 0 . . . . Problem avg CPU max CPU %opt avg %gap max %gapTCTP 0 .
026 0 .
064 100 .
00 0 .
000 0 . .
039 0 .
070 96 .
36 0 .
050 0 . Figure 1: Average percentage gap between the upper bound provided by the local search pro-cedure and the lower bound provided by the LP relaxation of our formulations, for large TCSPinstances. .
15 %0 .
45 %0 .
75 %1 .
05 %1 .
20 % T = 10 T = 15 T = 20 m Percentage gap the results of these additional experiments. We focus on the assignment-based formulation andon instances with m = 10 because, for this setting, we can solve all instances for both TCTP andTCSP. The table clearly shows that the required CPU time for the dynamic program is roughlyproportional to the interval size, which is not surprising given the theoretical pseudo-polynomialrunning time of O ( n c ( N )). The assignment-based formulation, in contrast, seems to be mostlyunaffected by the interval size, and it outperforms the dynamic program for intervals of sizes10 000 and 100 000. Table 5 indicates that the local search described in Section 8, with the three initializations asdiscussed in Section 9.1, finds near-optimal solutions in very limited computation times. In fact,the local search is able to find the optimal solution for all TCTP instances solved to optimalityby the MIP formulations. For TCSP, it finds the optimum for 96 .
47% of the solved instancesand, for those instances where it does not find the optimum, the maximal optimality gap isonly 0 . T = 15and T = 20 when m ≥
14 can be partially explained by the fact that we could not solve the LPrelaxation to optimality for such large instances. We do not report a similar analysis for TCTP,as our TCTP formulations are significantly weaker than the TCSP formulations, and the lowerbound provided by their LP relaxations is not sufficiently tight to assess the performance of thelocal search.
10 Conclusion
We have introduced the time-critical testing problem and the time-critical search problem. Thesenatural generalizations of the classical sequential testing problem and search problem are applica-ble in a wide range of time-critical operations, such as machine maintenance, medical diagnosis,and new product development. We have shown that both problems are NP-hard, we have de-veloped a pseudo-polynomial dynamic program as well as a FPTAS for the special case of twotime slots, and we have described two mixed integer programming formulations as well as a localsearch heuristic for the general case. With minor modifications, these formulations can also solveclosely related testing problems for which no exact and compact mixed integer programming for-mulation was previously available. Based on extensive computational experiments, we find thatour assignment-based formulation performs better than our partial-order-based formulation forthe testing variant, while this is the other way round for the search variant. Despite its lackof a theoretical worst-case guarantee, we also find that, empirically, our local search procedureperforms very well in finding near-optimal solutions in limited computation times.Although we have established that both problems are strongly NP-hard for every fixed numberof machines m ≥
3, their complexity status is still open for m = 2. An interesting open questionis thus whether there exists a polynomial-time algorithm for the special case of two machines,and whether the search and testing variant still have the same complexity status for this specialcase. A second open question is whether TCTP is weakly or strongly NP-hard in the specialcase of a fixed deadline T ≥
3. Corollary 1 combined with the pseudo-polynomial dynamicprogram of Section 6 imply that the problem is weakly NP-hard for T = 2, but it does not seemstraightforward to generalize the dynamic program to arbitrary but fixed T .Another promising direction for further research is to develop approximation algorithms forboth problem variants. For the testing variant, we have illustrated that a greedy approachthat iteratively tests a subset with minimal cost-to-failure-probability as well as a pairwise-interchange-based local search heuristic fail to provide a constant-factor approximation guar-antee. The approaches of Daldal et al. (2016) and Segev and Shaposhnik (2018) for the batchtesting problem also do not seem to be directly modifiable towards our setting. For the searchvariant, in turn, an analogous cost-to-probability-based greedy approach also does not provide aconstant-factor approximation guarantee, but it is still an open question whether our local searchheuristic provides a constant-factor approximation for this variant. References
Agnetis, A., Detti, P. and Pranzo, M. (2014), ‘The list scheduling algorithm for schedulingunreliable jobs on two parallel machines’,
Discrete Applied Mathematics , 2–11.21gnetis, A., Detti, P., Pranzo, M. and Sodhi, M. S. (2009), ‘Sequencing unreliable jobs on parallelmachines’,
Journal of Scheduling (1), 45.Agnetis, A. and Lidbetter, T. (2020), ‘The largest-Z-ratio-first algorithm is 0 . m parallel machines’, Operations Research Letters (4), 405–409.Alpern, S., Fokkink, R., Gasieniec, L., Lindelauf, R. and Subrahmanian, V. (2013), SearchTheory , Springer.Berend, D., Brafman, R., Cohen, S., Shimony, S. E. and Zucker, S. (2014), ‘Optimal ordering ofindependent tests with precedence constraints’,
Discrete Applied Mathematics , 115–127.Boothroyd, H. (1960), ‘Least-cost testing sequence’,
Journal of the Operational Research Society (3), 137–138.Daldal, R., Gamzu, I., Segev, D. and ¨Unl¨uyurt, T. (2016), ‘Approximation algorithms for se-quential batch-testing of series systems’, Naval Research Logistics (4), 275–286.Daldal, R., ¨Ozl¨uk, ¨O., Sel¸cuk, B., Shahmoradi, Z. and ¨Unl¨uyurt, T. (2017), ‘Sequential testingin batches’, Annals of Operations Research (1), 97–116.De Reyck, B. and Leus, R. (2008), ‘R&D project scheduling when activities may fail’,
IIETransactions (4), 367–384.Fokkink, R., Lidbetter, T. and V´egh, L. A. (2019), ‘On submodular search and machine schedul-ing’, Mathematics of Operations Research (4), 1431–1449.Garey, M. R. (1973), ‘Optimal task sequencing with precedence constraints’, Discrete Mathe-matics (1), 37–56.Garey, M. R. and Johnson, D. S. (1979), Computers and Intractability: A Guide to the Theoryof NP-Completeness , W.H. Freeman and Company.Glazebrook, K. and Washburn, A. (2004), ‘Shoot-look-shoot: A review and extension’,
Opera-tions Research (3), 454–463.Gluss, B. (1959), ‘An optimum policy for detecting a fault in a complex system’, OperationsResearch (4), 468–477.Gould, J. (1984), ‘On efficient salvo policies’, Naval Research Logistics (1), 159–162.Happach, F., Hellerstein, L. and Lidbetter, T. (2020), ‘A general framework for approximatingmin sum ordering problems’, arXiv preprint arXiv:2004.05954 .Hermans, B., Hamers, H., Leus, R. and Lindelauf, R. (2019), ‘Timely exposure of a secret project:Which activities to monitor?’, Naval Research Logistics (6), 451–468.Johnson, S. M. (1956), Optimal sequential testing, Technical report, RAND Corporation.Kadane, J. B. (1969), ‘Quiz show problems’, Journal of Mathematical Analysis and Applications (3), 609–623.Keha, A. B., Khowala, K. and Fowler, J. W. (2009), ‘Mixed integer programming formulationsfor single machine scheduling problems’, Computers & Industrial Engineering (1), 357–367.Kellerer, H., Pferschy, U. and Pisinger, D. (2004), Knapsack Problems , Springer.Kelly, F. (1982), ‘A remark on search and sequencing problems’,
Mathematics of OperationsResearch (1), 154–157.Lawler, E. L. (1978), Sequencing jobs to minimize total weighted completion time subject toprecedence constraints, in B. Alspach, P. Hell and D. Miller, eds, ‘Algorithmic Aspects ofCombinatorics’, Vol. 2 of
Annals of Discrete Mathematics , Elsevier, pp. 75–90.Lenstra, J. K. and Rinnooy Kan, A. (1978), ‘Complexity of scheduling under precedence con-straints’,
Operations Research (1), 22–35. 22i, S. and Huang, S. (2018), ‘Multiple searchers searching for a randomly distributed immobiletarget on a unit network’, Networks (1), 60–80.Lidbetter, T. (2020), ‘Search and rescue in the face of uncertain threats’, European Journal ofOperational Research (3), 1153 – 1160.Lin, K. Y. and Singham, D. I. (2016), ‘Finding a hider by an unknown deadline’,
OperationsResearch Letters (1), 25–32.Mitten, L. (1960), ‘An analytic solution to the least cost testing sequence problem’, Journal ofIndustrial Engineering (1), 17.Monma, C. L. and Sidney, J. B. (1979), ‘Sequencing with series-parallel precedence constraints’, Mathematics of Operations Research (3), 215–224.Potts, C. N. (1980), ‘An algorithm for the single machine sequencing problem with precedenceconstraints’, Mathematical Programming Studies , 78–87.Rostami, S., Creemers, S., Wei, W. and Leus, R. (2019), ‘Sequential testing of n -out-of- n sys-tems: Precedence theorems and exact methods’, European Journal of Operational Research (3), 876–885.Segev, D. and Shaposhnik, Y. (2018), A polynomial-time approximation scheme for sequentialbatch testing of series systems. Available at SSRN: https://ssrn.com/abstract=3277805 or http://dx.doi.org/10.2139/ssrn.3277805 .Sidney, J. B. (1975), ‘Decomposition algorithms for single-machine sequencing with precedencerelations and deferral costs’, Operations Research (2), 283–298.Smith, W. E. (1956), ‘Various optimizers for single-stage production’, Naval Research LogisticsQuarterly (1-2), 59–66.Stone, L. D. (2007), Theory of Optimal Search, 2nd edition , INFORMS.¨Unl¨uyurt, T. (2004), ‘Sequential testing of complex systems: A review’,
Discrete Applied Math-ematics (1-3), 189–205.van Ee, M. (2020), ‘On efficient algorithms for finding efficient salvo policies’,
Naval ResearchLogistics (2), 147–158.Wagner, B. J. and Davis, D. J. (2001), ‘Discrete sequential search with group activities’, DecisionSciences (4), 557–574. 23 ppendix A A FPTAS for TCTP with two time slots In this appendix, we prove Theorem 4 by showing how the pseudo-polynomial dynamic programof Section 6 can be converted into a FPTAS by appropriately rounding the testing costs. Withoutloss of generality, assume that the tests are indexed in non-increasing value of their costs, withthe largest probability as tie-breaker. That is, c ≥ . . . ≥ c n , and p i ≥ p i +1 for every i ∈ N with c i = c i +1 . If c ( S ⋆ ) = 0, then an optimal schedule is given by σ = ( S, N \ S ) with S = { j, . . . , n } such that j is the smallest integer for which c j = 0 and n − j + 1 ≤ m . Since we cantherefore check in polynomial time whether c ( S ⋆ ) = 0, we henceforth assume that c ( S ⋆ ) > ε > n + the largest index for which c n + >
0. For each i =1 , . . . , n + , we consider a modified instance in which the costs are rounded down to the nearestmultiple of µ ( i ) := εc i /n . That is, we replace the cost of each test j ∈ N by a new cost c ( i ) j := ⌊ c j /µ ( i ) ⌋ and perform our dynamic program for stages j ∈ { i, . . . , n } with the modified coststo compute v i ( b, m ) for each b = 0 , . . . , P nj = i c ( i ) j . If v i ( b, m ) = + ∞ for all values of b , thenwe define z ( i ) ε := + ∞ . Otherwise, we consider an optimal testing set S ( i ) ε ⊆ { i, . . . , n } and theschedule σ ( i ) ε = ( S ( i ) ε , N \ S ( i ) ε ) for the modified instance, and we denote the expected testing costin the original instance as z ( i ) ε := z ( σ ( i ) ε ) = X j ∈ S ( i ) ε c j + X j ∈ N \ S ( i ) ε c j Y j ∈ S ( i ) ε p j . Observe that z ( i ) ε is finite for at least one i ∈ { , . . . , n } since v ( b, m ) ≤ b = P mj =1 c (1) j . Thealgorithm completes by returning a testing set S ε = S ( k ) ε and schedule σ ε = ( S ε , N \ S ε ), where k is such that σ ( k ) ε achieves the minimum cost z ( k ) ε = min i =1 ,...,n + z ( i ) ε for the original instance.Since c ≤ . . . ≤ c n , we have for each i = 1 , . . . , n + that n X j = i c ( i ) j = n X j = i (cid:22) c j µ ( i ) (cid:23) = n X j = i (cid:22) nc j εc i (cid:23) ≤ n X j = i nc j εc i ≤ n X j = i nε ≤ n ε , and our dynamic program yields S ( i ) ε for a given i in time O ( n /ε ). Since we need to evaluate z ( i ) ε for at most n different values of i , we thus obtain S ε and σ ε in time O ( n /ε ).It remains to be shown that z ( σ ε ) ≤ (1 + ε ) z ( σ ⋆ ). Let i be the largest index for which S ⋆ ⊆{ i, i + 1 , . . . , n } . Observe that z ( i ) ε is finite since S ⋆ is feasible, and that z ( σ ⋆ ) ≥ c ( S ⋆ ) ≥ c i > i ∈ S ⋆ and c ( S ⋆ ) >
0. It also follows from our definition of S ( i ) ε as an optimal testingset in the modified instance that X j ∈ S ( i ) ε c ( i ) j + X j ∈ N \ S ( i ) ε c ( i ) j Y j ∈ S ( i ) ε p j ≤ X j ∈ S ⋆ c ( i ) j + X j ∈ N \ S ⋆ c ( i ) j Y j ∈ S ⋆ p j . Finally, observe that, by construction, c ( i ) j = ⌊ c j /µ ( i ) ⌋ ≤ c j /µ ( i ) ≤ ⌊ c j /µ ( i ) ⌋ + 1 for every j ∈ N .From the observations above and the definition of µ ( i ) = εc i /n , we obtain that z ( σ ( i ) ε ) = X j ∈ S ( i ) ε c j + X j ∈ N \ S ( i ) ε c j Y j ∈ S ( i ) ε p j ≤ X j ∈ S ( i ) ε µ ( i ) (cid:18)(cid:22) c j µ ( i ) (cid:23) + 1 (cid:19) + X j ∈ N \ S ( i ) ε µ ( i ) (cid:18)(cid:22) c j µ ( i ) (cid:23) + 1 (cid:19) Y j ∈ S ( i ) ε p j µ ( i ) X j ∈ S ( i ) ε (cid:22) c j µ ( i ) (cid:23) + X j ∈ N \ S ( i ) ε (cid:22) c j µ ( i ) (cid:23) Y j ∈ S ( i ) ε p j + nµ ( i ) ≤ µ ( i ) X j ∈ S ⋆ (cid:22) c j µ ( i ) (cid:23) + X j ∈ N \ S ⋆ (cid:22) c j µ ( i ) (cid:23) Y j ∈ S ⋆ p j + nµ ( i ) ≤ X j ∈ S ⋆ c j + X j ∈ N \ S ⋆ c j Y j ∈ S ⋆ p j + εc i ≤ z ( σ ⋆ ) + εz ( σ ⋆ ) = (1 + ε ) z ( σ ⋆ ) . Since z ( σ ε ) = min j =1 ,...,n + z ( σ ( j ) ε ), this shows that z ( σ ε ) ≤ z ( σ ( i ) ε ) ≤ (1 + ε ) z ( σ ⋆⋆