# Register now to access 7 million high quality study materials (What's Course Hero?) Course Hero is the premier provider of high quality online educational resources. With millions of study documents, online tutors, digital flashcards and free courseware, Course Hero is helping students learn more efficiently and effectively. Whether you're interested in exploring new subjects or mastering key topics for your next exam, Course Hero has the tools you need to achieve your goals.

2 Pages

### 2008-04-30

Course: CSCI 1902, Fall 2008
School: Minnesota
Rating:

Word Count: 571

#### Document Preview

1902 CSCI - Spring 2008 - Lecture 27 - 2008-04-30 ----------------------------------------------- Last time - Binary Search Trees Agenda - Binary Search Trees - Deletion - Some problems - Data structure problem ============================================================ RECAP - BSTs are a second good way (in addition to hash tables) to implement the dictionary interface. - inserting a key,value...

Register Now

#### Unformatted Document Excerpt

Coursehero >> Minnesota >> Minnesota >> CSCI 1902

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
1902 CSCI - Spring 2008 - Lecture 27 - 2008-04-30 ----------------------------------------------- Last time - Binary Search Trees Agenda - Binary Search Trees - Deletion - Some problems - Data structure problem ============================================================ RECAP - BSTs are a second good way (in addition to hash tables) to implement the dictionary interface. - inserting a key,value pair - Make a node whose data is an Entry (key, value pair) (The node must be comparable, with comparison done based on the key) - Add the node to the tree - Looking up the value for a key - Search the tree for key - In both cases, the efficiency is O(log n) *if the tree is balanced* - Advantage over hash table implementation - Can produce a sorted list of keys in O(n) time - EXERCISE: How? Recall the definition of a BST and the traversals we've defined ==> An inorder traversal - ??? How would you do this for a hash table? ============================================================ - Deleting a node from a BST: 3 cases - Node has no children --> easy - Node has one child --> easy - Node has two children: not as easy! - Key requirement: - Must keep the BST a BST - I.e., for all nodes: - Children in left subtree are smaller - Children in right subtree are larger - There are three cases to consider: - DRAW A TREE THAT ILLUSTRATES ALL THREE SITUATIONS - (1) delete a leaf: - Easy, just delete it. - (2) Delete a node with one child: - Delete node - Attach orphaned child to tree where deleted node was - Still a BST - (3) Delete a node with _two_ children - Harder! - If we delete the node, we are left with two orphaned to children deal with. - TASK: - How can we fix this? - Take a few minutes to try to figure it out - HINT: SHOW A TREE WITH THREE NODES, DELETE THE ROOT - How can we do it? - Don't do it! - Aside: a good programmer knows when to be lazy! - We are side-stepping a hard problem, turning it into an easy one - Reasoning: - Let's list the children of some two-child node R: a_n < a_n-1 < ... < a_2 < a_1 < R < b_1 < b_2 < ... < b_m-1 < b_m - Because R has two children, we know that n >= 1 and m >= 1, specifically, b_1 _must_ exist - If we replace R with b_1, we can keep the BST property - This is the key - b_1 will: - be the leftmost node in R.right (inorder successor) - have at most one child: otherwise, some other node would be smaller! - Delete b_1, which we know how to do - Replace R's value with b_1's - (Similarly, we could use a_1 -- arbitrary choice)...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Minnesota - CSCI - 1902
CSCI 1902 - Spring 2008 - Class #2 - 2008-01-28=Last time- Course overview- A taste of JavaToday's Agenda- Quite a few announcements / logistics- Basic Java syntax and structure - The structure of a Java program - Statements, classes, me
Minnesota - CSCI - 5143
Review Resource Access Control Multiprocessor Systems WCET Formal Methods Statecharts Petri Nets Timed Automata Real-Time Operating SystemsResource Access Control Understand the need to control access to resources. Identify primary effect
Minnesota - CSCI - 5143
1IntroductionThere are two main tasks to this lab. The rst is to create some concept of a task. The second will be to create a priority scheduler using the task that you just created. These tasks will be described in more detail below. To test yo
Minnesota - CSCI - 5143
Sheet3BOARD # thu fri Sat Sun mon tue Wed thu fri Sat Sun mon tue Wed Feb 22B1B2 Mirzaei mcgowan mcgowan mcgowan mcgowanB3 phillips phillips phillips phillipsB4 chang thompson thompson thompson thompson changB5 bailey giraud giraud giraud
Minnesota - CSCI - 5143
Real-Time and Embedded Systems, Spring 2007 Lab 3. DUE: Friday, May 11. 11:59 pm This lab has two parts. First, you will analyze and report on your design decisions for the scheduler that you wrote in Lab 2. Second, you will perform a timing analysis
Minnesota - CSCI - 5143
The following is a list of goals for the last half of the semester. All of these topics were covered in class. As you can see, there was a significant amount of material covered, however, it was very much a survey of these topics, not an in-depth ana
Minnesota - CSCI - 5143
Real-Time and Embedded Systems Homework 2 : DUE Tuesday, April 24 (start of class) 1. You have designed and implemented a small embedded system and now it is time to perform a WCET analysis. a. You are considering both static and dynamic analysis. St
Minnesota - CSCI - 5143
Real-Time Systems Agenda Review articles. Overview CPU architecture. Overview memory access. Overview data transfer (I/O). Overview embedded processors (if time).Questions/Comments ? Introduction to Real-Time Programming State-of-the-Art Re
Minnesota - CSCI - 5143
Review and Aperiodic Scheduling On-Line Submission LABToday's AGENDA Lab Questions Review Exam Aperiodic Scheduling NEXT WEEK : Spring Break! NEXT NEXT WEEK Ch 8.1-8.5 : Resources and Resource Access Controlwrite-up hex files for each
Minnesota - CSCI - 8551
BDI Architectureaka the Teamwork paperbaylor wetzel CSci 8551 Agents Fall 2007About The Speaker Grad student, computer science But spend a lot of time in psychology Primary interest: computer models of human behavior Also enjoy recommendatio
Minnesota - CSCI - 8980
BasicsMCMCGibbs SamplingAuxiliary Variable SamplersCSci 8980: Advanced Topics in Graphical Models MCMC, Gibbs SamplingInstructor: Arindam BanerjeeSeptember 27, 2007BasicsMCMCGibbs SamplingAuxiliary Variable SamplersProblemsPrima
Minnesota - CSCI - 8980
Posterior EstimationAssumed Density FilteringExpectation PropagationExperimentsCSci 8980: Advanced Topics in Graphical Models Expectation PropagationInstructor: Arindam BanerjeeOctober 26, 2007Posterior EstimationAssumed Density Filter
Minnesota - CSCI - 5801
Lecture 1 - Class IntroductionFall 2007Fall 2007CSci 5801 - Dr. Mats Heimdahl1Topics for TodayCourse overview Instructor and teaching model What you should already knowWhat to expect AssignmentsCSci 5801 Software Engineering IDr. M
Minnesota - CSCI - 5271
Virtual Machines: Working From HomeHome machines Virtual machines for use with VMware Player on students' home machines have been created. Students can download the file here: https:/wwws.cs.umn.edu/cs_files/virtual-machines/cs5271-VMs.zip Students
Minnesota - CSCI - 5471
CSci 5471: Modern Cryptography, Fall 2007 Homework #4Yongdae Kim Due: Nov 1st. 6 PM. Show all steps. Please ask any questions, if the problems are not clear. Total 2 pages, 120 points (100 pts regular + 20 pts extra credit). 1. Number Theory (45
Minnesota - CSCI - 5271
TRUSTWORTHY OSINTRODUCTION TO COMPUTER SECURITYCSCI 5271 A principal is trusted if it can cause system security to fail. Thus any OS is trusted on the system it controls. A system is trustworthy if our trust in it is well-placed. How do we j
Minnesota - CSCI - 4061
Standard I/O LibraryLecture #5CSCI 4061 Fall 2007What is standard I/O In one word Buffering Known as streaming Concept of FILE object, more than file descriptor NOTE: a file descriptor is a part of a FILE object Single byte and multi-byte
Minnesota - CSCI - 8101
Paper Critique: CSCI 8101 Advanced Operating Systems Fall 2007Author: Inderpreet Singh Date: 10/04/2007 Paper Title: Caching in the Sprite Network File System, Michael Nelson, Brent Welch, John Ousterhout, ACM TOCS 1988.This paper discusses the c
Minnesota - CSCI - 8101
Charles Archer 2920889 Nov 21, 2007 Critique Submission #13Condor - A Hunter of idle Workstations, M. Litzkow, M. Livny, and M. Mutka, ICDCS 1988 Distributed Computing in Practice: The Condor Experience, Douglas Thain, Todd Tannebaum, and Miron Liv
Minnesota - CSCI - 8101
Jou Vang CSCI 8101 10.17.07 Paper Critique: Caching in the Sprite Network File System The paper discusses the Sprite NFS which uses caches to improve performance in the file system. As stated in the paper, caching reduces delays, e.g. block in cache
Minnesota - CSCI - 8101
The Generalized Tree Quorum Protocol critique by Eric Seppanen This paper provides an interesting approach to data replication: the goal is to reduce the number of representatives needed to form a quorum (whenever possible), and to degrade gracefully
Minnesota - CSCI - 8101
Scale and Performance in a Distributed File System critique by Eric SeppanenThe Andrew File System make a good counterpoint to the design of NFS, because it has chosen the exact opposite direction in one key aspect: Andrew chooses to have clients c
Minnesota - CSCI - 8101
Design and Implementation of the Sun Network Filesystem critique by Eric Seppanen NFS is well-known as the standard *nix network filesystem; while its success can be attributed to its non-proprietary design as much as anything else, the decisions and
Minnesota - CSCI - 8101
Paper Critique: Design and Implementation of the Sun Network FilesystemJou Vang CSCI 8101 10.11.07The paper provides the design and implementation of the Sun NFS. The authors also discuss challenges faced in developing and design the file system
Minnesota - CSCI - 8101
James J Greensky CSCI 8101 Advanced Operating Systems Attn: Professor Anand Tripathi Personal Critique of Persistent Personal Names for Globally Connected Mobile Devices In todays tightly connected world, a person can now work, bank, shop, etc. right
Minnesota - CSCI - 8101
Jou Vang CSCI 8101 09.13.07Critique Paper: Active Names: Flexible Location and Transport of Wide-Area ResourcesThe decreasing number of available IP addresses and naming convention discrepancies have become significant obstacles to overcome in de
Minnesota - CSCI - 8101
CSCI 8101 Advanced Operating Systems Fall 2007 Author: Abhishek Rawat e-mail: rawat@cs.umn.eduPaper Critique: Sept 25 Paper Title: Lightweight Causal and Atomic Group Multicast Introduction: The paper elicits the development of tools to enable gr
Minnesota - CSCI - 1902
Last- priority queue ADTToday- fast priority queueNext- more queues and PQsRead- chapter 24Queue implementation- based on List or Array - where to remove/add? Performance?- based on linked list- based on circular List/ArrayQueue Imp
Minnesota - CSCI - 3081
ADDITIONAL NOTES ON POINTER PITFALLS=Since I went over this rather hurriedly at the end of class, hereare some more detailed pointer pitfall notes:Pointers, while useful, are notoriously hard to work with. Lots ofthings can go wrong, and when s
Minnesota - CSCI - 4011
QUIZ 6INHERENT LIMITATIONS OF COMPUTER PROGRAMSCSci 4011(1a) The language L SPACE(t(n) if:(1b) The language A is polynomial-time reducible to B, (A P B) if:2. The language A is PSPACE-Complete if:QUIZ 63. Give a complete winning strateg
Minnesota - SENG - 5831
CSCI 5143 / SEng 5831 Real-Time and Embedded SystemsTodays AGENDA New Schedule, Web page Controlled Systems Introduction to The Scheduling Problem State of the Art Review Paper (if time)Real-time SystemsA system that must respond well in a t
Minnesota - CSCI - 4011
INHERENT LIMITATIONS OF COMPUTER PROGRAMSCSci 4011SPACE COMPLEXITYDefinition: Let M be a deterministic TM that halts on all inputs. The space complexity of M is the function f : N N, where f(n) is the rightmost tape position that M reaches on
Minnesota - CSCI - 5105
CSci 5105: Foundations of Modern Operating Systems Programming Assignment 1 A Simple Load-Balanced Compute Cluster Due Wed Feb 21st 2007 at 11:59pm OverviewYou will be creating a simple interface for starting processes remotely via RPC. Simple load
Minnesota - CSCI - 4061
CSci 4061 SyllabusIntroduction to Operating Systems Spring, 2007 4 credits When and Where Class: Tuesdays and Thursdays, 12:45-2:00 in EE/CS 3-210 Lab (Section 2): Mondays, 12:20-1:10 in EE/CS 1-260 Lab (Section 3): Mondays, 1:25-2:15 in EE/CS 1-260
Minnesota - CSCI - 5105
CSci 5105: Foundations of Modern Operating Systems Spring 2007 Programming Assignment 3 Replication &amp; Consistency Protocols in your DHT-based File System Due Wed April 25th at 11:59pm OverviewIn this assignment you will implement replication and co
Minnesota - CSCI - 4011
(1a) The language LTIME(t(n) if: (1b) A language is in NP if:(1c) The 3SAT problem is the language:2. Let PLEN = { (G,s,t,1k) | G is a directed graph with a path of length at most k from s to t.} Prove that PLEN NP. findPath(G,s,t,1k) = mark s
Minnesota - CSCI - 5511
Introduction to Articial IntelligenceLecture 1Dr. Tom Nurkkala January 18, 20071What is AI?Basic Landscape Key Point 1. Fundamentally, AI seeks to understand and build intelligent entities. Two dimensions 1. Thinking (behaving) vs. Acting (
Minnesota - CSCI - 5221
! &quot;# ( # )\$ * -% &amp; &quot;# +,'8 4 % # % &quot;&quot;#&quot; 4 \$#: # - . .# - . . &amp;# ! &quot; # \$ % \$ ! #!\$%\$ &quot; &quot;8 ' # &quot;# &quot;% % ' ; # - . . . &quot;# &quot; ' &quot;# # &quot;# % &quot; 4 &lt; =7 ' % \$ / 3 ? -. # 4 &quot; # &quot; &gt;# .&amp;-. #!\$%\$&amp; #!\$%\$ ' ( # \$ #!\$%\$ '#\$ #!\$%\$ ) #!\$%\$ * \$ ' '
Minnesota - CSCI - 5451
GENERAL INTRODUCTION CSCI 5451 Spring 2007 Introduction to Parallel Computing Why parallel computing? A short history Levels of parallelismClass time : 8:15am 9:30 MW Room Instructor URL : EE/CSci 3-111 : Yousef Saad : www-users.itlabs.umn.
Minnesota - SENG - 5831
AgendaToday Statecharts Describing Behaviors Using Statecharts (2003) Statecharts: A Visual Formalism for Complex Systems (1987)Improving Software DevelopmentRequirements \$ \$ \$ \$ \$ Testing \$ Implementation Design Formal Methods 10 Commandme
Minnesota - SENG - 5115
Saturday, January 27Psychology and HCI Project Groups and IdeasFoundations of User InterfacesField of Human-Computer Interaction (HCI)Psychology Computer Science Ergonomics other disciplinesFocus: Design Computer Systems for Humans2SEng 5115
Minnesota - SENG - 5115
Saturday, February 24Turn in Personas, Task Analyses Cognitive Walkthrough HCI Theory and Practice Looking Forward1SEng 5115February 24, 2007Walkthrough AnalysisEconomical interface evaluation low-fidelityprototype development te
Minnesota - CSCI - 5125
AwarenessCS 5125 Loren Terveen March 28, 20071TopicsReflect on awareness systemsWhat's the point? Privacy Consider different techniques, with different pros/cons What do you really need to be aware of anyway? . as exemplified by Ba
Minnesota - SENG - 5115
Saturday, January 27Psychology and HCI Project Groups and IdeasFoundations of User InterfacesField of Human-Computer Interaction (HCI) Psychology ComputerScience Ergonomics other disciplinesFocus: Design Computer Systems for HumansSEn
Minnesota - CSCI - 5221
C stion C onge ontrol and ActiveQue ue Manage e m ntvie P onge ontrol Re w of TC C stion Cple P ula A sim TC throughput formue m nt RED and ActiveQue Manage e How RED works ode raction (optional m rial) ate Fluid m l of TCP and RED inte r e
Minnesota - CSCI - 5221
I nte t Me rne asure e Basics; Routing m nt Me asure e m ntasure e Ove w and I nte t C nge m nt rvie rne halle s Mee ? ode e m nts? Why m asure Why m l m asure e e ? re e ? What to m asure Whe to m asureasure e tools m nt Me: route and pathcha
Minnesota - SENG - 5115
Recommender Systems: User Experience and System IssuesJoseph A. Konstan University of Minnesotakonstan@cs.umn.edu http:/www.grouplens.orgUNIVERSITY OF MINNESOTAAbout me . Professor of Computer Science &amp; Engineering, Univ. of Minnesota Ph.D.
Minnesota - CSCI - 5221
I ntra-Dom Routing and Traffic ain Engine ring evie rne s/protocols Re w of I nte t routing paradigmand routing algorithm I ntra-domain routing designsign, conve nce stability, . rge , topology dee Traffic Engine ring (TE)ngine ring e MPLSa
Minnesota - CSCI - 5221
InterDomainRouting: BGP,RoutingPolicies,etc. OverviewofBGP NetworkDomainsandAutonomousSystems(ASes) InternetInterconnectionStructureandBGP BasicBGPFeatures BGPPathSelectionCriteria ASRelationships BGPPolicies InternetSettlementModels Reading
Minnesota - CSCI - 5105
Below is an email excerpt, with me (TA - Mike) responding to an emailwith some good questions regarding A1, which includes some greatdiscussion about some slightly confusing topics.=&gt; 1. I've been looking for this one online, and have so far be
Minnesota - CSCI - 5801
Class Outline (p. 1)1. 2. 3. 4. 5. 6. 7. Introduction Pre-Quiz Previous Topic Summary Discussion Questions Testing Basics Testing Perspectives Testing Plan ExerciseCSci 5801, Class 11Testing and Software QualityClass Outline (p. 2)8. Terminolo
Minnesota - CSCI - 5271
INTRODUCTION TO COMPUTER SECURITYCSCI 5271HW1 INFOHW 1 involves doing bad things to a Linux computer you can have root on. We will supply a virtual machine to each group. (So you can have root) Each group should send one email to hw1-group@cs527
Minnesota - CSCI - 5525
Course Overview and BasicsCSci 5525: Machine Learning Instructor: Arindam BanerjeeSeptember 3, 2008Instructor: Arindam BanerjeeCourse Overview and BasicsGeneral InformationCourse Number: CSci 5525 Class: Mon Wed 04:00-05:15 pm Location: EE/
Minnesota - CSCI - 8101
Cloud Computing Amazon Simple Storage SystemShanzhen ChenAgenda Background of AWS and S3 Requirements Design Principals Features The paper: S3 for Scientific ComputingBackground Amazon Web Service (AWS) is Amazon's developer facing busine
Minnesota - INET - 4011
Lecture Notes INET 4011Module 9 11/25/2008Overview This talk will include a broad review of the concepts discussed over the entire term, predictions of what the likely trends in computing will produce for network managers, and a Q&amp;A session with a
Minnesota - CI - 5342
Practice Tips Our SmartMusic tests are not meant to be done in an instant. It is very unusual for someone to get a 100 percent in one take. The assignments are meant to be practiced. There is a really good movie about practicing called Tackling the M
Minnesota - CROSB - 002
Markdown Syntax Cheat SheetParagraphs and BreaksMarkdown accepts text on consecutive lines as a hard-wrapped paragraph. Put a blank Line in between to start a new graph. If you want a break: end your line with two spaces. Hard to see in print, but
Minnesota - SOC - 0087