Heuristic algorithms for static and dynamic frequency assignment problems