1 Introduction

In the past two decades large efforts were made to understand the complexity of solving polynomial equations over finite groups. A polynomial over a group G is a product of variables, inverses of variables and elements of G. For a fixed finite group G the (polynomial) equation solvability problem\(\textsc {PolSat}(G)\) for short—asks whether two polynomials rt over G attain the same value for some evaluation of the variables in G. In [7] and [8] it was shown that for nilpotent groups G the problem \(\textsc {PolSat}(G)\) can be solved in polynomial time. Furthermore, it was shown that the problem \(\textsc {PolSat}(G)\) is \(\mathrm {NP}\)-complete for non-solvable groups G. The result for nilpotent groups has been revisited several times using different approaches, e.g. in [12] and [5]. Some results are known for non-nilpotent solvable groups. There is, however, no complete classification for non-nilpotent solvable groups. In [16], it was shown that \(\textsc {PolSat}(\mathbb {Z}_p \rtimes \mathbb {Z}_q) \in \mathrm {P}\) for primes pq. Most of the previously known results were generalized in [6], where it was shown that \(\textsc {PolSat}(P \rtimes A) \in \mathrm {P}\) for all p-groups P and Abelian groups A. These are the two tractability results which we generalize in Theorems 1.1 and 1.2 from a single equation to a fixed number of equations. One of the groups not covered by these results is the group \(S_4\). A list of these groups of small order which are not covered by the known tractability results is given in [11].

It has been shown recently in [17] that, under the Exponential Time Hypothesis (ETH), the problem \(\textsc {PolSat}(S_4)\) cannot be solved faster than in quasi-polynomial time. In particular, under the ETH it cannot be solved in polynomial time. Similar hardness-results have been shown in [19]: under the ETH the problem \(\textsc {PolSat}(G)\) is not decidable in polynomial time if the group G has Fitting length at least four. The same result has been shown for certain groups with Fitting length three. Under a different open conjecture it has been shown in [3] that a quasi-polynomial time algorithm indeed exists for solvable groups.

The complexity of the (polynomial) system equation solvability problem\(\textsc {PolSysSat}(G)\) for short—was completely classified in [7] and [8]. In this problem it is checked whether a system \(t_1=r_1, \dots , t_s = r_s\) for group polynomials \(t_l,r_l\) for \(l=1,\dots ,s\) has a solution. It was shown that \(\textsc {PolSysSat}(A) \in \mathrm {P}\) for Abelian groups A and \(\textsc {PolSysSat}(G) \in \mathrm {NPC}\) for non-Abelian groups G, i.e. a dichotomy holds for this problem.

The s-\(\textsc {PolSysSat}\) problem asks whether a system of s many equations has a solution. This problem for general algebras is different from the problem for one equation and from the problem for systems. Namely, in [9] it was shown that \(\textsc {PolSat}(L) \in \mathrm {P}\) for the two-element lattice \(L=\langle \{ 0, 1 \}, \wedge , \vee \rangle \) but 2-\(\textsc {PolSysSat}(L) \in \mathrm {NPC}\). In [1] it was shown that s-\(\textsc {PolSysSat}(G) \in \mathrm {P}\) for nilpotent groups G. Hence, any nilpotent non-Abelian group is a witness for the fact that the problem of solving systems in general becomes easier if we fix the number of equations.

In Section 3 we generalize Theorem 16 from [16] which states that \(\textsc {PolSat}(G) \in \mathrm {P}\) for groups of order \(|G| = pq\) for primes pq. We measure the length \(\Vert t \Vert \) of a polynomial t by the length of the string which defines it. Then our new version of the theorem can be formulated in the following way:

Theorem 1.1

Let G be a finite group with \(|G|=pq\) for primes \(p \ge q\) and \(s \in \mathbb {N}\) fixed. Then s-\(\textsc {PolSysSat}(G) \in \mathrm {P}\). In particular, we can decide in time \(\mathcal {O}(\max _{1 \le l \le s} \Vert t^{(l)} \Vert ^{2(p-1)s})\) whether a given system \(t^{(1)} = \dots = t^{(s)} = 1\) has a solution.

Theorem 1 from [6] states that for a finite group \(G \cong P \rtimes A\) for a p-group P and Abelian group A we have \(\textsc {PolSat}(G) \in \mathrm {P}\). In Section 4 we prove a generalized version and show that the same argument can be used for systems with a fixed number of equations.

Theorem 1.2

Let \(G \cong P \rtimes A\), where P is a finite p-group and A a finite Abelian group and \(s \in \mathbb {N}\) fixed. Then s-\(\textsc {PolSysSat}(G) \in \mathrm {P}\). In particular, we can decide in time \(\mathcal {O}(\max _{1 \le l \le s} \Vert t^{(l)} \Vert ^{s|G|^{|G|} \log _2 |G|})\) whether a given system \(t^{(1)} = \dots = t^{(s)} = 1\) has a solution.

As a corollary of Theorem 1.2 we get:

Corollary 1.3

Let \(G \cong \mathbb {Z}_{2p^\alpha } \rtimes A\), where p is a prime, \(\alpha \in \mathbb {N}\) and A is a finite Abelian group. Then s-\(\textsc {PolSysSat}(G) \in \mathrm {P}\) for all \(s \in \mathbb {N}\).

2 Preliminaries

A polynomial \(t(x_1,\dots ,x_m)\) over a finite group G is a formal product of variables, their inverses and constants from G, i.e. \(t(x_1,\dots ,x_m) = g_1 \cdots g_n\), with \(g_i \in \{ x_1, \dots , x_m\} \cup \{ x_1^{-1}, \dots , x_m^{-1} \} \cup G\). The length of the polynomial is defined as \(\Vert t \Vert {:}{=}n\). Sometimes we are going to use the word ‘polynomial’ also for the operation \(t :G^m \rightarrow G\) defined by t, but this will never cause confusion, as it will be clear from the context. If a polynomial contains the inverse of a variable, say \(x_i^{-1}\), then we can replace it with \(x_i^{|G|-1}\). These replacements of inverses only increase the length linearly for a fixed group G. Hence, we can assume that a polynomial is given as a product of variables and group elements. Let r be a second polynomial over the group G, then the length of the equation

$$\begin{aligned} t(x_1, \dots , x_m) = r(x_1, \dots , x_m ) \end{aligned}$$

is defined as \(\Vert t \Vert +\Vert r \Vert \). Furthermore, this equation has a solution if and only if \((t r^{-1})(x_1,\dots ,x_m) = 1\) has a solution. The length of this new equation only grows linearly. Hence, for studying the complexity we can assume that \(r=1\).

Let q be a prime power, let \(\mathbb {F}_q\) be the finite field with q elements and let \(\mathbb {F}_q [x_1, \dots , x_n]\) be the ring of polynomials over \(\mathbb {F}_q\). We denote the multiplicative group of the field by \(\mathbb {F}_q^\times {:}{=}(\mathbb {F}_q - \{ 0 \}, \cdot )\) and the function induced by a polynomial \(f \in \mathbb {F}_q [x_1, \dots , x_n]\) by \(f^{\mathbb {F}_q}\). A polynomial \(f \in \mathbb {F}_q [x_1, \dots , x_n]\) is given in expanded form if f is given as

$$\begin{aligned} f(x_1, \dots , x_n) = \sum _{0 \le s_1,\dots ,s_n \le q-1} c_{s_1,\dots ,s_n} x_1^{s_1} \cdots x_n^{s_n} \end{aligned}$$

with \(c_{s_1,\dots ,s_n} \in \mathbb {F}_q\), i.e. f is written as a sum of monomials with reduced exponents. Then we define the length of f as

$$\begin{aligned} \Vert f \Vert {:}{=}\sum _{c_{s_1,\dots ,s_n} \ne 0} 1 + s_1 + \dots + s_n. \end{aligned}$$

Solving equations over groups can, in many cases, be reduced in polynomial time to the problem of solving one or a system of equations over a finite field. Frequently, the polynomials in these equations over finite fields are given in expanded form. These solvability problems where the input is restricted to polynomials given in expanded form are called sigma solvability problems and we write e.g. \(\textsc {PolSat}_\Sigma (\mathbb {F}_q)\). For general rings these problems were considered for instance in [12]. If fg are polynomials over \(\mathbb {F}_q\), the equation \(f=g\) has a solution if and only if \(f-g=0\) has a solution. Hence, we can assume that the right-hand sides of the equations are 0.

Additionally to the solvability problems we also consider the sigma equivalence problem, \(\textsc {PolEqv}_\Sigma (\mathbb {F}_q)\). Here we are given two polynomials fg over \(\mathbb {F}_q\) and we want to decide whether they induce the same function on \(\mathbb {F}_q\). We write \(f \approx g\) in this case. Of course \(f \approx g\) holds if and only if \(f-g \approx 0\) holds, so we can again assume that the right-hand side is 0. This problem was considered for general rings in [13, 15].

The following lemma shows that the sigma equivalence problem for finite fields can be solved in linear time with respect to the length of the input polynomial if the polynomial is given in expanded form. This is even true if some of the variables are restricted to the multiplicative subgroup \(\mathbb {F}_q^\times \).

Lemma 2.1

Let q be a prime power and \(\mathbb {F}_q\) the finite field with q elements. Furthermore, let \(f \in \mathbb {F}_q[x_1, \dots , x_n, y_1, \dots , y_m]\) be a polynomial given in expanded form. Then it can be decided in time \(\mathcal {O}(\Vert f \Vert )\) whether \(f^{\mathbb {F}_q}(s_1, \dots , s_n, u_1, \dots , u_m) = 0\) for all \(s_1,\dots ,s_n \in \mathbb {F}_q\) and \(u_1,\dots ,u_m \in \mathbb {F}_q^\times \). In particular, \(\textsc {PolEqv}_\Sigma (\mathbb {F}_q) \in \mathrm {P}\).

Proof

The polynomial \(x^q - x = \prod _{s \in \mathbb {F}_q} (x-s)\) clearly vanishes for all evaluations of x from \(\mathbb {F}_q\). Analogously, \(y^{q-1}-1 = \prod _{s \in \mathbb {F}_q^\times } (y-s)\) vanishes for all evaluations from \(\mathbb {F}_q^\times \). We define the Gröbner basis

$$\begin{aligned} B {:}{=}\left\{ \, x_i^q - x_i \mid 1 \le i \le n \, \right\} \cup \left\{ \, y_j^{q-1} - 1 \Bigm | 1 \le j \le m \right\} . \end{aligned}$$

Then \(f^{\mathbb {F}_q}(s_1, \dots , s_n, u_1, \dots , u_m) = 0\) for all \(s_1,\dots ,s_n \in \mathbb {F}_q, u_1,\dots ,u_m \in \mathbb {F}_q^\times \) if and only if \(f \in \text {Ideal}_{\mathbb {F}_q[x_1,\dots ,x_n,y_1,\dots ,y_m]}(B)\): clearly, if f is in the ideal generated by B, the statement holds by the construction of B. The other implication follows from the Combinatorial Nullstellensatz [2, Theorem 1.1].

To check if f is contained in the ideal generated by B, we need to check whether f reduces to 0 modulo B. Reduction modulo B is particularly easy as we only need to reduce all the exponents. This reduction and collection of monomials can be done in time \(\mathcal {O}(\Vert f \Vert )\) as f is given in expanded form. \(\square \)

Let \(n, \beta , n_1, \dots , n_\beta \in \mathbb {N}\) and let \(S_1, \dots , S_\beta \) be subgroups of \(\mathbb {F}_q^\times \). Furthermore, let \(X = \{ x_1, \dots , x_n\}\) and \(Y_j = \{ y_{j,1}, \dots , y_{j,n_j}\}\) denote pairwise disjoint sets of variables for \(j=1,\dots ,\beta \). Additionally, let \(f,g \in \mathbb {F}_q [X, Y_1, \dots , Y_\beta ]\) be polynomials in expanded form. We then say (following the notation from [4]) that

$$\begin{aligned} f |_{\mathbb {F}_q, S_1, \dots , S_\beta } = g |_{\mathbb {F}_q, S_1, \dots , S_\beta } \end{aligned}$$

is solvable if there exist field elements \(s_1, \dots , s_n \in \mathbb {F}_q\) and \(s_{j,1}, \dots , s_{j,n_j} \in S_j\) for \(j=1,\dots ,\beta \) such that

$$\begin{aligned}&f^{\mathbb {F}_q} (s_1, \dots , s_n, s_{1,1}, \dots , s_{1,n_1}, \dots , s_{\beta ,1}, \dots , s_{\beta , n_\beta }) \\&\quad = g^{\mathbb {F}_q} (s_1, \dots , s_n, s_{1,1}, \dots , s_{1,n_1}, \dots , s_{\beta ,1}, \dots , s_{\beta , n_\beta }). \end{aligned}$$

Analogously, we say that

$$\begin{aligned} f |_{\mathbb {F}_q, S_1, \dots , S_\beta } \approx g |_{\mathbb {F}_q, S_1, \dots , S_\beta } \end{aligned}$$

holds if for all \(s_1, \dots , s_n \in \mathbb {F}_q\) and \(s_{j,1}, \dots , s_{j,n_j} \in S_j\) for \(j=1,\dots ,\beta \) we have

$$\begin{aligned}&f^{\mathbb {F}_q} (s_1, \dots , s_n, s_{1,1}, \dots , s_{1,n_1}, \dots , s_{\beta ,1}, \dots , s_{\beta , n_\beta }) \\&\quad = g^{\mathbb {F}_q} (s_1, \dots , s_n, s_{1,1}, \dots , s_{1,n_1}, \dots , s_{\beta ,1}, \dots , s_{\beta , n_\beta }). \end{aligned}$$

The following lemma appears as a part of a proof in [14, p. 221]. We include a different self-contained proof following an approach from [16] and using Lemma 2.1.

Lemma 2.2

[14]. Let q be a prime power and \(\mathbb {F}_q\) the finite field with q elements. Let \(S_1, \dots , S_\beta \) be subgroups of \(\mathbb {F}_q^\times \). Furthermore, let \(X = \{ x_1, \dots , x_n\}\) and \(Y_j = \{ y_{j,1}, \dots , y_{j,n_j}\}\) denote pairwise disjoint sets of variables for every \(j=1,\dots ,\beta \). Let \(f_1, \dots , f_s \in \mathbb {F}_q [X, Y_1, \dots , Y_\beta ]\) be polynomials given in expanded form. Then it can be decided in time

$$\begin{aligned} \mathcal {O}\left( \max _{1 \le i \le s} \Vert f_i \Vert ^{(q-1)s} \right) \end{aligned}$$

whether the system of equations

$$\begin{aligned} \begin{aligned} f_1 |_{\mathbb {F}_q, S_1, \dots , S_\beta }&= 0 \\&\vdots \\ f_s |_{\mathbb {F}_q, S_1, \dots , S_\beta }&= 0 \end{aligned} \end{aligned}$$
(2.1)

has a solution. In particular, \(\textsc {PolSat}_\Sigma (\mathbb {F}_q) \in \mathrm {P}\) and s-\(\textsc {PolSysSat}_\Sigma (\mathbb {F}_q) \in \mathrm {P}\) for fixed \(s \in \mathbb {N}\).

Proof

Since \(\mathbb {F}_q^\times \) is cyclic, we can write \(\mathbb {F}_q^\times = \langle a \rangle \) for some \(a \in \mathbb {F}_q^\times \). Then \(S_j = \langle a^{l_j} \rangle = \{ y^{l_j} \mid y \in \mathbb {F}_q^\times \}\) for some \(l_j \in \{ 1, \dots , q - 1 \}\) for \(j=1,\dots ,\beta \). Now, let

$$\begin{aligned} \tilde{f}_i {:}{=}f_i \left( x_1, \dots , x_n, y_{1,1}^{l_1}, \dots , y_{1,n_1}^{l_1}, \dots , y_{\beta ,1}^{l_\beta }, \dots , y_{\beta ,n_\beta }^{l_\beta } \right) \end{aligned}$$

be polynomials in expanded form. Then (2.1) has a solution if and only if the system

$$\begin{aligned} \begin{aligned} \tilde{f}_1 |_{\mathbb {F}_q, \mathbb {F}_q^\times , \dots , \mathbb {F}_q^\times }&= 0 \\&\vdots \\ \tilde{f}_s |_{\mathbb {F}_q, \mathbb {F}_q^\times , \dots , \mathbb {F}_q^\times }&= 0 \end{aligned} \end{aligned}$$
(2.2)

has a solution. These polynomials \(\tilde{f}_i\) can be computed in time \(\mathcal {O}(\Vert f_i \Vert )\) and we have \(\Vert \tilde{f}_i \Vert = \mathcal {O}(\Vert f_i \Vert )\). Let f be the expanded form of the product

$$\begin{aligned} f {:}{=}\prod _{i=1}^s \left( 1-(\tilde{f}_i)^{q-1} \right) . \end{aligned}$$

Then for fixed s, the polynomial f can be computed in polynomial time from the \(\tilde{f}_i\) and we have \(\Vert f \Vert = \mathcal {O}(\max _{1 \le i \le s} \Vert f_i \Vert ^{(q-1)s})\). First, suppose the system (2.2) has no solution. Then for all \(s_1, \dots , s_n \in \mathbb {F}_q\) and \(s_{1,1},\dots ,s_{\beta ,n_\beta } \in \mathbb {F}_q^\times \) there exists an \(i\in \{1,\dots ,s\}\) such that \(\tilde{f}_i^{\mathbb {F}_q} (s_1,\dots ,s_n,s_{1,1},\dots ,s_{\beta ,n_\beta }) \ne 0\). Therefore, by the definition of f,

$$\begin{aligned} f(X, Y_1, \dots , Y_\beta )|_{\mathbb {F}_q, \mathbb {F}_q^\times , \dots , \mathbb {F}_q^\times } \approx 0 \end{aligned}$$
(2.3)

holds. Conversely, if (2.3) holds, then (2.2) has no solution. Hence, the system (2.1) has no solution if and only if (2.3) holds. The latter equation can be checked in time \(\mathcal {O}(\Vert f \Vert )\) by Lemma 2.1. \(\square \)

3 Proof of Theorem 1.1

In order to prove Theorem 1.1 we are going to reduce solving equations over G with \(|G| = pq\) for primes pq to the sigma solvability problem over the finite fields \(\mathbb {Z}_p\) and \(\mathbb {Z}_q\). We are going to write the operations of G multiplicatively whereas the additive group of a field \(\mathbb {Z}_p\) is written additively as \((\mathbb {Z}_p, +)\).

Proof of Theorem 1.1

Let G be a finite group with \(|G|=pq\) for primes \(p \ge q\). If \(p=q\) or \(q \not \mid p-1\), then G is Abelian and the result follows from [7]. Otherwise, if \(q \mid p-1\), we can write \(G= \mathbb {Z}_p \rtimes \mathbb {Z}_q\). This semidirect product is defined by some homomorphism

$$\begin{aligned} \psi :(\mathbb {Z}_q, +) \rightarrow (\mathbb {Z}_p - \{ 0 \}, \cdot ) = \mathbb {Z}_p^\times \cong {{\,\mathrm{Aut}\,}}(\mathbb {Z}_p). \end{aligned}$$

Then the product of \((a_1, b_1), (a_2, b_2) \in G\) is given by

$$\begin{aligned} (a_1, b_1) \cdot (a_2, b_2) = (a_1 + \psi (b_1)\cdot a_2, b_1 + b_2). \end{aligned}$$

For polynomials \(t^{(1)}, \dots , t^{(s)}\) we want to decide whether the system

$$\begin{aligned} t^{(1)}&= (a_{1}^{(1)},b_{1}^{(1)}) \cdot (a_{2}^{(1)},b_{2}^{(1)}) \cdots (a_{n_1}^{(1)},b_{n_1}^{(1)}) = (0,0) \\&\vdots \\ t^{(s)}&= (a_{1}^{(s)},b_{1}^{(s)}) \cdot (a_{2}^{(s)},b_{2}^{(s)}) \cdots (a_{n_s}^{(s)},b_{n_s}^{(s)}) = (0,0) \end{aligned}$$

has a solution. Here, the \(a_{i}^{(l)}\) are either constants or variables over \(\mathbb {Z}_p\) and the \(b_{i}^{(l)}\) are either constants or variables over \(\mathbb {Z}_q\). This system can be rewritten using the definition of the semidirect product to get

$$\begin{aligned} \begin{aligned} \sum _{i=1}^{n_1} a_i^{(1)} \prod _{j=1}^{i-1} \psi (b_{j}^{(1)}) = \dots = \sum _{i=1}^{n_s} a_i^{(s)} \prod _{j=1}^{i-1} \psi (b_{j}^{(s)}) = 0 \end{aligned} \end{aligned}$$
(3.1a)
$$\begin{aligned} \begin{aligned} \sum _{i=1}^{n_1} b_i^{(1)} = \dots = \sum _{i=1}^{n_s} b_i^{(s)} = 0 \end{aligned} \end{aligned}$$
(3.1b)

where the first part (3.1a) is a system of s equations over \(\mathbb {Z}_p\) and the second part (3.1b) is a system of s equations over \(\mathbb {Z}_q\). This technique was introduced in [16] as collecting procedure. The system (3.1b) is a linear system over a finite field. We denote the variables of this second part by \(y_1, \dots , y_n\). This system over \(\mathbb {Z}_q\) can be solved using Gaussian elimination. If there is no solution, then the overall system does not have a solution. If it has at least one solution, we can write the solutions parametrized by some variables \(z_1, \dots , z_k\) over \(\mathbb {Z}_q\), i.e. \(y_i = \sum _{j=1}^k c_{i,j} z_j + d_i\) for all \(i=1,\dots ,n\) with \(c_{i,j}, d_i \in \mathbb {Z}_q\). Then \(\psi (y_i) = \psi (d_i) \prod _{j=1}^k \psi (z_j)^{c_{i,j}}\) which we can substitute in the first system (3.1a). Hence, the system (3.1a) is now a system of s polynomial equations over \(\mathbb {Z}_p\) given in expanded form with some variables \(a_{i}^{(l)}\) over \(\mathbb {Z}_p\) and some variables \(\psi (z_j)\) over \({{\,\mathrm{Im}\,}}(\psi )\). As \({{\,\mathrm{Im}\,}}(\psi )\) is a subgroup of \(\mathbb {Z}_p^\times \), we can apply Lemma 2.2.

The l-th equation in (3.1a) contains \(\Vert t^{(l)} \Vert \) monomials. Each monomial has at most length \(n(p-1)+1\) where n is the number of variables in the equation. Hence, the length of every polynomial in equation (3.1a) after all replacements is at most \(\Vert t^{(l)} \Vert n(p-1)\). Since \(n \le s \max _{1 \le l \le s} \Vert t^{(l)} \Vert \), we can decide with Lemma 2.2 in time

$$\begin{aligned} \mathcal {O}\left( \max _{1 \le l \le s} (\Vert t^{(l)} \Vert ^2s(p-1))^{(p-1)s}\right) \end{aligned}$$

whether a given system has a solution. For fixed s this is

$$\begin{aligned} \mathcal {O}\left( \max _{1 \le l \le s} \Vert t^{(l)} \Vert ^{2(p-1)s}\right) . \end{aligned}$$

This dominates the complexity of applying Gaussian elimination to the second part (3.1b). Note that for general systems—i.e. s is not fixed—we see that this algorithm has exponential time. \(\square \)

4 Proof of Theorem 1.2

Let \(G=P \rtimes A\), where P is a finite p-group of order \(|P|=p^\alpha \) for \(\alpha \in \mathbb {N}\) and A is a finite Abelian group. Lemma 4 in [6] shows that these are exactly the finite groups where the commutator subgroup is a p-group. Furthermore, one can choose P and A in such a way that \(p \not \mid |A|\). In [6] it was also shown that there exists a subnormal series

$$\begin{aligned} \{ e \} = N_0 \triangleleft N_1 \triangleleft \dots \triangleleft N_\alpha = P = M_0 \triangleleft M_1 \triangleleft \dots \triangleleft M_\beta = G \end{aligned}$$

with \(N_i \triangleleft P\) and \(N_i /N_{i-1} \cong \mathbb {Z}_p\) for \(i=1,\dots ,\alpha \). Moreover, \(M_j \triangleleft G\) and \(M_{j}/M_{j-1} \cong \mathbb {Z}_{p_j}\) for primes \(p_j\) and \(j=1,\dots ,\beta \). We can fix a polycyclic sequence \(\mathcal {B}= (b_1, \dots , b_\alpha , c_1, \dots , c_\beta )\), i.e. \(b_i \in N_i - N_{i-1}\) for \(i=1,\dots , \alpha \) and \(c_j \in M_j - M_{j-1}\) for \(j=1,\dots ,\beta \). Then for every element \(g \in G\) there exists a unique sequence \((u_1,\dots ,u_\alpha ,v_1,\dots ,v_\beta )\) with \(u_i \in \{ 0, \dots , p-1\}\) for \(i=1,\dots ,\alpha \) and \(v_j \in \{ 0, \dots , p_j -1\}\) for \(j=1,\dots ,\beta \) such that \(g=b_1^{u_1} \cdots b_\alpha ^{u_\alpha } c_1^{v_1} \cdots c_\beta ^{v_\beta }\), cf. [10, Lemma 8.3]. The tuple \((u_1,\dots ,u_\alpha , v_1, \dots , v_\beta )\) is called the exponent vector of g and the expression \(b_1^{u_1} \cdots b_\alpha ^{u_\alpha } c_1^{v_1} \cdots c_\beta ^{v_\beta }\) the normal form of g (with respect to the fixed polycyclic sequence \(\mathcal {B}\)). In [6] it was shown that there exists a finite field \(\mathbb {F}_q\) with characteristic p and \(q \le p^{|A|}\) such that the multiplicative group \(\mathbb {F}_q^\times \) contains a cyclic subgroup \(S_j\) of order \(p_j\) for all \(j=1,\dots ,\beta \). Such a field \(\mathbb {F}_q\) is called a base field of the group G. We denote the respective isomorphisms by \(\varphi _j :\mathbb {Z}_{p_j} \rightarrow S_j\) for \(j=1,\dots ,\beta \).

The following lemma from [6] shows how we can reduce multiplication in G to evaluation of polynomials over \(\mathbb {F}_q\). In particular, it shows that we can find polynomials over \(\mathbb {F}_q\) which describe the exponent vector of the product \(g_1\cdots g_n\) for arbitrary \(g_1,\dots ,g_n \in G\). These polynomials can be computed in expanded form in polynomial time and the number of variables in the monomials are bounded. This can be used to reduce solving an equation over G to solving a fixed number of equations over \(\mathbb {F}_q\).

Lemma 4.1

[6]. For a prime p let P be a p-group of order \(p^\alpha \). Let A be an Abelian group with \(p \not \mid |A|\) and consider the group \(G = P \rtimes A\). Let \(\mathcal {B}= (b_1, \dots , b_\alpha , c_1, \dots , c_\beta )\) be a polycyclic sequence of G. Let \(\mathbb {F}_q\) denote a base field of G and \(\varphi _1,\dots ,\varphi _\beta \) the isomorphisms which embed \(\mathbb {Z}_{p_j}\) into \(\mathbb {F}_q^\times \). For an arbitrary positive integer n let

$$\begin{aligned} X_{n, \alpha }&= \{ \, x_{k,i} \mid 1 \le k \le n, 1 \le i \le \alpha \, \} \\ Y_{n-1,\beta }&= \{ \, y_{k,j} \mid 1 \le k \le n-1, 1 \le j \le \beta \, \} \end{aligned}$$

be disjoint sets of variables. Then there exist \(f_1, \dots , f_\alpha \) \(\in \mathbb {F}_q[X_{n, \alpha }, Y_{n-1,\beta }]\) given in expanded form such that for arbitrary elements \(h_1, \dots , h_n \in P\) and \(a_1, \dots , a_n \in A\) with normal forms

$$\begin{aligned} h_k&= b_1^{u_{k,1}} \cdots b_\alpha ^{u_{k,\alpha }}c_1^0 \cdots c_\beta ^0, \\ a_k&= b_1^0 \cdots b_\alpha ^0 c_1^{v_{k,1}} \cdots c_\beta ^{v_{k, \beta }} \end{aligned}$$

for \(k=1,\dots ,n\), the normal form of the product \(h_1 a_1 \cdots h_n a_n\) is

$$\begin{aligned} h_1 a_1 \cdots h_n a_n = \,&b_1^{f_1^{\mathbb {F}_q} (u_{1,1}, \dots , u_{n, \alpha }, \varphi _1 (v_{1,1}), \dots , \varphi _\beta (v_{n-1, \beta }))} \cdots \\&\quad b_\alpha ^{f_\alpha ^{\mathbb {F}_q} (u_{1,1}, \dots , u_{n, \alpha }, \varphi _1 (v_{1,1}), \dots , \varphi _\beta (v_{n-1, \beta }))} \\&\quad \quad c_1^{v_{1,1} + \cdots + v_{n,1}} \cdots c_\beta ^{v_{1,\beta } + \cdots + v_{n,\beta }}. \end{aligned}$$

Furthermore, with \(C_\alpha {:}{=}(2p-2)^{\alpha - 1}\) each monomial of \(f_i\) for \(i=1,\dots , \alpha \) contains at most \(\alpha ^{C_\alpha } (q-1)^{C_\alpha }\) variables from \(X_{n, \alpha }\), each polynomial \(f_i\) can be furthermore computed in time \(\mathcal {O}(n^{C_\alpha + 1})\) and \(\Vert f_i \Vert = \mathcal {O}(n^{C_\alpha + 1})\).

Proof of Theorem 1.2

We follow the proofs from Lemma 7 and Theorem 1 in [6] and point out the differences which occur when we consider s equations instead of one. We consider a system

$$\begin{aligned} t^{(1)}&{:}{=}\, t_1^{(1)} \cdots t_{n_1}^{(1)} = 1 \\&\vdots \\ t^{(s)}&{:}{=}\, t_1^{(s)} \cdots t_{n_s}^{(s)} = 1 \end{aligned}$$

of length \(n {:}{=}\sum _{l=1}^s n_l\) where all the \(t_k^{(l)}\) for \(l=1,\dots ,s\) and \(k = 1, \dots , n_l\) are either variables over G or elements (i.e. constants) in G. We fix a polycyclic sequence \(\mathcal {B}= (b_1, \dots , b_\alpha , c_1, \dots , c_\beta )\) of G and a base field \(\mathbb {F}_q\) of characteristic p. First, we compute the normal form of all elements \(t \in \{ t_1^{(1)}, \dots , t_{n_s}^{(s)} \}\): if \(t_k^{(l)}\) is a constant in the group, we can replace it with its respective normal form. If \(t_k^{(l)}\) is a variable, we replace it with

$$\begin{aligned} t_k^{(l)} = b_1^{x_{k,1}^{(l)}} \ldots b_\alpha ^{x_{k,\alpha }^{(l)}} c_1^{z_{k,1}^{(l)}} \ldots c_\beta ^{z_{k,\beta }^{(l)}}, \end{aligned}$$

where \(x_{k, i}^{(l)}\) are variables over \(\mathbb {Z}_p\) and \(z_{k,j}^{(l)}\) are variables over \(\mathbb {Z}_{p_j}\) for \(l=1,\dots ,s\), \(k=1,\dots ,n_l\), \(i=1,\dots ,\alpha \) and \(j=1,\dots ,\beta \). We write \(y_{k,j}^{(l)} {:}{=}\varphi _j (z_{k,j}^{(l)})\). Then these \(y_{k,j}^{(l)}\) are variables over \(S_j\). Replacing all t with their normal form and creating all variables \(x_{k, i}^{(l)}, y_{k,j}^{(l)}, z_{k,j}^{(l)}\) can be done in time \(\mathcal {O}(n)\).

Now, for every \(l=1,\dots ,s\) we define two sets of variables

$$\begin{aligned} X^{(l)}&{:}{=}\left\{ x_{k,i}^{(l)} \mid 1 \le k \le n_l , 1 \le i \le \alpha \right\} \\ Y^{(l)}&{:}{=}\left\{ y_{k,j}^{(l)} \mid 1 \le k \le n_l - 1, 1 \le j \le \beta \right\} \end{aligned}$$

where we identify \(x_{k,i}^{(l)}\) with \(x_{\tilde{k},\tilde{i}}^{(\tilde{l})}\) if and only if \(i=\tilde{i}\) and \(t_k^{(l)}\) and \(t_{\tilde{k}}^{(\tilde{l})}\) are the same variables over G and analogously for \(y_{k,j}^{(l)}\). We furthermore write

$$\begin{aligned} Z^{(l)} {:}{=}\left\{ z_{k,j}^{(l)} \mid 1 \le k \le n_l, 1 \le j \le \beta \right\} . \end{aligned}$$

Now, applying Lemma 4.1 on every group polynomial \(t^{(l)}\) yields polynomials \(f_1^{(l)}, \dots , f_\alpha ^{(l)} \in \mathbb {F}_q [X^{(l)}, Y^{(l)}]\) such that

$$\begin{aligned} t^{(l)} = \,&b_1^{f_1^{(l)} \left( X^{(l)}, Y^{(l)} \right) } \cdots b_\alpha ^{f_\alpha ^{(l)} \left( X^{(l)}, Y^{(l)} \right) } c_1^{g_1^{(l)}\left( Z^{(l)} \right) } \cdots c_\beta ^{g_\beta ^{(l)}\left( Z^{(l)} \right) } \end{aligned}$$
(4.1)

for all \(l=1,\dots ,s\) where the polynomials \(g_j^{(l)}\) are of the form

$$\begin{aligned} g_j^{(l)} {:}{=}\, z_{1,j}^{(l)} + \dots + z_{n_l,j}^{(l)} \in \mathbb {Z}_{p_j}[Z^{(l)}]. \end{aligned}$$

Computing these polynomials \(f_i^{(l)}, g_j^{(l)}\) in expanded form can be done with Lemma 4.1 in time \(\mathcal {O}(\sum _{l=1}^s n_l^{C_\alpha +1}) = \mathcal {O}(\max _{1\le l \le s} s \, n_l^{C_\alpha +1})\) and we have \(\Vert f_i^{(l)} \Vert = \mathcal {O}(n_l^{C_\alpha +1})\).

Since \(1 = b_1^0 \cdots b_\alpha ^0 c_1^0 \cdots c_\beta ^0\) and by the uniqueness of the normal form, the equations (4.1) yield the system

$$\begin{aligned} \begin{aligned} f_1^{(1)} \left( X^{(1)}, Y^{(1)} \right) |_{\mathbb {Z}_p, S_1, \dots , S_\beta } = \dots = f_1^{(s)} \left( X^{(s)}, Y^{(s)} \right) |_{\mathbb {Z}_p, S_1, \dots , S_\beta }&= 0 \\&\vdots \\ f_\alpha ^{(1)} \left( X^{(1)}, Y^{(1)} \right) |_{\mathbb {Z}_p, S_1, \dots , S_\beta } = \dots = f_\alpha ^{(s)} \left( X^{(s)}, Y^{(s)} \right) |_{\mathbb {Z}_p, S_1, \dots , S_\beta }&= 0 \end{aligned} \end{aligned}$$
(4.2a)
$$\begin{aligned} \begin{aligned} g_1^{(1)}\left( Z^{(1)} \right) = \dots = g_1^{(s)}\left( Z^{(s)} \right)&= 0 \\&\vdots \\ g_\beta ^{(1)}\left( Z^{(1)} \right) = \dots = g_\beta ^{(s)}\left( Z^{(s)} \right)&= 0. \end{aligned} \end{aligned}$$
(4.2b)

Now, (4.2a) is a system of \(s \alpha \) many equations over \(\mathbb {F}_q\) and (4.2b) a system of s many equations over \(\mathbb {Z}_{p_j}\) for every \(j=1,\dots ,\beta \). We define \(h_j^{(l)} {:}{=}y_{1,j}^{(l)} \cdots y_{n_j,j}^{(l)}\). Then \(g_j^{(l)}\left( Z^{(l)} \right) = 0\) over \(\mathbb {Z}_{p_j}\) if and only if \(h_j^{(l)}\left( Y^{(l)} \right) |_{S_j} = 1\) over \(\mathbb {F}_q\). Hence, we can translate the system (4.2b) into equations over \(\mathbb {F}_q\). The variables in \(X^{(l)}\) are over \(\mathbb {Z}_p\). Since every function over a finite field can be written as a polynomial, we have a polynomial \(\pi \in \mathbb {F}_q[x]\) given in expanded form with \({{\,\mathrm{Im}\,}}(\pi ) = \mathbb {Z}_p \subseteq \mathbb {F}_q\). We can now replace every \(x_{k,i}^{(l)}\) with \(\pi (x_{k,i}^{(l)})\) in \(f_i^{(l)}\). Because of Lemma 4.1 the monomials in \(f_i^{(l)}\) contain at most \(\alpha ^{C_\alpha } (q-1)^{C_\alpha }\) number of variables of \(X_{n, \alpha }\). Then, since the length of \(\pi \) only depends on the group, we have

$$\begin{aligned} \Vert \tilde{f}_i^{(l)} \Vert \le \Vert f_i^{(l)} \Vert \cdot \Vert \pi \Vert ^{\alpha ^{C_\alpha } (q-1)^{C_\alpha }} = \mathcal {O}(\Vert t^{(l)} \Vert ^{C_\alpha + 1}) \end{aligned}$$

and we can compute the expanded form \(\tilde{f}_i^{(l)}\) of the new polynomials in time \(\mathcal {O}(\max _{1\le l \le s} s \, n_l^{C_\alpha +1})\). We now have the system

$$\begin{aligned} \tilde{f}_1^{(1)} \left( X^{(1)}, Y^{(1)} \right) |_{\mathbb {F}_q, S_1, \dots , S_\beta } = \dots = \tilde{f}_1^{(s)} \left( X^{(s)}, Y^{(s)} \right) |_{\mathbb {F}_q, S_1, \dots , S_\beta }&= 0 \\&\vdots \\ \tilde{f}_\alpha ^{(1)} \left( X^{(1)}, Y^{(1)} \right) |_{\mathbb {F}_q, S_1, \dots , S_\beta } = \dots = \tilde{f}_\alpha ^{(s)} \left( X^{(s)}, Y^{(s)} \right) |_{\mathbb {F}_q, S_1, \dots , S_\beta }&= 0 \\ h_1^{(1)}\left( Y^{(1)} \right) |_{S_1} - 1= \dots = h_1^{(s)}\left( Y^{(s)} \right) |_{S_1} - 1&= 0 \\&\vdots \\ h_\beta ^{(1)}\left( Y^{(1)} \right) |_{S_\beta } - 1 = \dots = h_\beta ^{(s)}\left( Y^{(s)} \right) |_{S_\beta } - 1&= 0 \end{aligned}$$

which we can solve in time

$$\begin{aligned} \mathcal {O}\left( \max _{1 \le l \le s} n_l^{s(C_\alpha + 1)(q-1)(\alpha + \beta )}\right) \end{aligned}$$

because of Lemma 2.2. This also dominates the time complexity of the rewriting steps. Now, we adopt the argument from the proof of Theorem 1 in [6] to show that

$$\begin{aligned} (C_\alpha +1)(q-1)(\alpha + \beta ) \le |G|^{|G|} \log _2 |G|. \end{aligned}$$

Since \(|G| = p^\alpha p_1 \cdots p_\beta \) for primes \(p,p_1,\dots ,p_\beta \), we have

$$\begin{aligned} \log _2 |G| = \alpha \log _2(p) + \sum _{j=1}^\beta \log _2 (p_j) \ge \alpha + \beta \end{aligned}$$

and

$$\begin{aligned} C_\alpha + 1 = (2p-2)^{\alpha -1} +1 \le 2 \, (2p)^{\alpha -1} \le p \, (p^2)^{\alpha -1} = p^{2 \alpha -1}. \end{aligned}$$

Furthermore, as \(q \le p^{|A|}\) we have

$$\begin{aligned} (C_\alpha +1) (q-1) \le p^{2\alpha -1} ( p^{|A|}-1) < p^{2 \alpha +|A|-1} . \end{aligned}$$

If \(|A|=1\), then

$$\begin{aligned} p^{2 \alpha +|A|-1} = p^{2 \alpha } \le (p^\alpha )^{p^\alpha } = |G|^{|G|}. \end{aligned}$$

Otherwise, we have \(|P|+|A|\le |P| \cdot |A| = |G|\) and

$$\begin{aligned} p^{2 \alpha +|A|-1} \le p^{2^{\alpha }+|A|} \le p^{|P|+|A|} \le |G|^{|G|}. \end{aligned}$$

Therefore, we have \((C_\alpha +1)(q-1)(\alpha +\beta ) \le |G|^{|G|} \log _2 |G|\). Hence, in total we can check in time \(\mathcal {O}(\max _{1 \le l \le s} \Vert t^{(l)} \Vert ^{s|G|^{|G|} \log _2 |G|})\) whether a given system has a solution. \(\square \)

Proof of Corollary 1.3

If \(p=2\), then \(\mathbb {Z}_{2p^\alpha }\) is a p-group and we can apply Theorem 1.2 directly. So let \(p \ne 2\). Then we have \(\mathbb {Z}_{2p^\alpha } = \mathbb {Z}_2 \times \mathbb {Z}_{p^\alpha }\). Automorphisms on \(\mathbb {Z}_2 \times \mathbb {Z}_{p^\alpha }\) act identically on \(\mathbb {Z}_2\) and as an arbitrary automorphism on the second part \(\mathbb {Z}_{p^\alpha }\), cf. [18]. Hence,

$$\begin{aligned} (\mathbb {Z}_2 \times \mathbb {Z}_{p^\alpha }) \rtimes A \cong \mathbb {Z}_2 \times (\mathbb {Z}_{p^\alpha } \rtimes A). \end{aligned}$$

Therefore, if we have a system over G, we can separately solve a system over \(\mathbb {Z}_2\) and a system over \(\mathbb {Z}_{p^\alpha }\rtimes A\). We can solve entire systems over \(\mathbb {Z}_2\) using Gaussian elimination. In particular, we can check whether s given equations have a solution. For the second part we can apply Theorem 1.2 and can check whether there is a solution in polynomial time as well. \(\square \)