Monthly Archives: January 2019

Equilibrium Point

This next reduction is confusing to me, and I wonder if it’s because there is a typo in the paper.

The problem: Equilibrium Point.  This is problem AN15 in the appendix.

The description: Given a set X = {x1..xn} of variables, a collection F = {F1..Fn} of integer product polynomials over the variables, and a set of “ranges” M = {M1..Mn} of subsets of the integers.  Can we find a sequence Y = {y1..yn}, where each yi ∈ Mi, and for all y ∈ Mi, Fi(y1, y2,…yi-1, yi, yi+1, …yn) ≥ Fi(y1, y2,…yi-1, y, yi+1, …yn)?

Example: This concept of “Equilibrium point” is best through of from the perspective of Game Theory.  The functions F are the utility functions for each player.  The sequence Y is the set of choices each player makes.  We are asking whether we can find a set of values in Y where any player i changing their yi value to something else will not improve their personal Fi score.

So the classic “Prisoner Dilemma” problem can be represented in these terms: There are 2 players, so n is 2.  Each range is with in {0,1}, where 0 means “stay silent” and 1 means “betray”.  F1 is defined by a table:

Player 2 stays silent Player 2 betrays
Player 1 stays silent -1 -3
Player 1 betrays 0 -2

F2 is defined similarly (the 0 and -3 scores switch places).

Notice that if we chose y1=y2 = 0 (both sides stay silent).  Then F1(0,0)= F2=(0,0) = -1.  But this is < F1(1,0), where player 1 betrays.  So this is not an equilibrium point.

y1=y2=1 is an equilibrium point, where both functions return -2.  Any player changing their choice from 1 to 0 will see their F function go from -2 to -3.

Reduction: Sahni does this in his “Computationally Related Problems” paper that we’ve used in the past to do some graph reductions.  This reduction is from 3SAT.   I’ll just say now that he could have avoided a lot of manipulation if he’d have used One-In-Three 3Sat.  From a 3SAT instance, we build a game where there is one clause for each player, and the range of choices for each player is between {0,1}.  The goal is to make a function fi for a clause Ci that is 1 iff the corresponding clause is true.  I’ll skip over the manipulations he does because he’s using a harder SAT problem than he needs to.

Define hi(x’) to be 2* the product of all of the fi(x’) values (for some literal x’.  If x;’ is a positive literal, use the variable.  If it’s a negated literal, use 1- the variable).  F1 (x’) = h1(x’) for all players.  This means that if the formula was satisfiable, everyone could score 2, but if it wasn’t, they’d always score 0.

Now it gets weird.  We’re going to set up a second game G, a 2 player game with no equilibrium point, then define a second payoff function for our original game F2 where F2 (x) = the g function of x for the first 2 players, but 0 for everyone else.

The paper says that the actual payoff for the actual game we’re creating is: F(X) = F1(x) + F2(x) * 2 – F1(x)

The “2” is a payout of 2 for all players- since the above depends on matrix math, it’s an nx1 vector of all 2’s. This formula is very weird to me because the F1 and -F1 should cancel out.  This is where I think there might be a typo.  I’m pretty convinced there is a typo on the previous page where he was building his little fi function (he uses a + where there should be a -).  I’m thinking that there are missing parentheses in this formula, and it should be F(X) = F1(x)+F2(x)*(2-F1(x))

Now two things can happen.  If the formula was satisfiable, then F1(x) is all 2’s, and that is the max payout for everyone and is an equilibrium point.  If the formula was not satisfiable, then F1(x) is all 0’s, and so the scores in the F2 part influence the score for F, but the F2 part has no equilibrium, so F doesn’t either.

Difficulty: 8.  I think I found the typo though.

Permanent Evaluation

Going back to the problem we skipped over last week.

The problem: Permanent Evaluation.  This is problem AN13 in the appendix.

The description: Given an nxn matrix M of 0’s and 1’s, and a positive integer K, is the permanent of M equal to K?

Example: The permanent of M = \displaystyle \sum_\sigma \prod_{i=1}^n A_{i,\sigma(i)}

That is, for each permutation of the columns, we multiply down the main diagonal.  The sum of all of those products is the permanent.

1 2 3
4 5 6
7 8 9

..then the permanent is 1*5*9 + 1*6*8 + 2*4*9 + 2*6*7 + 3*5*7 + 3*4*8 = 450

Of course, we’re looking at 0/1 matrices, so I think what we’re really asking is how many permutations of the columns have 1’s on the main diagonal.

(Wrong) Reduction: If I’m right above that all we’re doing is counting how many ways there are 1’s in the main diagonal, then this becomes a pretty easy Turing Reduction from Hamiltonian Path.  Given an adjacency matrix of a graph, we want to know if the permanent of the adjacency matrix is 1 or more.  (Any Hamiltonian Path will give a permutation that multiplies to 1, and any permutation of vertices that is not a Hamiltonian Path multiplies to 0).   Given how complicated the “actual” reduction is, I’m a little worried that I missed something, though.

Edit on 1/21: This isn’t right.  The problem is that while you’re premuting the columns, you’re not permuting the rows.  So if we permute the column to be the second vertex in the Hamiltonian Path, the second row is still the vertices adjacent to vertex #2 (which might not be the second vertex in the path).

That’s a shame.  I wonder if there is a way to manipulate the problem to make it work this way anyway.

(Correct) Reduction:

The reduction by Valiant that G&J point you to uses 3SAT, He shows that if you have a formula F, and define t(F) to be 2x the number of literals in F – the number of clauses in F, then there is some function f,  computable by a deterministic Turing Machine  in polynomial time, that maps a formula to a matrix.  (The matrix has entries in {-1..3}, he does another transformation later to convert it to a 0/1 matrix).  The permanent of that matrix = 4^{t(F)} * s(F) , where s(F) is the number of ways to satisfy F.

Since one of the consequences of Cook’s Theorem is that we can take an arbitrary non-deterministic Turing Machine and turn it into a Satisfiability formula, we get the reduction.

The actual construction of that function f is complicated.  Given a formula, we construct a graph and use the matrix as the adjacency matrix of the graph.  The variables, literals, and clauses get mapped to subgraphs.

Difficulty: If my way was right, I’d give it a 4- I think it’s easier than most Turing Reductions.  The Valiant construction is an 8.

Cosine Product Integration

I’m back from break, and we’ll go a little out of order at first since this is the last problem that’s similar to the ones we’ve been working on.

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

The description: Given a sequence of n integers (a_i..a_n), does \displaystyle \int_0^{2\Pi} (\prod_{i=1}^n cos(a_i\theta)) d\theta = 0?

Example:

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

\displaystyle \int_o^{2\Pi}(\theta*2\theta*3\theta)d\theta

This is just 6\theta^3, which integrates to \frac{6x^4}{4}, which over the interval 0..2\pi is 24\pi^4

Reduction: This one is in Plaisted’s 1976 paper. In it, he notes that if you look at the function \displaystyle \prod_{j=1}^{k} (x^{a_j}+x^{-a_j}) 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 a_i 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.