Atama ve eşleme (eşleştirme) problemleri (Matching and Assignment problems)

Slides:



Advertisements
Benzer bir sunumlar
VOTED THE BEST OF THIS YEAR
Advertisements

Do you know who I am? Kim olduğumu biliyor musun?.
Gerekli olduğunda insanlara ulaşın Yer Uzantıları Reach prospective customers at important moment with location extensions. Location Extentions.
Alakalı müşterileri hedefleyin. Google ile Yeniden Pazarlama Remarketing with Google. Target customers who are already showing interest in your business.
Google Display Network Targeting options.
RELATIVE CLAUSES YASEMİN TURAN ( B ) ELT 1.
If you delete this after reading... you'll spend a year of ill luck! But... if you send it to (at least) 2 friends... you'll have 3 years of good luck!!!
GRAPHS ÖZET.
Hareket halindeki insanlara ulaşın.Mobil Arama Ağı Reklamları Reach customers with Mobile Search Network.
INQUIRY FROM A B2B SITE Dear Sir/Madam We are writing to enquire about your sunflower oil. Please send us your product specification and price. Best Regards.
NOUN CLAUSES (İSİM CÜMLECİKLERİ).
Kampanyanızı optimize edin. Görüntülü Reklam Kampanyası Optimize Edici'yi Kullanma Display Ads Campaign Optimizer. Let Google technology manage your diplay.
COSTUMES KILIKLAR (KOSTÜMLER)
SERVING WATER TO A THIRSTY PERSON Bu Proje AB Tarafından Finanse edilmektedir. This Project is funded by European Union. Responsibility for the information.
Veri Yapıları ve Algoritmalar
BM-305 Mikrodenetleyiciler Güz 2015 (6. Sunu) (Yrd. Doç. Dr. Deniz Dal)
Database for APED Büşra Bilgili | Emirhan Aydoğan | Meryem Şentürk | M. Arda Aydın COMPE 341.
 C H I L D B R I D E S.   Marriages in early ages are seen all over the world.  Marriages under 18 are accepted as «child» marriages.
AVL Trees / Slide 1 Silme * Anahtar hedefi silmek için, x yaprağında buluruz ve sonra sileriz. * Dikkat edilmesi gereken iki durum vardır. (1) Hedef bazi.
S ÜLEYMAN Ş AH ÜN İ VERS İ TES İ DERS KAYIT İŞ LEMLER İ / COURSE REGISTRATION PROCESS.
21/02/2016 A Place In My Heart Nana Mouskouri « Istanbul « (A Different Adaptation)
RELIGIOUS TRADITIONS BAGS TO DO IN YOUR CITY T.C. Ünye Kaymakamlığı ANAFARTA ORTAOKULU.
Environmental pollution Traffic Infrastructural problems Unconscious employee Urbanization and industrialization Lack of financial sources.
There was a man who was thinking of building an honourable structure that could last for milleniums and show the king’s power. So, he racked his brain.
TEOG SINAVINA BU KELİMELERİ BİLMEDEN GİRMEYİN UNIT 6.
Superstatious. Two people should never wash their hands together in the same water - this will lead to a quarrel between them. (İki insan aynı suda ellerini.
Doğrusal Programlama Linear Programming
MUSIC FOR COMENIUS BROTHER HOOD NEVER ENDS BROTHERHOOD NEVER ENDS…. *We are not going to give up yet *It's time for us to make our move *We fed up with.
Ben İstanbul'um I'm Istanbul Poem : Nilufer DURSUN Translated by : Can AKIN.
SIK kullanılan CÜMLELER
Türkçe İngilizce Mistik Şiirler Turkish English Mystical Poems Müzikli slâyt Slideshow with music Sevmeyi Dene Try To Love Written By: Can Akın Translated.
Nasa programs for students.
LITERARY TRANSLATION 2 Week 5. In-class translation workshop.
Searching Thy Lover, To Be One Looking at the sky.. Behind every cloud and over the wings of the birds.. I always dreamt of you. You were looking for.
Practice your writing skills
Students social life and join the social clubs. BARIŞ KILIÇ - EGE DÖVENCİ IŞIK ÜNİVERSİTESİ
Doğrusal programlama:İkililik teorisi (Duality theory)
COUNTABLE AND UNCOUNTABLE NOUNS
Ağırlıksız ikili eşleştirme
ADA BİYOCOĞRAFYASI.
Self-Registration on the Coats Supplier Portal
Maksimum akış.
Çizge gösterimleri G = (V, E) çizgesinin komşuluk listesi gösterimi
İmg 8 spiritüel keşifler
BİLİMSEL ÇALIŞMA BASAMAKLARI SCIENTIFIC WORKING STEPS MHD BASHAR ALREFAEI Y
Algoritmalar II Ders 17 İteratif İyileştirme Yöntemi.
20 SAYING FROM OUR COUNTRY TURKEY
Ac POWER ANALYSIS Part III..
Ağırlıksız ikili eşleştirme
Would you like a different color?
If you delete this after reading... you'll spend a year of ill luck!
Future: I will/shall & I am going to. Structure: Subject+will/shall+verb(base form)+object.
tomorrow soon next week / year in five minutes/ in two hours later today I'll go to the market tomorrow. Don’t worry. He will be here soon. There.
CONDITIONALS TYPE
Döngüler ve Shift Register
NİŞANTAŞI ÜNİVERSİTESİ
NİŞANTAŞI ÜNİVERSİTESİ
Relations between angles and sides.. Examples and meaning Larger angles longer side If two angles in a tringle have unequal measures then the sides opposite.
“Differentiation for making a positive Difference!!!!”
Multipoint programlama
NİŞANTAŞI ÜNİVERSİTESİ
Before the Battle of Çanakkale. Why a Front in Çanakkale was Opened? In the summer of 1914, the war continued in Europe with all its intensity, and by.
Feminism, unlike the idea of ​​ mankind, is a trend that is prioritized to bring gender inequality to the agenda. The notion of feminism, which is not.
Chapter 5 – Balancing of accounts
Imagine that you are a teacher and you are taking your 20 students to England for the summer school.
THE MYSTERIOUS ISLAND JULES VERNE. INFORMATION ABOUT THE BOOK  Name of the book: The Mysterious Island  Author: Jules Verne  Type: Adventure  Number.
CONDITIONALS TYPE
“8. SINIFLAR” MASTERMIND UNIT 4 On the phone Wopenglish GURURLA SUNAR…
ELİF SU KÜÇÜKKAVRUK. plants When you touch this plant, it can be like the photograph. When you let go, it becomes normal.
People with an entrepreneurial mindset are always brave.
Sunum transkripti:

Atama ve eşleme (eşleştirme) problemleri (Matching and Assignment problems)

Hall Teoremi: Sözel olarak: Eğer her bir erkek grubu için onların hoşlandıkları kızlar grubu daha genişse, her bir erkek isteğine göre kız bulabilir

a x b e c z y w d

Sözel olarak: Eğer her bir erkek yeterince istekli ise (k´dan fazla kızla ilgileniyorsa) ve hiç bir kız özel ilgi görmüyorsa (k´dan fazla ilgi görmüyorsa), her bir erkek isteğine göre kız bulabilir.

Ör. :. 50 öğrenciden oluşan bir sınıfta 25 erkek ve 25 kız vardır Ör.: 50 öğrenciden oluşan bir sınıfta 25 erkek ve 25 kız vardır. Her erkek =5 kızdan hoşlanıyor. Her kız için ondan hoşlanan =5 erkek vardır. Bir okul partisine her erkek hoşlandığı bir kız ile katılabilir mi?

Ör. :. 45 öğrenciden oluşan bir sınıfta 20 erkek ve 25 kız vardır Ör.: 45 öğrenciden oluşan bir sınıfta 20 erkek ve 25 kız vardır. Her erkek =5 kızdan hoşlanıyor. Her kız için ondan hoşlanan =4 erkek vardır. Bir okul partisine her erkek hoşlandığı bir kız ile katılabilir mi?

Unweighted Bipartite Matching

Definitions Matching Free Vertex

Definitions Maximum Matching: matching with the largest number of edges

Definition Note that maximum matching is not unique.

Intuition Let the top set of vertices be men Let the bottom set of vertices be women Suppose each edge represents a pair of man and woman who like each other Maximum matching tries to maximize the number of couples!

Applications Matching has many applications. This lecture lets you know how to find maximum matching.

Alternating Path Alternating between matching and non-matching edges. f g h i j d-h-e: alternating path a-f-b-h-d-i: alternating path starts and ends with free vertices f-b-h-e: not alternating path e-j: alternating path starts and ends with free vertices

Idea  “Flip” augmenting path to get better matching Note: After flipping, the number of matched edges will increase by 1! 

Idea of Algorithm Start with an arbitrary matching While we still can find an augmenting path Find the augmenting path P Flip the edges in P

Breadth-First Search Algorithm for Augmented Path Use Breadth-First Search: LEVEL(0) = some unmatched vertex r for odd L > 0, LEVEL(L) = {u|{v,u}  E – M when v  LEVEL(L -1) and when u in no lower level} For even L > 0, LEVEL(L) = {u|{v,u}  M and u in no lower level} Assume G is bipartite graph with matching M.

Labelling Algorithm Start with arbitrary matching

Labelling Algorithm Pick a free vertex in the bottom

Labelling Algorithm Run BFS

Labelling Algorithm Alternate unmatched/matched edges

Labelling Algorithm Until a augmenting path is found

Augmenting Tree

Flip!

Repeat Pick another free vertex in the bottom

Repeat Run BFS

Repeat Flip

Answer Since we cannot find any augmenting path, stop!

Overall algorithm Start with an arbitrary matching (e.g., empty matching) Repeat forever For all free vertices in the bottom, do bfs to find augmenting paths If found, then flip the edges If fail to find, stop and report the maximum matching.

Time analysis We can find at most |V| augmenting paths (why?) To find an augmenting path, we use bfs! Time required = O( |V| + |E| ) Total time: O(|V|2 + |V| |E|)

Improvement We can try to find augmenting paths in parallel for all free nodes in every iteration. Using such approach, the time complexity is improved to O(|V|0.5 |E|)

Stable Marriage Problem

Stable Marriage Problem Given N men and N women, each person list in order of preference all the people of the opposite sex who would like to marry. Problem: Engage all the women to all the men in such a way as to respect all their preferences as much as possible.

Stable? A set of marriages is unstable if two people who are not married both prefer each other than their spouses E.g. Suppose we have A1 B3 C2 D4 E5. This is unstable since A prefer 2 more than 1 2 prefer A more than C A B C D E 2 5 1 3 4

Naïve solution Starting from a feasible solution. Check if it is stable. If yes, done! If not, remove an unstable couple. Is this work?

Naïve solution (2) Does not work! E.g. A1 B3 C2 D4 E5 A2 B3 C1 D4 E5

Solution Let X be the first man. X proposes to the best woman in the remaining on his list. (Initially, the first woman on his list!) If α is not engaged Pair up (X, α). Then, set X=next man and goto 1. If α prefers X more than her fiancee Y, Pair up (X, α). Then, set X=Y and goto 1. Goto 1

Example A B C D E 2 1 2 1 5 5 2 3 3 3 1 3 5 2 A B C D E 2 5 1 3 4 4

Time analysis If there are N men and N women, O(N2) time