I was solving the following problem (1.2.10 from Dixon and Mortimer's Permutation Groups):
Given the group $G =\langle(x_1,x_2, x_3, x_4),(x_1,x_3) \rangle$, give an example of a polynomial that's invariant under any permutation in $G$ but is also not invariant under any arbitrary permutation of $\{x_1,x_2, x_3, x_4\}$.
After some guessing, trial and error I found that $f(x_1,x_2,x_3,x_4) = x_1x_3+x_2x_4 $ satisifes the desired requirements since $f(x_1,x_2,x_3,x_4)=f(x_2,x_3,x_4,x_1)$ and $f(x_1,x_2,x_3,x_4) = f(x_3,x_2,x_1,x_4)$, but $f(x_1,x_2,x_3,x_4) \neq f(x_1,x_3,x_2,x_4) $. Also of note is that the last condition excludes a lot of easy polynomials like $g=x_1x_2x_3x_4$, since $g$ is invariant under any permutation of the $x_i$'s, which includes the ones in $G$.
I wondered if there was a more systematic way of solving this problem. Specifically, I was interested in an algorithm that given a family of cycles $C_n = (a_{n,1}, a_{n,2}, \dots, a_{n,m})$ would be able to construct a polynomial that's invariant under $\langle C_1, C_2, \dots C_k \rangle$ but not invariant under all possible permutations of the variables (if possible).
Does such an algorithm exist? Or where would you start looking if you were trying to construct one? Any and all help is greatly appreciated. Thanks!