0% found this document useful (0 votes)
20 views6 pages

Daa Assignment 4

1) Explain the knapsack problem in 3 sentences or less. 2) Briefly explain the eight queens problem and its constraints in 2 sentences. 3) Identify that a Hamiltonian cycle visits each vertex exactly once without repeating starting node for a connected graph.

Uploaded by

SUMEDHA PALLA
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)
20 views6 pages

Daa Assignment 4

1) Explain the knapsack problem in 3 sentences or less. 2) Briefly explain the eight queens problem and its constraints in 2 sentences. 3) Identify that a Hamiltonian cycle visits each vertex exactly once without repeating starting node for a connected graph.

Uploaded by

SUMEDHA PALLA
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/ 6

Assignment -o

Scdive the krapsacf pob lerm un ivg Bactfrocig (sum of sutset


Eaplatn 8 gueenu prckiem
3) Erplaln brief rota on a) 6aph cdovng
6) Aarni ltolidn cyce
Knapack prole
The i knapsack prrobiem can do al h
Use
f tock frackg algpritfm tre, or dre gven a
OHh n' nunber of ciecte Ach hot i,,3, 4,--n
rd eoch 4
these ojec oe assyned their cocights o;a value
The annifon of thta probkm a
of (he obrecta ahich arail Wthe
detemhre fhe naximum vdue
kropat AUch trat fhe tob!
werghty of those objects nt enceed
eAarmple
w
wll 3, 4,s
J,p, s, c, io]
copacity of bag ia s
toe can AveIdu o/ rapáatt
teff ac free: problern AÝrG 4om of kchnc

+3
S8|

24

baltiecty
S

S6,battfradry
3

X
poxibk
.. FYn tte tate Apeee tree thee ? only Cne
soton: (o,1,0, )

The Adot ar: (o,,o,)


Eight gueens Probenm:
The cignt que preon iA the protem f plocing
elght che quetnu cn n 8x8 cheubond Ao tat ofuo geene

stare th 0rre vw,domn or dagor d


There are tio tupee ontrainte
Eaplic it cGntait
) Jrrplhcit (onutait
5plicit conubint:
The olobn ia (a, ,22)
Si =d,2 ,3,4, S,4,, }

Same YOO
No tu0 Queeny eYe in Same colunn

SCne
diopral
Rute:

No of po) brl her t place


any gueen in, 8x8
64 (orthoot cpplyrg Contaimtu oy cheubodd
Afto appyng contiain bourrg furchion)
theye cre educe d to 8!
cheuooaYd. po uibilite,
So, UAg 9eene prohem we
Becaw se
QUceng
capan oqueeny ooem.
proben i dolved in tho Ae monn

The Qeena of y
Contrcinty proderne ave

Column ,AOe didoral )


URtrg ba¢trathg rOlen uhich

problen i
X
nethe X
S2

tion
X|

vopleufo;
The aetofion: pomibite soloficn eve
(2 3)
S2 (3 4 2)

2:

ng Gragh cdovig
n Eirah colorig pr kem oe have to fird at oheher
CAll fhe ve fees of the qven gnaph aYe colbued o nat oith
the omtraint ,tat no foo adjacenf verficer.ht e the
color
chyonatic nmber: The minim nurber of coloy s etd b O0
A

c gu A called its chrorratic color


rah
aheeVset of veYficee
Eset of edge.
for eampe ef tate
Color the graph
mtnimun coloA and
follang Contreints.
R P

B
Hami tolian cycle:
A Hamiltolan ycke ia a cycde cohich con tatng
tHamiffol ian rah.
iomi Itblian gyaph: Ge homi Itolan qaph
A qraph u aid fo
if ite Corfan a namiltoan cycle
raph,ercpt «tart ode, ofher nodes ahay
Jr hami folian
not be repeated.
tamiflan path:
Jn a connected groaph ,an open path that viaite eey
Vefes of 6vaph 6 esacty once

Yepeaed
34 doa not hae hami tolion ufle,
so it k not an thmi (tolian qoph.
orcton

14 jnctio it preent in the aph,


hian
1hatte graph ie not an thmi
gagh.
:)

M2- -3-56--)

Pamilfoan cye therc

You might also like