1. Introduction
The idea of decomposing a polynomial into the product of smaller ones is definitely not new. A large amount of literature has been devoted to the factorization of polynomials (without claim of exhaustiveness, see [
1,
2,
3]) as well as to the decomposition of other mathematical objects, e.g., numbers, matrices, graphs and so on. The basic idea behind factorization is decomposing a complex object into smaller and easier to analyze pieces. Properties satisfied by each piece might shed some light on the properties satisfied by the entire object. As an example, from irreducible factors of a polynomial, we can recover valuable information about its roots. As far as polynomials are concerned, much attention has been dedicated to the problem of factoring them into irreducible polynomials, i.e., into no furtherly factorable elements. The first polynomial factorization algorithm was published by Theodor Von Schubert in 1793 [
4]. Since then, dozens of papers on the computational complexity of polynomial factorization have been published. In 1982, Arjen K. Lenstra, Hendric W. Lenstra, and Laszlo Lovasz [
2] published the first polynomial time algorithm for factoring polynomials over 
 and then over 
.
When dealing with the computational complexity of problems whose input is a polynomial, it is crucial to specify the way we represent it. The standard way of representing a polynomial 
 is by giving the list 
 of its coefficients. In this case, the size of the polynomial is proportional to 
n and does not depend on the number of zero coefficients in 
. The other way to represent a polynomial (called lacunary or sparse representation) consists of the list of nonzero monomials. Lacunary representation may lead to an exponentially shorter representation of the same polynomial with respect to the standard notation. The computational cost of an algorithm can be polynomially bounded in the standard input size and, at the same time, exponentially large in the lacunary input size. Testing the irreducibility of lacunary polynomials or computing the greatest common divisor of two lacunary polynomials are NP-hard problems [
5,
6,
7]. Computing the irreducible factors of bounded degree of lacunary polynomials can be accomplished in polynomial time [
8] as well as computing the integer roots of lacunary integer polynomials [
9].
In this paper, we will use standard notation for polynomials. This makes our NP-completeness results even stronger.
Irreducible factorization of polynomials, under some conditions, is unique and any other factorization into not necessarily irreducible elements can be obtained by properly grouping suitable irreducible factors. In this paper we focus our attention on some particular types of factors, not necessarily irreducible, and on the computational complexity of detecting their existence. We will prove that some types of factors are hard to detect while some others are not. In other words, we show that computing irreducible factors of a polynomial can be much easier than computing other types of factors. It turns out, as expected, that the boundary between polynomially computable factors and “hard to compute” ones is far from being completely understood.
We wish to emphasize that the main aim of this paper is not to provide technically difficult proofs of long standing open problems, but rather to show a different perspective in dealing with polynomial decomposition problems.
We face the following general problem. Given an integer polynomial  and some specific property P, decide whether  admits one or more factors that satisfy P.
Here is a list of problems we have analyzed in this paper.
- Q1.
- Let  be any fixed integer. - Given  and , decide whether there exists a factor  of  such that . (Theorem 1). 
- Q2.
- Given  and , decide whether there exists a factor  of  such that the sum of all the coefficients of  is equal to h. (Corollary 1). 
- Q3.
- Given  and , decide whether there exists a factor  of  such that the constant term of  is equal to h. (Corollary 2). 
- Q4.
- Let  be any fixed integer. - Given , decide whether there exists two factors  of  such that  and . (Theorem 2). 
- Q5.
- Given , decide whether there exists two factors  of  such that  and the sum of all the coefficients of  is equal to the sum of all the coefficients of . (Corollary 4). 
- Q6.
- Given , decide whether there exists two factors  of  such that  and constant term of  is equal to the constant term of . (Corollary 3). 
- Q7.
- Given , decide whether there exists two factors  of  such that . (Question 1). 
- Q8.
- Given  and , decide whether there exists a factor  of  such that the coefficient of the monomial with degree m in  is equal h. (Question 2). 
The rest of the paper is organized as follows. In 
Section 2, we give some basic definitions and known results. In 
Section 3, we prove that problems from Q1 to Q6 are NP-complete in the strong sense. In 
Section 4, we introduce and discuss open questions Q7 and Q8. 
Section 5 contains conclusions.
  2. Definitions and Known Results
Let  denote the set of integer numbers and  the set of integer polynomials (polynomials with coefficients in ). Given two integer polynomials  and , we say that  divides  (we write ) if and only if there exists an integer polynomial  such that . The degree of a polynomial  with  (denoted by  is n. Given an integer polynomial , we say that  is a factor of  if and only if . An integer polynomial with degree n is reducible if and only if it admits a factor  such that . It is irreducible otherwise. In the rest of the paper, we will only consider monic integer polynomials, i.e., integer polynomials whose leading coefficient (coefficient of the highest degree monomial) is equal to 1.
We now introduce some well-known NP-complete computational problems that we will use for our reductions.
Definition 1 (
subset-sum)
. Given  positive integers  decide whether there exist  such that Definition 2 (
subset-product)
. Given  positive integers  decide whether there exist  such that Definition 3 (
product-partition)
. Given n positive integers  decide whether there exists a partition of the set  into two nonempty subsets I and J such that The 
subset-sum problem (problem [SP13], page 224 in [
10]) has been proved to be NP-complete in [
11]. It is solvable in pseudo-polynomial time. The 
subset-product problem (problem [SP14], page 225 in [
10]) has been proved to be NP-complete in the strong sense in [
10,
12]. The 
product-partition problem has been proved to be NP-complete in the strong sense in [
13]. A problem is said to be NP-complete in the strong sense if it remains NP-complete even when all of its numerical parameters are bounded by a polynomial in the length of the input (see [
14] for details).
  3. Hard to Detect Factors
In this section, we prove that problems from Q1 to Q6 are NP-complete in the strong sense. The following observation completely characterizes any factor of a monic univariate integer polynomial with integer roots.
Remark 1. Let  and  be n integers. Let  be the following monic univariate integer polynomialAn integer polynomial , , is a factor of  if and only if  Remark 2. Computing all the coefficients of an integer polynomialtakes  operations.  Proof.  Let . Let . It is easy to verify that the degree of  is equal to k and then the number of coefficients of  is at most . Computing  from  takes  operations. Then, computing  takes  operations.    □
 Definition 4 (k-factor problem). Let  be any fixed integer. The k-factor problem is defined as follows.
- Input:  and  
- Output: - yes if  has a factor  such that , -       - no otherwise. 
 Theorem 1. For any fixed , k-factor problem is NP-complete in the strong sense.
 Proof.  Let  be any fixed integer. We reduce the subset-product problem (Definition 2) to the k-factor problem.
Let 
 be any instance of 
subset-product. Let 
 for 
 and
        
		Let 
 be the corresponding instance of 
k-factor.
 is a 
yes instance of 
k-
factor if and only if there exists a factor 
 of 
 such that 
. Or equivalently, by Observation 1, if and only if
        
		Equation (
1) is true if and only if
        
		Since
        
        we conclude that 
 if and only if 
. This is true if and only if 
 is a 
yes instance of 
subset-product.    □
 Remark 3. It is easy to check (directly from the proof of Theorem 1) that the k-factor problem remains NP-complete in the strong sense even if we restrict the set of input polynomials to monic polynomials with all integer roots.
 Definition 5 (sum-of-coefficients problem). The sum-of-coefficients problem is defined as follows.
- Input:  and  
- Output: - yes if  has a factor  such that the sum of all the coefficients of  is equal to s, -        - no otherwise. 
 Corollary 1. The sum-of-coefficients problem is NP-complete in the strong sense.
 Proof.  We prove this result as a Corollary of Theorem 1. We reduce the k-factor problem with  (NP-complete in the strong sense by Theorem 1) to the sum-of-coefficients problem.
Let  be any factor of . Since  is equal to the sum of all the coefficients of , we conclude that  if and only if the sum of all the coefficients of  is equal to h.    □
 Definition 6. The constant-term problem is defined as follows.
- Input:  and  
- Output: - yes if  has a factor  such that the constant term of  is equal to t, -        - no otherwise. 
 Corollary 2. The constant-term problem is NP-complete in the strong sense.
 Proof.  We prove this result as a Corollary of Theorem 1. We reduce the k-factor problem with  (NP-complete in the strong sense by Theorem 1) to the constant-term problem.
Let  be any factor of . Since  is equal to the constant term of , we conclude that  if and only if the constant term of  is equal to h.    □
 Definition 7 (k-equal-factor problem). Let  be any fixed integer. The problem k-equal-factor is defined as follows.
- Input:  
- Output: - yes if  has two factors  such that -          and  -       - no otherwise. 
 Theorem 2. k-equal-factor is NP-complete in the strong sense.
 Proof.  Let  be any fixed integer. We reduce the product-partition problem (Definition 3) to the k-equal-factor problem.
Let 
 be any instance of product partition. Let 
 for 
 and
        
We now prove that  is a yes instance for k-equal-factor if and only if  is a yes instance for product-partition.
 is a 
yes instance of 
k-
equal-factor if and only if 
 has two factors 
 such that 
 and 
. Or, equivalently, by Observation 1, if and only if the set 
 can be partitioned into two nonempty subsets 
I and 
J such that
        
Since 
 for 
, Equation 
3 can be rewritten as follows:
        
        and then
        
Equation (
5) holds if and only if 
 is a 
yes instance for 
product-partition.    □
 Definition 8 (equal-sum-of-coefficients problem). The equal-sum-of-coefficients problem is defined as follows.
- Input:  
- Output: - yes if there exist  such that  and the sum of all the -         coefficients of  is equal to the sum of all the coefficients of , -       - no otherwise. 
 Corollary 3. The equal-sum-of-coefficients problem is strongly NP-complete.
 Proof.  Since the sum of the coefficients of any polynomial  is equal to , the proof of this Corollary follows from Theorem 2 setting .    □
 Definition 9 (equal-constant-term problem). The equal-constant-term problem is defined as follows.
- Input:  
- Output: - yes if there exist  such that  -         and the constant term of  is equal to the constant term of , -       - no otherwise. 
 Corollary 4. The equal-constant-term problem is strongly NP-complete.
 Proof.  Since the constant term of any polynomial  is equal to , the proof of this Corollary follows from Theorem 2 setting .    □
   4. Open Questions
  4.1. Natural Factors Detection Problem
Let 
 denote the set of natural numbers (non-negative integer numbers) and 
 the set of natural polynomials (polynomials with coefficients in 
). 
 with the usual sum and product operations is a commutative semiring. In fact, this is the free commutative semiring on a single generator 
. For theoretical results regarding natural polynomials, we refer the reader to [
15].
Definition 10. The natural-reducibility problem is defined as follows.
 Question 1. Is the natural-reducibility problem NP-complete?
 The following example shows a polynomial that is irreducible when considered as an element of  and reducible when considered as an element of .
Example 1. Let . The complete factorization of  in  is  while  is irreducible in .
 In the next example, we show that the prime factorization of integer polynomials in  is not unique.
Example 2. Let . The complete factorization of  in  is . Since  and , then we have two distinct factorizations of  in .  Our conjecture is that the natural-reducibility problem is NP-complete, but we have not been able to prove it.
  4.2. Factors with Specific Coefficients Detection Problem
Let  be any integer polynomial. We denote by , , the coefficient . For values of m outside the interval ,  is equal to 0. According to this definition,  is the coefficient of the monomial in  with maximum degree (for monic polynomials is always equal to 1) and  is the constant term of .
The factor with specific coefficients detection problem is defined as follows.
Definition 11 (factor-with-specific-coefficients). Let  be any fixed integer.
- Input:  and  
- Output: - yes if  has a factor  such that , -       - no otherwise. 
 By Corollary 2, we have that for , factor-with-specific-coefficients problem is NP-complete in the strong sense. In fact, when , the problem is equivalent to the constant-term problem.
We now define a problem that is a sort of combination of subset-sum and subset-product problems.
Definition 12 (
subset-sum-of-products)
. Let k be any fixed integer. Given  positive integers  decide whether there exist  such that Note that for , the subset-sum-of-products problem is nothing but the subset-sum problem (Definition 1) and then it is NP-complete.
In the following theorem, we prove that the factor-with-specific-coefficients detection problem is not easier than the subset-sum-of-products problem.
To this extent we recall the Vieta’s formulas (customized for monic polynomials over the integers with integer roots) that relate the roots of a polynomial to its coefficients.
Theorem 3 (Vieta’s Formulas for monic polynomials over the integers with integer roots)
. Letwith . We have Theorem 4. The subset-sum-of-products problem is reducible to the factor-with-specific-coefficients detection problem.
 Proof.  Let 
 be any instance of 
subset-sum-of-products. Let 
, 
 and
          
Let  be the corresponding instance of factor-with-specific-coefficients. We now prove that  is a yes instance of subset-sum-of-products if and only if  is a yes instance of factor-with-specific-coefficients.
 is a 
yes instance of 
factor-with-specific-coefficients if and only if there exists a factor 
 of 
 such that 
. By Observation 1, any factor of 
 has the form
          
          where 
 is a suitable subset of 
.
By Vieta’s formulas, we know that 
 can be written as
          
This ends the proof.    □
 We end this section with the following open question.
Question 2. For which values of m (other than the case ) is the factor-with-specific-coefficients problem NP-complete?