Codeforces и Polygon могут быть недоступны в период с 6 декабря, 22:00 (МСК) по 7 декабря, 00:00 (МСК) в связи с проведением технических работ. ×

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

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

For SCCs if we want to answer the query "are A and B in the same component?" it's quite easy because each vertex belongs to only one component. We can store color[i] and compare them.

But this idea won't work for biconnected components. Cut vertices (articulation points) can be part of O(N) BCCs. I'm not sure if there is a solution for the general case of "are A and B in the same BCC?". Can we do some processing to solve this problem for biconnected components in sublinear time?

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

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

yo so you know the block cut tree? in a block cut tree, every vertex represents either a BCC or a cut vertex -- you connect a cut vertex to a BCC only if that cut vertex is in that BCC. so i think if you root this tree, cut vertices are in the same BCC only if both are either the children/ancestor of the same BCC