We are given a $d$-dimensional hypercube $H$, where each vertex is labeled with an integer $\ell\in\{1, 2, \ldots, 2^d\}$. Let $L$ be this labelling.




---


**Question:** How many labelling permutations $L'$ of $L$ satisfy the property that *each* vertex $v$ of $H$ is labeled in $L'$ with one of the $d$-many labels associated in $L$ with the $d$ vertices adjacent to $v$ (i.e., lying on one of the edges of $v$) in $H$?




---


***Example:*** *When $d=2$, the required number of permutations is 4.*



Number of permutations with combinatorial geometric constraints
As indicated in the comments, the number in question is given by <https://oeis.org/A233001>, the square of the number of perfect matchings of the hypercube.


To see this, note that the hypercube $H\_n$ is a bipartite graph. Let $H\_n^b$ be a proper $2$-coloring of the vertices of $H\_n$ with colours black and white, and let $H\_n^w$ be the other (complementary) coloring. Consider now the disjoint union $U\_n = H\_n^b \cup H\_n^w$ of these two coloured graphs.


Then a perfect matching of $U\_n$ can be interpreted as a permutation of the vertices of $H\_n$: the image of a vertex in $H\_n$ is the partner of the corresponding black vertex in $U\_n$. Conversely, a permutation $\pi$ of the vertices of $H\_n$, such that $u$ and $\pi(u)$ are adjacent in $H\_n$ is evidently a perfect matching of $U\_n$.


