Constraint Satisfaction with Preferences Ph.D
Total Page:16
File Type:pdf, Size:1020Kb
MASARYK UNIVERSITY BRNO FACULTY OF INFORMATICS } Û¡¢£¤¥¦§¨ª«¬Æ !"#°±²³´µ·¸¹º»¼½¾¿45<ÝA| Constraint Satisfaction with Preferences Ph.D. Thesis Brno, January 2001 Hana Rudová ii Acknowledgements I would like to thank my supervisor, Ludˇek Matyska, for his continuous support, guidance, and encouragement. I am very grateful for his help and advice, which have allowed me to develop both as a person and as the avid student I am today. I want to thank to my husband and my family for their support, patience, and love during my PhD study and especially during writing of this thesis. This research was supported by the Universities Development Fund of the Czech Repub- lic under contracts # 0748/1998 and # 0407/1999. Declaration I declare that this thesis was composed by myself, and all presented results are my own, unless otherwise stated. Hana Rudová iii iv Contents 1 Introduction 1 1.1 Thesis Outline ..................................... 1 2 Constraint Satisfaction 3 2.1 Constraint Satisfaction Problem ........................... 3 2.2 Optimization Problem ................................ 4 2.3 Solution Methods ................................... 5 2.4 Constraint Programming ............................... 6 2.4.1 Global Constraints .............................. 7 3 Frameworks 11 3.1 Weighted Constraint Satisfaction .......................... 11 3.2 Probabilistic Constraint Satisfaction ........................ 12 3.2.1 Problem Definition .............................. 13 3.2.2 Problems’ Lattice ............................... 13 3.2.3 Solution .................................... 14 3.3 Possibilistic Constraint Satisfaction ......................... 15 3.3.1 Possibility Distribution ............................ 15 3.3.2 Problem Definition .............................. 16 3.3.3 Consistency .................................. 17 3.4 Fuzzy Constraint Satisfaction ............................ 19 3.4.1 Problem Definition .............................. 19 3.4.2 Operations ................................... 20 3.4.3 Consistency .................................. 22 3.5 Partial Constraint Satisfaction ............................ 23 3.6 Valued Constraint Satisfaction ............................ 24 3.6.1 Valuation Structure .............................. 24 3.6.2 Problem Definition .............................. 25 3.6.3 Relaxation ................................... 26 3.6.4 Classes of Valued CSP ............................ 27 3.6.5 Variable Valued Constraint Satisfaction .................. 28 3.7 Semiring-based Constraint Satisfaction ....................... 28 3.7.1 Semirings and SCSP ............................. 28 3.7.2 Operations ................................... 29 3.7.3 Solution .................................... 30 3.7.4 Equivalence and Refinement ........................ 30 v vi CONTENTS 3.7.5 Classes of SCSP ................................ 32 3.8 Relationships between Frameworks ........................ 33 3.8.1 Preferences for Constraints and Tuples .................. 33 3.8.2 Meta-Frameworks .............................. 34 3.8.3 Basic Frameworks .............................. 34 4 Constraint Hierarchies 35 4.1 Problem Definition .................................. 35 4.2 Traditional Comparators ............................... 37 4.3 New Comparators .................................. 39 4.3.1 Lexicographic-Better Comparator ..................... 39 4.3.2 Ordered-Better Comparator ......................... 41 4.4 Algorithm for Solving the Hierarchy ........................ 43 4.5 Relationships with Semiring-based CSP ...................... 44 4.5.1 Global Comparators ............................. 45 4.5.2 Local Comparators .............................. 47 4.5.3 Regional Comparator ............................ 48 4.6 Categorization of Hierarchies over Finite Domains ................ 49 5 Variables’ Annotations 51 5.1 Annotation Triple ................................... 52 5.1.1 Instances of Annotation Triple ....................... 54 5.1.2 Solution .................................... 54 5.2 Fuzzy Annotations .................................. 55 5.2.1 Mappings ................................... 57 5.3 Hierarchical Annotations ............................... 58 5.3.1 Mappings ................................... 60 5.4 Variable Ordering ................................... 61 5.4.1 Computing Variable Ordering ....................... 62 6 Timetabling 65 6.1 Problem Description ................................. 65 6.1.1 Time Assignment ............................... 66 6.1.2 Classroom Allocation ............................ 67 6.1.3 Section Assignment ............................. 67 6.1.4 Teacher Assignment ............................. 68 6.2 Current Constraint-based Approaches ....................... 68 6.2.1 Problem Modelling .............................. 68 6.2.2 Preferences & Search ............................. 70 6.3 Classroom Allocation ................................. 71 6.3.1 Identical Classrooms ............................. 72 6.3.2 Diverse Classrooms ............................. 72 6.4 Student-Oriented Timetables ............................ 76 6.4.1 Student Conflict Minimization ....................... 76 6.4.2 Soft Disjunctive Scheduling Problem .................... 78 6.5 Variables’ Annotations in Timetabling ....................... 80 6.5.1 Timetabling Constraints with Annotations ................ 81 CONTENTS vii 6.6 Faculty of Informatics Timetabling Problem .................... 82 6.6.1 Solution Structure .............................. 84 6.6.2 Implementation & Computational Results ................ 85 6.7 Comparison with Other Approaches ........................ 86 7 Conclusion 89 7.1 Future Work ...................................... 89 7.2 Contributions ..................................... 90 7.3 Summary & Discussion ................................ 91 Bibliography 107 A Multi-sets 109 Abstract 111 viii CONTENTS Chapter 1 Introduction First works on constraint satisfaction problems (CSPs) can be traced in the 70’th [Mon74, Mac77, Fre78], but their widespread study and application started since the end of 80’th when the extension of unification algorithm of logic programming [O’K90, MW88, GHR93] led to the proposal of constraint logic programming (CLP) scheme [JL87, VH89]. CSP and CLP allow to express properties of the problem declaratively by means of constraints and to search for its solution via specialized algorithms. The most studied problem instances range over variables with finite domains which probably belong to more than 95 % of all industrial applications of constraints [Sim99, Bar99a]. Constraint programming is applied to solve wide range of problems, among them scheduling, configuration, hardware verifica- tion, graphical interfaces, or molecular biology [Sim99, AS99, Wal92, MCF98, FB98, KB99]. In most real-life situations we need to express fuzziness, possibilities, probabilities, costs, weights, ... In general, human specifications are difficult to express faithfully via hard con- straints only. While problems may become over-constrained it does not make sense to say there is no solution. Many problems require finding of best or optimal solution wrt. one or even more optimization criteria. Others may be ill-defined and we need to include uncer- tainty of the problem definition into final solution. All these problems need to apply some type of preferences which have to be included into both declarative and control part of the solution. That led us to the study of CSPs with preferences from both theoretical and practical points of view within this thesis. 1.1 Thesis Outline Chapter 2 is aimed to give an overview of CSP and CLP paradigms as a background for understanding both theoretical and practical parts of thesis. All theoretically oriented Chap- ters 3–5 follow the same structure we have proposed to give a unifying view to particular approaches for solving CSPs with preferences. That way, notions of constraint, problem, satisfaction degree, solution, and consistency degree create a basic outline of all presented frameworks. Both existing and proposed approaches are applied in the practical part of thesis represented by solution of timetabling problem in Chapter 6. Chapter 3 summarizes existing approaches for solving CSPs with preferences. Start- ing from the basic frameworks over particular types of preferences (weighted, probabilistic, possibilistic, fuzzy CSPs) we continue through meta-frameworks (partial, valued, semiring- based CSPs — SCSPs). Basic frameworks may be obtained by specification of a general alge- 1 2 CHAPTER 1. INTRODUCTION braic structure of meta-framework. In Sect. 3.7.4, we have proposed new relations of equiv- alence and refinement for SCSPs to be able compare its instances with partial ordering of preferences. Theory of constraint hierarchies (CHs) is studied in Chapter 4. After basic description of the framework with its comparators for selection of solution, we continue with proposal of new ordered-better and lexicographic-better comparators and their comparison with tra- ditional comparators of CHs in Sect. 4.3. Section 4.4 proposes an algorithm for solving CH with ordered-better comparator. As a main contribution of this chapter, we define instances of algebraic structure of SCSP for certain comparators of CHs (see Sect. 4.5) and classify them into complexity classes with help of proposed equivalence for SCSPs (details in Sect. 4.6). We also show that for remaining comparators any correspondence with SCSP does not exist. An original contribution of the thesis concerns