Source code online books for professionals by professionals



Download 4,67 Mb.
Pdf ko'rish
bet187/266
Sana31.12.2021
Hajmi4,67 Mb.
#213682
1   ...   183   184   185   186   187   188   189   190   ...   266
Bog'liq
2 5296731884800181221

Choosing representatives. Ahuja et al. describe this amusing little problem. In a small town, there are n residents, 
x
1
, …, x
n
. There are also m clubs, c
1
, …, c
m
 and k political parties, p
1
, …, p
k
. Each resident is a member of at least one 
club and can belong to exactly one political party. Each club must nominate one of its members to represent it on the 
town council. There is one catch, though: The number of representatives belonging to party p
i
 can be at most u
i
 . It is 
possible to find such a set of representatives? Again, we reduce to maximum flow. As is often the case, we represent 
the objects of the problem as nodes, and the constraints between them as edges and capacities. In this case, we have 
one node per resident, club, and party, as well as the source s and the sink t.
The units of flow represent the representatives. Thus, we give each club an edge from s, with a capacity of 1, 
representing the single person they can nominate. From each club, we add an edge to each of the people belonging to 
that club, as they form the candidates. (The capacities on these edges doesn’t really matter, as long as it’s at least 1.) Note 
that each person can have multiple in-edges (that is, belong to multiple clubs). Now add an edge from the residents to 
their political parties (one each). These edges, once again, have a capacity of 1 (the person is allowed to represent only 
a single club). Finally, add edges from the parties to t so that the edge from party p
i
 has a capacity of u
i
, limiting the 
number of representatives on the council. Finding a maximum flow will now get us a valid set of nominations.
Of course, this max-flow solution gives only a valid set of nominations, not necessarily the one we want. We can 
assume that the party capacities u
i
 are based on democratic principles (some form of vote); shouldn’t the choice of a 
representative similarly be based on the preferences of the club? Maybe they could hold votes to indicate how much 
they’d like each member to represent them, so the members get scores, say, equal to their percentages of the votes. We 
could then try to maximize the sum of these scores, while still ensuring that the nominations are valid, when viewed 
globally. See where I’m going with this? Exactly: We can extend the problem of Ahuja et al. by adding a cost to the 
edges from clubs to residents (equal to 100 – score, for example), and we solve the min-cost max-flow problem. The 
fact that we’re getting a maximum flow will take care of the validity of the nominations, while the cost minimization 
will give us the best compromise, based on club preferences.

Download 4,67 Mb.

Do'stlaringiz bilan baham:
1   ...   183   184   185   186   187   188   189   190   ...   266




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish