1
$\begingroup$

Let $\{0,1\}^{<\omega}$ be the collection of $x \in \{0,1\}^\omega$ such that there is $N\in\omega$ with $x(k) = 0$ for all $k\geq N$. We say that $ x, y\in \{0,1\}^{<\omega}$ form an edge if they have Hamilton distance $1$ (that is, there is a unique $k\in\omega$ such that $x(k) \neq y(k)$.

Question. Is there a bijection $p:\omega\to \{0,1\}^{<\omega}$ such that $p(k), p(k+1)$ form an edge for all $k\in\omega$?

$\endgroup$
2

2 Answers 2

7
$\begingroup$

I'm going to write $\mathcal{S}$ for what you call $\{0,1\}^{<\omega}$, since I'm used to the latter referring to the set of finite binary strings.

Yes, and moreover there is a relatively simple process for building such a path. The key is the following lemma:

For any finite set $A\subseteq\mathcal{S}$ and any distinct $\alpha,\beta\in\mathcal{S}\setminus A$, we can find a path from $\alpha$ to $\beta$ in $\mathcal{S}$ which does not go through any point in $A$ and does not reuse points.

Basically, we fix some $n\in\omega$ such that every $\gamma\in A$ has $\gamma(n)=0$, and additionally $\alpha(n)=\beta(n)=0$; then starting at $\alpha$, we first "flip the $n$th bit" of $\alpha$, then greedily change $\alpha$ to $\beta$, then "flip back" the $n$th bit.

Iterating this lemma lets us build a Hamiltonian path through $\mathcal{S}$ via a greedy algorithm: having already determined the first $k$ points $\pi_1,...,\pi_k$ of our Hamiltonian path, let $\alpha=\pi_k$, let $A=\{\pi_1,...,\pi_{k-1}\}$, and let $\beta$ be the lex-least element of $\mathcal{S}\setminus (A\cup\{\alpha\})$.

$\endgroup$
4
$\begingroup$

Let $B_k$ be the subset of $\{0,1\}^{<\omega}$ whose support is contained in $[k]$.

It is clear that the induced subgraph on $B_k$ is isomorphic to the graph of the $k$-dimensional hypercube. It is well-known that each cube has a Hamilton cycle, so you could argue via compactness to get a path if you wished.

There's also a simple recursive solution: Suppose $I_k = i_1,\dots,i_{2^k}$ is a sequence of indices such that, starting at the origin and flipping these one-by-one takes us along a Hamilton path through $B_k$. We can then define $I_{k+1}$ to be $i_1,\dots,i_{2^k},k+1,i_{2^k},\dots,1$ (the concatenation of $I_k$, the index $k+1$, and the reversal of $I_k$). It is straight-forward to verify that $I_{k+1}$ will give a Hamilton path over $B_{k+1}$. One then may iterate ad infinitum.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .