11.07.2015 Views

Data Structures and Algorithm Analysis - Computer Science at ...

Data Structures and Algorithm Analysis - Computer Science at ...

Data Structures and Algorithm Analysis - Computer Science at ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Sec. 17.6 Projects 565by using a brute-force algorithm th<strong>at</strong> checks all possible sets of vertices ofsize k to find an acceptable vertex cover, <strong>and</strong> measure the running time on anumber of input graphs. Then try to reduce the running time through the useof any heuristics you can think of. Next, try to find approxim<strong>at</strong>e solutions tothe problem in the sense of finding the smallest set of vertices th<strong>at</strong> forms avertex cover.17.2 Implement KNAPSACK (see Section 16.1). Measure its running time on anumber of inputs. Wh<strong>at</strong> is the largest practical input size for this problem?17.3 Implement an approxim<strong>at</strong>ion of TRAVELING SALESMAN; th<strong>at</strong> is, given agraph G with costs for all edges, find the cheapest cycle th<strong>at</strong> visits all verticesin G. Try various heuristics to find the best approxim<strong>at</strong>ions for a wide varietyof input graphs.17.4 Write a program th<strong>at</strong>, given a positive integer n as input, prints out the Coll<strong>at</strong>zsequence for th<strong>at</strong> number. Wh<strong>at</strong> can you say about the types of integers th<strong>at</strong>have long Coll<strong>at</strong>z sequences? Wh<strong>at</strong> can you say about the length of theColl<strong>at</strong>z sequence for various types of integers?

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!