PPT-CSC317
Author : liane-varnes | Published Date : 2017-08-29
1 InsertionDeletion in binary trees The operations of insertion and deletion cause the dynamic set represented by a binary search tree to change The data structure
Presentation Embed Code
Download Presentation
Download Presentation The PPT/PDF document "CSC317" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
CSC317: Transcript
1 InsertionDeletion in binary trees The operations of insertion and deletion cause the dynamic set represented by a binary search tree to change The data structure must be modified but preserve the . 1. Equal costs at all levels. Root dominated. L. eave dominated. CSC317. 2. Master method. a. . subproblems. n/b. . size of each . subproblem. f(n). . cost of dividing problem and . combining results of . Breadth-first search tree: If node . v. is discovered after . u. then edge . uv. is added to the tree. We say that . u. is a predecessor (parent) of . v. . A vertex is discovered at most once.. Run time: . algorithms. So far we only looked at . unweighted. graphs. But what if we need to account for weights (and on top of it . negative. weights)?. Definition of a . shortest path problem. : We are given a weighted graph . Overarching principle – Take the choice that looks best at the current moment.. More efficient than dynamic programming . Always make the choice that looks “best” at the moment (just one . choice; . Cost to interview (low . C. i. ). Cost to fire/hire . … (expensive . C. h. ). n. number of candidates. m. hired. O . (. c. i. n. + c. h. m. ). Independent of order of candidates. depends on order of candidates. Problem: Let’s consider the calculation of . Fibonacci . numbers:. F(n) = F(n-2) + F(n-1). with seed values . F(1) = 1, F(2) = 1. or . F(0) = 0, F(1) = 1. What would a series look like:.
Download Document
Here is the link to download the presentation.
"CSC317"The content belongs to its owner. You may download and print it for personal use, without modification, and keep all copyright notices. By downloading, you agree to these terms.
Related Documents