Graph-theoretical Models of the Spread and Control of Disease Fred Roberts, DIMACS smallpox 1 Models of the Spread and Control of Disease through Social Networks •Diseases are spread through social networks. •“Contact tracing” is an important part of any strategy to combat outbreaks of infectious diseases, whether naturally occurring or resulting from 2 bioterrorist attacks. The Basic Model Social Network = Graph Vertices = People Edges = contact State of a Vertex: simplest model: 1 if infected, 0 if not infected (SI Model) More complex models: SI, SEI, SEIR, etc. S = susceptible, E = exposed, I = infected, R = recovered (or removed) 3 More About States Once you are infected, can you be cured? If you are cured, do you become immune or can you re-enter the infected state? We can build a digraph reflecting the possible ways to move from state to state in the model. 4 The State Diagram for a Smallpox Model The following diagram is from a Kaplan-CraftWein (2002) model for comparing alternative responses to a smallpox attack. This has been considered by the CDC, Dept. of Homeland Security, Dept. of Health and Human Services, etc. 5 6 The Stages Row 1: “Untraced” and in various stages of susceptibility or infectiousness. Row 2: Traced and in various stages of the queue for vaccination. Row 3: Unsuccessfully vaccinated and in various stages of infectiousness. Row 4: Successfully vaccinated; dead 7 Aside: Related Work •The model to be presented arose from the study of opinion formulation in groups. •Similar models are used in distributed computing. •The models we will study are sometimes called threshold networks. 8 The Model: Moving From State to State Let si(t) give the state of vertex i at time t. Simplified Model: Two states 0 and 1. Times are discrete: t = 0, 1, 2, … 9 First Try: Majority Processes Basic Majority Process: You change your state at time t+1 if a majority of your neighbors have the opposite state at time t. (No change in case of “ties”) Useful in models of spread of opinion. Disease interpretation? Cure if majority of your 10 neighbors are uninfected. Does this make sense? Majority Processes II Irreversible Majority Process: You change your state from 0 to 1 at time t+1 if a majority of your neighbors have state 1 at time t. You never leave state 1. (No change in case of “ties”) Disease interpretation? Infected if sufficiently many of your neighbors are infected. 11 Basic Majority Process 12 13 14 Irreversible Majority Process 15 16 17 Aside: Distributed Computing Majority processes are studied in distributed computing. Goal: Eliminate damage caused by failed processors (vertices) or at least to restrict their influence. Do this by maintaining replicated copies of crucial data and, when a fault occurs, letting a processor change “state” if a majority of its neighbors are in a different state. Other applications of similar ideas in distributed computing: distributed database management, 18 quorum systems, fault local mending. Second Try: Threshold Processes Basic k-Threshold Process: You change your state at time t+1 if at least k of your neighbors have the opposite state at time t. Disease interpretation? Cure if sufficiently many of your neighbors are uninfected. Does this make 19 sense? Threshold Processes II Irreversible k-Threshold Process: You change your state from 0 to 1 at time t+1 if at least k of your neighbors have state 1 at time t. You never leave state 1. Disease interpretation? Infected if sufficiently many of your neighbors are infected. Special Case k = 1: Infected if any of your neighbors is infected. 20 Basic 2-Threshold Process 21 22 23 Irreversible 2-Threshold Process 24 25 26 Complications to Add to Model •k = 1, but you only get infected with a certain probability. •You are automatically cured after you are in the infected state for d time periods. •You become immune from infection (can’t reenter state 1) once you enter and leave state 1. •A public health authority has the ability to “vaccinate” a certain number of vertices, making 27 them immune from infection. Periodicity State vector: s(t) = (s1(t), s2(t), …, sn(t)). First example, s(1) = s(3) = s(5) = …, s(0) = s(2) = s(4) = s(6) = … Second example: s(1) = s(2) = s(3) = ... In all of these processes, because there is a finite set of vertices, for any initial state vector s(0), the state vector will eventually become periodic, i.e., for some P and T, s(t+P) = s(t) for all t > T. The smallest such P is called the period. 28 Periodicity II First example: the period is 2. Second example: the period is 1. Both basic and irreversible threshold processes are special cases of symmetric synchronous neural networks. Theorem (Goles and Olivos, Poljak and Sura): For symmetric, synchronous neural networks, the 29 period is either 1 or 2. Periodicity III When period is 1, we call the ultimate state vector a fixed point. When the fixed point is the vector s(t) = (1,1,…,1) or (0,0,…,0), we talk about a final common state. One problem of interest: Given a graph, what subsets S of the vertices can force one of our processes to a final common state with entries equal to the state shared by all the vertices in S in the initial state? 30 Periodicity IV Interpretation: Given a graph, what subsets S of the vertices should we plant a disease with so that ultimately everyone will get it? (s(t) (1,1,…,1)) Economic interpretation: What set of people do we place a new product with to guarantee “saturation” of the product in the population? Interpretation: Given a graph, what subsets S of the vertices should we vaccinate to guarantee that ultimately everyone will end up without the 31 disease? (s(t) 0,0,…,0)) Conversion Sets Conversion set: Subset S of the vertices that can force a k-threshold process to a final common state with entries equal to the state shared by all the vertices in S in the initial state. (In other words, if all vertices of S start in same state x = 1 or 0, then the process goes to a state where all vertices are in state x.) Irreversible k-conversion set if irreversible process. 32 1-Conversion Sets k = 1. What are the conversion sets in a basic 1-threshold process? 33 1-Conversion Sets k = 1. The only conversion set in a basic 1-threshold process is the set of all vertices. For, if any two adjacent vertices have 0 and 1 in the initial state, then they keep switching between 0 and 1 forever. What are the irreversible 1-conversion sets? 34 Irreversible 1-Conversion Sets k = 1. Every single vertex x is an irreversible 1conversion set if the graph is connected. We make it 1 and eventually all vertices become 1 by following paths from x. 35 Conversion Sets for Odd Cycles C2p+1 2-threshold process. What is a conversion set? 36 Conversion Sets for Odd Cycles C2p+1. 2-threshold process. Place p+1 1’s in “alternating” positions. 37 38 39 Conversion Sets for Odd Cycles We have to be careful where we put the initial 1’s. p+1 1’s do not suffice if they are next to each other. 40 41 42 Irreversible Conversion Sets for Odd Cycles What if we want an irreversible conversion set under an irreversible 2-threshold process? Same set of p+1 vertices is an irreversible conversion set. Moreover, everyone gets infected in one step. 43 Vaccination Strategies Mathematical models are very helpful in comparing alternative vaccination strategies. The problem is especially interesting if we think of protecting against deliberate infection by a 44 bioterrorist. Vaccination Strategies If you didn’t know whom a bioterrorist might infect, what people would you vaccinate to be sure that a disease doesn’t spread very much? (Vaccinated vertices stay at state 0 regardless of the state of their neighbors.) Try odd cycles again. Consider an irreversible 2threshold process. Suppose your adversary has enough supply to infect two individuals. Strategy 1: “Mass vaccination”: make everyone 0 45 and immune in initial state. Vaccination Strategies In C5, mass vaccination means vaccinate 5 vertices. This obviously works. In practice, vaccination is only effective with a certain probability, so results could be different. Can we do better than mass vaccination? What does better mean? If vaccine has no cost and is unlimited and has no side effects, of course we 46 use mass vaccination. Vaccination Strategies What if vaccine is in limited supply? Suppose we only have enough vaccine to vaccinate 2 vertices. Consider two different vaccination strategies: Vaccination Strategy I Vaccination Strategy II 47 Vaccination Strategy I: Worst Case (Adversary Infects Two) Two Strategies for Adversary Adversary Strategy Ia Adversary Strategy Ib 48 The “alternation” between your choice of a defensive strategy and your adversary’s choice of an offensive strategy suggests we consider the problem from the point of view of game theory. The Food and Drug Administration is studying the use of game-theoretic models in the defense against bioterrorism. 49 Vaccination Strategy I Adversary Strategy Ia 50 Vaccination Strategy I Adversary Strategy Ib 51 Vaccination Strategy II: Worst Case (Adversary Infects Two) Two Strategies for Adversary Adversary Strategy IIa Adversary Strategy IIb 52 Vaccination Strategy II Adversary Strategy IIa 53 Vaccination Strategy II Adversary Strategy IIb 54 Conclusions about Strategies I and II If you can only vaccinate two individuals: Vaccination Strategy II never leads to more than two infected individuals, while Vaccination Strategy I sometimes leads to three infected individuals (depending upon strategy used by adversary). Thus, Vaccination Strategy II is better. 55 Vaccination Strategies Stephen Hartke (2004) worked on a different problem: You can only vaccinate one person per time period and you can only infect one person per time period. The vaccinator and infector alternate turns. What is a good strategy for the vaccinator? 56 The Mathematics of k-Conversion Sets k-conversion sets are complex. Consider the graph K4 x K2. 57 k-Conversion Sets II Exercise: (a). The vertices a, b, c, d, e form a 2conversion set. (b). However, the vertices a,b,c,d,e,f do not. Interpretation: Immunizing one more person can be worse! (Planting a disease with one more person can be worse if you want to infect everyone.) Note: the same does not hold true for irreversible k-conversion sets. 58 k-Conversion Sets in Regular Graphs G is r-regular if every vertex has degree r. Set of vertices is independent if there are no edges. Theorem (Dreyer 2000): Let G = (V,E) be a connected r-regular graph and D be a set of vertices. (a). D is an irreversible r-conversion set iff V-D is an independent set. (b). D is an r-conversion set iff V-D is an 59 independent set and D is not an independent set. k-Conversion Sets in Regular Graphs II Corollary (Dreyer 2000): (a). The size of the smallest irreversible 2conversion set in Cn is ceiling[n/2]. (b). The size of the smallest 2-conversion set in Cn is ceiling[(n+1)/2]. This result agrees with our observation. 60 k-Conversion Sets in Regular Graphs III Proof: (a). Cn is 2-regular. The largest independent set has size floor[n/2]. Thus, the smallest D so that V-D is independent has size ceiling[n/2]. (b). If n is odd, taking the first, third, …, nth vertices around the cycle gives a set that is not independent and whose complement is independent. If n is even, every vertex set of size n/2 with an independent complement is itself independent, so an additional vertex is needed. 61 k-Conversion Sets in Graphs of Maximum Degree r Theorem (Dreyer 2000): Let G = (V,E) be a connected graph with maximum degree r and S be the set of all vertices of degree < r. If D is a set of vertices, then: (a). D is an irreversible r-conversion set iff SD and V-D is an independent set. (b). D is an r-conversion set iff SD, V-D is an independent set, and if S = , then D is not an 62 independent set. NP-Completeness Problem k-CONVERSION SET: Given a positive integer d and a graph G, does G have a kconversion set of size at most d? IRREVERSIBLE k-CONVERSION SET: Similar. Theorem (Dreyer 2000): k-CONVERSION SET and IRREVERSIBLE k-CONVERSION SET are NP-complete for fixed k > 2. (Whether or not they are NP-complete for k = 2 remains open.) 63 NP-Completeness II Proof: Reduction from a case of the independent set problem. Problem INDEPENDENT SET: Given a positive integer m and a graph G, does G have an independent set of size m? Theorem (Fricke, Hedetniemi, Jacobs): For fixed k3, INDEPENDENT SET is NP-complete for the class of k-regular, non-bipartite graphs. (The problem is in P for bipartite graphs.) 64 NP-Completeness III Given an instance of INDEPENDENT SET for a k-regular, non-bipartite graph G: Does G have an independent set of size m? Construct an instance of IRREVERSIBLE kCONVERSION SET: Does G have an irreversible k-conversion set of size |V(G)| - m? D is an irreversible k-conversion set iff V-D is independent. So: There is an irreversible k-conversion set of size |V(G)| - m iff there is an independent set of size m. 65 NP-Completeness IV Non-bipartiteness is not used here. It is used in the similar proof that k-CONVERSION SET is NP-complete. D is a k-conversion set iff D is independent and V(G) – D is independent. The construction is the same. We need the fact that if D is not a k-conversion set in G, then either V(G) – D is not independent or both V(G) – D and D are independent. The latter is impossible in a nonbipartite graph. 66 k-Conversion Sets in Trees 67 k-Conversion Sets in Trees The simplest case is when every internal vertex of the tree has degree > k. Leaf = vertex of degree 1; internal vertex = not a leaf. What is a 2-conversion set here? 68 All leaves have to be in it. This will suffice. 69 70 k-Conversion Sets in Trees So k = 2 is easy. What about k > 2? Also easy. Proposition (Dreyer 2000): Let T be a tree and every internal vertex have degree > k, where k > 1. Then the smallest k-conversion set and the smallest irreversible k-conversion set have size equal to the number of leaves of the tree. 71 k-Conversion Sets in Trees A vertex cover of graph G is a set S of vertices so that for every edge {u,v}, either u or v is in S. If T is a tree, let LT denote the set of leaves. Proposition (Dreyer 2000): Let T be a tree with every internal vertex of degree > k. Then S is a kconversion set (an irreversible k-conversion set) iff S = CLT where C is a vertex cover of the edges in V-LT. 72 k-Conversion Sets in Trees What if not every internal vertex has degree > k? If there is an internal vertex of degree < k, it will have to be in any k-conversion set and will never change sign. So, to every neighbor, this vertex v acts like a leaf, and we can break T into deg(v) subtrees with v a leaf in each. If every internal vertex has degree k, one can obtain analogous results to those for the > k case by looking at maximal connected subsets of vertices of degree 73k. k-Conversion Sets in Trees Dreyer presents an O(n) algorithm for finding the size of the smallest irreversible 2-conversion set in a tree of n vertices. The method builds on the generalization of the theorem characterizing irreversible k-conversion sets in the case where every internal vertex has degree k. The algorithm can be readily extended to find the size of the smallest irreversible k-conversion set.74 k-Conversion Sets in Grids Let G(m,n) be the rectangular grid graph with m rows and n columns. G(3,4) 75 Toroidal Grids The toroidal grid T(m,n) is obtained from the rectangular grid G(m,n) by adding edges from the first vertex in each row to the last and from the first vertex in each column to the last. Toroidal grids are easier to deal with than rectangular grids because they form regular graphs: Every vertex has degree 4. Thus, we can make use of the results about regular graphs. 76 T(3,4) 77 4-Conversion Sets in Toroidal Grids Theorem (Dreyer 2000): In a toroidal grid T(m,n) (a). The size of the smallest 4-conversion set is max{n(ceiling[m/2]), m(ceiling[n/2])} m or n odd { mn/2 + 1 m, n even (b). The size of the smallest irreversible 4conversion set is as above when m or n is odd, and it is mn/2 when m and n are even.78 Part of the Proof: Recall that D is an irreversible 4-conversion set in a 4-regular graph iff V-D is independent. V-D independent means that every edge {u,v} in G has u or v in D. In particular, the ith row must contain at least ceiling[n/2] vertices in D and the ith column at least ceiling[m/2] vertices in D (alternating starting with the end vertex of the row or column). We must cover all rows and all columns, and so need at least max{n(ceiling[m/2]), m(ceiling[n/2])} 79 vertices in an irreversible 4-conversion set. 4-Conversion Sets for Rectangular Grids More complicated methods give: Theorem (Dreyer 2000): The size of the smallest 4conversion set and smallest irreversible 4conversion set in a grid graph G(m,n) is 2m + 2n - 4 + floor[(m-2)(n-2)/2] 80 4-Conversion Sets for Rectangular Grids Consider G(3,3): 2m + 2n - 4 + floor[(m-2)(n-2)/2] = 8. What is a smallest 4-conversion set and why 8? 81 4-Conversion Sets for Rectangular Grids Consider G(3,3): 2m + 2n - 4 + floor[(m-2)(n-2)/2] = 8. What is a smallest 4-conversion set and why 8? All boundary vertices have degree < 4 and so must be included in any 4-conversion set. They give 82 a conversion set. 2-Conversion Sets for Grids Let Ci,k(G) be the smallest irreversible k-conversion set in graph G. Theorem (Flocchini, Lodi, Luccio, Pagli, and Santoro): Ci,2[G(m,n)] = ceiling([m+n]/2) Ci,2[T(m,n)] = ceiling([m+n]/2) – 1. 83 3-Conversion Sets for Grids For 3-conversion sets, the best we have are bounds: Theorem (Flocchini, Lodi, Luccio, Pagli, and Santoro): [(m-1)(n-1)+1]/3 Ci,3[G(m,n)] [(m-1)(n-1)+1]/3 +[3m+2n-3]/4 + 5 ceiling([mn+1]/2) Ci,3[T(m,n)] ceiling(mn/2 + m/6 + 2/3) 84 2- and 3-Conversion Sets for Small Grids For the special case of 2xn and 3xn grids, Dreyer has more precise results. 85 Bounds on the Size of the Smallest Conversion Sets In general, it is difficult to get exact values for the size of the smallest k-conversion and irreversible kconversion set in a graph. So, what about bounds? Sample result: Theorem (Dreyer, 2000): If G is an r-regular graph with n vertices, then Ci,k(G) (1 – r/2k)n for k r 2k. 86 Bounds on the Size of the Smallest Conversion Sets Conjecture (Dreyer): For a graph G on n vertices, the size of the smallest k-conversion set is n/k, and this bound is asymptotically sharp. 87 More Realistic Models Many oversimplifications in our models. For instance: •What if you stay infected only a certain number of days? •What if you are not necessarily infective for the first few days you are sick? •What if your threshold k for changes from 0 to 1 changes depending upon how long you have been 88 uninfected? More Realistic Models Consider an irreversible process in which you stay in the infected state (state 1) for d time periods after entering it and then go back to the uninfected state (state 0). Consider a k-threshold process in which we vaccinate a person in state 0 once k-1 neighbors are infected (in state 1). Etc. -- let your imagination roam free ... 89 More Realistic Models Our models are deterministic. How do probabilities enter? •What if you only get infected with a certain probability if you meet an infected person? •What if vaccines only work with a certain probability? •What if the amount of time you remain infective exhibits a probability distribution? 90 Alternative Model with Probabilities Consider an irreversible 1-threshold process in which you stay infected for d time periods and then enter the uninfected state. Assume that you get infected with probability p if at least one of your neighbors is infected. What is the probability that an epidemic will end with no one infected? 91 The Case d = 2, p = 1/2 Consider the following initial state: 92 The Case d = 2, p = 1/2 With probability 1/2, vertex a does not get infected at time 1. Similarly for vertex b. Thus, with probability 1/4, we stay in the same states at time 1. 93 The Case d = 2, p = 1/2 Suppose vertices are still in same states at time 1 as they were at time 0. With probability 1/2, vertex a does not get infected at time 2. Similarly for vertex b. Also after time 1, vertices c and d have been infected for two time periods and thus enter the uninfected state. Thus, with probability 1/4, we get to the following 94 state at time 2: 95 The Case d = 2, p = 1/2 Thus, with probability 1/4 x 1/4 = 1/16, we enter this state with no one infected at time 2. However, we might enter this state at a later time. It is not hard to show (using the theory of finite Markov chains) that we will end in state (0,0,0,0). (This is the only absorbing state in an absorbing Markov chain.). Thus: with probability 1 we will eventually kill the disease off entirely. 96 The Case d = 2, p = 1/2 Is this realistic? What might we do to modify the model to make it more realistic? 97 How do we Analyze this or More Complex Models for Graphs? We can use the model to do “what if” experiments. 98 What-if Experiments: •What if we adopt a particular vaccination strategy? •What happens if we try different plans for quarantining infectious individuals? 99 There is much more analysis of a similar nature that can be done with graph-theoretical models. Let 100 your imagination run free!