Class Notes: Data Structures and Algorithms
Summer-C Semester 1999 - M WRF 2nd Period CSE/E119, Section 7344
Homework #7 -- Due Wed 21 July 1999 : 09.30am (Revised Date)
In class, we discussed minimum spanning trees (MSTs) and the algorithms that derive MSTs from a graph specification. Using your class notes as a guide, answer the following questions.
Note: The graph specifications from Homework #5 have been used with slight modifications, to make the data structures more familiar for you.
Comments in response to student questions are in red typeface.
* Question 1. Write pseudocode (not Java code) for Prim's algorithm that we discussed in class. Beside each step, write the number of external I/O, memory I/O, incrementation, comparison, and other types of operations employed.
Note in the above description that Prim's algorithm (for MST) is to be used, not Dijkstra's (for Shortest Path). The use of Dijkstra's was a typo...my apologies...
Then, construct a work budget for each type of operation, together with a Big-Oh estimate of complexity for each of the following graph representations: (a) adjacency matrix, (b) edge list, and (c) adjacency list.
* Question 2. Repeat Question 1 for Kruskal's algorithm that we discussed in class.
* Question 3. Given the following graph specification (assume directed edges only) for G = (V,E), write out the order of edges with which Prim's algorithm constructs the MST, starting at vertex a. (The third value (integer) in each edge triple is its weight.) (1 point each):
(a) V = {a,b,c,d,e,f}, E = {(a,b,1), (b,c,3), (a,c,2), (c,d,4), (c,e,5), (e,f,2),(b,f,3)}.
(b) V = {a,b,c,d,e,f}, E = {(d,a,2), (b,c,4), (a,b,2), (e,b,3), (c,e,1), (b,d,1)}.
(c) Analyze the complexity of each case ((a) and (b), above) by constructing a work budget similar to Question 1, but for the adjacency list representation only, followed by a Big-Oh estimate. (2 points total)
* Question 4. Repeat Question 3 with b as the start vertex.
* Question 5. Repeat Question 3 for Kruskal's instead of Prim's, without regard to the start vertex.
* Question 6. Repeat Question 3 for Kruskal's instead of Prim's, using the following graph specifications, without regard to the start vertex:
After completing the matching portion, the students will then answer four questions. The first question will ask the students to write down any similarities they notice in the graphs. Next, they will answer what differences they notice in the graphs. Thirdly, they will describe how they labeled the independent and dependent quantities in each graph. Lastly, they will analyze each graph from left to right and describe any graphical characteristics they notice.
There are many ways which help build rapport with children and young people. One of them is to ensure to actively listen to what they are saying. There may be times were you unintentionally brush aside what a child is saying perhaps it is because you are preoccupied or tired, however, even this can be enough to make a child feel unvalued. Being responded to appropriately reinforces a child's self-esteem. This will in turn help build a trusting relationship. Talking with children, asking and answering questions also helps build their language skills. If pupils are distressed and need to talk about it, they will more likely open up to the person who has made them feel that they have a voice. This is why it is very important to build a respectful and trusting relationship with students, as it can have an impact on most areas of development.
Proceedings of the 30th Annual ACM Symposium on Theory of Computing (STOC-98), pages 151--160, New York, May 23--26
1) I believe that my theoretical curves don’t really match like figure 4 but then again it somewhat does. My immigration curve and extinction curve do hit each other once, but not like in figure 4 where they hit each other twice. Also my extinction curve is going up like in figure 4 and my immigration curve is going down just like in figure 4. So I guess you could say that my curves represent the curves on figure 4.
7. Define the Fibonacci binary tree of order n as follows: If n=0 or n=1, the tree consists of a single node. If n>1, the tree consists of a root, with the Fibonacci tree of order n-1 as the left subtree and the Fibonacci tree of order n-2 as the right subtree. Write a method that builds a Fibonacci binary tree of order n and returns a pointer to it.
I’m convinced that much learning has occurred in this course, both on your part and on mine. So I’m most interested in your telling me what you have learned, rather than asking questions on this exam that require you to demonstrate your learning. So, look back over the course and compose a page each on what you have learned about each of these course objectives.
3) In the Drop_NoFast scenario, obtain the overlaid graph that compares Sent Segment Sequence Number with Received Segment ACK Number for Server_West. Explain the graph.
Parsons, June J. and Oja, Dan. Computer Concepts 8th Edition. United States: Course Technology, 2006.
Finding myself lost in the solution of these questions, I decide to bypass them with no solution at all. (From the Author. The Brothers Karamazov)
4.10. For each of the following UML terms (see Sections 3.8 and 4.6), discuss the
Sorting algorithms are designed to be fast, and efficient. To be able to sort a list of data as quickly as possible, using as little memory as possible. To measure or classify an algorithm according to these two criteria, we measure the algorithm’s computational complexity. The computational complexity of a sorting algorithm is it’s worst, average and best behavior. Sorting algorithms are generally classified by their computational complexity of element comparisons, against the size of the list.
17. Given the state diagram in Figure 4.6, which test case is the minimum series of valid transitions to cover every state?
Leron and Dubinsky's paper referred to above and papers resulting from their research contain the bulk of literature that I reviewed. In this paper, they summarize their
2) Describe the Minimum spinning tree as the original graph and remove the extra edges.
The range of task environments that can be characterized by well - defined problems is vast. We can distinguish between so - called, toy problems, which are intended to illustrate or exercise various problem - solving methods, and so - called real - world problems, which tend to be more difficult and whose solutions people actually care about. In this section, we will give examples of both. By nature, toy problems can be given a concise, exact descri ption. This means that they can be easily used by different researchers to compare the performance of algorithms. Real - world problems, on the other hand, tend not to have a single agreed - upon description, but we will attempt to give the general flavor of t heir formulations.