Queens Problem Solutions with ASP

Job ID: 39183415

Budget: £20 – £250 GBP

I'm looking for a professional who can develop solutions for the Queens(n, m) problem and its variants using logical representation, Answer Set Programming (ASP), and optimization techniques.

Key Tasks:
- Formulating standard CNF/DNF propositional logic expressions.
- Constructing Binary Decision Diagrams (BDDs).
- Implementing ASP programs to compute valid queen placements.
- Analyzing performance.

Additionally, I need help with a variant where queens are placed on a colored chessboard under strict constraints.

Deliverables:
- Documented solutions with clear explanations.
- Visual representations.
- Comparison between manual and automated solving times.
- Performance analyses.
- Optimized solutions for efficiency.

Ideal Skills:
- Proficiency in logical representation and ASP.
- Experience in developing and solving complex algorithmic problems.
- Strong analytical skills for performance optimization.
- Ability to create clear visual and written documentation.

Please note, the primary focus of this project is on logical representation and ASP.


Task 1: Logical Representation & Tree Structures
Draw all solutions for Queens(n,m)

Generate valid placements for given board sizes.
Ensure no two queens attack each other.
Provide clear diagrams of solutions.
Propositional Logic Formula (DNF) for Queens(2,1)

Write a formula using given variables.
Ensure a one-to-one correspondence with valid solutions.
Count and report the number of models.
Binary Decision Tree (BDT) & Reduction

Construct a full BDT based on Task 1.2.
Apply the reduction algorithm to simplify the tree.
Document each step of the reduction.
Applying BDD Operations

Construct a BDD for ¬x(2,2).
Use the Apply algorithm to combine with the BDD from Task 1.4.
Draw the resulting BDD.
Final BDD Reduction

Apply the reduction algorithm to obtain a minimal BDD.
Explain each reduction step.
Task 2: Answer Set Programming (ASP) Implementation
ASP Program for Queens(n,m)

Write a program to generate solutions using Clingo.
Ensure correctness and efficiency.
Testing & Performance Analysis

Compute maximum m for each n (1 to 14).
Run the program, record number of solutions & execution times.
Populate and present results in tabular format.
Generate graphs for:
Number of solutions vs. n
Execution time vs. n
Analyze and describe the complexity trends.
Chessboard Reduction Program

Write an ASP program to remove m squares (except (1,1)).
Compute solutions for n=4, k=2.
Verify correctness using combinatorial reasoning.
Task 3: Puzzle Variant (Queens on Colored Chessboard)
Manual Puzzle Solving

Solve provided chessboard puzzles by hand.
Record solutions and time taken.
ASP Program for Puzzle

Implement a program to generate valid queen placements.
Ensure constraints are enforced:
No shared colors
No row, column, or touching queens
Validate correctness using Input 1.
Testing the Program

Extend the program for Inputs 2, 3, and 4.
Record solutions and execution times.
Compare manual vs. automated solving times.
Optimizing the Program

Improve efficiency while maintaining correctness.
Compare against benchmark times (0.010s to 0.024s).
Report optimized program and results.