Hello everyone!) There is such a problem, an algorithm may already exist on it ... In general, there is a connected undirected graph. All edges have bandwidth. Vertices is a computer. The problem is this, you need to number each vertex of this graph (assign a number to each computer). It is clear that there are no loops and multiple edges) Tell me the algorithm, maybe you have already solved the problem?)

    1 answer 1

    If what I understood is to go through the vertices and number everything, then the BFS and DFS algorithms can help you. Each of them bypasses the graph, only one does it in depth, and the other in width. Here you have a way to number all vertices.