English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

We're doing nearest-neighbor and sorted-edges algorithms in class, but what I don't understand is the sorted-edges algorithm. Isn't it the same as the nearest neighbor algorithm when started from the smallest edge?

2007-09-28 06:51:14 · 2 answers · asked by Anonymous in Science & Mathematics Mathematics

2 answers

The difference between the two is that the sorted-edges algorithm looks at the whole set of edges each time, not just the one connected to the last vertex.

So if you had a shape like the following (bad example)

A --- 2 --- B
| ............... |
5 ............. 8
| ............... |
C --- 3 --- D

You would take side AB, then you would add CD to the set of edges. Notice they are disjoint. Imagine a few diagonals, or more vertices and you may get different results with the two algorithms.

Does that make sense?

2007-09-28 07:02:44 · answer #1 · answered by Puzzling 7 · 0 0

Sorted Edges Algorithm

2017-01-09 08:33:36 · answer #2 · answered by ? 4 · 0 0

fedest.com, questions and answers