I need to implement an algorithm which involves building a complete graph using JavaScript functions as first step.
Are there any fast ways (like libraries or build-in functions I can use? Or may I get some suggestions on how to set up the data-structures efficiently and easily using JavaScript?
Further more, given n vertices, after building a complete graph, for each iteration: Try vertex-cover like thing,(if there'are odd number of vertices, just leave the last one alone) and then store the pairs of vertices for each edge in the vertex cover, and then remove the edges involved in that vertex cover, and then sort the vertices by orders that has biggest number of edges remaining to be removed and then looping doing so, until no edges been left in the graph.
Thank you very much.