Skip to content

Various exercises in Logic Programming and Constraint Logic Programming using ECLiPSe-CLP.

License

Notifications You must be signed in to change notification settings

Irrelev4nt13/Logic-Programming

Repository files navigation

Logic Programming

Various exercises in logical programming and constraint logical programming using ECLiPSe. Completed during the Spring Semester of 2023.

Pancakes Ordering

This project centers on the task of arranging circular pies of varying sizes in a prescribed sequence using a spatula. The objective is to stack the pies vertically, positioning the largest pie at the base and the smallest pie at the apex of the column. The difficulty stems from the constraints on how the pies can be manipulated, highlighting this as a quintessential problem in combinatorial logic and sorting algorithms.

Activity Assignment

In this project, the focus is on representing activities and individuals, aiming to allocate activities to individuals while adhering to specific constraints. These constraints include limitations on the total time any individual can dedicate and requirements for minimum intervals between successive activities. Through this endeavor, the project explores the realm of constraint satisfaction problems (CSP) and utilizes optimization techniques within the framework of logic programming, illustrating their application in real-world scenarios involving scheduling and resource allocation.

Crossword Solver

This project tackles the challenge of solving a square-shaped crossword puzzle, equipped with predefined dimensions and positions of black squares, alongside a list of words designated for placement within the puzzle. The primary objective is to determine a viable arrangement of these words that fits the crossword's structure and adheres to its constraints. By employing methodologies such as backtracking and constraint logic programming, this project showcases effective strategies for solving complex combinatorial puzzles, demonstrating their practical application in problem-solving scenarios that involve spatial arrangement and logical constraints.

Constraint Logic Programming | ECLiPSe-CLP

These projects use libraries such as ic, ic_global, gfd, and branch_and_bound.

Number Division

The goal of this project is to partition a collection of positive integers into two subsets under specific conditions: each subset must contain an equal number of elements, have an identical total sum of elements, and share an equal sum of squares of their respective elements. This problem exemplifies combinatorial optimization, where the objective is to satisfy multiple constraints simultaneously. It delves into the realm of constraint satisfaction, illustrating how rigorous mathematical criteria can be applied to solve complex partitioning challenges efficiently and effectively.

Maximum Satisfiability

This project focuses on tackling the Maximum Satisfiability (MAXSAT) problem, a computational challenge centered around assigning truth values to propositional symbols to maximize the number of true clauses in a given formula expressed in conjunctive normal form (CNF). The primary objective is to optimize the assignment of truth values, leveraging sophisticated techniques in logical reasoning and optimization. By addressing MAXSAT, the project explores advanced methodologies aimed at efficiently navigating through complex logical structures and enhancing computational strategies for achieving optimal truth assignments within constraint-based logical frameworks.

Skyscraper Puzzle

This project focuses on solving multiple instances of the skyscraper puzzle using constrained programming techniques. The skyscraper puzzle entails a square grid of size N, where each cell must accommodate a skyscraper with a height ranging from 1 to N. The goal is to populate the grid so that each row and column contains unique heights, adhering to the constraints provided by the numbers placed at the edges of the grid. These edge numbers indicate how many skyscrapers are visible from that vantage point along the row or column, adding an additional layer of challenge to this logic-based puzzle. By employing constrained programming, the project aims to devise efficient algorithms for solving these puzzles, leveraging logical deduction and optimization strategies to achieve correct and structured grid solutions.

Optimized Activity Assignment

This project expands upon the traditional activity assignment problem by incorporating a cost function that evaluates the equitable distribution of labor time among individuals. The objective is to identify the most efficient assignment of activities to individuals, aiming to minimize the associated cost function. By integrating advanced optimization techniques and leveraging constraint programming methodologies, this project demonstrates practical applications in tackling complex allocation challenges. It underscores the importance of achieving balanced workloads while optimizing resource utilization, highlighting how computational approaches can be effectively employed to enhance decision-making processes in organizational settings.

About

Various exercises in Logic Programming and Constraint Logic Programming using ECLiPSe-CLP.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published