FinalA_sol - ‫אלגוריתמי בתורת הגרפי...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ‫אלגוריתמי בתורת הגרפי )642432( – סמסטר חור תשס"ב‬ '‫פתרו מבח סופי מועד א‬ 1. ¯ : ¯ w: E → R p ts l ( p) ¯ G (V , E ) p ,¯ O (| E | | V |) ¯ :¯ O(| E | | V |) BFS : ¯ + " ¯ vs ¯ . w( v ) v + > ¯: + = = p (v ) . i i ¯ = > = ¯: + = ¯ : = = −= d (u ) i v e (u , v) d (v ) i, p (v ) u, w(v ) w(u ) w(e) d (v) u , w(v ) w(u ) w(e) w(v) w(u ) w(e) d (v) i1 s u = , ∞= ≠∀ v s w(v) w( s ) (, – w( v ) 0 ¯ , – ) ( p (v ) . s d (v ) v : ¯ . BFS ) ¯ + . : ¯ < ' ) l (q ) l ( p) l (q) t ∈ ,¯ = p p w( p ) w(q) v s ¯ . )42 ¯ . ≤ . ( . l ( p) w( p ) s, t V ( : , . ¯ ¯ . s q ‫פתרו‬ ¯ . ¯, .¯ ¯ ¯ . ¯ : 1 6 1 . : 1 . : ¯ . )8 ¯ . )8 ( . ¯ 2. . )8 ¯ ¯ ¯ ( , : ¯ , s, t V ∈ . ts k . ¯ k ¯ ( , ¯ t s k . , 2 k 4 3 k=5 1 2 k 2 k k . ¯ 6 5 6 5 ‫פתרו‬ G ' (V ' , E ' ) . vul ( s, t ) Edmonds-Karp . = con( s, t ) vul ( s, t ) ¯ : = . , ¯ " . ¯ = . ¯ vin vout con( s, t ) ∞ . v = → . vin vout . vul ( s, t ) vin : = : → , ∞= → c(u out vin ) c(vin ∈→ → ∪∈ → . . = → → , ∈ ¯ = V' {vin , vout | v V }, E ' {vin vout | v V } {u out vin | u v E} t in s out vout ) 1 vout . : = ¯ ) ( s, t V vul ( s, t ) . ¯ ¯ ∈ = con( s, t ) vul ( s, t ) s, t V ) ) ( ( ts s, t con( s, t ) vul ( s, t ) ‫פתרו‬ : 3. ¯ . . s, t V G (V , E ) s,t s,t ts ∈ : . )21 ∈ . ( . )21 ( xT G ‫פתרו‬ . ¯ . x x y x . z = x,y oldest ( y ) ¯ , ≠ oldest ( y ) oldest ( z ) y,z oldest ( x ) . ≤ . ¯ : = max d ( x) ¯ ¯ ≤ xs depth(TB ) max b( x) , , TD xs d ( x) TB xs b( x ) depth(TD ) b( x) x b( x) . = y,z oldest ( y ) oldest ( z ) : ¯ , ¯ = oldest ( y ) . oldest ( z ) y,z . ¯ , . . ¯ y x ¯ oldest ( y ) y y G DFS . ¯ depth(TB ) G . BFS ( TB . ≥ G depth(TD ) DFS TD ¯ xr BFS d ( x) 4. ¯ . , ¯ . ¯ ¯: depth( x) x depth(T ) max (depth( x)) – T x r T )8 ∈ = – = )8 . . ¯ )8 ( . ( G 5 1 T G ¯, . ¯ . ¯ T T Ce ( ¯ ¯ ¯ T Ce " . ¯ ) T Ce )¯ , . (. Ce " T T e T e ¯ . .¯ T C T T . . ¯ . . 5 )21 : G G ( . C C . G . . T T G : H T C 2( = . )21 ( ¯ T , ¯ yx H (u , v) TF 1( T w( x, y ) . . . ( x, y ) F G T ( x, y ) w(u , v ) ‫פתרו‬ 5. ¯ ¯ ¯ : . . G G ¯ : ¯ . ¯ . . ...
View Full Document

This note was uploaded on 03/08/2010 for the course ENGINEERIN 50-22-43-2 taught by Professor Prizler during the Spring '10 term at Tel Aviv Uni..

Ask a homework question - tutors are online