Metric 111-median selection: Query complexity vs. approximation ratio

Ching-Lueh Chang 111Department of Computer Science and Engineering, Yuan Ze University, Taoyuan, Taiwan. Email: clchang@saturn.yzu.edu.tw 222Innovation Center for Big Data and Digital Convergence, Yuan Ze University, Taoyuan, Taiwan.
Abstract

Consider the problem of finding a point in a metric space ({1,2,…,n},d)12…𝑛𝑑(\{1,2,\ldots,n\},d) with the minimum average distance to other points. We show that this problem has no deterministic o​(n1+1/(hβˆ’1))π‘œsuperscript𝑛11β„Ž1o(n^{1+1/(h-1)})-query (2​hβˆ’Ξ©β€‹(1))2β„ŽΞ©1(2h-\Omega(1))-approximation algorithms for any constant hβˆˆβ„€+βˆ–{1}β„Žsuperscriptβ„€1h\in\mathbb{Z}^{+}\setminus\{1\}.

1 Introduction

The metric 111-median problem asks for a point in an n𝑛n-point metric space with the minimum average distance to other points. It has a Monte-Carlo O​(n/Ο΅2)𝑂𝑛superscriptitalic-Ο΅2O(n/\epsilon^{2})-time (1+Ο΅)1italic-Ο΅(1+\epsilon)-approximation algorithm for all Ο΅>0italic-Ο΅0\epsilon>0 [6, 7]. In ℝDsuperscriptℝ𝐷\mathbb{R}^{D}, Kumar et al. [8] give a Monte-Carlo O​(2poly​(1/Ο΅)​D)𝑂superscript2poly1italic-ϡ𝐷O(2^{\text{poly}(1/\epsilon)}D)-time (1+Ο΅)1italic-Ο΅(1+\epsilon)-approximation algorithm for 111-median selection and another algorithm for kπ‘˜k-median selection, where Dβ‰₯1𝐷1D\geq 1 and Ο΅>0italic-Ο΅0\epsilon>0. Guha et al. [5] give streaming approximation algorithms for kπ‘˜k-median selection in metric spaces.

Chang [3], Wu [11] and Chang [1] show that metric 111-median has a deterministic nonadaptive O​(n1+1/h)𝑂superscript𝑛11β„ŽO(n^{1+1/h})-time (2​h)2β„Ž(2h)-approximation algorithm for all constants hβˆˆβ„€+βˆ–{1}β„Žsuperscriptβ„€1h\in\mathbb{Z}^{+}\setminus\{1\}. Furthermore, Chang [4] shows the nonexistence of deterministic o​(n2)π‘œsuperscript𝑛2o(n^{2})-time (4βˆ’Ξ©β€‹(1))4Ξ©1(4-\Omega(1))-approximation algorithms for metric 111-median. This paper generalizes his result to show that metric 111-median has no deterministic o​(n1+1/(hβˆ’1))π‘œsuperscript𝑛11β„Ž1o(n^{1+1/(h-1)})-query (2​hβˆ’Ξ©β€‹(1))2β„ŽΞ©1(2h-\Omega(1))-approximation algorithms for any constant hβˆˆβ„€+βˆ–{1}β„Žsuperscriptβ„€1h\in\mathbb{Z}^{+}\setminus\{1\}. Combining our result with an existing upper bound [11, 1],

min⁑{cβ‰₯1∣metric 1-median has a deterministic O​(n1+Ο΅)-query c-approx. alg.}𝑐conditional1metric 1-median has a deterministic O(n1+Ο΅)-query c-approx. alg.\displaystyle\min\left\{c\geq 1\mid\text{{\sc metric $1$-median} has a deterministic $O(n^{1+\epsilon})$-query $c$-approx.\ alg.}\right\}
=\displaystyle=min⁑{cβ‰₯1∣metric 1-median has a deterministic O​(n1+Ο΅)-time c-approx. alg.}𝑐conditional1metric 1-median has a deterministic O(n1+Ο΅)-time c-approx. alg.\displaystyle\min\left\{c\geq 1\mid\text{{\sc metric $1$-median} has a deterministic $O(n^{1+\epsilon})$-time $c$-approx. alg.}\right\}
=\displaystyle=2β€‹βŒˆ1Ο΅βŒ‰21italic-Ο΅\displaystyle 2\left\lceil\frac{1}{\epsilon}\right\rceil

for all constants ϡ∈(0,1)italic-Ο΅01\epsilon\in(0,1). That is, we determine the best approximation ratio of deterministic O​(n1+Ο΅)𝑂superscript𝑛1italic-Ο΅O(n^{1+\epsilon})-query (resp., O​(n1+Ο΅)𝑂superscript𝑛1italic-Ο΅O(n^{1+\epsilon})-time) algorithms for all ϡ∈(0,1)italic-Ο΅01\epsilon\in(0,1).

As in the previous lower bounds for deterministic algorithms [4, 2], we use an adversarial method. Roughly speaking, our proof proceeds as follows:

  1. (i)

    Design an adversary Adv for answering the distance queries of any deterministic algorithm A𝐴A with query complexity q​(n)=o​(n1+1/(hβˆ’1))π‘žπ‘›π‘œsuperscript𝑛11β„Ž1q(n)=o(n^{1+1/(h-1)}).

  2. (ii)

    Show that A𝐴A’s output has a large average distance to other points, according to Adv’s answers to A𝐴A.

  3. (iii)

    Construct a distance function with respect to which a certain point Ξ±^^𝛼\hat{\alpha} has a small average distance to other points.

  4. (iv)

    Construct the final distance function d​(β‹…,β‹…)𝑑⋅⋅d(\cdot,\cdot) similar to that in item (iii).

  5. (v)

    Show that d𝑑d is a metric.

  6. (vi)

    Show the consistency of d​(β‹…,β‹…)𝑑⋅⋅d(\cdot,\cdot) with Adv’s answers.

  7. (vii)

    Compare Ξ±^^𝛼\hat{\alpha} in item (iii) with A𝐴A’s output to establish our lower bound on A𝐴A’s approximation ratio.

Central to our constructions are two graph sequences, {H(i)}i=0q​(n)superscriptsubscriptsuperscript𝐻𝑖𝑖0π‘žπ‘›\{H^{(i)}\}_{i=0}^{q(n)} and {G(i)}i=0q​(n)superscriptsubscriptsuperscript𝐺𝑖𝑖0π‘žπ‘›\{G^{(i)}\}_{i=0}^{q(n)} in Sec. 3, that are unseen in previous lower bounds [9, 2, 4]. Like in [4], we need a small set S𝑆S of points whose distances to other points are answered as large values during A𝐴A’s execution, and yet we assign a small value to the distances from a certain point Ξ±^∈S^𝛼𝑆\hat{\alpha}\in S to many other points in item (iii).

This paper is organized as follows. Sec. 2 introduces the terminologies. Sec. 3 proves our main theorem that metric 111-median has no deterministic o​(n1+1/(hβˆ’1))π‘œsuperscript𝑛11β„Ž1o(n^{1+1/(h-1)})-query (2​hβˆ’Ξ©β€‹(1))2β„ŽΞ©1(2h-\Omega(1))-approximation algorithms for any constant hβˆˆβ„€+βˆ–{1}β„Žsuperscriptβ„€1h\in\mathbb{Z}^{+}\setminus\{1\}. In particular, Secs. 3.13.23.3 and 3.4 correspond to items (ii), (iii), (iv)–(vi) and (vii) above, respectively.

2 Definitions

A finite metric space (M,d)𝑀𝑑(M,d) is a finite set M𝑀M endowed with a function d:M2β†’[0,∞):𝑑→superscript𝑀20d\colon M^{2}\to[0,\infty) such that

  • β€’

    d​(x,x)=0𝑑π‘₯π‘₯0d(x,x)=0,

  • β€’

    d​(x,y)>0𝑑π‘₯𝑦0d(x,y)>0 if xβ‰ yπ‘₯𝑦x\neq y,

  • β€’

    d​(x,y)=d​(y,x)𝑑π‘₯𝑦𝑑𝑦π‘₯d(x,y)=d(y,x), and

  • β€’

    d​(x,y)+d​(y,z)β‰₯d​(x,z)𝑑π‘₯𝑦𝑑𝑦𝑧𝑑π‘₯𝑧d(x,y)+d(y,z)\geq d(x,z)

for all xπ‘₯x, y𝑦y, z∈M𝑧𝑀z\in M [10]. For all cβ‰₯1𝑐1c\geq 1, a point z∈M𝑧𝑀z\in M is said to be a c𝑐c-approximate 111-median of (M,d)𝑀𝑑(M,d) if

βˆ‘x∈Md​(z,x)≀cβ‹…βˆ‘x∈Md​(y,x)subscriptπ‘₯𝑀𝑑𝑧π‘₯⋅𝑐subscriptπ‘₯𝑀𝑑𝑦π‘₯\sum_{x\in M}\,d\left(z,x\right)\leq c\cdot\sum_{x\in M}\,d\left(y,x\right)

for all y∈M𝑦𝑀y\in M. For convenience, [n]=def.{1,2,…,n}superscriptdef.delimited-[]𝑛12…𝑛[n]\stackrel{{\scriptstyle\text{def.}}}{{=}}\{1,2,\ldots,n\}.

For deterministic algorithms A𝐴A and π’ͺ:{1,2,…,n}2→ℝ:π’ͺβ†’superscript12…𝑛2ℝ{\cal O}\colon\{1,2,\ldots,n\}^{2}\to\mathbb{R}, denote by Aπ’ͺ​(1n)superscript𝐴π’ͺsuperscript1𝑛A^{\cal O}(1^{n}) the execution of A𝐴A with oracle access to π’ͺπ’ͺ\cal O and with input 1nsuperscript1𝑛1^{n}, where nβˆˆβ„•π‘›β„•n\in\mathbb{N}. As the input to A𝐴A will be 1nsuperscript1𝑛1^{n} throughout this paper, abbreviate Aπ’ͺ​(1n)superscript𝐴π’ͺsuperscript1𝑛A^{\cal O}(1^{n}) as Aπ’ͺsuperscript𝐴π’ͺA^{\cal O}. If Adsuperscript𝐴𝑑A^{d} outputs a c𝑐c-approximate 111-median of ([n],d)delimited-[]𝑛𝑑([n],d) for each finite metric space ([n],d)delimited-[]𝑛𝑑([n],d), then A𝐴A is said to be c𝑐c-approximate for metric 111-median, where cβ‰₯1𝑐1c\geq 1.

Fact 1 ([3, 1, 11]).

For each constant hβˆˆβ„€+βˆ–{1}β„Žsuperscriptβ„€1h\in\mathbb{Z}^{+}\setminus\{1\}, metric 111-median has a deterministic nonadaptive O​(n1+1/h)𝑂superscript𝑛11β„ŽO(n^{1+1/h})-time (2​h)2β„Ž(2h)-approximation algorithm.

A weighted undirected graph G=(V,E,w)𝐺𝑉𝐸𝑀G=(V,E,w) has a finite vertex set V𝑉V, an edge set E𝐸E and a weight function w:Eβ†’(0,∞):𝑀→𝐸0w\colon E\to(0,\infty), where each edge is an unordered pair of distinct vertices in V𝑉V. If w:Yβ†’(0,∞):π‘€β†’π‘Œ0w\colon Y\to(0,\infty) for a superset Yπ‘ŒY of E𝐸E, interpret (V,E,w)𝑉𝐸𝑀(V,E,w) simply as (V,E,w|E)𝑉𝐸evaluated-at𝑀𝐸(V,E,w|_{E}), where w|Eevaluated-at𝑀𝐸w|_{E} denotes the restriction of w𝑀w on E𝐸E. For all v∈V𝑣𝑉v\in V, let

NG​(v)=def.{u∈V∣(u,v)∈E}superscriptdef.subscript𝑁𝐺𝑣conditional-set𝑒𝑉𝑒𝑣𝐸N_{G}(v)\stackrel{{\scriptstyle\text{def.}}}{{=}}\left\{u\in V\mid(u,v)\in E\right\}

and degG​(v)=def.|NG​(v)|superscriptdef.subscriptdeg𝐺𝑣subscript𝑁𝐺𝑣\text{\rm deg}_{G}(v)\stackrel{{\scriptstyle\text{def.}}}{{=}}|N_{G}(v)|. For all SβŠ†V𝑆𝑉S\subseteq V, NG​(S)=def.⋃v∈SNG​(v)superscriptdef.subscript𝑁𝐺𝑆subscript𝑣𝑆subscript𝑁𝐺𝑣N_{G}(S)\stackrel{{\scriptstyle\text{def.}}}{{=}}\bigcup_{v\in S}\,N_{G}(v). For all s𝑠s, t∈V𝑑𝑉t\in V, an s𝑠s-t𝑑t path P𝑃P in G𝐺G is a sequence {vi∈V}i=0ksuperscriptsubscriptsubscript𝑣𝑖𝑉𝑖0π‘˜\{v_{i}\in V\}_{i=0}^{k} satisfying kβˆˆβ„•π‘˜β„•k\in\mathbb{N}, v0=ssubscript𝑣0𝑠v_{0}=s, vk=tsubscriptπ‘£π‘˜π‘‘v_{k}=t and (vi,vi+1)∈Esubscript𝑣𝑖subscript𝑣𝑖1𝐸(v_{i},v_{i+1})\in E for all i∈{0,1,…,kβˆ’1}𝑖01β€¦π‘˜1i\in\{0,1,\ldots,k-1\}. Its weight (or length) is w​(P)=def.βˆ‘i=0kβˆ’1w​(vi,vi+1)superscriptdef.𝑀𝑃superscriptsubscript𝑖0π‘˜1𝑀subscript𝑣𝑖subscript𝑣𝑖1w(P)\stackrel{{\scriptstyle\text{def.}}}{{=}}\sum_{i=0}^{k-1}\,w(v_{i},v_{i+1}).333w​(P)𝑀𝑃w(P) is a common and convenient abuse of notation. The shortest s𝑠s-t𝑑t distance in G𝐺G is

dG​(s,t)=inf{w​(P)∣P is an s-t path in G},subscript𝑑𝐺𝑠𝑑infimumconditional-set𝑀𝑃P is an s-t path in Gd_{G}(s,t)=\inf\left\{w(P)\mid\text{$P$ is an $s$-$t$ path in $G$}\right\},

where s𝑠s, t∈V𝑑𝑉t\in V. So dG​(s,t)=∞subscript𝑑𝐺𝑠𝑑d_{G}(s,t)=\infty if G𝐺G has no s𝑠s-t𝑑t paths. Note that we allow only positive weights, i.e., Im(w)βŠ†(0,∞)Im𝑀0\mathop{\mathrm{Im}}(w)\subseteq(0,\infty). So a shortest s𝑠s-t𝑑t path must be simple, i.e., it does not repeat vertices. If w≑1𝑀1w\equiv 1, abbreviate (V,E,w)𝑉𝐸𝑀(V,E,w) as (V,E)𝑉𝐸(V,E) and call it an unweighted graph.

The following fact is well-known.

Fact 2.

For each undirected graph G=(V,E)𝐺𝑉𝐸G=(V,E),

βˆ‘v∈VdegG​(v)=2β‹…|E|.subscript𝑣𝑉subscriptdeg𝐺𝑣⋅2𝐸\sum_{v\in V}\,\text{\rm deg}_{G}(v)=2\cdot|E|.

For a predicate P𝑃P, let χ​[P]=1πœ’delimited-[]𝑃1\chi[P]=1 if P𝑃P is true and χ​[P]=0πœ’delimited-[]𝑃0\chi[P]=0 otherwise. The following fact about geometric series is not hard to see.

Fact 3.

For all rβ‰₯2π‘Ÿ2r\geq 2 and mβˆˆβ„•π‘šβ„•m\in\mathbb{N},

βˆ‘k=0mrk≀2​rm.superscriptsubscriptπ‘˜0π‘šsuperscriptπ‘Ÿπ‘˜2superscriptπ‘Ÿπ‘š\sum_{k=0}^{m}\,r^{k}\leq 2r^{m}.

3 Query complexity vs. approximation ratio

Throughout this section,

  • β€’

    nβˆˆβ„€+𝑛superscriptβ„€n\in\mathbb{Z}^{+},

  • β€’

    δ∈(0,1)𝛿01\delta\in(0,1) and hβˆˆβ„€+βˆ–{1}β„Žsuperscriptβ„€1h\in\mathbb{Z}^{+}\setminus\{1\} are constants (i.e., they are independent of n𝑛n),

  • β€’

    A𝐴A is a deterministic o​(n1+1/(hβˆ’1))π‘œsuperscript𝑛11β„Ž1o(n^{1+1/(h-1)})-query algorithm for metric 111-median, and

  • β€’

    S=[βŒŠΞ΄β€‹nβŒ‹]βŠ†[n]𝑆delimited-[]𝛿𝑛delimited-[]𝑛S=[\lfloor\delta n\rfloor]\subseteq[n].

All pairs in [n]2superscriptdelimited-[]𝑛2[n]^{2} are assumed to be unordered in this section. So, e.g., (1,2)∈{2}Γ—[n]122delimited-[]𝑛(1,2)\in\{2\}\times[n]. By padding at most nβˆ’1𝑛1n-1 dummy queries, assume without loss of generality that A𝐴A will have queried for the distances between its output and all other points when halting. Denote A𝐴A’s query complexity by

q​(n)=o​(n1+1/(hβˆ’1)).π‘žπ‘›π‘œsuperscript𝑛11β„Ž1q(n)=o\left(n^{1+1/(h-1)}\right).

Without loss of generality, forbid making the same query twice or querying for the distance from a point to itself, where the queries for d​(x,y)𝑑π‘₯𝑦d(x,y) and d​(y,x)𝑑𝑦π‘₯d(y,x) are considered to be the same for xπ‘₯x, y∈[n]𝑦delimited-[]𝑛y\in[n]. Furthermore, let n𝑛n be sufficiently large to satisfy

q​(n)π‘žπ‘›\displaystyle q(n)≀\displaystyle\leqδ​n1+1/(hβˆ’1),𝛿superscript𝑛11β„Ž1\displaystyle\delta n^{1+1/(h-1)},(1)
δ​n1/(hβˆ’1)𝛿superscript𝑛1β„Ž1\displaystyle\delta n^{1/(h-1)}>\displaystyle>3,3\displaystyle 3,(2)
2​q​(n)|S|βˆ’12π‘žπ‘›π‘†1\displaystyle\frac{2q(n)}{|S|-1}≀\displaystyle\leqδ​n1/(hβˆ’1).𝛿superscript𝑛1β„Ž1\displaystyle\delta n^{1/(h-1)}.(3)

Define two unweighted undirected graphs G(0)superscript𝐺0G^{(0)} and H(0)superscript𝐻0H^{(0)} by

EG(0)superscriptsubscript𝐸𝐺0\displaystyle E_{G}^{(0)}=def.superscriptdef.\displaystyle\stackrel{{\scriptstyle\text{def.}}}{{=}}{(u,v)∣(u,v∈[n]βˆ–S)∧(uβ‰ v)},conditional-set𝑒𝑣𝑒𝑣delimited-[]𝑛𝑆𝑒𝑣\displaystyle\left\{\left(u,v\right)\mid\left(u,v\in[n]\setminus S\right)\land\left(u\neq v\right)\right\},(4)
G(0)superscript𝐺0\displaystyle G^{(0)}=def.superscriptdef.\displaystyle\stackrel{{\scriptstyle\text{def.}}}{{=}}([n],EG(0)),delimited-[]𝑛superscriptsubscript𝐸𝐺0\displaystyle\left([n],E_{G}^{(0)}\right),(5)
EH(0)superscriptsubscript𝐸𝐻0\displaystyle E_{H}^{(0)}=def.superscriptdef.\displaystyle\stackrel{{\scriptstyle\text{def.}}}{{=}}βˆ…,\displaystyle\emptyset,(6)
H(0)superscript𝐻0\displaystyle H^{(0)}=def.superscriptdef.\displaystyle\stackrel{{\scriptstyle\text{def.}}}{{=}}([n],EH(0)).delimited-[]𝑛superscriptsubscript𝐸𝐻0\displaystyle\left([n],E_{H}^{(0)}\right).(7)
1:  Let EG(0)superscriptsubscript𝐸𝐺0E_{G}^{(0)}, G(0)superscript𝐺0G^{(0)}, EH(0)superscriptsubscript𝐸𝐻0E_{H}^{(0)} and H(0)superscript𝐻0H^{(0)} be as in equations (4)–(7);
2:  for i=1𝑖1i=1, 222, ……\ldots, q​(n)π‘žπ‘›q(n) do
3:     Receive the i𝑖ith query of A𝐴A, denoted (ai,bi)subscriptπ‘Žπ‘–subscript𝑏𝑖(a_{i},b_{i});
4:     if dG(iβˆ’1)​(ai,bi)≀hsubscript𝑑superscript𝐺𝑖1subscriptπ‘Žπ‘–subscriptπ‘π‘–β„Žd_{G^{(i-1)}}(a_{i},b_{i})\leq h then
5:        Find a shortest aisubscriptπ‘Žπ‘–a_{i}-bisubscript𝑏𝑖b_{i} path Pisubscript𝑃𝑖P_{i} in G(iβˆ’1)superscript𝐺𝑖1G^{(i-1)};
6:        EH(i)←EH(iβˆ’1)βˆͺ{e∣e is an edge on Pi}←superscriptsubscript𝐸𝐻𝑖superscriptsubscript𝐸𝐻𝑖1conditional-set𝑒e is an edge on PiE_{H}^{(i)}\leftarrow E_{H}^{(i-1)}\cup\{e\mid\text{$e$ is an edge on $P_{i}$}\};
7:        H(i)←([n],EH(i))←superscript𝐻𝑖delimited-[]𝑛superscriptsubscript𝐸𝐻𝑖H^{(i)}\leftarrow([n],E_{H}^{(i)});
8:        EG(i)←EG(iβˆ’1)βˆ–{(u,v)∈EG(iβˆ’1)βˆ–EH(i)∣(degH(i)​(u)β‰₯δ​n1/(hβˆ’1)βˆ’2)∨(degH(i)​(v)β‰₯δ​n1/(hβˆ’1)βˆ’2)}←superscriptsubscript𝐸𝐺𝑖superscriptsubscript𝐸𝐺𝑖1conditional-set𝑒𝑣superscriptsubscript𝐸𝐺𝑖1superscriptsubscript𝐸𝐻𝑖subscriptdegsuperscript𝐻𝑖𝑒𝛿superscript𝑛1β„Ž12subscriptdegsuperscript𝐻𝑖𝑣𝛿superscript𝑛1β„Ž12E_{G}^{(i)}\leftarrow E_{G}^{(i-1)}\setminus\{(u,v)\in E_{G}^{(i-1)}\setminus E_{H}^{(i)}\mid(\text{deg}_{H^{(i)}}(u)\geq\delta n^{1/(h-1)}-2)\lor(\text{deg}_{H^{(i)}}(v)\geq\delta n^{1/(h-1)}-2)\};
9:        G(i)←([n],EG(i))←superscript𝐺𝑖delimited-[]𝑛superscriptsubscript𝐸𝐺𝑖G^{(i)}\leftarrow([n],E_{G}^{(i)});
10:     else
11:        EH(i)←EH(iβˆ’1)←superscriptsubscript𝐸𝐻𝑖superscriptsubscript𝐸𝐻𝑖1E_{H}^{(i)}\leftarrow E_{H}^{(i-1)};
12:        H(i)←([n],EH(i))←superscript𝐻𝑖delimited-[]𝑛superscriptsubscript𝐸𝐻𝑖H^{(i)}\leftarrow([n],E_{H}^{(i)});
13:        EG(i)←EG(iβˆ’1)←superscriptsubscript𝐸𝐺𝑖superscriptsubscript𝐸𝐺𝑖1E_{G}^{(i)}\leftarrow E_{G}^{(i-1)};
14:        G(i)←([n],EG(i))←superscript𝐺𝑖delimited-[]𝑛superscriptsubscript𝐸𝐺𝑖G^{(i)}\leftarrow([n],E_{G}^{(i)});
15:     end if
16:     Q(i)←([n],{(aj,bj)∣j∈[i]})←superscript𝑄𝑖delimited-[]𝑛conditional-setsubscriptπ‘Žπ‘—subscript𝑏𝑗𝑗delimited-[]𝑖Q^{(i)}\leftarrow([n],\{(a_{j},b_{j})\mid j\in[i]\});
17:     Output min⁑{dH(i)​(ai,bi),hβˆ’(1/2)⋅χ​[βˆƒv∈{ai,bi},(v∈S)∧(degQ(i)​(v)≀δ​n1/(hβˆ’1))]}subscript𝑑superscript𝐻𝑖subscriptπ‘Žπ‘–subscriptπ‘π‘–β„Žβ‹…12πœ’delimited-[]𝑣subscriptπ‘Žπ‘–subscript𝑏𝑖𝑣𝑆subscriptdegsuperscript𝑄𝑖𝑣𝛿superscript𝑛1β„Ž1\min\{d_{H^{(i)}}(a_{i},b_{i}),h-(1/2)\cdot\chi[\exists v\in\{a_{i},b_{i}\},\,(v\in S)\land(\text{deg}_{Q^{(i)}}(v)\leq\delta n^{1/(h-1)})]\} as the answer to the i𝑖ith query of A𝐴A;
18:  end for
Figure 1: Algorithm Adv for answering A𝐴A’s queries

Algorithm Adv in Fig. 1 answers A𝐴A’s queries. In particular, for all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)], the i𝑖ith iteration of the loop of Adv answers the i𝑖ith query of A𝐴A, denoted (ai,bi)∈[n]2subscriptπ‘Žπ‘–subscript𝑏𝑖superscriptdelimited-[]𝑛2(a_{i},b_{i})\in[n]^{2}. It constructs three unweighted undirected graphs, G(i)=([n],EG(i))superscript𝐺𝑖delimited-[]𝑛superscriptsubscript𝐸𝐺𝑖G^{(i)}=([n],E_{G}^{(i)}), H(i)=([n],EH(i))superscript𝐻𝑖delimited-[]𝑛superscriptsubscript𝐸𝐻𝑖H^{(i)}=([n],E_{H}^{(i)}) and Q(i)superscript𝑄𝑖Q^{(i)}. As G(iβˆ’1)superscript𝐺𝑖1G^{(i-1)} is unweighted for all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)], Pisubscript𝑃𝑖P_{i} in line 5 of Adv is an aisubscriptπ‘Žπ‘–a_{i}-bisubscript𝑏𝑖b_{i} path in G(iβˆ’1)superscript𝐺𝑖1G^{(i-1)} with the minimum number of edges. By line 16 of Adv, the edges of Q(i)superscript𝑄𝑖Q^{(i)} are precisely the first i𝑖i queries of A𝐴A.

Lemma 4.
EH(0)βŠ†EH(1)βŠ†β€¦βŠ†EH(q​(n))βŠ†EG(q​(n))βŠ†EG(q​(n)βˆ’1)βŠ†β€¦βŠ†EG(0).superscriptsubscript𝐸𝐻0superscriptsubscript𝐸𝐻1…superscriptsubscriptπΈπ»π‘žπ‘›superscriptsubscriptπΈπΊπ‘žπ‘›superscriptsubscriptπΈπΊπ‘žπ‘›1…superscriptsubscript𝐸𝐺0E_{H}^{(0)}\subseteq E_{H}^{(1)}\subseteq\ldots\subseteq E_{H}^{(q(n))}\subseteq E_{G}^{(q(n))}\subseteq E_{G}^{(q(n)-1)}\subseteq\ldots\subseteq E_{G}^{(0)}.
Proof.

By lines 6 and 11 of Adv in Fig. 1, EH(iβˆ’1)βŠ†EH(i)superscriptsubscript𝐸𝐻𝑖1superscriptsubscript𝐸𝐻𝑖E_{H}^{(i-1)}\subseteq E_{H}^{(i)} for all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)]. By lines 8 and 13, EG(i)βŠ†EG(iβˆ’1)superscriptsubscript𝐸𝐺𝑖superscriptsubscript𝐸𝐺𝑖1E_{G}^{(i)}\subseteq E_{G}^{(i-1)} for all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)].

To show that EH(q​(n))βŠ†EG(q​(n))superscriptsubscriptπΈπ»π‘žπ‘›superscriptsubscriptπΈπΊπ‘žπ‘›E_{H}^{(q(n))}\subseteq E_{G}^{(q(n))}, we shall prove the stronger statement that EH(i)βŠ†EG(i)superscriptsubscript𝐸𝐻𝑖superscriptsubscript𝐸𝐺𝑖E_{H}^{(i)}\subseteq E_{G}^{(i)} for all i∈{0,1,…,q​(n)}𝑖01β€¦π‘žπ‘›i\in\{0,1,\ldots,q(n)\} by mathematical induction. By equation (6), EH(0)βŠ†EG(0)superscriptsubscript𝐸𝐻0superscriptsubscript𝐸𝐺0E_{H}^{(0)}\subseteq E_{G}^{(0)}. Assume as the induction hypothesis that EH(iβˆ’1)βŠ†EG(iβˆ’1)superscriptsubscript𝐸𝐻𝑖1superscriptsubscript𝐸𝐺𝑖1E_{H}^{(i-1)}\subseteq E_{G}^{(i-1)}. The following shows that EH(i)βŠ†EG(iβˆ’1)superscriptsubscript𝐸𝐻𝑖superscriptsubscript𝐸𝐺𝑖1E_{H}^{(i)}\subseteq E_{G}^{(i-1)} by examining each e∈EH(i)𝑒superscriptsubscript𝐸𝐻𝑖e\in E_{H}^{(i)}:

  1. Case 1:

    e∈EH(iβˆ’1)𝑒superscriptsubscript𝐸𝐻𝑖1e\in E_{H}^{(i-1)}. By the induction hypothesis, e∈EG(iβˆ’1)𝑒superscriptsubscript𝐸𝐺𝑖1e\in E_{G}^{(i-1)}.

  2. Case 2:

    eβˆ‰EH(iβˆ’1)𝑒superscriptsubscript𝐸𝐻𝑖1e\notin E_{H}^{(i-1)}. As e∈EH(i)βˆ–EH(iβˆ’1)𝑒superscriptsubscript𝐸𝐻𝑖superscriptsubscript𝐸𝐻𝑖1e\in E_{H}^{(i)}\setminus E_{H}^{(i-1)}, lines 6 and 11 show that e𝑒e is on Pisubscript𝑃𝑖P_{i} (and that the i𝑖ith iteration of the loop of Adv runs line 6 rather than line 11). By line 5, each edge on Pisubscript𝑃𝑖P_{i} is in EG(iβˆ’1)superscriptsubscript𝐸𝐺𝑖1E_{G}^{(i-1)}. In particular, e∈EG(iβˆ’1)𝑒superscriptsubscript𝐸𝐺𝑖1e\in E_{G}^{(i-1)}.

Having shown that EH(i)βŠ†EG(iβˆ’1)superscriptsubscript𝐸𝐻𝑖superscriptsubscript𝐸𝐺𝑖1E_{H}^{(i)}\subseteq E_{G}^{(i-1)}, lines 8 and 13 will both result in EH(i)βŠ†EG(i)superscriptsubscript𝐸𝐻𝑖superscriptsubscript𝐸𝐺𝑖E_{H}^{(i)}\subseteq E_{G}^{(i)}, completing the induction step. ∎

Lemma 5.

For all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)] with dG(iβˆ’1)​(ai,bi)≀hsubscript𝑑superscript𝐺𝑖1subscriptπ‘Žπ‘–subscriptπ‘π‘–β„Žd_{G^{(i-1)}}(a_{i},b_{i})\leq h,

dH(i)​(ai,bi)=dH(q​(n))​(ai,bi)=dG(q​(n))​(ai,bi)=dG(iβˆ’1)​(ai,bi).subscript𝑑superscript𝐻𝑖subscriptπ‘Žπ‘–subscript𝑏𝑖subscript𝑑superscriptπ»π‘žπ‘›subscriptπ‘Žπ‘–subscript𝑏𝑖subscript𝑑superscriptπΊπ‘žπ‘›subscriptπ‘Žπ‘–subscript𝑏𝑖subscript𝑑superscript𝐺𝑖1subscriptπ‘Žπ‘–subscript𝑏𝑖d_{H^{(i)}}\left(a_{i},b_{i}\right)=d_{H^{(q(n))}}\left(a_{i},b_{i}\right)=d_{G^{(q(n))}}\left(a_{i},b_{i}\right)=d_{G^{(i-1)}}\left(a_{i},b_{i}\right).
Proof.

By line 4 of Adv, the i𝑖ith iteration of the loop runs lines 5–9. Lines 5–7 put (the edges of) a shortest aisubscriptπ‘Žπ‘–a_{i}-bisubscript𝑏𝑖b_{i} path in G(iβˆ’1)superscript𝐺𝑖1G^{(i-1)} into H(i)superscript𝐻𝑖H^{(i)}; hence

dH(i)​(ai,bi)≀dG(iβˆ’1)​(ai,bi).subscript𝑑superscript𝐻𝑖subscriptπ‘Žπ‘–subscript𝑏𝑖subscript𝑑superscript𝐺𝑖1subscriptπ‘Žπ‘–subscript𝑏𝑖d_{H^{(i)}}\left(a_{i},b_{i}\right)\leq d_{G^{(i-1)}}\left(a_{i},b_{i}\right).

This and Lemma 4 complete the proof. ∎

Below is an easy consequence of Lemma 4.

Lemma 6.

For all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)] with dG(iβˆ’1)​(ai,bi)>hsubscript𝑑superscript𝐺𝑖1subscriptπ‘Žπ‘–subscriptπ‘π‘–β„Žd_{G^{(i-1)}}(a_{i},b_{i})>h,

dG(q​(n))​(ai,bi)>h.subscript𝑑superscriptπΊπ‘žπ‘›subscriptπ‘Žπ‘–subscriptπ‘π‘–β„Žd_{G^{(q(n))}}(a_{i},b_{i})>h.

3.1 The average distance from A𝐴A’s output to other points

This subsection shows that the output of A𝖠𝖽𝗏superscript𝐴𝖠𝖽𝗏A^{\sf Adv} has a large average distance to other points, according to the answers of Adv.

Lemma 7.

For all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)] and v∈[n]𝑣delimited-[]𝑛v\in[n],

degH(i)​(v)≀degH(iβˆ’1)​(v)+2.subscriptdegsuperscript𝐻𝑖𝑣subscriptdegsuperscript𝐻𝑖1𝑣2\text{\rm deg}_{H^{(i)}}(v)\leq\text{\rm deg}_{H^{(i-1)}}(v)+2.
Proof.

If the i𝑖ith iteration of the loop of Adv runs lines 11–14 but not 5–9, then H(i)=H(iβˆ’1)superscript𝐻𝑖superscript𝐻𝑖1H^{(i)}=H^{(i-1)}, proving the lemma. So assume otherwise. Being shortest, Pisubscript𝑃𝑖P_{i} in line 5 does not repeat vertices. Therefore, v𝑣v is incident to at most two edges on Pisubscript𝑃𝑖P_{i}, which together with lines 6–7 complete the proof. ∎

Lemma 8.

For all v∈[n]𝑣delimited-[]𝑛v\in[n],

degH(q​(n))​(v)<δ​n1/(hβˆ’1).subscriptdegsuperscriptπ»π‘žπ‘›π‘£π›Ώsuperscript𝑛1β„Ž1\text{\rm deg}_{H^{(q(n))}}(v)<\delta n^{1/(h-1)}.
Proof.

Assume

degH(q​(n))​(v)β‰₯δ​n1/(hβˆ’1)βˆ’2subscriptdegsuperscriptπ»π‘žπ‘›π‘£π›Ώsuperscript𝑛1β„Ž12\displaystyle\text{\rm deg}_{H^{(q(n))}}(v)\geq\delta n^{1/(h-1)}-2(8)

for, otherwise, there is nothing to prove. Clearly,

degH(0)​(v)=(6)–(7)0<(2)δ​n1/(hβˆ’1)βˆ’2.superscript(6)–(7)subscriptdegsuperscript𝐻0𝑣0superscript(2)𝛿superscript𝑛1β„Ž12\displaystyle\text{\rm deg}_{H^{(0)}}(v)\stackrel{{\scriptstyle\text{(\ref{initiallymarkededgeset})--(\ref{initiallymarkedgraph})}}}{{=}}0\stackrel{{\scriptstyle\text{(\ref{tediouscondition2})}}}{{<}}\delta n^{1/(h-1)}-2.(9)

By inequalities (8)–(9), there exists i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)] satisfying

degH(iβˆ’1)​(v)<δ​n1/(hβˆ’1)βˆ’2,subscriptdegsuperscript𝐻𝑖1𝑣𝛿superscript𝑛1β„Ž12\displaystyle\text{\rm deg}_{H^{(i-1)}}(v)<\delta n^{1/(h-1)}-2,(10)
degH(i)​(v)β‰₯δ​n1/(hβˆ’1)βˆ’2.subscriptdegsuperscript𝐻𝑖𝑣𝛿superscript𝑛1β„Ž12\displaystyle\text{\rm deg}_{H^{(i)}}(v)\geq\delta n^{1/(h-1)}-2.(11)

Clearly,

NG(i)​(v)={u∈[n]∣(u,v)∈EG(i)}.subscript𝑁superscript𝐺𝑖𝑣conditional-set𝑒delimited-[]𝑛𝑒𝑣superscriptsubscript𝐸𝐺𝑖\displaystyle N_{G^{(i)}}(v)=\left\{u\in[n]\mid\left(u,v\right)\in E_{G}^{(i)}\right\}.(12)

As H(iβˆ’1)β‰ H(i)superscript𝐻𝑖1superscript𝐻𝑖H^{(i-1)}\neq H^{(i)} by inequalities (10)–(11), the i𝑖ith iteration of the loop of Adv runs lines 5–9 but not 11–14. By inequality (11) and line 8 of Adv,

{u∈[n]∣(u,v)∈EG(i)}={u∈[n]∣(u,v)∈EG(iβˆ’1)βˆ–(EG(iβˆ’1)βˆ–EH(i))}.conditional-set𝑒delimited-[]𝑛𝑒𝑣superscriptsubscript𝐸𝐺𝑖conditional-set𝑒delimited-[]𝑛𝑒𝑣superscriptsubscript𝐸𝐺𝑖1superscriptsubscript𝐸𝐺𝑖1superscriptsubscript𝐸𝐻𝑖\displaystyle\left\{u\in[n]\mid\left(u,v\right)\in E_{G}^{(i)}\right\}=\left\{u\in[n]\mid\left(u,v\right)\in E_{G}^{(i-1)}\setminus\left(E_{G}^{(i-1)}\setminus E_{H}^{(i)}\right)\right\}.(13)

Equations (12)–(13) and Lemma 4 give

NG(i)​(v)={u∈[n]∣(u,v)∈EH(i)}.subscript𝑁superscript𝐺𝑖𝑣conditional-set𝑒delimited-[]𝑛𝑒𝑣superscriptsubscript𝐸𝐻𝑖\displaystyle N_{G^{(i)}}(v)=\left\{u\in[n]\mid\left(u,v\right)\in E_{H}^{(i)}\right\}.(14)

By inequality (10) and Lemma 7,

degH(i)​(v)<δ​n1/(hβˆ’1).subscriptdegsuperscript𝐻𝑖𝑣𝛿superscript𝑛1β„Ž1\displaystyle\text{\rm deg}_{H^{(i)}}(v)<\delta n^{1/(h-1)}.

This and equation (14) imply degG(i)​(v)<δ​n1/(hβˆ’1)subscriptdegsuperscript𝐺𝑖𝑣𝛿superscript𝑛1β„Ž1\text{\rm deg}_{G^{(i)}}(v)<\delta n^{1/(h-1)}, which together with Lemma 4 completes the proof. ∎

Lemma 9.

For all v∈[n]𝑣delimited-[]𝑛v\in[n],

|{u∈[n]∣dH(q​(n))​(v,u)<h}|≀2​δhβˆ’1​n.conditional-set𝑒delimited-[]𝑛subscript𝑑superscriptπ»π‘žπ‘›π‘£π‘’β„Ž2superscriptπ›Ώβ„Ž1𝑛\left|\left\{u\in[n]\mid d_{H^{(q(n))}}\left(v,u\right)<h\right\}\right|\leq 2\delta^{h-1}n.
Proof.

By Lemma 8,

|{u∈[n]βˆ£βˆƒ v-u path in H(q​(n)) with exactly k edges}|≀(δ​n1/(hβˆ’1))kconditional-set𝑒delimited-[]π‘›βˆƒ v-u path in H(q(n)) with exactly k edgessuperscript𝛿superscript𝑛1β„Ž1π‘˜\left|\left\{u\in[n]\mid\text{$\exists$ $v$-$u$ path in $H^{(q(n))}$ with exactly $k$ edges}\right\}\right|\leq\left(\delta n^{1/(h-1)}\right)^{k}

for all kβˆˆβ„•π‘˜β„•k\in\mathbb{N}. Consequently,

|{u∈[n]βˆ£βˆƒ v-u path in H(q​(n)) with at most hβˆ’1 edges}|conditional-set𝑒delimited-[]π‘›βˆƒ v-u path in H(q(n)) with at most hβˆ’1 edges\displaystyle\left|\left\{u\in[n]\mid\text{$\exists$ $v$-$u$ path in $H^{(q(n))}$ with at most $h-1$ edges}\right\}\right|≀\displaystyle\leqβˆ‘k=0hβˆ’1(δ​n1/(hβˆ’1))ksuperscriptsubscriptπ‘˜0β„Ž1superscript𝛿superscript𝑛1β„Ž1π‘˜\displaystyle\sum_{k=0}^{h-1}\,\left(\delta n^{1/(h-1)}\right)^{k}
≀(2) and Fact 3superscript(2) and Fact 3\displaystyle\stackrel{{\scriptstyle\text{(\ref{tediouscondition2})~{}and~{}Fact~{}\ref{geometricseriesbound}}}}{{\leq}}2​δhβˆ’1​n.2superscriptπ›Ώβ„Ž1𝑛\displaystyle 2\delta^{h-1}n.

Finally, recall that H(q​(n))superscriptπ»π‘žπ‘›H^{(q(n))} is unweighted. ∎

Denote the output of AAdvsuperscript𝐴AdvA^{\text{\sf Adv}} by z𝑧z. Furthermore,

I=def.{j∈[q​(n)]∣z∈{aj,bj}}.superscriptdef.𝐼conditional-set𝑗delimited-[]π‘žπ‘›π‘§subscriptπ‘Žπ‘—subscript𝑏𝑗\displaystyle I\stackrel{{\scriptstyle\text{def.}}}{{=}}\left\{j\in\left[q(n)\right]\mid z\in\left\{a_{j},b_{j}\right\}\right\}.(15)

The following lemma analyzes the sum of the distances, as answered by line 17 of Adv, from z𝑧z to other points.

Lemma 10.
βˆ‘i∈Imin⁑{dH(i)​(ai,bi),hβˆ’12⋅χ​[βˆƒv∈{ai,bi},(v∈S)∧(degQ(i)​(v)≀δ​n1/(hβˆ’1))]}subscript𝑖𝐼subscript𝑑superscript𝐻𝑖subscriptπ‘Žπ‘–subscriptπ‘π‘–β„Žβ‹…12πœ’delimited-[]𝑣subscriptπ‘Žπ‘–subscript𝑏𝑖𝑣𝑆subscriptdegsuperscript𝑄𝑖𝑣𝛿superscript𝑛1β„Ž1\displaystyle\sum_{i\in I}\,\min\left\{d_{H^{(i)}}\left(a_{i},b_{i}\right),h-\frac{1}{2}\cdot\chi\left[\exists v\in\left\{a_{i},b_{i}\right\},\,\left(v\in S\right)\land\left(\text{\rm deg}_{Q^{(i)}}(v)\leq\delta n^{1/(h-1)}\right)\right]\right\}
β‰₯\displaystyle\geqnβ‹…(hβˆ’2​h​δhβˆ’1βˆ’o​(1)βˆ’Ξ΄).β‹…π‘›β„Ž2β„Žsuperscriptπ›Ώβ„Ž1π‘œ1𝛿\displaystyle n\cdot\left(h-2h\delta^{h-1}-o(1)-\delta\right).
Proof.

By Lemma 4,

βˆ‘i∈Imin⁑{dH(i)​(ai,bi),hβˆ’12⋅χ​[βˆƒv∈{ai,bi},(v∈S)∧(degQ(i)​(v)≀δ​n1/(hβˆ’1))]}subscript𝑖𝐼subscript𝑑superscript𝐻𝑖subscriptπ‘Žπ‘–subscriptπ‘π‘–β„Žβ‹…12πœ’delimited-[]𝑣subscriptπ‘Žπ‘–subscript𝑏𝑖𝑣𝑆subscriptdegsuperscript𝑄𝑖𝑣𝛿superscript𝑛1β„Ž1\displaystyle\sum_{i\in I}\,\min\left\{d_{H^{(i)}}\left(a_{i},b_{i}\right),h-\frac{1}{2}\cdot\chi\left[\exists v\in\left\{a_{i},b_{i}\right\},\,\left(v\in S\right)\land\left(\text{\rm deg}_{Q^{(i)}}(v)\leq\delta n^{1/(h-1)}\right)\right]\right\}
β‰₯\displaystyle\geqβˆ‘i∈Imin⁑{dH(q​(n))​(ai,bi),hβˆ’12⋅χ​[βˆƒv∈{ai,bi},(v∈S)∧(degQ(i)​(v)≀δ​n1/(hβˆ’1))]}subscript𝑖𝐼subscript𝑑superscriptπ»π‘žπ‘›subscriptπ‘Žπ‘–subscriptπ‘π‘–β„Žβ‹…12πœ’delimited-[]𝑣subscriptπ‘Žπ‘–subscript𝑏𝑖𝑣𝑆subscriptdegsuperscript𝑄𝑖𝑣𝛿superscript𝑛1β„Ž1\displaystyle\sum_{i\in I}\,\min\left\{d_{H^{(q(n))}}\left(a_{i},b_{i}\right),h-\frac{1}{2}\cdot\chi\left[\exists v\in\left\{a_{i},b_{i}\right\},\,\left(v\in S\right)\land\left(\text{\rm deg}_{Q^{(i)}}(v)\leq\delta n^{1/(h-1)}\right)\right]\right\}\,\,\,\,\,\,\,\,\,\,
β‰₯\displaystyle\geqβˆ‘i∈Imin⁑{dH(q​(n))​(ai,bi),h}subscript𝑖𝐼subscript𝑑superscriptπ»π‘žπ‘›subscriptπ‘Žπ‘–subscriptπ‘π‘–β„Ž\displaystyle\sum_{i\in I}\,\min\left\{d_{H^{(q(n))}}\left(a_{i},b_{i}\right),h\right\}
βˆ’\displaystyle-βˆ‘i∈I12⋅χ​[βˆƒv∈{ai,bi},(v∈S)∧(degQ(i)​(v)≀δ​n1/(hβˆ’1))].subscript𝑖𝐼⋅12πœ’delimited-[]𝑣subscriptπ‘Žπ‘–subscript𝑏𝑖𝑣𝑆subscriptdegsuperscript𝑄𝑖𝑣𝛿superscript𝑛1β„Ž1\displaystyle\sum_{i\in I}\,\frac{1}{2}\cdot\chi\left[\exists v\in\left\{a_{i},b_{i}\right\},\,\left(v\in S\right)\land\left(\text{\rm deg}_{Q^{(i)}}(v)\leq\delta n^{1/(h-1)}\right)\right].

For all i∈I𝑖𝐼i\in I, there exists ci∈[n]subscript𝑐𝑖delimited-[]𝑛c_{i}\in[n] with {z,ci}={ai,bi}𝑧subscript𝑐𝑖subscriptπ‘Žπ‘–subscript𝑏𝑖\{z,c_{i}\}=\{a_{i},b_{i}\} by equation (15). Therefore,

βˆ‘i∈Imin⁑{dH(q​(n))​(ai,bi),h}=βˆ‘i∈Imin⁑{dH(q​(n))​(z,ci),h}.subscript𝑖𝐼subscript𝑑superscriptπ»π‘žπ‘›subscriptπ‘Žπ‘–subscriptπ‘π‘–β„Žsubscript𝑖𝐼subscript𝑑superscriptπ»π‘žπ‘›π‘§subscriptπ‘π‘–β„Ž\sum_{i\in I}\,\min\left\{d_{H^{(q(n))}}\left(a_{i},b_{i}\right),h\right\}=\sum_{i\in I}\,\min\left\{d_{H^{(q(n))}}\left(z,c_{i}\right),h\right\}.

As we forbid repeated queries, {ci}i∈Isubscriptsubscript𝑐𝑖𝑖𝐼\{c_{i}\}_{i\in I} is a sequence of distinct points. So by Lemma 9,

βˆ‘i∈Imin⁑{dH(q​(n))​(z,ci),h}β‰₯hβ‹…(|I|βˆ’2​δhβˆ’1​n).subscript𝑖𝐼subscript𝑑superscriptπ»π‘žπ‘›π‘§subscriptπ‘π‘–β„Žβ‹…β„ŽπΌ2superscriptπ›Ώβ„Ž1𝑛\sum_{i\in I}\,\min\left\{d_{H^{(q(n))}}\left(z,c_{i}\right),h\right\}\geq h\cdot\left(|I|-2\delta^{h-1}n\right).

Recall that A𝖠𝖽𝗏superscript𝐴𝖠𝖽𝗏A^{\sf Adv} will have queried for the distances between its output (which is z𝑧z) and all other points when halting. So

|I|β‰₯nβˆ’1𝐼𝑛1|I|\geq n-1

by equation (15).444Because we forbid repeated queries and queries for the distance from a point to itself, we also have |I|≀nβˆ’1𝐼𝑛1|I|\leq n-1.

Clearly,

βˆ‘i∈Iχ​[βˆƒv∈{ai,bi},(v∈S)∧(degQ(i)​(v)≀δ​n1/(hβˆ’1))]subscriptπ‘–πΌπœ’delimited-[]𝑣subscriptπ‘Žπ‘–subscript𝑏𝑖𝑣𝑆subscriptdegsuperscript𝑄𝑖𝑣𝛿superscript𝑛1β„Ž1\displaystyle\sum_{i\in I}\,\chi\left[\exists v\in\left\{a_{i},b_{i}\right\},\,\left(v\in S\right)\land\left(\text{\rm deg}_{Q^{(i)}}(v)\leq\delta n^{1/(h-1)}\right)\right]
=\displaystyle=βˆ‘i∈Iχ​[βˆƒv∈{z,ci},(v∈S)∧(degQ(i)​(v)≀δ​n1/(hβˆ’1))]subscriptπ‘–πΌπœ’delimited-[]𝑣𝑧subscript𝑐𝑖𝑣𝑆subscriptdegsuperscript𝑄𝑖𝑣𝛿superscript𝑛1β„Ž1\displaystyle\sum_{i\in I}\,\chi\left[\exists v\in\left\{z,c_{i}\right\},\,\left(v\in S\right)\land\left(\text{\rm deg}_{Q^{(i)}}(v)\leq\delta n^{1/(h-1)}\right)\right]
≀\displaystyle\leqβˆ‘i∈Iχ​[(z∈S)∧(degQ(i)​(z)≀δ​n1/(hβˆ’1))]subscriptπ‘–πΌπœ’delimited-[]𝑧𝑆subscriptdegsuperscript𝑄𝑖𝑧𝛿superscript𝑛1β„Ž1\displaystyle\sum_{i\in I}\,\chi\left[\left(z\in S\right)\land\left(\text{\rm deg}_{Q^{(i)}}\left(z\right)\leq\delta n^{1/(h-1)}\right)\right]
+\displaystyle+βˆ‘i∈Iχ​[(ci∈S)∧(degQ(i)​(ci)≀δ​n1/(hβˆ’1))].subscriptπ‘–πΌπœ’delimited-[]subscript𝑐𝑖𝑆subscriptdegsuperscript𝑄𝑖subscript𝑐𝑖𝛿superscript𝑛1β„Ž1\displaystyle\sum_{i\in I}\,\chi\left[\left(c_{i}\in S\right)\land\left(\text{\rm deg}_{Q^{(i)}}\left(c_{i}\right)\leq\delta n^{1/(h-1)}\right)\right].

By line 16 of Adv and equation (15),

degQ(i)​(z)=|{j∈I∣j≀i}|.subscriptdegsuperscript𝑄𝑖𝑧conditional-set𝑗𝐼𝑗𝑖\displaystyle\text{deg}_{Q^{(i)}}\left(z\right)=\left|\left\{j\in I\mid j\leq i\right\}\right|.

Therefore,

βˆ‘i∈Iχ​[(z∈S)∧(degQ(i)​(z)≀δ​n1/(hβˆ’1))]subscriptπ‘–πΌπœ’delimited-[]𝑧𝑆subscriptdegsuperscript𝑄𝑖𝑧𝛿superscript𝑛1β„Ž1\displaystyle\sum_{i\in I}\,\chi\left[\left(z\in S\right)\land\left(\text{\rm deg}_{Q^{(i)}}\left(z\right)\leq\delta n^{1/(h-1)}\right)\right]≀\displaystyle\leqβˆ‘i∈Iχ​[|{j∈I∣j≀i}|≀δ​n1/(hβˆ’1)]subscriptπ‘–πΌπœ’delimited-[]conditional-set𝑗𝐼𝑗𝑖𝛿superscript𝑛1β„Ž1\displaystyle\sum_{i\in I}\,\chi\left[\left|\left\{j\in I\mid j\leq i\right\}\right|\leq\delta n^{1/(h-1)}\right]
≀\displaystyle\leqδ​n1/(hβˆ’1),𝛿superscript𝑛1β„Ž1\displaystyle\delta n^{1/(h-1)},

where the last inequality follows because |{j∈I∣j≀i}|=kconditional-setπ‘—πΌπ‘—π‘–π‘˜|\{j\in I\mid j\leq i\}|=k when i𝑖i is the kπ‘˜kth smallest element of I𝐼I, for all k∈[|I|]π‘˜delimited-[]𝐼k\in[|I|]. Recall the distinctness of the points in {ci}i∈Isubscriptsubscript𝑐𝑖𝑖𝐼\{c_{i}\}_{i\in I}. Therefore,

βˆ‘i∈Iχ​[(ci∈S)∧(degQ(i)​(ci)≀δ​n1/(hβˆ’1))]β‰€βˆ‘i∈Iχ​[ci∈S]≀|S|=βŒŠΞ΄β€‹nβŒ‹.subscriptπ‘–πΌπœ’delimited-[]subscript𝑐𝑖𝑆subscriptdegsuperscript𝑄𝑖subscript𝑐𝑖𝛿superscript𝑛1β„Ž1subscriptπ‘–πΌπœ’delimited-[]subscript𝑐𝑖𝑆𝑆𝛿𝑛\displaystyle\sum_{i\in I}\,\chi\left[\left(c_{i}\in S\right)\land\left(\text{\rm deg}_{Q^{(i)}}\left(c_{i}\right)\leq\delta n^{1/(h-1)}\right)\right]\leq\sum_{i\in I}\,\chi\left[c_{i}\in S\right]\leq|S|=\left\lfloor\delta n\right\rfloor.(17)

Inequalities (3.1)–(17) complete the proof. ∎

3.2 Planting a point with a small average distance to other points

This subsection constructs a distance function with respect to which a certain point has an average distance of approximately 1/2121/2 to other points.

Lemma 11.
|EH(q​(n))|≀hβ‹…q​(n).superscriptsubscriptπΈπ»π‘žπ‘›β‹…β„Žπ‘žπ‘›\left|E_{H}^{(q(n))}\right|\leq h\cdot q(n).
Proof.

Consider the i𝑖ith iteration of the loop of Adv, where i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)].

  • β€’

    Running lines 4–5 results in Pisubscript𝑃𝑖P_{i} having at most hβ„Žh edges. Consequently,

    |EH(i)|≀|EH(iβˆ’1)|+hsuperscriptsubscript𝐸𝐻𝑖superscriptsubscript𝐸𝐻𝑖1β„Ž\displaystyle\left|E_{H}^{(i)}\right|\leq\left|E_{H}^{(i-1)}\right|+h(18)

    by line 6.

  • β€’

    Running line 11 yields |EH(i)|=|EH(iβˆ’1)|superscriptsubscript𝐸𝐻𝑖superscriptsubscript𝐸𝐻𝑖1|E_{H}^{(i)}|=|E_{H}^{(i-1)}|, implying inequality (18) as well.

Now,

|EH(q​(n))|βˆ’|EH(0)|=βˆ‘i=1q​(n)(|EH(i)|βˆ’|EH(iβˆ’1)|)≀(18)hβ‹…q​(n).superscriptsubscriptπΈπ»π‘žπ‘›superscriptsubscript𝐸𝐻0superscriptsubscript𝑖1π‘žπ‘›superscriptsubscript𝐸𝐻𝑖superscriptsubscript𝐸𝐻𝑖1superscript(18)β‹…β„Žπ‘žπ‘›\left|E_{H}^{(q(n))}\right|-\left|E_{H}^{(0)}\right|=\sum_{i=1}^{q(n)}\,\left(\left|E_{H}^{(i)}\right|-\left|E_{H}^{(i-1)}\right|\right)\stackrel{{\scriptstyle\text{(\ref{theincreaseofthenumberofmarkededges})}}}{{\leq}}h\cdot q(n).

Finally, |EH(0)|=0superscriptsubscript𝐸𝐻00|E_{H}^{(0)}|=0 by equation (6). ∎

Lemma 12.
|{u∈[n]∣degH(q​(n))​(u)β‰₯δ​n1/(hβˆ’1)βˆ’2}|=hΞ΄β‹…o​(n).conditional-set𝑒delimited-[]𝑛subscriptdegsuperscriptπ»π‘žπ‘›π‘’π›Ώsuperscript𝑛1β„Ž12β‹…β„Žπ›Ώπ‘œπ‘›\left|\left\{u\in[n]\mid\text{\rm deg}_{H^{(q(n))}}(u)\geq\delta n^{1/(h-1)}-2\right\}\right|=\frac{h}{\delta}\cdot o(n).
555We explicitly write down the constants hβ„Žh and δ𝛿\delta on the right-hand side for clarity, although they can be absorbed within o​(β‹…)π‘œβ‹…o(\cdot).
Proof.

By Fact 2, the average degree in H(q​(n))superscriptπ»π‘žπ‘›H^{(q(n))} is

1nβ‹…2β‹…|EH(q​(n))|.β‹…1𝑛2superscriptsubscriptπΈπ»π‘žπ‘›\frac{1}{n}\cdot 2\cdot\left|E_{H}^{(q(n))}\right|.

So by the averaging argument (that any finite nonempty sequence of nonnegative numbers with average aΒ―Β―π‘Ž\bar{a} has at most an aΒ―/tΒ―π‘Žπ‘‘\bar{a}/t fraction of numbers that are greater than or equal to t>0𝑑0t>0),

1nβ‹…|{u∈[n]∣degH(q​(n))​(u)β‰₯δ​n1/(hβˆ’1)βˆ’2}|≀1nβ‹…2β‹…|EH(q​(n))|β‹…1δ​n1/(hβˆ’1)βˆ’2,β‹…1𝑛conditional-set𝑒delimited-[]𝑛subscriptdegsuperscriptπ»π‘žπ‘›π‘’π›Ώsuperscript𝑛1β„Ž12β‹…1𝑛2superscriptsubscriptπΈπ»π‘žπ‘›1𝛿superscript𝑛1β„Ž12\frac{1}{n}\cdot\left|\left\{u\in[n]\mid\text{\rm deg}_{H^{(q(n))}}(u)\geq\delta n^{1/(h-1)}-2\right\}\right|\leq\frac{1}{n}\cdot 2\cdot\left|E_{H}^{(q(n))}\right|\cdot\frac{1}{\delta n^{1/(h-1)}-2},

where the rightmost denominator is positive and is Ξ˜β€‹(δ​n1/(hβˆ’1))Ξ˜π›Ώsuperscript𝑛1β„Ž1\Theta(\delta n^{1/(h-1)}) by equation (2). This and Lemma 11 complete the proof. ∎

By inequality (2), Sβˆ–{z}β‰ βˆ…π‘†π‘§S\setminus\{z\}\neq\emptyset. Let

Ξ±^=def.argminα∈Sβˆ–{z}degQ(q​(n))​(Ξ±),superscriptdef.^𝛼subscriptargmin𝛼𝑆𝑧subscriptdegsuperscriptπ‘„π‘žπ‘›π›Ό\displaystyle\hat{\alpha}\stackrel{{\scriptstyle\text{def.}}}{{=}}\mathop{\mathrm{argmin}}_{\alpha\in S\setminus\{z\}}\,\text{deg}_{Q^{(q(n))}}(\alpha),(19)

breaking ties arbitrarily.

Lemma 13.

For all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)],

degQ(i)​(Ξ±^)≀δ​n1/(hβˆ’1).subscriptdegsuperscript𝑄𝑖^𝛼𝛿superscript𝑛1β„Ž1\displaystyle\text{\rm deg}_{Q^{(i)}}\left(\hat{\alpha}\right)\leq\delta n^{1/(h-1)}.
Proof.

By line 16 of Adv,

degQ(i)​(Ξ±^)≀degQ(q​(n))​(Ξ±^).subscriptdegsuperscript𝑄𝑖^𝛼subscriptdegsuperscriptπ‘„π‘žπ‘›^𝛼\displaystyle\text{deg}_{Q^{(i)}}\left(\hat{\alpha}\right)\leq\text{deg}_{Q^{(q(n))}}\left(\hat{\alpha}\right).(20)

By equation (19) and the averaging argument,

degQ(q​(n))​(Ξ±^)≀1|Sβˆ–{z}|β‹…βˆ‘Ξ±βˆˆSβˆ–{z}degQ(q​(n))​(Ξ±).subscriptdegsuperscriptπ‘„π‘žπ‘›^𝛼⋅1𝑆𝑧subscript𝛼𝑆𝑧subscriptdegsuperscriptπ‘„π‘žπ‘›π›Ό\displaystyle\text{deg}_{Q^{(q(n))}}(\hat{\alpha})\leq\frac{1}{|S\setminus\{z\}|}\cdot\sum_{\alpha\in S\setminus\{z\}}\,\text{deg}_{Q^{(q(n))}}(\alpha).

Furthermore,

βˆ‘Ξ±βˆˆSβˆ–{z}degQ(q​(n))​(Ξ±)β‰€βˆ‘Ξ±βˆˆ[n]degQ(q​(n))​(Ξ±)=2​q​(n),subscript𝛼𝑆𝑧subscriptdegsuperscriptπ‘„π‘žπ‘›π›Όsubscript𝛼delimited-[]𝑛subscriptdegsuperscriptπ‘„π‘žπ‘›π›Ό2π‘žπ‘›\displaystyle\sum_{\alpha\in S\setminus\{z\}}\,\text{deg}_{Q^{(q(n))}}(\alpha)\leq\sum_{\alpha\in[n]}\,\text{deg}_{Q^{(q(n))}}(\alpha)=2q(n),\,\,\,(21)

where the equality follows from Fact 2, line 16 of Adv and the non-repeating of queries. Finally,

degQ(i)​(Ξ±^)≀(20)–(21)2​q​(n)|S|βˆ’1≀(3)δ​n1/(hβˆ’1).superscript(20)–(21)subscriptdegsuperscript𝑄𝑖^𝛼2π‘žπ‘›π‘†1superscript(3)𝛿superscript𝑛1β„Ž1\displaystyle\text{deg}_{Q^{(i)}}(\hat{\alpha})\stackrel{{\scriptstyle\text{(\ref{trivialbecausethequerygraphgrows})--(\ref{sumofdegreesinthequerygraph})}}}{{\leq}}\frac{2q(n)}{|S|-1}\stackrel{{\scriptstyle\text{(\ref{tediouscondition3})}}}{{\leq}}\delta n^{1/(h-1)}.

∎

Inductively, let

V0subscript𝑉0\displaystyle V_{0}=def.superscriptdef.\displaystyle\stackrel{{\scriptstyle\text{def.}}}{{=}}{Ξ±^},^𝛼\displaystyle\left\{\hat{\alpha}\right\},(22)
V1subscript𝑉1\displaystyle V_{1}=def.superscriptdef.\displaystyle\stackrel{{\scriptstyle\text{def.}}}{{=}}NQ(q​(n))​(Ξ±^)βˆ–V0,subscript𝑁superscriptπ‘„π‘žπ‘›^𝛼subscript𝑉0\displaystyle N_{Q^{(q(n))}}\left(\hat{\alpha}\right)\setminus V_{0},(23)
Vj+1subscript𝑉𝑗1\displaystyle V_{j+1}=def.superscriptdef.\displaystyle\stackrel{{\scriptstyle\text{def.}}}{{=}}NH(q​(n))​(Vj)βˆ–(⋃i=0jVi)subscript𝑁superscriptπ»π‘žπ‘›subscript𝑉𝑗superscriptsubscript𝑖0𝑗subscript𝑉𝑖\displaystyle N_{H^{(q(n))}}\left(V_{j}\right)\setminus\left(\bigcup_{i=0}^{j}\,V_{i}\right)(24)

for all j∈[hβˆ’2]𝑗delimited-[]β„Ž2j\in[h-2]. Furthermore,

Vh=def.[n]βˆ–(⋃i=0hβˆ’1Vi).superscriptdef.subscriptπ‘‰β„Ždelimited-[]𝑛superscriptsubscript𝑖0β„Ž1subscript𝑉𝑖\displaystyle V_{h}\stackrel{{\scriptstyle\text{def.}}}{{=}}[n]\setminus\left(\bigcup_{i=0}^{h-1}\,V_{i}\right).(25)

The following lemma is not hard to see from equations (22)–(25).

Lemma 14.

(V0,V1,…,Vh)subscript𝑉0subscript𝑉1…subscriptπ‘‰β„Ž(V_{0},V_{1},\ldots,V_{h})is a partition of [n]delimited-[]𝑛[n], i.e., ⋃k=0hVk=[n]superscriptsubscriptπ‘˜0β„Žsubscriptπ‘‰π‘˜delimited-[]𝑛\bigcup_{k=0}^{h}\,V_{k}=[n] and Vi∩Vj=βˆ…subscript𝑉𝑖subscript𝑉𝑗V_{i}\cap V_{j}=\emptyset for all distinct i𝑖i, j∈{0,1,…,h}𝑗01β€¦β„Žj\in\{0,1,\ldots,h\}.

Let

B𝐡\displaystyle B=\displaystyle={u∈[n]∣degH(q​(n))​(u)β‰₯δ​n1/(hβˆ’1)βˆ’2},conditional-set𝑒delimited-[]𝑛subscriptdegsuperscriptπ»π‘žπ‘›π‘’π›Ώsuperscript𝑛1β„Ž12\displaystyle\left\{u\in[n]\mid\text{\rm deg}_{H^{(q(n))}}(u)\geq\delta n^{1/(h-1)}-2\right\},(26)
β„°β„°\displaystyle{\cal E}=def.superscriptdef.\displaystyle\stackrel{{\scriptstyle\text{def.}}}{{=}}[EG(q​(n))βˆ–(⋃i,j∈{0,1,…,h},|iβˆ’j|β‰₯2ViΓ—Vj)]βˆͺ({Ξ±^}Γ—(Vhβˆ–(BβˆͺS))).delimited-[]superscriptsubscriptπΈπΊπ‘žπ‘›subscriptformulae-sequence𝑖𝑗01β€¦β„Žπ‘–π‘—2subscript𝑉𝑖subscript𝑉𝑗^𝛼subscriptπ‘‰β„Žπ΅π‘†\displaystyle\left[E_{G}^{(q(n))}\setminus\left(\bigcup_{i,j\in\{0,1,\ldots,h\},\,|i-j|\geq 2}\,V_{i}\times V_{j}\right)\right]\cup\left(\left\{\hat{\alpha}\right\}\times\left(V_{h}\setminus\left(B\cup S\right)\right)\right).\,\,\,\,\,\,\,\,\,\,\,(27)

By equation (19), Ξ±^βˆ‰Vhβˆ–(BβˆͺS)^𝛼subscriptπ‘‰β„Žπ΅π‘†\hat{\alpha}\notin V_{h}\setminus(B\cup S), which together with equation (4) and Lemma 4 forbids any edge in β„°β„°\cal E from being a self-loop. For all distinct u𝑒u, v∈[n]𝑣delimited-[]𝑛v\in[n],

w​(u,v)=def.{1/2,if one of u and v is Ξ±^ and the other is in Vhβˆ–(BβˆͺS),1,otherwise.superscriptdef.𝑀𝑒𝑣cases12if one of u and v is Ξ±^ and the other is in Vhβˆ–(BβˆͺS),1otherwise.\displaystyle w\left(u,v\right)\stackrel{{\scriptstyle\text{def.}}}{{=}}\left\{\begin{array}[]{ll}1/2,&\text{if one of $u$ and $v$ is $\hat{\alpha}$ and the other is in $V_{h}\setminus(B\cup S)$,}\\ 1,&\text{otherwise.}\end{array}\right.(30)

Furthermore, let

𝒒𝒒\displaystyle{\cal G}=def.superscriptdef.\displaystyle\stackrel{{\scriptstyle\text{def.}}}{{=}}([n],β„°,w)delimited-[]𝑛ℰ𝑀\displaystyle\left([n],{\cal E},w\right)(31)

be a weighted undirected graph.

Lemma 15.
βˆ‘j=1hβˆ’1|Vj|≀2​δhβˆ’1​n.superscriptsubscript𝑗1β„Ž1subscript𝑉𝑗2superscriptπ›Ώβ„Ž1𝑛\sum_{j=1}^{h-1}\,\left|V_{j}\right|\leq 2\delta^{h-1}n.
Proof.

By Lemma 8 and equation (24),

|Vj+1|≀|Vj|⋅δ​n1/(hβˆ’1)subscript𝑉𝑗1β‹…subscript𝑉𝑗𝛿superscript𝑛1β„Ž1\left|V_{j+1}\right|\leq\left|V_{j}\right|\cdot\delta n^{1/(h-1)}

for all j∈[hβˆ’2]𝑗delimited-[]β„Ž2j\in[h-2]. Therefore, βˆ‘j=1hβˆ’1|Vj|superscriptsubscript𝑗1β„Ž1subscript𝑉𝑗\sum_{j=1}^{h-1}\,|V_{j}| is bounded from above by the (hβˆ’1)β„Ž1(h-1)-term geometric series with the common ratio of δ​n1/(hβˆ’1)𝛿superscript𝑛1β„Ž1\delta n^{1/(h-1)} and the initial value of |V1|subscript𝑉1|V_{1}|. Consequently,

βˆ‘j=1hβˆ’1|Vj|≀(2) and Fact 32β‹…|V1|β‹…Ξ΄hβˆ’2​n(hβˆ’2)/(hβˆ’1).superscript(2) and Fact 3superscriptsubscript𝑗1β„Ž1subscript𝑉𝑗⋅2subscript𝑉1superscriptπ›Ώβ„Ž2superscriptπ‘›β„Ž2β„Ž1\displaystyle\sum_{j=1}^{h-1}\,\left|V_{j}\right|\stackrel{{\scriptstyle\text{(\ref{tediouscondition2})~{}and~{}Fact~{}\ref{geometricseriesbound}}}}{{\leq}}2\cdot\left|V_{1}\right|\cdot\delta^{h-2}n^{(h-2)/(h-1)}.(32)

By Lemma 13, |NQ(q​(n))​(Ξ±^)|≀δ​n1/(hβˆ’1)subscript𝑁superscriptπ‘„π‘žπ‘›^𝛼𝛿superscript𝑛1β„Ž1|N_{Q^{(q(n))}}(\hat{\alpha})|\leq\delta n^{1/(h-1)}. So by equation (23), we have |V1|≀δ​n1/(hβˆ’1)subscript𝑉1𝛿superscript𝑛1β„Ž1|V_{1}|\leq\delta n^{1/(h-1)}, which together with inequality (32) completes the proof. ∎

Lemma 16.
|Vhβˆ–(BβˆͺS)|β‰₯n​(1βˆ’2​δhβˆ’1βˆ’hΞ΄β‹…o​(1)βˆ’Ξ΄).subscriptπ‘‰β„Žπ΅π‘†π‘›12superscriptπ›Ώβ„Ž1β‹…β„Žπ›Ώπ‘œ1𝛿\left|V_{h}\setminus\left(B\cup S\right)\right|\geq n\left(1-2\delta^{h-1}-\frac{h}{\delta}\cdot o(1)-\delta\right).
Proof.

By Lemma 12 and equation (26), |B|=(h/Ξ΄)β‹…o​(n)π΅β‹…β„Žπ›Ώπ‘œπ‘›|B|=(h/\delta)\cdot o(n). By construction, |S|=βŒŠΞ΄β€‹nβŒ‹π‘†π›Ώπ‘›|S|=\lfloor\delta n\rfloor. Finally,

|Vh|β‰₯Lemmas 14–15nβˆ’2​δhβˆ’1​nβˆ’|V0|=(22)nβˆ’2​δhβˆ’1​nβˆ’1.superscriptLemmas 14–15subscriptπ‘‰β„Žπ‘›2superscriptπ›Ώβ„Ž1𝑛subscript𝑉0superscript(22)𝑛2superscriptπ›Ώβ„Ž1𝑛1\displaystyle\left|V_{h}\right|\stackrel{{\scriptstyle\text{Lemmas~{}\ref{disjointnessoflayers}--\ref{sizeofthenonlastlayers}}}}{{\geq}}n-2\delta^{h-1}n-\left|V_{0}\right|\stackrel{{\scriptstyle\text{(\ref{layer0})}}}{{=}}n-2\delta^{h-1}n-1.

∎

The following lemma says that Ξ±^^𝛼\hat{\alpha} has an average distance of approximately 1/2121/2 to other points w.r.t. the distance function min⁑{d𝒒​(β‹…,β‹…),h}subscriptπ‘‘π’’β‹…β‹…β„Ž\min\{d_{\cal G}(\cdot,\cdot),h\}.

Lemma 17.
βˆ‘v∈[n]min⁑{d𝒒​(Ξ±^,v),h}≀nβ‹…(12+2​h​δhβˆ’1+h2Ξ΄β‹…o​(1)+h​δ).subscript𝑣delimited-[]𝑛subscript𝑑𝒒^π›Όπ‘£β„Žβ‹…π‘›122β„Žsuperscriptπ›Ώβ„Ž1β‹…superscriptβ„Ž2π›Ώπ‘œ1β„Žπ›Ώ\displaystyle\sum_{v\in[n]}\,\min\left\{d_{\cal G}\left(\hat{\alpha},v\right),h\right\}\leq n\cdot\left(\frac{1}{2}+2h\delta^{h-1}+\frac{h^{2}}{\delta}\cdot o(1)+h\delta\right).
Proof.

By equations (27)–(31), d𝒒​(Ξ±^,v)≀1/2subscript𝑑𝒒^𝛼𝑣12d_{\cal G}(\hat{\alpha},v)\leq 1/2 for all v∈Vhβˆ–(BβˆͺS)𝑣subscriptπ‘‰β„Žπ΅π‘†v\in V_{h}\setminus(B\cup S). This and Lemma 16 complete the proof. ∎

3.3 A metric consistent with Adv’s answers

This subsection constructs a metric d:[n]2β†’[0,∞):𝑑→superscriptdelimited-[]𝑛20d\colon[n]^{2}\to[0,\infty) consistent with Adv’s answers in line 17. So Lemma 10 will require z𝑧z, which is the output of A𝖠𝖽𝗏superscript𝐴𝖠𝖽𝗏A^{\sf Adv}, to have an average distance (w.r.t. d𝑑d) of at least approximately hβ„Žh to other points. Although d​(β‹…,β‹…)𝑑⋅⋅d(\cdot,\cdot) will not be exactly min⁑{d𝒒​(β‹…,β‹…),h}subscriptπ‘‘π’’β‹…β‹…β„Ž\min\{d_{\cal G}(\cdot,\cdot),h\}, Lemma 17 will forbid βˆ‘v∈[n]d​(Ξ±^,v)/nsubscript𝑣delimited-[]𝑛𝑑^𝛼𝑣𝑛\sum_{v\in[n]}\,d(\hat{\alpha},v)/n from exceeding 1/2121/2 by too much. Details follow.

Recall that H(i)superscript𝐻𝑖H^{(i)} and G(i)superscript𝐺𝑖G^{(i)} are unweighted for all i∈{0,1,…,q​(n)}𝑖01β€¦π‘žπ‘›i\in\{0,1,\ldots,q(n)\}. They can be treated as having the weight function w𝑀w while preserving dH(i)​(β‹…,β‹…)subscript𝑑superscript𝐻𝑖⋅⋅d_{H^{(i)}}(\cdot,\cdot) and dG(i)​(β‹…,β‹…)subscript𝑑superscript𝐺𝑖⋅⋅d_{G^{(i)}}(\cdot,\cdot), as shown by the lemma below.

Lemma 18.

For all i∈{0,1,…,q​(n)}𝑖01β€¦π‘žπ‘›i\in\{0,1,\ldots,q(n)\}, each path P𝑃P in H(i)superscript𝐻𝑖H^{(i)} or G(i)superscript𝐺𝑖G^{(i)} has exactly w​(P)𝑀𝑃w(P) edges.

Proof.

As Ξ±^∈S^𝛼𝑆\hat{\alpha}\in S by equation (19), equation (30) implies w​(u,v)=1𝑀𝑒𝑣1w(u,v)=1 for all distinct u𝑒u, v∈[n]βˆ–S𝑣delimited-[]𝑛𝑆v\in[n]\setminus S. This and equation (4) imply that all edges in EG(0)superscriptsubscript𝐸𝐺0E_{G}^{(0)} have weight 111 w.r.t. w𝑀w. So by Lemma 4, the edges in EH(i)βˆͺEG(i)superscriptsubscript𝐸𝐻𝑖superscriptsubscript𝐸𝐺𝑖E_{H}^{(i)}\cup E_{G}^{(i)} have weight 111 w.r.t. w𝑀w. Finally, recall that H(i)=([n],EH(i))superscript𝐻𝑖delimited-[]𝑛superscriptsubscript𝐸𝐻𝑖H^{(i)}=([n],E_{H}^{(i)}) and G(i)=([n],EG(i))superscript𝐺𝑖delimited-[]𝑛superscriptsubscript𝐸𝐺𝑖G^{(i)}=([n],E_{G}^{(i)}). ∎

We now show that H(q​(n))superscriptπ»π‘žπ‘›H^{(q(n))} has an edge in ViΓ—Vjsubscript𝑉𝑖subscript𝑉𝑗V_{i}\times V_{j} only if |iβˆ’j|≀1𝑖𝑗1|i-j|\leq 1.

Lemma 19.
EH(q​(n))∩(⋃i,j∈{0,1,…,h},|iβˆ’j|β‰₯2ViΓ—Vj)=βˆ….superscriptsubscriptπΈπ»π‘žπ‘›subscriptformulae-sequence𝑖𝑗01β€¦β„Žπ‘–π‘—2subscript𝑉𝑖subscript𝑉𝑗E_{H}^{(q(n))}\cap\left(\bigcup_{i,j\in\{0,1,\ldots,h\},\,|i-j|\geq 2}\,V_{i}\times V_{j}\right)=\emptyset.
Proof.

Suppose for contradiction that there exists e∈EH(q​(n))𝑒superscriptsubscriptπΈπ»π‘žπ‘›e\in E_{H}^{(q(n))} with an endpoint in Vksubscriptπ‘‰π‘˜V_{k} and the other in Vβ„“subscript𝑉ℓV_{\ell}, where kπ‘˜k, β„“βˆˆ{0,1,…,h}β„“01β€¦β„Ž\ell\in\{0,1,\ldots,h\} and β„“β‰₯k+2β„“π‘˜2\ell\geq k+2. Then NH(q​(n))​(Vk)∩Vβ„“β‰ βˆ…subscript𝑁superscriptπ»π‘žπ‘›subscriptπ‘‰π‘˜subscript𝑉ℓN_{H^{(q(n))}}(V_{k})\cap V_{\ell}\neq\emptyset, which together with Lemma 14 and β„“β‰₯k+2β„“π‘˜2\ell\geq k+2 implies

NH(q​(n))​(Vk)βŠˆβ‹ƒj=0k+1Vj.not-subset-of-or-equalssubscript𝑁superscriptπ»π‘žπ‘›subscriptπ‘‰π‘˜superscriptsubscript𝑗0π‘˜1subscript𝑉𝑗\displaystyle N_{H^{(q(n))}}\left(V_{k}\right)\not\subseteq\bigcup_{j=0}^{k+1}\,V_{j}.(33)

As β„“β‰₯k+2β„“π‘˜2\ell\geq k+2 and kπ‘˜k, β„“βˆˆ{0,1,…,h}β„“01β€¦β„Ž\ell\in\{0,1,\ldots,h\}, we have 0≀k≀hβˆ’20π‘˜β„Ž20\leq k\leq h-2.

  1. Case 1:

    k=0π‘˜0k=0. By equations (19) and (22), V0βŠ†Ssubscript𝑉0𝑆V_{0}\subseteq S. So NG(0)​(V0)=βˆ…subscript𝑁superscript𝐺0subscript𝑉0N_{G^{(0)}}(V_{0})=\emptyset by equations (4)–(5). Consequently, NH(q​(n))​(V0)=βˆ…subscript𝑁superscriptπ»π‘žπ‘›subscript𝑉0N_{H^{(q(n))}}(V_{0})=\emptyset by Lemma 4, contradicting relation (33).

  2. Case 2:

    k∈[hβˆ’2]π‘˜delimited-[]β„Ž2k\in[h-2]. Relation (33) contradicts equation (24) (with j←kβ†π‘—π‘˜j\leftarrow k).

A contradiction occurs in either case. ∎

Lemma 20.

EH(q​(n))βŠ†β„°superscriptsubscriptπΈπ»π‘žπ‘›β„°E_{H}^{(q(n))}\subseteq{\cal E}.

Proof.

By Lemma 19 and equation (27), EG(q​(n))∩EH(q​(n))βŠ†β„°superscriptsubscriptπΈπΊπ‘žπ‘›superscriptsubscriptπΈπ»π‘žπ‘›β„°E_{G}^{(q(n))}\cap E_{H}^{(q(n))}\subseteq{\cal E}. This and Lemma 4 complete the proof. ∎

Lemma 21.

Let P𝑃P be a path in 𝒒𝒒\cal G that visits no edges in {Ξ±^}Γ—(Vhβˆ–(BβˆͺS))^𝛼subscriptπ‘‰β„Žπ΅π‘†\{\hat{\alpha}\}\times(V_{h}\setminus(B\cup S)). If the first and the last vertices of P𝑃P are in Vhsubscriptπ‘‰β„ŽV_{h} and V1subscript𝑉1V_{1}, respectively, then w​(P)β‰₯hβˆ’1π‘€π‘ƒβ„Ž1w(P)\geq h-1.

Proof.

By Lemma 14, ⋃k=0hVk=[n]superscriptsubscriptπ‘˜0β„Žsubscriptπ‘‰π‘˜delimited-[]𝑛\bigcup_{k=0}^{h}\,V_{k}=[n], Vi+1∩Vi=βˆ…subscript𝑉𝑖1subscript𝑉𝑖V_{i+1}\cap V_{i}=\emptyset and (Vi+1Γ—Vi)∩(Vj+1Γ—Vj)=βˆ…subscript𝑉𝑖1subscript𝑉𝑖subscript𝑉𝑗1subscript𝑉𝑗(V_{i+1}\times V_{i})\cap(V_{j+1}\times V_{j})=\emptyset for all distinct i𝑖i, j∈[hβˆ’1]𝑗delimited-[]β„Ž1j\in[h-1]. Because P𝑃P is a path in 𝒒𝒒\cal G visiting no edges in {Ξ±^}Γ—(Vhβˆ–(BβˆͺS))^𝛼subscriptπ‘‰β„Žπ΅π‘†\{\hat{\alpha}\}\times(V_{h}\setminus(B\cup S)), no edges on P𝑃P are in ViΓ—Vjsubscript𝑉𝑖subscript𝑉𝑗V_{i}\times V_{j} for any i𝑖i, j∈{0,1,…,h}𝑗01β€¦β„Žj\in\{0,1,\ldots,h\} with |iβˆ’j|β‰₯2𝑖𝑗2|i-j|\geq 2 by equations (27) and (31). This forces P𝑃P, which is a Vhsubscriptπ‘‰β„ŽV_{h}-V1subscript𝑉1V_{1} path, to visit at least one edge in Vi+1Γ—Visubscript𝑉𝑖1subscript𝑉𝑖V_{i+1}\times V_{i} for each i∈[hβˆ’1]𝑖delimited-[]β„Ž1i\in[h-1] (for a total of at least hβˆ’1β„Ž1h-1 edges). As Ξ±^βˆ‰β‹ƒi=1hVi^𝛼superscriptsubscript𝑖1β„Žsubscript𝑉𝑖\hat{\alpha}\notin\bigcup_{i=1}^{h}\,V_{i} by equations (22)–(25), equation (30) gives w​(u,v)=1𝑀𝑒𝑣1w(u,v)=1 for all (u,v)βˆˆβ‹ƒi=1hβˆ’1Vi+1Γ—Vi𝑒𝑣superscriptsubscript𝑖1β„Ž1subscript𝑉𝑖1subscript𝑉𝑖(u,v)\in\bigcup_{i=1}^{h-1}\,V_{i+1}\times V_{i}. We have shown that P𝑃P has at least hβˆ’1β„Ž1h-1 edges of weight (w.r.t. w𝑀w) 111. ∎

We proceed to analyze shortest aisubscriptπ‘Žπ‘–a_{i}-bisubscript𝑏𝑖b_{i} paths in 𝒒𝒒{\cal G}, where i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)]. Clearly, such paths must be simple.

Lemma 22.

Let P𝑃P be a shortest aisubscriptπ‘Žπ‘–a_{i}-bisubscript𝑏𝑖b_{i} path in 𝒒𝒒{\cal G}, where i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)]. If P𝑃P visits exactly one edge in {Ξ±^}Γ—(Vhβˆ–(BβˆͺS))^𝛼subscriptπ‘‰β„Žπ΅π‘†\{\hat{\alpha}\}\times(V_{h}\setminus(B\cup S)) and Ξ±^∈{ai,bi}^𝛼subscriptπ‘Žπ‘–subscript𝑏𝑖\hat{\alpha}\in\{a_{i},b_{i}\}, then w​(P)β‰₯hβˆ’1/2π‘€π‘ƒβ„Ž12w(P)\geq h-1/2.

Proof.

Being shortest, P𝑃P must be simple. Assume Ξ±^=ai^𝛼subscriptπ‘Žπ‘–\hat{\alpha}=a_{i} for now. Because P𝑃P is a simple Ξ±^^𝛼\hat{\alpha}-bisubscript𝑏𝑖b_{i} path in 𝒒𝒒{\cal G} visiting exactly one edge in {Ξ±^}Γ—(Vhβˆ–(BβˆͺS))^𝛼subscriptπ‘‰β„Žπ΅π‘†\{\hat{\alpha}\}\times(V_{h}\setminus(B\cup S)), it can be decomposed into an edge (Ξ±^,v)^𝛼𝑣(\hat{\alpha},v), where v∈Vhβˆ–(BβˆͺS)𝑣subscriptπ‘‰β„Žπ΅π‘†v\in V_{h}\setminus(B\cup S), and a v𝑣v-bisubscript𝑏𝑖b_{i} path P~~𝑃\tilde{P} in 𝒒𝒒{\cal G} that visits no edges in {Ξ±^}Γ—(Vhβˆ–(BβˆͺS))^𝛼subscriptπ‘‰β„Žπ΅π‘†\{\hat{\alpha}\}\times(V_{h}\setminus(B\cup S)).666If the first edge on P𝑃P is not in {Ξ±^}Γ—(Vhβˆ–(BβˆͺS))^𝛼subscriptπ‘‰β„Žπ΅π‘†\{\hat{\alpha}\}\times(V_{h}\setminus(B\cup S)), then P𝑃P’s later visit of an edge in {Ξ±^}Γ—(Vhβˆ–(BβˆͺS))^𝛼subscriptπ‘‰β„Žπ΅π‘†\{\hat{\alpha}\}\times(V_{h}\setminus(B\cup S)) must make P𝑃P non-simple, a contradiction. As Ξ±^=ai^𝛼subscriptπ‘Žπ‘–\hat{\alpha}=a_{i}, we have bi∈NQ(q​(n))​(Ξ±^)subscript𝑏𝑖subscript𝑁superscriptπ‘„π‘žπ‘›^𝛼b_{i}\in N_{Q^{(q(n))}}(\hat{\alpha}) by line 16 of Adv. So by equations (22)–(23), bi∈V1βˆͺ{Ξ±^}subscript𝑏𝑖subscript𝑉1^𝛼b_{i}\in V_{1}\cup\{\hat{\alpha}\}, implying bi∈V1subscript𝑏𝑖subscript𝑉1b_{i}\in V_{1} because querying for the distance from a point to itself is forbidden and Ξ±^=ai^𝛼subscriptπ‘Žπ‘–\hat{\alpha}=a_{i}. In summary, P~~𝑃\tilde{P} is a path in 𝒒𝒒\cal G, from v∈Vhβˆ–(BβˆͺS)𝑣subscriptπ‘‰β„Žπ΅π‘†v\in V_{h}\setminus(B\cup S) to bi∈V1subscript𝑏𝑖subscript𝑉1b_{i}\in V_{1}, that visits no edges in {Ξ±^}Γ—(Vhβˆ–(BβˆͺS))^𝛼subscriptπ‘‰β„Žπ΅π‘†\{\hat{\alpha}\}\times(V_{h}\setminus(B\cup S)). So by Lemma 21 (with P←P~←𝑃~𝑃P\leftarrow\tilde{P}),

w​(P~)β‰₯hβˆ’1.𝑀~π‘ƒβ„Ž1\displaystyle w\left(\tilde{P}\right)\geq h-1.(34)

As v∈Vh𝑣subscriptπ‘‰β„Žv\in V_{h}, we have Ξ±^β‰ v^𝛼𝑣\hat{\alpha}\neq v by equations (22) and (25). By the construction of P~~𝑃\tilde{P},

w​(P)=w​(Ξ±^,v)+w​(P~)β‰₯(30)12+w​(P~).𝑀𝑃𝑀^𝛼𝑣𝑀~𝑃superscript(30)12𝑀~𝑃\displaystyle w(P)=w\left(\hat{\alpha},v\right)+w\left(\tilde{P}\right)\stackrel{{\scriptstyle\text{(\ref{newedgeweightfunction})}}}{{\geq}}\frac{1}{2}+w\left(\tilde{P}\right).(35)

Inequalities (34)–(35) show that w​(P)β‰₯hβˆ’1/2π‘€π‘ƒβ„Ž12w(P)\geq h-1/2. The case of Ξ±^=bi^𝛼subscript𝑏𝑖\hat{\alpha}=b_{i} is symmetric: Reverse P𝑃P and exchange all the above occurrences of β€œaisubscriptπ‘Žπ‘–a_{i}” with β€œbisubscript𝑏𝑖b_{i}.” ∎

Lemma 23.

For all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)] with Ξ±^∈{ai,bi}^𝛼subscriptπ‘Žπ‘–subscript𝑏𝑖\hat{\alpha}\in\{a_{i},b_{i}\},

χ​[βˆƒv∈{ai,bi},(v∈S)∧(degQ(i)​(v)≀δ​n1/(hβˆ’1))]=1.πœ’delimited-[]𝑣subscriptπ‘Žπ‘–subscript𝑏𝑖𝑣𝑆subscriptdegsuperscript𝑄𝑖𝑣𝛿superscript𝑛1β„Ž11\chi\left[\exists v\in\left\{a_{i},b_{i}\right\},\,\left(v\in S\right)\land\left(\text{\rm deg}_{Q^{(i)}}(v)\leq\delta n^{1/(h-1)}\right)\right]=1.
Proof.

By equation (19), Ξ±^∈S^𝛼𝑆\hat{\alpha}\in S. This and Lemma 13 complete the proof. ∎

Lemma 24.

For all distinct u𝑒u, v∈[n]βˆ–(BβˆͺS)𝑣delimited-[]𝑛𝐡𝑆v\in[n]\setminus(B\cup S), we have (u,v)∈EG(q​(n))𝑒𝑣superscriptsubscriptπΈπΊπ‘žπ‘›(u,v)\in E_{G}^{(q(n))}.

Proof.

As u𝑒u, v∈[n]βˆ–B𝑣delimited-[]𝑛𝐡v\in[n]\setminus B, equation (26) implies

degH(i)​(u)subscriptdegsuperscript𝐻𝑖𝑒\displaystyle\text{\rm deg}_{H^{(i)}}(u)<\displaystyle<δ​n1/(hβˆ’1)βˆ’2,𝛿superscript𝑛1β„Ž12\displaystyle\delta n^{1/(h-1)}-2,(36)
degH(i)​(v)subscriptdegsuperscript𝐻𝑖𝑣\displaystyle\text{\rm deg}_{H^{(i)}}(v)<\displaystyle<δ​n1/(hβˆ’1)βˆ’2𝛿superscript𝑛1β„Ž12\displaystyle\delta n^{1/(h-1)}-2(37)

when i=q​(n)π‘–π‘žπ‘›i=q(n). So by Lemma 4, inequalities (36)–(37) hold for all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)].

As u𝑒u, v∈[n]βˆ–S𝑣delimited-[]𝑛𝑆v\in[n]\setminus S and uβ‰ v𝑒𝑣u\neq v, we have (u,v)∈EG(0)𝑒𝑣superscriptsubscript𝐸𝐺0(u,v)\in E_{G}^{(0)} by equation (4). By lines 8 and 13 of Adv,

EG(iβˆ’1)βˆ–{(x,y)∈[n]2∣(degH(i)​(x)β‰₯δ​n1/(hβˆ’1)βˆ’2)∨(degH(i)​(y)β‰₯δ​n1/(hβˆ’1)βˆ’2)}βŠ†EG(i)superscriptsubscript𝐸𝐺𝑖1conditional-setπ‘₯𝑦superscriptdelimited-[]𝑛2subscriptdegsuperscript𝐻𝑖π‘₯𝛿superscript𝑛1β„Ž12subscriptdegsuperscript𝐻𝑖𝑦𝛿superscript𝑛1β„Ž12superscriptsubscript𝐸𝐺𝑖\displaystyle E_{G}^{(i-1)}\setminus\left\{\left(x,y\right)\in[n]^{2}\mid\left(\text{deg}_{H^{(i)}}(x)\geq\delta n^{1/(h-1)}-2\right)\lor\left(\text{deg}_{H^{(i)}}(y)\geq\delta n^{1/(h-1)}-2\right)\right\}\subseteq E_{G}^{(i)}(38)

for all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)]. By inequalities (36)–(37) and relation (38), (u,v)∈EG(i)𝑒𝑣superscriptsubscript𝐸𝐺𝑖(u,v)\in E_{G}^{(i)} if (u,v)∈EG(iβˆ’1)𝑒𝑣superscriptsubscript𝐸𝐺𝑖1(u,v)\in E_{G}^{(i-1)}, for all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)]. The proof is complete by mathematical induction. ∎

Lemma 25.

Let P𝑃P be a shortest aisubscriptπ‘Žπ‘–a_{i}-bisubscript𝑏𝑖b_{i} path in 𝒒𝒒{\cal G}, where i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)]. If P𝑃P visits exactly two edges in {Ξ±^}Γ—(Vhβˆ–(BβˆͺS))^𝛼subscriptπ‘‰β„Žπ΅π‘†\{\hat{\alpha}\}\times(V_{h}\setminus(B\cup S)), then G(q​(n))superscriptπΊπ‘žπ‘›G^{(q(n))} has an aisubscriptπ‘Žπ‘–a_{i}-bisubscript𝑏𝑖b_{i} path with exactly w​(P)𝑀𝑃w(P) edges.

Proof.

Being shortest, P𝑃P must be simple. Therefore, the two edges of P𝑃P in {Ξ±^}Γ—(Vhβˆ–(BβˆͺS))^𝛼subscriptπ‘‰β„Žπ΅π‘†\{\hat{\alpha}\}\times(V_{h}\setminus(B\cup S)), denoted (u,Ξ±^)𝑒^𝛼(u,\hat{\alpha}) and (Ξ±^,v)^𝛼𝑣(\hat{\alpha},v), are consecutive on P𝑃P. Clearly, uβ‰ v𝑒𝑣u\neq v. Replace the subpath (u,Ξ±^,v)𝑒^𝛼𝑣(u,\hat{\alpha},v) of P𝑃P by the edge (u,v)𝑒𝑣(u,v) to yield an aisubscriptπ‘Žπ‘–a_{i}-bisubscript𝑏𝑖b_{i} path P~~𝑃\tilde{P}. Except for the two edges of P𝑃P in {Ξ±~}Γ—(Vhβˆ–(BβˆͺS))~𝛼subscriptπ‘‰β„Žπ΅π‘†\{\tilde{\alpha}\}\times(V_{h}\setminus(B\cup S)) (which are (u,Ξ±^)𝑒^𝛼(u,\hat{\alpha}) and (Ξ±^,v)^𝛼𝑣(\hat{\alpha},v)), all edges of P𝑃P are in EG(q​(n))superscriptsubscriptπΈπΊπ‘žπ‘›E_{G}^{(q(n))} by equation (27) and P𝑃P’s being a path in 𝒒=([n],β„°,w)𝒒delimited-[]𝑛ℰ𝑀{\cal G}=([n],{\cal E},w). As u𝑒u, v∈Vhβˆ–(BβˆͺS)𝑣subscriptπ‘‰β„Žπ΅π‘†v\in V_{h}\setminus(B\cup S) and uβ‰ v𝑒𝑣u\neq v, (u,v)∈EG(q​(n))𝑒𝑣superscriptsubscriptπΈπΊπ‘žπ‘›(u,v)\in E_{G}^{(q(n))} by Lemma 24. In summary, all the edges of P~~𝑃\tilde{P} (including (u,v)𝑒𝑣(u,v) and the edges of P𝑃P not in {Ξ±^}Γ—(Vhβˆ–(BβˆͺS))^𝛼subscriptπ‘‰β„Žπ΅π‘†\{\hat{\alpha}\}\times(V_{h}\setminus(B\cup S))) are in EG(q​(n))superscriptsubscriptπΈπΊπ‘žπ‘›E_{G}^{(q(n))}. Consequently, P~~𝑃\tilde{P} is an aisubscriptπ‘Žπ‘–a_{i}-bisubscript𝑏𝑖b_{i} path in G(q​(n))=([n],EG(q​(n)))superscriptπΊπ‘žπ‘›delimited-[]𝑛superscriptsubscriptπΈπΊπ‘žπ‘›G^{(q(n))}=([n],E_{G}^{(q(n))}). So we are left only to prove that P~~𝑃\tilde{P} has exactly w​(P)𝑀𝑃w(P) edges, which, by Lemma 18 (with P←P~←𝑃~𝑃P\leftarrow\tilde{P} and i←q​(n)β†π‘–π‘žπ‘›i\leftarrow q(n)), is equivalent to proving w​(P~)=w​(P)𝑀~𝑃𝑀𝑃w(\tilde{P})=w(P).

Note that Ξ±^βˆ‰Vhβˆ–(BβˆͺS)^𝛼subscriptπ‘‰β„Žπ΅π‘†\hat{\alpha}\notin V_{h}\setminus(B\cup S) by equation (19). By the construction of P~~𝑃\tilde{P} and recalling that u𝑒u, v∈Vhβˆ–(BβˆͺS)𝑣subscriptπ‘‰β„Žπ΅π‘†v\in V_{h}\setminus(B\cup S) and uβ‰ v𝑒𝑣u\neq v,

w​(P~)=w​(P)βˆ’w​(u,Ξ±^)βˆ’w​(Ξ±^,v)+w​(u,v)=(30)w​(P)βˆ’12βˆ’12+1=w​(P).𝑀~𝑃𝑀𝑃𝑀𝑒^𝛼𝑀^𝛼𝑣𝑀𝑒𝑣superscript(30)𝑀𝑃12121𝑀𝑃w\left(\tilde{P}\right)=w(P)-w\left(u,\hat{\alpha}\right)-w\left(\hat{\alpha},v\right)+w\left(u,v\right)\stackrel{{\scriptstyle\text{(\ref{newedgeweightfunction})}}}{{=}}w(P)-\frac{1}{2}-\frac{1}{2}+1=w(P).

∎

Lemma 26.

Every simple path in 𝒒𝒒\cal G visiting exactly one edge in {Ξ±^}Γ—(Vhβˆ–(BβˆͺS))^𝛼subscriptπ‘‰β„Žπ΅π‘†\{\hat{\alpha}\}\times(V_{h}\setminus(B\cup S)) either starts or ends at Ξ±^^𝛼\hat{\alpha}.

Proof.

By equation (19), Ξ±^∈S^𝛼𝑆\hat{\alpha}\in S. So by equation (4) and Lemma 4, Ξ±^^𝛼\hat{\alpha} is incident to no edges in EG(q​(n))superscriptsubscriptπΈπΊπ‘žπ‘›E_{G}^{(q(n))}. Consequently, the set of all edges of 𝒒𝒒\cal G incident to Ξ±^^𝛼\hat{\alpha} is {Ξ±^}Γ—(Vhβˆ–(BβˆͺS))^𝛼subscriptπ‘‰β„Žπ΅π‘†\{\hat{\alpha}\}\times(V_{h}\setminus(B\cup S)) by equation (27). The lemma is now easy to see. ∎

Lemma 27.

For all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)],

min⁑{dH(i)​(ai,bi),hβˆ’12⋅χ​[βˆƒv∈{ai,bi},(v∈S)∧(degQ(i)​(v)≀δ​n1/(hβˆ’1))]}subscript𝑑superscript𝐻𝑖subscriptπ‘Žπ‘–subscriptπ‘π‘–β„Žβ‹…12πœ’delimited-[]𝑣subscriptπ‘Žπ‘–subscript𝑏𝑖𝑣𝑆subscriptdegsuperscript𝑄𝑖𝑣𝛿superscript𝑛1β„Ž1\displaystyle\min\left\{d_{H^{(i)}}\left(a_{i},b_{i}\right),h-\frac{1}{2}\cdot\chi\left[\exists v\in\left\{a_{i},b_{i}\right\},\,\left(v\in S\right)\land\left(\text{\rm deg}_{Q^{(i)}}(v)\leq\delta n^{1/(h-1)}\right)\right]\right\}(39)
≀\displaystyle\leqmin⁑{d𝒒​(ai,bi),hβˆ’12⋅χ​[βˆƒv∈{ai,bi},(v∈S)∧(degQ(i)​(v)≀δ​n1/(hβˆ’1))]}.subscript𝑑𝒒subscriptπ‘Žπ‘–subscriptπ‘π‘–β„Žβ‹…12πœ’delimited-[]𝑣subscriptπ‘Žπ‘–subscript𝑏𝑖𝑣𝑆subscriptdegsuperscript𝑄𝑖𝑣𝛿superscript𝑛1β„Ž1\displaystyle\min\left\{d_{\cal G}\left(a_{i},b_{i}\right),h-\frac{1}{2}\cdot\chi\left[\exists v\in\left\{a_{i},b_{i}\right\},\,\left(v\in S\right)\land\left(\text{\rm deg}_{Q^{(i)}}(v)\leq\delta n^{1/(h-1)}\right)\right]\right\}.\,\,\,\,\,\,\,\,\,\,\,\,\,
Proof.

Assume the existence of an aisubscriptπ‘Žπ‘–a_{i}-bisubscript𝑏𝑖b_{i} path in 𝒒𝒒{\cal G} for, otherwise, d𝒒​(ai,bi)=∞subscript𝑑𝒒subscriptπ‘Žπ‘–subscript𝑏𝑖d_{\cal G}(a_{i},b_{i})=\infty and inequality (39) trivially holds. Pick any shortest aisubscriptπ‘Žπ‘–a_{i}-bisubscript𝑏𝑖b_{i} path P𝑃P in 𝒒=([n],β„°,w)𝒒delimited-[]𝑛ℰ𝑀{\cal G}=([n],{\cal E},w). Clearly,

w​(P)=d𝒒​(ai,bi).𝑀𝑃subscript𝑑𝒒subscriptπ‘Žπ‘–subscript𝑏𝑖\displaystyle w(P)=d_{\cal G}\left(a_{i},b_{i}\right).(40)

Being shortest, P𝑃P must be simple.

We establish inequality (39) in the following exhaustive cases:

  1. Case 1:

    P𝑃P visits no edges in {Ξ±^}Γ—(Vhβˆ–(BβˆͺS))^𝛼subscriptπ‘‰β„Žπ΅π‘†\{\hat{\alpha}\}\times(V_{h}\setminus(B\cup S)). By equation (27), all edges of P𝑃P are in EG(q​(n))superscriptsubscriptπΈπΊπ‘žπ‘›E_{G}^{(q(n))}, i.e., P𝑃P is a path in G(q​(n))superscriptπΊπ‘žπ‘›G^{(q(n))}. So by Lemma 18 (with i←q​(n)β†π‘–π‘žπ‘›i\leftarrow q(n)), w​(P)𝑀𝑃w(P) equals the length of P𝑃P in the unweighted graph G(q​(n))superscriptπΊπ‘žπ‘›G^{(q(n))}. Therefore,

    dG(q​(n))​(ai,bi)≀w​(P).subscript𝑑superscriptπΊπ‘žπ‘›subscriptπ‘Žπ‘–subscript𝑏𝑖𝑀𝑃\displaystyle d_{G^{(q(n))}}\left(a_{i},b_{i}\right)\leq w(P).(41)

    If dG(iβˆ’1)​(ai,bi)≀hsubscript𝑑superscript𝐺𝑖1subscriptπ‘Žπ‘–subscriptπ‘π‘–β„Žd_{G^{(i-1)}}(a_{i},b_{i})\leq h, then

    dH(i)​(ai,bi)=dG(q​(n))​(ai,bi)subscript𝑑superscript𝐻𝑖subscriptπ‘Žπ‘–subscript𝑏𝑖subscript𝑑superscriptπΊπ‘žπ‘›subscriptπ‘Žπ‘–subscript𝑏𝑖d_{H^{(i)}}\left(a_{i},b_{i}\right)=d_{G^{(q(n))}}\left(a_{i},b_{i}\right)

    by Lemma 5. Otherwise, dG(q​(n))​(ai,bi)>hsubscript𝑑superscriptπΊπ‘žπ‘›subscriptπ‘Žπ‘–subscriptπ‘π‘–β„Žd_{G^{(q(n))}}(a_{i},b_{i})>h by Lemma 6. In either case, equations (40)–(41) imply inequality (39).

  2. Case 2:

    P𝑃P visits exactly one edge in {Ξ±^}Γ—(Vhβˆ–(BβˆͺS))^𝛼subscriptπ‘‰β„Žπ΅π‘†\{\hat{\alpha}\}\times(V_{h}\setminus(B\cup S)) and Ξ±^∈{ai,bi}^𝛼subscriptπ‘Žπ‘–subscript𝑏𝑖\hat{\alpha}\in\{a_{i},b_{i}\}. By Lemma 22 and equation (40), d𝒒​(ai,bi)β‰₯hβˆ’1/2subscript𝑑𝒒subscriptπ‘Žπ‘–subscriptπ‘π‘–β„Ž12d_{\cal G}(a_{i},b_{i})\geq h-1/2. This and Lemma 23 force the right-hand side of inequality (39) to equal hβˆ’1/2β„Ž12h-1/2. By Lemma 23, the left-hand side of inequality (39) is less than or equal to hβˆ’1/2β„Ž12h-1/2. We have verified inequality (39).

  3. Case 3:

    P𝑃P visits exactly one edge in {Ξ±^}Γ—(Vhβˆ–(BβˆͺS))^𝛼subscriptπ‘‰β„Žπ΅π‘†\{\hat{\alpha}\}\times(V_{h}\setminus(B\cup S)) and Ξ±^βˆ‰{ai,bi}^𝛼subscriptπ‘Žπ‘–subscript𝑏𝑖\hat{\alpha}\notin\{a_{i},b_{i}\}. A contradiction to Lemma 26 occurs.

  4. Case 4:

    P𝑃P visits exactly two edges in {Ξ±^}Γ—(Vhβˆ–(BβˆͺS))^𝛼subscriptπ‘‰β„Žπ΅π‘†\{\hat{\alpha}\}\times(V_{h}\setminus(B\cup S)). Lemma 25 and that G(q​(n))superscriptπΊπ‘žπ‘›G^{(q(n))} is unweighted imply inequality (41). Proceeding as in Case 1, equations (40)–(41) and Lemmas 5–6 imply inequality (39) no matter dG(iβˆ’1)​(ai,bi)≀hsubscript𝑑superscript𝐺𝑖1subscriptπ‘Žπ‘–subscriptπ‘π‘–β„Žd_{G^{(i-1)}}(a_{i},b_{i})\leq h or otherwise.

  5. Case 5:

    P𝑃P visits at least three edges in {Ξ±^}Γ—(Vhβˆ–(BβˆͺS))^𝛼subscriptπ‘‰β„Žπ΅π‘†\{\hat{\alpha}\}\times(V_{h}\setminus(B\cup S)). Clearly, P𝑃P is non-simple, a contradiction.

∎

Define d:[n]2β†’[0,∞):𝑑→superscriptdelimited-[]𝑛20d\colon[n]^{2}\to[0,\infty) by

d​(ai,bi)=d​(bi,ai)𝑑subscriptπ‘Žπ‘–subscript𝑏𝑖𝑑subscript𝑏𝑖subscriptπ‘Žπ‘–\displaystyle d\left(a_{i},b_{i}\right)=d\left(b_{i},a_{i}\right)
=def.superscriptdef.\displaystyle\stackrel{{\scriptstyle\text{def.}}}{{=}}min⁑{d𝒒​(ai,bi),hβˆ’12⋅χ​[βˆƒv∈{ai,bi},(v∈S)∧(degQ(i)​(v)≀δ​n1/(hβˆ’1))]},subscript𝑑𝒒subscriptπ‘Žπ‘–subscriptπ‘π‘–β„Žβ‹…12πœ’delimited-[]𝑣subscriptπ‘Žπ‘–subscript𝑏𝑖𝑣𝑆subscriptdegsuperscript𝑄𝑖𝑣𝛿superscript𝑛1β„Ž1\displaystyle\min\left\{d_{\cal G}\left(a_{i},b_{i}\right),h-\frac{1}{2}\cdot\chi\left[\exists v\in\left\{a_{i},b_{i}\right\},\,\left(v\in S\right)\land\left(\text{deg}_{Q^{(i)}}(v)\leq\delta n^{1/(h-1)}\right)\right]\right\},\,\,\,\,\,\,\,\,\,\,
d​(u,v)𝑑𝑒𝑣\displaystyle d\left(u,v\right)
=def.superscriptdef.\displaystyle\stackrel{{\scriptstyle\text{def.}}}{{=}}min⁑{d𝒒​(u,v),h}subscriptπ‘‘π’’π‘’π‘£β„Ž\displaystyle\min\left\{d_{\cal G}\left(u,v\right),h\right\}(43)

for all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)] and (u,v)∈[n]2βˆ–{(aj,bj)∣j∈[q​(n)]}𝑒𝑣superscriptdelimited-[]𝑛2conditional-setsubscriptπ‘Žπ‘—subscript𝑏𝑗𝑗delimited-[]π‘žπ‘›(u,v)\in[n]^{2}\setminus\{(a_{j},b_{j})\mid j\in[q(n)]\}. Because all pairs in [n]2superscriptdelimited-[]𝑛2[n]^{2} are unordered in this section, (bi,ai)βˆ‰[n]2βˆ–{(aj,bj)∣j∈[q​(n)]}subscript𝑏𝑖subscriptπ‘Žπ‘–superscriptdelimited-[]𝑛2conditional-setsubscriptπ‘Žπ‘—subscript𝑏𝑗𝑗delimited-[]π‘žπ‘›(b_{i},a_{i})\notin[n]^{2}\setminus\{(a_{j},b_{j})\mid j\in[q(n)]\} for all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)]. Consequently, equation (43) does not redefine d​(bi,ai)𝑑subscript𝑏𝑖subscriptπ‘Žπ‘–d(b_{i},a_{i}). Because 𝒒𝒒{\cal G} is undirected, the right-hand side of equation (43) remains intact with u𝑒u and v𝑣v interchanged. As A𝐴A does not repeat queries, equation (3.3) defines d​(ai,bi)𝑑subscriptπ‘Žπ‘–subscript𝑏𝑖d(a_{i},b_{i}) and d​(bi,ai)𝑑subscript𝑏𝑖subscriptπ‘Žπ‘–d(b_{i},a_{i}) only once for each i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)] (note that forbidding repeated queries implies the nonexistence of distinct i𝑖i, j∈[q​(n)]𝑗delimited-[]π‘žπ‘›j\in[q(n)] satisfying (1) ai=ajsubscriptπ‘Žπ‘–subscriptπ‘Žπ‘—a_{i}=a_{j} and bi=bjsubscript𝑏𝑖subscript𝑏𝑗b_{i}=b_{j} or (2) ai=bjsubscriptπ‘Žπ‘–subscript𝑏𝑗a_{i}=b_{j} and bi=ajsubscript𝑏𝑖subscriptπ‘Žπ‘—b_{i}=a_{j}). It is now clear that d​(β‹…,β‹…)𝑑⋅⋅d(\cdot,\cdot) is a well-defined function on [n]2superscriptdelimited-[]𝑛2[n]^{2}, a set of unordered pairs.777Even if we considered each pair in [n]2superscriptdelimited-[]𝑛2[n]^{2} to be ordered, our arguments would still have shown that d​(β‹…,β‹…)𝑑⋅⋅d(\cdot,\cdot) is well-defined and symmetric. So we have the following lemma.

Lemma 28.

For all xπ‘₯x, y∈[n]𝑦delimited-[]𝑛y\in[n], d​(x,y)=d​(y,x)𝑑π‘₯𝑦𝑑𝑦π‘₯d(x,y)=d(y,x).

Lemma 29.

For all distinct xπ‘₯x, y∈[n]𝑦delimited-[]𝑛y\in[n], d​(x,x)=0𝑑π‘₯π‘₯0d(x,x)=0 and d​(x,y)β‰₯1/2𝑑π‘₯𝑦12d(x,y)\geq 1/2.

Proof.

Recall that 𝒒=([n],β„°,w)𝒒delimited-[]𝑛ℰ𝑀{\cal G}=([n],{\cal E},w). As Im(w)βŠ†[1/2,∞)Im𝑀12\mathop{\mathrm{Im}}(w)\subseteq[1/2,\infty) by equation (30), we have d𝒒​(x,y)subscript𝑑𝒒π‘₯𝑦d_{\cal G}(x,y), d𝒒​(y,x)β‰₯1/2subscript𝑑𝒒𝑦π‘₯12d_{\cal G}(y,x)\geq 1/2. So by equations (3.3)–(43) and hβˆˆβ„€+βˆ–{1}β„Žsuperscriptβ„€1h\in\mathbb{Z}^{+}\setminus\{1\}, d​(x,y)β‰₯1/2𝑑π‘₯𝑦12d(x,y)\geq 1/2. Because we forbid queries for the distance from a point to itself, d​(x,x)𝑑π‘₯π‘₯d(x,x) is not defined by equations (3.3). By equation (43), d​(x,x)=0𝑑π‘₯π‘₯0d(x,x)=0. ∎

Lemma 30.

([n],d)delimited-[]𝑛𝑑([n],d)is a metric space.

Proof.

By Lemmas 28–29, we only need to show that

d​(x,y)+d​(y,z)β‰₯d​(x,z)𝑑π‘₯𝑦𝑑𝑦𝑧𝑑π‘₯𝑧\displaystyle d\left(x,y\right)+d\left(y,z\right)\geq d\left(x,z\right)(44)

for all xπ‘₯x, y𝑦y, z∈[n]𝑧delimited-[]𝑛z\in[n]. It is well-known that a positively-weighted undirected graph induces a distance function obeying the triangle inequality; hence

d𝒒​(x,y)+d𝒒​(y,z)β‰₯d𝒒​(x,z).subscript𝑑𝒒π‘₯𝑦subscript𝑑𝒒𝑦𝑧subscript𝑑𝒒π‘₯𝑧\displaystyle d_{\cal G}\left(x,y\right)+d_{\cal G}\left(y,z\right)\geq d_{\cal G}\left(x,z\right).(45)

Because 𝒒𝒒\cal G is undirected, d𝒒​(β‹…,β‹…)subscript𝑑𝒒⋅⋅d_{\cal G}(\cdot,\cdot) is symmetric. So by equations (3.3)–(43),

d​(x,y)∈{min⁑{d𝒒​(x,y),h},min⁑{d𝒒​(x,y),hβˆ’12}}𝑑π‘₯𝑦subscript𝑑𝒒π‘₯π‘¦β„Žsubscript𝑑𝒒π‘₯π‘¦β„Ž12\displaystyle d\left(x,y\right)\in\left\{\min\left\{d_{\cal G}\left(x,y\right),h\right\},\min\left\{d_{\cal G}\left(x,y\right),h-\frac{1}{2}\right\}\right\}(46)

for all xπ‘₯x, y∈[n]𝑦delimited-[]𝑛y\in[n]. Now verify inequality (44) in the following exhaustive (but not mutually exclusive) cases:

  1. Case 1:

    x=yπ‘₯𝑦x=y, y=z𝑦𝑧y=z or x=zπ‘₯𝑧x=z. Lemma 29 implies inequality (44).

  2. Case 2:

    d𝒒​(x,y)β‰₯hβˆ’1/2subscript𝑑𝒒π‘₯π‘¦β„Ž12d_{\cal G}(x,y)\geq h-1/2 and yβ‰ z𝑦𝑧y\neq z. By relation (46), d​(x,y)β‰₯hβˆ’1/2𝑑π‘₯π‘¦β„Ž12d(x,y)\geq h-1/2. As yβ‰ z𝑦𝑧y\neq z, d​(y,z)β‰₯1/2𝑑𝑦𝑧12d(y,z)\geq 1/2 by Lemma 29. By relation (46), d​(x,z)≀h𝑑π‘₯π‘§β„Žd(x,z)\leq h. Summarizing the above proves inequality (44).

  3. Case 3:

    d𝒒​(y,z)β‰₯hβˆ’1/2subscriptπ‘‘π’’π‘¦π‘§β„Ž12d_{\cal G}(y,z)\geq h-1/2 and xβ‰ yπ‘₯𝑦x\neq y. Replace β€œ(x,y)π‘₯𝑦(x,y),” β€œ(y,z)𝑦𝑧(y,z)” and β€œyβ‰ z𝑦𝑧y\neq z” in the analysis of Case 2 by β€œ(y,z)𝑦𝑧(y,z),” β€œ(x,y)π‘₯𝑦(x,y)” and β€œxβ‰ yπ‘₯𝑦x\neq y,” respectively.

  4. Case 4:

    d𝒒​(x,y)<hβˆ’1/2subscript𝑑𝒒π‘₯π‘¦β„Ž12d_{\cal G}(x,y)<h-1/2 and d𝒒​(y,z)<hβˆ’1/2subscriptπ‘‘π’’π‘¦π‘§β„Ž12d_{\cal G}(y,z)<h-1/2. By relation (46), d​(x,y)=d𝒒​(x,y)𝑑π‘₯𝑦subscript𝑑𝒒π‘₯𝑦d(x,y)=d_{\cal G}(x,y) and d​(y,z)=d𝒒​(y,z)𝑑𝑦𝑧subscript𝑑𝒒𝑦𝑧d(y,z)=d_{\cal G}(y,z). So inequalities (44)–(45) share a common left-hand side. To deduce inequality (44) from inequality (45), therefore, it suffices to show that d𝒒​(x,z)β‰₯d​(x,z)subscript𝑑𝒒π‘₯𝑧𝑑π‘₯𝑧d_{\cal G}(x,z)\geq d(x,z), which follows from relation (46).

∎

Lemma 31.

For all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)],

dH(i)​(ai,bi)β‰₯d𝒒​(ai,bi).subscript𝑑superscript𝐻𝑖subscriptπ‘Žπ‘–subscript𝑏𝑖subscript𝑑𝒒subscriptπ‘Žπ‘–subscript𝑏𝑖d_{H^{(i)}}\left(a_{i},b_{i}\right)\geq d_{\cal G}\left(a_{i},b_{i}\right).
Proof.

Assume the existence of an aisubscriptπ‘Žπ‘–a_{i}-bisubscript𝑏𝑖b_{i} path in H(i)superscript𝐻𝑖H^{(i)} for, otherwise, dH(i)​(ai,bi)=∞subscript𝑑superscript𝐻𝑖subscriptπ‘Žπ‘–subscript𝑏𝑖d_{H^{(i)}}(a_{i},b_{i})=\infty and there is nothing to prove. Take a shortest aisubscriptπ‘Žπ‘–a_{i}-bisubscript𝑏𝑖b_{i} path P𝑃P in the unweighted graph H(i)=([n],EH(i))superscript𝐻𝑖delimited-[]𝑛superscriptsubscript𝐸𝐻𝑖H^{(i)}=([n],E_{H}^{(i)}). So dH(i)​(ai,bi)subscript𝑑superscript𝐻𝑖subscriptπ‘Žπ‘–subscript𝑏𝑖d_{H^{(i)}}(a_{i},b_{i}) is the number of P𝑃P’s edges. By Lemma 18, P𝑃P’s number of edges equals w​(P)𝑀𝑃w(P). By Lemma 4, P𝑃P’s edges are in EH(q​(n))superscriptsubscriptπΈπ»π‘žπ‘›E_{H}^{(q(n))}. So by Lemma 20, P𝑃P is a path in 𝒒=([n],β„°,w)𝒒delimited-[]𝑛ℰ𝑀{\cal G}=([n],{\cal E},w), implying d𝒒​(ai,bi)≀w​(P)subscript𝑑𝒒subscriptπ‘Žπ‘–subscript𝑏𝑖𝑀𝑃d_{\cal G}(a_{i},b_{i})\leq w(P). Summarizing the above proves the lemma. ∎

The following lemma says that line 17 of Adv answers queries consistently with d​(β‹…,β‹…)𝑑⋅⋅d(\cdot,\cdot).

Lemma 32.

For all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)],

min⁑{dH(i)​(ai,bi),hβˆ’12⋅χ​[βˆƒv∈{ai,bi},(v∈S)∧(degQ(i)​(v)≀δ​n1/(hβˆ’1))]}subscript𝑑superscript𝐻𝑖subscriptπ‘Žπ‘–subscriptπ‘π‘–β„Žβ‹…12πœ’delimited-[]𝑣subscriptπ‘Žπ‘–subscript𝑏𝑖𝑣𝑆subscriptdegsuperscript𝑄𝑖𝑣𝛿superscript𝑛1β„Ž1\displaystyle\min\left\{d_{H^{(i)}}\left(a_{i},b_{i}\right),h-\frac{1}{2}\cdot\chi\left[\exists v\in\left\{a_{i},b_{i}\right\},\,\left(v\in S\right)\land\left(\text{\rm deg}_{Q^{(i)}}(v)\leq\delta n^{1/(h-1)}\right)\right]\right\}(47)
=\displaystyle=d​(ai,bi).𝑑subscriptπ‘Žπ‘–subscript𝑏𝑖\displaystyle d\left(a_{i},b_{i}\right).
Proof.

Lemma 27 and equation (3.3) prove the β€œβ‰€\leq” part of equation (47). On the other hand, Lemma 31 and equation (3.3) imply the β€œβ‰₯\geq” part of equation (47). ∎

3.4 Putting things together

We now arrive at our main result.

Theorem 33.

Metric 111-median has no deterministic o​(n1+1/(hβˆ’1))π‘œsuperscript𝑛11β„Ž1o(n^{1+1/(h-1)})-query (2​hβˆ’Ο΅)2β„Žitalic-Ο΅(2h-\epsilon)-approximation algorithms for any constants hβˆˆβ„€+βˆ–{1}β„Žsuperscriptβ„€1h\in\mathbb{Z}^{+}\setminus\{1\} and Ο΅>0italic-Ο΅0\epsilon>0.

Proof.

By Lemma 32 and line 17 of Adv, Adv answers A𝐴A’s queries consistently with d​(β‹…,β‹…)𝑑⋅⋅d(\cdot,\cdot). This implies that AAdvsuperscript𝐴AdvA^{\text{\sf Adv}} and Adsuperscript𝐴𝑑A^{d} have the same output.888See, e.g., [2, Lemma 8]. That is, Adsuperscript𝐴𝑑A^{d} outputs z𝑧z. By Lemma 30, ([n],d)delimited-[]𝑛𝑑([n],d) is a metric space.

By relation (46), d​(x,y)≀min⁑{d𝒒​(x,y),h}𝑑π‘₯𝑦subscript𝑑𝒒π‘₯π‘¦β„Žd(x,y)\leq\min\{d_{\cal G}(x,y),h\} for all xπ‘₯x, y∈[n]𝑦delimited-[]𝑛y\in[n]. Therefore,

βˆ‘v∈[n]d​(Ξ±^,v)≀nβ‹…(12+2​h​δhβˆ’1+h2Ξ΄β‹…o​(1)+h​δ)subscript𝑣delimited-[]𝑛𝑑^𝛼𝑣⋅𝑛122β„Žsuperscriptπ›Ώβ„Ž1β‹…superscriptβ„Ž2π›Ώπ‘œ1β„Žπ›Ώ\displaystyle\sum_{v\in[n]}\,d\left(\hat{\alpha},v\right)\leq n\cdot\left(\frac{1}{2}+2h\delta^{h-1}+\frac{h^{2}}{\delta}\cdot o(1)+h\delta\right)(48)

by Lemma 17.

Recall that A𝐴A does not repeat queries. So by equation (15) and Lemmas 28–29,

βˆ‘v∈[n]d​(z,v)β‰₯βˆ‘i∈Id​(ai,bi).subscript𝑣delimited-[]𝑛𝑑𝑧𝑣subscript𝑖𝐼𝑑subscriptπ‘Žπ‘–subscript𝑏𝑖\displaystyle\sum_{v\in[n]}\,d\left(z,v\right)\geq\sum_{i\in I}\,d\left(a_{i},b_{i}\right).
999In fact, this is an equality because A𝖠𝖽𝗏superscript𝐴𝖠𝖽𝗏A^{\sf Adv} will have queried for the distances between its output and all other points when halting.

By Lemmas 10 and 32,

βˆ‘i∈Id​(ai,bi)β‰₯nβ‹…(hβˆ’2​h​δhβˆ’1βˆ’o​(1)βˆ’Ξ΄).subscript𝑖𝐼𝑑subscriptπ‘Žπ‘–subscriptπ‘π‘–β‹…π‘›β„Ž2β„Žsuperscriptπ›Ώβ„Ž1π‘œ1𝛿\displaystyle\sum_{i\in I}\,d\left(a_{i},b_{i}\right)\geq n\cdot\left(h-2h\delta^{h-1}-o(1)-\delta\right).(49)

By inequalities (48)–(49),

βˆ‘v∈[n]d​(z,v)βˆ‘v∈[n]d​(Ξ±^,v)β‰₯hβˆ’2​h​δhβˆ’1βˆ’o​(1)βˆ’Ξ΄1/2+2​h​δhβˆ’1+(h2/Ξ΄)β‹…o​(1)+h​δ.subscript𝑣delimited-[]𝑛𝑑𝑧𝑣subscript𝑣delimited-[]𝑛𝑑^π›Όπ‘£β„Ž2β„Žsuperscriptπ›Ώβ„Ž1π‘œ1𝛿122β„Žsuperscriptπ›Ώβ„Ž1β‹…superscriptβ„Ž2π›Ώπ‘œ1β„Žπ›Ώ\displaystyle\frac{\sum_{v\in[n]}\,d\left(z,v\right)}{\sum_{v\in[n]}\,d\left(\hat{\alpha},v\right)}\geq\frac{h-2h\delta^{h-1}-o(1)-\delta}{1/2+2h\delta^{h-1}+(h^{2}/\delta)\cdot o(1)+h\delta}.(50)

Note that all the derivations so far have been valid for all constants hβˆˆβ„€+βˆ–{1}β„Žsuperscriptβ„€1h\in\mathbb{Z}^{+}\setminus\{1\} and δ∈(0,1)𝛿01\delta\in(0,1). Take Ξ΄=δ​(h,Ο΅)>0π›Ώπ›Ώβ„Žitalic-Ο΅0\delta=\delta(h,\epsilon)>0 to be sufficiently small and n𝑛n to be sufficiently large so that the right-hand side of inequality (50) is greater than 2​hβˆ’Ο΅2β„Žitalic-Ο΅2h-\epsilon.101010Alternatively, we may take Ξ΄=δ​(n)=(max⁑{q​(n),n}n1+1/(hβˆ’1))1/3𝛿𝛿𝑛superscriptπ‘žπ‘›π‘›superscript𝑛11β„Ž113\delta=\delta(n)=\left(\frac{\max\{q(n),n\}}{n^{1+1/(h-1)}}\right)^{1/3} from the beginning of this section. Then, as q​(n)=o​(n1+1/(hβˆ’1))π‘žπ‘›π‘œsuperscript𝑛11β„Ž1q(n)=o(n^{1+1/(h-1)}), the right-hand side of inequality (50) is 2​hβˆ’o​(1)2β„Žπ‘œ12h-o(1), and inequalities (1)–(3) remain true for all sufficiently large n𝑛n. Then inequality (50) forbids z𝑧z, which is the common output of A𝖠𝖽𝗏superscript𝐴𝖠𝖽𝗏A^{\sf Adv} and Adsuperscript𝐴𝑑A^{d}, from being a (2​hβˆ’Ο΅)2β„Žitalic-Ο΅(2h-\epsilon)-approximate 111-median of ([n],d)delimited-[]𝑛𝑑([n],d). Note that A𝐴A can be any deterministic o​(n1+1/(hβˆ’1))π‘œsuperscript𝑛11β„Ž1o(n^{1+1/(h-1)})-query algorithm from the beginning of this section. ∎

Next, we use Theorem 33 and Fact 1 to determine the minimum value of cβ‰₯1𝑐1c\geq 1 such that metric 111-median has a deterministic O​(n1+Ο΅)𝑂superscript𝑛1italic-Ο΅O(n^{1+\epsilon})-query (resp., O​(n1+Ο΅)𝑂superscript𝑛1italic-Ο΅O(n^{1+\epsilon})-time) c𝑐c-approximation algorithm, for each constant ϡ∈(0,1)italic-Ο΅01\epsilon\in(0,1).

Theorem 34.

For each constant ϡ∈(0,1)italic-ϡ01\epsilon\in(0,1),

min⁑{cβ‰₯1∣metric 1-median has a deterministic O​(n1+Ο΅)-query c-approx. alg.}𝑐conditional1metric 1-median has a deterministic O(n1+Ο΅)-query c-approx. alg.\displaystyle\min\left\{c\geq 1\mid\text{{\sc metric $1$-median} has a deterministic $O(n^{1+\epsilon})$-query $c$-approx.\ alg.}\right\}
=\displaystyle=min⁑{cβ‰₯1∣metric 1-median has a deterministic O​(n1+Ο΅)-time c-approx. alg.}𝑐conditional1metric 1-median has a deterministic O(n1+Ο΅)-time c-approx. alg.\displaystyle\min\left\{c\geq 1\mid\text{{\sc metric $1$-median} has a deterministic $O(n^{1+\epsilon})$-time $c$-approx.\ alg.}\right\}
=\displaystyle=2β€‹βŒˆ1Ο΅βŒ‰.21italic-Ο΅\displaystyle 2\left\lceil\frac{1}{\epsilon}\right\rceil.
Proof.

Take h=⌈1/Ο΅βŒ‰β„Ž1italic-Ο΅h=\lceil 1/\epsilon\rceil; hence hβˆˆβ„€+βˆ–{1}β„Žsuperscriptβ„€1h\in\mathbb{Z}^{+}\setminus\{1\}. It is easy to verify that n1+Ο΅=o​(n1+1/(hβˆ’1))superscript𝑛1italic-Ο΅π‘œsuperscript𝑛11β„Ž1n^{1+\epsilon}=o(n^{1+1/(h-1)}). So by Theorem 33, metric 111-median does not have a deterministic O​(n1+Ο΅)𝑂superscript𝑛1italic-Ο΅O(n^{1+\epsilon})-query (2β€‹βŒˆ1/Ο΅βŒ‰βˆ’Ο΅β€²)21italic-Ο΅superscriptitalic-Ο΅β€²(2\lceil 1/\epsilon\rceil-\epsilon^{\prime})-approximation algorithm for any constant Ο΅β€²>0superscriptitalic-Ο΅β€²0\epsilon^{\prime}>0.

Clearly, n1+1/h=O​(n1+Ο΅)superscript𝑛11β„Žπ‘‚superscript𝑛1italic-Ο΅n^{1+1/h}=O(n^{1+\epsilon}). So by Fact 1, metric 111-median has a deterministic O​(n1+Ο΅)𝑂superscript𝑛1italic-Ο΅O(n^{1+\epsilon})-time (2β€‹βŒˆ1/Ο΅βŒ‰)21italic-Ο΅(2\lceil 1/\epsilon\rceil)-approximation algorithm.

The above analyses remain valid with β€œquery” and β€œtime” exchanged because every O​(n1+Ο΅)𝑂superscript𝑛1italic-Ο΅O(n^{1+\epsilon})-time algorithm makes O​(n1+Ο΅)𝑂superscript𝑛1italic-Ο΅O(n^{1+\epsilon}) queries. Consequently, deterministic O​(n1+Ο΅)𝑂superscript𝑛1italic-Ο΅O(n^{1+\epsilon})-query (resp., O​(n1+Ο΅)𝑂superscript𝑛1italic-Ο΅O(n^{1+\epsilon})-time) algorithms can be (2β€‹βŒˆ1/Ο΅βŒ‰)21italic-Ο΅(2\lceil 1/\epsilon\rceil)-approximate but not (2β€‹βŒˆ1/Ο΅βŒ‰βˆ’Ο΅β€²)21italic-Ο΅superscriptitalic-Ο΅β€²(2\lceil 1/\epsilon\rceil-\epsilon^{\prime})-approximate for any constant Ο΅β€²>0superscriptitalic-Ο΅β€²0\epsilon^{\prime}>0. ∎

The brute-force exact algorithm for metric 111-median is well-known to run in O​(n2)𝑂superscript𝑛2O(n^{2}) time. Therefore, there is no need to extend Theorem 34 to the case of Ο΅β‰₯1italic-Ο΅1\epsilon\geq 1. On the other hand, the following corollary deals with the case of Ο΅=0italic-Ο΅0\epsilon=0.

Corollary 35.

Metric 111-median does not have a deterministic O​(n1+o​(1))𝑂superscript𝑛1π‘œ1O(n^{1+o(1)})-query (resp., O​(n1+o​(1))𝑂superscript𝑛1π‘œ1O(n^{1+o(1)})-time) O​(1)𝑂1O(1)-approximation algorithm.

Proof.

Take hβ†’βˆžβ†’β„Žh\to\infty in Theorem 33. ∎

Acknowledgments

The author is supported in part by the Ministry of Science and Technology of Taiwan under grant 103-2221-E-155-026-MY2.

Appendix A Optimizing the hidden factors in Theorem 33

This appendix discusses how the bound of o​(n1+1/(hβˆ’1))π‘œsuperscript𝑛11β„Ž1o(n^{1+1/(h-1)}) in Theorem 33 hides factors dependent on hβ„Žh. For all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)],

Biβˆ’1=def.{v∈[n]∣degH(iβˆ’1)​(v)β‰₯δ​n1/(hβˆ’1)βˆ’2}.superscriptdef.subscript𝐡𝑖1conditional-set𝑣delimited-[]𝑛subscriptdegsuperscript𝐻𝑖1𝑣𝛿superscript𝑛1β„Ž12\displaystyle B_{i-1}\stackrel{{\scriptstyle\text{def.}}}{{=}}\left\{v\in[n]\mid\text{deg}_{H^{(i-1)}}(v)\geq\delta n^{1/(h-1)}-2\right\}.(51)
Lemma 36.

For all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)] and distinct u𝑒u, v∈[n]βˆ–(Biβˆ’1βˆͺS)𝑣delimited-[]𝑛subscript𝐡𝑖1𝑆v\in[n]\setminus(B_{i-1}\cup S), we have (u,v)∈EG(iβˆ’1)𝑒𝑣superscriptsubscript𝐸𝐺𝑖1(u,v)\in E_{G}^{(i-1)}.

Proof.

As u𝑒u, v∈[n]βˆ–Biβˆ’1𝑣delimited-[]𝑛subscript𝐡𝑖1v\in[n]\setminus B_{i-1},

degH(j)​(u)subscriptdegsuperscript𝐻𝑗𝑒\displaystyle\text{deg}_{H^{(j)}}(u)<\displaystyle<δ​n1/(hβˆ’1)βˆ’2,𝛿superscript𝑛1β„Ž12\displaystyle\delta n^{1/(h-1)}-2,
degH(j)​(v)subscriptdegsuperscript𝐻𝑗𝑣\displaystyle\text{deg}_{H^{(j)}}(v)<\displaystyle<δ​n1/(hβˆ’1)βˆ’2𝛿superscript𝑛1β„Ž12\displaystyle\delta n^{1/(h-1)}-2

for all j∈{0,1,…,iβˆ’1}𝑗01…𝑖1j\in\{0,1,\ldots,i-1\} by equation (51) and Lemma 4. So by lines 8 and 13 of Adv, (u,v)∈EG(j)𝑒𝑣superscriptsubscript𝐸𝐺𝑗(u,v)\in E_{G}^{(j)} if (u,v)∈EG(jβˆ’1)𝑒𝑣superscriptsubscript𝐸𝐺𝑗1(u,v)\in E_{G}^{(j-1)}, for all j∈[iβˆ’1]𝑗delimited-[]𝑖1j\in[i-1]. By equation (4), (u,v)∈EG(0)𝑒𝑣superscriptsubscript𝐸𝐺0(u,v)\in E_{G}^{(0)}. The proof is complete by mathematical induction. ∎

Lemma 37.

For each i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)] such that the i𝑖ith iteration of the loop of Adv runs lines 5–9, Pisubscript𝑃𝑖P_{i} in line 5 does not have two non-consecutive vertices in [n]βˆ–(Biβˆ’1βˆͺS)delimited-[]𝑛subscript𝐡𝑖1𝑆[n]\setminus(B_{i-1}\cup S).

Proof.

By line 5 of Adv, two non-consecutive vertices on Pisubscript𝑃𝑖P_{i} are not connected by an edge in EG(iβˆ’1)superscriptsubscript𝐸𝐺𝑖1E_{G}^{(i-1)}. This and Lemma 36 complete the proof. ∎

Lemma 38.

For all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)] and v∈Biβˆ’1𝑣subscript𝐡𝑖1v\in B_{i-1},

NG(iβˆ’1)​(v)βŠ†NH(iβˆ’1)​(v).subscript𝑁superscript𝐺𝑖1𝑣subscript𝑁superscript𝐻𝑖1𝑣N_{G^{(i-1)}}(v)\subseteq N_{H^{(i-1)}}(v).
Proof.

By equation (51),

degH(iβˆ’1)​(v)β‰₯δ​n1/(hβˆ’1)βˆ’2.subscriptdegsuperscript𝐻𝑖1𝑣𝛿superscript𝑛1β„Ž12\text{deg}_{H^{(i-1)}}(v)\geq\delta n^{1/(h-1)}-2.

Clearly,

degH(0)​(v)=(6)0<(2)δ​n1/(hβˆ’1)βˆ’2.superscript(6)subscriptdegsuperscript𝐻0𝑣0superscript(2)𝛿superscript𝑛1β„Ž12\text{\rm deg}_{H^{(0)}}(v)\stackrel{{\scriptstyle\text{(\ref{initiallymarkededgeset})}}}{{=}}0\stackrel{{\scriptstyle\text{(\ref{tediouscondition2})}}}{{<}}\delta n^{1/(h-1)}-2.

So there exists j∈[iβˆ’1]𝑗delimited-[]𝑖1j\in[i-1] satisfying

degH(jβˆ’1)​(v)subscriptdegsuperscript𝐻𝑗1𝑣\displaystyle\text{deg}_{H^{(j-1)}}(v)<\displaystyle<δ​n1/(hβˆ’1)βˆ’2,𝛿superscript𝑛1β„Ž12\displaystyle\delta n^{1/(h-1)}-2,(52)
degH(j)​(v)subscriptdegsuperscript𝐻𝑗𝑣\displaystyle\text{deg}_{H^{(j)}}(v)β‰₯\displaystyle\geqδ​n1/(hβˆ’1)βˆ’2.𝛿superscript𝑛1β„Ž12\displaystyle\delta n^{1/(h-1)}-2.(53)

Clearly,

NG(j)​(v)={u∈[n]∣(u,v)∈EG(j)}.subscript𝑁superscript𝐺𝑗𝑣conditional-set𝑒delimited-[]𝑛𝑒𝑣superscriptsubscript𝐸𝐺𝑗\displaystyle N_{G^{(j)}}(v)=\left\{u\in[n]\mid(u,v)\in E_{G}^{(j)}\right\}.(54)

As H(jβˆ’1)β‰ H(j)superscript𝐻𝑗1superscript𝐻𝑗H^{(j-1)}\neq H^{(j)} by inequalities (52)–(53), the j𝑗jth iteration of the loop of Adv runs lines 5–9 but not 11–14. By inequality (53) and line 8 of Adv,

{u∈[n]∣(u,v)∈EG(j)}={u∈[n]∣(u,v)∈EG(jβˆ’1)βˆ–(EG(jβˆ’1)βˆ–EH(j))}.conditional-set𝑒delimited-[]𝑛𝑒𝑣superscriptsubscript𝐸𝐺𝑗conditional-set𝑒delimited-[]𝑛𝑒𝑣superscriptsubscript𝐸𝐺𝑗1superscriptsubscript𝐸𝐺𝑗1superscriptsubscript𝐸𝐻𝑗\displaystyle\left\{u\in[n]\mid(u,v)\in E_{G}^{(j)}\right\}=\left\{u\in[n]\mid(u,v)\in E_{G}^{(j-1)}\setminus\left(E_{G}^{(j-1)}\setminus E_{H}^{(j)}\right)\right\}.(55)

Equations (54)–(55) and Lemma 4 give

NG(j)​(v)=NH(j)​(v).subscript𝑁superscript𝐺𝑗𝑣subscript𝑁superscript𝐻𝑗𝑣N_{G^{(j)}}(v)=N_{H^{(j)}}(v).

This and Lemma 4 complete the proof. ∎

Lemma 39.

For all i∈[q​(n)]𝑖delimited-[]π‘žπ‘›i\in[q(n)],

|EH(i)|≀|EH(iβˆ’1)|+1.superscriptsubscript𝐸𝐻𝑖superscriptsubscript𝐸𝐻𝑖11\displaystyle\left|E_{H}^{(i)}\right|\leq\left|E_{H}^{(i-1)}\right|+1.
Proof.

Clearly, we may assume that the i𝑖ith iteration of the loop of Adv runs lines 5–9 but not 11–14. By line 6, we only need to show that

|{e∣(e is an edge on Pi)∧(eβˆ‰EH(iβˆ’1))}|≀1.conditional-set𝑒e is an edge on Pi𝑒superscriptsubscript𝐸𝐻𝑖11\displaystyle\left|\left\{e\mid\left(\text{$e$ is an edge on $P_{i}$}\right)\land\left(e\notin E_{H}^{(i-1)}\right)\right\}\right|\leq 1.(56)

By Lemma 37, Pisubscript𝑃𝑖P_{i} in line 5 has at most one edge in ([n]βˆ–(Biβˆ’1βˆͺS))2superscriptdelimited-[]𝑛subscript𝐡𝑖1𝑆2([n]\setminus(B_{i-1}\cup S))^{2}. So, to prove inequality (56), it suffices to show that each edge (u,v)𝑒𝑣(u,v) on Pisubscript𝑃𝑖P_{i} with (u,v)βˆ‰([n]βˆ–(Biβˆ’1βˆͺS))2𝑒𝑣superscriptdelimited-[]𝑛subscript𝐡𝑖1𝑆2(u,v)\notin([n]\setminus(B_{i-1}\cup S))^{2} satisfies (u,v)∈EH(iβˆ’1)𝑒𝑣superscriptsubscript𝐸𝐻𝑖1(u,v)\in E_{H}^{(i-1)}, as done below:

  1. Case 1:

    {u,v}∩Sβ‰ βˆ…π‘’π‘£π‘†\{u,v\}\cap S\neq\emptyset. By equation (4) and Lemma 4, (u,v)βˆ‰EG(iβˆ’1)𝑒𝑣superscriptsubscript𝐸𝐺𝑖1(u,v)\notin E_{G}^{(i-1)}. Consequently, Pisubscript𝑃𝑖P_{i} has an edge not in EG(iβˆ’1)superscriptsubscript𝐸𝐺𝑖1E_{G}^{(i-1)}, contradicting line 5.

  2. Case 2:

    {u,v}∩Biβˆ’1β‰ βˆ…π‘’π‘£subscript𝐡𝑖1\{u,v\}\cap B_{i-1}\neq\emptyset. By symmetry, assume v∈Biβˆ’1𝑣subscript𝐡𝑖1v\in B_{i-1}. So by Lemma 38, NG(iβˆ’1)​(v)βŠ†NH(iβˆ’1)​(v)subscript𝑁superscript𝐺𝑖1𝑣subscript𝑁superscript𝐻𝑖1𝑣N_{G^{(i-1)}}(v)\subseteq N_{H^{(i-1)}}(v). Because Pisubscript𝑃𝑖P_{i} is a path in G(iβˆ’1)superscript𝐺𝑖1G^{(i-1)} by line 5 and (u,v)𝑒𝑣(u,v) is on Pisubscript𝑃𝑖P_{i}, u∈NG(iβˆ’1)​(v)𝑒subscript𝑁superscript𝐺𝑖1𝑣u\in N_{G^{(i-1)}}(v). In summary, u∈NH(iβˆ’1)​(v)𝑒subscript𝑁superscript𝐻𝑖1𝑣u\in N_{H^{(i-1)}}(v). I.e., (u,v)∈EH(iβˆ’1)𝑒𝑣superscriptsubscript𝐸𝐻𝑖1(u,v)\in E_{H}^{(i-1)}.

∎

The following improvement over Lemma 11 is immediate from equation (6) and Lemma 39.

Lemma 40.
|EH(q​(n))|≀q​(n).superscriptsubscriptπΈπ»π‘žπ‘›π‘žπ‘›\left|E_{H}^{(q(n))}\right|\leq q(n).

Assuming 100≀h=o​(n1/(hβˆ’1))100β„Žπ‘œsuperscript𝑛1β„Ž1100\leq h=o(n^{1/(h-1)}), the following modifications to this paper show that the bound of o​(n1+1/(hβˆ’1))π‘œsuperscript𝑛11β„Ž1o(n^{1+1/(h-1)}) in Theorem 33 depends on hβ„Žh as o​(n1+1/(hβˆ’1)/h)π‘œsuperscript𝑛11β„Ž1β„Žo(n^{1+1/(h-1)}/h):

  1. (1)

    Take

    q​(n)π‘žπ‘›\displaystyle q(n)=\displaystyle=o​(n1+1/(hβˆ’1)h),π‘œsuperscript𝑛11β„Ž1β„Ž\displaystyle o\left(\frac{n^{1+1/(h-1)}}{h}\right),
    δ𝛿\displaystyle\delta=\displaystyle=hβ‹…max⁑{q​(n),n}n1+1/(hβˆ’1),β‹…β„Žπ‘žπ‘›π‘›superscript𝑛11β„Ž1\displaystyle h\cdot\frac{\max\{q(n),n\}}{n^{1+1/(h-1)}},
    Ξ»πœ†\displaystyle\lambda=\displaystyle=Ξ΄h/8,superscriptπ›Ώβ„Ž8\displaystyle\delta^{h/8},
    S𝑆\displaystyle S=\displaystyle=[βŒŠΞ»β€‹nβŒ‹].delimited-[]πœ†π‘›\displaystyle[\lfloor\lambda n\rfloor].
  2. (2)

    Replace β€œΞ΄π›Ώ\delta” by β€œΞ΄π›Ώ\sqrt{\delta}” in inequality (2).

  3. (3)

    Replace β€œΞ΄π›Ώ\delta” by 1/Ξ΄h/41superscriptπ›Ώβ„Ž41/\delta^{h/4} in inequality (3).

  4. (4)

    Replace the two occurrences of β€œΞ΄π›Ώ\delta” by β€œΞ΄π›Ώ\sqrt{\delta}” in line 8 of Adv.

  5. (5)

    Replace β€œΞ΄π›Ώ\delta” by β€œ1/Ξ΄h/41superscriptπ›Ώβ„Ž41/\delta^{h/4}” in line 17 of Adv.

  6. (6)

    Replace all occurrences of β€œΞ΄π›Ώ\delta” by β€œΞ΄π›Ώ\sqrt{\delta}” in Lemma 8 and its proof.

  7. (7)

    Replace all occurrences of β€œΞ΄π›Ώ\delta” by β€œΞ΄π›Ώ\sqrt{\delta}” in Lemma 9 and its proof.

  8. (8)

    Replace β€œΞ΄β€‹n1/(hβˆ’1)𝛿superscript𝑛1β„Ž1\delta n^{1/(h-1)}” and β€œhβˆ’2​h​δhβˆ’1βˆ’o​(1)βˆ’Ξ΄β„Ž2β„Žsuperscriptπ›Ώβ„Ž1π‘œ1𝛿h-2h\delta^{h-1}-o(1)-\delta” by β€œn1/(hβˆ’1)/Ξ΄h/4superscript𝑛1β„Ž1superscriptπ›Ώβ„Ž4n^{1/(h-1)}/\delta^{h/4}” and β€œhβˆ’2​h​δhβˆ’1βˆ’o​(1)βˆ’Ξ»/2βˆ’1/(2​δh/4​n1βˆ’1/(hβˆ’1))β„Ž2β„Žsuperscriptπ›Ώβ„Ž1π‘œ1πœ†212superscriptπ›Ώβ„Ž4superscript𝑛11β„Ž1h-2h{\sqrt{\delta}}^{h-1}-o(1)-\lambda/2-1/(2\delta^{h/4}n^{1-1/(h-1)}),” respectively, in the statement of Lemma 10.

  9. (9)

    Replace all occurrences of β€œΞ΄β€‹n1/(hβˆ’1)𝛿superscript𝑛1β„Ž1\delta n^{1/(h-1)},” β€œ2​δhβˆ’1​n2superscriptπ›Ώβ„Ž1𝑛2\delta^{h-1}n” and β€œβŒŠΞ΄β€‹nβŒ‹π›Ώπ‘›\lfloor\delta n\rfloor” by β€œn1/(hβˆ’1)/Ξ΄h/4superscript𝑛1β„Ž1superscriptπ›Ώβ„Ž4n^{1/(h-1)}/\delta^{h/4},” β€œ2​δhβˆ’1​n2superscriptπ›Ώβ„Ž1𝑛2{\sqrt{\delta}}^{h-1}n” and β€œβŒŠΞ»β€‹nβŒ‹πœ†π‘›\lfloor\lambda n\rfloor,” respectively, in the proof of Lemma 10.

  10. (10)

    Replace all occurrences of β€œΞ΄β€‹n1/(hβˆ’1)𝛿superscript𝑛1β„Ž1\delta n^{1/(h-1)},” β€œ(h/Ξ΄)β‹…o​(n)β‹…β„Žπ›Ώπ‘œπ‘›(h/\delta)\cdot o(n)” and β€œLemma 11” by β€œΞ΄β€‹n1/(hβˆ’1)𝛿superscript𝑛1β„Ž1\sqrt{\delta}\,n^{1/(h-1)},” β€œ(1/Ξ΄)β‹…O​(q​(n)/n1/(hβˆ’1))β‹…1π›Ώπ‘‚π‘žπ‘›superscript𝑛1β„Ž1(1/\sqrt{\delta})\cdot O(q(n)/n^{1/(h-1)})” and β€œLemma 40,” respectively, in Lemma 12 and its proof.

  11. (11)

    That Ξ±^^𝛼\hat{\alpha} is well-defined in equation (19) follows from |S|β‰₯2𝑆2|S|\geq 2, which holds for all sufficiently large n𝑛n by item (1) and hβ‰₯100β„Ž100h\geq 100.

  12. (12)

    Replace all occurrences of β€œΞ΄π›Ώ\delta” by β€œ1/Ξ΄h/41superscriptπ›Ώβ„Ž41/\delta^{h/4}” in Lemma 13 and its proof.

  13. (13)

    Replace β€œΞ΄π›Ώ\delta” by β€œΞ΄π›Ώ\sqrt{\delta}” in equation (26).

  14. (14)

    Replace β€œΞ΄hβˆ’1superscriptπ›Ώβ„Ž1\delta^{h-1}” by β€œΞ΄h/4βˆ’1superscriptπ›Ώβ„Ž41\delta^{h/4-1}” in the statement of Lemma 15.

  15. (15)

    Replace all occurrences of β€œΞ΄π›Ώ\delta” by β€œΞ΄π›Ώ\sqrt{\delta}” and β€œ1/Ξ΄h/41superscriptπ›Ώβ„Ž41/\delta^{h/4},” respectively, in the first and the second paragraphs of the proof of Lemma 15.

  16. (16)

    Replace β€œ1βˆ’2​δhβˆ’1βˆ’(h/Ξ΄)β‹…o​(1)βˆ’Ξ΄12superscriptπ›Ώβ„Ž1β‹…β„Žπ›Ώπ‘œ1𝛿1-2\delta^{h-1}-(h/\delta)\cdot o(1)-\delta” by β€œ1βˆ’2​δh/4βˆ’1βˆ’(1/Ξ΄)β‹…O​(q​(n)/n1+1/(hβˆ’1))βˆ’Ξ»12superscriptπ›Ώβ„Ž41β‹…1π›Ώπ‘‚π‘žπ‘›superscript𝑛11β„Ž1πœ†1-2\delta^{h/4-1}-(1/\sqrt{\delta})\cdot O(q(n)/n^{1+1/(h-1)})-\lambda” in the statement of Lemma 16.

  17. (17)

    Replace all occurrences of β€œ(h/Ξ΄)β‹…o​(n)β‹…β„Žπ›Ώπ‘œπ‘›(h/\delta)\cdot o(n),” β€œβŒŠΞ΄β€‹nβŒ‹π›Ώπ‘›\lfloor\delta n\rfloor” and β€œΞ΄hβˆ’1superscriptπ›Ώβ„Ž1\delta^{h-1}” by β€œ(1/Ξ΄)β‹…O​(q​(n)/n1/(hβˆ’1))β‹…1π›Ώπ‘‚π‘žπ‘›superscript𝑛1β„Ž1(1/\sqrt{\delta})\cdot O(q(n)/n^{1/(h-1)}),” β€œβŒŠΞ»β€‹nβŒ‹πœ†π‘›\lfloor\lambda n\rfloor” and β€œΞ΄h/4βˆ’1superscriptπ›Ώβ„Ž41\delta^{h/4-1},” respectively, in the proof of Lemma 16.

  18. (18)

    Replace β€œΞ΄hβˆ’1superscriptπ›Ώβ„Ž1\delta^{h-1},” β€œ(h2/Ξ΄)β‹…o​(1)β‹…superscriptβ„Ž2π›Ώπ‘œ1(h^{2}/\delta)\cdot o(1)” and β€œhβ€‹Ξ΄β„Žπ›Ώh\delta” by β€œΞ΄h/4βˆ’1superscriptπ›Ώβ„Ž41\delta^{h/4-1},” β€œ(h/Ξ΄)β‹…O​(q​(n)/n1+1/(hβˆ’1))β‹…β„Žπ›Ώπ‘‚π‘žπ‘›superscript𝑛11β„Ž1(h/\sqrt{\delta})\cdot O(q(n)/n^{1+1/(h-1)})” and β€œhβ€‹Ξ»β„Žπœ†h\lambda,” respectively, in the statement of Lemma 17.

  19. (19)

    Replace β€œΞ΄π›Ώ\delta” by β€œ1/Ξ΄h/41superscriptπ›Ώβ„Ž41/\delta^{h/4}” in the statement of Lemma 23.

  20. (20)

    Replace all occurrences of β€œΞ΄π›Ώ\delta” by β€œΞ΄π›Ώ\sqrt{\delta}” in the proof of Lemma 24.

  21. (21)

    Replace the two occurrences of β€œΞ΄π›Ώ\delta” by β€œ1/Ξ΄h/41superscriptπ›Ώβ„Ž41/\delta^{h/4}” in the statement of Lemma 27.

  22. (22)

    Replace β€œΞ΄π›Ώ\delta” by β€œ1/Ξ΄h/41superscriptπ›Ώβ„Ž41/\delta^{h/4}” in equation (3.3).

  23. (23)

    Replace β€œΞ΄π›Ώ\delta” by β€œ1/Ξ΄h/41superscriptπ›Ώβ„Ž41/\delta^{h/4}” in the statement of Lemma 32.

  24. (24)

    Replace β€œΞ΄hβˆ’1superscriptπ›Ώβ„Ž1\delta^{h-1},” β€œ(h2/Ξ΄)β‹…o​(1)β‹…superscriptβ„Ž2π›Ώπ‘œ1(h^{2}/\delta)\cdot o(1)” and β€œhβ€‹Ξ΄β„Žπ›Ώh\delta” by β€œΞ΄h/4βˆ’1superscriptπ›Ώβ„Ž41\delta^{h/4-1},” β€œ(h/Ξ΄)β‹…O​(q​(n)/n1+1/(hβˆ’1))β‹…β„Žπ›Ώπ‘‚π‘žπ‘›superscript𝑛11β„Ž1(h/\sqrt{\delta})\cdot O(q(n)/n^{1+1/(h-1)})” and β€œhβ€‹Ξ»β„Žπœ†h\lambda,” respectively, in inequality (48).

  25. (25)

    Replace β€œhβˆ’2​h​δhβˆ’1βˆ’o​(1)βˆ’Ξ΄β„Ž2β„Žsuperscriptπ›Ώβ„Ž1π‘œ1𝛿h-2h\delta^{h-1}-o(1)-\delta” by β€œhβˆ’2​h​δhβˆ’1βˆ’o​(1)βˆ’Ξ»/2βˆ’1/(2​δh/4​n1βˆ’1/(hβˆ’1))β„Ž2β„Žsuperscriptπ›Ώβ„Ž1π‘œ1πœ†212superscriptπ›Ώβ„Ž4superscript𝑛11β„Ž1h-2h{\sqrt{\delta}}^{h-1}-o(1)-\lambda/2-1/(2\delta^{h/4}n^{1-1/(h-1)})” in the right-hand side of inequality (49).

  26. (26)

    Replace the numerator and the denominator on the right-hand side of inequality (50) by β€œhβˆ’2​h​δhβˆ’1βˆ’o​(1)βˆ’Ξ»/2βˆ’1/(2​δh/4​n1βˆ’1/(hβˆ’1))β„Ž2β„Žsuperscriptπ›Ώβ„Ž1π‘œ1πœ†212superscriptπ›Ώβ„Ž4superscript𝑛11β„Ž1h-2h{\sqrt{\delta}}^{h-1}-o(1)-\lambda/2-1/(2\delta^{h/4}n^{1-1/(h-1)})” and β€œ1/2+2​h​δh/4βˆ’1+(h/Ξ΄)β‹…O​(q​(n)/n1+1/(hβˆ’1))+h​λ122β„Žsuperscriptπ›Ώβ„Ž41β‹…β„Žπ›Ώπ‘‚π‘žπ‘›superscript𝑛11β„Ž1β„Žπœ†1/2+2h\delta^{h/4-1}+(h/\sqrt{\delta})\cdot O(q(n)/n^{1+1/(h-1)})+h\lambda,” respectively.

  27. (27)

    Verify that the right-hand side of inequality (50) is 2​hβˆ’o​(1)2β„Žπ‘œ12h-o(1). To see this, use item (1) and 100≀h=o​(n1/(hβˆ’1))100β„Žπ‘œsuperscript𝑛1β„Ž1100\leq h=o(n^{1/(h-1)}) to verify that Ξ΄=o​(1)π›Ώπ‘œ1\delta=o(1), maxxβ‰₯1⁑xβ‹…Ξ΄x/8=O​(Ξ΄)=o​(1)subscriptπ‘₯1β‹…π‘₯superscript𝛿π‘₯8π‘‚π›Ώπ‘œ1\max_{x\geq 1}\,x\cdot\delta^{x/8}=O(\delta)=o(1) (which requires elementary calculus and reveals that h​δhβˆ’1=o​(1)β„Žsuperscriptπ›Ώβ„Ž1π‘œ1h\sqrt{\delta}^{h-1}=o(1), h​δh/4βˆ’1=o​(1)β„Žsuperscriptπ›Ώβ„Ž41π‘œ1h\delta^{h/4-1}=o(1) and h​λ=h​δh/8=o​(1)β„Žπœ†β„Žsuperscriptπ›Ώβ„Ž8π‘œ1h\lambda=h\delta^{h/8}=o(1)), Ξ»=o​(1)πœ†π‘œ1\lambda=o(1), Ξ΄h/4β‰₯1/nh/(4​(hβˆ’1))superscriptπ›Ώβ„Ž41superscriptπ‘›β„Ž4β„Ž1\delta^{h/4}\geq 1/n^{h/(4(h-1))}, Ξ΄h/4β‹…n1βˆ’1/(hβˆ’1)=nΩ​(1)β‹…superscriptπ›Ώβ„Ž4superscript𝑛11β„Ž1superscript𝑛Ω1\delta^{h/4}\cdot n^{1-1/(h-1)}=n^{\Omega(1)}, Ξ΄β‰₯hβ‹…q​(n)/n1+1/(hβˆ’1)π›Ώβ‹…β„Žπ‘žπ‘›superscript𝑛11β„Ž1\sqrt{\delta}\geq\sqrt{h\cdot q(n)/n^{1+1/(h-1)}} and hβ‹…q​(n)/n1+1/(hβˆ’1)=o​(1)β‹…β„Žπ‘žπ‘›superscript𝑛11β„Ž1π‘œ1\sqrt{h\cdot q(n)/n^{1+1/(h-1)}}=o(1).

  28. (28)

    Replace all occurrences of β€œΞ΄π›Ώ\delta” by β€œΞ΄π›Ώ\sqrt{\delta}” in equation (51) as well as in the proofs of Lemmas 36 and 38.

References

  • [1] C.-L. Chang. A deterministic sublinear-time nonadaptive algorithm for metric 111-median selection. To appear in Theoretical Computer Science.
  • [2] C.-L. Chang. Some results on approximate 111-median selection in metric spaces. Theoretical Computer Science, 426:1–12, 2012.
  • [3] C.-L. Chang. Deterministic sublinear-time approximations for metric 111-median selection. Information Processing Letters, 113(8):288–292, 2013.
  • [4] C.-L. Chang. A lower bound for metric 111-median selection. Technical Report arXiv: 1401.2195, 2014.
  • [5] S. Guha, A. Meyerson, N. Mishra, R. Motwani, and L. O’Callaghan. Clustering data streams: Theory and practice. IEEE Transactions on Knowledge and Data Engineering, 15(3):515–528, 2003.
  • [6] P. Indyk. Sublinear time algorithms for metric space problems. In Proceedings of the 31st Annual ACM Symposium on Theory of Computing, pages 428–434, 1999.
  • [7] P. Indyk. High-Dimensional Computational Geometry. PhD thesis, Stanford University, 2000.
  • [8] A. Kumar, Y. Sabharwal, and S. Sen. Linear-time approximation schemes for clustering problems in any dimensions. Journal of the ACM, 57(2):5, 2010.
  • [9] R. R. Mettu and C. G. Plaxton. Optimal time bounds for approximate clustering. Machine Learning, 56(1–3):35–60, 2004.
  • [10] W. Rudin. Principles of Mathematical Analysis. McGraw-Hill, 3rd edition, 1976.
  • [11] B.-Y. Wu. On approximating metric 111-median in sublinear time. Information Processing Letters, 114(4):163–166, 2014.