Address
:
[go:
up one dir
,
main page
]
Include Form
Remove Scripts
Session Cookies
Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
202 views
14 pages
Daa Notes Unit 4
daa notes of srm
Uploaded by
Hrishikesh Vasantham
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save DAA NOTES UNIT 4 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
202 views
14 pages
Daa Notes Unit 4
daa notes of srm
Uploaded by
Hrishikesh Vasantham
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save DAA NOTES UNIT 4 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 14
Search
Fullscreen
or = vatlr. iv = Intropveran % Bacerenckin, & Beancy aw Bounp a a — oe ome Backtracking ak Ls sme af Ahe problem aalving approach Ao ausign algoxcthns Jo dolve Problees ¥ Or follows Arte - forct opproak. gb dues out alt possible tolubons fr a problem and selects the deated —doluhon the -disied olubon wilt Le chosen Jbaxd on the Constraint queen Zalled as rounding function s Assume 3 persons Pi, Py and Pg to te arvianged in 3 cheins Possible ways do oooange 4s 312 6 Nop. ¥ Solubon 4s mepresented as a Aree called cu State - Space fee dt Constrids state spon tree fottewing Depth Fist Seaxch (Drs). atts eee + Assume a Constraint. Pr should not be placed in the [middie Thin ads on a bounding furor Pe Kiled Boun. Condithon; : s [Branch and Bound i | ae wae i ce As that Yt se similar to backtracking © only yen ath Ent Scanca ler’ at Cconstrucls the Atale Apa Faw sing Brea N- Queens Problem - +The problem is do place h. queen on two queens cittak each other dy berg dn on the same an Nxn chessboard 4o that no Aho same Aow or An Abe ame column or pe # Sina each ef dhe jou qpens Bos do te phaud in ib sum now, alt ave nud to do is tb omign der cack queen a column < queen | @ 1 flee queen 2a [Te queens 4 ft 1d fe queen A Stont with empty boord and than plan qpen | dn te Fint possible position of ils wow, which i in column | & mol, 4 ohen pla qpeen 2, aftr douying ansucussfalty column | £2 in te ae accessible posihen fay ik, ushich is squam (2,3), th Aqua row 2 and column 3. This proves Jo te a dead end ‘becouse Hux i No acceptable posihan for queen 3. | * Hen, the abgorithn harktyads and pubs queen 2 in the next | posse posibion ot (a,4). Than queen 3 is placed at (3,2), which proves to be another dead end. ae algorithm then backtvacks Ot te way + gpeen | roves it to (2). Quen Q thin goes to [aiy) queen 3 bo (3,1) Land quee oe | queen 4 to (4.3), thick is a adlutin to the Problem . | 1 GndNS re x faa) Solubon the State - spac bes # The diagram represents by backtracking « xX denotes an oF solving He H-queent problem unsuccessful attempt to place & queen in the unditated Column. The Numbers above the nodis Anclicete Ame ordea in which the nodes re qervretil Sve Of Sveser Feostem: ihe Sum of Subse problm ay Jo faa O subset of a gen | ate A= Sars: On} of nm posihie dakegoe Or dar de Lan (whose Aum ds 2qpok do 4 given positive antag. ad FEvampk - for A=f1,2,6,6,84 and A=, thee on 2 _ dolubons stp aby and fie).| * She Abate, Apae fa: can Le constructed as a binoy bud [The most of ie tus Supsusents the staking point , with no [decisions about the Ger elements made os yet * Os Dep and ought children reprusent , suspectivelyy , in Lusion | Qnd exclusion ot a: vn oh dee Ateing sought. Simikerty ry b | te Lee from Q node of the fist ie Corresponds do inclusion M2 while gorhg to Aight Corresponds Jo ih xctusion and Som FThus, a path rem the Root lo @ node on the it level Hake hee uhdlicates soho of te pout numbos shave been indded in the subsets Aaprisentied by that node * Recovd tre vals of S, tre Sum of the numbis ,io the node SF 2 43 equal do A, we hare a solehin fp dhe problim Ne Con either xpos Abis resubl and stop tor) if oll adhe solubdns need to pe found, Conbinue doy te bacrtraucing do the node's parent - SP gs is not equal fo a, we con terminate the node as neon Promising \f either of the Following 2 ineyraditics hold : Sr Oy, >A (te gum sis tvo large) StB aj <4 (the Sum Sis too Smal) Jen gorithm £ Time Complexity of Sum & subsel ie 4s 0a") Suma Subsets (6k, a) ‘ T cteyet; AL (At Wigs =m) then waite (x tik) ; abe if (St WTRLE Ws Teer yes) Hen Sumefsubsits ($4 WER], kel, A- WIRD)! 4 (Catn—-ulk J >= m) ond (o+Htkricrm)) tren 1 xtki-0; Sumafsubsets (A, +1, A- WEI);Rempe A=TBS TY at dig ae = - with 5 Ne with, wlo x b 6 Oriacls | \* WHT IS win ee Mas BIe uae Bee eo Solubon x B
RAjaceney matrix of Graph . O—D 3 @ &) ase 0) -/ P/O us DAdjaeney dist oF raph © 7 CB-LTEES ER?6EPrasany ED-ary Harattoninnt Creer: RHamitboruan ceveush lor) Hamiltonian cgcle | - Given a | greph, Atak o vertex , visit all Other vechies Un the | Graph 2x0 Utly ent and Aetum back to the Alek verter | # Diver graph , Can Le etther olivected or undirected but [ib must be Connected This is NP head problem. gt tates exponential hme to fend out | Geample | Cycle | — A,B,C,D, 6, F,.8 | oy J Cycle 2 - A,B, F,E,D, 1A E © iS (yde B- A, F,B,€,D, 017 B,C, D,€,F,A, B- Similar to tych I * Graphs sith axtiudabin pot and pandank verbirs | sill not contain Hamiftonion cycle Aamiltonian cycle in grreph .| Solubon 5 Consider He problem of Finding a Hamilkomdn circuit in [HR teen graph. Nithouk on ot gennalily, coe Can omums | that ah w Hromilboruan vault ais , ik starts at vetlen o , vortex a 4s made as the root of the State -Space i | accordingly | | 1 Using He alphabet ordi fo break the Hae way tis emong| Ahe vabius adjaunk to A, +e pelece vertex b. From b, the [algorithm procuds de ¢, ten fo A, then to @ and Soaly & 4 which pwres te be a dead and | | 4+ So, tne al gorithm batktrads fom £ ay e, then tod, | and thin 40 6, awhich prondss Ene fist alkanabive for tu | Odgorithry fo pursur - | | ’ Going From ¢ 40 @ gventually proves ules, and Ue | | elgorthm has to backtrack Bom 2 bc ond thin bb, | || | Sey cromichea pik goes, ee ues hye, 2 and a aohch ib can depitimatily rebum to a, -yielcling Hariltond Cirust a,b, 4,¢,0)d,a. T And obher Hamiltonian Greuit , Continue this prow at by backtracking fom tra Leaf to the Aoluhn found Algosithm « | Hamiltonian CR) Nentvertex (k) | 4 do t ‘ : | Noxtvertex (k)> xfkj= x Tea} mod CnH); i >} (atk) =-0,) +f (xIk}]=-0) aban } ns # COT ACR-D, xf&) L=o) 4 Ck==n) ea k-1 Prink (xTh-n3); iP Cxtjd =2xTh)) than break, else woe ' tyee8) Hamiltonian (h+1); | ee MP (ken) oxlee=n) ond io y3 G[xtn} xt 1-0) | vohum | 3 | Brance Awp Boon: | * Branch ond bound is a Aystematie method for solving | optimization pproblims - Branch and bound vis a rath genual | opheriaahin Fechnique Arak applies aohorr the qnedy wmethod [and dynamic programming oils | & However , dk is muck slower. Andeed , at after ceeds to a stir, Comp Rexibies in the wont com: On te ofr tsaund 2h applied Larfully , ik ean dead to Algovithms that ren veosonably fost on average » * The genral 2820 ee branch ancl bound 48 a BPS peer | Aeon for ew ®pkmal Soluhen , Aout nok okt nodes got CxpandadRather, © Cosehully aActeced Coerion datauminus which node # | pond and when, end anotha writeion tells dhe algouitn | ae an ophmeal solubim has been gound | [knapsack Peostem : | Grier items of Rnown sweights wy and values Viv | ja eua. yh Gnd oO knapsack of capacity W, find the most | [votuabl Aubset of the items sthak fib in the heapsack. | le JE Convenient to order the iems of a given instane | Jin descending ordin by than Value fy wait abies Thin the | fink tem gre the bok Paget per sought sunk and tu | [ost one gives dhe avons payott pe vasight unit, with des | resolved arbitrarily : i Vilwi & Yalwe 2 - = Va] vin i Each mode on the ith Lwel of Ahn bee , 0 Si
polar D> | | pliky + Dik JD ths ot the Shorlst paths | Long te vertices) with No intermedial vata. Vertices numboud jntermecial not hugher than oie, gust @ Lengins ot he Shortest paths ial intermediate vations numbered er ugh than 2. legis @ and & | Gece al ; a ‘ to 3 P| Lengths Ah the Shotlest paths with Soleo s \6 intermestiale vertices numbered nok e| 4 ot 4 te) Ob and © A\ le ale 2 = } 4 4) bongtts BP the chrtot paths with 6 | intermedia verbiets num bated” nate 1 high Hon 4, @) a,b, cand d. Se oop esa pos °
You might also like
DAA Notes
PDF
No ratings yet
DAA Notes
10 pages
AI Ch-14 Inroduction To Prolog
PDF
No ratings yet
AI Ch-14 Inroduction To Prolog
15 pages
r22 1 9 ML Lab Manual r22 Regulations
PDF
No ratings yet
r22 1 9 ML Lab Manual r22 Regulations
24 pages
Ai Unit 2
PDF
No ratings yet
Ai Unit 2
135 pages
AI Unit 1.
PDF
No ratings yet
AI Unit 1.
15 pages
DAA Unit-2: Fundamental Algorithmic Strategies
PDF
No ratings yet
DAA Unit-2: Fundamental Algorithmic Strategies
5 pages
Unit V
PDF
No ratings yet
Unit V
67 pages
Cs-3491-Ai-Ml-Lab RECORD
PDF
No ratings yet
Cs-3491-Ai-Ml-Lab RECORD
59 pages
Machine Learning (6CS4-02) Unit-3 Notes
PDF
No ratings yet
Machine Learning (6CS4-02) Unit-3 Notes
21 pages
Informed Search Algorithms in AI - Javatpoint
PDF
No ratings yet
Informed Search Algorithms in AI - Javatpoint
10 pages
Unit 4
PDF
No ratings yet
Unit 4
26 pages
VTU Exam Question Paper With Solution of 17CS73 Machine Learning Jan-2021-Swathi Y
PDF
No ratings yet
VTU Exam Question Paper With Solution of 17CS73 Machine Learning Jan-2021-Swathi Y
7 pages
Ontological Engineering
PDF
No ratings yet
Ontological Engineering
17 pages
@vtucode - in Previous Year Merged Paper Solution Automata
PDF
No ratings yet
@vtucode - in Previous Year Merged Paper Solution Automata
42 pages
AI 2marks Questions
PDF
100% (1)
AI 2marks Questions
121 pages
CC Unit-5
PDF
No ratings yet
CC Unit-5
19 pages
BCA 2 Year Syllabus-1
PDF
No ratings yet
BCA 2 Year Syllabus-1
21 pages
Javalab File
PDF
No ratings yet
Javalab File
167 pages
Experiment - 6: Aim: WAP To Implement Water Jug Problem Using BFS. Theory
PDF
100% (1)
Experiment - 6: Aim: WAP To Implement Water Jug Problem Using BFS. Theory
3 pages
Unit V Graph Structures
PDF
No ratings yet
Unit V Graph Structures
39 pages
Methodologies For Stream Data Processing and Stream Data Systems
PDF
No ratings yet
Methodologies For Stream Data Processing and Stream Data Systems
20 pages
UNIT2
PDF
No ratings yet
UNIT2
25 pages
Bottom-Up Parsing in Compiler Design
PDF
No ratings yet
Bottom-Up Parsing in Compiler Design
20 pages
P and NP Problems
PDF
No ratings yet
P and NP Problems
4 pages
ABES Institute of Technology Ghaziabad: Lab Manual
PDF
No ratings yet
ABES Institute of Technology Ghaziabad: Lab Manual
23 pages
BD - Unit - IV - Hive and Pig
PDF
No ratings yet
BD - Unit - IV - Hive and Pig
41 pages
Basic Terminologies
PDF
No ratings yet
Basic Terminologies
8 pages
M.Tech (CSE) Big Data Analytics Curriculum
PDF
No ratings yet
M.Tech (CSE) Big Data Analytics Curriculum
69 pages
AL3391-AI Unit IV
PDF
No ratings yet
AL3391-AI Unit IV
65 pages
ML Unit-1
PDF
No ratings yet
ML Unit-1
26 pages
R24-M.Tech (CSE) Course Structure and Syllabus
PDF
No ratings yet
R24-M.Tech (CSE) Course Structure and Syllabus
73 pages
Applications of Binary Trees
PDF
No ratings yet
Applications of Binary Trees
4 pages
Question Bank 1to11
PDF
No ratings yet
Question Bank 1to11
19 pages
Knapsack Problem
PDF
No ratings yet
Knapsack Problem
4 pages
Unit - Viii Machine Dependent Code Optimization Peephole Optimization
PDF
No ratings yet
Unit - Viii Machine Dependent Code Optimization Peephole Optimization
9 pages
BDACh 02 L01 Hadoop
PDF
No ratings yet
BDACh 02 L01 Hadoop
24 pages
Lesson 10
PDF
No ratings yet
Lesson 10
27 pages
Page Replacement Algorithms
PDF
No ratings yet
Page Replacement Algorithms
10 pages
Practical Lab File Based ON Programing in C: Submitted by
PDF
No ratings yet
Practical Lab File Based ON Programing in C: Submitted by
6 pages
Factors and Tables
PDF
No ratings yet
Factors and Tables
10 pages
Android Interview Questions PDF
PDF
No ratings yet
Android Interview Questions PDF
24 pages
ML LAB Viva Questions With Answers
PDF
No ratings yet
ML LAB Viva Questions With Answers
10 pages
Os Module of Python
PDF
No ratings yet
Os Module of Python
73 pages
AI Lab MAnual Final
PDF
No ratings yet
AI Lab MAnual Final
44 pages
Lesson 1: Structure of A Compiler
PDF
No ratings yet
Lesson 1: Structure of A Compiler
20 pages
Cloud Computing Unit-1 Notes
PDF
No ratings yet
Cloud Computing Unit-1 Notes
12 pages
R Language
PDF
No ratings yet
R Language
59 pages
ML - CSA 301 - ML Perspective and Issues
PDF
No ratings yet
ML - CSA 301 - ML Perspective and Issues
34 pages
Python Lab Mcan 191
PDF
No ratings yet
Python Lab Mcan 191
35 pages
BDA Unit 1
PDF
No ratings yet
BDA Unit 1
10 pages
DAA-2020-21 Final Updated Course File
PDF
No ratings yet
DAA-2020-21 Final Updated Course File
49 pages
Malware Forensics Introduction
PDF
No ratings yet
Malware Forensics Introduction
16 pages
Aiml Complete Notes
PDF
No ratings yet
Aiml Complete Notes
57 pages
ML Unit-3
PDF
No ratings yet
ML Unit-3
92 pages
Python Application Programming - 18CS752 - Syllabus
PDF
No ratings yet
Python Application Programming - 18CS752 - Syllabus
4 pages
UNIT 2 - CS3401-Algorithms
PDF
No ratings yet
UNIT 2 - CS3401-Algorithms
22 pages
Unit No.4 Parallel Database
PDF
No ratings yet
Unit No.4 Parallel Database
32 pages
Subsets, Graph Coloring, Hamiltonian Cycles, Knapsack Problem. Traveling Salesperson Problem
PDF
No ratings yet
Subsets, Graph Coloring, Hamiltonian Cycles, Knapsack Problem. Traveling Salesperson Problem
22 pages
DAA Unit-5 - Merged
PDF
No ratings yet
DAA Unit-5 - Merged
17 pages
Daaunit 4
PDF
No ratings yet
Daaunit 4
28 pages