You are on page 1of 9

MSPM’S

DEOGIRI INSTITUTE OF ENGINEERING AND MANAGEMENT

STUDIES, AURANGABAD

DEPARTMENT OF ELECTRONICS & TELECOMMUNICATION

(A. Y.2022-23, SEM-I)

CASE STUDY REPORT

NAME OF STUDENT: AMAN AJAY PANDEY

CLASS: TY ETC (A)

ROLL NO.: 35106

ARTIFICIAL INTELLIGENCE & MACHINE


SUBJECT:
LEARNING (BTETOE505B)

CASE STUDY TOPIC: BACKTRACKING SEARCH FOR CSPS

EXAM: CA-II

INDEX
[1] INTRODUCTION

A. LITERATURE SURVEY
[2]
(NOTE: REFER 3 RESEARCH PAPERS)

B. Text BOOK SURVEY (MIN. ONE BOOK)

C. WEB SURVEY (MIN. ONE WEBSITE)

[3] EXPLANATION & ANALYSIS

[4] CONCLUSION/FINDINGS

1. INTRODUCTION
There are three main algorithmic techniques for solving constraint satisfaction problems:
backtracking search, local search, and dynamic programming. In this chapter, I survey
backtracking search algorithms. Algorithms based on dynamic programming sometimes
referred to in the literature as variable elimination, synthesis, or inference algorithms. Local
or stochastic search algorithms An algorithm for solving a constraint satisfaction problem
(CSP) can be either complete or incomplete. Complete, or systematic algorithms, come with a
guarantee that a solution will be found if one exists, and can be used to show that a CSP does
not have a solution and to find a provably optimal solution. Backtracking search algorithms
and dynamic programming algorithms are, in general, examples of complete algorithms.
Incomplete, or non-systematic algorithms, cannot be used to show a CSP does not have a
solution or to find a provably optimal solution. However, such algorithms are often effective
at finding a solution if one exists and can be used to find an approximation to an optimal
solution. Local or stochastic search algorithms are examples of incomplete algorithms. Of the
two classes of algorithms that are complete—backtracking search and dynamic programming
—backtracking search algorithms are currently the most important in practice. The
drawbacks of dynamic programming approaches are that they often require an exponential
amount of time and space, and they do unnecessary work by finding, or making it possible to
easily generate, all solutions to a CSP. However, one rarely wishes to find all solutions to a
CSP in practice. In contrast, backtracking search algorithms work on only one solution at a
time and thus need only a polynomial amount of space. Since the first formal statements of
backtracking algorithms over 40 years ago [30, 57], many techniques for improving the
efficiency of a backtracking search algorithm have been suggested and evaluated. In this
chapter, I survey some of the most important techniques including branching strategies,
constraint propagation, nogood recording, backjumping, heuristics for variable and value
ordering, randomization and restart strategies, and alternatives to depth-first search. The
techniques are not always orthogonal and sometimes combining two or more techniques into
one algorithm has a multiplicative effect (such as 86 4. Backtracking Search Algorithms
combining restarts with nogood recording) and sometimes it has a degradation effect (such as
increased constraint propagation versus backjumping). Given the many possible ways that
these techniques can be combined together into one algorithm, I also survey work on
comparing backtracking algorithms. The best combinations of these techniques result in
robust backtracking algorithms that can now routinely solve large, hard instances that are of
practical importance.
2.A LITERATURE SURVEY

Backtracking Algorithm

An algorithm for solving a constraint satisfaction problem (CSP) can be either complete or
incomplete. Complete or systematic algorithms, come with a guarantee that a solution will be
found if one exists, and can be used to show that a CSP does not have a solution and to find a
provably optimal solution. Backtracking search algorithms and dynamic programming
algorithms are, in general, examples of complete algorithms. Incomplete, or non-systematic
algorithms, cannot be used to show a CSP does not have a solution or to find a provably
optimal solution. However, such algorithms are often effective at finding a solution if one
exists and can be used to find an approximation to an optimal solution. Local or stochastic
search algorithms are examples of incomplete algorithms.
A backtracking algorithm tries to build a solution to a computational problem incrementally.
Whenever the algorithm needs to decide between multiple alternatives to the next component
of the solution, it simply tries all possible options recursively. . n Queens The prototypical
backtracking problem is the classical n Queens Problem, first proposed by German chess
enthusiast Max Bezzel in (under his pseudonym “Schachfreund”) for the standard 8×8 board
and by François-Joseph Eustache Lionnet in for the more general n× n board. The problem is
to place n queens on an n × n chessboard, so that no two queens can attack each other. For
readers not familiar with the rules of chess, this means that no two queens are in the same
row, column, or diagonal. Obviously, in any solution to the n-Queens problem, there is
exactly one queen in each row. So we will represent our possible solutions using an array Q[1
..n], where Q[i] indicates which square in row i contains a queen, or 0 if no queen has yet
been placed in row i. To find a solution, we put queens on the board row by row, starting at
the top. A partial solution is an array Q[1 ..n] whose first r − 1 entries are positive and whose
last n − r + 1 entries are all zeros, for some integer r.( Palmer,n.d.)
According to (Suja and Savithri, 2015) Cloud Computing (CC) is an emerging field in which
research scholars from academia and industry professional contribute their knowledge to
understand and propagate the dimensions of its applications. One of the popular services in
CC is Infrastructures as a Service (IaaS) by which the customers can rent a highly configured
server, storageetc. from the providers. On the provider’s side in order to maintain the
numerous servers for myriad reasons like load balancing, faulttolerance, complying to the
Service Level Agreements(SLA), they have to migrate these servers from one Physical
Machine(PM) to another PM. A Backtracking algorithm is proposed and its feasibility study
is done by comparing the approach and working with various similar existing algorithms.
B.TEXT BOOK SURVEY
Sudoku problems are designed to be solved by inference over constraints. But many other
CSPs cannot be solved by inference alone; there comes a time when we must search for a
solution. In this section we look at backtracking search algorithms that work on partial as
asignments; in the next section we look at local search algorithms over complete assignments.
We could apply a standard depth-limited search (from Chapter 3). A state would be a partial
assignment, and an action would be adding var = value to the assignment. But for a CSP with
n variables of domain size d, we quickly notice something terrible: the branching factor at the
top level is nd because any of d values can be assigned to any of n variables. At the next
level, the branching factor is (n − 1)d, and so on for n levels. We generate a tree with n! · dn
leaves, even though there are only dn possible complete assignments! Our seemingly
reasonable but naive formulation ignores crucial property common to COMMUTATIVITY
all CSPs: commutativity. A problem is commutative if the order of application of any given
set of actions has no effect on the outcome. CSPs are commutative because when assigning
values to variables, we reach the same partial assignment regardless of order. Therefore, we
need only consider a single variable at each node in the search tree. For example, at the root
node of a search tree for coloring the map of Australia, we might make a choice between SA
= red, SA = green, and SA = blue, but we would never choose between SA = red and WA =
blue. With this restriction, the number of leaves is dn, as we would hope

The term backtracking search is used for a depth-first search that chooses values for
BACKTRACKING SEARCH one variable at a time and backtracks when a variable has no
legal values left to assign. The algorithm is shown in Figure 6.5. It repeatedly chooses an
unassigned variable, and then tries all values in the domain of that variable in turn, trying to
find a solution. If an inconsistency is detected, then BACKTRACK returns failure, causing
the previous call to try another value. Part of the search tree for the Australia problem is
shown in Figure 6.6, where we have assigned variables in the order WA, NT, Q, . . .. Because
the representation of CSPs is standardized, there is no need to supply BACKTRACKING-
SEARCH with a domain-specific initial state, action function, transition model, or goal test.
C. WEB SURVEY
constraint satisfaction problem (CSP) consists of a set of variables,X = {x1,...,xn}; a set of
values, D = {a1,...,ad}, where each variable xi ∈ X has anassociated finite domain dom(xi) ⊆
D of possible values; and a collection of constraints.

Each constraint C is a relation—a set of tuples—over some set of variables, denoted by


vars(C). The size of the set vars(C) is called the arity of the constraint. A unary constraint is a
constraint of arity one, a binary constraint is a constraint of arity two, a non-binary constraint
is a constraint of arity greater than two, and a global constraint is a constraint that can be over
arbitrary subsets of the variables. A constraint can be specified intensionally by specifying a
formula that tuples in the constraint must satisfy, or
extensionally by explicitly listing the tuples in the constraint. A solution to a CSP is an
assignment of a value to each variable that satisfies all the constraints. If no solution exists,
the CSP is said to be inconsistent or unsatisfiable. As a running example in this survey, I will
use the 6-queens problem: how can we place 6 queens on a 6 × 6 chess board so that no two
queens attack each other. As one possible CSP model, let there be a variable for each column
of the board {x1,...,x6}, each with domain dom(xi) = {1,..., 6}. Assigning a value j to a
variable xi means placing a queen in row j, column i. Between each pair of variables xi and xj
, 1 ≤ i<j ≤ 6, there is a constraint C(xi, xj ), given by (xi = xj ) ∧ (|i − j| = |xi − xj |). One
possible solution is given by {x1 = 4, x2 = 1, x3 = 5, x4 = 2, x5 = 6, x6 = 3}.
The satisfiability problem (SAT) is a CSP where the domains of the variables are the Boolean
values and the constraints are Boolean formulas. I will assume that the constraints are in
conjunctive normal form and are thus written as clauses. A literal is a Boolean variable or its
negation and a clause is a disjunction of literals. For example, the formula ¬x1 ∨x2 ∨x3 is a
clause. A clause with one literal is called a unit clause; a clause with no literals is called the
empty clause. The empty clause is unsatisfiable. A backtracking search for a solution to a
CSP can be seen as performing a depth-first traversal of a search tree. The search tree is
generated as the search progresses and represents alternative choices that may have to be
examined in order to find a solution. The method of extending a node in the search tree is
often called a branching strategy, and several alternatives have been proposed and examined
in the literature.
A backtracking algorithm visits a node if, at some point in the algorithm’s execution, the
node is generated. Constraints are used to check whether a node may possibly lead to a
solution of the CSP and to prune subtrees containing no solutions. A node in the search tree is
a deadend if it does not lead to a solution.
3.EXPLANATION/ ANALYSIS
Backtracking search for CSPs:_

Backtracking search, a form of depth-first search, is commonly used for solving CSPs.
Inference can be interwoven with search.
Commutativity: CSPs are all commutative. A problem is commutative if the order of
application of any given set of actions has no effect on the outcome.
Backtracking search: A depth-first search that chooses values for one variable at a time and
backtracks when a variable has no legal values left to assign.
Backtracking algorithm repeatedly chooses an unassigned variable, and then tries all values in
the domain of that variable in turn, trying to find a solution. If an inconsistency is detected,
then BACKTRACK returns failure, causing the previous call to try another value.
There is no need to supply BACKTRACKING-SEARCH with a domain-specific initial state,
action function, transition model, or goal test.
BACKTRACKING-SARCH keeps only a single representation of a state and alters that
representation rather than creating a new ones
4.CONCLUSION/ FINDINGS

This paper gave the brief explanation of all the aspects of constraint satisfaction problems.
The CSPs yield a natural representation for a wide variety of problem .a classification of
various algorithms to solve the combinatorial problem is proposed..

References :

[1] Duffy, K.R.; Leith, D.J. (August 2013), “Decentralized Constraint Satisfaction”,
IEEE/ACM Transactions on Networking, 21(4), pp. 1298–1308
[2] Stuart Jonathan Russell, Peter Norvig (2010). Artificial Intelligence: A Modern
Approach. Prentice Hall. p. Chapter 6. ISBN 9780136042594.
[3] Lecoutre, Christophe (2009). Constraint Networks: Techniques and Algorithms
ISTE/Wiley.ISBN 978-1-84821-106-3
[4] Bartak, R. 2005. Constraint Satisfaction for Planning and Scheduling. In Vlahavas,
Vrakas (eds.): Intelligent Techniques for Planning, 320–353.
[5] Research Paper by research gate

You might also like