Блог пользователя icpc_expert

Автор icpc_expert, история, 6 лет назад, По-английски

Can anybody explain me how to convert Cyclic graph into Acyclic Graph with different layers.

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
6 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Strong name to post content. :P

Anyways, check "SCC Condensation". You can condense all SCC's of the graph, and create a directed one where each node represents a SCC. Edges exist between 2 SCC's if a node in the first SCC goes to the second in the original graph. This is of course only useful if the nature of your problem allows you to abstract the graph into that.

e-maxx article : https://cp-algorithms.com/graph/strongly-connected-components.html