Homework 2

Homework 2 - CS180 Winter 2011 Homework 2 The following...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS180 Winter 2011 Homework 2 The following homework is due Wednesday, January 19 at the beginning of lecture. When submitting your homework, please include your name at the top of each page. If you submit multiple pages, please staple them together. We also ask that you do something to indicate which name is your last name on the first page, such as underlining it. Please provide complete arguments and time complexity analysis for all solutions, unless otherwise stated. 1. Give an algorithm for finding the diameter of a undirected tree using 2 BFSs. Prove the correctness of your algorithm. . (You will get 20% score for saying “I don’t know!” But you will get zero points for writing arguments which are almost completely wrong.) 2. Give an algorithm to find the longest directed hop-count path in a DAG (directed acyclic graph). 3. Give an algorithm that pairs up odd degree nodes of a tree such that the nodes in these pairs are connected by paths that are edge disjoint. 3.4 from textbook
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/16/2011 for the course CS 180 taught by Professor Moloudi during the Spring '08 term at UCLA.

Ask a homework question - tutors are online