Professor Adam Kids (determine maximum flow)

I need help understanding the solution to the following problem:

Professor Adam has two children who, unfortunately, do not like each other. The problem is so serious that not only do they refuse to go to school together, but in fact, everyone refuses to go to any block that another child stepped on that day. Children have no problems with their paths crossing the corner. Fortunately, both the professor’s house and the school are in the corners, but apart from this, the professor is not sure that it will be possible to send both children to the same school. The professor has a map of the city. Show how to formulate the problem of determining whether children can go to the same school with the problem of maximum flow.

The only thing I can think of is having four corner graphs. The upper left vertex represents the source (Adam's house), and the lower right corner represents the shell (school). The angle xin the upper right corner represents the angle in the neighborhood, and yrepresents the lower left corner of the neighborhood. Thus, we have a way of going from S -> C1, S -> C2, C1 -> tand C2 -> t. Each path has a weight of 1, since it can only accommodate one child. The maximum flow of this schedule is 2, which proves that they can attend the same school.

The problem I am facing is that I am not sure if this satisfies the solution I came up with. The part that pumps me a lot is that I'm not sure what this means: but in reality everyone refuses to walk on any block that another child has stepped on that day. . How does this expression make sense if both live in the same house on the same block?

+4
source share
5 answers

: , . " " , - . , , , ( Curious ).

, OP ,

, . , ?

, , .

, - :


, - , . , 1 . :

s -> C1, C1 -> C3, C3 -> C4, C4 -> t
s -> C2, C2 -> C3, C3 -> C5, C5 -> t

1 , 2, - ( C3).

, . , s t, . , u u' u''. , u, u', , u, u'' ( , , 1). , u' u'' 1 . - , , , u', u' u'' , u' u''.

+1

. . , . .

:

: , , 2 p, q, p q, q p

(u, v), c(u,v)=1

, >= 2, .

+1

, , .

, (V,E) ( ). 1 ( ). , , ( " ", ).

: ? , .

0

Wikipedia

, (t) , , " ", , , , , , , .

, - 1. ? . , 9 :

1 2 3
4 5 6
7 8 9

- 1 - 5. , , . 4, 7, 8, .

, 1, 2, 4 5. 5, 6, 8 9. , , , 1, . , 2. s t. s 1, 2, 4 5, 5, 6, 8, 9 t. , , .. 1 2, 4, 5, 2, 4, 5 1 .

, - node, , node. , , , , 1. , " ". 2 , .

, , . 5 s t, 4, 8 a 8 t, :

 s
4 5
 a t
  8

:

s->4in (capacity 2)
s->5in (capacity 2)
4in->4out (capacity 1) // limiter
5in->5out (capacity 1) // limiter
8in->8out (capacity 1) // limiter
4out->s (capacity 2)
4out->a (capacity 2)
5out->s (capacity 2)
5out->a (capacity 2)
5out->t (capacity 2)
8out->a (capacity 2)
8out->t (capacity 2)
a->4in (capacity 2)
a->5in (capacity 2)
a->8in (capacity 2)

s- > 5in- > 5out- > t

s- > 4in- > 4out- > a- > 8in- > 8out- > t

0

, .

http://www.repond.ch/ressources/cse/algorithme/week10/exercise7-sol.pdf?PHPSESSID=col0hua0ehpk57givsva99mco4

" G (V, E) : V , E . , , u, v V , u v . , 1. , , s, - , . : (u, v) , - , u v. , , f (u, v) = 1 . , c (u, v) = 1, , . , . , , , () () 2. , G s to t , which has a value of at least 2, then both children can go to school. Otherwise, it will be impossible. "

-3
source

All Articles