Re: Problem on an nxn grid
- From: Jonathan Berry <jberry@xxxxxxxxxxxxx>
- Date: 17 May 2007 10:49:58 -0700
Hah! This is actually for the "minimum-weight matching"
problem, with all non-negative weights.
An idea to speed up solution of some "weight matching"
problems where the weights vary considerably from each
other.
There are n matches (edges) in the solution set.
1. Sort the weights.
2. Call the sum of the n-1 lowest weights w_min.
3. Go through the weights from the lowest, selecting
the first n that don't disobey the selection criteria.
4. Sum this selection and call it ts_max.
4a. If ts_max = w_min + weight (low_n), you're done.
Lucky!
4b. Steps 3 and 4 might be repeated with variations
(such as rejecting the first weight out of hand) and
if the value is less than ts_max, it becomes ts_max.
5. Any weight greater than ts_max - w_min cannot be
part of the solution set.
6. Use your favourite algorithm on remaining weights.
--
Jonathan Berry
.
- References:
- Problem on an nxn grid
- From: Jonathan Berry
- Re: Problem on an nxn grid
- From: Chip Eastham
- Re: Problem on an nxn grid
- From: Jonathan Berry
- Re: Problem on an nxn grid
- From: Chip Eastham
- Problem on an nxn grid
- Prev by Date: Re: The existence of other life forms in the Universe
- Next by Date: Re: Fibonacci Question
- Previous by thread: Re: Problem on an nxn grid
- Next by thread: Substitution Tiling With Heptagonal Symmetry
- Index(es):
Relevant Pages
|