1 Introduction

At Professor Richard Weber’s home page,Footnote 1 the discrete time bomber problem appears at the top of his list of unsolved problems in operations research. In this problem, a bomber with \(n \in \mathbb {N}\) anti-aircraft missiles must survive \(t \in \mathbb {N}\) hours before reaching its destination. In each hour, it encounters an enemy plane with probability r. The bomber survives for sure if it encounters no enemy plane. In the event of encountering an enemy plane, it survives with probability \(1-q^{k}\) if it fires k missiles at the enemy plane. The objective is to maximize the probability of reaching the destination.

This problem can easily be solved numerically by dynamic programming, or backward induction. For this purpose, let \(N \in \mathbb {N}\) and \(T \in \mathbb {N}\) be the largest numbers of missiles n and hours t to be considered. Define

$$\begin{aligned} p(n,0) = 1, \quad \forall n \in \{0, \ldots , N\}. \end{aligned}$$
(1)

Let p(nt) be the optimal survival probability when the bomber has n missiles with t hours to go. Then for all \(n = 0, \ldots , N\) and \(t = 1, \ldots T\), p(nt) satisfies

$$\begin{aligned} p(n,t) = (1-r) p(n, t-1) + r v(n,k), \end{aligned}$$
(2)

where

$$\begin{aligned} v(n,t) = \max _{k \in \{0, \ldots , n\}}(1-q^{k}) p(n-k,t-1). \end{aligned}$$
(3)

Let k(nt) be the smallest solution k of the above maximization problem:

$$\begin{aligned} k(n,t) = \min {{\mathrm{argmax}}}_{k \in \{0, \ldots , n\}}(1-q^{k}) p(n-k,t-1). \end{aligned}$$
(4)

The following three monotonicity properties have been extensively studied in the literature:

  1. (A)

    k(nt) is nonincreasing in t.

  2. (B)

    k(nt) is nondecreasing in n.

  3. (C)

    \(n- k(n,t)\) is nondecreasing in n.

The above problem was originally formulated in continuous time by Klinger and Brown (1968), who proved property (C) for the original continuous time model. They proved (A) assuming (B), and left (B) as an unsolved problem:

It seems intuitively obvious that \(k(n,t) \ge k(n-1,t)\); that is, with a larger supply one is always willing to make at least as generous an allocation. The extensive tables we computed have confirmed this conjecture. However, determined efforts by a number of people at RAND have failed to yield a rigorous proof that this is indeed the case. (Klinger and Brown 1968, p. 182, \(\Psi \) instead of k in the original)

Subsequently, Samuel (1970) proved (A) without assuming (B), but “found no proof of (B).” Simons and Yao (1990) formulated the problem in discrete time, proving (A) and (C) for the discrete time case (Simons and Yao 1990, Lemma 1, Corollary 1). They noted that a proof of (B) was “elusive,” but their numerical work supported the validity of (B):

Already, we have numerically ‘verified’ Conjecture B for tens of thousands of randomly generated pairs (qr). Mostly, these were checked for \(t \le 12\) and \(n \le 20\), but some larger values of t and n were checked when q is not too small. The truth of Conjecture B was always supported, except for a very few instances when unavoidable difficulties with round-off errors were clearly indicated, because of an extreme value of q or r.

Weber (2013, p. 199) also noted that no counterexample to (B) had been found “despite a truly enormous amount of computational experimentation.” He summarized the status of (B) as follows:

Open problem for the bomber Despite 40 years of research, it is still not known if (B) is true for the bomber problem. So far as I know, the best we can say about (B) is that \(k(n + 1,t) \ge k(n,t)\) if either \(n \le 3\) or \(t \le 3\), and also that \(k(n,t) = 1 \Rightarrow k(n-1,t) = 1\) for all t. (Weber (2013, p. 192), italics in the original)

In this paper we close this open problem by reporting 41 counterexamples to (B). In the next section, we briefly discuss “unavoidable difficulties with round-off errors” associated with floating point numbers. In Sect. 3 we introduce an error-free algorithm consisting only of integer addition, subtraction, multiplication, and comparison. Implementing this algorithm in C with the GNU Multiple Precision (GMP) Arithmetic Library to solve the problem for all \(q, r \in \{0.001, 0.002, \ldots , 0.999\}\), we have found 41 counterexamples to property (B). We have also obtained the identical results by solving the problem with rational numbers for the same set of (qr) values using the GMP library. All our counterexamples can readily be verified using a simple Mathematica program provided in this paper. In Sect. 4 we discuss the robustness of our examples.

In closing the introduction, we should mention that various problems related to the bomber problem are still actively studied (e.g., Bartroff et al. 2010; Bartroff and Samuel-Cahn 2011; Elguedria et al. 2013; Krieger and Samuel-Cahn 2013). We refer the reader to Weber (2013) for an excellent survey of the literature surrounding the bomber problem.

2 Difficulties

Algorithm 1 shows pseudocode for the dynamic programming procedure specified by (1)–(4). Throughout the paper we fix N and T as follows:

$$\begin{aligned} N = T = 100. \end{aligned}$$
(5)

We have implemented Algorithm 1 in C with 64 bit “long double” precision for all

$$\begin{aligned} q, r \in \{0.01,0.02,\ldots ,0.99\}. \end{aligned}$$
(6)

In the solutions obtained, there are many numerical violations of properties (A), (B), and (C) even though (A) and (C) are known to be true. More specifically, there are 25,802 quadruples (qrnt) violating (A), 29,584 quadruples violating (B), and 2,381 quadruples violating (C). These numbers are unstable, depending on the system and software used to implement the algorithm.

Figure 1 shows an example of a numerical solution that violates both (A) and (B). One can see in panel (b) that there are many violations of both properties. Precisely, both are violated at \((n,t) = (85,83),(90,88),(92,89),(94,92),(96,93),(99,94),(98,95),(99,97)\).

figure a

In fact, even a very elementary property of k(nt) is violated in Fig. 1. To see this, note from (1) and (3) that

$$\begin{aligned} k(n,1) = n,\quad \forall n \in \{0, \ldots , N\}. \end{aligned}$$
(7)

This simply means that if the bomber encounters an enemy plane in the last hour, it should fire all the avaiable missiles. This obvious property is clearly violated in panel (a). In this example, we have \(\max _{n,t \in \{1,\ldots , 100\}} k(n,t) = 9\) even though (7) requires that \(k(100,1) = 100\). This is because \(1-0.01^{k}\) is rounded to 1 for all \(k \ge 9\) in C with long double precision, which implies that the strict inequality in line 2 of Algorithm 1 is never satisfied for any \(k > 9\).

Fig. 1
figure 1

k(nt) for \((q,r) = (0.01, 0.88)\) computed with long double precision

3 Error-free methods

Numerical errors are unavoidable as long as floating point numbers are used. However, there are several ways to implement Algorithm 1 without introducing numerical errors. For example, it is possible to compute k(nt) by using only integers, provided that both q and r are rational numbers. To be more specific, suppose that there are integers \(Q,R,B \in \mathbb {N}\) such that

$$\begin{aligned} q = \frac{Q}{B}, \quad r = \frac{R}{B}. \end{aligned}$$
(8)

As in the original problem, define

$$\begin{aligned} P(n, 0) = 1, \quad \forall k \in \{0, \ldots , N\}. \end{aligned}$$
(9)

For \(n \in \mathbb {Z}_{+}\) and \(t \in \mathbb {N}\), define P(nt) recursively as follows:

$$\begin{aligned} P(n,t)&= B^{N}(B - R) P(n,t-1) + B^{N-n} R V(n,k), \end{aligned}$$
(10)

where

$$\begin{aligned} V(n,t) = \max _{k \in \{0,\ldots ,n\}} (B^{n} - B^{n-k} Q^{k}) P(n-k, t-1). \end{aligned}$$
(11)

Equation (10) can be obtained by multiplying both sides of (2) by \(B^{(N+1)t}\). Thus P(nt) and p(nt) satisfy \(P(n,t) = B^{(N+1)t} p(n,t)\). Note that

$$\begin{aligned}&\quad (B^{n} - B^{n-k} Q^{k}) P(n-k, t-1) \end{aligned}$$
(12)
$$\begin{aligned}&= B^{n} B^{(N+1)(t-1)} (1-q^{k}) p(n-k,t-1). \end{aligned}$$
(13)

Hence the solution of (11) is identical to that of (3).

A useful feature of this equivalent formulation is that as long as \(P(n,t-1)\) is an integer for each \(n = 0, \ldots , N\), so is P(nt).

figure b

Algorithm 2 shows pseudocode for the procedure given by (9)–(11). All variables remain integers throughout the algorithm; the problem is that they can be extremely large. Fortunately, arbitrarily large integers can be handled using the GMP library. Figure 2 shows the exact optimal policy computed by implementing Algorithm 2 in C with this library. This policy corresponds to that in Fig. 1. In sharp contrast to Fig. 1, panel (b) in Fig. 2 shows that both (A) and (B) are clearly satisfied; panel (a) shows that (7) is also satisfied.

To investigate the validity of (B), we have implemented Algorithm 2 in the same way for all (qr) given by (6) (\(B = 100\) and \(Q, R \in \{1, \ldots , 99\}\)). In stark contrast to the results obtained with long double precision mentioned in the previous section, we found no violation of any of properties (A), (B), and (C) for any (qr) given by (6) and \(n,t \in \{1, \ldots , 100\}\).Footnote 2

Fig. 2
figure 2

k(nt) for \((q,r) = (0.01, 0.88)\) computed error-free with Algorithm 2

To further investigate the validity of (B), we have tested (A), (B), and (C) for all

$$\begin{aligned} q, r \in \{0.001,0.002,\ldots ,0.999\} \end{aligned}$$
(14)

(\(B = 1000\) and \(Q, R \in \{1, \ldots , 999\}\)). In the solutions obtained, there is no violation of (A) or (C), which is consistent with the theoretical results mentioned in the introduction. However, there are 41 violations of (B). All of them are reported in Table 1, which shows all the quadruples (QRnt) for which \(k(n,t) < k(n-1, t)\). These k values are also reported in the table.

Figure 3 shows combinations of parameter values for which (B) is violated. Note from this figure and Table 2 that all the (qr) pairs lie in the region \([0.4,1] \times [0.8,1]\), and that the values of t are restricted to 4, 5, and 6. Since the smallest values of nt,  and k(nt) in Table 1 are 31, 6, and 12, respectively, our counterexamples are consistent with Weber (2013) results quoted in the introduction.

Observe that for each (QR) in Table 1, there is exactly one violation of (B). Hence a violation of (B) is an exception even for the (QR) pairs in the table, for each of which there are \(100^{2}-1\) pairs of (nt) values satisfying (B). It is worth noting that there are only 41 violations of (B) out of \(999^{2} \times 100^{2}\) quadruples of (QRnt) values. It took approximately 33 h to test all the quadruples against (A), (B), and (C) using Algorithm 2 on a dedicated Linux workstation with dual Intel Xeon E5-2699v3 2.30 Hz CPUs (72 threads in total).

Since the GMP library allows one to handle arbitrarily large rational numbers without numerical errors in addition to integers, we have also implemented Algorithm 1 in C with this library for all (qr) given by (14). The results were identical to those obtained from Algorithm 2. It took approximately 15 h to test all the quadruples (QRnt) against (A), (B), and (C). Hence, at least in our case, it is considerably more efficient to let the GMP library directly handle rational numbers than to transform the problem so that all variables remain integers.

Table 1 41 counterexamples to property (B) with \(B = 1000\)

We have computed the optimal policies for all (QR) in Table (1) using the above two methods, which generated identical results. As an example, Table 2 shows the optimal policy k(nt) for Example #19, which has the smallest value of n in Table 1. One can see that (B) is indeed violated at \((n,t) = (31, 6)\).

figure c

So far we have discussed only our error-free C implementations of Algorithms 1 and 2. However, there are other ways to implement Algorithm 1 without numerical errors. An example is given by Algorithm 3, which shows a simple Mathematica program that generates the optimal policy in Table 2; the program is essentially identical to Algorithm 1. This Mathematica program is sufficiently efficient for verifying a relatively small number of examples. Using a modified version of this program, we have verified the optimal policies corresponding to all (QR) reported in Table 1. We have further confirmed all the optimal policies using Python as well. Thus for each (QR) in Table 1, we have cross-checked the optimal policy using the four different methods.

4 Robustness

To consider the robustness of our counterexamples, let \(\overline{k}(n,t)\) be the largest solution k of the maximization problem in (3):

$$\begin{aligned} \overline{k}(n,t) = \max {{\mathrm{argmax}}}_{k \in \{0, \ldots , n\}}(1-q^{k}) p(n-k,t-1). \end{aligned}$$
(15)

This can be computed by replacing the strict inequality in line 2 of Algorithm 1 with the weak inequality \(\ge \). With this modification, we have computed the optimal policies \(\overline{k}(n,t)\) for all (QR) reported in Table 1. We have also cross-checked these solutions using the four methods discussed above. In the solutions, there are only two pairs (QR) such that \(k(n,t) \ne \overline{k}(n,t)\) for some \(n, t \in \{1, \ldots , 100\}\). These (QR) pairs are given by Examples #3 and #4 in Table 1. For both cases we have \(k(n,t) < \overline{k}(n,t)\) exactly for the (nt) pairs reported in Table 3 (t is always 2). Since (B) is never violated for \(t \le 3\) in Table 1, it follows that the violations of (B) reported in Table 1 are shared by \(\overline{k}(n,t)\).

Fig. 3
figure 3

Configurations of parameter values for which property (B) is violated

Table 2 k(nt) for Example #19 for \(n = 1, \ldots , 100\) and \(t = 1, \ldots , 10\)

An important implication of the above comparison is that for each (nt) reported in Table 1, k(nt) and \(k(n-1,t)\) are the unique solutions of the corresponding maximization problems in (3) (replace n by \(n-1\) in (3) for \(k(n-1,t)\)). Since \((1-q^{k}) p(n-k, t-1)\) is continuous in (qr), it follows that k(nt) and \(k(n-1,t)\) remain the unique solutions under small perturbations of (qr). Thus the strict inequality \(k(n,t) < k(n-1,t)\) is preserved under small perturbations of (qr). This implies that there are in fact uncountably many counterexamples to property (B) of the bomber problem.

Table 3 All pairs of (nt) values for which \(k(n,t) < \overline{k}(n,t)\) with \((Q,R)=(835,835),(836,836)\)