## Monday, August 19, 2019

### COP 3530, Discrete Data Structures and Algorithms, Summer 1999, Homework 7 :: UFL Florida Computer Programming Homework

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:

## Sunday, August 18, 2019

### Comparing the Huxtables with My Family Essay -- comparison compare con

Compating the Huxtables with My Family Ã‚   Watching a comedy sitcom like The Cosby Show is a great way to unwind from a stressful day at school. The show's characters are likeable and the storyline is humorous, but halfway through the program I usually turn the television off and return to the kitchen to wash the dinner dishes. Watching The Cosby Show makes me feel guilty. The Huxtables are too perfect. Their house is too perfect. In comparison to the Huxtables I feel like an unfit mother in a slovenly, dysfunctional family. The characters on The Cosby Show should be portrayed in a more realistic manner; in fact, the program could be far more entertaining, not to mention relaxing, if certain aspects of the program such as weekday mornings, sibling quarrels and housework were made more believable. Ã‚   To begin with, mornings are just too perfect at the Huxtables' house. In the kitchen the table is set; fresh flowers are in a vase, and milk is in a glass pitcher. The entire Huxtable family is simultaneously dressed and ready in clean, ironed, co-ordinated clothes. Everyone's hair is perfect and Mrs. Huxtable's makeup is flawless. The Huxtables even eat breakfast together. The family is relaxed, in a cheerful mood, and politely taking turns discussing their schedules for the day. The children have their lunches made, their shoes on, and their bookbags ready. And if that is not enough, Mr. and Mrs. Huxtable never have to hunt for their car keys. Ã‚   On the other hand, my family's day begins in complete chaos. To begin with, my kids never agree as to whose turn it is to set the table. My kids would rather go hungry than perform a chore that could possibly be someone else's. I cannot afford... ... Show do housework or laundry, yet I have never seen a pile of dirty clothes; the Huxtables do not seem to have a maid. In contrast I go to Herculean efforts to keep the Health Department from knocking on my door. I do not have time to dust. When I'm not picking up shoes, washing clothes, and screaming for anyone to vacuum, I'm on my hands and knees scraping goo off the floor with a butter knife. Ã‚   I always wonder who does the housework on The Cosby Show. Perhaps the Huxtables are naturally perfect, and we are natural slobs by comparison. Nevertheless, when I watch television I do not want to feel guilty. I want to relax and laugh at others in realistic situations. Just one time I would love to see Mrs. Huxtable wake up late, be unable to decide what to wear, scream at the kids, and have to call a taxi because she can't find her car keys. Ã‚