**The problem: **Cosine Product Integration. This is problem AN14 in the appendix.

**The description: **Given a sequence of n integers , does ?

**Example:**

Suppose our sequence was (1,2,3). Then our integral is:

This is just , which integrates to , which over the interval is

**Reduction: **This one is in Plaisted’s 1976 paper. In it, he notes that if you look at the function the constant term in the power series expansion of that product is 0 if and only if the cosine integral is 0. I have trouble seeing that myself. The cooler thing is that you can make that constant term 0 if and only if you can take the sequence of elements and partition them into 2 sets with the same sum. So we can take an instance of the Partition problem, use the elements of the set as the elements of our sequence and then feed them into the product formulas.

**Difficulty:** It really depends on how easily you can see the connection between the cosine integral and the product formula (and, of course, how easily you could have thought of it). I find it hard, so I’m giving it an 8.

**The problem: **Periodic Solution Recurrence Relation. This is problem AN12 in the appendix.

**The description: ** Given a set of m ordered pairs through with each >0, can we find a sequence though of integers, such that if we build the infinite sequence is periodic: that is, for all i?

**Example: **Here’s a super simple example: m=2 and the pairs are (1,1) and (2,2). This gives us the recurrence . If we start with 1,1, this gives the sequence 1,1,3,5,11,21,43,… which is periodic mod 10 (the last digit always repeats 1,1,3,5)

**Reduction:** This shows up in Plaisted’s 1984 paper. He mentions it as a corollary to his Theorem 5.1 which showed that Non-Trivial Greatest Common Divisor and Root of Modulus 1 were NP-Complete. Similar to the Root of Modulus 1 problem, we build a polynomial from a set of clauses that has 0’s on the unit circle. The polynomial also has a leading coefficient of 1. This means, apparently, that the recurrence relation corresponding to the polynomial has a periodic solution if and only if the polynomial has a root on the complex unit circle, which only happens if the original 3SAT formula was satisfiable.

**Difficulty**: 8.

**The description: **Given a set of sequences A_{1} through A_{m} , each A_{i} containing a sequence of k pairs through , and an integer K. If we build a polynomial for each A_{i} by , and then multiply all of those polynomials together, does the resulting product polynomial have less than K complex roots?

**Example: **Suppose A_{1} was <(1,2), (2,1), (1,0)>, A_{2} was <(3,3), (2,2), (1,1), (0,0)>, and A_{3} was <(5,1), (7,0)>. These represent the polynomials x^{2}+2x+1, 3x^{3} + 2x^{2} + x, and 5x+7. (I’m pretty sure it’s ok for the sequences to be of different length, because we could always add (0,0) pairs to shorter sequences). This multiplies out to 15 x^{6} + 61 x^{5} + 96 x^{4}+ 81 x^{3} + 50 x^{2} + 26x +7, which has 4 distint complex roots, according to Mathematica.

**Reduction: **This is another one that uses Plaisted’s 1977 paper. (It’s problem P4). He builds the polynomials P_{C} and Q_{C} in the same way that he did in the reduction for Non-Divisibility of a Product Polynomial. One of the statements that he says is “easy to verify” is that The product of the Q polynomials for each clause has N (for us, K) zeroes in the complex plane if and only if the original 3SAT formula was inconsistent.

**Difficulty: **I’m giving all of these problems based on the polynomials that come from a formula an 8.

**The problem: **Root of Modulus 1. This is problem AN10 in the appendix.

**The description: **Given a set of ordered pairs () through () of integers, each is non-negative. Can we find a complex number where = 1 such that =0?

**Example: **It was hard for me to come up with an interesting example (where is not just 1 or i), so thanks to this StackOverflow post for giving me something I could use.

Let our ordered pairs be (5,2), (-6,1), and (5,0). This gives us the polynomial 5x^{2}-6x+5. Plugging these into the quadratic formula get us the roots , which is on the complex unit circle.

**Reduction: **This one is again from Plaisted’s 1984 paper. It again uses his polynomial that we’ve seen in some other problems (most recently Non-Divisibility of a Product Polynomial). So again, we start with a 3SAT instance and build the polynomial. He starts by showing that if you have a polynomial with real coefficients p(z), then p(z)*p(1/z) is a real, non-negative polynomial on the complex unit circle, and it has zeros on the unit circle exactly where p(z) does.

Then, we can do this for the sum of the polynomials made out of each clause, which means that this new polynomial has 0’s on the unit circle exactly where the original one did. Which means it has a 0 on the complex unit circle if and only if the formula was consistent.

**Difficulty: **8. I’m starting to appreciate the coolness of turning a formula into a polynomial, and how it makes a lot of problems easier. I just wish it was clearer to see how it all works.

]]>

**The problem: **Algebraic Equations over GF[2]. This is problem AN9 in the appendix.

**The description: **Given a set P of m polynomials over n variables (x_{1} through x_{n}) where each polynomial is the sum of terms that is either 1 or the product of distinct x_{i}, can we find a value u_{i} for each x_{i} in the range {0,1} that make each polynomial 0, if we define 1+1=0, and 1*1 = 1?

**Example: **It helps to think of GF[2] as a boolean logic world, where + is XOR and * is AND. So, suppose we have three variables, and the polynomials:

- P
_{1}= 1 + x_{1}x_{2}+ x_{2}x_{3} - P
_{2}= x_{1}+ x_{1}x_{2}x_{3}

..Then setting x_{1}=0, x_{2}=1, x_{3}=1 makes both polynomials 0.

**Reduction**: G&J say that Fraenkel and Yesha use X3C, but the paper I found uses 3SAT. We’re given an equation that has n variables and m clauses. The variables of our polynomials will be the same variables in the 3SAT instance. For each clause, we build a polynomial by:

- Replacing a negated literal (~x) with the equation 1 + x. (Remember, + means XOR in this system)
- Replacing an OR clause (A ∨ B) with the equation A+ B +A*B
- Xoring the whole above thing with 1.

Notice that the first replacement makes ~x have the opposite truth value of x, the second replacement rule is logically equivalent to A∨B, and the third part makes the polynomial 0 if and only if the clause evaluated to 1. So the polynomial is 0 if and only if the clause is satisfiable. So all polynomials are 0 if and only if the all clauses are satisfiable.

**Difficulty: **5. This is easy to follow. It’s a little tricky to make students come up with the equivalence rules above, but I think if you can explain it right, it’s not that bad.

**The problem: **Non-Divisibility of a Product Polynomial. This is problem AN6 in the appendix.

**The description: **Just like Non-Trivial Greatest Common Divisor, we’re given a set of m sequences of pairs of integers (so sequence A_{i} is <(a_{i}[1],b_{i}[1]) …(a_{i}[k],b_{i}[k])>), where each b element is ≥ 0. We’re also given an integer N.

Just like Non-Trivial Greatest Common Divisor, we build the polynomials , for each i from 1 to m. But now we want to multiply them all together. If we do, is the product *not* divisible by z^{N}-1?

**Example: **Suppose A_{1} was <(1,3), (2,2), (-1,1), (-2,0)> and A_{2} was <(5,4), (3,2), (7,0)>. Then A_{1}‘s polynomial is z^{3} + 2z^{2}-z-2, and A_{2}‘s polynomial is 5z^{4}+3z^{2}+7. The product of these is: 5z^{7}+10z^{6} -2z^{5} – 4z^{4 }+ 4z^{3} + 8z^{2}-7z-14. If N=2, then it turns out that z^{2}-1 is a factor (it’s actualy a factor of A_{1}), so the decision problem would say “No”.

**Reduction: **The reduction for this is again by Plaisted, using his polynomials that come from logical statements. For each clause C of a 3SAT formula, you build the polynomial P_{C} for that clause, and from that Q_{C} = (x^{N}-1)/P_{C} He mentions in his paper that it is “easy to verify” (but doesn’t actually prove it) that The product of all of these Q_{C}‘s / (x^{N}-1) is analytic iff S is inconsistent. I think the reason is that Q_{C} represents in his polynomial the ways to assign variables to make a formula false. So if *all* assignments make it false, the product is equal to all assignments. I still don’t quite see how the divisibility follows.

**Difficulty: **8. It’s about as hard as the last one.

**The problem: **Non-Trivial Greatest Common Divisor. This is problem AN7 in the appendix.

**The description: **Given a set of m sequences of pairs of integers (so sequence A_{i} is <(a_{i}[1],b_{i}[1]) …(a_{i}[k],b_{i}[k])>), where each b element is ≥ 0. I’m pretty sure k can be different in each sequence. If we build the polynomials , for each i from 1 to m, does the greatest common divisor of those polynomials have degree greater than 0?

**Example:** I think the hardest part of this description is picturing the polynomials, so here’s a simple example showing how that works. Suppose m=2, and A_{1} was <(20,3),(4,2),(30,1)> and A_{2} was <(2,4),(8,1)>

(As an aside, I wish G&J didn’t use A for both the name of a sequence *and* lowercase a for the name of one of the entries of each pair. They’re not related.)

The polynomial corresponding to A_{1} is 20x^{3} + 4x^{2}+30x, and the polynomial corresponding to A_{2} is 2x^{4} +8x. The polynomial 2x is a divisor of both, and I think it’s the GCD. (If not, the GCD is larger, and so also has degree >0). So, this problem instance would have the answer “yes”.

**Reduction: **

This reduction is also by Plaisted, who did last week’s reduction, but is in his 1984 paper. His reduction is from 3SAT. In the paper, he gives an algorithm that turns a logical formula into a polynomial. The polynomial p that gets created has the property that p(z) = 0 if and only if z is an M-th root of unity (a solution to z^{M}=1). This leads to a way of setting the truth values of the logical formula: if ω is the root of unity, set variable P_{j} to true if =1, where q_{j} is the jth prime number. It turns out if you do that, you make the entire logical formula true.

So, for our problem, we’re handed a 3SAT instance with n variables. Let M be the product of the first n primes. The formula is satisfiable iff we can make all clauses true, which happens iff there is an Mth root of unity ω such that the polynomial on each clause is 0 (so we make a polynomial for each clause in the SAT formula). He states an “easy” identity (without proof) that the polynomial of A∧B is the gcd of the polynomials of A and B. So therefore if ω exists for all polynomials, the gcd has degree greater than 0.

**Difficulty**: 8. This is a little easier to follow because he states the properties of his polynomial up front. I’d like to see more proofs of his “easy” properties and to be honest, I’m not sure how the last step happens (how having ω exist means that the gcd has degree > 0). I also don’t know how you’d ask students to come up with these polynomials on their own.

This next problem is related to one we’ve done before, but I think it merits its own entry.

**The problem: **Exponential Expression Divisibility. This is problem AN5 in the appendix.

**The description: **Given two sequences A = a_{1}..a_{n} and B=b_{1}..b_{m }of positive integers, and an integer q. Does divide ?

Let A={2,3} and B={1,4,5}. If q=4, then the first product comes to 15×63=945 and the second product comes to 3x255x1023 = 782,595. These two numbers don’t divide.

**Reduction: **Plaisted’s paper calls this a “refinement” of Polynomial Non-Divisibility.

The reduction for that built a polynomial called “Poly(C_{j})” and showed x^{N}-1 is a factor of Poly(~C_{j})(x) if and only if S is inconsistent. As I said in that post, there was a lot I don’t understand about it, because he doesn’t give clear proofs or explanations. He uses some more manipulations to say that the SAT formula is inconsistent iff 2^{mn}-1 divides . (“Num” and “Den” were used in the creation of “Poly”). This gives us a restatement of the Exponential Expression Divisibility problem where q =2. Since there was nothing special about the 2, it could work for any integer and thus the reduction works in general.

**Difficulty: **9. Just like the Polynomial Non-Divisibility problem, I have a very hard time following what he’s doing here. I wish I could find some better explanations

**The problem: **Simultaneous Divisibility of Linear Polynomials. This is problem AN3 in the appendix.

**The description: **Given two sets A and B, each containing n vectors, each vector having m+1 integer entries (so for example, vector a_{i} has values a_{i}[0] through a_{i}[m]) , can we find m positive integers x_{1} through x_{m} such that for each pair of vectors a_{i} and b_{i},

(a_{i}[0] + a_{i}[1]*x_{1} + a_{i}[2]*x_{2}+…+a_{i}[m]*x_{m}) divides (b_{i}[0] + b_{i}[1]*x_{1} + b_{i}[2]*x_{2}+…+b_{i}[m]*x_{m})

**Example: **Suppose a_{1} was (1,2,3), b_{1} was (2,4,6), a_{2} was (4,2,4), and b_{2} was (7,9,10). Then if I pick x_{1} = 3, x_{2 }= 2, a_{1}‘s equation evaluates to 13 and b_{1}‘s evaluates to 26. a_{2}‘s equation evaluates to 18, and b_{2}‘s equation evaluates to 54. Since both a values divide their corresponding b values, we have found an x_{1} and x_{2} that work.

**Reduction: **The paper I found by Lipschitz that has the reduction reduces from Quadratic Congruences. He starts by assuming that m ≤ 2n because at most 2n of the a_{i} and b_{i} are independent (and so the extra variables can be made equivalent to the first 2n variables by transformation). He also uses a variation of Quadratic Congruences that states the problem is still NP-Complete if c ≤ b/2. Then given a,b, and c, we build our divisibility problem with 5 formulas over the variables x, y, u, and v:

- x+u | c+1
- 4y + v | b
^{2}-1 - x+b | y-b
^{2} - x+b+1 | y-(b+1)
^{2} - b | y-a

It turns out that if we can find an x such that x^{2} ≡ a mod b if and only if we can find x,y,u, and v to satisfy those divisibility problems.

If we can solve the quadratic congruence, then setting y=x^{2}, u = c-x+1 and v = b^{2} – 4x^{2} + 1 satisfies all of the divisibility equations.

In the other direction, if we have found x,y,u, and v that works, we know:

- x ≤ c (which is ≤ b/2) from the first equation
- y ≤ b
^{2}/4 from the second equation - y = x
^{2}+ k(x+b)*(x+b+1) for some k ≥ 0 from the 3rd and 4th equations

Suppose k is not 0, and thus y is not equal to x^{2}. Then y has to be > b^{2}, which violates the second fact above. So k is really 0 and y=x^{2}. Then the last equation is a restatement of the quadratic congruence problem, and y (=x^{2} ) is congruent to a mod b.

**Difficulty: **7. I think the way this all works out is very slick, and I like how the equations give you the answer, but I have no idea how you’d come up with these equations on your own.

**The problem: **Simultaneous Incongruences. This is problem AN2 in the appendix.

**The description: **Given n pairs of positive integers (a_{1}, b_{1})…(a_{n}, b_{n}), can we find an integer x such that x a_{i} mod b_{i}?

(G&J also add the rule that a_{i} ≤ b_{i} for all i, but we can easily make that happen by doing division)

**Example: **I think it’s easier to see this as the actual congruences:

Can we find an x such that:

- x 1 mod 2
- x 2 mod 3, and
- x 3 mod 4?

If we chose x as 4, we’ll see that it works. For a simple example of a case that fails, we can do:

- x 1 mod 3
- x 2 mod 3, and
- x 3 mod 3

**Reduction: **I found this reduction in the Algorithmic Number Theory book by Bach and Shallit. Their Theorem 5.5.7 calls this the “Anti-Chinese Remainder theorem”. They reduce from 3SAT.

Our formula will have t variables and each clause in our formula is made up of 3 literals, which we’ll represent as C_{i} = (z_{ai}∨z_{bi}∨z_{ci}). For each a_{i} find p_{ai}, the a_{i}th prime number, and find p_{bi} and p_{ci} similarly. Define a_{i}‘ to be 0 if z_{ai} is a positive literal, and 1 if it’s a negative literal, and define b_{i}‘ and c_{i}‘ similarly. Now for each clause, use the regular Chinese Remainder theorem to find a value x_{i} where:

- x
_{i}a_{i}‘ mod p_{ai} - x
_{i}b_{i}‘ mod p_{bi} - x
_{i}c_{i}‘ mod p_{ci}

Our system of incongruences will be:

- x 2 (mod 3)
- x 2,3 (mod 5)
- …
- x 2,3,4,…p
_{t}(mod p_{i}) (p_{t}is the t^{th}prime number)

The above incongruences are there to force x to be 0 or 1 mod each p_{i}. I *think* these correspond to true-false values to the variables in the SAT instance (x being 0 mod p_{i} means setting that variable false, making it 1 mod p_{i} means setting that variable true)

- x x
_{i}(mod p_{ai}*p_{bi}*p_{ci}) for each i

This turns out to be O(n+t^{3}) incongruences by the Prime Number Theorem.

Each clause in the SAT instance is satisfiable unless all 3 literals are false. By the way we’ve created our a_{i}‘ (and b and c), this means that the variables can’t be set to be equal to all of a_{i}‘, b_{i}‘ and c_{i}‘. Because of how our x_{i} was chosen, this means that x is not congruent to x_{i} (mod p_{ai}*p_{bi}*p_{ci}).

**Difficulty: **7. This is a cool short reduction, but the way the x value works is something you don’t usually see.