From 15f45d5d219cff5091b4eab5ac82fa64a841dddf Mon Sep 17 00:00:00 2001 From: "Kamal Bentahar (ab3735)" Date: Tue, 21 Mar 2023 09:40:39 +0000 Subject: [PATCH] Updated the template notebook --- Template.ipynb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Template.ipynb b/Template.ipynb index 0549551..38fd057 100644 --- a/Template.ipynb +++ b/Template.ipynb @@ -15,10 +15,11 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ - "https://github.coventry.ac.uk/380CT-2022/........" + "https://github.coventry.ac.uk/........" ] }, { @@ -81,13 +82,14 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Four types of TSP instances will be generated by creating an **adjacency matrices** $M$ as follows:\n", - "1. **Asymmetric**: The edge weights are independent and uniformly random in an interval $[1,\\text{MAX_WEIGHT}]$, i.e the graph is assumed to be directed.\n", + "1. **Asymmetric**: The edge weights are independent and uniformly random in an interval $[1,\\text{MAX\\_WEIGHT}]$, i.e the graph is assumed to be directed.\n", "2. **Symmetric**: Like the asymmetric case but the graph is undirected, and the matrix is therefore symmetric: $M_{ij}=M_{ji}$.\n", - "3. **Euclidean**: Generate points using $(x,y)$ coordinates, then generate the adjacency matrix by calculating all the required distances. Recall that the distance between two points $(x_1,y_1)$ and $(x_2,y_2)$ is $\\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$. The points are generated in the rectangle defined by the points $(0,0)$ and $(\\text{MAX_Y},\\text{MAX_Y})$.\n", + "3. **Euclidean**: Generate points using $(x,y)$ coordinates, then generate the adjacency matrix by calculating all the required distances. Recall that the distance between two points $(x_1,y_1)$ and $(x_2,y_2)$ is $\\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$. The points are generated in the rectangle defined by the points $(0,0)$ and $(\\text{MAX\\_Y},\\text{MAX\\_Y})$.\n", "4. **Graphs with obvious shortest cycle**: A graph where all the distances are 2 except for the edges on a predefined cycle, where the distance is 1. Such a graph would be useful for testing/debugging the \"nearest neighbour greedy\" search." ] },