Constraint-satisfaction problem
A constraint-satisfaction problem is a problem defined by variables, domains of possible values, and constraints, with the goal of finding an assignment that satisfies the constraints.
Classic Computer Science Problems in Swift: Essential techniques for practicing programmers
A constraint-satisfaction problem is a problem defined by variables, possible values for those variables, and constraints restricting compatible assignments.
- How it is used
- Frames scheduling, puzzles, placement, and coloring as problems solved by reusable backtracking search.
- How deep it goes
- Explains modeling, custom constraints, recursive search, and several implementations, while deferring advanced heuristics and optimization details.
- Examples
- Uses meeting scheduling, Australian map coloring, eight queens, word search, and SEND+MORE=MONEY.
- What you can do after
- Builds Swift CSP solvers by defining domains, implementing constraints, and running generic backtracking search.
Optimization Algorithms: AI techniques for design, planning, and control problems
A constraint-satisfaction problem is a problem formulation whose goal is to find an assignment satisfying a specified set of constraints without requiring an explicit objective function.
- How it is used
- Frames search tasks around satisfying constraints rather than optimizing an explicit objective.
- How deep it goes
- Defines feasibility, works through 7-queens iterations, and supplies Python components for tabu-search implementation.
- Examples
- Uses 4-queens and 7-queens boards, collision counts, queen orderings, candidate swaps, figures, and Python listings.
- What you can do after
- Apply it via tabu search and Python by representing states, measuring constraint violations, filtering moves, and tracking improvements.
Related concepts
- n-queens problemincludes · The n-queens problem is the puzzle of placing n queens on an n-by-n chessboard so that no two queens attack each other.
- Sudoku puzzleused by · A Sudoku puzzle is a number-placement constraint puzzle in which each row, column, and designated region contains each permitted symbol exactly once.
- constraintuses · A constraint is a condition or rule that restricts the permissible states, values, actions, or solutions in a system or problem.
- mathematical variablehas part · A mathematical variable is a symbol or quantity representing a value or attribute that can vary or be determined within a defined domain.
- domainhas part · A domain is a set of values, such as values allowed for a variable or accepted as inputs to a function.
- cryptarithmetic puzzleused by · A mathematical puzzle in which letters represent digits and an arithmetic statement must be made true subject to digit-assignment constraints.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

