顶点着色的贪婪算法中"按给定的顺序、满足一定的条件依次对顶点着色过程"可视为"按给定的顺序、满足一定的条件依次将顶点放入不同(颜色)的盒子中的过程",受此启发,设计相应的排课算法,首先提出"数量约束"的概念,给出该问题的具体需满足数量约束的项;然后将总表中的每条记录看成一个"顶点",将一张课表中每一个具体的表格视为不同(颜色)的"盒子",设计相应的启发式规则;最后把排课的过程巧妙的变成把每个"顶点"按相应的规则、在满足"数量约束"的要求的前提下放入上述"盒子"中的过程。
The procedure of process vertex coloring problem with greedy method(coloring all the vertexes in a given order such that some conditions)can be seen as the procedure of putting all the vertexes into different color boxes in a given order such that some conditons.The paper devise the schedule arrangement algorithm based on this idea.Firstly,it defines the concept of quantity restriction and list the needed items satisfying the quantity restriction.Then it considers every record as a vertex,considers every sheet in a school timetable as a box with different color,and designs some heuristic rules.At last,it changes the procedure of arranging schedule into the procedure of putting all the vertexes into different color boxes in a given order by some heuristic rules such that some quantity restrictions.