PLEASE NOTE:
this server,
secure.csse.uwa.edu.au,
will be unavailable on
Monday 5th December, from 1pm until 4pm.
Web-based programs, such as
csmarks, cssubmit, and the help fora,
will all be unavailable.
Please consider offering answers and suggestions to help other students!
And if you fix a problem by following a suggestion here,
it would be great if other interested students could see a short
"Great, fixed it!" followup message.
Hi, I am just a little confused with the input for lab2 q1: the 3 1.0 1.0 ... If someone could clarify what this means and the 3.5 in the basic test case.
thanks
3 1.0 1.0 1.0 2.0 2.0 1.0
is saying that there are 3 cities with located at the following x-y coordinates (1.0,1.0), (1.0,2.0), (2.0,1.0). The adjacency matrix of the distances between the cities can be calculated from these coordinates (part underlined in red in image).
To get full marks (green tick) for the basic test, the cost of the route your algorithm comes up with needs to be less than 3.5.(part underlined in blue in image).
Yeah, I see why you're confused about the Input on Moodle being coordinates when our Nearest Neighbour function has an adjacency matrix as its parameter. I think the reason this is the case is because that's the input to the tester (testCase). Inside the tester, there is probably an intermediary step of generating the adjacency matrix first from the coordinates before calling our function.
You would only need to calculate the distances from the coordinates if you want to recreate the Moodle test cases (perhaps for debugging).