This presentation is the property of its rightful owner.
Sponsored Links
1 / 22

Задача о наибольшем паросочетании в двудольном графе PowerPoint PPT Presentation


  • 196 Views
  • Uploaded on
  • Presentation posted in: General

Задача о наибольшем паросочетании в двудольном графе. Автор : Воробьева Елена [email protected] 2002 год.

Download Presentation

Задача о наибольшем паросочетании в двудольном графе

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


4910022

:

[email protected]

2002


4910022

G=(M,N) , M Mb, Mb, M, .. M = MeMb, MeMb=, eN: e=(i,k), iMb, kMe c i k.


4910022

JN , j1,j2J, j1j2, : beg j1beg j2, end j1end j2.

, .


4910022

.

- G=(M,N). G' = (M,N'), G.

: , (s) (t): M = M {s, t}. () G' :

N' = {(s,u): uMb} {(u,v): uMb, vMe, (u,v)N} {(v,t): vMe}

(, Mb Me ). , .


4910022

  • :

  • s i Mb

  • t j Me

  • i j

  • 4. ( i, j ): Cij= 1

  • 5. - . .

  • :


4910022

G .

1. , .

, - .


4910022

G G.

f G , f(u,v) = .

- , ( , , ).

.

G = (M,N) Mb Me, G`=(M`,N`) . J G. G` |f| = |J|. , G, G |f| .

.

, , f . (u,v)J,

f(s,u) = f(u,v) = f(v,t) = 1

f(u,s) = f(u,v) = f(t,v) = -1


4910022

(u,v)N` f(u,v) = 0. , (u,v) J suvt. ( ) .

, f , , f . (Mb{s} = S, Me{t} = T) |J|

|J|=f(S,T)=f(S,M)f(S,S) = f(S,M)=f(s,M) + f(S\s,M)= f(s,M) = |f|

|f| |J|.

.

f G; 0 1, .

J = {(u, v) : uMb, v Me, f(u, v) = 1}

, J . , u (u,v) (u,v), 1, .. u 1. v .


4910022

, |J| = |f|. , |J| (Mb{s}, Me{t}) ( 1, |J|).

.


4910022

.

. A, Me, Mb:

:

(1) xij :


4910022

, :

( ), , (2) (3). .


4910022

( ) . J - G. , J J () J.

, , , . , J , - . , J , , , , .

, . . , - , , , , , . J J .


4910022

1.

J , J .

.

, . J , , J, J .

, , J, J, . , , J , J. H J J.

:

1. ;

2., J, J;

3. , J;

4. , J.


4910022

, , , , (1) J J. (2), (3) J , J. J , J, (4). J, , .

1 . , , , .

-s, ( ) n , n- ; boolean R ( n ) Q.


4910022

  • 1:

  • , s

  • (): prev:= s, i = 1,,n R[i]:=false,

  • P[i] := -1.

  • 2. ( ):

  • 2.1. k , prev. k R[k] = false, enqueue(Q,k); P[k] := prev; R[k] := true.

  • 2.2. Q != , prev = dequeue (Q); 2.1.

  • 3. (): , .


4910022

:

( , , s=1)

1 : P R -1 false; prev := 1; Q :=

2.1 : Q = {2}

P = (-1, 1,-1, )

R = (f, t, f,)

2.2: Q = {} prev = 2;

2.1 : Q ={3, 4}

P = (-1, 1, 2, 2, -1, -1, -1)

R = (f, t, t, t, f,)

( 3 4 Q, P , 2, R , )


4910022

2.2: Q = {4} prev = 3

2.1: Q = {4}

P = (-1,1,2,2,-1,-1,-1)

R , .. 3

2.2: Q = {5} prev = 4

2: Q = {5}

P = (-1,1,2,2,4,-1,-1)

R[5] = true ( 5- )

2: Q = {}

P = (-1,1,2,2,4,-1,-1)

3:

, ( ) . , , 5 4, 4 2, 2 1, .. [1,2,4,5].


4910022

.

I={1,2,...,m} - , K={1,2,...,n} -- . . ; I, iI K , .

, , :

, J, , .. K I, , .. I K.

I = I+ I-, K= K+K-, , . , J , B st, sI-, t K-.


4910022

  • 2:

  • ():

  • 1.1. J ( ).

  • 1.2. ( ).

  • 2. ( ):

  • 2.1. i I- 1 , I-. koK-, (i,...,k) J B. J 1.2.

  • 3. (): J, .


4910022

. , .

, .


4910022

I-={4}. 4 1', 2, 3, 4' 4'. 4K-. [4, 3', 3, 1', 2, 4']. . .


4910022

:

1...

2.., ., .

3..., .., ..


  • Login