Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is probably NP-hard. Suppose you have points A, B, C, D, E.</p> <p>Let's try a simple <em>deterministic</em> algorithm. Suppose you calculate the distance from point B to line A-C and it's smaller than your threshold (1 meter). So you delete B. Then you try the same for C to line A-D, but it's bigger and D for C-E, which is also bigger.</p> <p>But it turns out that the optimal solution is A, B, E, because point C and D are close to the line B-E, yet on opposite sides.</p> <p><strong>If you delete 1 point, you cannot be sure that it should be a point that you should keep</strong>, unless you try every single possible solution (which can be <code>n^n</code> in size, so on <code>n=80</code> that's more than the minimum number of atoms in the known universe).</p> <p>Next step: try a <em>brute force</em> or <em>branch and bound</em> algorithm. Doesn't scale, doesn't work for real-world size. You can safely skip this step :)</p> <p>Next step: First do a <em>determinstic</em> algorithm and improve upon that with a <em>metaheuristic</em> algorithm (tabu search, simulated annealing, genetic algorithms). In java there are a couple of open source implementations, such as <a href="http://www.jboss.org/drools/drools-planner" rel="nofollow">Drools Planner</a>.</p> <p>All in all, you 'll probably have a workable solution (although not optimal) with the first simple deterministic algorithm, because you only have 1 constraint.</p> <p>A far cousin of this problem is probably the Traveling Salesman Problem variant in which the salesman cannot visit all cities but has to select a few.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload