





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






For starters, ignoring the “combinatorial” part, one could first ask: what is optimisation? To some extent, any of you who have been through a basic module in calculus will have a basic idea of what an “optimisation problem” is. Still, it doesn’t hurt to start off with a very general definition to get the ball rolling and get us all on the same page.
Definition 1.1 (Optimisation Problem). Given a set D, let f : D → R be a function, which we call the objective function. Generally speaking, an optimisation problem asks for the maximum or minimum value of f (x) over all x ∈ D (that is, if such a maximum/minimum exists; otherwise, one may be interested in the supremum/infimum). We use the following notation as a shorthand to describe such a maximisation problem:
max f (x) subject to x ∈ D.
Of course, minimisation problems are denoted the same way, except with “min” in the place of “max”.
This should remind you of the endless “extremal value problems” that you encountered in calculus; i.e. finding the maxima/minima of a differentiable function f over its domain (take the derivative, set it to zero, find the critical points, and so on). You may also re- member so-called “constrained” maxima/minima problems, in which you undoubtedly used Lagrange multipliers to find the maxima and minima of a function subject to some obscure constraints. All of these sorts of problems, and zillions more, can be expressed in the language of Definition 1.1. So, now that we know what “optimisation” means, we are left with the “combinatorial” part. Very broadly speaking, the aim of combinatorial optimisation is to develop “efficient” (see below) methods for solving optimisation problems in which the domain D is finite. As we will see throughout the module, such problems arise naturally in many “real world” situations, and a great deal of beautiful maths has been developed in the pursuit of general and efficient methods to solve them.^1 Now, I know what some of you must be thinking: If the set D is finite, can’t you just check the value of f (x) for all x ∈ D, one by one, and see which is biggest? And, to that,
(^1) Or, in the case of computationally “hard” problems, a lot of work has been done to prove that general and efficient methods are unlikely to exist.
the answer is certainly yes, at least in a theoretical sense. But there is an important caveat. The answer is yes, only if you have unlimited time and resources. However, if you are the owner of a company whose profit depends on knowing the optimal route for shipping their product from point A to point B, then you would probably like to know that information ASAP. Simply saying that, if we check all the possibilities (say, by hand or by computer), then the optimal solution will be found eventually is highly impractical and, frankly, useless. Due to so called combinatorial explosion,^2 the word “eventually” might refer to a time which comes long after the company goes bankrupt, human life ceases to exist, or even after the sun burns out. Thus, there is a great deal of incentive to find methods for exploring the space of candidate solutions in a clever and efficient manner to not only find the optimum, but to find it quickly. Thus, we have arrived at the central goal of combinatorial optimisation: to find “efficient” (i.e. fast) algorithms to solve optimisation problems of a “discrete” nature (i.e. where the domain of the objective function is finite, or can be made finite). Of course, there is no hope to give algorithms to do this in complete generality. Instead, one needs for the domain D to have a special underlying structure that we can exploit (e.g. D is the collection of all possible shipping routes). The sample problems given in the following section should give you a small taste of what I mean by this, and also a flavour of what is to come in the module.
2 Sneak Preview of the Module
Most of the problems that we will encounter in this module involve combinatorial structures, known as (directed and undirected) graphs. They are natural models for many real world structures such as transportation networks, social networks, molecules and electrical circuits. Of course, since we are mathematicians, we will usually just think of them as mathematical objects, but it doesn’t hurt to know that they are of interest in the real world, too.
Definition 2.1 (Graph). A graph G is a pair (V, E) where V is a set of vertices and E is a collection of unordered pairs of distinct vertices called edges.
The usual way of drawing a graph is by representing its vertices as points and representing each edge as a line between a pair of vertices; see Figure 2.1. The vertex set and edge set of a graph G are often denoted V (G) and E(G), respectively. An edge e ∈ E representing an unordered pair of vertices u and v can be written as uv or vu. We say that a vertex x ∈ V is adjacent to a vertex y ∈ V if xy ∈ E. Graphs are great for representing many different mathematical and real world structures, as mentioned above. However, sometimes, we need more general mathematical structures, such as directed graphs and multigraphs.
Definition 2.2 (Directed Graph). A directed graph D is a pair (V, A) where V is a set of vertices and A is a collection of ordered pairs called arcs. For brevity, we often call them digraphs. (^2) Combinatorial explosion refers to the general phenomenon that, in many cases, the size of the space of “candidate” solutions to a combinatorial optimisation problem (i.e. the size of the domain of D) grows rapidly (e.g. “exponentially fast”) as a function of the “size” of the input to the problem (e.g. the number of hubs in the shipping network).
a (^) b
c
Figure 3: This is a picture of a multigraph. Here, the vertex set is V = {a, b, c} and the edge multiset is E = {ab, ab, ab, bc, bc, ca, ca, ca, ca}.
Definition 2.4. A walk in a digraph D is a sequence (v 1 , a 1 , v 2 ,... , an− 1 , vn) where v 1 ,... , vn ∈ V (D) and, for 1 ≤ i ≤ n − 1, we have that ai ∈ A(D) is an arc from vi to vi+1.
Note, you should think of a walk visually as starting at the vertex v 1 , moving along the arc a 1 to v 2 , and so on. Literally, a walk is a way of walking around in the digraph D by following the arrows on the arcs.
Definition 2.5. A path in a digraph D is a walk in D which does not repeat any vertices.
The notions of walks and paths are defined analogously in graphs, multigraphs, multidi- graphs, etc.
Problem 2.6 (Shortest Path). Suppose that you are given a digraph D, a “length function” : A → R+^ and a pair of vertices s, t ∈ V (G). The length of a path from s to t is the sum of(a) over all arcs a ∈ A which appear on the path. The Shortest Path problem asks to determine the distance from s to t, which is the minimum length of a path from s to t.
Remark 2.7. In the case that there is no path from s to t in D, then the distance from s to t is simply defined to be +∞.
Remark 2.8. Note that we have defined the Shortest Path Problem in terms of digraphs. A graph G can be thought of as a digraph D such that, for each edge e = uv ∈ E(G), both of the arcs uv and vu are present in D. Thus, for this problem (and most of the problems that we will encounter in the module), the Shortest Path problem can be defined analogously for graphs. It can also be defined for multigraphs or multidigraphs; however, if multiple copies of the same edge or arc exist, then one can always simply delete all but the one with minimum length to obtain a simple graph or digraph.
Now, let’s think about what happens if we apply the “brute force” or “try everything” approach that we mentioned before. That is, we simply go through every path from s to t, compute the length, and output the one which is smallest. Of course, the length of time (in terms of “steps” of the algorithm) that this take is at least the number of paths from s to t in the graph D. As the exercise below will demonstrate, the number of such paths is very large.
Exercise 2.9. For n ≥ 1, let Kn denote the complete graph on n vertices. That is, the graph that you get from taking a set V of n vertices and adding all of the possible
(n 2
edges connecting pairs of them.
t
s
Figure 4: An instance of the Shortest Path Problem. The labels on the arcs denote their length. The arcs of the shortest path are bold.
(a) Let s and t be any two distinct vertices of Kn. For 1 ≤ k ≤ n − 1, how many paths of with k edges are there from s to t in Kn?
(b) Suppose that a computer program takes k · 10 −^9 seconds, on average, to compute the length (using the length function `) of a path with k edges.
(i) How many seconds would it take to compute the length of all paths with 14 edges from s to t in K 15? (ii) Paths with 15 edges from s to t in K 16? (iii) How many years would it take to compute the length of all paths with 19 edges from s to t in K 20?
From this exercise, you will see that the number of paths in the complete graph Kn between a pair of vertices grows very rapidly as a function of n (something like ≈ n!). It may surprise you to learn, then, that there is an algorithm (called Dijkstra’s Algorithm) which can find the shortest path from s to t in any digraph D after only c · |V (D)|^2 steps, where c > 0 is an absolute constant (independent of D). As the number of vertices in D gets large, this algorithm outperforms (in terms of speed) the simple “try everything” approach by a massive amount.
At this point, is perhaps useful to pause briefly to better explain what we mean when we talk about an algorithm being “fast” or “efficient”. While it is possible to make all of this quite rigorous (for instance, by introducing “Turing machines” and such), for most of the module, only an intuitive understanding of running time will be needed. For a more detailed (but still intuitive) introduction to the concept of running time, one can consult Section 1.2 of Korte and Vygen’s Combinatorial Optimization: Theory and Algorithms (a link to the E-book is provided on the module webpage). Intuitively speaking, an algorithm is a list of “instructions” for taking a set of input objects and producing a set of output objects. For example, in the Shortest Path Problem, the input is a digraph D, length function ` and two vertices s and t. The only output object is the numerical distance from s to t. Dijkstra’s algorithm (in tomorrow’s lecture) gives a sequence of steps which either a human being or a computer can follow to correctly produce the output.
Above, we defined Big-O notation in the context of running time. There are several related notational conventions which will be used throughout the module. Here are some formal definitions.
Definition 2.11. Given functions f : N → [0, ∞) and g : N → [0, ∞), we write
This notation will mainly come up when we want to bound the running time of an algo- rithm. For example, one might say that an algorithm runs in time o(n^2 ).
Another famous problem in combinatorial optimisation is the so called “Travelling Salesman Problem”, which has almost the same set up to the Shortest Path Problem, but a different objective.
Problem 2.12 (Travelling Salesman). Suppose that you are given a digraph D and a length function ` : A → R+. The Travelling Salesman Problem asks to determine the shortest route through the digraph (following along arcs) which visits all of the vertices of D and returns to the same vertex where it started.^3
Okay, so this seems vaguely similar to the Shortest Path Problem, right? The difference is that we aren’t just trying to get from one vertex to another efficiently, but we are trying to visit all of the vertices. How much harder could that be? Well, as it turns out, it is a lot harder. The Travelling Salesman Problem is a famous example of an “NP-complete” problem. One of the biggest open problems in mathematics (worth $1 million from the Clay Mathematics Institute if you can solve it) is to determine whether or not there exists a polynomial-time algorithm to solve an NP-complete problem. The general (although, perhaps not universal) belief is that no such algorithm exists, which would mean that, in particular, there is no way to solve the Travelling Salesman Problem in polynomial time. If everything goes according to plan, we will discuss NP-complete problems in greater detail during Week 6.
(^3) Note, it does not matter which vertex we start at, since we must visit every vertex and so the optimum value will not change.
Figure 5: An instance of the Travelling Salesman Problem. The labels on the arcs denote their length. The arcs of the optimum route are in bold (I believe... but I didn’t check it carefully).
You probably remember solving systems of linear equations back in the day; i.e. finding solutions (x, y, z) to systems of equations such as
x + 3y − z = 1
27 x + 3y = 5 x + y − 13 z = 42.
You may recall that such a system can be expressed in terms of an equation A~x = ~b where
(^) , ~x =
x y z
(^) , ~b =
Similarly, linear programming deals with systems of linear inequalities, i.e., equations of the form A~x ≤ ~b where A is a matrix, ~x and ~b are vectors and the inequality means that each entry of the vector on the left side must be at most the corresponding entry of the vector on the right side.
Problem 2.13. Given an m × n matrix A over R, vectors ~b ∈ Rm^ and ~c ∈ Rn^ and a vector ~x of n variables, the standard form of a linear programming problem is as follows:
max (~cT^ )~x subject to A~x ≤ ~b. In other words, we are maximising a function of the form
f (~x) = c 1 x 1 + c 2 x 2 + · · · + cnxn
subject to the constraints
a 11 x 1 + a 12 x 2 + · · · + a 1 nxn ≤ b 1
a 21 x 1 + a 22 x 2 + · · · + a 2 nxn ≤ b 2