2月17日是什么星座| au999是什么金| 眼睛为什么会痛| 2010年属什么生肖| 下巴有痣代表什么| 球蛋白偏高是什么意思| 乳房旁边疼是什么原因| 老是放屁是什么原因| 经常梦遗是什么原因| 狄仁杰为什么才三品| 经常放屁是什么原因| 什么是黄体期| 十二生肖它第一是什么生肖| 源源不断是什么意思| 什么叫丁克| 35是什么意思| 什么的窗户| 第一次见家长送什么礼物好| 0.5是什么意思| 耳声发射检查是什么| 胎记是什么| 伏地魔是什么意思| 胱抑素c高是什么原因| 空调什么牌子最好| 攻读学位填什么| 氯喹是什么药| 遗精频繁是什么原因| 今天股市为什么大跌| 一什么杯子| 胃一阵一阵绞痛是什么原因| 皮下脂肪瘤挂什么科| 什么的羊群| 暂时无法接通是什么意思| 为什么家里会有隐翅虫| 珍珠粉加蜂蜜做面膜有什么作用| 看见双彩虹有什么征兆| 偏光镜是什么意思| 后背发凉是什么原因| 咽喉充血是什么原因| 尿路感染是什么原因造成的| 神经性梅毒有什么症状| 吗丁啉有什么功效| 内分泌失调看什么科| 柳下惠姓什么| 猪和什么生肖最配| 被强奸是什么感觉| 手指甲紫色是什么原因| 粿条是什么做的| 双排是什么意思| 印堂发黑是什么原因| 打车用什么软件| 1991年是什么年| 吃什么对肝脏有好处能养肝| 画作是什么意思| 陀飞轮是什么意思| 金目念什么| alyx是什么牌子| 温州冬至吃什么| au750是什么意思| 佛是什么意思| 双甘油脂肪酸酯是什么| 对唔嗨住什么意思| 江团鱼是什么鱼| 抽血抽不出来是什么原因| 肠胃属于什么科| 喉咙肿大是什么原因| 正方形纸能折什么| 腺肌症是什么意思| 吃什么水果对心脏有好处| 驿站是什么意思| 什么食物蛋白质含量高| 精神什么满| 什么是穿刺手术| u盘什么牌子好| 大姨妈不来是什么原因| 气血是什么意思| 什么是不饱和脂肪酸| 清明节吃什么| 附件囊肿吃什么药可以消除| 甲状旁腺分泌什么激素| 利涉大川是什么意思| 爱出汗是什么原因女人| 翻版是什么意思| 龙飞凤舞是什么意思| 头晕在医院挂什么科| 结肠ca是什么意思| 鸡蛋炒什么菜好吃| 为什么叫买东西不叫买南北| 打猎是什么意思| 什么东西解酒最好最快| 带状疱疹一般长在什么地方| 高血压喝什么茶| 相忘于江湖是什么意思| 高血压吃什么食物最好| 看破红尘下一句是什么| 海参什么人不能吃| iu是什么单位| grp是什么意思| 6月24日什么星座| 什么品牌蓝牙耳机好| 咽喉炎吃什么药好| 慢性活动性胃炎是什么意思| 为什么会基因突变| 降压药什么时候吃好| 肌酸激酶偏低是什么原因| 水代表什么生肖| 姜水什么时候喝最好| 工资5k是什么意思| 背靠背是什么牌子| mas是什么意思| 折耳猫是什么意思| 什么颜色可以调成紫色| 白蚁吃什么| 成都人民公园有什么好玩的| 标王是什么意思| 泌尿感染是什么症状| 邋遢是什么意思| 为什么突然就得肝炎了| 人头马是什么酒| 为什么脸一边大一边小| 血管瘤长什么样子图片| 抽烟打嗝是什么情况| 81什么节| 肚子疼喝什么能缓解| 什么菜好吃| 18度穿什么衣服合适| 吃什么增加卵泡| 感冒喝什么水好得快| 傧相是什么意思| 干疮是什么样子的图片| 人生格言是什么意思| 看痘痘挂什么科| 入睡困难是什么原因引起的| 脂浊是什么意思| 什么叫传统文化| 尿检肌酐高是什么原因| 眼睛胀是什么原因| 建字五行属什么| 腱鞘炎吃什么药好| 薷是什么意思| 小孩突然抽搐失去意识是什么原因| 五光十色是什么意思| 为什么会口臭的原因| 睡觉口干是什么原因| 女生胸部什么时候停止发育| 晚上睡不着白天睡不醒是什么原因| 波罗蜜多什么意思| 什么样的贝壳| 益气固表是什么意思| 爱戴是什么意思| 蛀牙是什么原因引起的| 溥仪姓什么| 一日三餐是什么意思| suv什么意思| 身上有异味是什么原因| 梦到明星是什么意思| 珍珠是什么做的| 花生什么时候收| 正师级是什么军衔| 中性是什么意思| 为什么身上一热就痒| 毛发旺盛女生什么原因引起的| 静脉曲张挂什么科室| guess是什么品牌| 瞎子吃核桃砸了手是什么生肖| 九眼天珠是什么做的| 吃海鲜喝什么酒| 逆流而上是什么意思| 什么是神话故事| 友五行属什么| 什么东东| 大象喜欢吃什么食物| 单方精油和复方精油有什么区别| 决明子配什么喝最减肥| d代表什么| 眼睛干涩用什么药效果好| 学的偏旁部首是什么| 乙肝核心抗体偏高是什么意思| vane是什么意思| 口爆什么意思| 异常是什么意思| 下发是什么意思| 戒手淫有什么好处| 变性乙醇是什么东西| 白天尿少晚上尿多什么原因| 吃什么能瘦肚子| 2039年是什么年| 什么是感统失调| 曹操字什么| 乳糖不耐受是什么症状| 大佐是什么军衔| 拍胸片挂什么科室| 鸡蛋和什么搭配最营养| 刮痧板什么材质的好| 下鼻甲肥大是什么意思| 梦见跟妈妈吵架是什么意思| 所见的意思是什么| 爱睡觉是什么原因| 打狂犬疫苗不能吃什么食物| 男人少一个睾丸有什么影响| 叛变是什么意思| 承情是什么意思| 围绝经期是什么意思| 喉镜能检查出什么病| 稽留热常见于什么病| 正品行货是什么意思| 来月经是黑色的是什么原因| 蛇蝎心肠是什么生肖| 伽利略是什么学家| 清华大学前身叫什么| 费率是什么| 什么鱼最大| 周易和易经有什么区别| 七月二十五是什么星座| 肾不好挂什么科| 吃什么对肺部好| plus是什么意思| hrd是什么职位| 多吃西红柿有什么好处| 健身hit什么意思| 钢琴8级什么水平| 蹂躏是什么意思| 6月4号是什么星座| 阑尾炎属于什么科室| 什么林什么染| 大殓是什么意思| 什么是职业病| 夏天吃什么蔬菜| 环状肉芽肿是什么皮肤病| 脱水有什么症状| 下雨天适合穿什么衣服| 犒劳是什么意思| 1961年属什么| 手上脱皮是什么原因| 右肩膀痛是什么原因| 阳痿吃什么药效果好| 什么是心律不齐| 4月20日什么星座| 耳声发射检查是什么| 香港代表什么生肖| 梦见死人笑什么预兆| 石见念什么| 铄字五行属什么| 6月3日是什么星座| 净高是什么意思| 过期红酒有什么用途| 九死一生是指什么生肖| 生理反应是什么意思| 没必要什么意思| 审阅是什么意思| 子午相冲是什么意思| 卷柏是什么植物| 肺结核早期有什么症状| 洋葱炒什么| 什么日什么里| 人老放屁是什么原因| 保释是什么意思| 囊性包块是什么| 靶向药有什么副作用| 芙蓉花又叫什么花| 小美女是什么意思| 小腿浮肿是什么原因| 长痘痘涂什么药膏| 男人趴着睡觉说明什么| 百度

加油干2017|鸣凤山公园下半年开建 总投资超七千万

百度   《谈判官》由刘一志执导,费慧君、李晓亮编剧,杨幂、黄子韬主演,讲述了高级谈判官童薇与美国一个华人世家继承人谢晓飞因缘相识相爱的故事,于2018年2月4日首播。

The assignment problem is a fundamental combinatorial optimization problem. In its most general form, the problem is as follows:

Worked example of assigning tasks to an unequal number of workers using the Hungarian method
The problem instance has a number of agents and a number of tasks. Any agent can be assigned to perform any task, incurring some cost that may vary depending on the agent-task assignment. It is required to perform as many tasks as possible by assigning at most one agent to each task and at most one task to each agent, in such a way that the total cost of the assignment is minimized.

Alternatively, describing the problem using graph theory:

The assignment problem consists of finding, in a weighted bipartite graph, a matching of maximum size, in which the sum of weights of the edges is minimum.

If the numbers of agents and tasks are equal, then the problem is called balanced assignment, and the graph-theoretic version is called minimum-cost perfect matching. Otherwise, it is called unbalanced assignment.[1]

If the total cost of the assignment for all tasks is equal to the sum of the costs for each agent (or the sum of the costs for each task, which is the same thing in this case), then the problem is called linear assignment. Commonly, when speaking of the assignment problem without any additional qualification, then the linear balanced assignment problem is meant.

Examples

edit

Suppose that a taxi firm has three taxis (the agents) available, and three customers (the tasks) wishing to be picked up as soon as possible. The firm prides itself on speedy pickups, so for each taxi the "cost" of picking up a particular customer will depend on the time taken for the taxi to reach the pickup point. This is a balanced assignment problem. Its solution is whichever combination of taxis and customers results in the least total cost.

Now, suppose that there are four taxis available, but still only three customers. This is an unbalanced assignment problem. One way to solve it is to invent a fourth dummy task, perhaps called "sitting still doing nothing", with a cost of 0 for the taxi assigned to it. This reduces the problem to a balanced assignment problem, which can then be solved in the usual way and still give the best solution to the problem.

Similar adjustments can be done in order to allow more tasks than agents, tasks to which multiple agents must be assigned (for instance, a group of more customers than will fit in one taxi), or maximizing profit rather than minimizing cost.

Formal definition

edit

The formal definition of the assignment problem (or linear assignment problem) is

Given two sets, A and T, together with a weight function C : A × TR. Find a bijection f : AT such that the cost function:
 
is minimized.

Usually the weight function is viewed as a square real-valued matrix C, so that the cost function is written down as:

 

The problem is "linear" because the cost function to be optimized as well as all the constraints contain only linear terms.

Algorithms

edit

A naive solution for the assignment problem is to check all the assignments and calculate the cost of each one. This may be very inefficient since, with n agents and n tasks, there are n! (factorial of n) different assignments.

Another naive solution is to greedily assign the pair with the smallest cost first, and remove the vertices; then, among the remaining vertices, assign the pair with the smallest cost; and so on. This algorithm may yield a non-optimal solution. For example, suppose there are two tasks and two agents with costs as follows:

  • Alice: Task 1 = 1, Task 2 = 2.
  • George: Task 1 = 5, Task 2 = 8.

The greedy algorithm would assign Task 1 to Alice and Task 2 to George, for a total cost of 9; but the reverse assignment has a total cost of 7.

Fortunately, there are many algorithms for finding the optimal assignment in time polynomial in n. The assignment problem is a special case of the transportation problem, which is a special case of the minimum cost flow problem, which in turn is a special case of a linear program. While it is possible to solve any of these problems using the simplex algorithm, or in worst-case polynomial time using the ellipsoid method, each specialization has a smaller solution space and thus more efficient algorithms designed to take advantage of its special structure.

Balanced assignment

edit

In the balanced assignment problem, both parts of the bipartite graph have the same number of vertices, denoted by n.

One of the first polynomial-time algorithms for balanced assignment was the Hungarian algorithm. It is a global algorithm – it is based on improving a matching along augmenting paths (alternating paths between unmatched vertices). Its run-time complexity, when using Fibonacci heaps, is  ,[2] where m is a number of edges. This is currently the fastest run-time of a strongly polynomial algorithm for this problem. Some variants of the Hungarian algorithm also benefit from parallel computing, including GPU acceleration.[3] If all weights are integers, then the run-time can be improved to  , but the resulting algorithm is only weakly-polynomial.[4] If the weights are integers, and all weights are at most C (where C>1 is some integer), then the problem can be solved in   weakly-polynomial time in a method called weight scaling.[5][6][7]

In addition to the global methods, there are local methods which are based on finding local updates (rather than full augmenting paths). These methods have worse asymptotic runtime guarantees, but they often work better in practice. These algorithms are called auction algorithms, push-relabel algorithms, or preflow-push algorithms. Some of these algorithms were shown to be equivalent.[8]

Some of the local methods assume that the graph admits a perfect matching; if this is not the case, then some of these methods might run forever.[1]:?3? A simple technical way to solve this problem is to extend the input graph to a complete bipartite graph, by adding artificial edges with very large weights. These weights should exceed the weights of all existing matchings, to prevent appearance of artificial edges in the possible solution.

As shown by Mulmuley, Vazirani and Vazirani,[9] the problem of minimum weight perfect matching is converted to finding minors in the adjacency matrix of a graph. Using the isolation lemma, a minimum weight perfect matching in a graph can be found with probability at least 1?2. For a graph with n vertices, it requires   time.

Unbalanced assignment

edit

In the unbalanced assignment problem, the larger part of the bipartite graph has n vertices and the smaller part has r<n vertices. There is also a constant s which is at most the cardinality of a maximum matching in the graph. The goal is to find a minimum-cost matching of size exactly s. The most common case is the case in which the graph admits a one-sided-perfect matching (i.e., a matching of size r), and s=r.

Unbalanced assignment can be reduced to a balanced assignment. The naive reduction is to add   new vertices to the smaller part and connect them to the larger part using edges of cost 0. However, this requires   new edges. A more efficient reduction is called the doubling technique. Here, a new graph G' is built from two copies of the original graph G: a forward copy Gf and a backward copy Gb. The backward copy is "flipped", so that, in each side of G', there are now n+r vertices. Between the copies, we need to add two kinds of linking edges:[1]:?4–6?

  • Large-to-large: from each vertex in the larger part of Gf, add a zero-cost edge to the corresponding vertex in Gb.
  • Small-to-small: if the original graph does not have a one-sided-perfect matching, then from each vertex in the smaller part of Gf, add a very-high-cost edge to the corresponding vertex in Gb.

All in all, at most   new edges are required. The resulting graph always has a perfect matching of size  . A minimum-cost perfect matching in this graph must consist of minimum-cost maximum-cardinality matchings in Gf and Gb. The main problem with this doubling technique is that there is no speed gain when  .

Instead of using reduction, the unbalanced assignment problem can be solved by directly generalizing existing algorithms for balanced assignment. The Hungarian algorithm can be generalized to solve the problem in   strongly-polynomial time. In particular, if s=r then the runtime is  . If the weights are integers, then Thorup's method can be used to get a runtime of  .[1]:?6?

Solution by linear programming

edit

The assignment problem can be solved by presenting it as a linear program. For convenience we will present the maximization problem. Each edge (i,j), where i is in A and j is in T, has a weight  . For each edge ? ? we have a variable  . The variable is 1 if the edge is contained in the matching and 0 otherwise, so we set the domain constraints:    

The total weight of the matching is:  . The goal is to find a maximum-weight perfect matching.

To guarantee that the variables indeed represent a perfect matching, we add constraints saying that each vertex is adjacent to exactly one edge in the matching, i.e.,  .

All in all we have the following LP:

    This is an integer linear program. However, we can solve it without the integrality constraints (i.e., drop the last constraint), using standard methods for solving continuous linear programs. While this formulation allows also fractional variable values, in this special case, the LP always has an optimal solution where the variables take integer values. This is because the constraint matrix of the fractional LP is totally unimodular – it satisfies the four conditions of Hoffman and Gale.

Other methods and approximation algorithms

edit

Other approaches for the assignment problem exist and are reviewed by Duan and Pettie[10] (see Table II). Their work proposes an approximation algorithm for the assignment problem (and the more general maximum weight matching problem), which runs in linear time for any fixed error bound.

Many-to-many assignment

edit

In the basic assignment problem, each agent is assigned to at most one task and each task is assigned to at most one agent. In the many-to-many assignment problem,[11] each agent i may take up to ci tasks (ci is called the agent's capacity), and each task j may be taken by up to dj agents simultaneously (dj is called the task's capacity). If the sums of capacities in both sides are equal ( ), then the problem is balanced, and the goal is to find a perfect matching (assign exactly ci tasks to each agent i and exactly dj agents to each task j) such that the total cost is as small as possible.

The problem can be solved by reduction to the minimum cost network flow problem.[12] Construct a flow network with the following layers:

  • Layer 1: One source-node s.
  • Layer 2: a node for each agent. There is an arc from s to each agent i, with cost 0 and capacity ci .
  • Level 3: a node for each task. There is an arc from each agent i to each task j, with the corresponding cost, and capacity 1.
  • Level 4: One sink-node t. There is an arc from each task to t, with cost 0 and capacity dj.

An integral maximum flow of minimum cost can be found in polynomial time; see network flow problem. Every integral maximum flow in this network corresponds to a matching in which at most ci tasks are assigned to each agent i and at most dj agents are assigned to each task j (in the balanced case, exactly ci tasks are assigned to i and exactly dj agents are assigned to j). A min-cost maximum flow corresponds to a min-cost assignment.

Generalization

edit

When phrased as a graph theory problem, the assignment problem can be extended from bipartite graphs to arbitrary graphs. The corresponding problem, of finding a matching in a weighted graph where the sum of weights is maximized, is called the maximum weight matching problem.

Another generalization of the assignment problem is extending the number of sets to be matched from two to many. So that rather than matching agents to tasks, the problem is extended to matching agents to tasks to time intervals to locations. This results in Multidimensional assignment problem (MAP).

See also

edit

References and further reading

edit
  1. ^ a b c d Lyle Ramshaw, Robert E. Tarjan (2012). "On minimum-cost assignments in unbalanced bipartite graphs" (PDF). HP research labs.
  2. ^ Fredman, Michael L.; Tarjan, Robert Endre (2025-08-05). "Fibonacci Heaps and Their Uses in Improved Network Optimization Algorithms". J. ACM. 34 (3): 596–615. doi:10.1145/28869.28874. ISSN 0004-5411. S2CID 7904683.
  3. ^ Kawtikwar, Samiran; Nagi, Rakesh (2025-08-05). "HyLAC: Hybrid linear assignment solver in CUDA". Journal of Parallel and Distributed Computing. 187: 104838. doi:10.1016/j.jpdc.2024.104838. ISSN 0743-7315.
  4. ^ Thorup, Mikkel (2025-08-05). "Integer priority queues with decrease key in constant time and the single source shortest paths problem". Journal of Computer and System Sciences. Special Issue on STOC 2003. 69 (3): 330–353. doi:10.1016/j.jcss.2004.04.003. ISSN 0022-0000.
  5. ^ Gabow, H.; Tarjan, R. (2025-08-05). "Faster Scaling Algorithms for Network Problems". SIAM Journal on Computing. 18 (5): 1013–1036. doi:10.1137/0218069. ISSN 0097-5397.
  6. ^ Goldberg, A.; Kennedy, R. (2025-08-05). "Global Price Updates Help". SIAM Journal on Discrete Mathematics. 10 (4): 551–572. doi:10.1137/S0895480194281185. ISSN 0895-4801.
  7. ^ Orlin, James B.; Ahuja, Ravindra K. (2025-08-05). "New scaling algorithms for the assignment and minimum mean cycle problems". Mathematical Programming. 54 (1–3): 41–56. doi:10.1007/BF01586040. ISSN 0025-5610. S2CID 18213947.
  8. ^ Alfaro, Carlos A.; Perez, Sergio L.; Valencia, Carlos E.; Vargas, Marcos C. (2025-08-05). "The assignment problem revisited". Optimization Letters. 16 (5): 1531–1548. doi:10.1007/s11590-021-01791-4. ISSN 1862-4480. S2CID 238644205.
  9. ^ Mulmuley, Ketan; Vazirani, Umesh; Vazirani, Vijay (1987). "Matching is as easy as matrix inversion". Combinatorica. 7 (1): 105–113. doi:10.1007/BF02579206. S2CID 47370049.
  10. ^ Duan, Ran; Pettie, Seth (2025-08-05). "Linear-Time Approximation for Maximum Weight Matching". Journal of the ACM. 61: 1–23. doi:10.1145/2529989. S2CID 207208641.
  11. ^ Zhu, Haibin; Liu, Dongning; Zhang, Siqin; Zhu, Yu; Teng, Luyao; Teng, Shaohua (2025-08-05). "Solving the Many to Many assignment problem by improving the Kuhn–Munkres algorithm with backtracking". Theoretical Computer Science. 618: 30–41. doi:10.1016/j.tcs.2016.01.002. ISSN 0304-3975.
  12. ^ D.W. "High-multiplicity maximum-weight matching". Computer Science Stack Exchange. Retrieved 2025-08-05.
刺猬和豪猪有什么区别 房性心律是什么意思 蜈蚣代表什么生肖 手麻脚麻吃什么药 爷们儿大结局是什么
12月22号是什么星座 分别心是什么意思 眼睛粘糊是什么原因 抑郁挂什么科 怀孕有什么感觉
2h是什么意思 炒菜用什么锅最好 肝什么相照 身上起红疙瘩是什么 88年属什么
螨虫长什么样 五楼五行属什么 欠钱不还被起诉会有什么后果 特约演员什么意思 喉咙痛吃什么水果
什么是规培hcv9jop7ns1r.cn 头热手脚冰凉什么原因hcv9jop5ns2r.cn 血糖高吃什么主食最好hcv8jop2ns0r.cn 低钾血症挂什么科hcv8jop4ns9r.cn 头出汗是什么原因hcv8jop4ns3r.cn
穷书生是什么生肖hcv9jop2ns9r.cn 失眠去药店买什么药creativexi.com bbc是什么意思hcv8jop1ns1r.cn 女生怀孕的前兆是什么hcv8jop8ns0r.cn 面瘫是什么原因造成的hcv9jop3ns7r.cn
孕晚期羊水多了对宝宝有什么影响hcv9jop6ns6r.cn 百里挑一是什么生肖hcv8jop9ns9r.cn 骨折和骨裂有什么区别xinmaowt.com 小孩脚抽筋是什么原因引起的hcv8jop1ns7r.cn 脂肪肝能吃什么水果hcv8jop5ns1r.cn
胳膊上的花是打了什么疫苗hcv8jop1ns2r.cn 林冲代表什么生肖hcv9jop2ns4r.cn 一个尔一个玉念什么hcv9jop3ns1r.cn 迪丽热巴的全名叫什么hcv8jop6ns1r.cn 为什么叫985大学hcv9jop7ns4r.cn
百度