Specializing Narrowing for Timetable Generation: A Case Study

  • Nadia Brauner
  • Rachid Echahed
  • Gerd Finke
  • Hanns Gregor
  • Frederic Prost
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3350)


An important property of strategies used to solve goals in functional logic programming (FLP) languages is the complete exploration of the solution space. Integrating constraints into FLP proved to be useful in many cases, as the resulting constraint functional logic programming (CFLP) offers more facilities and more efficient operational semantics. CFLP can be achieved by means of conditional rewrite systems with a narrowing-based operational semantics. A common idea to improve the efficiency of such operational semantics is to use specific algorithms from operations research as constraint solvers. If the algorithm does not return a complete set of solutions, the property of completeness might be lost. We present a real world timetabling problem illustrating this approach. We propose an algorithm, obtained as an integration of three known optimization algorithms for the linear assignment problem (LAP), enumerating solutions to the LAP in order of increasing weight, such that resolution of goals is complete again. We show, how the narrowing process can be tailored to use this algorithm and provide an efficient way to solve the timetable generation problem.


Functional-logic programming Constraints Narrowing Timetable generation 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abdennadher, S., Schlenker, H.: Nurse scheduling using constraint logic programming. In: McKay, B., Yao, X., Newton, C.S., Kim, J.-H., Furuhashi, T. (eds.) Proceedings of the Sixteenth National Conference on Artificial Intelligence and the Eleventh Innovative Applications of Artificial Intelligence Conference, IAAI 1999, Orlando, Florida, July 1999, pp. 838–843. AAAI Press/MIT Press (1999)Google Scholar
  2. 2.
    Aickelin, U., Dowsland, K.A.: An indirect genetic algorithm for a nurse scheduling problem. Computers and Operations Research 31, 761–778 (2004)zbMATHCrossRefGoogle Scholar
  3. 3.
    Antoy, S., Echahed, R., Hanus, M.: A needed narrowing strategy. Journal of the ACM 47(4), 776–822 (2000)CrossRefMathSciNetGoogle Scholar
  4. 4.
    Brauner, N., Echahed, R., Finke, G., Gregor, H., Prost, F.: A complete assignment algorithm and its application in constraint declarative languages. Technical Report 111, Cahier du Laboratoire Leibniz (September 2004),
  5. 5.
    Brauner, N., Echahed, R., Finke, G., Prost, F., Serwe, W.: Intégration des méthodes de réécriture et de recherche opérationnelle pour la modélisation et la résolution de contraintes: application à la planification de personnel médical. In: GISEH 2003, Lyon (January 2003)Google Scholar
  6. 6.
    Burke, E.K., Causmaecker, P.D., Berghe, G.V.: A hybrid tabu search algorithm for the nurse rostering problem. In: McKay, B., Yao, X., Newton, C.S., Kim, J.-H., Furuhashi, T. (eds.) SEAL 1998. LNCS (LNAI), vol. 1585, pp. 93–105. Springer, Heidelberg (1999)Google Scholar
  7. 7.
    Caprara, A., Focacci, F., Lamma, E., Mello, P., Milano, M., Toth, P., Vigo, D.: Integrating constraint logic programming and operations research techniques for the crew rostering problem. Software Practice and Experience 28, 49–76 (1998)CrossRefGoogle Scholar
  8. 8.
    Chegireddy, C.R., Hamacher, H.W.: Algorithms for finding k-best perfect matchings. Discrete Applied Mathematics 18, 155–165 (1987)zbMATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    Echahed, R., Serwe, W.: Combining mobile processes and declarative programming. In: Palamidessi, C., Moniz Pereira, L., Lloyd, J.W., Dahl, V., Furbach, U., Kerber, M., Lau, K.-K., Sagiv, Y., Stuckey, P.J. (eds.) CL 2000. LNCS (LNAI), vol. 1861, pp. 300–314. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  10. 10.
    Eiter, T., Faber, W., Koch, C., Leone, N., Pfeifer, G.: Dlv – a system for declarative problem solving. In: Baral, C., Truszczynski, M. (eds.) Proceedings of the 8th International Workshop on Non-Monotonic Reasoning (NMR 2000), Breckenridge, Colorado, USA (April 2000)Google Scholar
  11. 11.
    Faber, W., Leone, N., Pfeifer, G.: Optimizing the computation of heuristics for answer set programming systems. In: Eiter, T., Faber, W., Truszczyński, M. (eds.) LPNMR 2001. LNCS (LNAI), vol. 2173, p. 295. Springer, Heidelberg (2001)Google Scholar
  12. 12.
    Hanus, M.: The integration of functions into logic programming: From theory to practice. Journal of Logic Programming 19, 20, 583–628 (1994)Google Scholar
  13. 13.
    Holland, A., O’Sullivan, B.: Efficient vickrey-pricing for grid service providers. In: Joint Annual Workshop of the ERCIM Working Group on Constraints and the CoLogNET area on Constraint and Logic Programming (July 2003)Google Scholar
  14. 14.
    Jaffar, J., Lassez, J.-L.: Constraint logic programming. In: Proc. Fourteenth Annual ACM Symp. on Principles of Programming Languages, POPL 1987, pp. 111–119 (1987)Google Scholar
  15. 15.
    Kragelund, L., Mayoh, B.: Nurse scheduling generalised (1999),
  16. 16.
    Kuhn, H.W.: The hungarian method for the assignment problem. Naval Research Logistics Quarterly 2, 83–97 (1955)CrossRefMathSciNetGoogle Scholar
  17. 17.
    Lawler, E.L.: A procedure for computing the k-best solutions to discrete optimization problems and its application to the shortest path problem. Management Science 7(18), 401–405 (1972)CrossRefMathSciNetGoogle Scholar
  18. 18.
    Legierski, W.: Search strategy for constraint-based class–teacher timetabling. In: Burke, E.K., De Causmaecker, P. (eds.) PATAT 2002. LNCS, vol. 2740, pp. 247–261. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  19. 19.
    López-Fraguas, F.-J.: A general scheme for constraint functional logic programming. In: Kirchner, H., Levi, G. (eds.) ALP 1992. LNCS, vol. 632, pp. 213–227. Springer, Heidelberg (1992)CrossRefGoogle Scholar
  20. 20.
    Meisels, A., Gudes, E., Solotorevsky, G.: Employee timetabling, constraint networks and knowledge-based rules: A mixed approach. In: Burke, E.K., Ross, P. (eds.) PATAT 1995. LNCS, vol. 1153, pp. 93–105. Springer, Heidelberg (1996)Google Scholar
  21. 21.
    Moyaux, T., Chaib-draa, B., D’Amours, S.: Satisfaction distribuée de constraints et son application à la génération d’un emploi du temps d’employés. In: Actes du 5e Congrès International de Génie Industriel, Québec, QC, Canada, Octobre 26-29 (2003)Google Scholar
  22. 22.
    Murty, K.G.: An algorithm for ranking all the assignments in order of increasing cost. Operations Research 16, 682–687 (1968)zbMATHCrossRefGoogle Scholar
  23. 23.
    Uno, T.: Algorithms for enumerating all perfect, maximum and maximal matchings in bipartite graphs. In: Leong, H.-V., Jain, S., Imai, H. (eds.) ISAAC 1997. LNCS, vol. 1350, pp. 92–101. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  24. 24.
    White, C.A., White, G.M.: Scheduling doctors for clinical training unit rounds using tabu optimization. In: Burke, E.K., De Causmaecker, P. (eds.) PATAT 2002. LNCS, vol. 2740, pp. 120–128. Springer, Heidelberg (2003)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Nadia Brauner
    • 1
  • Rachid Echahed
    • 1
  • Gerd Finke
    • 1
  • Hanns Gregor
    • 1
  • Frederic Prost
    • 1
  1. 1.Institut d’Informatique et de Mathématiques Appliquées de Grenoble, Laboratoire LeibnizGrenobleFrance

Personalised recommendations