hw1.s07

# hw1.s07 - CMPSC 130B Written Assignment#1 Due Date(2:00 PM...

This preview shows pages 1–2. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CMPSC 130B Written Assignment #1 Due Date: April 25, 2007 (2:00 PM). 80 Points. Remember: Points will be deducted for homework turned in after the Due Date. Deadline: April 27, 2007 (2:00 PM) Remember: No homework will be accepted after the Deadline Will send e-mail if minor corrections are needed. You must work on this assignment individually. HW MUST BE TURNED IN your assignment in the hw box for CMPSC 130B (ENGR I 2108). 1 Problem { 18 points } { Minimum Cost Spanning Trees } Draw a minimum cost spanning tree constructed by Kruskal’s algorithm for the following graph G . Give intermediate steps. Draw a minimum cost spanning tree constructed by Prim’s algorithm (always growing the tree that has vertex 1 ( s = 1)) for the following graph G . You will be growing the tree that has vertex 1. Give intermediate steps. Draw a minimum cost spanning tree constructed by Sollin’s algorithm. Give intermediate steps. A B C D E F G O N L J I H M K 1 2 3 4 5 6 7 8 9 10 The weight of the edges is given by the following table. edge A B C D E F G H I J K L M N O weight 5 13 10 15 4 1 6 11 9 14 2 7 12 3 8 2 Problem { Other Container Loading Problems } (a) { 8 Points } In class we discussed a greedy strategy to find a largest set of containers to load on a ship problem without exceeding the cargo capacity. Now we are interested in loading the least number of containers, provided that none of the remaining containers (the ones left out) can be loaded onto the ship without exceeding the cargo capacity. An obvious greedy algorithm for this...
View Full Document

{[ snackBarMessage ]}

### Page1 / 3

hw1.s07 - CMPSC 130B Written Assignment#1 Due Date(2:00 PM...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online