CSCI 385 Fall 2013
Advanced Data Structures and Algorithms
Archived Class
Charles Cusack
Computer Science
Hope College
Main
Schedule
Grading
Gradebook
Homework

Policies
College
    Policies
Advice

Notes
Programs
Tutorials

CSCI 125
CSCI 255
MATH 341
Others

Admin

Homework 14

Comments

  • Most problems are found in one of the following:
    1. ADM: The Algorithm Design Manual
    2. IDMA: An Introduction to Discrete Mathematics and Algorithms
  • For full credit, provide context for each problem, show all calculations, and justify all answers by providing enough comments to explain your reasoning.
  • You will lose a significant amount of credit if you do not provide context, calculations, and justifications for a problem.
  • Numbers and/or algebra by themselves are not enough. A correct answer with no justification will be worth no more than half credit, and sometimes much less than that.
  • Precision is very important. You cannot skip steps, make guesses, or use flawed logic. Any of these things can lead to incorrect answers.
  • Homework assignments must be very neatly written or typeset (e.g. using Word or OpenOffice).
  • NEW! If you want to learn LaTeX, see the LaTeX section of Writing Notes for a sample LaTeX document. The machines in the lab have TexWorks installed. You may have to ask around to figure out how to compile a file the first time.
  • You must indicate any assistance/collaboration you had on an assignment as specified on the Policies page.
  • NEW! If a problem asks for an algorithm, you should give the most efficient algorithm you can find to ensure full credit. You should also specify the complexity of the algorithm with justification, whether or not the problem asks for it.

Details

The country of Ferzle recently signed a treaty with the country of Foobar. Among the various conditions of the treaty are provisions for Foobar to have buildings to use as embassies. Each embassy should be in one of the 5000 largest cities (numbered 0 through 4999) in Ferzle, and each of these cites should be no further than 100 miles from an embassy. Since space in these cities is expensive, Ferzle needs to minimize the number of cities they allow Foobar to have embassies in. You have been hired by Ferzle to solve this problem. The file Prob2.dat lists the coordinates of each city, given relative to the south-western corner of the country. The distance between two cities can be computed using the standard distance formula.

Start by downloading the files from here: Ferzle Embassies Files. The program takes care of reading the file, showing solutions, and summarizing the best solution (assuming you call the right methods in the right places). You are most interested in FerzleModel and MyAlgorithms. FerzleModel contains a whole lot of methods that you might find useful. They are not well documented, but the names should give you a clue as to what they are trying to do. Look closely at the code to make sure they do what you think they do, though.

Hand in your source code and a file named BestSolution.txt containing your best solution (cut-and-paste from the application) Webhandin under assignment 385-H14.