Existe um algoritmo de tempo polinomial para determinar se o intervalo de um conjunto de matrizes contém uma matriz de permutação?


30

Eu gostaria de encontrar um algoritmo de tempo polinomial que determine se o intervalo de um determinado conjunto de matrizes contém uma matriz de permutação.

Se alguém souber se esse problema é de uma classe de complexidade diferente, isso seria igualmente útil.


EDIT: Marquei esta questão com Programação Linear, porque tenho uma forte suspeita de que, se essa solução existisse, seria uma espécie de algoritmo de programação linear. A razão pela qual acredito nisso é que os pontos extremos do politopo de Birkhoff são precisamente as matrizes de permutação. Se você pudesse encontrar uma função objetiva que fosse maximizada ou minimizada apenas nos vértices do polítopo de Birkhoff, poderia restringir sua função à interseção do politopo e do seu subespaço vetorial e, em seguida, maximizá-la em tempo polinomial. Se esse valor fosse uma matriz de permutação, você saberia que o conjunto continha uma permutação. Esses são meus pensamentos sobre o assunto.


EDIT 2: Depois de um pouco mais de reflexão, parece-me que as matrizes de permutação são precisamente os elementos do Polítopo de Birkhoff com a norma euclidiana nn , o que consideramos o polytope Birkhoff ser o casco convexo don×nn×nmatrizes de permutação. Talvez isso também possa ser significativo.


EDIÇÃO 3: Adicionei a tag de programação semidefinida, porque após o meu comentário anterior, estou começando a pensar que uma solução de programação semidefinida pode ser possível, pois agora é um algoritmo de otimização quadrática com restrição linear.


2
What type of entries would the input matrices have?

The entries could be in any field, there's some freedom in how to set up the matrices; however, you want a sufficiently large field (so a field of characteristic 2 would be no good for example).
Nick

Can explain what is the span of a set of matrices?
Mohammad Al-Turkistany

Mohammad : I think it is a linear combination of set of matrices.
Vivek Bagaria

4
@DavidRicherby I think Mohammad's confusion comes from the fact that usually we think of matrices as representing linear maps, and the span of linear map is sometimes used as another term for its range. But that doesn't make sense here, so I guess we're to think of matrices as elements of a vector space
Sasho Nikolov

Respostas:


5

Theorem. The problem in the post is NP-hard, by reduction from Subset-Sum.

Of course it follows that the problem is unlikely to have a poly-time algorithm as requested by op.


Here is the intuition. The problem in the post is

  • Is there a permutation matrix in the span of a given set of matrices?

This is essentially the same as

  • Is there a permutation matrix that (thinking of the matrix as a vector) satisfies some given linear constraints?

This in turn is the same as

  • Is there a perfect matching (in a complete bipartite graph) whose incidence vector satisfies some given linear constraints?

Reducing Subset-Sum to the latter problem is a standard exercise.

Here is the detailed proof.


Define the following intermediate problem:

Matching-Sum:

input: Complete, bipartite graph G=(U,V,E)G=(U,V,E) with non-negative integer edge weights, and non-negative integer target TT.

output: Does GG contain a perfect matching of weight exactly TT?


Lemma 1. Subset-Sum poly-time reduces to Matching-Sum.

Proving this is a standard homework exercise. The proof is at the end.

Lemma 2. Matching-Sum poly-time reduces to the problem in the post.

Proof of Lemma 2. Fix a Matching-Sum input: a complete bipartite graph G=(U,V,E)G=(U,V,E) with non-negative integer edge weights w:U×VN+w:U×VN+, and target TN+TN+, where U={u1,,un}U={u1,,un} and V={v1,,vn}V={v1,,vn}. For each i,j{1,2,,n}i,j{1,2,,n}, define M(ij)M(ij) to be the matrix in R(n+1)×(n+1)R(n+1)×(n+1) where M(ij)ij=TM(ij)ij=T, and M(ij)n+1,n+1=w(ui,vj)M(ij)n+1,n+1=w(ui,vj), and all other entries are zero. The reduction outputs the following set of matrices: {M(ij):i,j{1,,n}}.

{M(ij):i,j{1,,n}}.
This defines the reduction.

Claim. The span of this set of matrices consists of those matrices MR(n+1)×(n+1)MR(n+1)×(n+1) satisfying the linear constraints Mh,n+1=Mn+1,h=0Mh,n+1=Mn+1,h=0 for all hnhn and the linear constraint ni=1nj=1Mijw(ui,vj)=TMn+1,n+1.

ni=1nj=1Mijw(ui,vj)=TMn+1,n+1.

(Proof of claim. By inspection each matrix M(ij)M(ij) in the set satisfies these constraints, so every linear combination of those matrices does. Conversely, if MR(n+1)×(n+1)MR(n+1)×(n+1) satisfies the constraints, then MM equals the linear combination M=ni=1nj=1αijM(ij)M=ni=1nj=1αijM(ij) of the matrices, where αij=Mij/M(ij)ij=Mij/Tαij=Mij/M(ij)ij=Mij/T. Note in particular that, by the various definitions and the linear constraints, Mn+1,n+1=ijαijw(ui,vj)=ijMijw(ui,vj)/T=(TMn+1,n+1)/T=Mn+1,n+1.

Mn+1,n+1=ijαijw(ui,vj)=ijMijw(ui,vj)/T=(TMn+1,n+1)/T=Mn+1,n+1.
This proves the claim.)

Now we show the reduction is correct. That is, the given graph GG has a weight-TT matching if and only if the set of matrices spans a permutation matrix.

(Only if.) First suppose the given graph GG has a weight-TT perfect matching MM. Let M{0,1}(n+1)×(n+1)M{0,1}(n+1)×(n+1) be the corresponding n×nn×n permutation matrix, with an extra row and column added such that Mn+1,n+1=1Mn+1,n+1=1 and Mh,n+1=Mn+1,h=0Mh,n+1=Mn+1,h=0 for all hnhn. Then ni=1nj=1Mijw(ui,vj)ni=1nj=1Mijw(ui,vj) is the weight of MM, that is, TT, and Mn+1,n+1=1Mn+1,n+1=1, so the linear constraints in the claim hold, and the span of the given set of matrices contains the permutation matrix MM.

(If.) Conversely, suppose the span contains any permutation matrix MM. By the claim, the only non-zero entry in row n+1n+1 or column n+1n+1 is Mn+1,n+1Mn+1,n+1, so (as MM is a permutation matrix) it must be that Mn+1,n+1=1Mn+1,n+1=1. So deleting the last row and column gives an n×nn×n permutation matrix. Let MM be the perfect matching of GG corresponding to that n×nn×n permutation matrix. The weight of MM is ni=1nj=1Mijw(ui,vj)ni=1nj=1Mijw(ui,vj), which (by the claim) is TMn+1,n+1=TTMn+1,n+1=T. So the given graph has a weight-TT matching, proving Lemma 2.    

Here's the delayed proof of Lemma 1:

Proof of Lemma 1. Given Subset-Sum instance (w,T)Nn+×N+(w,T)Nn+×N+, the reduction outputs the Matching-Sum instance (G=(U,V,E),T)(G=(U,V,E),T) where U={u1,u2,,u2n}U={u1,u2,,u2n}, V={v1,v2,,v2n}V={v1,v2,,v2n}, for each i{1,,n}i{1,,n}, edge (ui,vi)(ui,vi) has weight wiwi, and all remaining edges have weight zero.

For any perfect matching with edge weights summing to TT, the set S={i:(ui,vi)M,in}S={i:(ui,vi)M,in} is a solution to the given Subset-Sum instance (as these are the only non-zero weight edges in MM).

Conversely, given any solution to the Subset-Sum instance, say S{1,,n}S{1,,n} with iSwi=TiSwi=T, the set of edges {(ui,vi):iS}{(ui,vi):iS} is a partial matching with weight TT, and it extends easily to a weight-TT perfect matching by adding, for example, the following set of (zero-weight) edges:

{(ui+n,vi+n):iS}i{1,,n}S{(ui,vi+n),(ui+n,vi)}.

{(ui+n,vi+n):iS}i{1,,n}S{(ui,vi+n),(ui+n,vi)}.

This proves Lemma 1. The theorem follows from Lemmas 1 and 2.       


p.s. As an aside, according to this answer, the restriction of Matching-Sum to instances with polynomially-bounded edge weights is in P. But I'm sure that the restriction of the problem in the post to matrices with polynomially-bounded (integer) entries remains NP hard.


2
It seems like you take the convex hull of the matrices rather than the span. The span of the matrices you described is the full space of matrices. Or am I missing something?
Vanessa

@Squark, you are correct - I misinterpreted "span". Thanks. I corrected the proof to use the correct definition of span (as any linear combination of the matrices.)
Neal Young

Nice! I think it would be better to multiply the definition of M(ij)M(ij) by w(ui,vj)w(ui,vj), so that we don't have to divide by something which might be 0? Also, it seems like the proof can be somewhat simplified by combining the two reductions without the intermediate problem.
Vanessa

Good point about dividing by zero. I'll fix that. I'll leave the two reductions separate though, for me it's more intuitive that way.
Neal Young

3

Regarding the problem of computing the diameter of a polytope presented as the intersection of halfspaces, the problem is NP-hard in general, and also NP-hard to approximate within any constant factor, see Brieden's paper and references therein. I think for centrally symmetric polytopes, an SDP gives an O(logm)O(logm) approximation where mm is the number of inequalities defining the polytope. I sketch this below the line.

In your case the Birkhoff polytope PP is not centrally symmetric, but working with the convex hull of PP and PP suffices for your purposes. I think this "symmetric Birkhoff" polytope can be represented as the set of all square matrices MM that satisfy:

i,j:iMij=jMij=c

i,j:iMij=jMij=c

i,j:1Mij1

i,j:1Mij1

1c1

1c1

If this is a correct representation (not sure), then you can just add the constraints that restrict this polytope to your given subspace. It is not hard to adapt the SDP below the line to this representation, but I choose not to go through it in order to keep notation managable.

I am not sure what approximate diameter does for your problem: it probably lets you decide if the given subspace is close to a permutation matrix or far from all of them, but I have not worked out the calculations.


Let me finish with a sketch of the SDP rounding (which is fairly standard fare). Let P={x:bAxb}P={x:bAxb} be a centrally symmetric polytope, where AA is m×nm×n. Define the vector program:

α2=maxni=1vi22

subject to:

1im:nj=1Aijvj22b2i

Above the vi range over n-dimensional vectors. This can be written as an SDP in the standard way and is a relaxation of the diameter of P, i.e α is at least the euclidean diameter of P.

I now claim that αO(logm)diam(P). To show this, I will give you an algorithm that, given (vi)ni=1 of value α, outputs xP of length at least αO(logm). The algorithm is just a random projection: pick a random n-dimensional vector g where each gi is a standard gaussian. Set ˜xi=gTvi. By standard properties of gaussians:

E ˜x22=α2

im:E |(A˜x)i|2b2i    E mmaxi=1|(A˜x)i|biClogm.
where the last bound holds for large enough C (this is a standard fact about the maximum of m subguassian random variables, and can be proven using the Chernoff bound).

The two equations already imply there exists an x such that xP and x221Clogmα. Or, using concentration bounds, you can show that with constant probability 12Clogm˜xP and ˜x212α.

Ao utilizar nosso site, você reconhece que leu e compreendeu nossa Política de Cookies e nossa Política de Privacidade.
Licensed under cc by-sa 3.0 with attribution required.