Taveling Salesman, version 1.0, 2016-04-15
Rolf Ptter

The user enters up to 52 points ("cities") in the Euclidean plane. The salesman's task is to find the shortest closed tour touching each city exacty once.

On the first screen (the "input" screen), three points with letters are displayed, one of then marked by a little circle. The user can move this point with the help of the arrow keys. Pressing a letter key (lowercase or uppercase)  then creates a new point at the origin (screen center), which can then be moved. Pressing the key of an existing letter connects that point to the marked point. If the connection already exists, it is deleted. Delete the marked point and its connections with the [-] key. The total length of all connections is displayed in the upper right corner. You can enter your own tour and compare it with the program's solution displayed on the "Tour" screen.

If at least four points are present, pressing the [Enter] key leads to the next screen (the "tree" screen). The minimal spanning tree (MST) for the complete graph of all the vertices is displayed. Its length is a lower bound for the shortest tour. With the help of the MST, a tour can be constructed (press [space]) with at most twice the length of the optimal tour.
Press [Enter] again to see the shortest tour the programm can find with its algorithm, a simulated annealing algorithm taken from: Press, Teukolsky, Vetterling and Flannery, "Numerical Recipes in C, Second Edition". This does not necessarily yield the mathematical minimum, which is notoriously hard to find (it's an NP-complete problem). 
The higher the number of vertices, the longer the time the program takes to find a short tour (up to 2 minutes).

Controls:

"Input" screen:

Arrow keys:		move the vertex marked by a circle	
Tab key:		move the mark from vertex to vertex
[*]:			zoom in
[/]:			zoom out
letter keys		if the letter is new, create a new vertex, 
          		else, connect the vertex to the circled vertex
			if the connection already exits, delete it

[4]:			move the screen image to the left
[6]:			move the image to the right
[8]:			move up
[2]:			move down
[Esc]:			start from scratch
[?]			show minimal solution (=proceed to "Tour" screen)
[.]			start from scratch
[Enter]:		proceed to "tree" screen

"Tree" screen:

[space]:		toggle between the display of the MST and the tour based on it
Arrow keys		move the image
number keys            	move the image
[*]:			zoom in
[/]:			zoom out
Tab key			move the mark from vertex to vertex
letter key	        edit the coordinates of the vertex labeled by this letter
[?]			show minimal solution (=proceed to "Tour" screen)
[.]			begin from scratch
[Enter]			proceed to "tour" screen
[Esc]			back to "input" screen

"Tour" screen:

Arrow keys		move the image
number keys		move the image
letter key		mark the vertex with that label
Tab key			move the mark from point to point
[*]:			zoom in
[/]:			zoom out
[Esc]			back to "tree" screen
[.]			begin from scratch

"Coordinate screen"

Arrow up, down		toggle the focus
[Enter]			accept the changes
[Esc]			back to "Tree" screen without changes