Re: [問題] 在O(|V|)的時間內找到non-cut點

作者: Leon (Achilles)   2013-08-01 00:40:02
※ 引述《c2251393 (mrgc)》之銘言:
: 這樣是O(|V|)嗎?
: 如果你只是把逆邊砍掉的話這樣還是O(|V|+|E|)啊
我分成兩篇寫了.
在第一篇有提到說 I don't go throught the edges in {V_1, V_{k}}.
Because I am generating a spanning tree,
so no need for circule.
: 因為你只是把遍歷的的時間 sum(deg(v))變成 sum(deg(v))/2
: 所以原本sum(deg(v)) = 2|E| 而現在是sum(deg(v))/2 = |E|
: 現在假設有一張4階完全圖
: 0 1 1 1
: 1 0 1 1
: 1 1 0 1
: 1 1 1 0
: 從V_1開始跑 花3個時間
: 然後圖變成了這樣
: 0 0 0 0
: 0 0 1 1
: 0 1 0 1
: 0 1 1 0
Yes, and now the node I have visited is {V_1, V_2, V_3, V_4}
: 然後是V_2 花2個時間
: 圖變成
: 0 0 0 0
: 0 0 0 0
: 0 0 0 1
: 0 0 1 0
This is not what I mean. In this step, you have no edge needed to go
because all nodes have beend visited.
What I am thinking now, is the data structure to achieve this.
It can be represented by
visit_edge ( (j node have been visited?) && E_{i,j} )
作者: scwg ( )   2013-08-01 00:59:00
and exactly how are you implementing such data structureto achieve amortized o(|E|) ?Sorry, my bad, o(|E|) is too strict, the complexity thatyou need is amortized O(|V|) and how do you do that?
作者: rebaudiana (微甜)   2013-08-01 02:09:00
這樣的資結感覺不存在
作者: ledia (付出不需要理由)   2013-08-01 21:31:00
如果存在的話很多問題的 order 應該可以再下修

Links booklink

Contact Us: admin [ a t ] ucptt.com