Given a variety $V$, and a prime $p$ I want to decide if there is a free action of $\mathbb{Z}/p\mathbb{Z}$ on $V$, and to find the generator of an action if it exists. Is there a known algorithm to do it? (Assume $V$ is affine over $\mathbb{C}$, and we have a basis for the ideal of $V$.)

Suppose that $g:V\to V$ is an automorphism. We then have a ring automorphism $H^\ast(g)$ of $H^\ast(V;\mathbb{Q})$ and we can put $L(g)=\sum_i(1)^i\text{trace}(H^i(g))$. The Lefschetz fixed point theorem relates $L(g)$ to the set of fixed points of $g$; in particular, if $g$ acts freely then $L(g)=0$. You can probably do this with the Chow ring rather than cohomology if you like that better. Alternatively, you could take coefficients in $\mathbb{Z}/p$ rather than $\mathbb{Q}$, but in that case one can show that when $g^p=1$ we have $L(g)=L(1)=\chi(V)$ so we just recover the fact that $\chi(V)=0\pmod{p}$. Depending on what kind of information you have about $V$, this might or might not be useful. 


Wildwild guess it is but hopefully it will send you on the right track: $G=Z/pZ$ is Cartierself dual. So the action on $V$ is the same as grading on functions $A=C[V]$ for which I presume you know generators $x_i$ and relations. The grading will come with coaction $\rho : A > A \otimes CG$ where $CG$ is the group algebra. The coaction is given explicitly by polynomials $f_{i,j}$ so that $\rho (x_i) = \sum_j f_{ij}\otimes g^j$... You can search for coactions slowly increasing degrees of polynomials. The coaction condition is easily checked if you know Grobner basis. When you have found a coaction, the condition of the freeness is that the map $A\otimes_{B} A > A \otimes CG$ (geometrically $G\times V > V\times_{V/G} V$) where $B$ is invariants is an isomorphism. Again given a Grobner basis, it is checkable on a computer. 

