Re: Problem on an nxn grid
- From: Chip Eastham <hardmath@xxxxxxxxx>
- Date: 11 May 2007 09:21:31 -0700
On May 11, 11:42 am, asinop <asi...@xxxxxxxxx> wrote:
You can formulate this problem as an instance of maximum weighted
matching on general graphs, which has efficient polynomial solvers.
The algorithm is:
- You first bring the matrix to upper triangular form (for every (i,j)
(i<j), a'_{ij} = M-min(a_{ij},a_{ji}), where M is a big number st
a'_{ij}>=0.
- Then form a graph with n nodes representing coordinates. Place edges
between nodes i and j (i<j) with weight a'_{ij}.
- Do maximum weighted matching on this graph.
Hope this helps.
Ali
Very elegant! You've clearly shown the equivalence
of these two classes of problems.
regards, chip
.
- References:
- Problem on an nxn grid
- From: Jonathan Berry
- Re: Problem on an nxn grid
- From: asinop
- Problem on an nxn grid
- Prev by Date: Re: Paths
- Next by Date: Re: Cantor Confusion
- Previous by thread: Re: Problem on an nxn grid
- Next by thread: Re: Problem on an nxn grid
- Index(es):
Relevant Pages
|