\section{Introduction}

Close massive black hole (MBH) pairs  with separations $\lesssim10$ pc are expected to form as a consequence of galaxy mergers during cosmic evolution (e.g. \citealt{begelman+80}; \citealt{mayer+07}; \citealt{chapon+13}).
When the galaxies involved in the merger are gas-rich, the pair is usually embedded in a gaseous circumnuclear disk (CND) guiding the BH inspiral down to (sub) parsec scales (\citealt{escala+05}; \citealt{dotti+07}, \citeyear{dotti+09}; \citealt{mayer+07}).

Massive gaseous CNDs form  at the center of merging remnants, following gas inflows driven by gravitational torques (\citealt{dimatteo+07}; \citealt{mayer+07}, \citeyear{mayer+10}; \citealt{beletsky+11}).
However, the same torques can also compress the gas and induce episodes of massive star formation (SF; i.e., merger-driven nuclear starbursts, \citealt{downes+98}; \citealt{smith+07}; \citealt{smirnova+10}).
In star forming regions the inter-stellar medium (ISM) is expected to be clumpy on scales of a few to several tens of parsecs, these being the typical sizes of molecular clouds (MCs, \citealt{klessen+10}).
Gravoturbulent fragmentation at scales of a few tens of parsecs, governed by the Toomre instability in a self-gravitating gaseous disk, is one of the processes that likely seeds MCs (e.g., \citealt{agertz+09a}; \citealt{tasker+09}).

Previous investigations probed the BH pair dynamics assuming that the self-gravitating gas in the CND is warm enough to avoid evolving into an unstable inhomogeneous phase.
However, a CND undergoing a starburst generally hosts a complex and inhomogeneous multi-phase ISM.
\citet{escala+05} briefly explored, in 3D simulations, the BH dynamics in inhomogeneous CNDs excited by an isothermal equation of state and noted that violent interactions with clumps can occur, but that in most cases the BHs end up at the center.
On smaller scales ($\lesssim0.1$ pc), \citet{lodato+09} investigated the effects of disk instability and SF onto the evolution of BH binaries using time-dependent 1D models, finding that orbital decay is very inefficient when SF depletes the disk background gas.
Albeit different in terms of both regime and technique, these two works suggest that it is not trivial to predict the outcome of the BH binary/pair shrinking process in a gaseous environment when the complexity of ISM is somehow taken into account.

The relevance of a clumpy ISM to galaxy formation as a whole has recently grown following the discovery that galaxies at $z\gtrsim2$ are clumpy at relatively large scales.
These clumps have typical mass $\gtrsim10^{8}$ $M_{\odot}$ and size of $\sim1$ kpc and are believed to be triggered by the Toomre instability in massive, rapidly accreting disks at high redshift (\citealt{genzel+06}; \citealt{agertz+09b}; \citealt{dekel+09}; \citealt{ceverino+12}).
While we do not model such high-$z$ massive clumps in this work, our results may give a hint on the decay process of MBH pairs in such larger-scale clumpy high-$z$ galactic disks.

In this Letter, we compare the evolutions of MBH pairs in smooth and highly inhomogeneous CNDs by means of $N$-body/smoothed particle hydrodynamic (SPH) simulations.
We explore the effect of the lumpiness of the ISM in an idealized and controlled way by varying the degree of energy dissipation in the gas.
We choose this approach because modeling the multi-phase ISM properly is computationally demanding as it requires including gas cooling both in the optically thin and thick regime, SF and feedback.
Relatively low BH mass ratios, between 0.05 and 0.2, are explored in order to magnify the effect of the disk lumpiness on the dynamics of the light, secondary BH.
We show that the behavior can be highly stochastic, often delaying but in some cases also favoring the pairing of the BHs.
In Section \ref{sec2} we describe the numerical simulations, and in Section \ref{sec3} we present the results.
Section \ref{sec4} contains the discussion and our conclusions.

\section{Numerical simulations}\label{sec2}

We perform a suite of numerical simulations to study the evolution of a MBH pair embedded in a gaseous CND which, in turn, is at the center of a stellar spheroid.
All the simulations were run with the TreeSPH $N$-body code {\tt GADGET2} \citep{springel+05}.
Our models resemble the inner region of the remnant of a merger that involved two galaxies with a central MBH each, in a fashion similar to \citet{escala+05} and \citeauthor{dotti+07} (\citeyear{dotti+07}, \citeyear{dotti+09}).
The gaseous disk has a Mestel surface density profile with a scale length $R_{\rm d}=100$ pc and a radial extent of $\sim150$ pc.
The vertical structure is initially Gaussian, with a scale height $z_{\rm d}(R)=h\,R$ and aspect ratio $h=0.05$.
The gas has an initial uniform temperature $T_0=20,000$ K.
The disk is embedded in a Plummer stellar spheroid that represents the innermost part of a bulge, with scale radius $r_{\star}=50$ pc and radial extent of $\sim500$ pc.
Among the different runs, we vary the mass of the spheroid $M_{\star}$ and the mass of the disk $M_{\rm d}$, but we fix the ratio $M_{\star}/M_{\rm d}=5$, in fair agreement with observations \citep{downes+98}.
We place the first BH of mass $M_{\bullet1}=10^{7}$ $M_{\odot}$ at the center of the disk and we let the models relax for 10 Myr toward equilibrium.
We assume a polytropic equation of state for the gas with adiabatic index $\gamma=1.4$, in agreement with previous theoretical (\citealt{klessen+07}; \citealt{mayer+07}, \citeyear{mayer+10}) and observational \citep{downes+98} works that studied the conditions of the central gas in ongoing mergers or merger remnants.

Then, we finally added the second BH of mass $M_{\bullet2}=q\,M_{\bullet1}$ at the initial separation $a_0=60$ pc from the central one.
Both BHs are treated as collisionless particles.
The orbit of the secondary BH is specified by the ratio $f$ between the radial and the azimuthal components of the initial velocity $\mathbf{v}_{0}$, with the constraint $|\mathbf{v}_{0}|=V_{\rm c}(a_{0})$, where $V_{\rm c}(a_{0})$ is the circular velocity in  $a_{0}$.
$f$ also specifies the initial eccentricity $e_0$ of the orbit, $e_0\sim\sqrt{1-1/(1+f^2)}$.
All the models are composed of $2\times10^5$ SPH particles and $1\times10^{6}$ collisionless particles for the gaseous disk and the stellar spheroid, respectively.
This corresponds to a mass resolution $m_{\rm p}$ that varies between 500 and 2500 $M_{\odot}$, depending on the mass of the disk and the spheroid.
The force resolution set by the gravitational softening is $\epsilon_{\rm g}=0.5$ pc for all the particles.

For each choice of parameters $M_{\rm d}$, $q$ and $f$, we initialize three sets of initial conditions.
In the first one, which we will refer to as the ``smooth'' set, the secondary BH is added immediately after the 10 Myr relaxation phase.
In the other two, we added the secondary BH after we forcefully make the disk Toomre unstable by cooling it during an additional relaxation phase via the phenomenological cooling term:
\begin{equation} \label{eq:cooling}
\Lambda_{\rm cool} =-\frac{u}{t_{\rm cool}},
\end{equation}
where $u$ is the specific internal energy of the gas and $t_{\rm cool}$ is a constant cooling timescale.
We chose different parameters to create two different environments: in the first case (``clumpy 1''), we further relaxed the disk for 2 Myr with $t_{\rm cool}=0.2$ Myr.
The disk becomes violently unstable and fragments in many small and dense clumps that account for $\gtrsim M_{\rm d}/2$.
In the second case (``clumpy 2'') we used $t_{\rm cool}=1$ Myr for 10 additional Myr and we turn off the cooling locally for densities $>5\times10^{5}$ H cm$^{-3}$.
The disk has a more developed background component compared to ``clumpy 1'' models, with fewer, less concentrated clumps.

Table \ref{table1} lists all the simulations and summarizes the adopted parameters.
The values of $t_{\rm cool}$ for both ``clumpy 1'' and ``clumpy 2'' models are chosen to be comparable to the dynamical time of the disks at $\sim R_{\rm d}$ to allow gravoturbulent fragmentation to set in and sustain.
We keep the density switch for the cooling during ``clumpy 2'' simulations even after we inserted the secondary BH.
We stress that Equation (\ref{eq:cooling}) represents a phenomenological way to create and maintain strong inhomogeneities in the CND.
\begin{deluxetable}{l c c c c c}
\tablecaption{List of performed simulations and of their parameters.\label{table1}}
\tablehead{
\colhead{Label} & \colhead{$M_{\rm d}$} & \colhead{$q$\tablenotemark{a}} & \colhead{$f$} & \colhead{$e_{0}$\tablenotemark{b}} & \colhead{$t_{\rm cool}$} \\
\colhead{} & \colhead{$(M_{\odot})$} & \colhead{} & \colhead{} & \colhead{} & \colhead{(Myr)}
}
\startdata
q005f02LM & $10^{8}$          & 0.05 & 0.2  & 0.2  & 1.0 \\
q005f1LM  & $10^{8}$          & 0.05 & 1.0  & 0.7  & 1.0 \\
q02f025LM & $10^{8}$          & 0.2  & 0.25 & 0.25 & 1.0 \\
q02f2LM   & $10^{8}$          & 0.2  & 2.0  & 0.9  & 1.0 \\
q01f02HM  & $5 \times 10^{8}$ & 0.1  & 0.2  & 0.2  & 0.5 \\
q01f2HM   & $5 \times 10^{8}$ & 0.1  & 2.0  & 0.9  & 0.5 \\
q02f02HM  & $5 \times 10^{8}$ & 0.2  & 0.2  & 0.2  & 0.5 \\
q02f2HM   & $5 \times 10^{8}$ & 0.2  & 2.0  & 0.9  & 0.5
\enddata
\tablenotetext{a}{$q=M_{\bullet2}/M_{\bullet1}$, $M_{\bullet1}=10^7$ $M_{\odot}$.}
\tablenotetext{b}{$e_0\sim\sqrt{1-1/(1+f^2)}$.}
\end{deluxetable}

\section{Results}\label{sec3}

\subsection{Orbital Decay in a Smooth Disk: Overview}\label{subsec3.1}

The secondary BH of all the ``smooth'' simulations moves toward the disk center on a typical timescale of $\sim10$ Myr.
This is shown in Figure \ref{fig1}, which compares the time evolution of the separation between the two BHs for all the corresponding ``smooth'', ``clumpy 1'' and ``clumpy 2'' simulations.
\begin{figure*}
\plotone{pic/fig1.eps}
\caption{
Time evolution of the BH separation for all the corresponding ``smooth'', ``clumpy 1'' and ``clumpy 2'' models.
The top two rows show runs with $M_{\rm d}=10^{8}$ $M_{\odot}$, whereas the bottom two with $M_{\rm d}=5\times10^{8}$ $M_{\odot}$.
For each pair of rows, the first and the second one shows runs with lower and higher $q$, respectively.
The left and the right column shows runs with lower and higher $e_{0}$, respectively.
Black continuous lines, red dashed lines and blue dot-dashed lines show the BH separation of the ``smooth'', ``clumpy 1'' and ``clumpy 2'' models, respectively.\label{fig1}}
\end{figure*}
The orbital decay of the secondary BH in the ``smooth'' disks is characterized by two phases.
Initially, the BH induces a trailing hydrodynamical wake that, in turn, makes the orbit circularize \citep{dotti+07} because of conventional dynamical friction (DF; \citealt{chandra+43}; \citealt{ostriker+99}; \citealt{colpi+99}).
When the orbit is close to circular, the relative velocity between the BH and the gas becomes low.
This causes a change in the orbital decay timescale.
The BH induces a density wave perturbation, eventually amplified by the self-gravity of the disk that exerts a global torque on the perturber itself, initiating its rapid sinking toward the center.
The latter phase resembles the regime of standard Type I  planet migration \citep{lin+86}.
An aspect that has not been appreciated in the literature is that the secondary BH's angular momentum loss occurs on an intrinsically shorter timescale during the latter phase, as shown in Figure \ref{fig2}.
\begin{figure}
\plotone{pic/fig2.eps}
\caption{Time evolution of the secondary BH angular momentum for the ``smooth'' models with $M_{\rm d}=5\times10^{8}$ $M_{\odot}$.
Solid and dashed lines represent runs with $e_{0}\simeq0.2$ and $e_{0}\simeq0.9$, respectively.
Black and red colors represent runs with $q=0.1$ and $q=0.2$, respectively.
The dots qualitatively mark the transition between the two phases described in the text.\label{fig2}}
\end{figure}

Furthermore, while DF shuts off at separations such that the enclosed mass within the pair's orbit is $\sim M_{\bullet1}+M_{\bullet2}$, global torques will continue to act as long as a sufficiently massive gaseous disk is present at large radii and the BH does not open a gap \citep{chapon+13}.
Finally, in addition to the disk contribution to the orbital decay, the secondary BH also suffers DF exerted by the stellar spheroid.
However, the stellar torque is weaker than the torque that comes from the gaseous disk, which mainly drives the dynamical evolution of the pair.

\subsection{BH Pair Evolution in a Clumpy Disk}

The orbital evolution of the secondary BH in a clumpy disk is affected by the dynamical interaction with clumps acting as massive perturbers.
Figure \ref{fig3} shows the gas surface density of the disk for the ``clumpy 1'' model of run q02f2HM.
The disk is sprinkled with massive clumps and non-axisymmetric features that exert torques on the secondary BH.
\begin{figure}
\plotone{pic/fig3.eps}
\caption{Time evolution of the gas surface density of the ``clumpy 1'' model of run q02f2HM.
The size of each panel is 240 pc per edge.
The position of the BHs are marked by two black dots.\label{fig3}}
\end{figure}
Figure \ref{fig4} shows the normalized initial mass function (just after the relaxation phase) and the mass-size relation of the clumps of ``clumpy 1'' and ``clumpy 2'' models.
We compare our data with the observed sample of MCs in the Galactic center taken from \citet{oka+01}.
Although the Galactic center likely represents a less extreme environment than the inner region of a merger remnant that we aim at modeling, our models are in fair agreement with the observational data and are only weakly influenced by the value of $t_{\rm cool}$ adopted in the relaxation phase.
\begin{figure*}
\plotone{pic/fig4.eps}
\caption{Top-left panel: normalized mass function of clumps for ``clumpy 1'' and ``clumpy 2'' models with $M_{\rm d}=10^{8}$ $M_{\odot}$.
Bottom-left panel: same as before for models with $M_{\rm d}=5\times10^{8}$ $M_{\odot}$.
Top-right panel: clump mass vs. size ($S$ from \citet{oka+01} and clump diameter $D_{\rm cl}$) for models with $M_{\rm d}=10^{8}$ $M_{\odot}$.
Bottom-right panel: same as before for models with $M_{\rm d}=5\times10^{8}$ $M_{\odot}$.
Black continuous lines (circles), red dashed lines (crosses) and blue dot-dashed lines (triangles) show the data from \citet{oka+01}, ``clumpy 1'' and ``clumpy 2'' models, respectively.
Vertical arrows indicate the masses of the secondary BHs.\label{fig4}}
\end{figure*}

Close encounters (at separation of $\sim$3-10 pc) between the secondary BH and the massive clumps occur in both ``clumpy 1'' and `` clumpy 2'' models.
BH-clump interactions act as gravitational slingshots, causing an exchange of orbital energy and angular momentum.
These impulsive perturbations make the BH deviate from its original orbit, shifting its mean orbital radius either inward or outward.

Gravitational slingshots can delay the sinking of the secondary BH when they cause its temporary ejection from the disk plane.
This happens both with the dense clumps of ``clumpy 1'' models and with the more diffuse ones of ``clumpy 2'' models, but preferentially for high-$e_{0}$ runs (e.g. run q005f1LM, q02f2LM and q01f2HM).
After the interaction, the secondary BH moves on an eccentric orbit, tilted up to $\sim15^{\circ}$-$40^{\circ}$ with respect to the original plane for both ``clumpy 1'' and ``clumpy 2'' models.
The BH then spends most of the orbital period moving outside the disk, where is mostly subjected to DF against the stellar background and the decay timescale becomes longer, in agreement with \citet{escala+05}.
The actual value of the decay timescale can depend substantially on the density profile of the stellar spheroid.
Sinking BHs can stall in constant density cores when they approach the core radius, as shown by \citet{read+06}.

Clumps have also an indirect retarding effect on the BH orbital decay, especially for eccentric orbits.
They produce spiral arms that exert torques on the secondary BH and perturb the background component, stifling the coherence of the BH hydrodynamical wake that would lead to the circularization of the orbit and the subsequent efficient decay phase described in Section \ref{subsec3.1}.

On the other hand, either the BH can be captured inside a massive clump, or a clump can be tidally heated and then disrupted and accreted by the orbiting BH during a close passage at low relative velocity.
In both cases, the BH ends up embedded in a gaseous cloud bound to it.
Although this cloud cannot be actually accreted due to the lack of an accretion prescription in our simulations, it provides an higher effective mass that reduces the orbital decay timescale\footnote{We recall that both Type I migration and DF torques that provide loss of angular momentum and/or orbital energy scale with the perturber mass squared.} up to $\sim2$ Myr (e.g., ``clumpy 2'' model of run q01f02HM and q02f02HM).

\section{Discussion and conclusions}\label{sec4}

We compared the orbital decay of a MBH pair in clumpy and inhomogeneous gaseous CNDs with that in smooth disks by means of idealized $N$-body/SPH simulations.
We found that gravitational interactions between the BH and clumps do play a role in the dynamics of these pairs.
Gravitational slingshots frequently perturb the orbit of the moving BH, stochastically increasing or decreasing the separation of the pair.
Scattering between massive clumps and the secondary BH can eject the latter from the disk plane, having a net retarding effect on its orbital decay since in this case the dominant source of drag on the BH is the low density stellar background.
We can estimate this orbital decay timescale $\tau_{\rm decay}$ for a BH of mass $M_{\bullet}$ in circular motion inside a Plummer bulge of total mass $M_{\rm b}$ and scale radius $b$ using standard DF \citep{chandra+43} as $\tau_{\rm decay}\simeq\tau_{\rm decay}^{\rm(ext)}+\tau_{\rm decay}^{\rm(int)}$, where:
\begin{equation}
\tau_{\rm decay}^{\rm(ext)}\simeq\frac{0.5305}{\ln\Lambda}\,\left(\frac{M_{\rm b}}{M_{\bullet}}\right)\,\left[(r_{\rm in}/b)^{7/2}-1\right]\,t_{\rm dyn},
\end{equation}
is the time to move from an initial radius $r_{\rm in}$ to $\sim b$, and:
\begin{equation}
\tau_{\rm decay}^{\rm(int)}\simeq\frac{0.2172}{\ln\Lambda}\,\left(\frac{M_{\rm b}}{M_{\bullet}}\right)\,t_{\rm dyn},
\end{equation}
is the decay time inside the core.
As usual, $\ln\Lambda$ is the Coulomb logarithm and $t_{\rm dyn}=1/\sqrt{G\rho_0}$ is the dynamical time associated with central density $\rho_0$ of the Plummer profile.
We estimate that $\tau_{\rm decay}$ would vary typically between $\sim20$ and $\sim50$ Myr depending on the secondary-BH mass and the properties of the stellar spheroid that we assumed for our simulations.
We used $\ln\Lambda\sim5$ and $r_{\rm in}=60$ pc.
We also checked that the decay timescale would vary in the range $\sim$20-80 Myr if we adopted a (de-projected) S\'ersic profile for the bulge with structural parameters (mass, effective radius, S\'ersic index) ranging from those typical of massive classical bulges (e.g., Andromeda galaxy, \citealt{widrow+03}; \citealt{courteau+11}) to those of pseudobulges in late-type spirals (\citealt{fisher+08}; \citealt{fisher+09}).

At the same time, the BH pairing can be accelerated either when the secondary is scattered toward the disk center or it manages to accrete a bound gaseous cloud around it.
The second case occurs when the orbiting BH is captured inside a massive clump or when it rips mass off of a clump.
Then, the higher total mass of the BH+cloud system, compared to $M_{\bullet}$, can reduce the orbital decay timescale by up to $\sim2$ Myr.
However, BH accretion/feedback may influence the local distribution of mass around the secondary and, in turn, affect its sinking toward the center.

We estimate a threshold mass $\mathcal{M}_{\bullet}$ below which a $M_{\bullet}$ BH orbiting in a disk with mass $M_{\rm g}$ and scale radius $R$ will likely be scattered by clumps with $M_{\rm cl}>M_{\bullet}$.
The BH and the clumps both migrate toward the center on a timescale $\tau_{\bullet}$ and $\tau_{\rm cl}$, respectively.
We can envision that the BH moves in an almost steady-state environment in which massive clumps that dissolves close to the center are continuously replaced by new clumps on the same timescale, so that the number and the spatial distribution of massive clumps remains almost constant in time, on average.
The BH moves radially with an effective relative velocity $v_{\bullet}\sim R/\tau_{\bullet}\sim10$ km s$^{-1}$ with respect to the clumps.
This is a reasonable assumption when we focus on massive clumps only since they form because of the merging of smaller clumps during their migration on the timescale $\tau_{\rm cl}$ and dissolve when they reach the center on the same timescale.
Under these crude assumptions, we can imagine that the BH moves radially by a random walk and the condition for the scattering by clumps to be sizable reads:
\begin{equation} \label{eq:condition}
1\ll N\sim R^{2} n_{\rm cl}^{2}\sigma_{\rm cl}^{2},
\end{equation}
where $n_{\rm cl}\sim N_{\rm cl}/V_{\rm disk}$ is the number density of clumps in the disk volume $V_{\rm disk}\sim h\,R^3$ with aspect ratio $h$, and $\sigma_{\rm cl}$ is the cross section for a gravitational interaction with a clump.
Massive clumps have a size $\sim$5-10 pc, whereas the influence radius for interaction with the BH $r_{\rm g}\sim G M_{\rm cl}/v_{\bullet}^{2}\gtrsim10$ pc for $M_{\rm cl}\gtrsim10^{6}$ $M_{\odot}$, therefore we can estimate $\sigma_{\rm cl}\sim\pi r_{\rm g}^{2}$.
If we assume that $\tau_{\bullet}$ scales as for DF, $\tau\sim(\Theta/ \ln\Lambda)\,(M_{\rm g}/M_{\bullet})\,t_{\rm dyn}$, where $\Theta\sim1$, we can rewrite Equation (\ref{eq:condition}) in terms of the BH mass $\mathcal{M}_{\bullet}$ under which scatterings are relevant:
\begin{equation}
M_{\bullet}\ll\mathcal{M}_{\bullet}\sim\frac{\left(N_{\rm cl}\,h^{-1}\right)^{1/4}}{\ln\Lambda}\,\left(\frac{M_{\rm cl}}{M_{\rm g}}\right)^{1/2} M_{\rm g}.
\end{equation}

It is interesting to apply this order-of-magnitude estimate to high-$z$ galaxies with few clumps with mass of order of the maximum mass allowed by Toomre instability, $M_{\rm cl}\sim\eta^{2}M_{\rm g}$, where $\eta$ is the gas fraction of the system \citep{escala+08}:
\begin{equation}
\mathcal{M}_{\bullet}\sim7\times10^{7}\,\bigg(\frac{N_{\rm cl}}{4}\bigg)^{1/4}\bigg(\frac{\eta}{0.4} \bigg)\bigg(\frac{M_{\rm g}}{10^{9}\;{\rm M_{\odot}}}\bigg)\,{\rm M_{\odot}},
\end{equation}
where we assumed $h=0.2$ and $\ln\Lambda=5$.
For massive systems with $M_{\rm g}\sim10^{10}$ $M_{\odot}$, as observed a $z\gtrsim2$ (\citealt{genzel+06}; \citeyear{genzel+10}), this would lead to a threshold mass even a factor of $\gtrsim10$ higher, suggesting that, at least at high-$z$,  clump-BH interactions can be important for massive BHs, up to the mass of some of the largest found today in early-type galaxies ($\sim10^9$ $M_{\odot}$).

Despite this is only an order-of-magnitude calculation, it is significant to note that the dynamics of virtually all the MBH binaries that space-born gravitational wave detectors such as eLISA would probe at $z\gtrsim3$  (e.g. \citealt{amaro+13}) could be in principle affected by the clumpy environment in the early stages of pairing.
Indeed, although our controlled experiments do not change the overall scenario according to which MBH pairs in gaseous environments tend to evolve toward tight binary, the even higher inhomogeneity of the ISM in gas-rich, high redshift ($z\gtrsim$2-3) galaxies may reasonably lead to stronger interactions and ejections of MBHs, slowing down the decay by a factor $\gtrsim10$ (R. Ro\v{s}kar et al., in preparation).
If ejections causing delayed decay are common even at low redshift, close MBH pairs at separations in the range 10-100 pc should not be rare.
A first example of such a system might be the Seyfert galaxy NGC 3393 \citep{fabbiano+11}.

Clearly, apart from being highly idealized, our models miss important physical ingredients (i.e., SF/feedback, BH accretion/feedback) that likely play a role in shaping the structure of the ISM.
Forthcoming simulations incorporating such mechanisms will allow us to better assess the magnitude of the effects illustrated in this Letter.
However, our work represents a first step towards elucidating the role of the structure of the ISM in the orbital decay of MBH pairs and binaries, these being pivotal sources of gravitational waves that will be targeted by future gravitational wave experiments.

\acknowledgments
We thank the anonymous referee for comments that helped the improvement of the Letter.
The simulations were performed with the \emph{Schr\"{o}dinger} and the \emph{ZBOX4} cluster at the University of Zurich.
We thank M. Dotti, J. Guedes, G. Lake, F. Meru, C. Miller and H. Perets for useful discussions.
D.F. and R.R. are supported by the Swiss National Science Foundation under grant \#No. 200021\_140645.


\section{Introduction}\label{s:intro}

The aim of this article is to develop a multiscale analysis of 1-rectifiable measures. Because there exist competing conventions for the terminology ``rectifiable measure" (cf.~ \cite[pp.~ 251--252]{Federer} and \cite[p.~ 228]{Mattila}), we start by specifying its meaning in the present paper. See Table \ref{t:terms} for a guide between the different conventions.

\begin{definition}[Rectifiable measure] \label{d:rect} Let $\mu$ be a Borel measure on $\mathbb{R}^n$ and let $m\geq 1$ be a positive integer. We say that $\mu$ is \emph{$m$-rectifiable} if there exist countably many bounded Borel sets $E_i\subset\mathbb{R}^m$ and Lipschitz maps $f_i:E_i\rightarrow\mathbb{R}^n$ such that the union of the images $f_i(E_i)$ have full measure, i.e.~ $\mu\left(\mathbb{R}^n\setminus \bigcup_{i=1}^\infty f_i(E_i)\right)=0$.
\end{definition}

\begin{remark} We do not require an $m$-rectifiable measure $\mu$ to be absolutely continuous with respect to the $m$-dimensional Hausdorff measure $\mathcal{H}^m$ (see \S\ref{s:prelim}). If we wish to declare this as an additional property of the measure, then we shall explicitly write $\mu\ll \mathcal{H}^m$. \end{remark}

\begin{remark} An equivalent condition for a Borel measure $\mu$ on $\mathbb{R}^n$ to be 1-rectifiable is that there exist countably many \emph{rectifiable curves} $\Gamma_i\subset\mathbb{R}^n$ such that $\mu(\mathbb{R}^n\setminus\bigcup_i\Gamma_i)=0$. (Indeed, any Lipschitz map $f:E\rightarrow\mathbb{R}^n$, $E\subset\mathbb{R}^m$ extends to a global Lipschitz map $F:\mathbb{R}^m\rightarrow\mathbb{R}^n$. Thus, when $m=1$, one may assume without loss of generality that the sets $E_i$ in Definition \ref{d:rect} are compact intervals $[a_i,b_i]$ and take $\Gamma_i=f_i([a_i,b_i])$.) \end{remark}

\begin{table}\small\caption{Cross-reference: rectifiable measures}\label{t:terms}\begin{tabular}{ccc}
  \toprule
  this paper & \cite{Federer} & \cite{Mattila} \\ \toprule
  $\mu$ is $m$-rectifiable & $\mathbb{R}^n$ is countably $(\mu,m)$ rectifiable & --- \\ \midrule
  $\mu$ is $m$-rectifiable and $\mu(\mathbb{R}^n)<\infty$ & $\mathbb{R}^n$ is $(\mu,m)$ rectifiable & --- \\ \midrule
  $\mu$ is $m$-rectifiable and $\mu\ll \mathcal{H}^m$ & --- & $\mu$ is $m$-rectifiable \\ \bottomrule
\end{tabular}\end{table}

The qualitative theory of rectifiable sets and absolutely continuous rectifiable measures in Euclidean spaces developed across the last century, beginning with the seminal work of Besicovitch \cite{Bes28,Bes38} and later generalized and improved upon in a series of papers by Morse and Randolph \cite{MR}, Moore \cite{Moore}, Marstrand \cite{Marstrand}, Mattila \cite{Mattila75} and Preiss \cite{Preiss}. In particular, in the presence of absolute continuity, these investigations revealed a deep connection between the rectifiability of a measure and the asymptotic behavior of the measure on small balls.

\begin{definition}[Hausdorff densities] Let $B(x,r)$ denote the closed ball in $\mathbb{R}^n$ with center $x\in\mathbb{R}^n$ and radius $r>0$. For each positive integer $m\geq 1$, let $\omega_m=\mathcal{H}^m(B^m(0,1))$ denote the volume of the unit ball in $\mathbb{R}^m$. For all locally finite Borel measures $\mu$ on $\mathbb{R}^n$, we define the \emph{lower Hausdorff $m$-density} $\lD{m}(\mu,\cdot)$ and  \emph{upper Hausdorff $m$-density} $\uD{m}(\mu,\cdot)$ by \begin{equation*} \lD{m}(\mu,x):=\liminf_{r\rightarrow 0} \frac{\mu(B(x,r))}{\omega_mr^m}\in[0,\infty]\end{equation*} and \begin{equation*} \uD{m}(\mu,x):=\limsup_{r\rightarrow 0} \frac{\mu(B(x,r))}{\omega_mr^m}\in[0,\infty]\end{equation*} for all $x\in\mathbb{R}^n$.
If $\lD{m}(\mu,x)=\uD{m}(\mu,x)$ for some $x\in\mathbb{R}^n$, then we write $D^m(\mu,x)$ for the common value and call $D^m(\mu,x)$ the \emph{Hausdorff $m$-density of $\mu$ at $x$}.
\end{definition}

For $\mu$ a Borel measure and $E\subset\mathbb{R}^n$ a Borel set, let $\mu\res E$ denote the \emph{restriction of $\mu$ to $E$}, i.e.~ the measure defined by the rule $(\mu\res E)(F)=\mu(E\cap F)$ for all Borel $F\subset\mathbb{R}^n$.

\begin{theorem}[\cite{Mattila75}]\label{t:M} Let $1\leq m\leq n-1$. Suppose $E\subset\mathbb{R}^n$ is Borel and $\mu=\mathcal{H}^m\res E$ is locally finite. Then $\mu$ is $m$-rectifiable if and only if the Hausdorff $m$-density of $\mu$ exists and $D^m(\mu,x)=1$ at $\mu$-a.e.~ $x\in\mathbb{R}^n$.\end{theorem}

\begin{theorem}[\cite{Preiss}]\label{t:P} Let $1\leq m\leq n-1$. If $\mu$ is a locally finite Borel measure on $\mathbb{R}^n$, then $\mu$ is $m$-rectifiable and $\mu\ll \mathcal{H}^m$  if and only if the Hausdorff $m$-density of $\mu$ exists and $0<D^m(\mu,x)<\infty$ at $\mu$-a.e.~ $x\in\mathbb{R}^n$.\end{theorem}

There exist additional characterizations of absolutely continuous rectifiable measures (e.g.~ in terms of the tangent measures of $\mu$). For a full survey, we refer the reader to the book \cite{Mattila} by Mattila.

In general, $m$-rectifiable measures on $\mathbb{R}^n$ are not necessarily absolutely continuous with respect to Hausdorff measure $\mathcal{H}^m$. In the case $m=1$, an interesting family of singular 1-rectifiable measures was recently identified by Garnett, Killip and Schul \cite{GKS}.

\begin{example}[\cite{GKS}] \label{e:GKS} Let $h:\mathbb{R}\rightarrow\mathbb{R}$ be the 1-periodic function defined by \begin{equation*} h(x)=\left\{\begin{array}{ll} 2 &\text{if }x\in[\tfrac13,\tfrac23)+\mathbb{Z}\\ -1 &\text{otherwise}\end{array}\right.\!\!.\end{equation*} Given $0<\delta\leq 1/3$, define the measure $\eta$ on $\mathbb{R}$ to be the weak-$*$ limit of measures $\eta_k$,\begin{equation*} d\eta_k:=\prod
_{j=0}^{k-1} [1+ (1-3\delta) h(3^jx)]\,dx.\end{equation*} Finally, assign $\mu=\eta\times\dots\times\eta$ to be the $n$-fold product of $\eta$. When $\delta=1/3$, the measure $\mu$ is Lebesgue measure on $\mathbb{R}^n$. On the other hand, Garnett, Killip and Schul proved that if $\delta\leq \delta_n<1/3$ is sufficiently small, then $\mu$ is 1-rectifiable in the sense of Definition \ref{d:rect}
(see Theorem 1.1 and the paragraph ``In closing..." on p.~ 1678 of \cite{GKS}).
Therefore, for all $n\geq 2$, there exist locally finite Borel measures $\mu$ on $\mathbb{R}^n$ with the following properties.
\begin{itemize}
 \item The support of $\mu$ is $\mathbb{R}^n$: $\mu(B(x,r))>0$ for all $x\in\mathbb{R}^n$ and for all $r>0$.
 \item The measure $\mu$ is \emph{doubling}: there is $C>1$ such that $\mu(B(x,2r))\leq C\mu(B(x,r))$ for all $x$ in the support of $\mu$ and for all $r>0$.
 \item Every Lipschitz graph (i.e.~ a set which up to an isometry of $\mathbb{R}^n$ has the form $\{(x,f(x)):f:\mathbb{R}^{m}\rightarrow\mathbb{R}^{n-m}\text{ is Lipschitz}\}$ for $1\leq m\leq n-1$) has $\mu$ measure zero.
 \item For every connected Borel set $\Gamma\subset\mathbb{R}^n$, the set $\{x\in \Gamma: \lD1(\mathcal{H}^1\res \Gamma,x)<\infty\}$ has $\mu$ measure zero.
 \item The measure $\mu$ is 1-rectifiable.
 \item The measure $\mu$ is singular with respect to  $\mathcal{H}^1$.
\end{itemize}
\end{example}

In our opinion, general rectifiable measures that are allowed to be singular with respect to Hausdorff measure are currently poorly understood. We believe that the following open problem represents a major challenge in geometric measure theory.

\begin{problem}\label{p:singular} For all $1\leq m\leq n-1$, find necessary and sufficient conditions in order for a locally finite Borel measure $\mu$ on $\mathbb{R}^n$ to be $m$-rectifiable. (Do not assume that $\mu\ll \mathcal{H}^m$.)\end{problem}

In this paper, we adapt tools from the theory of quantitative rectifiability to attack Problem \ref{p:singular} in the case $m=1$. In particular, we establish new necessary conditions for a locally finite Borel measure $\mu$ on $\mathbb{R}^n$ to be 1-rectifiable. To state these results, we need to introduce two concepts --- \emph{$L^2$ beta numbers} and \emph{$L^2$ Jones functions} --- which emanate from \cite{Jones-TST,DS91,DS93,BJ} (also see  \cite{Pajot96,Pajot97,Leger,Lerman,DT}).

For all $E\subset\mathbb{R}^n$ and $x\in\mathbb{R}^n$, let $\mathop\mathrm{diam}\nolimits E:=\sup_{y,z\in E}|y-z|$ and $\mathop\mathrm{dist}\nolimits(x,E):=\inf_{z\in F}|x-z|$ denote respectively the \emph{diameter of $E$} and the \emph{distance of $x$ to $E$}.

\begin{definition}[$L^2$ beta numbers] For every locally finite Borel measure $\mu$ on $\mathbb{R}^n$ and every bounded Borel set $Q\subset\mathbb{R}^n$ (typically we take $Q$ to be a cube), define  $\beta_2(\mu,Q)$ by
\begin{equation} \label{e:beta-2}
   \beta_2^2(\mu,Q):=\inf_\ell \int_Q \left(\frac{\mathop\mathrm{dist}\nolimits(x,\ell)}{\mathop\mathrm{diam}\nolimits Q}\right)^2 \frac{d\mu(x)}{\mu(Q)}\in[0,1],
\end{equation}
where $\ell$ in the infimum ranges over all lines in $\mathbb{R}^n$. If $\mu(Q)=0$, then we interpret (\ref{e:beta-2}) as $\beta_2(\mu,Q)=0$.\end{definition}

The beta number $\beta_2(\mu,Q)$ records how well $\mu\res Q$ is fit by a linear regression model, in an $L^2$ sense. At one extreme, $\beta_2(\mu,Q)=0$ if and only if $\mu\res Q=\mu\res(Q\cap \ell_0)$ for some line $\ell_0$ in $\mathbb{R}^n$. At the other extreme, $\beta_2(\mu,Q)\sim 1$ when the mass of $\mu\res Q$ is ``scattered" in the sense that $\mu\res Q$ assigns non-negligible mass ``far away" from every line passing through $Q$.

One may think of several natural ways to ``add up" the errors $\beta_2(\mu,Q)$ at ``all scales". Below we focus on two variations. Let $\Delta(\mathbb{R}^n)$ denote the \emph{standard dyadic grid}; that is, the collection of all (closed) dyadic cubes in $\mathbb{R}^n$. Also, for each cube $Q$ and $\lambda>0$, let $\lambda Q$ denote the concentric cube about $Q$ that is obtained by dilating $Q$ by a factor of $\lambda$.

\begin{definition}[$L^2$ Jones functions] Let $\mu$ be a locally finite Borel measure on $\mathbb{R}^n$ and let $r>0$. The \emph{ordinary $L^2$ Jones function $J_2(\mu,r,\cdot)$ for $\mu$} is defined by \begin{equation*} J_2(\mu,r,x):=\sum_{Q}\beta_2^2(\mu,3Q)\chi_Q(x)\in[0,\infty]\end{equation*} for all $x\in\mathbb{R}^n$,
where $Q$ ranges over all $Q\in\Delta(\mathbb{R}^n)$ with side length at most $r$. We abbreviate the function $J_2(\mu,1,\cdot)$ starting at scale $1$ by $J_2(\mu,\cdot)$.

The \emph{density-normalized $L^2$ Jones function $\widetilde{J}_2(\mu,r,\cdot)$ for $\mu$} is defined by
\begin{equation}
\label{e:dnJones} \widetilde{J}_2(\mu,r,x):=\sum_{Q}\beta_2^2(\mu,3Q)\frac{\mathop\mathrm{diam}\nolimits Q}{\mu(Q)}\,\chi_Q(x)\in[0,\infty]
\end{equation}
for all $x\in\mathbb{R}^n$, where $Q$ ranges over all $Q\in\Delta(\mathbb{R}^n)$ with side length at most $r$. (Here we take $0/0=0$.) We abbreviate the function $\widetilde{J}_2(\mu,1,\cdot)$ starting at scale 1 by $\widetilde{J}_2(\mu,\cdot)$.
\end{definition}

The ordinary $L^2$ Jones function $J_2(\mu,\cdot)$ has been used by several authors to study the rectifiability of absolutely continuous measures of the form $\mu=\mathcal{H}^1\res E$, $E\subset\mathbb{R}^n$. Although we formulate Example \ref{e:ds}, Theorem \ref{t:p1} and Theorem \ref{t:p2} for 1-rectifiable measures only, analogous statements for $m$-rectifiable measures exist for all $m\geq 2$.

\begin{example}[\cite{DS91}] \label{e:ds} Let $E\subset\mathbb{R}^n$ be Borel and 1-Ahlfors regular, i.e.~ suppose that there exist constants $c_1,c_2>0$ such that $c_1r\leq \mathcal{H}^1(E\cap B(x,r))\leq c_2r$ for all $x\in E$  and for all $0<r<\mathop\mathrm{diam}\nolimits E$. If $\mu=\mathcal{H}^1\res E$ is \emph{1-uniformly rectifiable} in the sense of David and Semmes \cite{DS91,DS93}, then there exists a constant $C=C(\mu)>0$ such that $\int_Q J_2(\mu,\mathop\mathrm{diam}\nolimits Q,\cdot)\, d\mu\leq C\mathop\mathrm{diam}\nolimits Q$ for every dyadic cube $Q$. In particular, $J_2(\mu,\cdot)<\infty$ $\mu$-a.e.\end{example}

\begin{theorem}[{\cite[Theorem 1.1]{Pajot97}}] \label{t:p1} Suppose $K\subset\mathbb{R}^n$ is compact and $\mu=\mathcal{H}^1\res K$ is finite. If both $\lD{1}(\mu,x)>0$ and $J_2(\mu,x)<\infty$ at $\mu$-a.e.~ $x\in\mathbb{R}^n$, then $\mu$ is 1-rectifiable.
\end{theorem}

\begin{theorem}[{\cite[Theorem 1.2]{Pajot97}}] \label{t:p2} If $K\subset\mathbb{R}^n$ is compact and 1-Ahlfors regular, then $\mu=\mathcal{H}^1\res K$ is 1-rectifiable if and only if $J_2(\mu,\cdot)<\infty$ $\mu$-a.e.\end{theorem}

By contrast, for singular rectifiable measures, $J_2(\mu,\cdot)$ can be badly behaved.

\begin{example} \label{e:GKS2} Let $\mu$ be a measure from Example \ref{e:GKS} with defining parameter $\delta\leq \delta_n$. Since $\beta_2(\mu,3Q)\sim 1$ for every dyadic cube $Q$, the ordinary Jones function $J_2(\mu,\cdot)=\infty$ $\mu$-a.e. Nevertheless, it follows from the estimates in \cite{GKS} or by Theorem \ref{t:A} below that the density-normalized Jones function $\widetilde{J}_2(\mu,\cdot)<\infty$ $\mu$-a.e.\end{example}

In 2000, Peter Jones conjectured that weighted $L^2$ Jones functions should lead to a solution of Problem \ref{p:singular} (private communication). Nam-Gyu Kang obtained unpublished results about this conjecture for measures supported on the four-corner Cantor set in $\mathbb{R}^2$ (private communication). The general case is more complicated, as is evident by the measures in Example \ref{e:GKS}.

We are now ready to state our main results. Theorem \ref{t:A} confirms Jones' conjecture by connecting  the rectifiability of a measure to the pointwise behavior of its density-normalized $L^2$ Jones function. Corollary \ref{c:B} shows that for absolutely continuous measures, rectifiability of a measure also controls its ordinary $L^2$ Jones function.

\begin{maintheorem}\label{t:A} Let $\mu$ be a locally finite Borel measure on $\mathbb{R}^n$. If $\mu$ is 1-rectifiable, then $\widetilde{J}_2(\mu,x)<\infty$ at $\mu$-a.e.~ $x\in\mathbb{R}^n$.
\end{maintheorem}

\begin{maincor}\label{c:B} Let $\mu$ be a locally finite Borel measure on $\mathbb{R}^n$. If $\mu$ is 1-rectifiable and $\mu\ll \mathcal{H}^1$, then $J_2(\mu,x)<\infty$ at $\mu$-a.e.~ $x\in\mathbb{R}^n$.\end{maincor}

In the special case of 1-dimensional Hausdorff measure restricted to a compact set, Corollary \ref{c:B} (together with Lemma \ref{l:LD}) immediately yields the converse to Theorem \ref{t:p1}.

\begin{maincor}\label{c:C} Suppose that $K\subset\mathbb{R}^n$ is compact and $\mu=\mathcal{H}^1\res K$ is finite. Then $\mu$ is 1-rectifiable if and only if both $\lD1(\mu,\cdot)>0$ and $J_2(\mu,\cdot)<\infty$ $\mu$-a.e.~ $x\in\mathbb{R}^n$.\end{maincor}

A qualitative consequence of Theorem \ref{t:A} is that a 1-rectifiable measure $\mu$ exhibits at least one of two extreme behaviors at $\mu$-almost every $x$ in $\mathbb{R}^n$: $\mu$ admits arbitrarily good 1-dimensional linear approximations near $x$ \emph{or} $\mu$ has arbitrarily large 1-dimensional density ratio near $x$. Thus, if one extreme fails, the other extreme must occur.

\begin{example} Let $\mu$ be a measure from Example \ref{e:GKS} with defining parameter $\delta\leq \delta_n$. Since $\widetilde{J}_2(\mu,x)<\infty$ and $\beta(\mu,3Q)\sim 1$ for every dyadic cube $Q$, the Hausdorff 1-density of $\mu$ exists and $D^1(\mu,x)=\infty$ at $\mu$-a.e.~ $x\in\mathbb{R}^n$.
\end{example}

The proofs of Theorem \ref{t:A} and Corollary \ref{c:B} will be given in \S\ref{s:prelim} (prerequisites) and \S\ref{s:A} (main arguments). We remark that because the proofs rely on the Traveling Salesman Theorem for rectifiable curves in $\mathbb{R}^n$, it is not immediately clear how to use our method to study $m$-rectifiable measures for $m\geq 2$. Our work also leaves open the possibility of finding sufficient conditions for rectifiability. Nevertheless, we believe that the idea encoded in the definition of $\widetilde{J}_2(\mu,\cdot)$---to normalize a multiscale quantity by the density of a measure scale-by-scale---is a fruitful idea that should prove useful in additional situations.

To end the paper, in \S \ref{s:related}, we discuss some connections between Theorem \ref{t:A} and Corollary \ref{c:B}, and prior work of L\'eger \cite{Leger} (Menger curvature), Lerman \cite{Lerman} (curve learning) and Tolsa \cite{Tolsa} (mass transport).

\begin{ack} The authors would like to thank Marianna Cs\"ornyei for insightful discussions about this project. The authors would also like to thank an anonymous referee for his or her careful reading of the paper. Part of this work was carried out while both authors visited the Institute for Pure and Applied Mathematics (IPAM) during the Spring 2013 long program on Interactions between Analysis and Geometry. \end{ack}

\section{Traveling Salesman Theorem and Other Prerequisites}\label{s:prelim}

In this section, we recall an essential tool from the theory of quantitative rectifiability: the Analyst's Traveling Salesman Theorem. We also collect miscellaneous lemmas which facilitate the proofs in section \ref{s:A}.

\begin{definition} Let $E\subset\mathbb{R}^n$ be any set. For every bounded set $Q\subset\mathbb{R}^n$ such that $E\cap Q\neq\emptyset$, define the quantity $\beta_{E}(Q)$ by \begin{equation*}
  \beta_{E}(Q):=\inf_{\ell}\sup_{x\in E\cap Q}\frac{\mathop\mathrm{dist}\nolimits(x,\ell)}{\mathop\mathrm{diam}\nolimits Q}\end{equation*} where $\ell$ ranges over all lines in $\mathbb{R}^n$. By convention, we set $\beta_E(Q)=0$ if $E\cap Q=\emptyset$.
\end{definition}

\begin{theorem}[Traveling Salesman Theorem, \cite{Jones-TST,Ok-TST}] \label{t:tst} A bounded set $E\subset\mathbb{R}^n$ is a subset of a rectifiable curve in $\mathbb{R}^n$ if and only if
\begin{equation*} \beta^2(E):=\sum_{Q\in\Delta(\mathbb{R}^n)}\beta_E(3Q)^{2}\mathop\mathrm{diam}\nolimits Q<\infty.\end{equation*} Moreover, there exists a constant $C=C(n)\in(1,\infty)$ (independent of $E$) such that
\begin{itemize}
\item $\beta^2(E)\leq C \mathcal{H}^1(\Gamma)$ for every connected set $\Gamma$ containing $E$, and
\item there exists a connected set $\Gamma\supset E$ such that $\mathcal{H}^1(\Gamma)\leq C(\mathop\mathrm{diam}\nolimits E +\beta^2(E)).$
\end{itemize} \end{theorem}

\begin{corollary} \label{c:tst} For all $n\geq 2$ and $3<a<\infty$, there is a constant $C'=C'(n,a)\in(1,\infty)$ such that if $E\subset \mathbb{R}^n$ is bounded and $\Gamma$ is a connected set containing $E$, then $$\sum_{Q\in\Delta(\mathbb{R}^n)} \beta_E(aQ)^2\mathop\mathrm{diam}\nolimits Q \leq C' \mathcal{H}^1(\Gamma).$$\end{corollary}

\begin{proof} Let $n\geq 2$ and let $3<a<\infty$ be given. For any dyadic cube $Q\in\Delta(\mathbb{R}^n)$ and integer $k\geq 0$, let $Q^{\uparrow k}\in\Delta(\mathbb{R}^n)$ denote the $k$th ancestor of $Q$, i.e.~ $Q^{\uparrow k}$ is the unique dyadic cube containing $Q$ with $\mathop\mathrm{diam}\nolimits Q^{\uparrow k}= 2^k\mathop\mathrm{diam}\nolimits Q$. Choose $m\geq 1$ large enough depending only on $a$ such that $aQ\subset 3Q^{\uparrow m}$ for all $Q\in\Delta(\mathbb{R}^n)$ (e.g.~ $m=\lceil \log_2 a\rceil$ will suffice.) Then $\beta_E(aQ) \leq (3\cdot 2^m/a)\beta_E(3 Q^{\uparrow m}) \leq 2^m \beta_E(3 Q^{\uparrow m})$ for all $E\subset\mathbb{R}^n$ and $Q\in\Delta(\mathbb{R}^n)$. Hence \begin{equation*}\begin{split} \sum_{Q\in\Delta(\mathbb{R}^n)} \beta_E(aQ)^2 \mathop\mathrm{diam}\nolimits Q &\leq 2^{2m}\sum_{Q\in\Delta(\mathbb{R}^n)} \beta_E (3Q^{\uparrow m})^2 \mathop\mathrm{diam}\nolimits Q  \\ &= 2^m\sum_{Q\in\Delta(\mathbb{R}^n)} \beta_E(3Q^{\uparrow m})^2 \mathop\mathrm{diam}\nolimits Q^{\uparrow m} \\ &= 2^{m(1+n)}\sum_{Q\in\Delta(\mathbb{R}^n)} \beta_E(3Q)^2\mathop\mathrm{diam}\nolimits Q \leq 2^{m(1+n)} C\mathcal{H}^1(\Gamma)
\end{split}\end{equation*} whenever $E\subset\mathbb{R}^n$ is bounded and $\Gamma$ is a connected set containing $E$ by Theorem \ref{t:tst}. \end{proof}

\begin{remark}\label{r:hilbert} Inspecting the proof in \cite{Ok-TST} shows that the constants $C$ in Theorem \ref{t:tst} depends exponentially on the dimension $n$. Schul \cite{Schul-Hilbert} formulated a version of the Analysts' Traveling Salesman Theorem that is valid in infinite-dimensional Hilbert space. However, to obtain Theorem \ref{t:tst} with constants that are independent of the dimension $n$, one must replace the grid of dyadic cubes appearing in the definition of $\beta^2(E)$ with a ``multiresolution family" of balls that are adapted to a sequence $(X_k)_{k=1}^\infty$ of $2^{-k}$-nets for the set $E$.\end{remark}

We now enumerate several lemmas that will be used in section \ref{s:A}, starting with some facts from geometric measure theory. To fix conventions, we recall the definitions of Hausdorff and packing measures in $\mathbb{R}^n$. See \cite[Chapters 4--6]{Mattila} for general background.

\begin{definition}[Hausdorff and packing measures in $\mathbb{R}^n$] Let $s\geq 0$ be a real number. Let $E,E_1,E_2,\dots$ denote Borel sets in $\mathbb{R}^n$. The \emph{$s$-dimensional Hausdorff measure} $\mathcal{H}^s$ is defined by $\mathcal{H}^s(E)=\lim_{\delta\rightarrow 0} \mathcal{H}^s_\delta(E)$ where \begin{equation*} \mathcal{H}^s_\delta(E)=\inf\left\{\sum_i (\mathop\mathrm{diam}\nolimits E_i)^s:E\subset\bigcup_i E_i,\ \mathop\mathrm{diam}\nolimits E_i\leq \delta\right\}.\end{equation*} The \emph{$s$-dimensional packing premeasure} $P^s$ is defined by $P^s(E)=\lim_{\delta\rightarrow 0} P^s_\delta(E)$ where \begin{equation*}P^s_\delta(E)=\sup\left\{\sum_{i}(2r_i)^s: x_i\in E, 2r_i\leq \delta, i\neq j\Rightarrow B(x_i,r_i)\cap B(x_j,r_j)=\emptyset\right\}.\end{equation*} The \emph{$s$-dimensional packing measure} $\mathcal{P}^s$ is defined by \begin{equation*}\mathcal{P}^s(E)=\inf\left\{\sum_i P^s(E_i):E=\bigcup_i E_i\right\}.\end{equation*}\end{definition}

\begin{lemma}\label{l:UD} Let $\mu$ be a locally finite Borel measure on $\mathbb{R}^n$. Then $\mu\ll \mathcal{H}^s$ if and only if $\uD{s}(\mu,\cdot)<\infty$ $\mu$-a.e.\end{lemma}

Lemma \ref{l:UD} is Exercise 4 in \cite[Chapter 6]{Mattila}.

\begin{lemma}\label{l:LD} Let $\mu$ be a locally finite Borel measure on $\mathbb{R}^n$.  If $\mu$ is $m$-rectifiable, then $\lD{m}(\mu,\cdot)>0$ $\mu$-a.e.\end{lemma}

To prove Lemma \ref{l:LD}, we first prove an auxiliary lemma.

\begin{lemma}\label{l:lpack} Let $E\subset\mathbb{R}^m$. If $f:E\rightarrow\mathbb{R}^n$ is Lipschitz, then $P^s(f(E))\leq (\mathop\mathrm{Lip}\nolimits f)^s\, P^s(E)$ and  $\mathcal{P}^s(f(E))\leq (\mathop\mathrm{Lip}\nolimits f)^s\,\mathcal{P}^s(E)$. \end{lemma}

\begin{proof}Assume that $P^s(E)<\infty$ and $f:E\rightarrow\mathbb{R}^n$ is $L$-Lipschitz. Given $\varepsilon>0$, pick $\eta>0$ such that $P^s_\eta(E)\leq P^s(E)+\varepsilon$. Fix $0<\delta\leq L\eta$  and let $\{B^n(f(x_i),r_i):i\geq 1\}$ be an arbitrary disjoint collection of balls in $\mathbb{R}^n$ centered in $f(E)$ such that $2r_i\leq \delta$ for all $i\geq 1$. Since $f$ is $L$-Lipschitz, \begin{equation*}f(B^m(x_i,r_i/L))\subset B^n(f(x_i),r_i)\quad\text{for all }i\geq 1.\end{equation*} Thus $\{B^m(x_i,r_i/L):i\geq 1\}$ is a disjoint collection of balls in $\mathbb{R}^m$ centered in $E$ such that $2r_i/L\leq \delta/L\leq \eta$. Hence \begin{equation*} \sum_{i=1}^\infty (2r_i)^s = L^s\sum_{i=1}^\infty (2r_i/L)^s \leq L^sP^s_\eta(E)\leq L^s(P^s(E)+\varepsilon).\end{equation*} Taking the supremum over all $\delta$-packings of $f(E)$, we obtain $P^s_\delta(f(E))\leq L^s(P^s(E)+\varepsilon)$. Therefore, letting $\delta\rightarrow 0$ and $\varepsilon\rightarrow 0$, $P^s(f(E))\leq L^s P^s(E)$. The corresponding inequality for the packing measure $\mathcal{P}^s$ follows immediately from the inequality for $P^s$.\end{proof}

\begin{proof}[Proof of Lemma \ref{l:LD}] Let $\mu$ be a locally finite $m$-rectifiable Borel measure on $\mathbb{R}^n$ and let $A=\{x\in\mathbb{R}^n:\lD{m}(\mu,x)=0\}$. To show that $\mu(A)=0$ it suffices to prove that $\mu(A\cap f(E))=0$ for every bounded set $E\subset\mathbb{R}^m$ and every Lipschitz map $f:E\rightarrow\mathbb{R}^n$, since $\mu$ is $m$-rectifiable. To that end fix $E\subset\mathbb{R}^m$ bounded and $f:E\rightarrow\mathbb{R}^n$ Lipschitz. Then $\mathcal{P}^m(f(E))\leq (\mathop\mathrm{Lip}\nolimits f)^m\, \mathcal{P}^m(E)<\infty$ by Lemma \ref{l:lpack} and the assumption that $E\subset\mathbb{R}^m$ is bounded. Let $\lambda>0$. Since $\lD{m}(\mu,x)=0\leq\lambda$ for all $x\in A\cap f(E)$, we have \begin{equation*}\mu(A\cap f(E)) \leq \lambda \mathcal{P}^m(A\cap f(E))\leq \lambda \mathcal{P}^m(f(E))\end{equation*} by \cite[Theorem 6.11]{Mattila}. Thus, letting $\lambda\rightarrow 0$, $\mu(A\cap f(E))=0$ for every bounded set $E\subset\mathbb{R}^m$ and every Lipschitz map $f:E\rightarrow\mathbb{R}^n$. Therefore, $\mu(A)=0$, or equivalently, $\lD{m}(\mu,x)>0$ for $\mu$-a.e.~ $x\in\mathbb{R}^n$. \end{proof}

Next we make some comparisons between the different $L^2$ Jones functions defined in the introduction.

\begin{lemma}\label{l:truncate} For every locally finite Borel measure $\mu$, the sets \begin{itemize}
 \item $\{x\in\mathbb{R}^n:J_2(\mu,r,x)<\infty\}$ and $\{x\in\mathbb{R}^n:J_2(\mu,r,x)=\infty\}$, and
 \item $\{x\in\mathbb{R}^n:\widetilde{J}_2(\mu,r,x)<\infty\}$ and $\{x\in\mathbb{R}^n:\widetilde{J}_2(\mu,r,x)=\infty\}$
\end{itemize} are independent of the parameter $r>0$.\end{lemma}

\begin{proof} With $\mu$ and $x$ fixed, changing the value of $r>0$ inserts or deletes at most a finite number of terms in the defining sums for $J_2(\mu,r,x)$ and $\widetilde{J}_2(\mu,r,x)$.\end{proof}

Below $\mathop\mathrm{side}\nolimits Q:=\mathop\mathrm{diam}\nolimits Q/\sqrt{n}$ denotes the side length of a cube in $\mathbb{R}^n$.

\begin{lemma}\label{l:c1} Let $\mu$ be a locally finite Borel measure and let $x\in\mathbb{R}^n$. If $\uD1(\mu,x)<\infty$ and $\widetilde{J}_2(\mu,x)<\infty$, then $J_2(\mu,x)<\infty$.\end{lemma}

\begin{proof} Let $\mu$ be a locally finite Borel measure on $\mathbb{R}^n$, and assume that at some $x\in\mathbb{R}^n$, both $\uD1(\mu,x)<\infty$ and $\widetilde{J}_2(\mu,x)<\infty$. Since $\uD1(\mu,x)<\infty$ there exist constants $M<\infty$ and $r_0>0$ such that $\mu(B(x,r))\leq Mr$ for all $0<r\leq r_0$. In particular, \begin{equation*}\mu(Q)\leq \mu(B(x,\mathop\mathrm{diam}\nolimits Q))\leq M\mathop\mathrm{diam}\nolimits Q\end{equation*} for every cube $Q$ containing $x$ with $\mathop\mathrm{side}\nolimits Q\leq r_0/\sqrt{n}$ (that is, $\mathop\mathrm{diam}\nolimits Q\leq r_0$). Hence \begin{equation}\label{e:orange}\begin{split} J_2(\mu,r_0/\sqrt{n},x) &= \sum_{\stackrel{Q\in\Delta(\mathbb{R}^n)}{\mathop\mathrm{side}\nolimits Q\leq r_0/\sqrt{n}}} \beta_2^2(\mu,3Q)\chi_Q(x)\\ &\leq M \sum_{\stackrel{Q\in\Delta(\mathbb{R}^n)}{\mathop\mathrm{side}\nolimits Q\leq r_0/\sqrt{n}}} \beta_2^2(\mu,3Q) \frac{\mathop\mathrm{diam}\nolimits Q}{\mu(Q)}\chi_Q(x) = M \widetilde{J}_2(\mu,r_0/\sqrt{n},x).\end{split}\end{equation} But $\widetilde{J}_2(\mu,r_0/\sqrt{n},x)<\infty$ by Lemma \ref{l:truncate}, since $\widetilde{J}_2(\mu,x)<\infty$. Hence $J_2(\mu,r_0/\sqrt{n},x)<\infty$ by (\ref{e:orange}). Therefore, since $J_2(\mu,r_0/\sqrt{n},x)<\infty$, we have $J_2(\mu,x)<\infty$ by Lemma \ref{l:truncate}.
\end{proof}

\section{Proofs of the Main Results}\label{s:A}

The proof of Theorem \ref{t:A} is based on Proposition \ref{prop1L}. Roughly speaking, this proposition says that if the lower density of a finite measure $\nu$ is uniformly bounded away from 0 along a subset $E$ of a rectifiable curve $\Gamma\subset\mathbb{R}^n$, then $\widetilde{J}_2(\nu,\cdot)|_E$ has finite norm in $L^1(\nu)$. In particular, $\widetilde{J}_2(\nu,x)<\infty$ at $\nu$-a.e.~ $x\in E$.

\begin{proposition}\label{prop1L} Let $\nu$ be finite Borel measure on $\mathbb{R}^n$ and let $\Gamma$ be a rectifiable curve. If $E\subset\Gamma$ is Borel and there exists a constant $c_E>0$ such that $\nu(B(x,r))\geq c_E r$ for all $x\in E$ and for all $0<r\leq r_0$, then \begin{equation*} \int_{E} \widetilde{J}_2(\nu,r_0,x)\,d\nu(x)\lesssim \mathcal{H}^1(\Gamma)+\nu(\mathbb{R}^n\setminus \Gamma),\end{equation*} where the implied constant depends only on $n$ and $c_E$ (see (\ref{const1L})).
\end{proposition}

\begin{proof}[Proof of Proposition \ref{prop1L}]

Let $\nu$ be a finite Borel measure on $\mathbb{R}^n$ and let $\Gamma$ be a rectifiable curve in $\mathbb{R}^n$. Assume that $E\subset\Gamma$ is Borel and there exists a constant $c_E>0$ such that $\nu(E\cap B(x,r))\geq c_E r$ for all $x\in E$ and for all $0<r \leq r_0$. Our objective is to find an upper bound for $\int_E\widetilde{J}_2(\nu,r_0,x)\,d\nu(x)$ in terms of the ambient dimension $n$, the lower Ahlfors regularity constant $c_E$, the length of $\Gamma$, and $\nu(\mathbb{R}^n\setminus\Gamma)$.

For the duration of the proof, we let $a>3$ and $\varepsilon>0$ denote fixed constants, depending on at most $n$, which will be specified after (\ref{e:apple2}). To proceed divide the dyadic cubes $\Delta(\mathbb{R}^n)$ into three subfamilies $\Delta_0$, $\Delta_\Gamma$ and $\Delta_2$, as follows:
\begin{align*}\Delta_0&=\{Q\in\Delta(\mathbb{R}^n):\mathop\mathrm{side}\nolimits Q>r_0\text{ or }\nu(E\cap Q)=0\},\\
\Delta_\Gamma&=\{Q\in\Delta(\mathbb{R}^n): \mathop\mathrm{side}\nolimits Q\leq r_0,\, \nu(E\cap Q)>0\text{ and } \varepsilon\beta_2(\nu,3Q)\leq \beta_{\Gamma}(aQ)\},\text{ and}\\
\Delta_2&=\{Q\in\Delta(\mathbb{R}^n):\mathop\mathrm{side}\nolimits Q\leq r_0,\, \nu(E\cap Q)>0\text{ and } \beta_{\Gamma}(aQ) < \varepsilon\beta_2(\nu,3Q)\}.\end{align*} Thus, the family $\Delta_0$ consists of all of the dyadic cubes in $\mathbb{R}^n$ that do not contribute to $\int_E\widetilde{J}_2(\nu,r_0,x)\,d\nu(x)$. And, of the remainder, the families $\Delta_\Gamma$ and $\Delta_2$ consist of the cubes for which either $\beta_{\Gamma}(aQ)$ or $\varepsilon\beta_2(\nu,3Q)$ is the dominant quantity, respectively. Reading off the definitions of $\widetilde{J}_2(\nu,r_0,\cdot)$,  $\Delta_0$, $\Delta_\Gamma$ and $\Delta_2$, it follows that\begin{align}
\notag \int_{E}\widetilde{J}_2(\nu,r_0,x)\,d\nu(x)
 &= \sum_{Q} \beta_2^2(\nu,3Q)\frac{\mathop\mathrm{diam}\nolimits Q}{\nu(Q)}\int_{E}\chi_Q(x)\,d\nu(x)\\
\notag &=  \sum_{Q\in\Delta_\Gamma\cup\Delta_2} \beta_2^2(\nu,3Q)\mathop\mathrm{diam}\nolimits Q \frac{\nu(E\cap Q)}{\nu(Q)} \\
 &\leq
  \underbrace{\varepsilon^{-2}\sum_{Q\in\Delta_\Gamma}\beta_{\Gamma}^2(aQ)\mathop\mathrm{diam}\nolimits Q}_I +
  \underbrace{\sum_{Q\in\Delta_2}\beta_2^2(\nu,3Q)\mathop\mathrm{diam}\nolimits Q}_{I\!I}. \label{I-II}
\end{align} We shall estimate the terms $I$ and $I\!I$ separately. The former will be controlled by $\mathcal{H}^1(\Gamma)$ and the latter will be controlled by $\nu(\mathbb{R}^n\setminus\Gamma)$.

To estimate $I$, we note that by Corollary \ref{c:tst},
\begin{equation}\label{Iest} I \leq \varepsilon^{-2} \sum_{Q\in\Delta(\mathbb{R}^n)}\beta_\Gamma^2(aQ)\mathop\mathrm{diam}\nolimits Q \leq C'\varepsilon^{-2}\mathcal{H}^1(\Gamma),\end{equation} where $C'$ is a finite constant determined by $n$ and $a$.

In order to estimate $I\!I$, decompose $\mathbb{R}^n\setminus \Gamma$ into a family $\mathcal{T}$ of Whitney cubes with the following specifications. \begin{itemize}
\item The union over all sets in $\mathcal{T}$ is $\mathbb{R}^n\setminus \Gamma$.
\item Each set in $\mathcal{T}$ is a half-open cube in $\mathbb{R}^n$ of the form $(a_1,b_1]\times\dots\times(a_n,b_n]$.
\item If $T_1,T_2\in\mathcal{T}$, then either $T_1=T_2$ or $T_1\cap T_2=\emptyset$.
\item If $T\in\mathcal{T}$, then $\mathop\mathrm{dist}\nolimits(T,\Gamma)\leq \mathop\mathrm{diam}\nolimits T\leq 4\mathop\mathrm{dist}\nolimits(T,\Gamma)$.
\end{itemize} (To obtain this decomposition, modify the standard Whitney decomposition in Stein [St] by replacing each closed cube with the corresponding half-open cube.) Here $\mathop\mathrm{dist}\nolimits(T,\Gamma)=\inf_{x\in T}\inf_{y\in \Gamma}|x-y|$. For each $k\in\mathbb{Z}$, we define \begin{equation*} \mathcal{T}_k=\{T\in\mathcal{T}:2^{-k-1}<\mathop\mathrm{dist}\nolimits(T,\Gamma)\leq 2^{-k}\}.\end{equation*} Also for every cube $Q$, we set $\mathcal{T}(Q)=\{T\in\mathcal{T}:\nu(Q\cap T)>0\}$ and $\mathcal{T}_k(Q)=\mathcal{T}_k\cap\mathcal{T}(Q)$. Our plan is to first estimate $\beta_2^2(\nu,3Q)\mathop\mathrm{diam}\nolimits Q$ for each $Q\in\Delta_2$ and then estimate $I\!I$.

Fix $Q\in\Delta_2$, say with $\mathop\mathrm{side}\nolimits Q=2^{-k_0}\leq r_0$. We remark that if $T\in\mathcal{T}_k(3Q)$, then $k\geq k_1(k_0):=k_0-1-\lfloor \log_23\sqrt{n}\rfloor$ (to derive this, bound the distance between a point in $T\cap 3Q$ and a point in $E\cap Q$ by $\mathop\mathrm{diam}\nolimits 3Q$). Pick any line $\ell$ in $\mathbb{R}^n$ such that \begin{equation}\begin{split}\label{e:apple0} \sup_{z\in \Gamma\cap aQ} \mathop\mathrm{dist}\nolimits(z,\ell) \leq 2\beta_{\Gamma}(aQ)\mathop\mathrm{diam}\nolimits aQ & <2\varepsilon \beta_2(\nu,3Q) \mathop\mathrm{diam}\nolimits aQ \\ &=(2/3)a\varepsilon \beta_2(\nu,3Q)\mathop\mathrm{diam}\nolimits 3Q.\end{split}\end{equation} To control $\beta_2^2(\nu,3Q)$, we divide $3Q$ into two sets, $N$ (``near") and $F$ (``far"), where \begin{equation*}N=\{x\in 3Q: \mathop\mathrm{dist}\nolimits(x,\ell)\leq (2/3)a\varepsilon\beta_2(\nu,3Q)\mathop\mathrm{diam}\nolimits 3 Q \}\end{equation*} and \begin{equation*}F=\{x\in 3Q :\mathop\mathrm{dist}\nolimits(x,\ell)>(2/3)a\varepsilon\beta_2(\nu,3Q)\mathop\mathrm{diam}\nolimits 3Q\}.\end{equation*} It follows that \begin{align} \notag \beta_2^2(\nu,3Q)
 &\leq \int_N \left(\frac{\mathop\mathrm{dist}\nolimits(x,\ell)}{\mathop\mathrm{diam}\nolimits 3Q}\right)^2\, \frac{d\nu(x)}{\nu(3Q)} + \int_F \left(\frac{\mathop\mathrm{dist}\nolimits(x,\ell)}{\mathop\mathrm{diam}\nolimits 3Q}\right)^2\,\frac{d\nu(x)}{\nu(3Q)}\\
 &\leq (2/3)^2a^2\varepsilon^2\beta_2^2(\nu,3Q)+\int_F\left(\frac{\mathop\mathrm{dist}\nolimits(x,\ell)}{\mathop\mathrm{diam}\nolimits 3Q}\right)^2 \, \frac{d\nu(x)}{\nu(3Q)} \label{e:apple1} \\
 &\leq 3(2/3)^2a^2\varepsilon^2\beta_2^2(\nu,3Q)+2\int_F\left(\frac{\mathop\mathrm{dist}\nolimits(x,\Gamma\cap aQ)}{\mathop\mathrm{diam}\nolimits 3Q}\right)^2\,\frac{d\nu(x)}{\nu(3Q)}, \label{e:apple2}\end{align} where to pass between (\ref{e:apple1}) and (\ref{e:apple2}) we used the triangle inequality, $(\ref{e:apple0})$, and the inequality $(p+q)^2\leq 2p^2+2q^2$. Note that $\mathop\mathrm{dist}\nolimits(x,\Gamma)\leq \mathop\mathrm{diam}\nolimits 3Q=3\sqrt{n}\mathop\mathrm{side}\nolimits Q$ for all $x\in F$, because $F\subset 3Q$ and $\Gamma\cap Q\neq\emptyset$ (since $\nu(E\cap Q)>0$ for all $Q\in\Delta_2$). Hence, specifying $a=3+6\sqrt{n}$ and $3(2/3)^2a^2\varepsilon^2=1/2$ (or generally $a\geq 3+6\sqrt{n}$ and $\varepsilon \leq 3/2a\sqrt{6}$) ensures that \begin{equation*}\mathop\mathrm{dist}\nolimits(x,\Gamma\cap aQ)=\mathop\mathrm{dist}\nolimits(x,\Gamma)\quad\text{for all }x\in F\end{equation*} and \begin{equation*}\beta_2^2(\nu,3Q) \leq 4\int_F\left(\frac{\mathop\mathrm{dist}\nolimits(x,\Gamma)}{\mathop\mathrm{diam}\nolimits 3Q}\right)^2\,\frac{d\nu(x)}{\nu(3Q)}.\end{equation*} We now employ the Whitney decomposition. Since $\Gamma\cap 3Q\subset N$  (by (\ref{e:apple0})), we have $F\subset\bigcup_{T\in\mathcal{T}(3Q)}T\cap 3Q= \bigcup_{k=k_1(k_0)}^\infty\bigcup_{T\in\mathcal{T}_k(3Q)}T\cap 3Q$. Note that if $T\in\mathcal{T}_k(3Q)$ and $x\in T$, then $\mathop\mathrm{dist}\nolimits (x,\Gamma)\leq \mathop\mathrm{dist}\nolimits(T,\Gamma)+\mathop\mathrm{diam}\nolimits T\leq 5\mathop\mathrm{dist}\nolimits(T,\Gamma)\leq 5\cdot2^{-k}$. Thus,
\begin{equation} \label{e:golf1} \beta_2^2(\nu,3Q)\leq  100\sum_{k=k_1(k_0)}^\infty\sum_{T\in\mathcal{T}_k(3Q)} \left(\frac{2^{-k}}{\mathop\mathrm{diam}\nolimits 3Q}\right)^2\,\frac{\nu(T\cap 3Q)}{\nu(3Q)}.\end{equation} To continue, recall that $\nu(E\cap Q)>0$. Hence, we can locate $z\in E\cap Q$ and use our assumption on $E$ to conclude that \begin{equation}\label{e:golf2}
\nu(3Q)\geq \nu(B(z,2^{-k_0}))\geq c_E2^{-k_0}=\frac{c_E}{\sqrt{n}}\mathop\mathrm{diam}\nolimits Q.\end{equation} Therefore, combining (\ref{e:golf1}) and (\ref{e:golf2}), and writing $\mathop\mathrm{diam}\nolimits 3Q=3\mathop\mathrm{diam}\nolimits Q$, we obtain \begin{equation}\label{beta-est}\beta_2^2(\nu,3Q)\mathop\mathrm{diam}\nolimits Q \leq \frac{100\sqrt{n}}{9c_E}\sum_{k=k_1(k_0)}^\infty\sum_{T\in\mathcal{T}_k(3Q)} \left(\frac{2^{-k}}{\mathop\mathrm{diam}\nolimits Q}\right)^2\nu(T\cap 3Q).
\end{equation} This estimate is valid for every cube $Q\in\Delta_2$.

Equipped with (\ref{beta-est}), we can now bound $I\!I$. Let $l\in\mathbb{Z}$ be the smallest integer with $2^{-l}\leq r_0$. For each $k\geq l$, write $\Delta_2(k)$ for the family of cubes in $\Delta_2$ with side length $2^{-k}$. Then
\begin{align*} I\!I
 &= \sum_{k_0=l}^\infty \sum_{Q\in\Delta_2(k_0)} \beta_2^2(\nu,3Q)\mathop\mathrm{diam}\nolimits Q \\
 &\leq \frac{100\sqrt{n}}{9c_E}\sum_{k_0=l}^\infty \sum_{Q\in\Delta_2(k_0)}\sum_{k=k_1(k_0)}^\infty \sum_{T\in\mathcal{T}_k(3Q)}\left(
 \frac{2^{-k}}{\sqrt{n}2^{-k_0}}\right)^2\nu(T\cap 3Q).
\end{align*} Let $N_0=4^n$ denote the maximum overlap of cubes $3Q$ and $3Q'$ where the cubes $Q$ and $Q'$ are (closed) dyadic cubes of equal side length. Then
\begin{align*}
 I\!I &\leq \frac{100N_0\sqrt{n}}{9c_E} \sum_{k_0=l}^\infty\sum_{k=k_1(k_0)}^\infty\sum_{T\in\mathcal{T}_k} \left(\frac{2^{-k}}{\sqrt{n}2^{-k_0}}\right)^2\nu(T)\\
 &= \frac{100 N_0}{9c_E\sqrt{n}}\sum_{k_0=l}^\infty\sum_{k=k_1(k_0)}^\infty (1/4)^{k-k_0}\nu\left(\bigcup\mathcal{T}_k\right).
\end{align*} (Here we used our assumption that the Whitney cubes in $\mathcal{T}$ are pairwise disjoint.) Next, set $m:=k_1(k_0)-k_0=1+\lfloor \log_2 3\sqrt{n}\rfloor$. Then, switching the order of summation,
\begin{align*}
 I\!I &\leq \frac{100N_0}{9c_E\sqrt{n}} \sum_{k=l-m}^\infty \sum_{k_0=l}^{l+k-(l-m)} (1/4)^{k-k_0}\,\nu\left(\bigcup\mathcal{T}_k\right) \\
 &\leq \frac{100N_0}{9c_E\sqrt{n}}\sum_{k=l-m}^\infty \sum_{j=-m}^\infty (1/4)^j \,\nu\left(\bigcup\mathcal{T}_k\right)\\
 &\leq \frac{100N_0}{9c_E\sqrt{n}}\,\frac{4^{m+1}}{3}\,\nu(\mathbb{R}^n\setminus\Gamma).\end{align*}
(Once again we used the disjointness of cubes in $\mathcal{T}$.) Since $4^{m+1}\leq 4^{2+\log_2 3\sqrt{n}}=16\cdot9n$ and $N_0=4^n$, it follows that \begin{equation} \label{IIest} I\!I\leq (\tfrac{1600}{3}\cdot 4^{n}\sqrt{n}/c_E)\nu(\mathbb{R}^n\setminus\Gamma).\end{equation}  Finally, combining (\ref{I-II}), (\ref{Iest}) and (\ref{IIest}), we conclude that \begin{equation*} \int_{E}\widetilde{J}_2(\nu,r_0,x)\,d\nu(x)\lesssim \mathcal{H}^1(\Gamma)+\nu(\mathbb{R}^n\setminus\Gamma),\end{equation*} where the implied constant depends only on $n$ and  $c_E$. More explicitly, \begin{equation}\label{const1L}\int_E\widetilde{J}_2(\nu,r_0,x)\,d\nu(x)\leq (8+16\sqrt{n})C'\mathcal{H}^1(\Gamma)+(\tfrac{1600}{3}\cdot4^{n}\sqrt{n}/c_E)\,\nu(\mathbb{R}^n\setminus\Gamma),\end{equation} where $C'$ is the constant from Corollary \ref{c:tst} with $a=3+6\sqrt{n}$ and is exponential in the dimension $n$.\end{proof}

We are now ready to prove Theorem \ref{t:A} and Corollary \ref{c:B}.

\begin{proof}[Proof of Theorem \ref{t:A}] Let $\mu$ be a locally finite Borel measure on $\mathbb{R}^n$ and assume that $\mu$ is 1-rectifiable. First, because $\mu$ is 1-rectifiable, we can find a countable family $\{\Gamma_i\}_{i=1}^\infty$ of rectifiable curves such that $\mu$ gives full mass to $\bigcup_{i=1}^\infty\Gamma_i$. Second, because $\lD1(\mu,\cdot)>0$ $\mu$-a.e.~ by Lemma \ref{l:LD}, the measure $\mu$ gives full mass to $\bigcup_{j=1}^\infty\bigcup_{k=1}^\infty E_{j,k}$, where the set $E_{j,k}=\{x\in\mathbb{R}^n: \mu(B(x,r))\geq 2^{-j}r$ for all $r\in(0,2^{-k}]\}$. Thus, to establish Theorem \ref{t:A}, it suffices to prove that $\widetilde{J}_2(\mu,x)<\infty$ at $\mu$-a.e.~ $x\in\Gamma_i\cap E_{j,k}$ for all $i,j,k\geq 1$.

Suppose that $\Gamma=\Gamma_i$ and $E=\Gamma_i\cap E_{j,k}$ for some $i,j,k\geq 1$. Let $\Delta$ denote the collection of all dyadic cubes $Q$ in $\mathbb{R}^n$ such that $\mu(E\cap Q)>0$ and $\mathop\mathrm{side}\nolimits Q\leq 2^{-k}$. Define the measure \begin{equation*}\nu:=\mu\res\bigcup_{Q\in\Delta}3Q.\end{equation*} First observe that $\nu$ has bounded support, since $E$ is bounded. Hence $\nu$ is finite, because $\mu$ is locally finite. Second note that for every $x\in E$ there exists $Q_x\in \Delta$ such that $x\in Q_x$, $\mathop\mathrm{side}\nolimits Q_x=2^{-k}$ and $B(x,2^{-k})\subset 3Q_x$. We conclude that $\nu(B(x,r))=\mu(B(x,r))\geq 2^{-j}r$ for all $r\in(0,2^{-k}]$. Thus  \begin{align*}\int_{E}\widetilde{J}_2(\mu,2^{-k},x)\,d\mu(x)
&=\sum_{Q}\beta_2^2(\mu,3Q)\frac{\mathop\mathrm{diam}\nolimits Q}{\mu(Q)}\int_{E}\chi_Q(x) \,d\mu(x)\\
&=\sum_{Q}\beta_2^2(\nu,3Q)\frac{\mathop\mathrm{diam}\nolimits Q}{\nu(Q)}\int_{E}\chi_Q(x) \,d\nu(x)\\
&=\int_E\widetilde{J}_2(\nu,2^{-k},x)\,d\nu(x) \lesssim \mathcal{H}^1(\Gamma)+\nu(\mathbb{R}^n\setminus\Gamma)<\infty,\end{align*} by Proposition \ref{prop1L}. In particular, we have $\widetilde{J}_2(\mu,2^{-k},x)<\infty$ at $\mu$-a.e.~ $x\in E$. Therefore, $\widetilde{J}_2(\mu,x)<\infty$ at $\mu$-a.e.~ $x\in E$, by Lemma \ref{l:truncate}.
\end{proof}

\begin{proof}[Proof of the Corollary \ref{c:B}] Let $\mu$ be a locally finite Borel measure on $\mathbb{R}^n$, and assume that $\mu$ is 1-rectifiable and $\mu\ll \mathcal{H}^1$. On one hand, since $\mu$ is 1-rectifiable, we have $\widetilde{J}_2(\mu,\cdot)<\infty$ $\mu$-a.e.~ by Theorem \ref{t:A}. On the other hand, since $\mu\ll \mathcal{H}^1$, we have $\uD1(\mu,\cdot)<\infty$ $\mu$-a.e.~ by Lemma \ref{l:UD}. Therefore, $J_2(\mu,\cdot)<\infty$ $\mu$-a.e.~ by Lemma \ref{l:c1}.
\end{proof}

To wrap up this section, we make two comments about variations of Proposition \ref{prop1L}, Theorem \ref{t:A} and Corollary \ref{c:B} and pose an open problem.

\begin{remark} The proof of Proposition \ref{prop1L} carries through if, rather than use equation (\ref{e:dnJones}), we defined the density-normalized Jones function $\widetilde{J}_2(\mu,r,x)$ by  \begin{equation*} \sum_{\stackrel{Q\in\Delta(\mathbb{R}^n)}{\mathop\mathrm{side}\nolimits Q\leq r}} \beta_2^2(\nu,\lambda Q)\frac{\mathop\mathrm{diam}\nolimits Q}{\nu(Q)}\chi_Q(x)\end{equation*} for some $\lambda>1$ arbitrary. Under this scenario, the constant in (\ref{IIest}) blows up as $\lambda\rightarrow 1$.
\end{remark}

\begin{remark} In the proof of Proposition \ref{prop1L}, we assumed that the dyadic cubes used to define the density-normalized Jones function $\widetilde{J}_2(\mu,r,\cdot)$ were closed cubes.  We could have worked with open or half-open dyadic cubes instead, the only change to the proof being that $N_0=4^n$ (closed cubes) improves to $N_0=3^n$ (open or half-open cubes). Therefore, Theorem \ref{t:A} and Corollary \ref{c:B} are true independent of whether the Jones functions are defined using closed, half-open or open dyadic cubes.
\end{remark}

\begin{problem} Formulate and prove a version of Theorem \ref{t:A} in infinite-dimensional Hilbert space, or show that such a generalization cannot exist. (See Remark \ref{r:hilbert}.)
\end{problem}

\section{Related Work}
\label{s:related}

We conclude by discussing some relevant prior work. Recall that the \emph{Menger curvature} $c(x,y,z)$ of three points $x,y,z\in\mathbb{R}^n$ is defined to be the inverse of the radius of the circle that passes through $x$, $y$ and $z$. If $x$, $y$ and $z$ are collinear, then $c(x,y,z)=0$. In \cite{Leger}, L\'eger proved that an integrability condition on Menger curvature is a sufficient test for certain absolutely continuous measures to be 1-rectifiable.

\begin{theorem}[\cite{Leger}] \label{t:leger} Suppose $E\subset\mathbb{R}^n$ is Borel, $0<\mathcal{H}^1(E)<\infty$ and $\mu=\mathcal{H}^1\res E$. If $\iiint c^2(x,y,z)\, d\mu(x)d\mu(y)d\mu(z)<\infty$, then $\mu$ is 1-rectifiable.\end{theorem}

Placed besides one another, Theorem \ref{t:A} and Corollary \ref{c:B} (necessary conditions) and Theorem \ref{t:leger} (a sufficient condition) highlight the importance of ``curvature" to the theory of rectifiability.  For an interpretation of beta numbers as a measure of curvature, for the connection between beta numbers and Menger curvature, and for a survey of related results, we refer the reader to \cite[Chapter 3]{Pajot} and Schul \cite{Schul-AR}. Also see Hahlomaa \cite{Hahl-metric} for a version of Theorem \ref{t:leger} that is valid in metric spaces.

In \cite{Lerman}, Lerman proved that uniform control on an $L^2$ Jones function ensures that a measure gives positive mass to a rectifiable curve. Moreover, this result is quantitative. To give a precise statement of Lerman's ``$L^2$ curve learning theorem", we must introduce a variant of the ordinary Jones function, defined over shifted dyadic grids.

\begin{definition}[Shifted dyadic grids] Redefine the standard dyadic grid $\Delta(\mathbb{R}^n)$ from above to be the collection of half-open dyadic cubes in $\mathbb{R}^n$. For each $x\in \mathbb{R}^n$, let $x+\Delta(\mathbb{R}^n)$ denote the \emph{shifted dyadic grid} that is obtained by translating each cube in $\Delta(\mathbb{R}^n)$ by $x$. Define $\vec{\Delta}(\mathbb{R}^n)$ to be the union of the $2^n$ shifted grids $x+\Delta(\mathbb{R}^n)$, $x\in\{0,1/3\}^n$.\end{definition}

\begin{definition}[$L^2$ Jones function, Lerman's variant] Let $\mu$ be a locally finite Borel measure on $\mathbb{R}^n$. An \emph{$L^2$ best fit line} for $\mu$ in a cube $Q$ is any line $\ell_Q$ which achieves the minimum value of  $\int_Q\mathop\mathrm{dist}\nolimits(x,\ell_Q)^2\,d\mu(x)$ among all lines in $\mathbb{R}^n$. For every $Q\in\vec{\Delta}(\mathbb{R}^n)$, define $\hat{\beta}_2(\mu,Q)$ by \begin{equation*} \hat{\beta}_2(\mu,Q):=\sup_{R}\sup_{\ell_R} \int_Q \left(\frac{\mathop\mathrm{dist}\nolimits(x,\ell_R)}{\mathop\mathrm{diam}\nolimits Q}\right)^2\frac{d\mu(x)}{\mu(Q)}\in[0,1]\end{equation*} where $R$ ranges over all cubes $R\in \vec{\Delta}(\mathbb{R}^n)$ containing $Q$ such that \begin{equation*} 2^{j_0^*}\leq \frac{\mathop\mathrm{side}\nolimits R}{\mathop\mathrm{side}\nolimits Q} \leq 2^{j_1^*},\end{equation*} and $\ell_R$ ranges over all $L^2$ best fit lines for $\mu$ in $R$. Here $2\leq j_0^*\leq j_1^*$ are integer parameters. We define the \emph{modified $L^2$ Jones function} $\hat{J}_2(\mu,r,\cdot)$ for $\mu$  by \begin{equation*} \hat{J}_2(\mu,r,x)=\sum_{Q} \hat{\beta}_2(\mu,Q)^2 \chi_Q(x)\quad\text{for all }x\in\mathbb{R}^n,\end{equation*} where $Q$ ranges over all cubes in $\vec{\Delta}(\mathbb{R}^n)$ of side length at most $r>0$. We abbreviate the function $\hat{J}_2(\mu,1,\cdot)$ starting at scale 1 by $\hat J_2(\mu,\cdot)$.
\end{definition}

We now record Lerman's $L^2$ curve learning theorem. In the statement of the theorem, $\mathop\mathrm{spt}\nolimits\mu=\{x\in\mathbb{R}^n:\mu(B(x,r))>0$ for all $r>0\}$ denotes the support of $\mu$.

\begin{theorem}[{\cite[Theorem 4.8]{Lerman}}]\label{t:lerman}  Set parameters $j_0^*=2$ and $j_1^*= 2^{4+\log_2\lceil 6480e\sqrt{n}\rceil}$ ($2^{18}\sqrt{n}< j_1^*< 2^{19}\sqrt{n}$). There exist a constant $C=C(n)>1$ and an absolute constant $\lambda>1$ with the following property. If $\mu$ is a locally finite Borel measure on $\mathbb{R}^n$, $Q_1\in\vec{\Delta}(\mathbb{R}^n)$, and there exists $M>0$ such that \begin{equation*}\hat{J}_2(\mu,\lambda \mathop\mathrm{side}\nolimits Q_1,x)\leq M\quad\text{for all }x\in\mathop\mathrm{spt}\nolimits\mu\cap \lambda Q_1,\end{equation*} then there exists a rectifiable curve $\Gamma_1\subset \lambda Q_1$ such that $\mathcal{H}^1(\Gamma_1)\leq C e^{CM}\mathop\mathrm{side}\nolimits Q_1$ and $\mu(\Gamma_1)\geq C^{-1}e^{-CM}\mu(Q_1)$.\end{theorem}

\begin{remark}\label{r:iterate} By iterating Theorem \ref{t:lerman}, one can show that uniform control on $\hat{J}_2(\mu,\cdot)$ implies that $\mu$ is 1-rectifiable. Let us describe the basic strategy.  Suppose that $\mu$ is a finite Borel measure supported on $Q_0=(0,1]^n$ with $\hat J(\mu,x)\leq M$ for all $x\in Q_0\cap\mathop\mathrm{spt}\nolimits\mu$. Invoking Lerman's theorem once, we find a rectifiable curve $\Gamma_0$ that charges a proportion of the $\mu$ mass in $Q_0$. Next divide $Q_0\setminus \Gamma_0$ into Whitney cubes $(T_i)_{i=1}^\infty$, and invoke Lerman's theorem again on each cube $T_i$. This yields a countable family of rectifiable curves $(\Gamma_i)_{i=1}^\infty$, whose union charges a proportion of the $\mu$ mass in $Q_0\setminus \Gamma_0$. To continue, divide $Q_0\setminus \bigcup_{i=0}^\infty\Gamma_i$ into Whitney cubes\dots and so on. This  procedure yields a countable family of rectifiable curves which fully charge the mass of $\mu$. \end{remark}

Unfortunately, the proof strategy described in Remark \ref{r:iterate} cannot be used to show that ``$\hat{J}_2(\mu,x)<\infty$ at $\mu$-a.e.~ $x\in\mathbb{R}^n$ implies $\mu$ is 1-rectifiable". On the other hand, this claim could be proved if one possessed a ``density version" of Lerman's theorem.

\begin{conjecture} \label{c:density} A version of Theorem \ref{t:lerman} holds with the hypothesis ``$\hat{J}_2(\mu,x)\leq M$ for all $x\in \lambda Q_1\cap \mathop\mathrm{spt}\nolimits\mu$" replaced by  \begin{quotation}``the set $A=\{x\in \lambda Q_1: \hat{J}_2(\mu,x)\leq \varepsilon\}$ satisfies $\mu(A)\geq \delta\mu(\lambda Q_1)$ for some $\varepsilon\leq\varepsilon_0(n)$ and $\delta\geq \delta_0(n,\varepsilon)$"\end{quotation} and the conclusion ``$\mu(\Gamma_1)\geq C^{-1}e^{-CM}\mu(Q_1)$" replaced by \begin{quotation}``$\mu(A\cap \Gamma_1)\geq C^{-1}e^{-C\varepsilon}\mu(Q_1)$ where $C=C(n,\delta)$".\end{quotation}\end{conjecture}

\vspace{.05cm}

We believe it should be possible to verify Conjecture \ref{c:density} by rerunning the arguments used by Lerman to prove Theorem \ref{t:lerman}, but we have not checked the details.

Finally, we wish to mention a recent paper by Tolsa \cite{Tolsa}, which introduced the use of tools from the theory of mass transportation to the theory of quantitative rectifiability. In particular, Tolsa established a new characterization of uniformly rectifiable measures, expressed in terms of the $L^2$ Wasserstein distance $W_2(\cdot,\cdot)$ between probability measures. It would be interesting to know to what extent can these new tools be used to study the rectifiability of measures without an \emph{a priori} assumption of Ahlfors regularity.