% The most probable convex hull. \section{The most probable convex hull}\label{sec:gaussian-hull} Because a hull records only boundary sites, we encode each item along a core polygon's edges. Moving a candidate outward opens a triangular cap that can capture a random \emph{probe}, and balancing opening cost against capture makes the ideal score peak at the target. \begin{theorem}\label{thm:gaussian-hull} Given the rational centres and positive rational scales \(s_i\) of independent planar Gaussian sites with covariances \(s_i^2 I_2\), finding a most probable set of extreme labels is NP-hard. The same holds for their cyclic order up to rotation and reversal. Each reduction uses one call and works for every mode. \end{theorem} \begin{proof} Take a \textsc{Subset Sum} instance with positive binary weights \(a_1,\ldots,a_m\) and target \(1\le T\le A=\sum_i a_i\)~\cite[problem 18, pp.~95, 100]{karp}. We choose opening probabilities and cap sizes so the ideal score peaks at \(T\), then give the fixed vertices positive variance. \emph{Core polygon and candidates.} Let \(K\) be the hull of fixed vertices \(20(j,j(j-m))\), \(0\le j\le m\), and upper corners of \([0,20m]\times[0,20m^2]\). It contains the disk of radius \(10m\) about the rectangle centre \(o\), giving \(1-B\le e^{-50m^2}<2^{-m-5}\) for the probe \(P\sim N_2(o,I_2)\) and \(B=\Pr(P\in K)\). On each lower edge \(i\), with midpoint \(M_i\) and outward unit normal \(u_i\), put an independent candidate \(X_i=M_i+s_i(d_i u_i+Z_i)\), \(Z_i\sim N_2(0,I_2)\). Here \(d_i\) sets opening probability \(\Phi(d_i)\) and \(s_i\) scales the cap for a fixed outward draw (Fig.~\ref{fig:hull-caps}(a)). A hull is \emph{canonical for \(S\)} if its extreme sites are \(K\)'s vertices and candidates in \(S\). For cyclic output, take \(K\)'s boundary order and insert each \(i\in S\) between the consecutive endpoints of edge \(i\). \begin{figure}[!htbp] \centering\includegraphics[width=\linewidth]{figures/hull_caps.pdf} \caption{Tuning the probability of a cap. In (a), the probe \(P\) lands in the cap of \(X_1\). In (b), edge 1 is rotated. For each outward \(V\), integrate the probe density over the hatched region. The conditional average gives \(w_i(s')-w_i(s)\). Bisection chooses a rational \(s_i\) with \(w_i(s_i)\) close to \(\lambda a_i\).}\label{fig:hull-caps} \end{figure} \emph{Target score.} Choose \(0<\lambda A\le1/8\) and set \(c=(B+\lambda T)^{-1}\). Give edge \(i\) opening odds \(p_i/(1-p_i)=e^{-c\lambda a_i}\) and target expected capture \(\lambda a_i\) conditional on opening. By independence, opening precisely \(S\) has probability \(Qe^{-cx}\), with \(x=\lambda\sum_{i\in S}a_i\) and \(Q=\prod_i(1-p_i)\ge2^{-m}\) (\(p_i<1/2\)). The target cap contributions sum to \(x\), giving ideal capture \(B+x\) and ideal hull score \(QF(x)\), where \[ F(x)=(B+x)e^{-cx},\qquad F'(x)=ce^{-cx}(\lambda T-x). \] Relative capture gain \(1/(B+x)\) equals cost \(c\) at \(x=\lambda T\) (Fig.~\ref{fig:hull-score}(c)). Integrating \(F'\) with \(ce^{-cx}\ge1/4\) gives \(F(\lambda T)-F(x)\ge(x-\lambda T)^2/8\), so for integer weights each target subset beats any non-target in ideal score by at least \(G=2^{-m}\lambda^2/8\), with \(QF(\lambda T)>QB\) (Fig.~\ref{fig:hull-score}(b)). \begin{figure}[!hbp] \centering\includegraphics[width=\linewidth]{figures/hull_score.pdf} \caption{The peak at weight 7. In (a), the open edges of Fig.~\ref{fig:hull-caps}(a) have total weight 6. In (b), symbols mark attainable weights. The triangle marks 6 and the square marks 7 (\(2+5=3+4\)). In (c), the falling relative gain in probe capture meets the fixed relative opening cost at 7, maximizing the ideal score. Here \(B=7/8\) and \(\lambda=1/128\) are illustrative.}\label{fig:hull-score} \end{figure} \emph{Calibrating shifts and scales in polynomial time.} Set \(U=100(m+1)^2\), \(k=16(U^2+m+\lceil\log_2(A+1)\rceil+32)\), \(\lambda=2^{-k}\), \(\beta=\lambda^4\), \(\rho=1/(100U)\), and \(s_{\max}=\rho/(16k)\). For \(|d_i|\le1/4\) and \(s_i\le s_{\max}\), the probability that at least one candidate leaves its radius-\(\rho\) disk around \(M_i\) is at most \(me^{-(16k-1)^2/2}<\beta\). Because vertices are multiples of \(20\), all vertices and midpoints are integer points on a convex boundary: collinear triples share an edge, and every noncollinear triple has determinant at least \(1\) in magnitude, shifting by at most \(4U\rho+4\rho^2<1\). Whenever every candidate stays in its midpoint disk, outward candidates preserve convexity in boundary order with disjoint cap interiors outside \(K\), and inward ones stay in \(K\). Since \(c\lambda A\le1/7\) and \(\Phi(-1/4)<(1+e^{1/7})^{-1}\), bisection finds rational \(d_i\in[-1/4,0]\) with \(|\Phi(d_i)-p_i|\le\beta\). Let \(w_i(s)\) be the expected probe probability of cap \(i\) conditional on opening. For each outward draw \(V=d_i u_i+Z_i\) of height \(h=V\cdot u_i>0\), the apex moves along a ray from \(M_i\) (Fig.~\ref{fig:hull-caps}(b)). As \(s\) grows, the caps nest, and increasing \(s\) by \(\Delta s\) adds area \(\ell_i h\Delta s/2\) for an edge of length \(\ell_i\). The probe density is at most \(1/(2\pi)\) and the conditional mean height is below \(2\), so \(w_i\) increases from zero and is \(U\)-Lipschitz. With probability above \(1/100\), the standard draw has normal component in \([1,2]\) and tangential component in \([-1,1]\). Then \(h\ge1/2\) and every cap point lies within distance \(U/4\) of \(o\), so the probe density exceeds \(2^{-U^2-4}\) and \(w_i(s_{\max})\ge s_{\max}2^{-U^2-14}>\lambda A\). At each midpoint, enclose \(w_i\) within radius \(\beta/8\). If the interval contains \(\lambda a_i\), return the midpoint. Otherwise bisect by monotonicity down to width \(\beta/(2U)\). This yields rational \(s_i\ge\lambda/(2U)\) with \(|w_i(s_i)-\lambda a_i|\le\beta\). To compute \(w_i(s)\), write the outward draw as \(V=h u_i+v e_i\) in the unit normal and tangent directions. At fraction \(t\) from base to apex, the position and area Jacobian are \[ M_i+(1-t)\ell_i y e_i+tsV,\qquad \ell_i s h(1-t),\qquad 0\le t\le1,\quad |y|\le1/2 . \] Integrate the probe density times this Jacobian against \(\varphi(h-d_i)\varphi(v)\) (\(\varphi=\Phi'\)) over \(h>0,v\in\R\) and divide by \(\Phi(d_i)>1/3\). For \(q\) bits of accuracy, truncating \(h\) and \(|v|\) at \(10(q+10)\) leaves a Gaussian tail error below \(2^{-q-5}\). On the rescaled unit box, the integrand is a polynomial times \(e^{-H}\), where \(H=O((U+q+10)^2)\) is a polynomial of fixed degree. Choosing Taylor degree \(D=O((U+q+10)^2)\) keeps the integrated remainder below \(2^{-q-5}\) and reduces the integral to polynomially many monomial integrals over rational bounds in four variables. Because \(H\) has fixed degree, submultiplicativity bounds the sum of absolute coefficients by \((U+q+10)^{O(D)}\), so dyadic precision \(O(q+D\log(U+q+10))\) suffices. The same method evaluates \(B\) on a triangulation of \(K\) (two variables) and both \(\Phi\) and the opening odds (one variable), with \(O(\log(U/\beta))\) bisection steps and \(q=O(\log(U/\beta))\) bits per step. \emph{Transfer to positive-variance sites.} Multiply the pattern indicator for \(S\) by the sum of the probe indicators of \(K\) and its open caps. Independence preserves each open candidate's conditional law, so the expectation is the pattern probability times \(B+\sum_{i\in S} w_i(s_i)\). Inside all midpoint disks, this product equals the canonical hull indicator almost surely under either convention. Outside that event it is at most \(m+1\), so leaving those disks changes the probability by at most \((m+2)\beta\). Since \(B+\sum_i w_i(s_i)<2\), telescoping the \(m\) opening probabilities and adding the \(m\) cap errors costs at most \(3m\beta\). A noncanonical hull requires a missed disk or \(P\notin K\). By independence and the translation bound of Section~\ref{sec:centres}, rounding each \(d_i u_i\) within \(\beta/(2m+4)\) to a rational vector costs under \(\beta\) in total variation. Finally, give each fixed vertex independent Gaussian noise of positive rational scale. Let \(N=2m+4\), \(s_*=\min(1,s_1,\ldots,s_m)\ge\lambda/(2U)\), and \(b=\beta/(100N^3)\). For any triple with at least one random site, sample a random site last. The first two sites lie at distance at least \(s_*b\) except with probability at most \(b^2/2\) (by Gaussian disk density, or unit separation when both are fixed). Conditional on a pair at distance at least \(s_*b\), the signed orientation determinant \(\Delta\) is Gaussian with standard deviation at least \(s_*^2b\), so \(\delta=s_*^2b^2\) gives \(\Pr(|\Delta|\le\delta)\le 2\delta/(\sqrt{2\pi}\,s_*^2b)=\sqrt{2/\pi}\,b\). Including closer pairs gives at most \(b^2/2+\sqrt{2/\pi}\,b\) per triple. All-fixed triples have nonzero integer determinants, so a union bound keeps near-collinear failure below \(\beta/10\). With probability at least \(1-\beta/10\), all positions before perturbing the fixed vertices and all new standard draws have norm at most \(J=10(U+\lceil\log_2(N/b)\rceil+10)\). Taking the largest power of two \(\tau\le\delta/(32J^2)\) keeps every determinant shift below \((8\tau+4\tau^2)J^2<\delta\), preserving all orientations and both hull conventions in polynomial bit length. Combining the errors from leaving the midpoint disks, calibration, rounding, and vertex perturbation places each canonical hull probability within \((5m+4)\beta2^{-m-4}\) and beats every non-target canonical hull by more than \(G/2\). In a no instance, no subset sums to \(T\). Reading the candidate labels from any returned mode therefore decides \textsc{Subset Sum} with one call. \end{proof}