12.07.2015 Views

A Practical Introduction to Data Structures and Algorithm Analysis

A Practical Introduction to Data Structures and Algorithm Analysis

A Practical Introduction to Data Structures and Algorithm Analysis

SHOW MORE
SHOW LESS
  • No tags were found...

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

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

592 Chap. 17 Limits <strong>to</strong> Computationthe problem in the sense of finding the smallest set of vertices that forms avertex cover.17.2 Implement KNAPSACK (see Section 16.1). Measure its running time on anumber of inputs. What is the largest practical input size for this problem?17.3 Implement an approximation of TRAVELING SALESMAN; that is, given agraph G with costs for all edges, find the cheapest cycle that visits all verticesin G. Try various heuristics <strong>to</strong> find the best approximations for a wide varietyof input graphs.17.4 Write a program that, given a positive integer n as input, prints out the Collatzsequence for that number. What can you say about the types of integers thathave long Collatz sequences? What can you say about the length of theCollatz sequence for various types of integers?

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

Saved successfully!

Ooh no, something went wrong!