CMPSC 465, Spring 2009 Homework 9: Algorithms and Data Structures, Assignments of Computer Science

Information about homework 9 for the cmpsc 465, spring 2009 course. It includes instructions for submitting the homework, problem statements for three problems related to prim's algorithm, kruskal's algorithm, and dijkstra's algorithm, as well as references to exercises from the textbook. Students are expected to use printouts from the document to illustrate the algorithms and solve the problems.

Typology: Assignments

Pre 2010

Uploaded on 09/24/2009

koofers-user-jns-1
koofers-user-jns-1 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CMPSC 465, Spring 2009, Homework 9
Due: Saturday,April 18, 1 pm. slide under the door of IST 346H, between 7 pm Friday
and 1 pm Saturday theywill be box in front of IST 337.
Problem 1.
a) Explain howPictures for Prim’sAlgorithm illustrate the algorithm. What are the
edge costs? What is the meaning of the colors of edges? What is the meaning of
red and blue numbers?
b) Use printouts of the third page of that file to illustrate howKruskal’salgorithm runs.
b) Use printouts of the third page of that file to illustrate howDisjksta’salgorithm runs.
Problem 2. Your task is to compress a text in which each symbol is random, 0 or 1, but
1’soccur with probability that is twice larger.Makean‘‘alphabet’’ofstrings of length 3
and provide Huffman code. Howmuch shorter will the code be compared with the text,
on the average?
Exercise 6, page 333.
Exercise 2, page 362.

Partial preview of the text

Download CMPSC 465, Spring 2009 Homework 9: Algorithms and Data Structures and more Assignments Computer Science in PDF only on Docsity!

CMPSC 465, Spring 2009, Homework 9

Due: Saturday, April 18, 1 pm. slide under the door of IST 346H, between 7 pm Friday and 1 pm Saturday they will be box in front of IST 337.

Problem 1.

a) Explain how Pictures for Prim’s Algorithm illustrate the algorithm. What are the edge costs? What is the meaning of the colors of edges? What is the meaning of red and blue numbers?

b) Use printouts of the third page of that file to illustrate how Kruskal’s algorithm runs.

b) Use printouts of the third page of that file to illustrate how Disjksta’s algorithm runs.

Problem 2. Your task is to compress a text in which each symbol is random, 0 or 1, but 1’s occur with probability that is twice larger. Make an ‘‘alphabet’’ of strings of length 3 and provide Huffman code. How much shorter will the code be compared with the text, on the average?

Exercise 6, page 333.

Exercise 2, page 362.