Rephrase in terms of graph theory:
Let G be a connected graph on 50 vertices. Given a vertex A, a permutation (V1,…,V50) of the vertices of G is called an antitour from A if the following condition holds for every integer k with 1≤k≤50: there is no walk of length k from A to Vk. Given that every vertex in G admits at least one antitour, and that G has a Hamiltonian path, find the least possible number of antitours from some vertex of G.
Let N=50; we claim that the answer is ((N/2)!)2.
Bound. Observe that if V can be reached by a walk of length d, then it can be reached by a walk of length d+2k for any non-negative integer k, simply by going to V and then going back-and-forth on some adjacent edge k times.
Claim 1 The graph is bipartite.
Proof. Indeed, suppose there is some odd cycle A0,A1,…,A2i. Consider an antitour C1,…,CN from A0. Note that for 1≤k≤2i, Ak can be reached from A0 by k moves (and thus in k+2j moves) and also in 2i+1−k (and thus in 2i+1−k+2j moves). Now any integer n≥2i can be written as either k+2j (if n≡k(mod2)) or as 2i+1−k+2j (if n≡k(mod2)), so none of the Ak's can be Cn for n≥2i. Thus the vertices A1,…,A2i must be C1,…,C2i−1 in some order, which is impossible. □
Proof. Alternately, one can also argue the initial part as is and then since the distance of any vertex not in the cycle is at most N−(2i+1). Now, from any vertex Aj in the cycle, consider an anti-tour. Let the Nth in this anti-tour be Vj. Now, the distance of Vj to the cycle is at most N−(2i+1) and there is a path of length ≤2i+1 from Aj to the vertex to which Vj has the shortest path in the cycle with odd or even number of steps. Thus, there is an even and an odd path from Aj to Vj in ≤N moves. This is clearly a contradiction! □
Since the Hamiltonian path must contain an equal number of vertices from each part, the parts have N/2 vertices each. If the capital is in part A={A1,…,AN/2}, and the other part is B={B1,…,BN/2}, then one can form an antitour by putting the Ai's in the odd positions in any order and Bi's in the even positions in any order. There are ((N/2)!)2 ways to do this, which proves our bound.
Construction. Consider the complete bipartite graph KN/2,N/2, with parts {A1,…,AN/2} and {B1,…,BN/2}. Any antitour from A1 must have all the Bi's in the even positions since any Bi is reachable in 1 move (and thus in any odd number of moves). Thus there are at most ((N/2)!)2 antitours for this. □
We can have alternate constructions. For example: Let A1,…,A50 be the Hamiltonian path, with A1 capital. Add the edges A1A4,A1A6,…,A1A50 and A2A5,A2A7,…,A2A49.