abstract: Finding a fluorescent target in a biological environment is a common and pressing microscopy problem. This task is formally analogous to the canonical search problem. In ideal (noise-free, truthful) search problems, the well-known binary search is optimal. The case of half-lies, where one of two responses to a search query may be deceptive, introduces a richer, Rényi-Ulam problem and is particularly relevant to practical microscopy. We analyse microscopy in the contexts of Rényi-Ulam games and half-lies, developing a new family of heuristics. We show the cost of insisting on verification by positive result in search algorithms; for the zero-half-lie case bisectioning with verification incurs a 50% penalty in the average number of queries required. The optimal partitioning of search spaces directly following verification in the presence of random half-lies is determined. Trisectioning with verification is shown to be the most efficient heuristic of the family in a majority of cases.
author: Daniel W. Drumm; Andrew D. Greentree
date: 2024-09-30
title: Microscopy as a statistical, Rényi-Ulam, half-lie game: a new heuristic search strategy to accelerate imaging

# Introduction

Optical microscopy remains a key platform technology enabling detection, tracking, and sometimes quantification of biologically and medically relevant targets. Standard and advanced microscopy approaches include confocal, and multiphoton techniques, which deliver high-power light to classically small (diffraction-limited) spot volumes. The probe light excites either endogenous targets, or introduced emitters (suitably functionalised to bind targets within or between cells).

Standard approaches to confocal and multiphoton microscopy involve rastering the focal spot through a sample at constant scan rate; this can be treated as a finite dwell time on each pixel/voxel. Firstly, this is to allow enough time for signal generation, and secondly, the dwell time is usually above a greater threshold value long enough that even dim regions of the sample exhibit low noise. However, biological materials (and some introduced emitters) often exhibit photosensitive or even phototoxic responses, and may photobleach over time. There is therefore a tension between resolving the image and minimally affecting the sample, and consequently a need to use the probe microscope light in the most efficient manner possible, extracting maximal information per photon used in both excitation and collection.

Whether using multiphoton or confocal techniques, a measurement illuminates a continuous sample region and is equivalent to asking a question of presence or absence of some target. However, both confocal and multiphoton microscopes suffer considerable signal photon loss, due to their collection angles, detection point-spread functions, and sundry loss pathways. Conversely, due to improvements in detector technology, false photon gain events (*e.g.* dark counts) are now extremely rare. Therefore the physical situation strongly resembles a half-lie scenario, where the presence of a particle may be subject to a lie (*i.e.*, be undetected), but the absence of a particle is correctly reported – albeit by an absence of signal.

Half-lies have been studied in the context of games where a Questioner attempts to guess which integer the Responder has in mind of those in some domain (*e.g.*, \[1,10$^{6}$\]). Only queries requiring yes/no answers are allowed; hence the response space is binary, and the category of problem is known as binary search. The optimal classical method for the Questioner to accomplish this aim is to consecutively halve that domain; this technique is a special case of the splitting algorithm. For binary searches, $\lceil \log_{2}\left(m\right)\rceil$ queries suffice to locate one of $m$ integers. The game becomes more interesting when the Responder occasionally lies. These Rényi-Ulam games have been studied extensively, both mathematically, and in various applications.

As originally described, the Rényi game is of the combinatorial form "Find a number $a\in\left\{1,2,...,m\right\}$" using arbitrary queries with yes/no answers, where the Responder will lie a set number of times. Ulam's game is similar, but specifies the number of times the Responder may lie (without enforcing such behaviour). Variants since considered include asymmetric errors (including half-lies), asking only comparison-type questions, *etc.* (\[\] gives a comprehensive list). Partially fidelitous solutions have been presented for a subset of these problems, though most studies to date have focussed upon finding optimal strategies where a minimum number of queries suffice in all cases to identify the target with 100% fidelity.

An interesting variant of Rényi-Ulam games arises when the lies are limited to only one response type, *e.g.*, "yes", or "present". Such constraints are termed "half-lies", and have been the subject of some enquiry, albeit for specific known numbers of such half-lies, or for unfettered choice of query. Another interesting subset of the games are those where the lies are no longer limited in number, but instead occur probabilistically (otherwise known as the statistical variant). We focus upon the intersection of these two sub-types.

Here, we connect microscopy and Rényi-Ulam games, and explore subtle differences from standard Rényi-Ulam games arising from the physics of confocal and multiphoton apparatus. These differences preclude the usual approach of determining an optimal number of queries, instead forcing us to consider their average number across many trials. We find a useful heuristic for accelerated searching under these conditions, which include the treatment of noise as an intrinsic characteristic of the measurement apparatus, rather than as a background distractor as assumed by signal detection theory.

This paper is organised as follows: in Sec. we describe the equivalence between Rényi-Ulam games and microscopy, before developing a mathematical approach to selecting queries in Sec. and obtaining an information map. We discuss potential uses of the map in various strategies in Sec. , analysing their average behaviour across many trials, before concluding with Sec. .

# Microscopy as a Rényi-Ulam game

We wish to determine one (single-photon-emitting) fluorescent target's position $x_{0}$ in some continuous 1D domain $x\in[0,L]$ to within some precision $\epsilon$ (or alternatively, to better than some threshold resolution $\epsilon^{-1}$). The precision may be considerably larger than the target's physical size, which is always on the atomic to few-nanometre scale. The average number of queries required should be minimised, and the result achieved must be 100% fidelitous. We assume the microscope illuminates and collects from a region defined by a single top-hat function (THF) with arbitrarily controllable boundaries, as this is the simplest approximation we can make. This is equivalent to a query in the Rényi-Ulam game over the THF. Queries provoke $n$ fluorescence signal photons from the target where $n\in\left\{0,1\right\}$. $n = 1$ *iff* the target is in the non-zero region of the THF, otherwise $n = 0$. These queries are formally equivalent to Rényi-Ulam interval queries, *e.g.*, "Is $b<x_{0}<c$?", for some threshold values $b$ and $c$ (see Fig. ). (Note, however, that under some circumstances – as described in Sec. – these are also equivalent to comparison queries.)

Microscopes often exhibit photon loss mechanisms, including finite numerical aperture, attenuation through optical fibres, and detector inefficiencies. Such system-wide losses are usually (multiplicatively) characterised through an overall efficiency, $\eta$. This parameter describes the chance of collecting a photon if the target is illuminated by the peak value of the point-spread function, and since photons are usually collected through the same PSF, if collection occurs through the peak value also. Most microscopes have non-flat PSFs, often modelled with Gaussian functions. Thus, the true efficiency is $\eta_{0}=\eta\times{\rm PSF}^{2}\left(x_{0}\right)$, if we normalise the peak value to 1. For simplicity, we treat the PSF as a flat top-hat, and hence the true efficiency is simply $\eta$ (if the target is illuminated). Being concerned primarily with photon loss, we define it as the complement of collection events, $\alpha_{0} = 1-\eta$, regardless of the origin of the loss.

Photon loss thus ocurrs with independent probability $\alpha_{0}$ $\in$ $\left[0,1\right]$. This loss is the genesis mechanism of the half-lie. Surviving photons are collected and counted; their number is the reported measurement result $r\in\left\{0,1\right\}$. We formally connect target presence with a Rényi-Ulam "yes", its absence with a "no", and allow half-lies on "yes" states only. *I.e.*, a "yes" could be reported as a "no", but a "no" state can never be reported as a "yes" (see Table , or Eq. ). The game is immediately extensible in multiple commuting spatial dimensions; one plays a separable, independent game in each such dimension.

```latex
\begin{ruledtabular}
\begin{tabular}{c|cc}
System & State  & Possible responses\\
\hline
\multirow{2}{*}{R\'enyi-Ulam} &No   & No\\
& Yes   & No or Yes\\
\hline
\multirow{2}{*}{Microscopy} & Absent    & $r = 0$\\
& Present   & $r\in\left\{0,1\right\}$\\
\end{tabular}
\caption{Possible responses in R\'enyi-Ulam game and microscopy experiment, illustrating the connection between the experiment and the game.  Because the ``No'' and $r = 0$ responses appear for both states, the possibility of a half-lie must be considered when one of these responses is obtained.  Conversely, a ``Yes'' or $r = 1$ response is guaranteed fidelitous.}
\label{tab:connection}
\end{ruledtabular}
```

Since we have probabilistic, random photon loss, we explicitly play a statistical, rather than a combinatorial, Rényi-Ulam game. The number of loss events is theoretically unbounded. Therefore, optimal solutions to combinatorial Rényi-Ulam games as described above do not exist here, since they describe scenarios where the number of lies (or half-lies) is known *a priori*.

For cases where up to a certain total fraction of the queries may be lied to (in any order, and in adversarial fashion), it has been shown that an $O\left(\log_{2} n\right)$ questioner's solution exists for lie-rates $<$ 1/3 (Ref. \[\]), whilst for rates above the responder can always win. The authors of \[\] note that their result is also obtainable from the proofs of \[\]. The complexity of the half-lie problem has been generally equated to that of the full-lie problem, for specified numbers of half-lies, and the number of necessary and sufficient queries for one half-lie has been solved. However, this still does not describe the probabilistic nature of the half-lies inherent to microscopy. The combination of half-lies and the statistical variant does not appear to have been yet considered.

Since confocal microscopes typically have probabilistic $\alpha_{0}>1/3$, but do not operate in adversarial fashion, we instead concern ourselves with minimising the *average* number of queries. Such an approach will aid experiments requiring many replications and/or variations, as are common in biology and medicine.

# Mathematical formalism

We now formulate the game, with particular regard for the choice of measurement boundary (defined shortly) and the consequences of that choice for algorithm run time. Random variables $X, N$, and $R$, are defined on the domains of $x$, $n$, $r$ (position, number of signal photons, measurement result); $A$ is the signal loss probability, on $\alpha\in\left[0,1\right]$, and $V$ is the turn-off boundary between the measured and non-measured regions, defined on $v\in\left[0,1\right]$. Without loss of generality due to the invariance of Shannon information with a reordering of the distribution, we fix the turn-on boundary at the leftmost point with PDF $>0$ for convenience. This also further specifies the query type as a comparison question.

The physics of our system allows us to put constraints on their behaviour: $$\begin{split}
\mathbb{P}_{N|V,X}\left(n|v,x\right) &= \theta\left(v-x\right)\delta_{n,1} + \theta\left(x-v\right)\delta_{n,0}, {\rm ~and}\\
\mathbb{P}_{R|N,A}\left(r|n,\alpha\right) &= \delta_{n,0}\delta_{r,0} + \delta_{n,1}\left[\alpha\delta_{r,0}+\left(1-\alpha\right)\delta_{r,1}\right]
\end{split}
\label{eq:physics}$$ where $\theta$ is the Heaviside step function, and $\delta_{i,j}$ is the Kronecker delta function as the domains $n$ and $r$, of $N$ and $R$ respectively, are discrete. Since we only probe emitters left of $v$, we can only excite emissions left of $v$; the receipt of a photon necessarily requires its emission, and is sometimes blocked by signal loss. For conciseness, we henceforth omit the probabilities' domains.

As the domain $v$ is continuous, we set $\mathbb{P}_{V}~=~\delta\left(v-v_{0}\right)$, using the Dirac delta function, and assuming a perfectly known boundary, $v_{0}$. Also, $\mathbb{P}_{A}~=~\delta\left(\alpha-\alpha_{0}\right)$, a perfectly known false negative rate, $\alpha_{0}$. Further, although the target has a unique position $x_{0}$, this is unknown; therefore we have a uniform prior over $X$, such that $\mathbb{P}_{X} = 1/L$.

Since $A$ and $V$ are uniquely determined, $$\begin{split}
\mathbb{P}_{A|N,V,X} &= \mathbb{P}_{A};\\
\mathbb{P}_{V|N,X} &= \mathbb{P}_{V}.
\label{eq:avgnx}
\end{split}$$

$$\begin{split}
{\rm Also,~}\mathbb{P}_{N,V,X} &= \mathbb{P}_{N|V,X}\mathbb{P}_{V|X}\mathbb{P}_{X},\\
&= \mathbb{P}_{N|V,X}\mathbb{P}_{V}\mathbb{P}_{X}, {\rm and}\\
\mathbb{P}_{N,X} &= \int_{V}\mathbb{P}_{N|V,X}\mathbb{P}_{V}\mathbb{P}_{X}dv.
\end{split}
\label{eq:nx}$$

We now consider that when we attempt to detect photons, we are making a quantum measurement of the field. Since the position of the emitter and measurement boundary are determined before the Markov process of measuring (collapsing) the state and reporting the outcome, we can deconditionalise thus: $$\mathbb{P}_{R|N,A,V,X} = \mathbb{P}_{R|N,A}.
\label{eq:quantum}$$

We form the full joint by: $$\begin{split}
\mathbb{P}_{N,A,V,X,R} &= \mathbb{P}_{R|N,A,V,X}\mathbb{P}_{N,A,V,X}\\
&= \mathbb{P}_{R|A,V,N,X}\mathbb{P}_{A,V|N,X}\mathbb{P}_{N,X}\\
&= \mathbb{P}_{R|A,V,N,X}\mathbb{P}_{A|V,N,X}\mathbb{P}_{V|N,X}\mathbb{P}_{N,X}
\end{split}
\label{eq:joint}$$

Substituting Eqs. – in Eq. and marginalising gives $$\begin{split}
\mathbb{P}_{X,R} &=\sum_{N}\int_{A,V}\mathbb{P}_{N,A,V,X,R}d\alpha dv\\
&=\frac{1}{L}\left[\delta_{r,0}\theta\left(x-v_{0}\right)+\alpha_{0}\delta_{r,0}\theta\left(v_{0}-x\right)\right.\\
&\left.\qquad+\left(1-\alpha_{0}\right)\delta_{r,1}\theta\left(v_{0}-x\right)\right],{\rm ~and}\\
\mathbb{P}_{R}&=\int_{X}\mathbb{P}_{X,R}dx\\
&=\frac{1}{L}\left[\delta_{r,0}\left(L-v_{0} + \alpha_{0}v_{0}\right) + \delta_{r,1}\left(1-\alpha_{0}\right)v_{0}\right]
\end{split}$$

Now, using the definitions of Shannon information: $$\begin{split}
H\left(X\right) &= -\int_{X}\mathbb{P}_{X}\log_{e}\left(\mathbb{P}_{X}\right)~dx,\\
{\rm and~}H\left(X|R\right) &=~\sum_{R}\int_{X}\mathbb{P}_{X,R}\log_{e}\left(\frac{\mathbb{P}_{R}}{\mathbb{P}_{X,R}}\right)~dx,
\end{split}$$ we can calculate the mutual information: $$\begin{split}
I\left(X:R\right) &= H\left(X\right) - H\left(X|R\right)\\
&= \log_{e}\left(\frac{1}{L}\right)-\frac{1}{L}\left[\left(1-\alpha_{0}\right)v_{0}\log_{e}\left(v_{0}\right)\right. \\
&\left.\qquad+ \left(L-v_{0}+\alpha_{0}v_{0}\right)\log_{e}\left(L-v_{0}+\alpha_{0}v_{0}\right)\right. \\
&\left.\qquad- \alpha_{0}v_{0}\log_{e}\left(\alpha_{0}\right)\right]
\end{split}
\label{eq:mutinf}$$ which we maximise to find the condition: $$v_{0} = \frac{L\alpha_{0}^{\frac{\alpha_{0}}{1-\alpha_{0}}}}{1+\left(1-\alpha_{0}\right)\alpha_{0}^{\frac{\alpha_{0}}{1-\alpha_{0}}}},
\label{eq:limit}$$ shown in Fig. . As expected, since this limit is formally equivalent to the canonical binary search problem, $\lim_{\alpha_{0}\rightarrow 0}v_{0} = 1/2$ and is undefined for $\alpha_{0}=1$; however, the limiting value as $\alpha_{0}\rightarrow1$ is $v_{0}\rightarrow1/e$. The optimal measurement domain in the presence of photon loss (half-lies) is therefore less than $L/2$.

# Search strategies

## Proposals

A greedy strategy for target searches would be to maximise the information gain for each subsequent measurement. However, any search over a region that is not a simple dividend of the overall region will be difficult to update for a null result, $r = 0$. (It would also return the query type to interval questions.) We therefore consider simple heuristic approaches, whereby the domain is split into $q$ subdomains which are explored sequentially until the target is explicitly located, whence the split (into $q$ subdomains) recurs. Note that the final split in each heuristic is still into $q$ subdomains, even if fewer would suffice to meet the criterion of precision $\epsilon$, maintaining the heuristics' simplicity. We develop and contrast four such approaches: bi-, tri-, and tetra-sectioning with verification, and the limiting extension of these to sequentially scanning each of the $\epsilon^{-1}$ subdomains.

The obvious choice for an heuristic is bisectioning, the limiting case for zero half-lie rate. (Basic bisectioning is equivalent to binary search in this limit.) Here, we define an approach where null measurements simply unbalance the PDF, and following measurements are undertaken on the other half; *i.e.*, naïvely rastering between only two equal-sized subdomains. This cycle repeats until positive verification of target presence occurs by a measurement $r=1$; the problem is then recursively reposed within the successful half (Fig. , for $q=2$). We call this process "bisectioning with verification". Note that by insisting on positive verification, we cannot take advantage of all the available information in the low-half-lie limit. On average, this process dictates 1.5 measurements per level of enquiry, due to the equal probabilities of the target being or not being in the first-examined subdomain; *i.e.*, for precision $\epsilon$, $1.5\lceil\log_{2}\left(\epsilon^{-1} \right)\rceil$ queries are required.

Here, we extend the definition of bisectioning with verification to define a new family of heuristics: $q$-sectioning with verification. $q$ equal subdomains are queried in turn until positive verification is obtained. The average number of measurements will be $\bar{m}_{q,\epsilon,\alpha_{0}}$; for half-lie-free search this is: $$\bar{m}_{q,\epsilon,0}=\frac{\left(q+1\right)}{2}\lceil\log_{q}\left(\epsilon^{-1}\right)\rceil.
\label{eq:qsectioning}$$

Now we consider trisectioning with verification; we have $\bar{m}_{3,\epsilon,0} = 2\lceil\log_{3}\left(\epsilon^{-1}\right)\rceil$. Due to our high probability of signal loss, we expect $\bar{m}_{3,\epsilon^{-1},\alpha_{0}\neq0}$ to be considerably higher than $\bar{m}_{3,\epsilon^{-1},0}$. Note that this is explicitly not the ternary search of Rényi-Ulam games, defined as a special case of $q$-ary search. That refers instead to a similar, but subtly different process in which the Responder indicates which of the $q$ subdomains holds the target. A good example problem of that type is finding a heavier coin by balance weighing. Neither is it the ternary search of computer science or learning, which maximises unimodal functions by evaluating their value at two intermediate points, or classifies and sorts data.

We also extend this idea to tetrasectioning, which is analogous to bi- and tri-sectioning but partitions the surviving search space into four equal subdomains at any level of measurement. Similarly, the average number of measurements for half-lie-free search will be$\bar{m}_{4,\epsilon^{-1},0}=2.5\lceil\log_{4}\left(\epsilon^{-1}\right)\rceil$.

The penultimate approach we consider is using precisely as many equal sections as we require for the desired precision, *i.e.*, $\epsilon^{-1}$ subdomains, and rastering over these subdomains until positive verification is obtained. We call this approach "rastering with verification". This uses $\bar{m}_{q=\epsilon^{-1},\epsilon^{-1},0}=0.5\left(\epsilon^{-1} + 1\right)\log_{\epsilon^{-1}}\left(\epsilon^{-1}\right)$ measurements. For any appreciable value of $\epsilon^{-1}$, this is prohibitively large compared to the previous strategies. We therefore summarily dismiss rastering with verification as unfeasible (except for small $\epsilon$, where it approaches the other strategies) and do not consider it further in this work.

Finally, we consider rastering as is commonly performed. Here, the domain is continuously scanned from left to right, with the THF having width $\epsilon$. This is used instead of dwelling on each subdomain in turn to avoid ring-down of the equipment after stopping and any consequent dark time to allow its mitigation. The scan rate is slow for several reasons, including shot noise suppression, and convenience in automation by standardising the process for every pixel. We can, however, model this approach as physically dwelling on each subdomain in turn for a set number of queries before moving on. For a dwell time corresponding to $\gamma$ queries, this approach will require $\gamma/\epsilon$ measurements; $0.5\gamma/\epsilon$ on average if the scan is adaptively implemented and will cease after locating the target. Not only does this approach again require a far larger number of measurements for any appreciable $\epsilon^{-1}$, but the inefficiency is compounded by the dwell parameter, $\gamma$, which must be at least 1. Once more, we dismiss this strategy and ignore it henceforth.

We note in each of these heuristics that since the initial domain PDF is uniform, the entropy of an initial query on an edge subdomain is the same as one on an internal subdomain (of equivalent length). Therefore, the query types, though often of interval form, are informationally equivalent to comparison queries. Similar arguments can be made for the following measurements until a new mapping within a subdomain occurs and the reasoning recurs.

## First-pass analysis

To estimate the optimal average number of queries needed to locate a target within $\epsilon$ for specific $\alpha_{0}$, we consider the mutual information (Eq. ) delivered by a hypothetical optimal first measurement (Eq. ). We approximate all consequent measurements with this value. Achieving the desired precision corresponds to acquiring $\log_{2}\left(\epsilon^{-1}\right)$ bits of information, and requires an estimated $\lceil\left[\log_{2}\left(\epsilon^{-1}\right){\rm ~bits}\right]/\left[I\left(X:R\right)|_{\alpha_{0},v_{0}}{\rm ~bits/query}\right]\rceil$ queries.

We simulated one million random emitter positions, using $\alpha_0=0.99$, and subjected each to bi-, tri-, and tetra-sectioning with verification as described above, to an arbitrarily selected precision of $\epsilon = 10^{-10}$. (This high precision displays the algorithmic speedup well; microscopy generally deals with $\epsilon>10^{-6}$, or the approximate ratio of a confocal spot diameter to the length of a 96-well plate.) The measurement regions were curtailed only after positive detection, otherwise cycling through the 2, 3, or 4 sections available. For $\alpha_{0}=0.99$, this dictates an estimated $\approx6240$ "optimal" queries.

Figure a shows a histogram of the Monte Carlo results: the mode \[Mo()\] of each stratagem is apparent, with Mo(trisectioning) $<$ Mo(tetrasectioning) $<$ Mo(bisectioning). The trisectioning mode is also smaller than the estimated optimal average number of measurements; the semi-infinite nature of the data space allows for an average value pulled right of the mode.

Fig. b is the cumulative density function for each approach, from which the median is extractable where each curve crosses the horizontal dotted line. Again, the same ordering is evident, with Median(trisectioning) falling just below the estimated optimal average number.

The distribution means are displayed in the first row of Table , and are consistent with the other measures of central tendency, except that the trisectioning mean is now slightly higher than the estimated optimal average. In addition, the mean number of queries required was evaluated for several different half-lie rates, and form the remainder of Table . Similar estimates for the optimal behaviour based on $I\left(X:R\right)|_{\alpha_{0},w}$ are also provided.

```latex
\begin{ruledtabular}
\begin{tabular}{c|cccc}
$\alpha_{0}$    & $\overline{{\rm Bi-}}$    & $\overline{{\rm Tri-}}$   & $\overline{{\rm Tetra-}}$ & Est.\\
            & sectioning            & sectioning            & sectioning    & optimal\\
\hline
0.99    & 6783.13   & 6275.92   & 6771.67   & 6240  \\
0.5 & 119.00    & 105.02    & 110.49    & 104   \\
0.3 & 80.15 & 69.00 & 71.64 & 66    \\
0.1 & 58.55 & 49.01 & 50.06 & 44    \\
1/18    & 54.99 & 45.71 & 46.49 & 40    \\
1/35    & 53.00 & 43.85 & 44.60 & 37    \\
1/36    & 52.94 & 43.80 & 44.44 & 37    \\
0.01    & 51.69 & 42.64 & 43.18 & 35    \\
0.001   & 51.07 & 42.06 & 42.57 & 34    \\
0   & 51.00& 42.00  & 42.50 & 34
\end{tabular}
\caption{Average number of measurements (for $10^{6}$ trials) to locate an emitter to one of  $10^{10}$ subdomains  using various heuristic search strategies and an estimate of the optimal average value obtained from Eqs. \ref{eq:mutinf} and \ref{eq:limit} (shown in Fig. \ref{fig:comparison}g).}
\label{tab:meansearch}
\end{ruledtabular}
```

The requirement of absolute knowledge (zero PDF outside the final interval), by positive verification of presence through signal capture, inflicts a penalty on the sectioning strategies. As mentioned above, 33.2 bits of information are required: at zero half-lie rate, this dictates 34 measurements in a perfect scheme. The final row of Table shows that none of the sectioning strategies performs particularly well in that case, with bisectioning using on average 50% extra queries. In contrast, tri- and tetra-sectioning only require 24% extra queries. Neither uses the (positive) information that can be derived from null results, which faithfully indicate the target's absence. The ignorance and disuse of the full information available by the insistence on positive verification translates as an extra cost in the number of measurements required.

It is instructive to consider the lower (non-trivial) limit of half-lie rates, where the most likely outcome is one half-lie. Assuming the 34 necessary plus one erroneous measurements, one half-lie is most likely for $1/36\leq\alpha_{0}\leq 1/18$, with the expected value of one half-lie for $\alpha_{0}=1/35$. Rivest *et al.* proved that finding a target in $k$ discrete subdomains , when up to $E$ responses to comparison questions may be erroneous *iff* the truth is of one specified type (*e.g.*, less than), requires $Q\geq \lceil\log_{2}\left(k\right) + E\log_{2}\log_{2}\left(k\right) + O\left[E\log_{2}\left(E\right)\right]\rceil$ comparison questions. For our example case, where $E=1$ and $k=10^{10}$, $E\log_{2}\left(E\right)=0$, requiring $Q\geq\lceil\sim38.2\rceil=39$ queries. From Table , the trisectioning heuristic performs on average within 11% of the Rivest *et al.* bound within these limits, and outperforms the bi- and tetra-sectioning approaches.

Not only does bisectioning fail to be optimal (even for zero half-lies), trisectioning outperforms it at every half-lie rate as well. From Table we can determine that the penalty for using bi- instead of tri-sectioning is 8–21%, depending on the photon loss rate – and worst for low loss rate (where the insistence on positive verification is most deleterious). There is therefore an immediate, quantifiable benefit to preferring the trisectioning strategy over bisectioning. Tetrasectioning has a similar, albeit smaller, penalty, and is nearly as efficient as trisectioning for low half-lie rates.

Although for low photon loss, the trisectioning heuristic requires more measurements than the estimated optimal information use, its performance improves markedly as losses increase. For typical confocal microscope conditions ($\alpha_{0}\approx0.99$), trisectioning requires on average only 1% more measurements, and beats bisectioning by 10%.

Returning to the original context of confocal/multiphoton microscopy, one major point of difference is that here, we explicitly recognise that once a subdomain is searched and a null result obtained, the target is more likely elsewhere in the full domain. In contrast, conventional approaches dwell on each pixel, effectively performing a number of measurements (as defined by our approach) several orders of magnitude larger than the one performed here before moving the PSF. Such processes are information inefficient.

The second, and more impactful, difference is that conventional microscopy *always* searches the same amount of area per query, whereas the sectioning approaches resize the PSF after verification. This is the origin of the change from linear to logarithmic behaviour – if the local intensity of the probe beam within the PSF can be maintained for diffuse measurements.

## Exploration for other precisions

### Zero half-lie rate

The selection above of $\epsilon^{-1}=10^{10}$ was somewhat arbitrary, and it is natural to question whether the performance of the trisectioning algorithm was due to the nearness of $10^{10}$ to a power of three (and distance from powers of two and four).

To explore this concept, we propose the following thought experiment: let us set the half-lie rate to $\alpha_{0}=0$. Now, there is no probabilistic component to the average number of searches required to find a target in $q$ subdomains; the average number is simply $\frac{q}{2}$, based on the random placement of the target within the initial domain. We can therefore easily compute the expected number of searches under a given heuristic as $\frac{q}{2}\lceil\log_{q}\left(\epsilon^{-1}\right)\rceil$. Performing this for $q\in\left\{2,3,4,5\right\}$ and $\epsilon^{-1}\in\left\{2,3,4,...,10^{6}\right\}$, we compute Fig. a.

It is quickly apparent that trisectioning and tetrasectioning dominate a search for minimum-search strategies. Further investigation shows that tetrasectioning is actually the most frequent winner, for 611612 of the considered values of $\epsilon^{-1}$. It is unique for 569970 of these cases. See Table for more detail.

```latex
\begin{ruledtabular}
\begin{tabular}{c|cc}
$q$ & \multicolumn{2}{c}{Solution type} \\
& Optimal & Unique\\
\hline
2 & 2 & 1\\
3 & 415,229 & 246,610\\
4 & 611,612 & 569,970\\
5 & 142,433 & 12,634\\
6 & 1,500 & 11\\
7 & 11 & 1\\
8 & 1 & 0\\
10 & 0 & 0\\
100 & 0 & 0\\
1,000 & 0 & 0\\
\end{tabular}
\caption{Performance of various $q$-sectioning search heuristics for 1/$\epsilon \in \left\{2, 3, ..., 10^{6}\right\}$ and $\alpha_{0}=0$.  Performance is described as optimal where no $q$-sectioning heuristic solution exists for that $\epsilon^{-1}$ with fewer measurements, and unique if no similarly optimal solution for that $\epsilon^{-1}$ exists with different $q$.}
\label{tab:naive}
\end{ruledtabular}
```

Strategies with $q > 8$ are never efficient, hence our comments about rastering as generally performed. Strategies with $5\leq q\leq 8$ are efficient only in limited special cases. Choosing $q \in \left\{3, 4\right\}$ offers optimal behaviour for 987,353 of the cases considered.

### Realistic microscopy parameters

The situation becomes more interesting for non-zero $\alpha_{0}$, and yet harder to obtain extensive data for. Since non-zero $\alpha_{0}$ implies some probabilistic behaviour, we again performed many Monte Carlo simulations to obtain the equivalent of one datum from Fig. a, but for $\alpha_{0}=0.99$. We chose $\epsilon^{-1}=10^{6}$ as equivalent to a search across a microscope slide or well plate (of order 10 cm) down to the diffraction limit of light (of order 100 nm). It is also conveniently substantially closer to powers of 2 and 4 than 3, as given by our metric function for the effective nearness of $\epsilon^{-1}$ to a power of $q$: $$F\left(q,\epsilon\right) = 0.5 - \left\|0.5 Ð \left[\log_{q}\left(\epsilon^{-1}\right) - \lfloor\log_{q}\left(\epsilon^{-1}\right)\rfloor\right]\right\|$$ A value of $F=0$ means that $\epsilon^{-1}$ is an exact match to a power of $q$; $F=0.5$ is the greatest distance attainable.

We find that trisectioning is still competitive (Table ). We have also included pentasectioning for completeness; it performs poorly compared to the others, despite $10^{6}$ being a similar distance from a power of five as from a power of three. Bi-and tetra-sectioning, which have similar $F$ values, have drastically different modes. Clearly, the relative nearness to a power of $q$ is not the only contributing factor to the performance of the heuristics.

```latex
\begin{ruledtabular}
\begin{tabular}{c|cccc}
$q$ & $F\left(q,\epsilon\right)$ & Mean & Median & Mode \\
\hline
2 & 0.068 & 3990.2 & 3924 & 4157\\
3 & 0.425 & 3887.4* & 3789* & 3674\\
4 & 0.034* & 3983.5 & 3853 & 3458*\\
5 & 0.416 & 4482.8 & 4318 & 3657\\
\end{tabular}
\caption{Measures of central tendency from results of Monte Carlo trials as per Fig. \ref{fig:comparison}; 10$^{6}$ trials for $\alpha_{0}=0.99$.  The lowest column values are denoted by asterisks (*).}
\label{tab:million}
\end{ruledtabular}
```

We explored a limited subset of $\epsilon^{-1}$ to the same rigour (Table ). Here, pentasectioning occasionally performs comparably to the other heuristics, but mostly considerably poorer than the best of them. It is notable that the heuristic with minimal distance is most often not the one with the lowest mean number of measurements.

```latex
\begin{ruledtabular}
\begin{tabular}{cc|cccc}
$\epsilon^{-1}$ & $q$ & $F\left(q,\epsilon\right)$ & Mean & Median & Mode \\
\hline
\multirow{4}{*}{$10^{3}$} &2 & 0.034 & 1994.7 & 1929 & 1813\\
& 3 & 0.288 & 2092.7 & 1994 & 1762\\
& 4 & 0.017* & 1992.0* & 1861* & 1568*\\
& 5 & 0.292 & 2489.5 & 2325 & 2016\\
\rule{0pt}{2.6ex}
\multirow{4}{*}{$3\times10^{3}$} &2 & 0.449 & 2394.6 & 2328 & 2108\\
& 3 & 0.288 & 2391.7 & 2292 & 2158\\
& 4 & 0.225 & 2389.7* & 2257* & 1890\\
& 5 & 0.025* & 2429.5 & 2329 & 1834*\\
\rule{0pt}{2.6ex}
\multirow{4}{*}{$10^{4}$} &2 & 0.288 & 2797.7 & 2716 & 2641\\
& 3 & 0.384 & 2690.3* & 2591* & 2607\\
& 4 & 0.356 & 2787.8 & 2656 & 2359*\\
& 5 & 0.277* & 2989.1 & 2823 & 2628\\
\rule{0pt}{2.6ex}
\multirow{4}{*}{$3\times10^{4}$} &2 & 0.127* & 2992.8 & 2927* & 2821\\
& 3 & 0.384 & 2988.7* & 2980 & 2602\\
& 4 & 0.436 & 3188.9 & 3059 & 2565*\\
& 5 & 0.405 & 3845.9 & 3321 & 3330\\
\rule{0pt}{2.6ex}
\multirow{4}{*}{$10^{5}$} &2 & 0.390 & 3391.9 & 3326 & 3145\\
& 3 & 0.480 & 3288.8* & 3190* & 2947*\\
& 4 & 0.305 & 3584.9 & 3452 & 3417\\
& 5 & 0.153* & 3983.7 & 3820 & 3704\\
\rule{0pt}{2.6ex}
\multirow{4}{*}{$3\times10^{5}$} &2 & 0.195 & 3790.7 & 3725 & 3657\\
& 3 & 0.480 & 3587.0* & 3488* & 3071\\
& 4 & 0.097* & 3985.2 & 3852 & 3637\\
& 5 & 0.164 & 3984.9 & 3823 & 3160\\
\rule{0pt}{2.6ex}
\multirow{4}{*}{$10^{6}$} &2 & 0.068 & 3990.2 & 3924 & 4157\\
& 3 & 0.425 & 3887.4* & 3789* & 3674\\
& 4 & 0.034* & 3983.5 & 3853 & 3458*\\
& 5 & 0.416 & 4482.8 & 4318 & 3657\\
\end{tabular}
\caption{Measures of central tendency from results of Monte Carlo trials as per Fig. \ref{fig:comparison}; 10$^{6}$ trials for $\alpha_{0}=0.99$.  The lowest column/major row values are marked by asterisks.}
\label{tab:more}
\end{ruledtabular}
```

### General solution

It being impractical to perform 10$^{6}$ simulations for each value of $\epsilon^{-1}$, we match Fig. a by lowering our standards. We performed 10$^{4}$ Monte Carlo simulations for every value of $\epsilon^{-1}$ between 2 and 10$^{4}$, with $\alpha_{0}$ set to 0.99; the results can be see in Fig. b. We note that the individual heuristics still perform in step-wise semilogarithmic fashion (albeit with larger jumps); however, the pattern is significantly distorted from the zero-half-lie case. Our observations regarding pentasectioning are borne out; in the main it performs the worst of these heuristics. We also note the enhanced perfomance of the trisectioning heuristic over the tetrasectioning, as evidenced by its greater proportion of being the minimum solution – especially at the right of the figure, where the logarithmic scale greatly compresses the data over $\epsilon^{-1}$.

The regularity of each heuristic's behaviour led us to propose a more general form for the mean number of measurements, based upon the frequentist interpretation of probabilities as the mean chance of outcome given exhaustively many trials: $$\bar{m}_{q,\epsilon^{-1},\alpha_{0}} = \left[q\left(\frac{1}{1-\alpha_{0}}-1\right)+ \frac{q+1}{2}\right]\lceil\log_{q}\left(\epsilon^{-1}\right)\rceil .
\label{eq:behaviour}$$ The first term in the prefactor recognises that in the long run, 1/(1-$\alpha_{0}$) trials must occur in the correct subdomain before a photon will be detected. However, for each trial (except the final one), we incur the penalty of searching the other $q-1$ subdomains, necessitating $q\left(\frac{1}{1-\alpha_{0}}-1\right)$ searches per level before we expect to receive a signal on the next pass through. On the final pass (per level), we have ($q$+1)/2 searches as before. This total, of course, is then scaled by the logarithmic ceiling function, which dictates how many levels of search need be accomplished to sufficiently locate the target. Of course, $\lim_{\alpha_{0}\rightarrow 0} \bar{m}_{q,\epsilon^{-1},\alpha_{0}} = \bar{m}_{q,\epsilon^{-1},0}$ from Eq. .

Figure b also presents a direct calculation (by Eq. ) of the means previously estimated through Monte Carlo sampling. By eye, it describes the behaviour well. We extend its domain over more values of $\epsilon^{-1}$ than it is practical to simulate, even for a single $\alpha_{0}$, in Fig. c. Given the semi-logarithmic nature of the plot, trisectioning search is the optimal $q$-sectioning heuristic for the vast majority of $\epsilon^{-1}\in\left\{2,3,...,10^{10}\right\}$ (and $\alpha_{0}=0.99$). Closer exploration reveals it to be the optimal $q$-sectioning heuristic for all $\epsilon^{-1}>2^{24}\sim1.7\times 10^{7}$ (and $\alpha_{0}=0.99$). It is also optimal for 85.0% of the cases below 2$^{24}$, as Table shows. What is less clear, given the scale of the axes, is that *all* of the solutions are now unique. This is due to the more complex prefactors involved.

```latex
\begin{ruledtabular}
\begin{tabular}{c|cccc}
$q$ & 2 & 3 & 4 & 5 \\
\hline
Optimal & 1,687 & 14,253,472 & 2,522,055 & 1\\
Unique & 1,687 & 14,253,472 & 2,522,055 & 1\\
\end{tabular}
\caption{Performance of various $q$-sectioning search heuristics for 1/$\epsilon \in \left\{2, 3, ..., 2^{24}\right\}$ and $\alpha_{0}=0.99$. As per Table \ref{tab:naive}, performance is optimal where no $q$-sectioning heuristic solution exists for that $\epsilon^{-1}$ with fewer measurements, and unique if no similar solution for that $\epsilon^{-1}$ exists with different $q$.}
\label{tab:finalcomp}
\end{ruledtabular}
```

It is now trivial to compare the estimates of the means from Table with Eq. – see Table . The agreement is very good, with most estimates within 1 measurement of the corresponding analytic values.

```latex
\begin{ruledtabular}
\begin{tabular}{cc|cccc}
$\epsilon^{-1}$ & Type & \multicolumn{4}{c}{$q$}\\
\multicolumn{2}{c|}{} & 2 & 3 & 4 & 5 \\
\hline
\multirow{2}{*}{$10^{3}$} & Estimate & 1994.7 & 2092.7 & 1992.0* & 2489.5\\
& Analytic & 1995 & 2093 & 1992.5* & 2490\\
\rule{0pt}{2.6ex}
\multirow{2}{*}{$3\times 10^{3}$} & Estimate & 2394.6 & 2391.7 & 2389.7* & 2429.5\\
& Analytic & 2394 & 2392 & 2391* & 2490\\
\rule{0pt}{2.6ex}
\multirow{2}{*}{$10^{4}$} & Estimate & 2797.7 & 2690.3* & 2787.8 & 2989.1\\
& Analytic & 2793 & 2691* & 2789.5 & 2988\\
\rule{0pt}{2.6ex}
\multirow{2}{*}{$3\times 10^{4}$} & Estimate & 2992.8 & 2988.7* & 3188.9 & 3845.9\\
& Analytic & 2992.5 & 2990* & 3188 & 3486\\
\rule{0pt}{2.6ex}
\multirow{2}{*}{$10^{5}$} & Estimate & 3391.9 & 3288.8* & 3584.9 & 3983.7\\
& Analytic & 3391.5 & 3289* & 3586.5 & 3984\\
\rule{0pt}{2.6ex}
\multirow{2}{*}{$3\times 10^{5}$} & Estimate & 3790.7 & 3587.0* & 3985.2 & 3984.9\\
& Analytic & 3790.5 & 3588* & 3985 & 3984\\
\rule{0pt}{2.6ex}
\multirow{2}{*}{$10^{6}$} & Estimate & 3990.2 & 3887.4* & 3983.5 & 4482.8\\
& Analytic & 3990 & 3887* & 3985 & 4482\\\end{tabular}
\caption{Comparison of means, estimated from 10$^{6}$ Monte Carlo trials, versus those calculated directly from Eq. \ref{eq:behaviour}.  The lowest values in each column are denoted with asterisks (*).}
\label{tab:meancomp}
\end{ruledtabular}
```

## Behaviour with changes in loss

Obtaining a general analytic form allows us to explore behaviour of the family of $q$-sectioning with verification heuristics across changes not only to the desired precision, but also of the half-lie rate $\alpha_{0}$. Due to the step-like nature of the $\bar{m}_{q,\epsilon^{-1},\alpha_{0}}$ function, its behaviour can be modelled simply by taking values on each side of the step function locations – which are the powers of the various $q$. Figure shows the optimal heuristic type(s) for each $\epsilon^{-1}\in\left\{2,3,...10^{10}\right\}$ and $\alpha_{0}\in\left\{0,0.01,...,1\right\}$.

The abundance of light blue in Fig. shows that the trisectioning with verification heuristic is optimal not only for most $\epsilon$ at $\alpha_{0}=0.99$, but also at lower half-lie rates. This is a somewhat surprising result; above $\epsilon^{-1}=128$, trisectioning dominates the plot - except for zero half-lies. Of course, the $q$-sectioning with verification heuristic is not optimal at zero half-lies, since it does not take advantage of the information contained in failures to detect photons; basic bisectioning (binary search) search is faster there. However, searches not requiring verification cannot be 100% fidelitous for any $\alpha_{0}>0$.

As we might expect, the next most successful heuristic is tetrasectioning with verification. Bisectioning makes a few brief appearances, but is not uniquely optimal for any $\alpha_{0}$ after $\epsilon=2^{13}$. Pentasectioning is similar, though rarer again, and is no longer uniquely optimal under any conditions after $q=5^{13}$.

In principle, Fig. could be extended further in $\epsilon^{-1}$; however near $2^{49}$, double-precision floats fail to avoid numerical errors in calculating $\bar{m}_{q,\epsilon^{-1},\alpha_{0}}$. Extending Fig. this far would unacceptably compress the plot, which for clarity is limited to cases already discussed.

# Conclusions

In summary, the $q$-sectioning with verification family of search algorithms has been proposed and studied. Verification is an intriguing constraint on search algorithms; its cost is most apparent at low photon loss rates. For zero loss, bisectioning with verification ignores half of the available information and suffers a consequent loss of efficiency compared to the optimal binary search. However, for any non-zero loss, algorithms requiring verification retain 100% fidelity in their predictions, while $q$-ary searches cannot (except in the unattainable limit of infinite measurements).

An analytic formula describing the mean number of measurements for entire the family of $q$-sectioning with verification algorithms given any choice of $q$, precision $\epsilon$, and half-lie (photon loss) rate $\alpha_{0}$ has been developed. The family's behaviour has been mapped across a wide range of $\epsilon$ and $\alpha_{0}$, and the optimal choice is not simply a function of the relative nearness of $\epsilon$ to a power of $q$.

Trisectioning with verification is most often the optimal $q$-sectioning with verification heuristic for problems involving any random half-lies and precision $\epsilon<1/128$ of the initial search domain. Further, although trisectioning with verification is sub-optimal, it appears near-optimal for our example case according to our estimator.

In practical terms, since photon-counting microscopes have already been developed, the trisectioning scheme discussed here offers the chance for greatly accelerated target searches over current confocal rastering techniques. This approach could be particularly useful for locating short-lived species if the microscope point-spread function can be modified quickly enough, via both changing the spot size as well as shifting the beam centre, thereby changing the search domain rapidly between measurements. However, before such a task is undertaken, it would be beneficial to reconsider this problem with explicit Gaussian roll-offs and/or general shape to the PSF, and also to fully characterise the intensity changes required by the varying PSF widths. Finally, before such an approach is applied to biological systems, attempts should be made to include penalty functions characterising photon exposure and/or damage, as well as accounting for practical considerations such as time to modify or shift the PSF, to study how the dynamics of an optimal biological search differ from those presented here. Information may not be the sole metric of interest to be optimised; a full cost-benefit analysis accounting for these issues may eschew the information benefit of shifting position more often.

# Acknowledgements

The authors thank Nicolas Menicucci, Brant Gibson, Adrian Dyer, Jair Garcia, and Chris Xu for insightful discussions, and acknowledge the support of the Australian Research Council (project numbers CE140100003 and FT160100357).

# Author Contributions

DWD and ADG conceived of, planned, carried out, and analysed the study. DWD and ADG wrote the manuscript.

# Additional Information

The authors declare no competing financial interest.