Changes

Jump to navigation Jump to search
no edit summary
{{Project|Has project output=Tool|Has sponsor=McNair ProjectsCenter
|Has title=Enclosing Circle Algorithm
|Has owner=Christy Warden, Peter Jalbert,|Has start date=201701January 2017|Has deadline=201704April 2017
|Has keywords=Tool
|Has project status=ActiveSubsume
|Has Image=Red-circle.jpg
}}
6. for node in valid_nodes, add node to explored_nodes, change cur_node to node, and update respective areas, parents, children, circle, points
7. run this algorithm again, change k = 2
8. if the cur_node cannot be split into 2, or the cur_node cannot be split into 2 circles with smaller areas than its parent, add cur_node to end_nodes and resume algorithm with next valid_node not in explored_node as the cur_node
9. if all the valid_nodes are in explored_nodes, return end_nodes
10. repeat the above algorithm for all k from 2 to int(#number of total points/n) and take the end_nodes with the lowest total area
The runtime of the minimum enclosing circle is O(n), and the runtime of constrained k-means depends on k itself. Here, the value of k is proportional to the total number of points. <br>
We would expect the algorithm to slow as the number of points increase. For reference, a set of 80 points with n =3, took about 30 minutes. <br>
Further improvements could implement an early-stopping method to converge to a local optima. <br>  ==Comparison to Other Algorithm Visualization ==
The K-Means based algorithm returns the optimal solution, albeit slower <br>
[[File:kmeans comparison.png]][[File:original algorithm.png]] In this example, there are 16 points, with n = 4. <br>The k-means based algorithm doesn't seem to constrain circles to have about 4 points. <br>The previous algorithm seems to search for a point and construct a circle of the n-1 nearest points to construct a circle. <br>This search is dependent on what point is constructed first, since all further search spaces excluded the previously constructed circle. <br> [[File:kmeans random.png]][[File:original algorithm randomhouston.png]] Here again are both algorithms on randomly generated points.
=Brute Force=

Navigation menu