0% found this document useful (0 votes)
11 views23 pages

Daa Ass3

The document discusses backtracking and its applications, particularly in solving optimization problems using methods like the branch and bound technique. It emphasizes the importance of computing bound values at each node and comparing them to find the best solution. Additionally, it includes examples and illustrations related to the four-queens problem and other algorithmic approaches.

Uploaded by

Darshini Gowda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views23 pages

Daa Ass3

The document discusses backtracking and its applications, particularly in solving optimization problems using methods like the branch and bound technique. It emphasizes the importance of computing bound values at each node and comparing them to find the best solution. Additionally, it includes examples and illustrations related to the four-queens problem and other algorithmic approaches.

Uploaded by

Darshini Gowda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Assignment-3

back tacking ?.
Jm Biauch s Bound method ou spcte ott all poseible
&oluione is genesad. Thenpaatiioning o. branching
oe Conpute
oud vaue ad gach ode - oelhen conpaa oí
bosnd Valua uoith thu Valeof toest goinn. loschinme
we Compase. auodes Bounul vaue uoith the Valus ot [ha
best. solbein obaimd uptl moo. dt the bound
Solukon then that eoRes poncing mode is mot
Expanded fualtsSuah auode. cs callH mon-plom
lhat the bleneh puned ouea Hie

Backtsacking
olbinfot kocklaackinq
tined using depi fáxi eLssasy to use daptt l
&oasch. Bearch to obainin Souhin
Sven best fúst Scseh e
applied
| soluu ueing bcask isarking can be. oled using tAan
Bound
s]ohifiusling the Solulaoin to las s15t poeuds on belessolio
protle bas choie Can be So_ liesL Can not be
madle bad soluion.
A Applcaton o acktaackiug a Applicatuoin a biancht
Kmapsack &um of subset bond ale - sob Se qyunle
Page No......

Adipcamad

oo
o1o

ke tis iaceauatd fareah itrahin


Heeha kea

itenchs :keb:
For full maks,
you have to
write all the
steps for
every element
o in matrix
o
Page No..

distensnathiz D
1_hoske tan da
PageNo.

26 O 2

53

AR]-a CAlea1 A2t ACL,33)

A':
3

ALsa (Aa, A(L3] tl3,27)


Page No.

Laliitoataiat

X
2t3)
and
No. Page
Page No.......

5.
-baatniz ahan belo
mhad
P
A 3

lo

Lad the minin


min

Stast
9|2 9

cosiler Pesson A. Ain ieba ta 4


Amig
canhute ke
A cat IO,
A Iol3t
B 5
2
-

lo 5
Ib 2)
Page No

A ,cont 2,
inim

29

A , cot -8
A o3
BS
2
U692

t L: 22
Stot

|b= 22

2 asiyed to A. min
3

29 2
Page No..

3
min
A
A
2

D 8
- 21
db: 18
stant

B’
b-18 b 21|

A 3

2 2

b2?

A 22|
b- 24

A-a, B-ICds,
Cest- 3+4 +2+S
Etad the Tsewsig Dypaiz Progomi
2

a lo22 3
2

Algatai

= nánl2 t g(b,icd), 3+ 3(e, ibd?) bt aa.lb)


Consider albled?)= man (Chetg,ia3),Ciaae

Ceides

min 1+ Ceatg(,l)

B maaukehking
2+8, +i 6+8)
Page NO.......

3o

Qlos|20
cotatR
3525
S 35o Bo
2o 253o

84123)- min,

=Aota (35 +30 +26] 25+C3ot 153


= mmin (3s +5025+4S)
= in( 85, 70)
3l, 3,43) -70
Page No.....

Eu3)3o+(h l23))
nan (35+ g(2,
min35 +lCyta te)3ot
t20], 3ot Ces tl)
= min(25 +[ns
mmn
a(3, i2,y) 65

gG,:2]3o +[Cs t 8(2,gJ


min (25 + Czt 3036+lo])
= min 25+(35+ Is]
= min75, 5)

2o47S

Miimnn
Patt
’ 2 y’3 ’1
Subnet
Page No....

Prable Hat can be sald podayamial ine


tine

tolghitáne

tine

P-das
NP comabe NP hod
Page No.......

3.33
32
25

Aelute

Ub= O+ (o-o) (3.33


Ub |33.3 Slected ikem

Ub b
Ve0,w20
Vb 0 (o-o)X8

Sdetd em a?
Page No......

Ue o32-72
Ub= 2 + lio-5

Ub= o+ (to-3) *5
Ub=75

Luith s
Vz 2+ 25= 4 = 745= 2.
12210 > W>M.
X

VelsLu2.
V 72, w:? Ub= 72 +(o-7)b2

wken 5ds not aated

eshenÁet
(aitiod) V=72, ?.

V=24o- 82

i Ub doent eit.
Page No.........

Ub= Z2 + (lo-)o

Langt

and Dle who

WE l 2, 2
|a 2

|8
2 18 |3 343l
2 183434y

YODehas(v(o,),v (o,1-1)+ PO)


= Man (O, 0+)3) - man (0, 1)
Page N.

Vl3)- ma
mose vcoz)vlo3) + peDS
vlo) vo,)+POs

vlo,) v PS
(o,4-1)+
VU4) man
wli 2

VCe,)= 18
nox v(,2,v,2-2) +Pl 2)
V(2,2)=

vle,3) = man svL3),v,3-2) +P(2)S


ma (I8, 18+L)= ma (18, 3 4t

vew)=24
li=2.

v(3.2) =hax (vlea), vl,2-2) +P(D)


Page No....

vC33)=3le
vl3,)e mane (V(2,4),(2, 42)+PC3))

ten 2
-> J8lb 3

NXNhes bead
al N-qaelns n the ches beahd suhtht
queatbek eash thel,
peenasheled ot be
Haced in e
12. contod

3 6

4
2 3 3

4 1 2

solution

FIGURE 12.2 State-space tree of solving the four-queens problem by backtracking.


X denotes an unsuccessful attempt to place a queen in the indicated
column. The numbers above the nodes indicate the order in which the
nodes are generated.
Page No.........

13.
(w, w2,W3,
(L,132) andMa3.

and
'm,it
herkikn wtee

M=31

H3
+24 +24

2
47/ +/

M=3l Hhoe
11 +13+4 3
24+7 23|
Page No.

dind Hrnilian hath and ayel wsing bauktaaksy


algithna
AHalonin
isit p
qhash that lach a
nertea t h She
esatly .
Whereas a hamilhenian ckis a
wndited tht itb bah ert

contdrhia gah

hehin te hedAhihwill be a oead end

taangh-aae tu

daad

You might also like