# Network Algorithms: Least Weight Cycle Through All Vertices

## Introduction to Network Algorithms

• A network algorithm is a specific set of operations designed to solve a problem in network theory. It relates to the study of mathematical models and analytical tools used to understand and solve problems in network connectivity.

• A vertex in graph theory, also known as a node, is a fundamental part of a graph. It can have a name, which is called a label.

• A cycle in a graph is a path through a series of edges, in which the first node is the same as the last. That is, it returns to its starting point.

• The weight of a cycle is the sum of the weights of its edges.

• The problem of finding the least weight cycle through all vertices, also known as the Travelling Salesman Problem (TSP), is one of the classic problems in combinatorial optimisation.

## Key Concepts for Least Weight Cycles

• The Hamiltonian cycle is a cycle in a graph which visits each vertex once and returns to its starting vertex.

• The Travelling Salesman Problem can be seen as the problem of finding the shortest possible Hamiltonian cycle in a complete weighted graph.

• A complete graph is a simple graph in which every pair of distinct vertices is connected by a unique edge. A weighted graph is a graph in which each edge is assigned a numerical value, or weight.

## Techniques to Solve the Travelling Salesman Problem

• The brute force method involves checking all possible permutations of the vertices. However, this method becomes practically impossible for large amounts of vertices due to the rapid growth of the factorial function.

• Heuristic methods provide practical solutions for the problem by giving good, but not necessarily optimal, solutions. Examples include the nearest neighbour method and the repeated local search.

• Mathematical programming methods such as linear programming and integer programming can also be used, and can often guarantee an optimal solution.

## Considerations in Network Algorithms

• Time complexity is a critical factor when choosing a method to solve the problem. While the brute force method can theoretically solve the problem, it is not feasible for large data sets due to its poor time complexity (O(n!)).

• The chosen method should also consider the nature of the graph. If the graph has special properties, such as being metric (where the triangle inequality holds), specific algorithms might be more efficient.

## Algorithm Variations and Extensions

• The Travelling Salesman Problem with Time Windows (TSPTW) is a variation where each city must be visited within a specific time window.

• The Multiple Travelling Salesman Problem (mTSP) involves multiple salesmen, and the task is to designate routes for each salesman such that the total cost is minimized, and each city is visited only once.

## Concluding Remarks

• The travelling salesman problem remains a fundamental problem in discrete mathematics and computer science. While there are algorithms to solve it in special cases, the general problem is NP-hard (a problem for which no efficient solution algorithm has been found), meaning no efficient solution is known for the worst-case scenarios.