12.5 C
New York
Thursday, December 1, 2022

Understanding Constraint programming – INDIAai

In-depth and nuanced coverage of leading trends in AI One
Latest updates in the world of AI
Information repositories on AI for your reference
A collection of the most relevant and critical research in AI today
Read the latest case studies in the field of AI
Curated sets of data to aid research initiatives
The best of AI brought to you in bite-sized videos
World-class policy developments and accepted standards in AI development
Roles spanning various verticals and domains in big data and AI
Latest events in AI locally and internationally
Pieces covering the most current and interesting topics
VCs, PEs and other investors in AI today
Top educational institutions offering courses in AI
Profiles of visionary companies leading AI research and innovation
India’s brightest and most successful minds in AI research and development
A glimpse into research, development & initiatives in AI shaping up in countries round the world
Read all about the various AI initiatives spearheaded by the Government of India
Latest initiatives, missions & developments by GoI to drive AI adoption
Follow INDIAai
About INDIAai
Subscribe to our emails
Home

By Dr Nivash Jeevanandam
Constraint optimization, also known as constraint programming (CP), identifies feasible solutions from a vast pool of candidates when the problem can be modelled using arbitrary constraints. In numerous scientific and engineering disciplines, CP problems arise.
Constraint programming (CP) solves combinatorial problems using artificial intelligence, computer science, and operations research techniques. In constraint programming, the constraints on the possible solutions for a set of decision variables are stated declaratively by the user. 
Constraints differ from the basic building blocks of imperative programming languages in that they don’t tell the computer what steps to take or what to take. Instead, they say to the computer what properties a solution must have. Along with constraints, users must also choose a way to solve these constraints. It usually uses standard methods like chronological backtracking and constraint propagation, but it could also use custom code like a problem-specific branching heuristic.
Constraint programming is a logic program that includes constraints. Jaffar and Lassez made this type of logic programming in 1987. They added to a class of constraints introduced in Prolog II. Prolog III, CLP(R), and CHIP were the first ways we used constraint logic programming.
Constraints can be mixed with functional programming, term rewriting, and imperative languages instead of logic programming. For example, oz (functional programming) and Kaleidoscope are two languages with built-in support for constraints (imperative programming). Constraints are often added to imperative languages with the help of constraint-solving toolkits and separate libraries for an existing critical language.
Logic programming
Constraint programming is the process of putting rules into a programming language. The field was called constraint logic programming when logic programming languages were used as the first host languages. Both paradigms have many essential things, such as logical variables and going backwards. Most Prolog implementations today come with one or more libraries for programming with constraints.
The main difference between the two is how they model the world and how they do it. Some problems are easier to solve (and write) as logic programs, while others are easier to solve (and write) as constraint programs. The goal of constraint programming is to find a state of the world where a lot of different rules are met at the same time. Most of the time, a problem is described as a state of the world with several unknown factors. The constraint program looks for all the variables’ values. Furthermore, temporal concurrent constraint programming (TCC) and non-deterministic temporal concurrent constraint programming (MJV) are types of constraint programming that can deal with time.
Example
An excellent example of a challenge that CP can help with is employee scheduling. The problem arises when businesses that run all the time, like factories, need to make weekly schedules for their workers. Here’s a straightforward example: A company has three 8-hour shifts per day and gives three of its employee’s different shifts each day while giving the fourth the day off. 
Even in this small example, there are a lot of possible schedules. Each day, there are 4! = 4 * 3 * 2 * 1 = 24 possible employee assignments. It means there are 247 possible weekly schedules, which is more than 4.5 billion. Most of the time, other rules limit the number of solutions that can work. For example, each employee must work at least a certain number of days per week. When you add new constraints, the CP method keeps track of possible solutions. It is a powerful tool for solving large scheduling problems in the real world.
Conclusion
Around the world, there is a large and very active CP community with scientific journals, conferences, and many different ways to solve problems. CP has been used successfully in planning, scheduling, and other areas with additional constraints.
About the author
Senior Research Writer at INDIAai
Share via
Six best online resources for Econometrics
Improving healthcare outcomes using NLP
Join our newsletter to know about important developments in AI space

source

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles