Graph Theory – Edward Mellor /stor-i-student-sites/edward-mellor PhD Student at STOR-i CDT, ÌÇÐÄÊÓÆµ Thu, 30 Apr 2020 15:07:34 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 /stor-i-student-sites/edward-mellor/wp-content/uploads/sites/7/2021/08/cropped-cropped-EMlogo-32x32.png Graph Theory – Edward Mellor /stor-i-student-sites/edward-mellor 32 32 The Patrol Problem /stor-i-student-sites/edward-mellor/2020/04/26/the-patrol-problem/ Sun, 26 Apr 2020 13:47:05 +0000 http://www.lancaster.ac.uk/stor-i-student-sites/edward-mellor/?p=205 Read more]]> In my previous post, I talked about the statistics research project that I did as part of the STOR-i program. Today I will discuss the Operational Research project I worked on with Kevin Glazebrook about Optimal Patrolling.

Consider an art gallery with several rooms. Some of these rooms are connected directly by doorways but for some pairs of rooms it may be necessary to pass through one or more intermediary rooms in order to travel between them. Each room in the gallery contains various valuable pieces of artwork. At night, when the gallery is closed, a single guard must patrol the area to prevent thievery or vandalism from instituters (attackers). The Patrol Problem is to find a patrol route that minimizes the expected cost of any damage caused by attackers.

To approach this problem we must first create a model and make some modelling assumptions.

We can use the ideas from my post on The seven bridges of Königsberg to represent the rooms of the gallery as nodes on a graph as shown in the example below:

We assume that the total value of the artwork in each room is known to both the patroller and any potential attacker. We also assume that the length of time taken to carry out an attack in any given room is random but is sampled from a known distribution.

Our patrol model assumes that the attackers arrive according to a Poisson process with a known rate and then decide which room to attack in one of the two follow ways:

  1. The target of the attack is chosen at random with known probabilities.
  2. The target of each attack is chosen strategically with the presence of a patroller in mind and the aim to maximize the total expected cost of the attacks.

The patroller is assumed to move between rooms in discrete time-steps. If the patroller interrupts an attack in progress, we assume that no damage is caused.

We need a way to tell the patroller which is the best route to take.

If the attackers choose where to attack using the randomised method we have the following:

While visiting a location the patroller either determines that no attacks are underway or apprehends the attacker. Thus, we know that immediately after a visit to a location, no attackers are present. It therefore makes sense to characterize the system by a vector containing the number of time-steps since patroller visited each room. We call this the state of the model.

If we assume that the time it takes to carry out an attack has some maximum, we can ensure the number of states is finite. This is because once we have neglected a room long enough, increasing the time since the last visit will not change the probability that an attack is ongoing.

The current room can be determined from the state as it will correspond to the entry with the lowest value. A patrol policy then tells the patroller what to do in any given state: either stay where you are or move to an adjacent room.

Since there are a finite number or states and a finite number of rooms we have a finite number of policies. An optimal policy can be found using linear programming.

If the attackers choose where to attack strategically we can create a two-person zero sum game as discussed by in my post on game theory.

In either case the optimal solution is very computationally expensive to calculate and so approximate methods are often preferred.

]]>
The seven bridges of Königsberg /stor-i-student-sites/edward-mellor/2020/04/08/the-seven-bridges-of-konigsberg/ /stor-i-student-sites/edward-mellor/2020/04/08/the-seven-bridges-of-konigsberg/#comments Wed, 08 Apr 2020 11:05:35 +0000 http://www.lancaster.ac.uk/stor-i-student-sites/edward-mellor/?p=183 Read more]]> During the spring term at STOR-i we were given the opportunity to work on two independent projects with the guidance of an academic supervisor. My first research topic was Extreme Value Theory with Emma Eastoe and my second was on Optimal Patrolling with Kevin Glazebrook. I plan to briefly discus both these projects in future blog posts.

To be able to talk about Optimal Patrolling we will need a basic understanding of graph theory. In this context, the word graph does not mean a plot, with two axis and line showing the relationship between two variables. Instead a graph is an way of repressing and visualizing connections. This is best explained by example and so in this post, I will talk the problem which first introduced me to this type of graph.

The Pregel River divides the city of Königsberg into four landmasses as shown below. Seven bridges (shown in black) connect these landmasses. The problem is then to find a route around the city visiting each of the four landmasses by crossing each of these bridges exactly once. No other means of crossing a river is permitted.

In 1736 a mathematician called Leonard Euler proved that the problem has no solution. A detailed explanation of the proof is given by the Mathematical Association of America.

The general idea is as follows:

  • From inspection we can see that each of the landmasses has an odd number of bridges leading to/from it.
  • So it makes sense that if we start at a particular landmass then if we use each bridge connecting to it exactly once then we cannot end our route there.
  • Equivalently, for any location that we don’t start we must end our route there.
  • Since this implies that we must finish at three of the four landmasses no such route can exist.

We can generalize this problem by thinking of each of the landmasses as a point. The bridges can then be added by drawing a line between the two points associated with the landmasses on either side of the bridge. This is shown for the Königsberg problem below:

We call this a graph. The points representing the landmasses are called nodes (or vertices) and the lines representing the bridges are called edges (or arcs).

Graphs like this can be used to represent connections in a huge variety of real life situations. For example, we might want to represent the rooms in a museum and the doorways that connect them. We could also consider more abstract connections like friendships between school children. The study of such graphs is called Graph Theory and it was problems like the seven bridges of Königsberg that originally motivated its development. This definition of a graph can be extended to include things like:

  • Weighted edges that might represent some maximum capacity of a road connecting two cited
  • Directed edges that suggest the connection is only permitted one way. This may be useful if we are using a graph to represent roads which could include a one-way system.
  • Hyper-edges that can be used to show a connection between more than two nodes.

In the Optimal Patrolling problem we will use this formulation to represent different areas as nodes and the ways between them as edges.

]]>
/stor-i-student-sites/edward-mellor/2020/04/08/the-seven-bridges-of-konigsberg/feed/ 1