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 √n
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.
fonte
Respostas:
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
This is essentially the same as
This in turn is the same as
Reducing Subset-Sum to the latter problem is a standard exercise.
Here is the detailed proof.
Define the following intermediate problem:
Proving this is a standard homework exercise. The proof is at the end.
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×V→N+w:U×V→N+ , and target T∈N+T∈N+ , 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}}.
Claim. The span of this set of matrices consists of those matrices M∈R(n+1)×(n+1)M∈R(n+1)×(n+1) satisfying
the linear constraints Mh,n+1=Mn+1,h=0Mh,n+1=Mn+1,h=0 for all h≤nh≤n and
the linear constraint ∑ni=1∑nj=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 M∈R(n+1)×(n+1)M∈R(n+1)×(n+1) satisfies the constraints, then MM equals the linear combination M′=∑ni=1∑nj=1αijM(ij)M′=∑ni=1∑nj=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,
M′n+1,n+1=∑ijαijw(ui,vj)=∑ijMijw(ui,vj)/T=(TMn+1,n+1)/T=Mn+1,n+1.
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 M′M′ . 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 h≤nh≤n .
Then ∑ni=1∑nj=1Mijw(ui,vj)∑ni=1∑nj=1Mijw(ui,vj) is the weight of M′M′ , 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 M′M′ be the perfect matching of GG corresponding to that n×nn×n permutation matrix. The weight of M′M′ is ∑ni=1∑nj=1Mijw(ui,vj)∑ni=1∑nj=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,i≤n}S={i:(ui,vi)∈M,i≤n} 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 ∑i∈Swi=T∑i∈Swi=T , the set of edges {(ui,vi):i∈S}{(ui,vi):i∈S} 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):i∈S}∪⋃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.
fonte
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 −P−P 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∗=∑jMi∗j=c
∀i,j:−1≤Mij≤1
−1≤c≤1
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:−b≤Ax≤b}P={x:−b≤Ax≤b} be a centrally symmetric polytope, where AA is m×nm×n . Define the vector program:
α2=max∑ni=1‖vi‖22
subject to:
∀1≤i≤m:‖∑nj=1Aijvj‖22≤b2i
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 x∈P 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 ‖˜x‖22=α2
The two equations already imply there exists an x such that x∈P and ‖x‖22≥1C√logmα. Or, using concentration bounds, you can show that with constant probability 12C√logm˜x∈P and ‖˜x‖2≥12α.
fonte