0% found this document useful (0 votes)
13 views

Unit3 Tree

The document provides an overview of trees in graph theory, defining key concepts such as root nodes, branches, and types of trees. It discusses tree properties, traversal methods, and applications of spanning trees in network planning. Additionally, it outlines algorithms for finding minimum spanning trees, including Prim's and Kruskal's algorithms.

Uploaded by

mayurpanchal5514
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
13 views

Unit3 Tree

The document provides an overview of trees in graph theory, defining key concepts such as root nodes, branches, and types of trees. It discusses tree properties, traversal methods, and applications of spanning trees in network planning. Additionally, it outlines algorithms for finding minimum spanning trees, including Prim's and Kruskal's algorithms.

Uploaded by

mayurpanchal5514
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 22
2 ee UNIT-3 TREE i cs cabled A rannteted onli graph A Cf tan tod In, ptran words, 9 OO” rae Definition calisd o tree a tAe- graph witth no ups is THEOREM >: Ln corr 94 undinected saph, a tut uc ov werticnt has n-t vat Et Lab : « 6 c a b : 2 b i eo ae = NOT A Tree a tece Net ee G Root NOP » ROOT NODE b a ¢ ‘ e ra, 4 e { q A TREE WITH ATREE WITH Root &? TREE wits no et oor SE @ ttnbcnicel a ct feral: aus dil TuMPoRTANT TERMINOLOGIES IN TREE ROOT NODE : Thy nodLat Utlop of tue tur U called a dest ralt, — Root Nove BRANCHES, : The Qolges 04 tree graph ane called bronchus The wertions 04 bree ayy called naoles ; : ir : + NObES : tele c Antrstor 94 any NT NODES The node whith U par Pare nooks ty Ud 2 parrnt node oR root 4 a parent A wen erty than ° Ag ue bod Be BL Mare ehildun nolL - : : werten with dusceosers B CHILDREN NObE ; oe 2 Baird © OAL Ly child Sf : nao 34 A.” : . ° ‘ Het Boome part ex SIOLINGS Nope 2 Children, wtih, ee a 1 | Degath of Nade | The ole of a rool, Hoprss rts the total Grumble, Of children ur lt. riphe be Harpht of Get ; The heigat of a tree OH gen oy the Len, of Oe al ee lo a Ley on eS wath tine total reer % OG Depth 66 Gee: The numbur of ian Depth o Aire £ Maeght ca] Example : De er neds 62” iso The alegre 64 node tyr is ri The bork % 74 3, C bonged pot. is 1.-3-7-4) Root naole . Leweb of atree $ Lah stop from lop te bettem Ls Coed ~ | we? Level © eo — Level & — Leveh2d PRoPERTIES OF TREE There 3 4 Uniqs pal eteasen, wiry path af veratizres wna 2) The numler a 3 ib ane Le Chan, the rumor 04 meric in a Troe 3 Thing us no cireuth in a tren. Types OF TREE. Oinanyg TAR: A lina tah ths at Qa cae end ere dey Ae Not- 6s Cree Banany fret eS 1 | ‘ 2) Fuld | 4 Tape 2 A fuu ae A & > Net full Qunsry Tree 7 E | (o) Binary Tare! df ol He leoues 94 Oo A PHU binary tree ars ok Learol “dl? ai Cork dure G@™ Ate AF A Comple a epth ab, — Levero — Lever a - LeveL L TREE TRAVERSAL . A trornrarsal of a tree Wa procs to trae a TA tin ivi eikeal So Hat enely vein in wait vests one oh Procrolurrs fot mratitadly ul ee tapers ola et The Hire nrart commonly Lusso tras traersels One: 1 Prroroles Crorersot 2 Ureroler, rarer S$ Peatoroler, trmurersol PREoRDER TRAVERSAL Exame te Dekuming in usttel. 5 got Widity Ux i : PrP eroley Gorn but T iw ie *$ Pun rolred Ave ted, |Salution: STEPS FOR PREORDER TRaVEsAL. STEPL : At finat te foot Ui he wlarled se nade? > Fiast Roor STEPS) Neus Prom naole €r? mie ull rorrerstd Ww nol Cv’ STEP GC: a . ep STEP 7: Now fram Neds “Rw wit te noode‘u . ing Une order in wtb an Example pean ser atc! wanna 04 ths ginth erolrrod Aoold rer Solution: STePi: The dept on STEPS: Naw from noole “> maute to node 5. STEPQ. ine hot completly Corerpid to Left subtree, Neus ure mour to hoot rool. be node L + HU he wetted . STEP E> Nous from B @ Perterdids Tronrrnl Parterdr, tronvunk Udipinud a type of tus damarennal witiel fallout His Lift - Ruybt Root Pelcey Luek Uot for early « radls. © Poh Lept wirbtee, Uo averid fot e Thkn te Kt abe tra vorrrd «Finally Hin root nade fh oe subi U tornud Expo: Dolegmians bas ero Ln ii pact order Daursal WA Us verti of prem erodod Rested tye Ton fig : SOLUTION: Frat we Sone + Lapt euubteee . The Role ty wn eat Legt . Thearfore fork vse Ud dehacoby Sa WAL nose ty, A. . Lut ete 2 i Wartad comp STEP. AS ON tt grr rer TANT opty ra wk 3 Bt THAR fat nade ‘s' is Weiked " STEP3: | STEP A: | 4 eo? ZN OSS oN ay, sTEePs: AU Ut dublares 6f neole 3 arg Trarrersed: Lo pow naoslt % de wiuted secede tla laeg! = qudoproth 'S'4 graph O Sp Tres A conn ted AUN q(v,e) & sasd to las Mrerrerg tree 144 od ey alt vertices of a) &6" Uroudd cordon G b) fs? uaewtd cordaun (ult) edges b c Qe) he qonerctel fram abet graph about: fr SG prk a) A e A @ Eee > me = os ee ie | i | VY D €. Applications of the sparrrg Cue: ; A C tree UU urssd to prod % minimum path a) Crth naturork Planning >) Comb utr nelurork, routing preteen. ea 4) Theat tan Le morn than ent thanning Ther ay g Cannesksd groph G, RDA kpanring tur Lars rab Nae any cycles 0% Loop sd A Apanrning pay bo Uyelre. GY) Thear aan Le a mantmum nn no, Q Sparring truss Hat con be created trom a Cenplatr “gro . 5) A aporrang ter hos n-1 edges, Wher na ithe 02 Q naooles . 7 © Medrools for Cons A SPAnning tant for g Connetted Unmple Grape. There. ars mainly 1 6 Uk oe : dpanning Bir in a Lingle Cannteled grab ng 4: Depth Pint Learelr : 2° Basalth First Searnlr, gabe, Faust Loaner . The depth fat earthy of OFS meted focuses OA enplorss Prete ond Graphs. Tha dn tik metlad nin bhort at Aoot Made (dy tHe care ha qvaph, 20, Ono Canines bramah Of for of porsint, befor bark, ‘ Ex aMPce S a 6. bo Prem ‘4 me wikit te te? clan't hone to mou further, bo again prea batitnath te ‘4! from 6), New from ‘y’ mie. : Te Wort 2% Bo we will mous ty ba From <3" ma haat oflion to mort le 7. So, wie WU mor to nroole t7) | Agwin, we Asathed at tHe wd parm Wie den't hows any eflvon. Ener wrt bark breed We olan't get ong baherg Thunporr, fend Seguence, wat aur £79244 > 654-674-377 | Beadth Fast Seana de & pracedurr for conrtrn0tty O. Spanning tree, A begins Ly arbibanily chosing a root from Us Ves of tin Guru connited graph. Atharding to the Breadth Fret Sort, you mot Bosra “he raph rn a brraslthuurs, olireelion * To Lregin , mour hertzan lolly ond ufsit all He Crrint Loyer's nodes Corinne to He not Layer's nodes. Canbinass Us Ht nant layer,’ @ Prem's) we move Le The fine! sear & as follats £399 BAHT Kintmun Spanning TAs COR Minimum bieight aT oner A and Minimum D, A ueener a cpanrang “un on be ibn it muni, tre tuum of ta wernt Ue mild mun + x hl kraus Hoar tarry ee A OM TbeoLk tl. oT} 1 Minin dparring TA 2 Algertthms for wSnmtion ipmraing Tate: - A minimum bparng rer cor he ae ee. Prbh hy ung the algarltams = : ) Prtm's Algerttrn 2) KYutal's A la eatthen, G. Abr Zino noose 2 L2ht, Horsjor D kaAaAho'S Algorithm @ 1) cheare an eolge Of miun'mol unerght Wi) At Carl bhep, Crosse the edge ust O48 nelson uth wet croote corust WI 84 G hab RW EAA Lop ap lr Cai] gts 6 alyeritnm, fra te Exourple » minimum &parnong "but fb tas paph Prim's Algo : Mortung Rabe Fy Celeet Veter curd neste a) cunight Hey & * adges Smallest I) Ok cate dager, cheese tat ade oan See envoy Rn nat et ade Ex ounple * ee Se 7 oe. Mini naal masighk = aesettr2 =8.

You might also like