Estimating the number of connected components of a curve contained in a given set Let $X$ be a metric space and $\Omega\subset X$ an open set. Take $x\in\Omega$ and choose $r>0$ such that the open ball $B(x,r)\subset B(x,2r)\subset \Omega$. Let $\gamma:[0,1]\to X$ be a Lipschitz curve.
Is it possible to divide $\gamma$ in a finite number of subcurves $\gamma_i :[a_i,b_i]\to X$, with $0\le a_i\le b_i\le 1$ ($\gamma_i=\gamma_{|[a_i,b_i]}$), such that each curve $\gamma_i$ lies entirely either in $\Omega$ or $X\setminus B(x,r)$?
If we can prove that for some $\lambda\in [1,2)$, the cardinality of the set $\partial B(x,\lambda r)\cap \gamma([0,1])$ is finite then, the result should be true, however I can't formalize it.
If I assume on the contrary that for every $\lambda \in [1,2)$ such inersection is enumarable, then it seem to imply that the length of $\gamma$ is infinite, which is an absurd. Does this makes any sense?
 A: We don't even need the Lipschitz continuity, the uniform continuity you get from the compactness of the parameter interval suffices for the partition.
Let $C = \gamma^{-1}(\overline{B(x,r)})$ and $D = \gamma^{-1}(X\setminus B(x,2r))$. Call $s,t \in C$ (without loss of generality $s \leqslant t$) equivalent if $[s,t]\cap D = \varnothing$, and similarly for $D$. By the uniform continuity, there is a $\delta > 0$ such that $s\in C, t\in D \Rightarrow \lvert s-t\rvert \geqslant \delta$, and hence we have $\operatorname{dist}(E_1,E_2) \geqslant 2\delta$ if $E_1,E_2$ are two distinct equivalence classes of either $C$ or $D$. Therefore, there are only finitely many equivalence classes in each, $C$ and $D$.
For such an equivalence class $E$, let $I(E) = [\inf E,\sup E]$. That gives you finitely many disjoint subintervals $[\alpha_i,\beta_i]$, $1 \leqslant i \leqslant m$ with $\alpha_i \leqslant \beta_i < \alpha_{i+1}$, and $\alpha_i \in C \iff \beta_i \in C \iff \alpha_{i+1} \in D$. Let $t_0 = 0$, $t_n = 1$, and for $1 \leqslant i < n$, let $t_i = \frac{1}{2}(\beta_i + \alpha_{i+1})$.
Then for $1 \leqslant i < n$ we have $\gamma(t_i) \in B(x,2r)\setminus \overline{B(x,r)}$, and for all $i < n$ either $\gamma([t_i,t_{i+1}]) \subset B(x,2r)$ or $\gamma([t_i,t_{i+1}]) \subset X\setminus \overline{B(x,r)}$.
