{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw4_001 - COT 5405 Analysis of Algorithms Fall 2006...

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

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

Unformatted text preview: COT 5405 Analysis of Algorithms, Fall 2006. Homework 4 Due Wednesday, December 6 2006, before 11:59pm Dr. Banerjee will explain in the last class why the deadline was “officially” advanced. 1. [1 page] There is a strange species of fish where a parent fish would eat up its own immediate offspring fishes if they come in contact. Now, you are given a single big family of fishes of different weights (including the greatest ancestor of the family). Your job is to design an algorithm to select a bunch of fishes for your aquarium with the constraint that none of them would eat each other and their total weight is maximized. You can assume a tree model for representing the parent-child relationship. Derive the time complexity of your algorithm. As for example, here the possible grouping of fishes who can peacefully co-exist are (A, D, E, F, G, H) or (B, C) or (B, F, G, H) or (C, D, E) or any of their subsets....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online