This paper presents two real-world scheduling problems and their algorithmic solutions through polynomial-time reductions. First, we address the Hospital Patient-to-Bed Assignment problem, demonstrating its reduction to Maximum Bipartite Matching and solution via Network Flow algorithms. Second, we tackle the University Course Scheduling problem, proving its NP-Completeness through reduction from Graph Coloring and providing greedy approximation algorithms. Both problems are implemented in Python, with experimental results validating theoretical complexity analyses. Our Network Flow solution achieves O(n2.51) empirical complexity, while the greedy coloring algorithms demonstrate O(n2) behavior with approximation ratios consistently below the theoretical delta + 1 bound.
翻译:本文通过多项式时间归约提出了两个现实世界调度问题及其算法解决方案。首先,我们处理医院患者床位分配问题,展示了其到最大二分图匹配的归约,并通过网络流算法求解。其次,我们解决大学课程调度问题,通过从图着色问题的归约证明其NP完全性,并提供了贪心近似算法。两个问题均在Python中实现,实验结果验证了理论复杂度分析。我们的网络流解决方案实现了O(n^2.51)的经验复杂度,而贪心着色算法则表现出O(n^2)的行为,其近似比始终低于理论上的Δ+1界限。