# 演算法 ### 1.Branch-and-Bound Strategy 利用貪婪演算法找出Lower bound 只要路徑消耗大於L.B,不會繼續往下做 ![](https://i.imgur.com/6yHRy80.png) --- ### 2.Personnel Assignment Problem *分配工作問題* P={P1, P2, …, Pn} where P1<P2<…<Pn J={J1, J2, …, Jn} 1. A partial ordering of jobs ![](https://i.imgur.com/WlKQ0nL.png) After topological sorting, one of the following topologically sorted sequences ![](https://i.imgur.com/AkgGFLZ.png) ![](https://i.imgur.com/TNwrCU2.png) 2.Cost matrix ![](https://i.imgur.com/5eMIdVc.png) 利用greedy ![](https://i.imgur.com/sfv7Btw.png) 發現利用greedy仍需做到最一層 利用Reduced Cost Matrix可以改善 3. Reduced Cost Matrix 先使每一個row跟column都至少有一個0 其所被扣掉的總合為其Lower bound ![](https://i.imgur.com/23AAVLz.png) 4.利用Lower bound開始做貪婪演算法 ![](https://i.imgur.com/owCUaFq.png) 相較於直接利用greedy,先經過Reduced Cost Matrix之後會減少做的事。