If $q$ is semiprimitive $\bmod n$ and $\gcd(n, q) = 1$, then every cyclic code over $\mathbb F_q[X]/(X^n - 1)$ is reversible A code $\mathscr C$ of length $n$ is called reversible if $\mathscr C = \mathscr C_r$, where $\mathscr C_r = \{(c_{n-1}, \dots, c_1, c_0) \mid (c_0, c_1, \dots, c_{n-1}) \in \mathscr C\}$ is the reciprocal code. A $q \in \mathbb N$ is called semiprimitive modulo $n$, if $q^e \equiv - 1 \pmod n$ for a $e \in \mathbb N$. We now identify the cyclic codes with ideals in $\mathbb F_q[X]/(X^n - 1)$.

I now want to show: if $q$ is semiprimitive modulo $n$ and $\gcd(n, q) = 1$, then each cyclic code in $\mathbb F_q[X]/(X^n - 1)$ is reversible.

Now we have already shown in our lecture that if $g$ is the generator polynomial of $\mathscr C$, then $\mathscr C$ is reversible iff $g(X)$ is self-reciprocal, and iff for every root $x \in \mathbb F_q$ of $g$, the multiplicative inverse (in $\mathbb F_q$) is also a root of $g$.
The last of the three equivalences (with the multiplicative inverses) seemed most useful to me here. So let $g$ be the generator polynomial of $\mathscr C$ and $x \in \mathbb F_q$ a root of $g$, then I'd need to show that $x^{-1}$ is also a root of $g$. Now I suspect that the fact that $q$ is semiprimitive mod $n$ somehow helps me here, but I'm not really sure how.
 A: An $[n,k]$ code $\mathcal C$ over the finite field $\mathbb F_q$ is called a reversible code if for each codeword
$\mathbf c = (c_0, c_1, \ldots, c_{n-2}, c_{n-1}) \in \mathcal C$, its reverse
$\mathbf c^{(r)} = (c_{n-1}, c_{n-2}, \ldots, c_1, c_0)$
is also a codeword in $\mathcal C$. When the code in question is
a cyclic code, then, using the usual convention that associates the codeword
polynomial $c(x) = \sum_{i=0}^{n-1} c_i x^I$ with the codeword
$\mathbf c$, we have that a reversible
cyclic code is defined by the property that whenever $c(x)$ is a codeword 
polynomial, so is $x^{n-1}c(x^{-1})$ is also a codeword polynomial.
Now consider the generator polynomial $g(x)$ of the 
reversible cyclic code $\mathcal C$. This is a monic polynomial
of degree $n-k$ that is a divisor of $x^{n}-1$, and every codeword
polynomial is a multiple of $g(x)$. Note that all the codeword
polynomials have degrees $n-k$ or more. Now, reversibility implies that
$x^{n-1}g(x^{-1})$ is also a codeword polynomial, and cyclicity
implies that 
$$x^{n-k}g(x^{-1}) = g_0x^{n-k} + g_1x^{n-k-1} + \cdots
+ g_{n-2}x + 1$$
 of degree $n-k$ is also a codeword polynomial. But,
$x^{n-k}g(x^{-1})$ is necessarily a scalar multiple 
$a\cdot g(x) = a\cdot x^{n-k} + a\cdot g_{n-k-1} + \ldots + a\cdot g_0$ of $g(x)$ for some $a \in \mathbb F_q$.
Comparing coefficients, we have that $g_0 = a$ and $a\cdot g_0 = 1$
and we conclude that $g_0^2 = 1$, giving us that $g_0 = a = \pm 1$.
Thus, 
$ x^{n-k}g(x^{-1}) = \pm g(x)$ and so if $\alpha$, a $n$-th root of unity
in an extension field of $\mathbb F_q$ is a zero of $g(x)$, so
is $\alpha^{-1}$ a zero of $g(x)$.

The generator polynomial $g(x)$ of a reversible cyclic code
  has the property that if $\alpha$ is any zero of $g(x)$, then so is
  $\alpha^{-1}$ a zero of $g(x)$.

Note that it is not necessarily the case that $g(x)$ is self-reciprocal
in the sense that $x^{n-k}g(x^{-1}) = g(x)$ -- writing the coefficients
of $g(x)$ in reverse order gives us $g(x)$ again. As shown above,
$ x^{n-k}g(x^{-1}) = - g(x)$ will also work. Indeed, when the characteristic of the field is not $2$, the factor $(x-1)$ of $x^n-1$ is not a self-reciprocal polynomial, but it does satisfy the requirement
that the inverse of its zero is a zero of the polynomial.
The key idea is that
the inverses of the zeroes of $g(x)$ must also be zeroes of $g(x)$.
Finally, assume that $(n,q) = 1$ and suppose that there is
an integer $e$ such that $q^e \equiv -1 \bmod n$. Then, the
zeroes of $x^n-1$ are elements of $\mathbb F_{q^{2e}}$. If
$\alpha$ is a zero of $x^n-1$, then it has conjugates
$$\alpha, \alpha^q, \alpha^{q^2}, \cdots, \alpha^{q^{e-1}}, \alpha^{q^e} = \alpha^{-1},
\alpha^{q^{e+1}} = \alpha^{-q}, \alpha^{q^{e+1}} = \alpha^{-q^2}, \cdots, \alpha^{q^{2e-1}} = \alpha^{-q^{e-1}}.$$
Now, the zeroes of the minimal polynomial $M_{\alpha}(x)$ of $\alpha$ over $\mathbb F_q$ are $\alpha$ and all its conjugates, and the list of conjugates always includes $\alpha^{-1}$. Over $\mathbb F_q$,
$x^n-1$ factors into the product of the minimal polynomials of the
$n$-th roots of unity, and all these minimal polynomials enjoy the
property that the inverse of each of the zeros is a zero of
the minimal polynomial. The generator $g(x)$ of any cyclic code
of length $n$ over $\mathbb F_q$ is  the product of some of these
minimal polynomials and hence also enjoys the same property. Hence,

Every cyclic code of length $n$ over $\mathbb F_q$, where $(n,q)=1$ 
  and there is an integer $e$ such that $q^e \equiv -1 \bmod n$, is a
  reversible cyclic code.

