Skip to main content
Springer logoLink to Springer
. 2025 Nov 19;75(2):491–510. doi: 10.1007/s00454-025-00795-6

Morse Theory for the k-NN Distance Function

Yohai Reani 1,, Omer Bobrowski 2
PMCID: PMC12953273  PMID: 41783254

Abstract

We study the k-th nearest neighbor distance function from a finite point-set in Rd. We provide a Morse theoretic framework to analyze the sub-level set topology. In particular, we present a simple combinatorial-geometric characterization for critical points and their indices, along with detailed information about the possible changes in homology at the critical levels. We conclude by computing the expected number of critical points for a homogeneous Poisson process. Our results deliver significant insights and tools for the analysis of persistent homology in order-k Delaunay mosaics, and random k-fold coverage.

Keywords: Applied topology, Morse theory, Distance function, k-nearest neighbor

Introduction

Let P be a finite subset of Rd, with |P|k. We define the k-nearest neighbor distance (k-NN) function dP(k):RdR0+ as

dP(k)(x):=minr:|Br(x)P|k,

where Br(x) is a closed ball of radius r centered at x. For k=1 we have the simple case of the distance function

dP(1)(x)=dP(x):=minpPx-p.

The k-NN distance function arises naturally in numerous applications, including coverage in sensor networks, shape reconstruction, and clustering [10, 31]. A key reason for the interest in dP(k) comes from the fact that its sub-level sets are the k-fold covers, i.e.,

(dP(k))-1((-,r])=Br(k)(P):=xRd:|Br(x)P|k. 1

In other words Br(k)(P) contains all points that are covered by at least k balls of radius r, centered at P. For k=1 we denote Br(P):=Br(1)(P), which is simply the union of the balls around P. Our main goal in this paper is to present a simple and comprehensive Morse theory for dP(k), which is key to future study of this function within the context of applied and stochastic topology.

Morse theory [26] lies at the intersection of topology and analysis, linking local differential properties to global structural changes. Specifically, it analyzes how critical points of different indexes affect the homotopy type of the sub-level sets of a function. The classical definition of Morse theory applies to smooth functions, where the location and index of the critical points are determined by the gradient and Hessian, respectively. As dP(k) is not a differentiable function, the original notions do not apply anymore. Nevertheless, we will show in this paper that there is a relatively simple geometric-combinatorial way to define critical points for dP(k). Furthermore, when the points P are in general position (e.g., when P is random), we can show that the critical values are distinct, as in a classical Morse function. However, we note that as opposed to Morse functions, the sublevel sets of dP(k) may undergo multiple changes at each critical point.

In [5] the authors provided a combinatorial-geometric description for the critical points of the distance function dP, their index and homological effect, based on an adaptation of Morse theory to min-type functions [19]. The key property of dP which enabled the results in [5] is that dP2 is a min-type function, i.e., it can be expressed locally as the minimum of a finite collection of differentiable functions. This property, however, does not extend to dP(k) (k>1), rendering the previous approach inapplicable. In response, our paper adopts an alternative strategy, employing an extended Morse-theoretic framework [2] designed for continuous selections of smooth functions (which include min-type functions). The key advantage of this framework, is the ability to define and analyze critical points of continuous selections (generally non-smooth) through the derivatives of their smooth representatives. Leveraging this framework, we establish a simplified combinatorial-geometric representation for the critical points of dP(k) and their homological effect. Notably, this description generalizes the one in [5] for the distance function dP.

A key motivation for this work is the study of random k-fold coverage [7, 15, 18, 21, 23, 27, 28]. While the k-fold coverage process has an intrinsic mathematical interest, it also has applications in numerous fields. For instance, in cellular networks, k-fold coverage provides redundancy that guarantees the network robustness to antenna failures [33]. In shape reconstruction, guaranteeing k-fold coverage is useful in the context of outliers removal [15, 32]. Other examples include wireless communication [20], stochastic optimization [34], topological data analysis (TDA) [4], immunology [27], and more [3, 9].

A related theoretical motivation comes from the field of stochastic topology, and specifically from the study of homological connectivity for a random k-fold cover. For k=1, the critical points of dP played a key role in analyzing the last changes in the homology of the random cover Br(P), as r is increased. Taking Pn to be a homogeneous Poisson process on a d-dimensional compact manifold, with rate n, it was proved [4] that passing the threshold r=((logn+(i-1)loglogn)/n)1/d, in the limit as n, the i-th homology of Br(Pn) will remain unchanged if we further increase r. Additionally, a functional Poisson limit was proved [6] for the locations and radii at which the last i-cycles appear. Note that for i=d, this analysis describes the exact moment at which Br(Pn) covers the manifold, and the critical points of index d correspond to the last uncovered connected components. The results presented here will play a similar role in analyzing homological connectivity for the random k-fold cover Br(k)(Pn). In particular, this will enable a detailed theoretical analysis for the k-fold coverage problem discussed above.

We note that the Morse theoretic framework we develop here for dP(k) is tightly related to the study of the order-k Delaunay mosaics [15, 17]. These simplicial complexes, denoted Delk(P), generalize the Delaunay triangulation and are analogously constructed from the order-k Voronoi tessellations [11]. Similarly to the alpha shapes [12], the authors in [15] define a sub-complex Delk(P,r)Delk(P) that has the same homotopy type as the k-fold cover Br(k)(P). Thus, these sub-complexes can serve as a proxy for computing the persistent homology of the k-fold cover filtration. The study in [17] identifies critical configurations in Delk(P), in the sense that once the corresponding cell enters the filtration Delk(P,r), it changes the Euler characteristic, and consequently the homotopy-type. What we provide here is a Morse theoretic view on such critical configurations (‘steps’), showing that they in fact originate from critical points of dP(k). Additionally, we are able to classify them by their index, and to provide a detailed description for the effect these critical configurations have on the homology of Delk(P,r), i.e., beyond the Euler characteristic.

Main Results

We start by briefly reviewing the fundamental statements for Morse theory for the distance function dP (k=1) [5], based on the Morse theory for min-type functions [19]. The assumption (here and throughout the paper) is that the points in P are in general position. In other words, no subset QP of size d+1 lies on a (d-1)-dimensional flat, and no point of P\Q is on the circumsphere of Q.

For a point cRd, denote rc:=dP(c), and Pc:=Brc(c)P (where Br(c) denotes the boundary of the ball). The point cRd is critical for dP if and only if cσ(Pc) (the open simplex spanned by Pc). The index of c in this case is μc:=|Pc|-1. Note that this definition is a special case of the framework developed in [19] for min-type functions. Similarly to classical Morse theory, it follows from [19] that every such critical point of index μc=i either adds a new generator to the i-th homology of Br(P), or eliminates a generator in the (i-1)-th homology.

While the function dP(k) can be defined as a minimum of a finite set of functions, as we show later in (10), dP(k) is not a min-type function (for k>1) since the minimum is over functions that are not smooth. Therefore, we switch to the more general context of piecewise smooth functions and continuous selections, developed in [2]. In the following when we refer to ‘critical points’, we mean the formal characterization detailed in Definition 1 below.

The general definition of critical points for piecewise smooth functions requires some technical background in differential geometry which we postpone to Section 3. Our main result is to show that for the case of dP(k) we can provide a simplified equivalent definition, that is easy to verify in practice. In the following we focus on the case k>1. However, our approach and results apply to the case k=1 as well.

Let cRd, and denote rc:=dP(k)(c). Define

Bc:=Brc(c),Pc:=BcP,PcI:=int(Bc)P,andPc:=BcP, 2

and correspondingly,

Nc:=|Pc|,NcI:=|PcI|,andNc:=|Pc|, 3

so that Pc=PcIPc, and Nc=NcI+Nc. Note that the definition of dP(k) implies that NcIk-1, and since the points are in general position, we have Ncd+1. For examples, see Figure 1.

Fig. 1.

Fig. 1

Critical points of dP(k) in R2, for k=2. The points x1,x2,x3, and y are in P, and the point c represents the critical point. Top left: Pc={x1,x2}, PcI=, and μc=0. This critical point adds a new generator to H0 (new component). Bottom left: Pc={x1,x2}, PcI={y}, and μc=1. This critical point kills a generator in H0 (components merge). Top right: Pc={x1,x2,x3}, PcI=, and μc=1. This critical point kills two generators in H0 (three components merge into one). Bottom right: Pc={x1,x2,x3}, PcI={y}, and μc=2. This critical point kills an existing 1-cycle.

The following theorems are the main contribution of our paper, namely the characterization of critical points and their indexes, and the changes in homology induced by critical points.

Theorem 1

A point cRd is a critical point of dP(k), if and only if cσ(Pc). The index of c is defined as μc:=Nc-k. All critical points of dP(k) are non-degenerate.

Since Ncd+1, and NcIk-1, we have μcd, as expected. Additionally, in the special case μc=d, we have only one option – Nc=d+1, and NcI=k-1. Finally, note that for k=1, the characterization in Theorem 1 coincides with that of the distance function dP discussed above. For examples of critical points of dP(2), see Figure 1.

The next theorem summarizes the effects of critical points on the homology of the k-fold cover Br(k)(P) (1). We consider homology with coefficients in a field F. We will assume from here onwards that dP(k) is a Morse function, in the sense that critical points occur at distinct critical levels. While it is easy to find examples where this is not the case, our motivation is the case where P is random. For random point-sets, the probability to have two critical points with the same critical value is zero.

Theorem 2

Let cRd be a critical point of dP(k) of index μc. Let ϵ>0 such that the interval [rc-ϵ,rc+ϵ] contains a single critical point (namely, c). Denote Br:=Br(k)(P) and Δc:=Nc-1μc. Then for i=μc, we have

Hi(Brc+ϵ)Hi(Brc-ϵ)FΔc+,andHi-1(Brc-ϵ)Hi-1(Brc+ϵ)FΔc-, 4

where Δc+,Δc- are positive integers such that Δc++Δc-=Δc.

If iμc,μc-1, then

Hi(Brc+ϵ)Hi(Brc-ϵ).

Note that the left and right relations in (4) reflect the generation (birth) of cycles in dimension μc, and the elimination (death) of cycles in dimension μc-1, respectively, when passing through the critical value rc. In addition, these results generalize the behavior known in classical Morse theory (and for the distance function dP), where Δc=1. For the highest index (μc=d), we have that Δc=1 in the k-NN distance as well.

Remark 1

While Theorem 2 provides the total number of changes in the homology, it does not indicate the exact values of Δc+ and Δc-, i.e., the number of positive (generation of a cycle) and negative (elimination of a cycle) changes. To obtain these values, additional analysis is required (see Figure 2). This follows from the nature of Morse theory which is local, while the exact changes are associated with global properties of the k-fold cover. One way to identify the exact changes, is via the persistent homology [13, 35] of the k-Delaunay complex [14].

Fig. 2.

Fig. 2

The effect of a critical point on the homology. The point cR2 is a critical point of dP(2) of index μc=1, where P={x1,x2,x3,y1,,y4}. In this case, we have Nc=3, and therefore, Δc=21=2. Indeed, we observe exactly two changes in the homology of the sub-level sets (purple shaded regions), once c is reached. One change is the generation of a new 1-cycle on the right side (the red dashed cycle). Another change is the elimination of the connected component (0-cycle) on the left side

Remark 2

The characterization of critical points via Theorem 1 coincides with the notion of ‘critical steps’ in [17]. Thus, an immediate conclusion is that there is a one-to-one correspondence between critical points of dP(k) and the critical steps in the order-k Delaunay filtration. The approach in [17] was to examine the combinatorial structure of the order-k Delaunay mosaic, and track changes in the Euler characteristic. The Morse-theoretic approach allows us to obtain the detailed description for homology presented in Theorem 2.

Morse theory for piecewise smooth functions

To prove our main results, we build on the Morse theory for piecewise smooth functions developed in [2]. In this section, we briefly review the main statements needed for our arguments. These will be used in Sections 4 and 5 to prove Theorems 1 and 2, respectively. Some of the more technical parts of these proofs, which require a closer familiarity with [2], are intentionally postponed to Section 6 to maintain a smoother flow. For simplicity, we restrict our discussion to Morse theory in Rd.

The definition of critical points in [2] relies on the notion of the Clarke subdifferential [8]. Let f:RdR be Lipschitz near a point x0Rd. The Clarke generalized derivative at x0 in the direction vRd, is defined as

fo(x0;v):=lim supxx0α0α>0f(x+αv)-f(x)α.

The Clarke subdifferential of f at x0, denoted by f(x0), is defined as

f(x0):={ξRd:fo(x0;v)ξ,vforallvRd}.

This Clarke subdifferential allows us to define critical points for locally-Lipschitz functions.

Definition 1

(Definition 1.1 in [2]) Let f:RdR be locally Lipschitz. A point cRd is called critical if 0f(c).

Let f1,,fm:RdR be a collection of continuous functions. A continuous function f:RdR is called a continuous selection of f1,,fm, if for every xRd we have f(x)=fi(x) for some 1im. For every x, define

I(x):={i:xAi},Ai:=cl(int(x:f(x)=fi(x))), 5

where cl(·) and int(·) stand for the closure and interior, respectively. In the case where f1,,fm are all C1, then f is locally Lipschitz, and its Clarke subdifferential is given by

f(x)=convfi(x):iI(x), 6

where conv stands for the convex hull. This representation allows us to define non-degenerate critical points for continuous selections.

For fixed x0Rd and λR|I(x0)|, define

Lλ(x):=iI(x0)λifi(x),andT(x0):=iI(x0)kerfi(x0).

Definition 2

(Definition 2.2 in [2]) A critical point cRd is called non-degenerate if the following conditions hold:

  1. For each iI(c), the set of gradients {fj(c):jI(c)\{i}} is linearly independent,

  2. The Hessian of Lλ at c, denoted Hλ(c), is invertible on T(c) , where λ satisfies
    Lλ(c)=0,iI(c)λi=1,andλi0,foreveryiI(c).

Note that (6) guarantees that λ exists, since 0 can be represented as a convex combination of {fj(c):jI(c)}, and the first condition in Definition 2 guarantees that it is unique. The quadratic index μ~c is defined as the dimension of the maximal linear subspace of T(c) on which Hλ(c) is negative definite.

According to [2] (Theorem 2.3), for every non-degenerate point c, there exists a neighborhood Uc, where f is locally topologically equivalent to a function g:RdR of the form

g(y)=f(c)+(y1,,yq)-j=q+1q+μ~cyj2+j=q+μ~c+1dyj2,y=(y1,,yd)U~0, 7

where q=|I(c)|-1, (y1,,yq) is a continuous selection of {y1,,yq,-j=1qyj}, μ~c is the quadratic index, and U~0 is some neighborhood of 0.

Next, we define

Uc:={xUc:f(x)f(c)},andUc:={xUc:f(x)<f(c)}. 8

The following theorem presents the effect of a critical point c on the relative homology.

Theorem 3

(Theorem 4.2 in [2]) Let f:RdR be locally Lipschitz, and let cRd be a non-degenerate critical point of f. Then,

  1. If c is a local minimum (Uc=), then
    Hi(Uc,Uc)Hi(Uc)Fi=0,0i>0.
  2. If c is not a local minimum (Uc), then
    Hi(Uc,Uc)Hi-1(Uc)i2,Fα-1i=1,0,i=0,

where α is the number of connected components of the set Uc (with F00).

Critical points for the k-NN distance function

In this section we use the framework presented in Section 3, to prove Theorem 1, namely the characterization of the critical points.

To simplify some of the calculations, we will prove Theorem 1 for the squared k-NN distance, denoted δP(k):=(dP(k))2. Any conclusion we make using Morse theory for (δP(k))-1((-,t]) can be immediately translated to an equivalent statement about (dP(k))-1((-,t]). We will therefore consider every critical point of δP(k) as a critical point of dP(k).

Note that to prove Theorem 1 we have to show that the point in question is (a) critical, and (b) non-degenerate. We start with criticality.

Lemma 4

A point cRd is a critical point of δP(k) if and only if cσ(Pc), where Pc was defined in (2).

Proof

Without loss of generality we take c=0. Recall the definition of I(x) in (5), and note that for δP(k) the indexes in the set I(0) correspond to the points in P0. From (6), we have that the Clarke subdifferential of δP(k) at 0 is given by

δP(k)(0)=conv({dp2(0):pP0}).

Since dp2 is the squared distance from p, we have dp2(0)=-2p, and therefore δP(k)(0)=-2σ(P0). Since 0σ(P0) if and only if 0-2σ(P0) (reflected and scaled versions of the same simplex), and using Definition 1, the proof is complete.

Next, we will show that all critical points in Theorem 1 are indeed non-degenerate.

Lemma 5

Let cRd, such that cσ(Pc). Then, c is non-degenerate for δP(k).

Proof

As before, we take c=0. In our setting we have fi=dpi2, and fi(0)=-2pi. Since we assume the points are in general position, the first condition in Definition 2 holds immediately. The Hessian of fi is Hi=2Id×d (the identity matrix). Therefore, Hλ=2Id×d everywhere, and in particular on T(c), implying that the second condition in Definition 2 holds as well.

Remark 3

The proof above shows that the Hessian is always positive definite, and therefore the quadratic index μ~c (see Section 3) in this case is zero.

Proof for Theorem 1

Follows immediately from Lemma 4 and 5.

Critical points and homology

In this section, we study the effect of the critical points of dP(k) on the homology of its sub-level sets Br(k)(P), and prove Theorem 2.

Recall the definition of Uc,Uc in (8). A key observation in the special case of δP(k) is that the homology of Uc is simple to describe.

Lemma 6

Let c be a critical point of δP(k), of index μc, and denote Δc:=Nc-1μc. If μc>1, then

Hi(Uc)Fi=0,FΔci=μc-1,0otherwise.

If μc=1, then

Hi(Uc)FΔc+1i=0,0otherwise.

The proof for Lemma 6 requires more details from [2], and is postponed to Section 6. We use it here to prove the following special case of Theorem 3 to δP(k).

Proposition 7

Let cRd be a critical point of δP(k) of index μc. Then, the following holds.

  1. If μc=0, then c is a local minimum, and
    Hi(Uc,Uc)Fi=0,0i>0.
  2. If μc>0, then
    Hi(Uc,Uc)FΔci=μc,0otherwise.

Proof

When μc=0 we have that |Pc|=k. Additionally, as we prove later in Corollary 9, there is a small neighborhood Uc, such that δP(k)(x)=δPc(k)(x)=maxpPcdp2(x) for all xUc. Note that at c we have δP(k)(c)=rc2=dp2(c), for any pPc. However, since cσ(Pc), for every point xUc there exists pPc such that dp(x)dp(c). Thus, c is a local minimum. The first part of the theorem then follows from the first part of Theorem 3.

For μc>0, c is not a minimum, so we refer to the second part of Theorem 3. If μc>1, then the result follows directly from Lemma 6. For μc=1, from Lemma 6 the number of connected components of Uc is α=Δc+1=Nc, and therefore, the second case in Theorem 3 reduces to Hi(Uc,Uc)FΔc, for i=1, and 0 otherwise.

We can now prove Theorem 2.

Proof of Theorem 2

Define

Br:={xRd:dP(k)(x)r},andBr:={xRd:dP(k)(x)<r}.

Then UcUc\{c}, and BrcBrc\{c}, since the critical values of dP(k) are distinct. By the excision theorem (cf. Theorem 2.20 in [22]), we have

Hi(Brc,Brc)Hi(Uc,Uc). 9

Next, consider the long exact sequence for the relative homology,

Hi+1(Brc,Brc)Hi(Brc)Hi(Brc)Hi(Brc,Brc)

Firstly, consider the case where μc>0. Then for iμc,μc-1, from Proposition 7 we have

0Hi(Brc)Hi(Brc)0,

which implies Hi(Brc)Hi(Brc). In other words, there is no change in the i-th homology of Br when reaching the point c. For i=μc, we have

0Hi(Brc)Hi(Brc)FΔcHi-1(Brc)Hi-1(Brc)0.

Exactness then implies that

Hi(Brc)Hi(Brc)FΔc+,andHi-1(Brc)Hi-1(Brc)FΔc-,

for some Δc+,Δc-0, with Δc++Δc-=Δc.

Next, assume that μc=0. Similarly to the above, for i>0 there is no change in the homology. For i=0 we have

0H0(Brc)H0(Brc)F0.

By exactness, we have H0(Brc)H0(Brc)F.

Finally, note that there exists ϵ>0 such that the interval [rc-ϵ,rc+ϵ] contains exactly one critical value (namely, rc). From Proposition 2.1 in [2], we have that Brc-ϵBrc, and Brc+ϵBrc. This completes the proof.

Additional proof elements

In this section we provide more details required for the proofs in Sections 4 and 5.

Geometric ingredients

To use the framework presented in Section 3, we will show that for every cRd we can find a small enough neighborhood, where dP(k) is a continuous selection of dp:pPc. We say that such a representation is minimal, if each dp in the selection coincides with dP(k) at some point in the neighborhood while all others do not, so no element is redundant.

Lemma 8

Let PRd be a finite set, and let cRd. Then there exists an open ball Uc, centered at c, where dP(k)(x) is a continuous selection of {dp:pPc} , and this representation is minimal.

Proof

Let rin=maxpPcIp-c, and rout=minpP\Pcp-c. Define

ρin=rc-rin2,ρout=rout-rc2,andρ=min{ρin,ρout}.

Let zBρ(c). Then the open ball of radius rc+rin2 centered at z includes Brin(c), and thus all the points in PcI. In addition, this open ball is included in Brc(c), and therefore it excludes the points of P\PcI. Similarly, the open ball of radius rc+rout2 centered at z, includes Pc and excludes the points of P\Pc. Thus, setting Uc=Bρ(c) concludes the first part of the proof.

Next, let pPc and denote p^c=(p-c)/p-c. Let ϵ>0 sufficiently small, and denote z=c+ϵp^cUc. Then, p is necessarily one of the k-nearest neighbors of z, since for all qPc\{p}, we have

q-z2=rc2+ϵ2-2q-c,ϵp^c>rc2+ϵ2-2rcϵ=p-z2.

Thus, the representation of dP(k) as a continuous selection of {dp:pPc} is minimal.

The k-NN distance function is tightly related to the order-k Voronoi tessellation [11, 24]. This is a generalization of the (order-1) Voronoi tessellation, that decomposes Rd into convex regions whose points have the same k-nearest-neighbors. Formally, let XP be a subset of size k. Then the order-k Voronoi cell of X is defined as

Vor(X,P):={yRd:x-yx-y,forallxXandxP\X}.

Alternatively, we can write

Vor(X,P)=xXVor(x,P\X),

where Vor(x,P\X) is a standard Voronoi cell. Note that Vor(X,P) is a convex set, and can also be empty. If Vor(X,P) we say that X is a k-NN subset.

Let P=p1,,pnRd, and denote all the k-NN subsets of P by P1,,PJ. In addition, for any cRd, define Φc={1jJ:cVor(Pj,P)}, and for all jΦc, denote by Nj the set of indices, such that PjPc={pi:iNj}. Using the definitions above, we can write dP(k) as

dP(k)(x)=min1jJmaxpPjdp(x). 10

We can refine this representation, using Lemma 8.

Corollary 9

Let PRd be a finite set, and let cRd. Then there exists a neighborhood Uc where

dP(k)(x)=minjΦcmaxpPjdp(x)=minjΦcmaxiNjdpi(x).

In particular, in Uc, we have dP(k)dPc(k).

Topological ingredients

Our goal here is to provide a refined local description for the squared k-NN distance δP(k):=(dP(k))2, which will lead to the proof of Lemma 6.

Let cRd be a critical point of δP(k). By Lemma 8, there exists a neighborhood UcRd, in which δP(k) is a continuous selection of {dp2:pPc}. Moreover, from (7), and since the quadratic index is 0, it is locally topologically equivalent to

g(y)=δP(k)(c)+(y1,,yNc-1)+j=Ncdyj2,y=(y1,,yd)U~0. 11

Furthermore, the function (y1,,yNc-1) admits a min-max representation as a continuous selection of linear functions [2]. The exact representation is given by the following lemma.

Lemma 10

The min-max representation of (y1,,yNc-1) is given by

(y1,,yNc-1)=minjΦcmaxiNji(y), 12

where i(y) is one of the functions yyl (1lNc-1), or y-l=1Nc-1yl.

Proof

Denote f=δP(k), and assume without loss of generality that c=0. In addition, denote q=Nc-1, H=Rq×{0}d-q, and H={0}q×Rd-q. Recall that P0 all lie on a q-dimensional plane, and assume without loss of generality, that this plane is H.

Let xRd, such that x is sufficiently small. Using Corollary 9, we know that f(x) is determined by one of the functions {dp2:pPc} at 0. We can approximate f(x) based on the second order approximations of dp2 around 0. Namely,

f(x)f(0)+minjΦcmaxiNji(x)+x2, 13

where i(x):=dpi2(0),x, and we used the fact that the Hessian of dp2 is 2Id×d. Let x=x+x, where x,x denote the projections of x to H,H, respectively. Note that since dp2(0)H, for all pPc, we have dp2(0),x=dp2(0),x for all xRd. In other words, the linear terms in (13) depend only on the first q=Nc-1 coordinates of x. Thus, for x, we can assume that the second order term is negligible, while for x the first order term vanishes. Therefore, we have

f(x)f(0)+minjΦcmaxiNji(x)+x2. 14

Finally, since the gradients {dP2(0):pPc} are linearly dependent, we can express Nc(x) as Nc(x)=-i=1Nc-1ηii(x), where ηi:=λi/λNc, where λ=(λ1,,λNc) is defined in Definition 2. Therefore, the form (14) is the same as (11) up to a change of coordinates, and we can identify (y1,,yNc-1) with the min-max term in (14).

Proof of Lemma 6

Based on the min-max representation for δP(k) we obtained in (11) and (12), we can use Theorem 4.1 in [2] to establish the homology of Uc. This theorem makes use of an ‘auxiliary complex’, which we compute below for the special case of δP(k).

Take a critical point cRd and assume without loss of generality that Pc={p1,,pNc}. For (y) in (11), define S={yU~0:(y)<0}. Following (12) we have S=jΦcSj, where Sj:={yU~0:i(y)<0,iNj}. Given this representation, it was shown in Proposition 2.5 in [2] that the following simplicial complex is homotopy equivalent to S. For each Nj we define its complement by N¯j:={1,,Nc}\Nj. The auxiliary complex of c, denoted Kc, is the nerve of the simplexes {N¯j:jΦc}. In fact, for the special case of δP(k), we observe that Kc is just the (μc-1)-dimensional skeleton (recall that μc=Nc-k) of the simplex spanned by {1,,Nc}. Note that the dimension of Kc does not exceed d. See Figure 3 for examples of this auxiliary complex.

Fig. 3.

Fig. 3

The auxiliary complex used in the proof of Lemma 6. Left: In both figures c is a critical point of dP(2), and the purple regions are the 2-fold cover, at radius r that is slightly smaller than rc. Right: The corresponding auxiliary complex Kc (in green). Top: The critical point c is of index μc=1. The sets N1,N2,N3 are equal to {1,2},{1,3},{2,3}, respectively. Thus, the sets N¯1,N¯2,N¯3 that span Kc, are equal to {3},{2},{1}, respectively. Bottom: The critical point c is of index μc=2. The sets N1,N2,N3 are equal to {1},{2},{3}. Thus, the sets N¯1,N¯2,N¯3 that span Kc, are equal to {2,3},{1,3},{1,2}, respectively.

For the case where the quadratic index is zero (as in our case), Theorem 4.1 in [6] states that Hi(Uc)Hi(Kc). Since Kc is the (μc-1)-dimensional skeleton of a (Nc-1)-dimensional simplex, we have the following. Denote Δc:=Nc-1μc. If μc>1,

Hi(Kc)Fi=0,FΔci=μc-1,0otherwise,

If μc=1,

Hi(Kc)FΔc+1i=0,0otherwise.

This completes the proof.

The expected number of critical points

In this section we examine the k-NN distance function for a random point set P. The characterization of critical points in Theorem 1, enables us to count the number of critical points in a given region and with a given index, and to compute its expecation.

A homogeneous Poisson point process in Rd with intensity ν>0, has the following properties:

  1. The number of points in a Borel set ARd has a Poisson distribution with parameter ν|A| (where |·| is the volume).

  2. If A and B are two disjoint Borel sets, then the number of points in A and the number of points in B are independent random variables.

The homogeneous Poisson process is a typical case study in stochastic geometry and topology. It has been shown that various topological quantities are linear in ν (in expectation) [14, 16, 29]. We will show that the critical points for dP(k) are no different.

Theorem 11

Let PνRd be a homogeneous Poisson point process with intensity ν>0. Let k>0, and let 0id. Let ΩRd be a compact subset, and denote by Fi the number of critical points of dPν(k), with index μc=i, lying in Ω. Then,

E{Fi}=Dk,iν,

where Dk,i is a constant that depends on k, i, and Ω.

To prove the above theorem, we follow the configurations of points in Pν that generate critical points for the k-NN distance function dPν(k).

Let PRd be a finite set in general position, of size n>d. Each critical point of dP(k) is associated with a critical configuration of points of P, as follows. Let XP of size l+1, where 1ld, and denote by S(X) the unique (l-1)-dimensional minimal circumsphere of X. In addition, denote

c(X):=thecenterofS(X),ρ(X):=theradiusofS(X),B(X):=thed-dimensionalballcenteredatc(X)withradiusρ(X),I(X,P):=int(B(X))P,μ(X,P):=|X|+|I(X,P)|-k

From Theorem 1 we have that c=c(X) is a critical point of dP(k) of index μc:=μ(X,P), if and only if

cσ(X),and0μcd.

Lemma 12

Let PνRd be a homogeneous Poisson point process with intensity ν>0. Let 1id, and j0. Let ΩRd be a compact subset, and denote by Fi,j the number of subsets XPν of size |X|=i+1, such that c(X)Ω, and |I(X,P)|=j. Then,

E{Fi,j}=Dd(i,j)ν,

where Dd(i,j) is a constant that depends on d, i, j, and Ω.

Proof

Fix 1id, and j0. For finite subsets XPRd, with |X|=i+1, define

hσ(X):=1{c(X)σ(X)},hI(X,P)=1{|I(X,P)|=j},

and

g(X,P):=hσ(X)hI(X,P)1{c(X)Ω}.

Using these notations, we can express Fi,j as

Fi,j=XPν|X|=i+1g(X,Pν).

Taking the expectation, and applying the Slivnyak-Mecke formula (see Corollary 3.2.3 in [30]), yields

E{Fi,j}=νi+1(i+1)!(Rd)i+1E{g(x,Pνx)}dx, 15

where abusing notation we treat x as both an ordered tuple and a set. For a fixed x we have

E{g(x,Pνx)}=νωdρ(x)djj!e-νωdρ(x)dhσ(x)1{c(x)Ω},

where ωd denotes the volume of a unit ball in Rd. Next, we use generalized spherical coordinates (a Blaschke-Petkantschin formula [25]), that will be explored in Appendix A. Assuming the points in x are in general position (which is true almost surely), they lie on a unique i-dimensional linear space, denoted Π(x) (that includes c(x)). Recall that the points of x lie on a (i-1)-dimensional sphere centered at c(x) of radius ρ(x). We will denote θ(x)Si-1 the spherical coordinates of x on this sphere. We are interested in the bijective transformation x(c,ρ,Π,θ).

Turning back to the integral in (15), and applying Lemma 13, we have

(Rd)i+1E{g(x,Pνx)}dx=Dbp(i)0(Si-1)i+1ρdi-1νωdρdjj!e-νωdρdhσ(θ)(Vsimp(θ))d-i+1dθdρ=Cd(i,j)νj0ρd(i+j)-1e-νωdρddρ,

where Vsimp(θ) stands for the i-dimensional volume of the simplex spanned by θ, and

Cd(i,j):=Dbp(i)ωdjj!(Si-l)i+1hσ(θ)(Vsimp(θ))d-i+1dθ.

Taking the change of variable t=νωdρd, yields

(Rd)i+1E{g(x,Pνx)}dx=C~d(i,j)ν-i0ti+j-1e-tdt=C~d(i,j)ν-i(i+j-1)!

where C~d(i,j):=Cd(i,j)dωdi+j. Going back to (15), we have

E{Fi,j}=Dd(i,j)ν,

where Dd(i,j):=C~d(i,j)(i+j-1)!(l+1)!, concluding the proof.

Proof of Theorem 11

Recall from Theorem 1 that μ(X,P)=|X|+|I(X,P)|-k is the index of the generated critical point. In addition, 2|X|d+1, and 0|I(X,P)|k-1. The last three terms, limit the possible values |X| can take, namely

max{2,μ(X,P)+1}|X|min{d+1,μ(X,P)+k},

and |I(X,P)|=μ(X,P)+k-|X|. Thus, the number of critical points of index μ(X,P)=i0, is given by

Fi=i=I1I2Fi,j,

where I1:=max{1,i}, I2:=min{d,i+k-1}, and j=i+k-i-1. By taking the expected value and applying Lemma 12, we have

E{Fi}=i=I1I2E{Fi,j}=νi=I1I2Dd(i,j).

Setting Dk,i:=i=I12Dd(i,j) concludes the proof.

Discussion

In this paper we studied the k-NN distance function dP(k). We showed that using the Morse theory for piecewise smooth functions we can derive simple combinatorial-geometric characterization for critical points and their indices. In addition, we showed the effect of such critical points on the homology of the sub-level sets. We observe that the behavior of dP(k) is similar to classical Morse theory, in the sense that if the index is μc the homology affected is only in dimensions μc (positively) and μc-1 (negatively). However, in contrast to classical Morse theory, at each critical level there can be several simultaneous changes to homology. Our results provide new means to analyze the homology and persistent homology of the k-degree Delaunay mosaics. In addition, they will be instrumental for the analysis of random k-fold coverage and its homology. Specifically, counting critical faces, as we present in Theorem 11, will allow us to draw conclusions about the homology of the random k-fold coverage objects, in different regimes. This remains future work.

Acknowledgements

The authors are grateful to Primoz Skraba, for his feedback and advice. We would also like to thank the anonymous referees for their useful comments and suggestions. YR was partially supported by the Israel Science Foundation, Grant 2539/17. OB was partially supported by the Israel Science Foundation grant 1965/19, by the EPSRC grants EP/Y008642/1, and EP/Y028872/1, and by the Leverhulme Trust grant RPG-2023-144. Part of this work was done while OB was at the Technion – Israel Institute of Technology.

Blaschke–Petkantschin-type formula

The following lemma (cf. Eq. (11) in [16], and Lemma C.1 in [4]), introduces a change of variables from Euclidean into spherical coordinates. This transformation is essential to our analysis of random points, since it allows us to view every subset by the potential critical point it generates. For further details, see [4, 16].

Let x=(x1,,xi+1)(Rd)i+1, and consider the following mapping x(c,ρ,Π,θ) defined in the proof of Lemma 12. Next, let f:(Rd)i+1R be affine invariant. This implies that

f(x)=f(c+ρθ(Π))=f(ρθ(Π0)):=f(ρθ), 1

where Π0 is the canonical embedding of Ri in Rd as Ri×{0}d-i.

Lemma 13

Let f:(Rd)i+1R be a measurable bounded function satisfying (1), and let ΩRd be a compact subset. Then,

(Rd)i+1f(x)1{c(x)Ω}dx=Dbp(i)0(Si-1)i+1ρdi-1f(ρθ)(Vsimp(θ))d-i+1dθdρ,

where Vsimp(θ) is the volume of the i-simplex spanned by θ, Dbp(i)=|Ω|Γd,i(i!)d-i+1, and Γd,i is the volume of the Grassmannian Gr(d,i).

Funding

Open access funding provided by Technion - Israel Institute of Technology.

Data Availability

This research has no associated data.

Footnotes

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

References

  • 1.Agarwal, S., Lim, J., Zelnik-Manor, L., Perona, P., Kriegman, D., Belongie, S.: Beyond pairwise clustering. In: 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’05), 2, 838–8452 (2005)
  • 2.Agrachev, A., Pallaschke, D., Scholtes, S.: On morse theory for piecewise smooth functions. J. Dyn. Control Syst. 3(4), 449–469 (1997) [Google Scholar]
  • 3.Athreya, S., Roy, R., Sarkar, A.: On the coverage of space by random sets. Adv. Appl. Probab. 36(1), 1–18 (2004) [Google Scholar]
  • 4.Bobrowski, O.: Homological connectivity in random Čech complexes. Probab. Theory Relat. Fields 183(3–4), 715–788 (2022)
  • 5.Bobrowski, O., Adler, R.J.: Distance functions, critical points, and the topology of random Čech complexes. Homol. Homotopy Appl. 16(2), 311–344 (2014) [Google Scholar]
  • 6.Bobrowski, O., Schulte, M., Yogeshwaran, D.: Poisson process approximation under stabilization and palm coupling. Ann. Henri Lebesgue 5, 1489–1534 (2022) [Google Scholar]
  • 7.Chiu, S.N., Stoyan, D., Kendall, W.S., Mecke, J.: Stochastic Geometry and its Applications. John Wiley & Sons (2013)
  • 8.Clarke, F.H.: Generalized gradients and applications. Trans. Am. Math. Soc. 205, 247–262 (1975) [Google Scholar]
  • 9.Cuevas, A., Rodríguez-Casal, A.: On boundary estimation. Adv. Appl. Probab. 36, 340–354 (2004) [Google Scholar]
  • 10.Dudani, S.A.: The distance-weighted k-nearest-neighbor rule. IEEE Trans. Syst. Man Cybern. 4, 325–327 (1976) [Google Scholar]
  • 11.Edelsbrunner, H., Seidel, R.: Voronoi diagrams and arrangements. In: Proceedings of the First Annual Symposium on Computational Geometry, pp. 251–262 (1985)
  • 12.Edelsbrunner, H.: Alpha shapes-a survey. In: Tessellations in the Sciences: Virtues, Techniques and Applications of Geometric Tilings, (2011)
  • 13.Edelsbrunner, H., Harer, J., et al.: Persistent homology-a survey. Contemp. Math. 453(26), 257–282 (2008) [Google Scholar]
  • 14.Edelsbrunner, H., Nikitenko, A.: Poisson-Delaunay mosaics of order k. Discret. Comput. Geom. 62, 865–878 (2019) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Edelsbrunner, H., Osang, G.: The multi-cover persistence of Euclidean balls. Discret. Comput. Geom. 65, 1296–1313 (2021) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Edelsbrunner, H., Nikitenko, A., Reitzner, M.: Expected sizes of Poisson-Delaunay mosaics and their discrete Morse functions. Adv. Appl. Probab. 49(3), 745–767 (2017) [Google Scholar]
  • 17.Edelsbrunner, H., Nikitenko, A., Osang, G.: A step in the Delaunay mosaic of order k. J. Geom. 112, 1–14 (2021) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Flatto, L., Newman, D.J.: Random coverings. Acta Math. 138(1), 241–264 (1977) [Google Scholar]
  • 19.Gershkovich, V., Rubinstein, H.: Morse theory for Min-type functions. Asian J. Math. 1(4), 696–715 (1997) [Google Scholar]
  • 20.Haenggi, M., Andrews, J.G., Baccelli, F., Dousse, O., Franceschetti, M.: Stochastic geometry and random graphs for the analysis and design of wireless networks. IEEE J. Sel. Areas Commun. 27(7), 1029–1046 (2009) [Google Scholar]
  • 21.Hall, P.: On the coverage of k-dimensional space by k-dimensional spheres. Ann. Probab. 13(3), 991–1002 (1985) [Google Scholar]
  • 22.Hatcher, A.: Algebraic Topology. Cambridge University Press, Cambridge (2002) [Google Scholar]
  • 23.Janson, S.: Random coverings in several dimensions. Acta Math. 156(1), 83–118 (1986) [Google Scholar]
  • 24.Lee, D.-T.: On k-nearest neighbor voronoi diagrams in the plane. IEEE Trans. Comput. 100(6), 478–487 (1982) [Google Scholar]
  • 25.Miles, R.E.: Isotropic random simplices. Adv. Appl. Probab. 3(2), 353–382 (1971) [Google Scholar]
  • 26.Milnor, J.W.: Morse Theory, vol. 51. Princeton University Press, Princeton, New Jersey (1963) [Google Scholar]
  • 27.Moran, P.A., St Groth, S.F.: Random circles on a sphere. Biometrika, 389–396 (1962)
  • 28.Penrose, M.D.: Random Euclidean coverage from within. Probab. Theory Relat. Fields 185(3–4), 747–814 (2023) [Google Scholar]
  • 29.Reani, Y., Bobrowski, O.: A coupled alpha complex. J. Comput. Geom. 14(1), 221–256 (2023) [Google Scholar]
  • 30.Schneider, R., Weil, W.: Stochastic and Integral Geometry. Springer, Berlin, Heidelberg (2008) [Google Scholar]
  • 31.Shamos, M.I., Hoey, D.: Closest-point problems. In: 16th Annual Symposium on Foundations of Computer Science (sfcs 1975), 151–162 (1975). IEEE
  • 32.Sheehy, D.R.: A multicover nerve for geometric inference. In: CCCG, pp. 309–314 (2012)
  • 33.Wang, B.: Coverage problems in sensor networks: A survey. ACM Comput. Surv. (CSUR) 43(4), 1–53 (2011) [Google Scholar]
  • 34.Zhigljavsky, A., Zilinskas, A.: Stoch. Glob. Optim., vol. 9. Springer, New York, NY (2007) [Google Scholar]
  • 35.Zomorodian, A., Carlsson, G.: Computing persistent homology. Discret. Comput. Geom. 33(2), 249–274 (2004) [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

This research has no associated data.


Articles from Discrete & Computational Geometry are provided here courtesy of Springer

RESOURCES