Find the number of bijections using graphs

165 Views Asked by At

Given a graph $G = (V, E)$ where $V = \{1, 2, ..., n \}$ and $E = \{\{i, j\}: |i-j| = 1 \lor |i-j| = n-1\}$. Calculate the number of bijections $f: V \to V$ $\text{ such for every }$ $p, q \in V $ $\text { if p is adjacent to q then f(p) or f(q) is even}$.

What I tried doing was to find the set E which should be set of all adjacent numbers and {n, 1} since $|i-j| = n-1$. $$E = \{\{1, 2\}, \{2, 3\}, ..., \{n, n-1\}, \{n, 1\}\}$$

But according to the condition, f(p) or f(q) must be even, that means i, j pairs can only be odd-odd or even-even numbers which is not possible since they are all in sequence, we can only have odd-even numbers with an exception of the last $\{n, 1\}$ which can be even if n is odd.

I'm not sure how to go on about solving this problem.

Edit:

I understand that either of the 2 vertices must be even, so according to the condition, edge set can be $E = \{\{1, 2\}, \{3, 4\}, ..., \{n, n-1\}, \{n, 1\}\}$ if n is even else $E = \{\{1, 2\}, \{3, 4\}, ..., \{n, n-1\}\}$ So if we write x as set of all odd numbers in V and y as set of all even numbers in V, $x \to y$ is the required relation which is $\frac{n}{2}+1$ bijections if n is odd else $\frac{n}{2}$ bijections.