#### Programming Assignment 2.

This project is to be done individually. Do not show your code to any other student and do not look at any other student's code. Do not put your code in a public directory or otherwise make it public. You are encouraged to use the LMS Discussions page to post problems so that other students can also answer and see the answers.

The goal of this assignment is to practice concurrent and distributed programming using the SALSA programming language.

You are to analyze three-dimensional data from the Sloan Digital Sky Survey, in particular, stars in our MilkyWay galaxy, for future human space colonization. Your program needs to compute the following:

• Closest neighbours Compute the set of pairs of stars that minimize pairwise distance.
• Farthest neighbours Compute the set of pairs of stars that maximize pairwise distance.
• Ideal hub stars Compute the set of stars which minimize the maximal distance to any other star.
• Ideal jail stars Compute the set of stars which maximize the minimal distance to any other star.
• Ideal capital stars Compute the set of stars which minimize the average distance to all other stars.

More information on Milky Way visualization can be found in the associated MilkyWay@Home forum.

You are given a stars text file with the first line giving the total number of stars in the file followed by one line per star representing each star's three dimensions <x,y,z> as X Y Z. Please remove duplicate entries in your program. Your output should look as follows:

```d1  // minimal pairwise distance
s11 s12
s13 s14
...

d2  // maximal pairwise distance
s21 s22
s23 s24
...

d3 // minimum maximal distance
s31 s32
s33 s34
...

d4 // maximum minimal distance
s41 s42
s43 s44
...

d5 // minimal average distance
s51
s52
...
```
where d_i denotes a distance and s_ij denotes a three dimensional star coordinate.

### Part 1 - Concurrent Solution

Using SALSA, write an actor-based solution to the space colonization problem.

### Part 2 - Distributed Solution

Write a distributed space colonization solution in SALSA.

### Extra Credit - Mobile Actors Solution

Write an extension of your distributed space colonization solution so that actors can move to find better computational resources.

### Other Possible Extensions

• Provide an analysis of sequential vs parallel execution performance.
• Provide an analysis of scalability.
• Develop a fault-tolerant distributed solution.

Submission:

The due date for this project is November 18, 2010, 11:59pm EST. You should use the assignments drop-off box located at the course's LMS page. Upload a ZIP file containing all the relevant documented SALSA files, along with a README file describing the project and its usage.  24-hour late submissions will receive a 10% grade penalty, 3-day late submissions will receive a 25% penalty.  Assignments will not be received after November 21st, 2010.