algorithm - How to assign consecutive numbers to nodes of directed graph? -


There is a graph with many nodes, and very few edges between them - the problem is assigning numbers to nodes , So that most nodes are I to I + 1 or otherwise closed.

My problem is about printing graph data well, but an algorithm is just that every compiler is part of it (the intermediate code is just a graph,

I thought it was just a straight-to-depth search, but the results of that are not very good - it seems that the number of links can be reduced well, but these leaves are horrible (like 1 -> 500 -> 1).

Anything bad Thinking about this problem?

discusses this problem, if you have delta (endpoint) on the edge of iyle Schneider The absolute value of the difference between the label), this # 2 is under the optimum linear mechanism

Unfortunately, there is no algorithm for receiving optimum order (or labeling) Given, and common problem is NP-complete for trees, some polynomial-time ales The reference to the gorillum is, however.

If you want to be involved in educational goods, Google offers a lot of hits for "optimal linear regulation".


Comments