2020-1ν•™κΈ°, λŒ€ν•™μ—μ„œ β€˜μ•Œκ³ λ¦¬μ¦˜β€™ μˆ˜μ—…μ„ λ“£κ³  κ³΅λΆ€ν•œ λ°”λ₯Ό μ •λ¦¬ν•œ κΈ€μž…λ‹ˆλ‹€. 지적은 μ–Έμ œλ‚˜ ν™˜μ˜μž…λ‹ˆλ‹€ :)

3 minute read

2020-1ν•™κΈ°, λŒ€ν•™μ—μ„œ β€˜μ•Œκ³ λ¦¬μ¦˜β€™ μˆ˜μ—…μ„ λ“£κ³  κ³΅λΆ€ν•œ λ°”λ₯Ό μ •λ¦¬ν•œ κΈ€μž…λ‹ˆλ‹€. 지적은 μ–Έμ œλ‚˜ ν™˜μ˜μž…λ‹ˆλ‹€ :)

이번 ν¬μŠ€νŠΈλŠ” Network Flow 포슀트의 후속 ν¬μŠ€νŠΈμž…λ‹ˆλ‹€. Network Flow 문제의 핡심이 λ˜λŠ” 정리인 <Max-Flow Min-Cut Theorem>에 λŒ€ν•΄ κΆκΈˆν•˜λ‹€λ©΄ 이전 포슀트λ₯Ό μ°Έκ³ ν•΄μ£Όμ„Έμš”! πŸ˜‰

이번 포슀트의 μ½”λ“œλŠ” λ°±μ€€ 1298번: μ—΄ν˜ˆκ°•ν˜Έ 문제λ₯Ό κΈ°μ€€μœΌλ‘œ μž‘μ„±λ˜μ—ˆμŠ΅λ‹ˆλ‹€ πŸ‘¨β€πŸ’»


Introduction to Bipartite Matching

<Bipartite Matching; 이뢄 맀칭>은 μ§μ›μ˜ 집합 $P$와 μž‘μ—…μ˜ 집합 $J$, 그리고 각 μ§μ›λ“€μ˜ μž‘μ—…μ— λŒ€ν•œ μ„ ν˜Έκ°€ μ£Όμ–΄μ‘Œμ„ λ•Œ (직원, μž‘μ—…)의 맀칭의 수λ₯Ό μ΅œλŒ€ν•œμœΌλ‘œ λ§Œλ“œλŠ” 쑰합을 λ„μΆœν•˜λŠ” λ¬Έμ œμ΄λ‹€.

μ΄λ•Œ, 맀칭을 생성할 λ•ŒλŠ” 각 μ‚¬λžŒμ€ μ΅œλŒ€ ν•˜λ‚˜μ˜ μž‘μ—…μ— 할당될 수 있고, ν•˜λ‚˜μ˜ μž‘μ—…μ€ μ΅œλŒ€ ν•œ μ‚¬λžŒμ—κ²Œλ§Œ ν• λ‹Ή 받을 수 μžˆλ‹€. λŒ€μΆ© ν•œ μ‚¬λžŒμ΄ 2가지 일을 λͺ»ν•˜κ³ , ν•œ μž‘μ—…μ— 2λͺ…이 λͺ» λ“€μ–΄κ°„λ‹€λŠ” 말

(직원, μž‘μ—…)의 맀칭을 μ§„ν–‰ν•˜λ‹€κ°€ 더 이상 맀칭을 진행할 수 μ—†λŠ” μƒνƒœλ₯Ό maximal matching이라고 ν•˜λ©°, λ‹Ήμ—°ν•˜κ²Œλ„ λͺ¨λ“  maximal matching이 maximum matching을 보μž₯ν•˜λŠ” 것은 μ•„λ‹ˆλ‹€!


Reduction to NF Problem

μš°λ¦¬λŠ” <Bipartitie Matching> 문제λ₯Ό μ•„λž˜μ™€ 같이 <reduction; ν™˜μ›>μ‹œμΌœ ν•΄κ²°ν•  수 μžˆλ‹€.

Reduction to NF

  1. Replace each edge to a directed edge from a person to a job of capacity 1.
  2. Add a special node $s$ and connect $s$ to every node in People by directed edge of capacity 1.
  3. Add a special node $t$ and connect every node in Jobs to $t$ by directed edge of capacity 1.

μœ„μ™€ 같이 <Bipartite Matching>을 <Network Flow> 문제둜 ν™˜μ›ν•˜λ©΄, μš°λ¦¬λŠ” reduction μœ„μ—μ„œμ˜ maximum flowκ°€ μ•„λž˜μ˜ κ²°κ³Όλ₯Ό 뱉을 것이라고 κΈ°λŒ€ν•  수 μžˆλ‹€.

all capacities are 1, so an edge is used(= flow 1) or not.

그리고 reduction된 NF λ¬Έμ œμ—μ„œ μ–»λŠ” maximum total flowκ°€ maximum matching을 μœ λ„ν•œλ‹€λŠ” 것을 κ°„λ‹¨ν•˜κ²Œ 증λͺ…ν•΄λ³΄μž!

Let $M$ be the set of edges used in the maximum flow of value $k$. Then $M$ is a matching because there is at most on edge in $M$ leaving a one person and entering a one job. (λ°”λ‘œ μœ„μ—μ„œ μ–ΈκΈ‰ν•œ μ„±μ§ˆ λ•Œλ¬Έ!) Moreover, $M$ consists of $k$ matching edges!

(κ·€λ₯˜λ²•) If there is a matching consisting of more than $k$ matching edges, then there must be a flow of value larger than $k$. That is a contraction!


κ΅¬ν˜„

사싀 κ΅¬ν˜„μ€ μ•žμ„  ν¬μŠ€νŠΈμ—μ„œ μ‚΄νŽ΄λ³Έ <Ford-Fulkerson Algorithm>으둜 reduction을 잘 κ΅¬ν˜„ν•˜λ©΄ λœλ‹€. λ³„λ‘œ 어렡지 μ•Šλ‹€ γ…Žγ…Ž

πŸ‘‰ Ford-Fulkerson & Edmons-Karp Algorithm

ν•¨κ»˜λ³΄κΈ°

Categories:

Updated: