Re: Problem on an nxn grid
- From: asinop <asinop@xxxxxxxxx>
- Date: 11 May 2007 08:42:55 -0700
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
.
- Follow-Ups:
- Re: Problem on an nxn grid
- From: Chip Eastham
- Re: Problem on an nxn grid
- References:
- Problem on an nxn grid
- From: Jonathan Berry
- Problem on an nxn grid
- Prev by Date: Re: Comprehensive Solution Manual for Textbooks
- Next by Date: Re: Paths
- Previous by thread: Re: Problem on an nxn grid
- Next by thread: Re: Problem on an nxn grid
- Index(es):
Relevant Pages
|