Sunteți pe pagina 1din 194

# APPLICATIONS AND VARIATIONS OF DOMINATION IN GRAPHS

## BY PAUL ANDREW DREYER, JR.

A dissertation submitted to the Graduate SchoolNew Brunswick Rutgers, The State University of New Jersey in partial fulllment of the requirements for the degree of Doctor of Philosophy Graduate Program in Mathematics Written under the direction of Fred S. Roberts and approved by

## by Paul Andrew Dreyer, Jr. Dissertation Director: Fred S. Roberts

In a graph G = (V, E ), S V is a dominating set of G if every vertex is either in S or joined by an edge to some vertex in S . Many dierent types of domination have been researched extensively. This dissertation explores some new variations and applications of dominating sets. We rst introduce the concept of Roman domination. A Roman dominating function is a function f : V {0, 1, 2} such that every vertex v for which f (v ) = 0 has a neighbor w with f (w) = 2. This corresponds to a problem in army placement where every region is either defended by its own army or has a neighbor with two armies, in which case one of the two armies can be sent to the undefended region if a conict breaks out. The weight of a Roman dominating function f is f (V ) =
v V

f (v ),

and we are interested in nding Roman dominating functions of minimum weight. We explore the graph theoretic, algorithmic, and complexity issues of Roman domination, including algorithms for nding minimum weight Roman dominating functions for trees and grids. We then explore a dynamic variant of domination. Given a graph with each vertex having a sign {+, }, we dene a kthreshold process by updating the graph at every time step according to the rule that a vertex switches sign if and only if k or more of its neighbors have the opposite sign. A set S of vertices is a kconversion set if when a ii

kthreshold process is started with the vertices in S positive and the vertices in V S negative, the entire vertex set eventually becomes all positive. We prove several bounds on the sizes of minimum kconversion sets and also explore monotone conversion sets, which are conversion sets where no positive vertex ever becomes negative, and irreversible kthreshold processes, where a vertex changes from to + if it has more than k positive neighbors, but not vice versa. Finally, we discuss a index structure based on dominating sets to speed up range queries on large point sets. Originally developed for searches through libraries of amino acid sequences, the structure can be applied to any library of objects with an associated metric. Some theoretical results are presented, as well as an analysis of the performance of the structure on subsets of the SWISS-PROT protein sequence database.

iii

Acknowledgements

(On graph theory) The theory of ramication is one of pure colligation, for it takes no account of magnitude or position; geometrical lines are used, but these have no more real bearing on the matter than those employed in genealogical tables have in explaining the laws of procreation. J.J. Sylvester (18141897)

I want thank God, rstly because I am nally nished (as in, Thank God Im done!), but also for all of the blessings he has given to me.

After God, I would like to thank my advisor, Fred Roberts. I could not have asked for a better mentor for my graduate career. He gave me the exibility to work on a variety of projects, and he provided excellent suggestions on all of my topics. I am following in his footsteps by heading out to the RAND Corporation after graduate school. He is certainly an excellent researcher and teacher to emulate, and I hope that I can be as much of a success.

I would also like to thank DIMACS. In addition to being an excellent resource for research ideas and collaborations, they have been very generous in providing me computing resources, materials, oce space, and the occasional free lunch. In particular, I would like to thank Jessica Herold and Sarah Donnelly at DIMACS for their assistance.

This research was done while on a variety of grants, both through DIMACS and through my advisor. I would like to thank the NSF for supporting me on grants CCR 91-19999, BIR 94-12594, DBI 99-82983, SBR 97-09134, and SES-92-11492. I would iv

also like to thank the Oce of Naval Research for their support on grants N00014-93-10642 and N00450-93-1-0133, and the Sloan Foundation, for support under grant 99-10-8.

I have been blessed with a series of excellent teachers and mentors throughout my schooling, and I am grateful to all of them. Dr. Wesley Miller came to my elementary school in the 4th grade just to teach me math, and no doubt started me on the path to where I am today. In high school, John Goebel, Gloria Barrett, and Dan Teague were all amazing teachers and coaches, and I have the pleasure to now call them my friends. In college, David Kraines and William Allard were excellent mentors. As a graduate student, I have received much help from my dissertation committee members, Michael Saks, J anos Koml os, and Stephen Hedetniemi. In particular, I want to thank Stephen Hedetniemi for being so open and willing to collaborate with me, and for being such a generous person and good friend. In addition, I would like to thank Martin Farach for mentoring me in computational biology, J ozsef Beck for teaching me combinatorics, and Peter Slater and Christine Mynhardt for getting me interested in domination in graphs.

Finally, I would like to thank my friends, especially Thomas Bullock and Ryan Martin, who have provided support, advice, and a lot of laughs throughout graduate school. I would also like to thank my friends, both old and new, for making these past ve years so much fun: Amanda, Ashley, Chris, Damon, Dave, Dawn, Eric, Ioanna, Je, Kathleen, Lisa, Marina, and Melissa, just to name a few. Also, I would like to thank my wonderful and considerate sister Dawn for nishing her thesis before I did.

I realize that this reads like an Academy Awards acceptance speech that has run two minutes too long, but how many times does someone get the opportunity (in print, no less) to give thanks for all of the wonderful people in their lives?

Dedication

This dissertation is dedicated to family, and in particular to my parents, Paul and Joanne Dreyer. Biological implications aside, I would not be where I am today if it was not for their love and support. In their honor, I have decided to name the following theorem after them, based upon a math puzzle that my parents and grandparents would ask me repeatedly when I was much, much younger.

Dreyers Theorem: Assuming there exists a half-cent, if a sh and a half costs a cent and a half, then three sh costs three cents.

It is a fair bet that no one else will claim this theorem as their own, so my familys place in mathematical history is assured.

This dissertation is also dedicated to the memory of my grandfather, Saraphino Truncale, who passed away during my last year of graduate school. He was an incredible man, and he is sorely missed by everyone who loves him.

vi

Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dedication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1. A Summary of Domination . . . . . . . . . . . . . . . . . . . . . . . . . 1.2. Denitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3. Outline of Thesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. Roman Domination in Graphs . . . . . . . . . . . . . . . . . . . . . . . . 2.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2. Properties of Roman Dominating Sets . . . . . . . . . . . . . . . . . . . 2.3. Exact Values of R (G) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4. Classifying graphs with R (G) (G) + 2. . . . . . . . . . . . . . . . .

ii iv vi x xi 1 1 2 6 9 9 11 18 20 29 37 37 46 51 57 61 68

2.5. Graphs for which R (G) = 2 (G) . . . . . . . . . . . . . . . . . . . . . . 2.6. Roman Dominating Functions in Grids . . . . . . . . . . . . . . . . . . . 2.6.1. Computing R(Gk,n ), k = 2, 3, 4 . . . . . . . . . . . . . . . . . . . 2.6.2. An Algorithm to Compute R(Gk,n ) for Fixed k . . . . . . . . . 2.7. Allowing Multiple Slides . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.8. Minimal Roman Dominating Functions . . . . . . . . . . . . . . . . . . . 2.9. Algorithms and Complexity . . . . . . . . . . . . . . . . . . . . . . . . . 2.10. Open Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii

3. Neural Networks and Models of Opinion Formulation . . . . . . . . . 3.1. Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1. Automata and Neural Networks . . . . . . . . . . . . . . . . . . 3.1.2. Majority Networks . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.3. Social Impact Models . . . . . . . . . . . . . . . . . . . . . . . . 3.2. Threshold Networks and kConversion Sets . . . . . . . . . . . . . . . .
m (G), and Conv i (G) . . . . . . . . . . . . . 3.3. Bounds on Convk (G), Convk k

70 70 70 72 74 76 87 88 93

## 3.3.1. Complete Bipartite and Multipartite Graphs . . . . . . . . . . . 3.3.2. Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3.3.3. Grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 3.3.4. Lower Bounds on Convk (G) . . . . . . . . . . . . . . . . . . . . . 127 3.4. Threshold Processes in Digraphs . . . . . . . . . . . . . . . . . . . . . . 134 3.5. Open Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 4. Search Structures for Protein Sequence Libraries . . . . . . . . . . . . 138 4.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 4.2. Sequence Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 4.2.1. Scoring Alignments . . . . . . . . . . . . . . . . . . . . . . . . . . 141 4.2.2. Scoring Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 4.2.3. Heuristics for Sequence Comparison . . . . . . . . . . . . . . . . 152 4.3. Index Structures for Searching Point Sets . . . . . . . . . . . . . . . . . 155 4.3.1. Dominating Sets in Random Graphs . . . . . . . . . . . . . . . . 156 4.3.2. An Index Structure for Range Queries . . . . . . . . . . . . . . . 157 Building DS trees . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Querying DS trees . . . . . . . . . . . . . . . . . . . . . . . . . 160 Performance of DS trees . . . . . . . . . . . . . . . . . . . . . . 163 Updating DS trees . . . . . . . . . . . . . . . . . . . . . . . . . 168 4.3.3. Experiments with the SWISS-PROT Protein Library . . . . . . . 169 4.3.4. Open Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 viii

## References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Vita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

ix

List of Tables

4.1. The four optimal global alignments of S1 and S2 . . . . . . . . . . . . . . 145 4.2. Summary of a range query on the point set S in Figure 4.2 for the query point q = (7, 0) and distance threshold T = 3. The range query correctly outputs the points in S within distance 3 of q : point 6 (with coordinates (6, 1)) and point 8 (with coordinates (8, 2)). . . . . . . . . . . . . . . . . 162

List of Figures

2.1. A healthy spider and a wounded spider. . . . . . . . . . . . . . . . . . . 2.2. Decomposing a tree T with R (T ) = (T ) + 2 into v , w, V , W , V , and W . In this example, removing the edge between the vertex in V and the vertex in W would leave two wounded spiders. . . . . . . . . . . . . 2.3. The graph above has a unique set of size ve, denoted by the black vertices in the graph on the left. However, it has an RDF of weight nine, as seen on the right. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4. The open and closed branches B (v, w) and B[v, w] are enclosed by the dotted lines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5. Deleting B [v, w] and adding vertices in V1 in some of the subtrees created produces an RDF in each new subtree. One of those subtrees Ti will have an RDF of weight at most 2|Di |. . . . . . . . . . . . . . . . . . . . . . . 2.6. The constructions for G2,n, 1 n 6. Filled-in circles denote vertices in V2, empty circles denote vertices in V1 . . . . . . . . . . . . . . . . . . 2.7. Constructions of Rsets for G3,n, 1 n 9. . . . . . . . . . . . . . . . 2.8. Attachments to the unique R sets for G3,4k+1 . The grey vertex denotes the rightmost member of V2 in the unique Rset for G3,4k+1. . . . . . . 2.9. Constructions of Rsets for G4,n, 1 n 11. . . . . . . . . . . . . . . 2.10. Constructing Gb. The numbers in the vertices of the graph on the left represent the thresholds for each vertex. In the digraph on the right, the smaller vertices denote transition vertices, and the larger vertices denote hub vertices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi

23

27

31

33

34

38 39

42 46

54

2.11. The number in brackets in the ([i], [j ])th entry in this table gives the class of (T, S ) that results from composing (T1, S1) of class [i] with (T2, S2) of class [j ]. An example is given for each pair ([i], [j ]). The numbers inside the vertices represent the number of copies of the vertex that appear in S . A dotted edge represents the edge joining the roots of T1 and T2. If it was necessary to add copies of r1 to S to defend r2 , then r1 is highlighted, and the number of copies of r1 which are added to S is noted in parentheses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

2.12. An illustration of the algorithm to compute R(T ). At step i, the root vertex of each maximal connected subtree in Gi is denoted with a lled in circle, and the class vector associated to each root vertex at step i is noted next to the vertex. The bold edge denotes the edge added by the composition of the subtree rooted at vP arent[ni] with the subtree rooted at vni . The lower right tree gives the minimum Roman dominating set S of T . Note that (T, S ) is of class [3], as the root vertex is defended by one of its neighbors. Also, the minimum of the rst three entries of the class vector associated to the root vertex of G4 = T is the entry associated with class [3]. . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

2.13. Constructing a reduction from an instance I of 3SAT to an instance of ROMAN DOMINATING FUNCTION on the graph G(I ). In our example, clause C1 = X1 X2Xn . . . . . . . . . . . . . . . . . . . . . . . . 68

3.1. Constructing a simple path of length k + 2. The highlighted edges denote the path, and the highlighted vertices denote the vertices which are leapfrogging each other at each step of the process. . . . . . . . . . . . xii 85

3.2. The number in brackets in the ([i], [j ])th entry in this table gives the class of (T, S ) that results from composing (T1, S1) of class [i] with (T2, S2) of class [j ]. Examples are given for each pair ([i], [j ]). The black vertices denote the vertices that appear in S . A dotted edge represents the edge joining the roots of T1 and T2. If it was necessary to add a copy of r1 or r2 to S to convert r2, the added vertex is shown in grey, and the number of vertices which are added to S is noted in parentheses. In some cases, the class of the resulting composition is dierent depending on whether r1 or r2 is added to S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

## i (T ). At step i, the 3.3. An illustration of the algorithm to compute Conv2

root vertex of each maximal connected subtree in Gi is denoted with a lled in circle, and the class vector associated to each root vertex at step i is noted next to the vertex. The bold edge denotes the edge added by the composition of the subtree rooted at vP arent[ni] with the subtree rooted at vni . The lled in circles in the lower right tree give the minimum irreversible 2conversion set S for T . Note that (T, S ) is of class [1], as the root vertex is not in S . Also, the minimum of the rst two entries of the class vector associated to the root vertex of G4 = T is the entry associated with class [1]. . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

3.4. Monotone 4conversion sets for T6,6, T6,7, T6,8, T7,9, and T8,8. The edges on the border are assumed to wrap around the grid. . . . . . . . . . . . 107

3.5. Constructing minimum isolate-free vertex covers for G1,n , G2,n , and G3,n , 5 n 8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

3.6. The above construction for an isolate-free vertex cover for G8,8 (left) gives a cover of size 43, but there is also an isolate-free vertex cover (right) of size 42. The dotted lines in the construction on the left denote how the vertex cover was built up stage by stage. . . . . . . . . . . . . . . . . . . 111 xiii

3.7. Some constructions of conversion sets based on work from Flocchini et al., and Luccio. (a) A minimum irreversible 2 conversion set for G4,4. (b) A minimum irreversible 3conversion set for G9,9. (c) A monotone 3conversion set for T9,9. . . . . . . . . . . . . . . . . . . . . . . . . . . 114 3.8. Minimum conversion sets (c.s.) for various 2 n and 3 n grids. (a) A monotone 2c.s. for G2,5. (b) A 2c.s. for C2,5 . (c) A 3c.s. for C2,5 . (d) An irreversible 3c.s. for T3,5. (e) An irreversible 3c.s. for C3,6 . (f) A 3c.s. for T3,6. (g) A monotone 3c.s. for T3,6. (h) A monotone 3c.s. for C3,11. The dotted boxes separate S0 , S1, and S2 , described in the proof. All edges that extend beyond the border of the grid are assumed to wrap around to the opposite side. . . . . . . . . . . . . . . . 128 3.9. Constructing a minimum monotone conversion set. For the example above, m = 9 and k = 4. For ease in viewing, the vertices in S are s3 , s2 , and s1 from left to right. S T is a monotone 4conversion set of size six for a graph on 15 vertices, and as |P | and |T | increase, the ratio |S T |/|S T P | will approach 1/4. . . . . . . . . . . . . . . . . . . . 129 3.10. Constructing a minimum 2step conversion set. For the example above, m = 9 and k = 4. S T is a 2step 4conversion set of size six for a graph on 15 vertices, and as |P | and |T | increase, the ratio |S T |/|S T P | will approach 1/4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 4.1. Finding optimal global and local alignments for S1 and S2 . The (i, j ) entry in the left array equals the score of an optimal alignment of S (Ai , Bj ), with A0 and B0 being the empty sequence 2. The (i, j ) entry in the right array equals the maximum score of an alignment of a sux of Ai with a sux of Bj . In the array on the left, the traceback to recover the optimal alignments of S1 and S2 is shown. If the (i, j ) entry is circled, then an optimal alignment of Ai and Bj appears in some optimal alignment of A and B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 xiv

4.2. An illustration of the algorithm to build a DS tree ({Dk }, {D(vi)}) for a set of points S R2 using the L1 metric. In the top row, the rst table lists the coordinates of the ten points in S , plotted in the graph next to the table. The table on the right lists the L1 distances between each pair of points in S , and the set of distances M = {m1/2, m1/4, . . . , m1/64} is given. The three graphs in the bottom row are the Gk as described in the algorithm for k = 1, 2, 3. Under each Gk , the sets Dk and Nk (j ) are given for each vertex j Dk . In addition, the sets D(j ) are given for each vertex j Dk1 . The collection of sets {D(v ) : v S } is summarized in the table to the right of G3 . . . . . . . . . . . . . . . . . . . . . . . . . . 159 4.3. For subsets of the SWISS-PROT library of sizes ranging from 100 to 6400, a series of 100 range queries with distance threshold T were performed using DS trees generated by BuildIndex, where T varied from zero to 1500. For each subset S of the library and for each distance threshold T , this graph shows the average fraction of S that a query sequence was compared to during a range query with distance threshold T using the DS trees. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

xv

Chapter 1 Introduction

1.1

A Summary of Domination

Domination in graphs has been an extensively researched branch of graph theory. In a graph, a dominating set is a subset S of the vertices such that every vertex is either in S or adjacent to a vertex in S . These terms will be dened in greater detail in the next section. A recent book on the topic of domination [45] lists over 1,200 papers related to domination in graphs, and several hundred papers on the topic have been written since the publication of the book two years ago. Historically, the rst domination-type problems came from chess. In the 1850s, several chess players were interested in the minimum number of queens such that every square on the chess board either contains a queen or is attacked by a queen (recall that a queen can move any number of squares horizontally, vertically, or diagonally on the chess board). In 1862, the chess master C.F. de Jaenisch wrote a treatise [23] on the applications of mathematical analysis to chess in which he considered the number of queens necessary to attack every square on a n n chess board. Apart from chess, domination in graphs has applications to several other elds. Domination arises in facility location problems, where the number of facilities (e.g., hospitals, re stations, 7-11s) is xed and one attempts to minimize the distance that a person needs to travel to get to the closest facility. A similar problem occurs when the maximum distance to a facility is xed and one attempts to minimize the number of facilities necessary so that everyone is serviced. Concepts from domination also appear in problems involving nding sets of representatives, in monitoring communication or electrical networks, and in land surveying (e.g., minimizing the number of places a surveyor must stand in order to take height measurements for an entire region).

Part of what motivates so much research into domination is the multitude of varieties of domination. In [45], the authors cite more than 75 variations of domination. There can be conditions on the dominating set S (S is connected, independent, a clique, a path, G[S ] contains a perfect matching, etc.) or conditions on V S (each vertex in V S is dominated exactly once, or at least k times, or the number of vertices that is dominated multiply is minimized, etc.). In addition, there is a notion of fractional domination, where a weight is assigned to every vertex such that the sum of the weights in every closed neighborhood is at least one. There are several other types of domination that have not been mentioned, and the material in this thesis adds to the compendium of varieties of domination.

1.2

Denitions

There are many terms that are assumed to be understood throughout this thesis. We present denitions of some basic terms here, and introduce other terms when necessary. A graph consists of a set V of vertices and a set E of pairs of vertices called edges. A graph is determined by its edge and vertex set, so if G is a graph, we can write G = (V, E ). Similarly, V (G) and E (G) denote the vertex set and edge set of a graph G, respectively. For a graph G = (V, E ), |V | is the order of G. A directed graph, or digraph is similar to a graph, except that the edge set is replaced with a set A of ordered pairs of vertices called arcs. If D is a digraph, we will write D = (V, A). In a digraph, an ordered pair of vertices (u, v ) corresponds to an arc from u to v , and in a graph, we will let uv denote the edge between u and v . If uv is an edge in a graph G, we say that u and v are adjacent in G, and if (u, v ) is an arc in a digraph D, we will say that u is adjacent to v in D. We will assume that all graphs and digraphs are simple, that is, no edge or arc appears in the edge set more than once, and there is never an edge or arc from a vertex to itself. In a graph G = (V, E ), the degree of a vertex v , denoted deg(v ), is the number of vertices which are adjacent to v (or, the number of edges that contain v ). The minimum and maximum degree of a graph G = (V, E ) are denoted (G) = min{deg(v ) :

v V } and (G) = max{deg(v ) : v V }, respectively. A graph G is r regular if (G) = (G) = r , i.e., all vertices of G have degree r . A vertex is isolated if its degree is zero, and a graph is isolate-free if it has no isolated vertices. A vertex v is called pendant if deg(v ) = 1. In a digraph D = (V, A), the indegree (outdegree) of a vertex v , denoted degi (v ) (dego (v )) is the number of arcs which enter (leave) v . Thus, degi (v ) = |{u : (u, v ) A}| and dego (v ) = |{w : (v, w) A}|. In a digraph (graph), a path of length k from vertex v0 to vertex vk is a collection of arcs (edges) P = {(v0, v1), (v1, v2), . . . , (vk1, vk )}. For simplicity in notation, we will represent a path using only its vertices: P = v0 v1 . . . vk1 vk . A path is simple if the vi are distinct, and a path is closed if v0 = vk . A cycle of length k is a closed path C = v0 v1 . . . vk where v0 , v1, . . . , vk1 are distinct. We will use the same terminology for graphs to describe paths and cycles as we do for digraphs, and it will be clear from context whether we are talking of graphs or digraphs. A graph (digraph) is connected (strongly connected) if there is a path from every vertex to every other vertex. A graph H = (W, F ) is a subgraph of another graph G = (V, E ) if W V and F E . If G = (V, E ) and W V , the subgraph of G induced by W is a subgraph with vertex set W and edge set {uv : u W, v W, uv E }. G[W ] denotes the subgraph of G induced by W . Subgraphs and induced subgraphs are dened similarly for digraphs. A connected component of a graph G is a maximal connected subgraph of G, and in a digraph D, a strong component is a maximal strongly connected subgraph of D. The vertex set of a graph (digraph) can be partitioned into a set of connected components (strong components). For any vertex v V , the open neighborhood of v is the set N (v ) = {u V : uv E } and the closed neighborhood is the set N [v ] = N (v ) {v }. For a set S V , the open neighborhood is N (S ) = vS N (v ) and the closed neighborhood is N [S ] = N (S ) S . In digraphs, the in-neighborhood of a vertex vj is Nin (vj ) = {vi : (vi , vj ) A}. The out-neighborhood of a vertex vi is dened similarly: Nout(vi ) = {vj : (vi , vj ) A}. In a connected graph G = (V, E ), the distance between two vertices u and v is the length of a shortest path joining u and v , and is denoted d(u, v ). A similar notion is dened in digraphs, where d(u, v ) is the number of arcs in a shortest path from u to v .

If u V and S V , then d(u, S ) denotes the minimum distance between u and any vertex of S . For an integer t 0, the tneighborhood of a vertex v is the set of vertices w for which d(v, w) t. The eccentricity of v V is ecc(v ) = max{d(v, w) : w V }. The radius of G is rad(G) = min{ecc(v ) : v V } and the diameter of G is max{ecc(v ) : v V }. A vertex v is a center of a graph G if ecc(v ) = rad(G). For a set of vertices S and a vertex v S , a vertex u is a private neighbor of v with respect to S (denoted by u is an S pn of v ) if u N [v ] N [S {v }]. That is, either u = v and v is adjacent to no other vertex in S , or v is the only neighbor of u in S . An S pn of v is external if it is a vertex in V S . The set pn(v, S ) = N [v ] N [S {v }] of all S pns of v is the private neighborhood of v with respect to S . A set S is irredundant if for every v S , pn(v, S ) = . To reiterate the denition from earlier, for a graph G = (V, E ), a set of vertices S is a dominating set of G if N [S ] = V , or equivalently, every vertex in V S is adjacent to at least one vertex in S . The domination number (G) is the minimum cardinality of a dominating set of G, and a dominating set S of minimum cardinality is called a set of G. A dominating set S is minimal if no proper subset of S is a dominating set, and we note for later reference that every minimal dominating set is a maximal irredundant set. A set S of vertices is independent if no two vertices in S are adjacent (or equivalently, G[S ] contains no edges), and i(G) denotes the minimum cardinality of an independent dominating set of G. A set S of vertices is a 2packing if for every pair of distinct vertices u, v S , N [u] N [v ] = . The 2packing number P2 (G) of a graph G is the maximum cardinality of a 2packing in G. A set S of vertices is a vertex cover of G if for every edge uv E , either u S or v S (or both). There are several dierent classes of graphs which we will refer to repeatedly. Pn denotes the graph consisting of a path on n vertices, Pn = v1 v2 . . . vn , and Cn denotes the graph consisting of a cycle on n vertices, Cn = v1 v2 . . . vn v1 . A connected graph is a tree if it does not contain a cycle as a subgraph. In a tree T , the vertices of degree one are called the leaves of T , and L(T ) denotes the set of leaves of a tree T . All non-leaf vertices of a tree T are called internal vertices of T . Kn denotes the complete graph on n vertices, where every vertex is adjacent to every other vertex. A graph

G = (V, E ) is bipartite if the vertex set can be partitioned into two disjoint subsets A and B such that vertices in A are only adjacent to vertices in B and vice versa. Km,n denotes the complete bipartite graph, where V = A B , |A| = m, |B | = n, A and B are independent sets, and every vertex in A is adjacent to every vertex in B . This can be extended to a complete kpartite (or multipartite) graph Km1 ,m2 ,...,mk where the vertex set V is the disjoint union of k independent sets Vi of size mi (called the partite classes of Km1 ,m2 ,...,mk ), and every vertex in Vi is adjacent to every vertex in V Vi .

In addition, we will look at some combinations of graphs. For graphs G and H , the Cartesian product of G and H , denoted G H , is the graph with vertex set {(u, v ) : u V (G), v V (H )}. Two vertices (u1 , v1) and (u2 , v2) in G H are adjacent if and only if one of the following is true: u1 = u2 and v1 is adjacent to v2 in H ; or v1 = v2 and u1 is adjacent to u2 in G. The join of two graphs G and H , denoted G + H , is the graph with vertex set V (G) V (H ) and edge set E (G) E (H ) {vw : v V (G), w V (H )}. The corona of G and H , denoted G H , is formed from one copy of G and |V (G)|

copies of H , where the ith vertex of G is adjacent to every vertex in the ith copy of H . In particular, G K1 is the graph constructed from a copy of G, where for each

vertex v V (G), a new vertex v (which we will call an endvertex) and an edge vv are added. Finally, for a graph G, the complement of G, denoted G, is the graph with V (G) = V (G) and uv E (G) if and only if uv E (G).

Given two positive functions f (n) and g (n), we say that g (n) = O(f (n)) if there exist positive constant c and K such that g (n ) cf (n ) for all n > K . Similarly, g (n) = (f (n)) if there exist positive constants c and K such that g (n ) c f (n ) for all n > K . g (n) = (f (n)) if g (n) = O(f (n)) and g (n) = (f (n)). This notation is used in the discussion of the complexity of algorithms, where n is the size of the input to an algorithm. For example, if an algorithm runs in O(n2 ) time, then there is some constant c such that on an input of size n, provided that n is large enough, the algorithm nishes in no more than cn2 time.

1.3

Outline of Thesis

The remainder of the thesis consists of three chapters exploring two variations of domination and an application of dominating sets to a problem in computational biology. In Chapter 2, we introduce the concept of Roman domination. In a graph, a Roman dominating multiset is a collection C of vertices such that every vertex is either in C or is the neighbor of a vertex which appears twice in C . This concept arises in a problem of placing armies to defend the regions of the Roman empire, where a single army in a region can defend the region, and two armies in a region can defend the region as well as any neighboring region (see [88]). Similarly, a Roman dominating function on a graph G is a function f : V {0, 1, 2} subject to the constraint that every vertex u for which f (u) = 0 has a neighbor v with f (v ) = 2. In comparison, a dominating function on a graph G is a function f : V {0, 1} subject to the constraint that every vertex u for which f (u) = 0 has a neighbor v with f (v ) = 1. For a dominating function f , the set of vertices for which f (v ) = 1 forms a dominating set, and if the weight f (V ) =
v V

## f (v ) of f is a minimum over all dominating functions, then the

corresponding dominating set is a set. The weight of a Roman dominating function is dened similarly, R (G) denotes the minimum weight of a Roman dominating function for G, and a R function is a Roman dominating function of minimum weight. We show several properties of Rfunctions and determine the value of R(G) for several classes of graphs. In addition, we develop algorithms for computing R(G) for trees and grids, determine the computational complexity of determining R (G) for several classes of graphs, and explore some variations of Roman domination. In Chapter 3, we analyze a type of dynamic domination in graphs. Given a graph with a sign {+, } on each vertex and a positive integer k, the graph is updated at every time step according to the rule that a vertex switches sign if at least k of its neighbors have the opposite sign. Alternatively, a vertex switches from to + if at least k of its neighbors have the opposite sign, but not vice versa. These kthreshold processes and irreversible kthreshold processes are examples of neural networks. While threshold processes have not been widely studied, majority processes, where a vertex

switches sign if more than half of its neighbors have the opposite sign, have been studied in relation to problems in distributed computing and as models of opinion formulation in societies. In majority processes, a vertex set S is a dynamic monopoly, or dynamo, if when the vertices in S are positive and a majority process is started, then there is some time t at which the entire vertex set is positive (and will remain so for all t t). We dene a similar concept for threshold processes called conversion sets, where S is a kconversion set if when a kthreshold process is started with the vertices in S positive and the vertices in V S negative, the graph eventually becomes all positive. We discuss the complexity of nding minimum conversion sets, including an algorithm for nding irreversible conversion sets in trees. For several classes of graphs, we prove bounds on the size of conversion sets, irreversible conversion sets, and monotone conversion sets, which are conversion sets in which once a vertex becomes positive it never becomes negative again. We also analyze some variants of threshold processes. In Chapter 4, we consider a problem from computational biology. Many biologists who discover new proteins often compare the amino acid sequences of those proteins against large libraries of amino acid sequences to nd similar sequences, as similarity in sequence often implies similarity in function, physical structure, or genetic heritage. As the libraries of these sequences grow larger, comparing a new sequence against every sequence in the library becomes very time consuming. To remedy this, heuristics for the comparison method have been developed to speed up searches, but searches which use these heuristics can potentially miss similar sequences in the library that would have been detected using slower, non-heuristic methods. We discuss a method for building an index structure to speed up searches through a library while allowing a slower, more accurate comparison method to be used. Dominating sets play the role of sets of representatives for the library. A new sequence is rst compared against a small set of representative sequences. These comparisons help determine which sections of the library should continue to be searched, and then the new sequence is compared against sets of representative sequences for each section still being searched, and so on. This index structure can be built for any library of objects with a metric to compare

objects in the library. We analyze the expected time to build this index structure and the space necessary to store it and also determine the expected increase in speed of searches through restructured libraries. We also exhibit the performance of this index structure by restructuring subsets of the SWISS-PROT amino acid sequence library.

## Chapter 2 Roman Domination in Graphs

2.1

Introduction

In this chapter we study a variant of the domination number which is suggested in a recent article in Scientic American by Ian Stewart entitled Defend the Roman Empire! [88]. A Roman dominating function on a graph G = (V, E ) is a function f : V {0, 1, 2} satisfying the condition that every vertex u for which f (u) = 0 is adjacent to at least one vertex v for which f (v ) = 2. For a Roman dominating function f , consider the multiset S of vertices that contains f (v ) copies of each vertex v . This is called a Roman dominating multiset, or for simplicity, a Roman dominating set. Stated in other words, a Roman dominating function is a coloring of the vertices of a graph with the colors {0, 1, 2} such that every vertex colored 0 is adjacent to at least one vertex colored 2. The denition of a Roman dominating function is given implicitly in [5], [82] and [88]. The idea is that the colors 1 and 2 represent either one or two Roman armies stationed at a given location (vertex v ). A nearby location (an adjacent vertex u) is considered to be unsecured if no armies are stationed there (i.e., f (u) = 0). An unsecured location (u) can be secured by sending an army to u from an adjacent location (v ), subject to the constraint that at least one army must be left behind at v (i.e. f (v ) = 2). This model of the Roman army placement actually has some historical basis [69]. At the height of the Roman empire, it was able to employ a forward defense strategy, placing its armies at the borders of the empire. At the beginning of the 4th century AD, faced with reductions in the size of the Roman armies due to economic troubles, Emperor Constantine chose to switch to a defense-in-depth strategy. Using this method, he employed light forces along the borders of the empire to hinder (but probably not

10

stop) invaders. He also garrisoned mobile forces near self-contained strongholds, with the idea that the mobile forces would be able to respond to any incursion, supported by the forces in the strongholds. In responding to an invasion, some territory might have been lost initially, but it would have been quickly regained by the mobile forces. In their paper, ReVelle and Rosing [82] pose the problem of nding a minimum Roman dominating set in the context of integer programming. They dene the Set Covering Deployment Problem (SCDP) as follows for a graph G = (V, E ), with V = {v1, . . . , vn }. For each vertex vi , they dene two {0, 1}variables Xi and Yi representing the rst and second tokens (armies) on the vertex, respectively.
n

(SCDP) Minimize
i=1

(Xi + Yi )

## Subject to: Yi Xi for all i Xi +

vi vj E

Yj 1 for all i

The rst constraint guarantees that the rst token is placed on the vertex before the second. The rst and second constraints guarantee that every vertex either has a token on it or has a neighbor with two tokens on it. Given a set of variables X1, Y1, . . . , Xn , Yn that correspond to a minimum solution of the SCDP, we get a minimum Roman dominating set for G by placing Xi + Yi tokens on vi . The complementary problem to the SCDP is to maximize the number of regions secured by a xed number of armies (say p). The Maximal Covering Deployment Problem (MCDP) uses the same variables as the SDCP with an additional {0, 1}variable Ui for each vertex vi ; Ui equals one if vi has a token on it or a neighbor with two tokens on it and equals zero otherwise. The MCDP problem can be stated as follows.
n

(MCDP) Maximize
i=1

Ui

## Subject to: Yi Xi for all i Ui Xi +

vi vj E n

Yj for all i

(Xi + Yi ) = p
i=1

11

ReVelle and Rosing solve these IP problems using branch and bound techniques. We decided to instead view the problem from a purely graph theoretical approach. The recent book Fundamentals of Domination in Graphs [45] lists many varieties of dominating sets that have been studied. It appears that none of those listed are the same as Roman dominating sets. Thus, Roman domination appears to be a new variety of both historical and mathematical interest. The material in this chapter comes from a pair of papers co-authored by myself, E.J. Cockayne, S.M. and S.T. Hedetniemi, and A.A. McRae ([18], [19]). Some of the results were proven by me. Others were proven jointly by some of my co-authors and me, while some results were proven solely by my co-authors. For the last two types of results, the initials of the people who were involved in proving them will be noted in parentheses.

2.2

## Properties of Roman Dominating Sets

For a graph G = (V, E ), let f be a function from V to the set {0, 1, 2}, and let (V0, V1, V2) be the ordered partition of V induced by f , where Vi = {v V |f (v ) = i} and |Vi| = ni , for i = 0, 1, 2. There is a 1-to-1 correspondence between the functions f : V {0, 1, 2} and the ordered partitions (V0, V1, V2) of V . Thus, we will write f = (V0, V1, V2). A function f = (V0, V1, V2) is a Roman dominating function (RDF) if V2 where V0 ,

signies that the set V2 dominates the set V0, i.e., V0 N [V2]. If W2 V2

and W1 V1, then we say that W2 W1 defends N [W2] W1, and for simplicity in notation, if v V2 and w N [v ], we say that v defends w (instead of saying that {v } defends {w}). The weight of f is f (V ) =
v V

## f (v ) = 2n2 + n1 . The Roman domination

number, denoted R(G), is the minimum weight of an RDF of G, and we say that a function f = (V0, V1, V2) is a Rfunction if it is an RDF and f (V ) = R(G). Proposition 2.1 (EC, PD, SMH, STH) For any graph G, (G) R(G) 2 ( G) .

Proof:

12

## V0, (V1 V2) is a dominating set

| V 1 | + 2| V 2 | = R ( G) Now let S be a set of G. Dene V0 = V S V1 = V2 = S, and let f = (V0, V1, V2). Since V2 V0, f is an RDF and R ( G) f ( V ) = 2| S | = 2 ( G) .

(2.1)

(2.2)

Proposition 2.2 (EC, PD, SMH, STH) For any graph G, (G) = R (G) if and only if G = Kn . Proof: Let f = (V0, V1, V2) be a R function. The equality (G) = R(G) implies that we have equality in (2.1) in the previous proof. Hence, |V2| = 0, which implies that V0 = . Therefore, R(G) = |V1| = |V | = n. This implies that (G) = n, which in turn implies that G = Kn .

Proposition 2.3 (EC, PD, SMH, STH) Let f = (V0, V1, V2) be any R function for a graph G. Then:

13

(a) G[V1] has maximum degree one. (b) No edge of G joins V1 and V2. (c) Each vertex of V0 is adjacent to at most two vertices of V1. (d) V2 is a set of H = G[V0 V2 ]. (e) Each v V2 has at least two V2pns in H . (f ) If v is isolated in G[V2] and has precisely one external V2pn (in H ), say w V0 , then N (w) V1 = . (g) Let k1 equal the number of non-isolated vertices in G[V2], let c = |{v V0 : |N (v ) V2| 2}|. Then n0 n2 + k1 + c. Proof: (a) Suppose uvw is a path of length three in G[V1]. Form a new function f by changing (f (u), f (v ), f (w)) = (1, 1, 1) to (0, 2, 0). f (V ) < f (V ), a contradiction. Then f is an RDF with

(b) Let uv E (G), where f (u) = 1 and f (v ) = 2. Form f by changing f (u) to 0. Then f is an RDF with f (V ) < f (V ), a contradiction.

(c) Suppose v0 V0 is adjacent to a1 , b1, c1 V1. Let f = (W0 , W1, W2), where W0 = (V0 {a1, b1, c1}) {v0 } W1 = V1 {a1 , b1, c1} W2 = V2 {v0 }. It follows that f (V ) = (n1 3) + 2(n2 + 1) = (n1 + 2n2 ) 1 < f ( V ) = R ( G) . But since W2 W0 , f is an RDF with f (V ) < f (V ), a contradiction.

14

(d) Suppose that S is a dominating set of G[V0 V2] and |S | < |V2|. Dene f = (W0, W1, W2) by W0 = (V0 V2) S W1 = V1 W2 = S. Then W2 W0 and f is an RDF. However, f (V ) = |W1| + 2|W2| < n1 + 2n2 = f (V ), which is a contradiction.

(e) By (d), V2 is a set of H and hence is a maximal irredundant set in H . Therefore, each v V2 has at least one V2pn in H . Let v be isolated in G[V2]. Then v is a V2pn of v . Suppose that v has no external V2pn. Then the function produced by changing f (v ) from 2 to 1 is an RDF of smaller weight, a contradiction. Hence, v has at least two V2pns in H . Suppose that v is not isolated in G[V2] and has precisely one V2 pn (in H ), say w. Consider the function produced by changing f (v ) to 0 and f (w) to 1. The vertex v is still defended because it has a neighbor in V2. All of v s neighbors in V0 are also defended, since every vertex in V0 has another neighbor in V2 except for w, which is now in V1 . Therefore, this new function is an RDF of smaller weight, which is a contradiction. Again, we can conclude that v has at least two V2pns in H .

(f) Suppose the contrary. Dene a new function f with f (v ) = 0, f (y ) = 0 for y N (w) V1 , f (w) = 2, and f (x) = f (x) for all other vertices x. f (V ) = f (V ) |N (w) V1| < f (V ), contradicting the minimality of f .

15

## the proof of (e), n0 k0 + 2k1 + c = n2 + k1 + c, as required.

Proposition 2.4 (EC, PD, SMH, STH) Let f = (V0, V1, V2) be a R function of an isolate-free graph G, such that n1 is a minimum. Then (a) V1 is independent, and V0 V2 is a vertex cover. (b) V0 V1 .

(c) Each vertex of V0 is adjacent to at most one vertex of V1, i.e., V1 is a 2packing. (d) Let v G[V2] have exactly two external V2pns w1 and w2 in V0. Then there do not exist vertices y1 , y2 V1 such that y1 w1vw2y2 is a path in G. (e) n0 3n/7, and this bound is sharp, even for trees. Proof: (a) By Proposition 2.3(a), G[V1] consists of disjoint K1s and K2s. If there exists a K2, then we can change the function values of its vertices to 0 and 2. The resulting function g = (W0, W1, W2) is a R function with |W1| < |V1|, which is a contradiction. Therefore, V1 is an independent set, which implies that V0 V2 is a vertex cover, since the complement of any independent set is a vertex cover of G.

(b) By (a) and Proposition 2.3(b), ever vertex v V1 is adjacent to no vertex in V1 V2. Since G is isolate-free, v is adjacent to some vertex in V0. Hence, V0 V1 .

(c) Let v V0 and A = N (v ) V1, where |A| = 2. Note that |A| 2, by Proposition 2.3(c). Let W0 = (V0 A) {v } W1 = V1 A W2 = V2 {v }.

16

Observe that W2

W0 , so that g = (W0 , W1, W2) is an RDF. g (V ) = 2|W2| + |W1| = 2|V2| + 2 + |V1| |A| = f (V ).

Hence, g is a Rfunction with |W1| < |V1|, which is a contradiction. To see that V1 is a 2packing, observe that if v V2 is adjacent to two vertices u and w in V1, then f (u) and f (w) can be reduced to zero.

(d) Suppose the contrary. Form a new function by changing the function values of (y1 , w1, v, w2, y2 ) from (1, 0, 2, 0, 1) to (0, 2, 0, 0, 2). The new function is a Rfunction with a smaller value of n1 , which is a contradiction.

(e) Let ai , i = 1, 2, . . ., (G), be the number of vertices of V2 which have exactly i V2pns in V0. By Proposition 2.3(e)(f) and Proposition 2.4(c)(d), we have

n1 a2 + 3a3 +
j =4

jaj

(2.3)

n0 a1 + 2a2 + 3a3 +
j =4

jaj aj

(2.4)

n2 = a1 + a2 + a3 +
j =4

(2.5)

Therefore, n = n0 + n1 + n2

n0 + (a2 + 3a3 +
j =4

## jaj ), [by Equation (2.3)] aj ), [by Equation (2.5)]

j =4

+(a1 + a2 + a3 +

= n0 + a1 + 2a2 + 4a3 +
j =4

(j + 1)aj

n0 + a1 + 2a2 +
j =4

(j + 1)aj

17

## 4 jaj ), [by Equation (2.4)] + (n0 a1 2a2 3 j =4

= Hence, n0 3n/7.

j 7n0 a1 + 2a2 aj ( 1) 3 3 3 j =4 7n0 3 To show the lower bound on n0 is sharp, consider the tree

T with vertex set V = {u, u1, u2, u3, v1, v2, v3}, where u is adjacent to u1 , u2 and u3 , and ui is adjacent to vi for i = 1, 2, 3. T has a R function dened

by f = (V0, V1, V2) = ({u1, u2, u3}, {v1, v2, v3}, {u}), |V1| is a minimum, and the Rfunction f achieves the bound n0 = 3n/7 = 3.

Corollary 2.5 For any connected graph G, R(G) = min{2 (G S ) + |S |: S is a 2packing}. Proof: Let f = (V0, V1, V2) be a Rfunction of a graph G. By Proposition 2.4(c), we can assume that V1 is a 2packing. It follows from Proposition 2.3(d) that V2 is a set of the graph G V1 obtained from G by deleting all vertices in V1 .

We conclude this section with an upper bound on R(G) using a probabilistic method similar to that used by Alon and Spencer in [1]. Proposition 2.6 For a graph G on n vertices, R ( G) n Proof:
(G) 2 + ln( 1+ ) 2 . 1 + ( G)

## Given a graph G, select a set of vertices A, where each vertex is selected

independently with probability p (with p to be dened later). The expected size of A is np. Let B = V N [A], the vertices not dominated by A. Clearly f = (V (A B), B, A) is an RDF for G. We now compute the expected size of B. The probability that v is in B is equal to the probability that v is not in A and that no vertex in A is the neighbor of v .

18

This probability is (1 p)1+deg(v) . Since ex 1 x for any x 0, and deg(v ) (G), we can conclude that P r (v B) ep(1+(G)) . Thus, the expected size of B is at most nep(1+(G)) , and the expected weight of f , denoted E [f (V )], is at most 2np + nep(1+(G)) . The upper bound for E [f (V )] is minimized when p =
ln( 2 ) 1+ (G)
1+ (G)

(this is easily shown using calculus), and substituting this value in for p gives: E [f (V )] n
(G) ) 2 + ln( 1+ 2 . 1 + ( G) 2+ln( 2 1+ (G)
1+ (G)

## , there must be some RDF

with at most this weight. It turns out that this bound is sharp, being achieved when G is the disjoint union of n/2 copies of K2.

2.3

## Exact Values of R (G)

In this section we determine the value of R(G) for several classes of graphs. Let a, b, c be three consecutive vertices of a path Pn , and let f = (V0, V1, V2) be a R function of Pn . If two of the set {a, b, c} are in V0, then either the third is in V2, in which case f (a) + f (b) + f (c) 2, or a and c are in V0, and b is in V1. If this occurs, then the vertices adjacent to a and c, call them x and y , must both be in V2, so f (x) + f (a) + f (b) + f (c) + f (y ) 5. Hence, f (V ) 2n/3. Similar arguments show that the same lower bound for R holds for the cycle Cn , and that the size of a set for Pn or Cn is at least n/3. The following proposition is easily proven.

Proposition 2.7 (EC, PD, SMH, STH) For the class of paths Pn and cycles Cn : (a) R(P3k ) = 2k and (P3k) = k. (b) R (P3k+1 ) = 2k + 1 and (P3k+1) = k + 1. (c) R (P3k+2 ) = 2k + 2 and (P3k+2) = k + 1. (d) R(C3k ) = 2k and (C3k ) = k. (e) R (C3k+1 ) = 2k + 1 and (C3k+1) = k + 1. (f ) R (C3k+2 ) = 2k + 2 and (C3k+2) = k + 1.

19

For the class of complete multipartite graphs Km1 ,...,mn there are three cases to consider.

Proposition 2.8 (EC, PD, SMH, STH) Let G = Km1 ,...,mn be the complete npartite graph with m1 m2 . . . mn and n 2. (a) If m1 3 then R(G) = 4. (b) If m1 = 2 then R (G) = 3. (c) If m1 = 1 then R (G) = 2.

Proof: Throughout this proof, let R be the partite set of size m1 , and let S = V R. (a) Let u R and v S and let f (u) = f (v ) = 2, while for every other vertex w in either R or S , let f (w) = 0. Since f is an RDF, we have R (G) 4. Let g = (V0, V1, V2) be any Rfunction of G. If there exists a vertex w R V0, then there must exist a vertex x S V2. If there also exists a vertex y V0 S , then there must exist a vertex z V2 R. But in this case g (V ) 4. However, if every vertex y S {x} satises g (y ) > 0, then g (V ) 4. The argument is identical if we start with w S V0. Finally, if g (v ) > 0 for every vertex v V , then g (V ) 6. (b) Let R = {u, v }, and dene the RDF g = (V0, V1, V2) by the values g (u) = 2, g (v ) = 1 and g (w) = 0 for every vertex w S . Then R(G) 3. Let f = (V0, V1, V2) be any R function of G. If f (w) = 0 for any vertex w S , then without loss of generality, we can assume that f (u) = 2. If f (v ) = 0, then there must exist a vertex x S such that f (x) = 2, and hence, f (V ) 4. On the other hand, if f (v ) > 0 then f (V ) 3. If f (w) > 0 for every vertex w S , then either (i) |S | 3, in which case f (V ) 3, or (ii) |S | = 2 and f (S ) 3, in which case f (V ) 3, or (iii) |S | = 2 and f (S ) = 2, in which case f (R) 2, i.e., f (V ) 4. (c) This case is obvious.

## One nal class of graphs is of some interest.

20

Proposition 2.9 (EC) If G is an isolate-free graph of order n, then R(G) = n if and only if n is even and G is the disjoint union of n/2 copies of K2. Proof: Consider rst the case of a connected graph G. By Proposition 2.1, we know that R(G) 2 (G), so if R(G) = n, then (G) n/2. But for any isolate-free graph, we know that (G) n/2. Hence, (i) (G) = n/2, and (ii) R(G) = n = 2 (G). From Theorem 2.2 in [45] (p. 42), we know that for any isolate-free graph G of order n, (G) = n/2 if and only if either G = C4 or G = H K1, where H K1 is the

corona of H and K1 . Recall that the corona of two graphs G and H , denoted G H , is the graph formed from one copy of G and |V (G)| copies of H , where the ith vertex of G is adjacent to every vertex in the ith copy of H . By (i), we can conclude that G = C4 or G = H K1 . The labeling (0, 2, 0, 1) of the vertices of C4 contradicts the assertion K1 has a Rfunction with R (G) = 2n.

## that R(C4 ) = n = 4. Thus, by (ii), G = H

The function which is 2 on each vertex of H and 0 on each endvertex is a R function. Suppose that H has an edge uv , and the corresponding endvertices adjacent to u and v are u and v , respectively. We can form an RDF of smaller weight by changing the function values to f (u ) = 0, f (u) = 2, f (v ) = 0 and f (v ) = 1, which is a contradiction. Therefore, the graph H has no edges, and since it is connected, H = K1 and it follows that G = K2. If G is not connected but is isolate-free and R (G) = n, then G is the union of n/2 disjoint copies of K2, and clearly n must be even. The converse is obvious.

2.4

## Classifying graphs with R (G) (G) + 2.

From Proposition 2.1, we know that (G) R (G) 2 (G). But from Proposition 2.2, we know that this lower bound is achieved only when G = Kn . Thus, if G is a connected graph of order n 2, then R(G) (G) + 1. The connected graphs G with Rfunctions of weight (G) + 1 and (G) + 2 have a very specic structure, which will be shown in the following propositions.

21

Proposition 2.10 (EC, PD, SMH, STH) If G is a connected graph of order n 2, then R(G) = (G) + 1 if and only if there is a vertex of degree n (G). Proof: : Assume G has a vertex v of degree n (G). If V2 = {v }, V1 = V N [v ], and V0 = V V1 V2, then V1 V2 is a set of G and f = (V0, V1, V2) is an RDF with f (V ) = (G) + 1. Since R(G) (G) + 1 for connected graphs of order n 2, f is a Rfunction for G. : In order for an RDF f = (V0, V1, V2) to have weight (G) + 1, either (i) |V1| = (G) + 1 and |V2| = 0 or (ii) |V1| = (G) 1 and |V2| = 1. Any other arrangement of weight (G) + 1 would have |V1| + |V2| < (G). In case (i), since |V2| = 0, then V1 = V . By a theorem of Ore ([45], p.41), (G) n/2 for a connected graph G on n vertices. Thus, n = (G) + 1 n/2 + 1, which implies that n 2. It is easily veried that R(P2 ) = 2 = (P2) + 1, and P2 has a vertex of degree 1. In case (ii), let f = (V0, V1, V2) be a Rfunction for G of weight (G) + 1, with |V1| = (G) 1 and |V2| = 1. Let V2 = {v }. Since no edge of G joins V1 and {v }, and {v } V0, deg(v ) = |V0| = n |V1| |V2| = n (G).

Several corollaries follow from Proposition 2.10 and its proof. Corollary 2.11 (EC, PD, SMH, STH) If G is a connected graph, then R(G) = (G)+1 if and only if G has a set S which contains a vertex v such that {v } and the set S {v } is a 2packing. Recall that for a graph G, i(G) denotes the minimum cardinality of an independent dominating set of G. Corollary 2.12 (SMH, STH) If G is a connected graph and R(G) = (G) +1, then ( G) = i ( G) . Corollary 2.13 Let G be a connected graph of order n > 2 with R(G) = (G) + 1. P2 (G) = (G) 1 if and only if there do not exist vertices v and w such that (i) V S

22

deg(v ) = n (G) and (ii) if D2 = {u : d(u, v ) = 2}, then d(w, D2) = 3. Proof: We know that if R(G) = (G) + 1, then |V2| = 1 and |V1| = (G) 1 for any Rfunction. Let V2 = {v } and V1 = D2 , where D2 is the set of vertices dened in the corollary. If V0 = N (v ), then f = (V0, V1, V2) is a R function, since |V1| = |V N [v ]| = n (n (G) + 1) = (G) 1. By Proposition 2.4(c), we know that V1 is a 2packing of cardinality (G) 1. Assume that there exists a 2packing P of cardinality greater than (G) 1. If v P , then no vertex in either V0 or V1 can be in P . If a vertex in V0, say w, is in P , then no other vertex in V0 can be in P , since every vertex in V0 has v as a neighbor. Thus, if a 2packing P contains a vertex w V0, then all other vertices in P must be in V1 . If w has a neighbor in V1, say x, then x cannot be in P . Thus, x V1 can be a vertex in P only if N [w] N [x] = . If |P | (G), then all of the vertices of V1 would have to be in P , which can only happen if N [w] N [x] = for all x V1. This can only happen if d(w, V1) 3. But we know that d(w, V1) = 3, because there is a path from w to V1 via vertex v .

By a brief enumeration of cases, the following can be shown. Corollary 2.14 If G is a connected graph and R(G) = (G)+1, then 1 rad(G) 2 and 1 diam(G) 4. In particular, if (G) 3, then rad(G) = 2 and diam(G) = 4. We next characterize the class of trees T for which R (T ) = (G) + 1. Given a graph G, we subdivide an edge uv by introducing a new vertex w, deleting the edge uv , and adding two new edges uw and wv . In other words, we replace the edge uv with a path uwv . For a positive integer t, a wounded spider is a star K1,t with at most t 1 of its edges subdivided. Similarly, for an integer t 2, a healthy spider is a star K1,t with all of its edges subdivided. In a wounded spider, a vertex of degree t will be called a head vertex, and the vertices that are distance two from the head vertex will be the foot vertices. Any vertex which is neither a head nor foot vertex will be called a body vertex.

23

The head and foot vertices are well dened except when the wounded spider is the path on two or four vertices. For P2 , we will consider both vertices to be head vertices, and in the case of P4, we will consider both pendant vertices as foot vertices and both interior vertices as head vertices. An example of a healthy spider and a wounded spider are shown in Figure 2.1.

## Figure 2.1: A healthy spider and a wounded spider.

Proposition 2.15 If T is a tree on two or more vertices, then R(T ) = (T ) + 1 if and only if T is a wounded spider.

Proof: : Let T be a wounded spider and let v be the head vertex. The set S = {w : d(v, w) = 2} is the set of foot vertices. Clearly, {v } S is a set for T , and f = (V S {v }, S, {v }) is an RDF with f (V ) = (T ) + 1. Therefore, f is a R function. : Let f = (V0, V1, V2) be a Rfunction for T of weight (T ) + 1. As in the proof of Proposition 2.10, either T = P2 (in which case R (P2) = 2 = (P2) + 1, or |V1| = (T ) 1 and |V2| = 1. Let V2 = {v }. Then |N (v )| = |V0| = n (T ). Since |V1| is minimized in f , by Proposition 2.4(c), each vertex of V0 is adjacent to at most one vertex of V1 and V1 is independent. Since V1 and V2 have no edges between them, every vertex in V1 must be adjacent to a vertex in V0. Furthermore, not every vertex in V0 can be adjacent to a vertex in V1, that is, T cannot be a healthy spider. If this were the case, then V0 would form a set for T and

deg(v ) = |V0| < |V0| + 1 = |V1| + |V2| = |V0| + |V1| + |V2| |V0| = n (T ), which is a contradiction. Hence, T is a wounded spider.

24

Other than wounded spiders, the classes of graphs for which R(G) = (G) + 1 include the following. Recall that the join of two graphs G and H , denoted G + H , is the graph with vertex set V (G) V (H ) and edge set E (G) E (H ) {vw : v V ( G) , w V ( H ) } . 1. All graphs of the form G = K1 + H . This class includes all complete graphs Kn and all wheels K1 + Cn . 2. All graphs of the form G = K2 + H , i.e., two non-adjacent vertices, each of which is adjacent to every vertex in H . This class includes the graphs K2,n for n 2, and all double wheels K2 + Cn . 3. All graphs of the form G = (K1 + H ) K1 . We next characterize the class of graphs for which R(G) = (G) + 2. Proposition 2.16 If G is a connected graph of order n 2, then R(G) = (G) + 2 if and only if: (a) G does not have a vertex of degree n (G), and (b) either G has a vertex of degree n (G) 1 or G has two vertices v and w such that |N [v ] N [w]| = n (G) + 2.

Proof: : From Proposition 2.10 and (a), we know that R (G) > (G) + 1. If G has a vertex v of degree n (G) 1, and we dene V0 = N (v ), V1 = V N [v ], and V2 = {v }, then f = (V0, V1, V2) is an RDF with f (V ) = (G) + 2, and hence f is a Rfunction. If there are two vertices v and w such that |N [v ] N [w]| = n (G) + 2, then dene V0 = N [v ] N [w] {v, w}, V1 = V (N [v ] N [w]), and V2 = {v, w}. f = (V0, V1, V2) is an RDF with f (V ) = (G) + 2, and hence f is a Rfunction. : In order for an RDF f = (V0, V1, V2) to have weight (G) + 2, either (i) |V1| = (G) + 2 and |V2| = 0, (ii) |V1| = (G) and |V2| = 1, or (iii) |V1| = (G) 2 and |V2| = 2. In order for such an f to be a R function, there can be no RDF of weight (G) + 1, which implies that G has no vertex of degree n (G).

25

In case (i), if |V2| = 0, then V1 = V . Again using Ores theorem ([45], p.41), n = (G) + 2 n/2 + 2, which implies that n 4. A simple analysis of the connected graphs on four or fewer vertices shows that R(G) = (G) + 1 for all such graphs. In case (ii), let f = (V0, V1, V2) be a Rfunction for G of weight (G) + 2 with |V1| = (G) and |V2| = 1. Let V2 = {v }. Since no edge of G joins V1 and v , and v it follows that deg(v ) = |V0| = n |V1| |V2| = n (G) 1. In case (iii), let f = (V0, V1, V2) be a Rfunction for G of weight (G) + 2 with |V1| = (G) 2 and |V2| = 2. Let V2 = {v, w}. Since no edge joins V1 to v or w and {v, w} V0, it follows that |N [v ] N [w]| = n |V1| = n ( (G) 2) = n (G) + 2. V0 ,

2
Corollary 2.17 If G is a connected graph and R(G) = (G)+2, then 2 rad(G) 4 and 3 diam(G) 8. Corollary 2.18 If T is a tree of order n 2, then R (T ) = (T ) + 2 if and only if (i) T is a healthy spider, or (ii) T is the vertex disjoint union of two wounded spiders T1 and T2, with a single edge joining a vertex v V (T1) and a vertex w V (T2), subject to the following conditions: 1. If either tree is a P2 , then neither vertex in P2 is adjacent to the head vertex of the other tree. 2. If v is a foot vertex and w is a body vertex, w cannot be adjacent to a foot vertex in T2 , and vice versa. 3. v and w are not both foot vertices. Proof: : If T is a tree of type (i) or (ii) mentioned in the corollary, then it is not a wounded spider, and hence, by Proposition 2.15, R (T ) > (T ) + 1. If T is a healthy spider, let V2 be the head vertex, V1 be the foot vertices, and V0 be the remaining vertices. In this case, V0 is the unique set for T , f = (V0, V1, V2) is an RDF with f (V ) = (T ) + 2, and f is a R function.

26

27

If |V1| is not minimized, then V1 does not form a 2packing. Therefore, two vertices x, y V1 form a path with a vertex w V0. If w is between x and y , then f = (V0 {w} {x, y }, V1 {x, y }, V2 {w}) is an RDF for T of the same weight as f , so it is also a Rfunction for T . Deleting the edge vw, we are left with two wounded spiders. If w, x, and y form a path (in that order), then f = (V0 {y }, V1 {x, y }, V2 {x}) is a R function for T . Deleting the edge vw, we are left with two wounded spiders. At most one of these substitutions can be made. If there were two or more, there would be a Rfunction of weight (T ) + 2 with |V2| 3, which we know cannot be the case. The deleted edge included a head vertex from at least one of the subtrees. If the tree remaining after the deletion of w, x, and y is a P2 , then the original tree was either a wounded spider with w as the head vertex or a P5 , where the head vertex of the P2 was adjacent to w, which was not the head vertex of the wounded spider on w, x, and y . In case (ii), let |V1| = (T ) 2 and V2 = {v, w}. In this case, |V1| is minimized, so |V1| is independent, and no vertex in V0 can have more than one neighbor in V1. In addition, V = N (v ) V0 and W = N (w) V0 must each contain a vertex not adjacent to a vertex in V1 . Let V = {x : d(v, x) = 2} N [w] and W = {x : d(w, x) = 2} N [v ]. Note that V W = V0 and V W = V1. An example of this decomposition of the vertex set is given in Figure 2.2.

Figure 2.2: Decomposing a tree T with R (T ) = (T ) + 2 into v , w, V , W , V , and W . In this example, removing the edge between the vertex in V and the vertex in W would leave two wounded spiders. If all vertices in V are adjacent to vertices in V , then |V | = |V |, and D = V W {w} forms a dominating set. If V W = , then |D | = |V | + |W | + 1 = |V | + |W | + 1 = |V1| + 1 = (T ) 1, a contradiction.

28

If V W = {x}, then let y be the neighbor of x in V . Then D = (V {y }) W {w} dominates T as long as V {y } = . If V = {y }, then {v } V V forms a P3 . If W2 = {y, w}, W1 = V1 {x}, and W0 = V W1 W2 , then f = (W0, W1, W2) is an RDF of weight less than f , a contradiction. If N (v ) N (w) = {x} and x is the only vertex in V0 not attached to a vertex in V1, then V0 is a dominating set of size |V0| = |V | + |W | 1 = (|V | + 1) + (|W | + 1) 1 = |V | + |W | + 1 = |V1| + 1 = (T ) 1, a contradiction. Since V and W each have a distinct vertex that is not adjacent to a vertex in V1, {v } V V and {w} W W each form wounded spiders, with v and w as the and W as the foot vertices of each wounded spider.

To complete the proof, we consider the possible paths between v and w and show that the deletion of an edge leaves two wounded spiders in all cases except the ones mentioned in the corollary. Case (i): There is an edge between v and w. In this case, if either {v } V V or {w} W W is a P2 , then T is a wounded spider, since attaching a P2 by an edge to the head vertex of a wounded spider produces another wounded spider. If neither is a P2 , then deleting the edge vw leaves two wounded spiders. Case (ii): There is a path between v and w of length two and it contains a vertex in V W . Let V W = {x}. If x is the unique vertex in V (similarly W ) not adjacent to a vertex in V1, then deleting the edge wx (similarly vx) leaves two wounded spiders. If this is not the case, deleting either wx or vx leaves two wounded spiders. Case (iii): There is a path v, x, y, w, where x V and y W . In this case, deleting the edge xy leaves two wounded spiders. Case (iv): There is a path v, x, y, z, w, where x V , y V W , and z W . In this case, deleting either xy or yz leaves two wounded spiders. Since V1 is independent, there cannot be a path v, r, s, t, u, w, where r V , s V , t W and u W , so the edge between the two wounded spiders cannot be between

29

foot vertices in each tree. Also, since no vertex in V0 can be adjacent to more than one vertex in V1, the edge which joins the two wounded spiders cannot be between a foot vertex of one tree and a body vertex of the other tree already adjacent to another foot vertex.

2.5

## Graphs for which R (G) = 2 (G)

From Proposition 2.1 we know that for any graph G, R(G) 2 (G). We will say that a graph G is a Roman graph if R(G) = 2 (G). In this section we consider the problem of characterizing Roman graphs. One class of Roman graphs is the class of graphs of the form G = K1 + H , where (G) = 1 and R(G) = 2. Equivalently, any graph of order n having a vertex of degree n 1 is a Roman graph. Proposition 2.7 identies all Roman paths and cycles, i.e., P3k , C3k , P3k+2 , and C3k+2 . Proposition 2.8 identies the Roman complete multipartite graphs, i.e., Km1 ,...,mn , where min{m1, . . . , mn} = 2, in which case either (G) = 1 and R(G) = 2, or (G) = 2 and R (G) = 4. Two simple characterizations of Roman graphs are the following.

Proposition 2.19 (EC, PD, SMH, STH) A graph G is Roman if and only if it has a R function f = (V0, V1, V2) with |V1| = 0. Proof: Let G be a Roman graph, and let D be any set of G. The function f = (V D, , D) is an RDF of weight 2 (G). Since G is Roman, R(G) = 2 (G), and therefore f is a Rfunction with |V1| = 0. Conversely, let f = (V0, V1, V2) be a Rfunction of G with |V1| = 0. Therefore, R(G) = 2|V2|, and since by denition V1 V2 V , it follows that V2 is a dominating

set of G. But by Proposition 2.3(d), we know that V2 is a set of G[V0 V2], i.e., |V2| = (G) and R(G) = 2 (G), i.e., G is a Roman graph.

30

Proposition 2.20 A graph G is Roman if and only if (G) (G S ) + |S |/2, for every 2packing S V . Proof: From Corollary 2.5, we know that R(G) is the minimum value of 2 (G S ) + |S |, over all 2packings S V . Thus, if R (G) = 2 (G), then 2 (G S ) + |S | 2 (G), or (G) (G S ) + |S |/2, for every 2packing S V . Conversely, if (G) (G S ) + |S |/2, for every 2packing S V , then 2 (G) 2 (G S ) + |S |, for every 2packing S V . This implies that

2 (G) R (G). But from Proposition 2.1 we know that R(G) 2 (G). Therefore, R(G) = 2 (G).

Although there is no known characterization of Roman trees, we have found the following subclass of Roman trees. Theorem 2.21 If T is a tree on two or more vertices having a unique set D, which is independent, then T is a Roman tree. In particular, the only Rfunction for such a tree T is f = (V D, , D). It turns out that the independence of D is a necessary hypothesis, as there exist trees with unique dominating sets which are not independent, for which R(T ) < 2 (T ). An example is shown in Figure 2.3. In addition, it is not necessarily true that T having a unique independent set implies that T is Roman. This theorem covers trees with a unique set that is independent, which are dierent from trees with unique independent sets. Before proving the theorem, it is necessary to state some results from a paper by Gunther, et al. [39] on the structure of graphs with unique minimum dominating sets. Lemma 2.22 [39] Let G be a graph which has a unique set D. Then for any x V D, (G x) = (G) and for any x D, (G x) (G). Theorem 2.23 [39] Let T be a tree of order n 3. Then the following conditions are equivalent.

31

Figure 2.3: The graph above has a unique set of size ve, denoted by the black vertices in the graph on the left. However, it has an RDF of weight nine, as seen on the right. 1. T has a unique set D. 2. T has a set D for which every vertex x D has at least two private neighbors other than itself. 3. T has a set D for which every vertex x D has the property that (T x) > (T ). Proof of Theorem 2.21: Let T be a tree with a unique set D, and assume that D is independent. Let us call such a tree an independent unique tree. Assume furthermore that T has a Rfunction f = (V0, V1, V2) with V1 = of weight 2 (T ), and that T is a tree of smallest order satisfying these conditions, i.e., |V | is minimized. Let us also assume that for this tree T , among all Rfunctions f with V1 = , |V1| is minimized. We can also assume, without loss of generality, that no vertex in V2 is a leaf of T . We will prove that no independent unique tree T has a Rfunction with V1 = . The proof proceeds through a series of observations. For the rest of this chapter, for a vertex set W and a subgraph H , we adopt the abuses of notation W H and v H to represent the vertex set W V (H ) and to denote that v V (H ), respectively. In addition, for a subgraph G of G, G G denotes the induced subgraph G[V V (G )].

32

Observation 2.24 If T is an independent unique tree of smallest order, with a Rfunction f = (V0, V1, V2), where V1 = , then all of the vertices in V1 must be leaves of T . Proof: Assume that there is a non-leaf vertex v V1. Case (i): v D. In this case, v is dominated by some vertex w D. Deleting every edge containing v , except vw, creates k = deg(v ) > 1 trees T1 , T2, . . . , Tk . Di = D Ti is a unique set for Ti that is independent, and fi = (V0 Ti, V1 Ti, V2 Ti) is a Rfunction for Ti . Since
k i=1

k i=1 fi (V

## (Ti)) = f (V ) 2 (T ), there must

be some i for which R(Ti) = fi (V (Ti)) 2|Di| = 2 (Ti), violating the minimality of T. Case (ii): v D. Consider the subtrees T1, . . . , Tk generated by deleting all edges vw, where w pn(v, D). If k 2, then as above, Di = D Ti is a unique set for Ti that is independent, and fi = (V0 Ti , V1 Ti , V2 Ti ) is a Rfunction for Ti , and the minimality of T is again contradicted. If, however, k = 1 and all of the neighbors of v are private neighbors of v , then consider the subtrees T1, . . . , Ts created by deleting the vertices of N [v ]. All of these subtrees will contain at least two vertices. If one of the subtrees was a single vertex, that vertex would have to be in D since N (v ) D = , but no vertex in D is a leaf of T . By Theorem 2.23, v has at least two private neighbors, so s 2. Since D is independent and f is a R function, no vertex in D or V2 is in N (v ). Dening Di and fi as above, D = s i=1 Di {v }, and:
s s s

## fi (V (Ti)) = R(T ) 1 2 (T ) 1 = 2[(

i=1 i=1

|Di|) + 1] 1 = 2(
i=1

| D i | ) + 1.

Since s 2 and the weights and dominating set sizes are positive integers, we can conclude that for some i, fi (V (Ti)) 2|Di|, contradicting the minimality of T . Hence, all of the vertices in V1 are leaves of T .

33

At this point two denitions are necessary. If T is a tree containing the edge vw, the open branch B(v, w) is the subtree that contains the vertex w that is created by deleting the edge vw. A closed branch B [v, w] is the subtree containing v and w that is created by deleting all edges containing v except vw. Examples of open and closed branches are shown in Figure 2.4.

Figure 2.4: The open and closed branches B(v, w) and B[v, w] are enclosed by the dotted lines.

Observation 2.25 If T is an independent unique tree of smallest order, with a Rfunction f = (V0, V1, V2), where V1 = , then there cannot exist a vertex v V2 having an open branch T = B (v, w), such that V1 T = , unless w is a leaf of T . Proof: Assume that there is an open branch T = B(v, w) containing no vertices in V1. If v D, then its neighbor w T is not in D, and V2 = V2 T is a dominating set for T {w}, as is D = D T . In fact, D is a set for T , and by Lemma 2.22, |D | = (T ) = (T w) |V2 |. Thus, unless w is a leaf of T , deleting all of T except w from T gives a smaller tree with a unique set D = D (T T ) that is independent, and an RDF f = (V0 (T T ), V1 (T T ), V2 (T T )). Since |D | |V2 |, f (V (T T )) = f (V (T )) 2|V2 | 2|D| 2|V2 | = 2|D | + 2|D | 2|V2 | 2|D |, contradicting the minimality of T . If v D, then because D is a set, |D T | |V2 T |. Thus, if v is either not a private neighbor of any vertex, or v pn(x, D) for some x T , then deleting T leaves

34

a smaller tree with a unique set D = D (T T ) that is independent and an RDF f = (V0 (T T ), V1 (T T ), V2 (T T )), and the proof is as above. If v pn(w, D) for w T , then we modify the tree as follows. We delete B[v, w] from the tree, leaving k subtrees T1, . . . , Tk . An example of this branch deletion is shown in Figure 2.5. Again, none of these subtrees Ti will consist of a single vertex; if one of the Ti was a single vertex, the vertex would have to be in D, since v is not, but no vertex in D is a leaf of T . For every neighbor of v in T T that is not in V2 , we add that vertex to the V1 in its Ti . As earlier, we dene the RDFs fi = (V0 Ti , V1 Ti , V2 Ti ), and Di = D Ti is a set for Ti .

T1 v w T2 T3

Figure 2.5: Deleting B[v, w] and adding vertices in V1 in some of the subtrees created produces an RDF in each new subtree. One of those subtrees Ti will have an RDF of weight at most 2|Di|. Thus:
k

## fi (V (Ti)) f (V ) 2|V2 B[v, w]| + k

i=1 k

< f ( V ) 2| D T | + k 2| D | 2| D T | + k = 2
i=1

| Di | + k

The inequality above is strict because |D T | |V2 T | < |V2 B[v, w]|, since v V2. Thus, we can say that
k i=1 fi (V (Ti ))

2(

k i=1 |Di |) + (k 1)

## and since all of

the weights and |Di |s are integers, we can conclude that fi (V (Ti)) 2|Di| for some i, contradicting the minimality of T .

Observation 2.26 If T is an independent unique tree of smallest order, with a Rfunction f = (V0, V1, V2), where V1 = , then there cannot exist a vertex v V2

35

## with an open branch T = B (v, w) such that |V1 T | = 1.

Proof: Assume there is an open branch of v that contains exactly one vertex in V1, x, as a leaf, and further consider the path between v and x. xs neighbor, which we will denote y , must be in D, since some vertex in D must dominate x. Furthermore, some vertex z N (y ) must be in V2, since y must be dominated, and y cannot be in V2 because it is adjacent to a vertex in V1, namely x. There are two possibilities for the location of z . Case (i): There is a vertex z V2 N (y ) that is not on the path between v and x. In this case, all other open branches of z besides B(z, y ) contain no other vertices in V1. Since z V2 and is not in the private neighborhood of any of its neighbors (except, perhaps, y ), as in the proof of our previous observation, we can delete all of the open branches B (z, u), where u N (z ) {y }, and be left with a smaller tree T with D = D T as a unique independent set and R (T ) 2|D |, contradicting the minimality of T . Furthermore, z is now a leaf of T , and if f = (V0 T , V1 T , V2T ) = (V0 , V1 , V2 ) is an RDF of weight 2|D | for T , then g = (V0 {z, x}, V1 {x}, V2 {z }) is an RDF of lower weight. Now the branch no longer contains a vertex in V1 , and the proof proceeds as in the observation above. Case (ii): The only vertex z V2 N (y ) is on the path between v and x. Assume rst that the path between v and x is of length three or more. For all vertices in V2 in this open branch of v , none of their branches contain vertices in V1 except for those that contain x, so we can remove those branches entirely or replace them with a leaf as in the observation above. Consider the closed branch B[z, y ]. Every open branch B(y, q ) that does not contain z or x has no vertices in V1, so we know by previous arguments that in those branches, |D B(y, q )| |V2 B (y, q )|. Let u be the vertex on the path adjacent to z , u = y . Thus, if we delete B[z, y ] from T to get a new tree T and add u to V1 if it is not in V2 already, the new tree T has a unique set, D = D T , and an RDF f = (V0 T , V1 T (+{z }), V2 T ) of weight 2 (T ), a contradiction to the minimality of T .

36

The path between v and w cannot be of length one, as no vertices in V1 and V2 can be adjacent. If the path is of length two, then in the argument above, v = y , that is, v is xs neighbor in V2. We delete B [v, w] from the tree, creating the subtrees T1 , . . . , Tk and add all of the vertices in N (v ) dominated only by v to V1. If a subtree is a single vertex w, we can delete it as well, as it implies that v D and w pn(v, D). We will always have at least one subtree remaining with more than one vertex, because otherwise, T was a star K1,k+1 with one of its edges subdivided, and that graph clearly does not have a unique set that is independent. As in the proof of the observation above, one of the subtrees Ti will have R(Ti) 2 (Ti), contradicting the minimality of T .

## Observation 2.27 For a minimal counterexample T with Rfunction f

(V0, V1, V2), there cannot exist a vertex v V2 with an open branch B (v, w) such that |V1 B (v, w)| > 1. Proof: We have already shown that in a minimal counterexample there can be no open branches with zero vertices in V1 , unless the branch is a leaf, and we have shown that no open branch can contain exactly one vertex in V1 . Pick an open branch B(v, w) with v V2 with |V1 B(v, w)| 2 minimized. By minimality, if z B(v, w) is also in V2, then none of z s open branches contain vertices in V1 except for the open branch that contains v . As established earlier, all branches from such vertices in V2 can only consist of a single leaf. Let V1 B(v, w) = {x1, . . . , xk }, where k 2. Again, by minimality, no vertex on the path from w to xi can be in V2, including the leaves. Furthermore, at least one of the paths between w and xi has to have length greater than one. Otherwise, two vertices in V1 will share a neighbor (namely, w), which cannot happen when |V1| is minimized. Let d(w, xj ) > 1. Every vertex between w and xj must be the neighbor of a vertex in V2. Let yj be the neighbor of xj on the w xj path. Vertex yj must have a neighbor in V2 that is not on the path between w and xj , call it zj . Because we have

37

assumed that no vertex in V2 is a leaf of T , zj will have at least one other neighbor besides yj , but, as mentioned before, these neighbors must be leaves of T . However, if this is the case, T cannot have a unique set that is independent. If D is a unique set for T that is independent, then yj D, since, by Observation 1, xj is a leaf, xj must be dominated, and by Theorem 2.23, xj cannot be in D because xj can have at most one private neighbor. However, if zj has one neighbor that is a leaf, either zj or its leaf can be in D, contradicting the uniqueness of D as a set. If zj has more than one leaf, then zj must be in D, contradicting the independence of D. Therefore, no open branch of a vertex in V2 can contain two or more vertices in V1.

By the above observations, for a minimal counterexample T with Rfunction f = (V0, V1, V2), no open branch of any vertex in V2 can contain a vertex in V1, which implies that V1 = , a contradiction to our original assumption about f .

2.6 2.6.1

## Roman Dominating Functions in Grids Computing R (Gk,n ), k = 2, 3, 4

Recall that the Cartesian product of two graphs G and H , denoted G H , is a graph with vertex set {(u, v )|u V (G), v V (H )}. Two vertices (u1, v1) and (u2 , v2) in G H are adjacent if and only if one of the following is true: u1 = u2 and v1 is adjacent to v2 in H ; or v1 = v2 and u1 is adjacent to u2 in G. The Cartesian product Pm Pn is called the m n grid graph and is denoted Gm,n . The vertices in Gm,n will be denoted vi,j , 1 i m, 1 j n, and there is an edge between vi,j and vk,l if and only if |i k| + |j l | = 1. We will refer to the rows and columns of a grid by Ri = {vi,1, . . . , vi,n} and C j = {v1,j , . . ., vm,j }. Proposition 2.28 (EC, PD) For the 2 n grid graph G2,n, R (G2,n) = n + 1.

Proof:

38

If f = (V0, V1, V2) is an RDF for G2,n, then any vertex in V2 can defend at most four vertices, while a vertex in V1 can defend only one. Thus, in order to defend G2,n , we must have 4|V2| + |V1| 2n. Therefore, f (V ) = 2|V2| + |V1| 2|V2| + |V1|/2 n, with the rst inequality strict if and only if |V1| > 0. It follows that there can be an RDF for G2,n with f (V ) = n only if |V1| = 0 and the n/2 vertices in V2 each defend non-intersecting sets of four vertices. However, we will show this is impossible. Consider two adjacent vertices of G2,n of degree two (in the corners), no vertex in V2 can occupy either, since such a vertex would defend only three vertices. In addition, if there are two vertices v, w V2 defending those two corner vertices, then N [v ] N [w] = . Thus, R (G2,n) > n. We can show that R (G2,n) = n + 1 by construction. Dene the function g as follows: for each i 0 such that 2 + 4i n, let g (v2,2+4i) = 2, and for each j > 0 such that 4j n, let g (v1,4j ) = 2. Let g (v1,1) = 1, if n 1 (mod 4), let g (v2,n) = 1, and if n 3 (mod 4), let g (v1,n) = 1. For each remaining vertex u, let g (u) = 0. It is easily seen that g is an RDF and that g (V ) = n + 1. Sample constructions of RDFs for G2,n are shown in Figure 2.6.

Figure 2.6: The constructions for G2,n , 1 n 6. Filled-in circles denote vertices in V2, empty circles denote vertices in V1.

Proposition 2.29 For k 0, R(G3,4k ) = 6k +1, R(G3,4k+1) = 6k +2, R(G3,4k+2) = 6k + 4, and R(G3,4k+3) = 6k + 6. Proof: Figure 2.7 presents what we will prove are R functions for G3,n for 1 n 9. For G3,1 and G3,2, the minimality of the arrangement should be obvious. In G3,3, if there were a Roman dominating function of smaller weight, it would have two members of V2 and at most one member of V1, or one member of V2 and at most three members

39

## Figure 2.7: Constructions of R sets for G3,n , 1 n 9.

of V1. In the rst case, one cannot place two members of V2 on vertices of G3,3 and leave only one vertex undefended, and in the second case, one vertex in V2 can defend at most ve vertices, leaving at least four to be covered by members of V1. A similar argument applies for G3,4; if |V2| = 1, at least seven members of V1 will be needed to defend the rest of the graph. If |V2| = 2, there is no arrangement of two vertices in V2 that will defend more than eight vertices, leaving at least four to be covered by members of V1. It is important to note, as we show next, that (, , {v1,3, v2,1, v2,5, v3,3}) is the unique Rfunction for G3,5. This RDF has weight eight, and we will show that no other RDF has weight at most eight. No member of V2 can be a non-border vertex (i.e., v2,2, v2,3, v2,4 V2 ). If v2,3 V2, then the sets of vertices left to be defended form two copies of P5 , and even allowing the vertices neighboring the P5 s to be involved in defending them, we see that to defend both P5 s requires a Roman dominating function of weight at least eight. Similarly, if v2,2 V2 (equivalently, v2,4), then a Roman dominating function of weight at least seven is necessary to defend the remaining vertices, making a total weight of nine. Thus, the members of V2 must lie on the border of G3,5. If |V2| = k, then at least 15 4k members of V1 are necessary to defend G3,5. This means that |V2| = 4 and |V1| = 0 in order to get an RDF of weight at most eight. If v1,1 V2, it is impossible to defend the remaining 12 vertices using only three other members of V2 , each of which

40

defends a set of four distinct vertices from the remaining twelve; v3,2 must be in V2 in order to defend v2,2, which leaves a group of eight vertices that cannot be defended by two members of V2. Thus, no member of V2 can be a corner vertex. In order to defend v2,1 and v2,5, those vertices must be in V2 , and it is obvious that v1,3, v3,3 V2 is the only arrangement of two members of V2 that will defend the remaining seven vertices. Thus, the function we have described is the unique R function for G3 ,5 . If f = (V0, V1, V2) is an RDF for G3,m , then if G is the subgrid of the rst k + 1 columns, then f (V (G )) R (G3,k ), since if f (V (G )) < R (G3,k ), one could delete all but the rst k columns from the grid and add vertices in C k to V1 if they were defended by a vertex in V2 C k+1 , which would result in an RDF for G3,k of weight less than R(G3,k ). We will use this observation to prove a useful lemma. Lemma 2.30 If G is a copy of G3,5 with a vertex deleted from the fth column, then R ( G) = 8. Proof: If v2,5 is deleted from G3,5 to form G, then (, , {v1,4, v2,1, v2,2, v3,4}) is an RDF for G of weight eight, and if v1,5 or v3,5 is deleted, then (, , {v1,3, v2,1, v2,5, v3,3}) is an RDF for G of weight eight. Assume that f = (V0, V1, V2) is an RDF for G of weight at most seven. If G is the subgrid of the rst four columns of G, by the above observation, f (V (G )) 6. Therefore, f (C 5 ) 1. However, this means that the vertices in C 5 do not contribute to defending G , which means that f (V (G )) 7, which would imply that f (C 5 ) = 0. Therefore, f (C 4 ) 4 in order to defend the two vertices in C 5 , but we get a contradiction, since if G is the subgrid of the rst three columns of G, we know that f (V (G )) 4.

For G3,6, we have an RDF of weight 10. To show that R (G3,6) = 10, let G denote the rst ve columns of G3,6. If f = (V0, V1, V2) is an RDF for G3,6 of weight at most nine, then f (V (G )) 7. Thus, we need only consider RDFs for G3,6 for which f (C 6 ) = 1 or 2. If f (C 6 ) = 1, C 6 does not contribute to defending G , which implies

41

that f (V (G )) R(G3,5) = 8, and we know the unique RDF for G3,5 of weight eight. However, this RDF leaves two vertices in C 6 undefended, so this cannot occur. If f (C 6 ) = 2, then C 6 must contain a vertex w V2, and by Lemma 2.30, we know that no RDF of weight seven on V (G ) will defend the vertices in G3,6 not defended by w. Assume R (G3,7) 11, and let f = (V0, V1, V2) be an RDF for G3,7 of weight at most 11. If G is the rst ve columns of the grid, and G is the rst four columns of the grid, then f (V (G )) 7 and f (V (G )) 6. So, f (C 6 ) + f (C 7 ) 4, and we can show f (C 7 ) must be greater than one, because if f (C 7 ) = 1, f (C 6 ) 4 in order to defend the vertices in C 7 and if f (C 7 ) = 0, f (C 6 ) = 6 in order to defend the vertices in C 7 . In either case, f (C 6 ) + f (C 7 ) > 4. If f (C 7 ) = 2, then f (C 6 ) 2. If f (C 6 ) = 0, then f (C 5 ) 4 in order to defend the vertices of C 6 , but this leads to a contradiction, since f (V (G )) 6. If f (C 6 ) = 1, then f (V (G )) R(G3,5) = 8, since C 6 does not help in defending G . However, if f (V (G )) = 8, there is only one arrangement of weight eight that defends G , that being the unique R function on G3,5. However, there is no arrangement of weight three in C 6 and C 7 that will defend C 6 C 7 {v6,2}. If f (C 6 ) = 2, then f (V (G )) = 7, and by Lemma 2.30, we know that no RDF of weight 7 can defend G3,5 minus possibly one vertex in C 5 . If f (C 7 ) = 3, then f (C 6 ) 1. If f (C 6 ) = 0, the proof is as above. If f (C 6 ) = 1, as above, f (V (G )) R (G3,5) = 8. However, there is no placement of a vertex in V1 in C 6 and any arrangement of weight three in C 7 that will defend C 6 C 7 {v6,2}. If f (C 7 ) = 4, then f (C 6 ) = 0, and the proof is as above. Assume R(G3,8) 12, and let f = (V0, V1, V2) be a R function for G3,8. If G is the rst seven columns of the grid, then f (V (G )) 12. Thus, f (C 8 ) = 0 and f (C 7 ) = 6 in order to defend C 8 , but this cannot happen, since we know that f (C 1 . . . C 6 ) 8. Assume R(G3,9) 13, and let f = (V0, V1, V2) be a R function for G3,9. If G is the rst eight columns of the grid, then f (V (G )) 13. Thus, f (C 9 ) = 0 and f (C 8 ) = 6 in order to defend C 9 , but this cannot happen, since we know that f (C 1 . . . C 6 ) 8. The arrangement in Figure 2.7 is the unique Rfunction for G3,9. To see this, observe that the rst six columns of any RDF for G3,9 must have weight at least eight,

42

and the last four columns must have weight at least six (since R(G3,3) = 6). Therefore, if f = (V0, V1, V2) is a Rfunction for G3,9, we know that 14 = f (V ) =
9 i=6 6 i=1

f (C i ) +

f (C i ) f (C 6 ). Therefore,

5 i i=1 f (C )

= 8, f (C 6 ) = 0, and

9 i=7

f (C i ) = 6.

Thus, in order to defend the rst ve columns of G3,9, the RDF in the rst ve columns must be the unique Rfunction for G3,5, and the only arrangement of weight six that defends the nal three columns and v1,6 and v3,6 is the one shown in Figure 2.7. For G3,n , n 10, we use induction. Starting with the unique Rfunction for G3,4k+1, we use nearly identical arguments to the ones above to add the attachments in Figure 2.8 to the right of G3,4k+1 to get Rfunctions for G3,4k+2 , G3,4k+3, G3,4k+4, and G3,4k+5 , and the Rfunction for G3,4(k+1)+1 is unique.

Figure 2.8: Attachments to the unique Rsets for G3,4k+1. The grey vertex denotes the rightmost member of V2 in the unique Rset for G3,4k+1 .

Lemma 2.31 For all n 1, R(G4,n) 2n. Proof: Assume there is a k with R (G4,k ) < 2k, and assume this is the smallest such k. Let f = (V0, V1, V2) be a R set for G4,k . Label the columns of the grid C 1 , . . . , C k . There must be some column of the grid C i with f (C i ) < 2 and i minimized. Note that
i1 j =1

k j =i+1

k j =1

## (i) (ii) (iii) (iv)

i1 j =1

f (C j ) = 2(i 1), f (C i ) = 0,

k j =i+1

## f (C j ) = 2(k i). f (C j ) = 2(k i).

i1 j j =1 f (C ) i1 j =1 i1 j =1

= 2(i 1) + 1, f (C i ) = 0,

k j =i+1

## f (C j ) = 2(i 1), f (C i ) = 0, f (C j ) = 2(i 1), f (C i ) = 1,

k j =i+1 k j =i+1

## f (C j ) = 2(k i) + 1. f (C j ) = 2(k i).

43

We know that for every column C j , j < i, f (C j ) = 2, except in case (b), where a single column can have f (C j ) = 3. Consider cases (i)-(iii). If i = 1, then |C 2 V2| = 4, and if i > 1, we know that for every column C j , j < i, f (C j ) = 2, except in case (ii), where a single column C j , j < i, can have f (C j ) = 3. Therefore, regardless of the value of i, |C i+1 V2| 3, so f (C i+1 ) 6. If i = k 1, f (V ) =
k j j =1 f (C )

k1 j =1

f (C j ) + f (C k ) 2(k 2) + 6 = f (C j ) + f (C k1 ) + f (C k )

## 2k + 2, a contradiction. If i = k 2, then f (V ) = 2(k 3) + 6 + 1 = 2k + 1, a contradiction.

k2 j =1

If i k 3, then let G = C i+2 C k , and f = (V0 G , V1 G , V2 G ). f is a Roman dominating set for C i+3 C k . Since k (i + 2) < k, we have that
k j =i+1

k j =i+1

i j =1

f (C j ) +

f (C i+1 ) +

k i i=1 f (C )

k1 i=1

k2 i=1

f (V ) =

## f (C i )+ f (C k1 )+ f (C k ) (2(k 3)+1)+4+2 = 2k +1, a contradiction.

If i k 3 and f (C i+1 ) 5, then the argument is as above. Let G be the subgrid C i+2 C k , and f = (V0 G , V1 G , V2 G ). f is a Roman dominating set for C i+3 C k . Since k (i + 2) < k, we have that R(G4,ki2 ) 2(k i 2), and f (V ) =
i j =1 k j =i+1

f (C j ) f (V (G ))
k j =i+1

f (C j ) + f (C i+1 ) +

f (C j )

(2(i 1) + 1) + 5 + 2(k i 2) = 2k, a contradiction. However, if f (C i+1 ) = 4, then |V2 C i+1 | = 2. Furthermore, there must be another column C i , i > i + 1 with f (C i ) < 2. Otherwise, f (V ) =
k j =i+2 i j =1

f (C j ) + f (C i+1 ) +

f (C j ) (2(i 1) + 1) + 4 + 2(k i 1) = 2k + 1.
i j j =1 f (C )

k2 j =i+1

i j =1

## f (C j ) 2i , which implies that

k j =i +1

f (C j )

2(k i ) 1, contradicting the minimality of k, since if G = C i +1 C k , f = (V0 V (G ), V1 V (G ), V2 V (G )) is an RDF for G of weight less than 2(k i ).

44

## If i < k and f (C i ) = 0, then

i 1 j j =1 f (C )

i j =1

+f (C i+1 ) +

i 1 j =i+2

f (C j )

i 1 j =1

k j =i +1

## f (C j ) = 2(k i ), which gives

us case (b) above, with i replaced by i , and we already know that case cannot occur.

## Proposition 2.32 R (G4,n) = 2n + 1 if n = 1, 2, 3, 5, 6, and 2n otherwise.

Proof: The method in this proof is similar to a proof in Jacobson and Kinch [54] for domination in 4 n grids. By the previous lemma, we know that R(G4,n ) 2n. It remains to show that we can construct RDFs of G4,n of weight 2n for n = 1, 2, 3, 5, 6 and that we cannot construct RDFs of weight 2n for n = 1, 2, 3, 5, 6, but that we can construct RDFs of weight 2n + 1. For the remainder of this proof, we will enumerate the vertices in each consecutive row by w1 , . . ., wn , x1 , . . . , xn , y1 , . . . , yn , and z1 , . . . , zn . If n = 9, let V2 = {x1, z2, w3, y4, x6, z7, w8, y9}, V1 = {w5, z5} and let V0 = V V1 V2. Then f = (V0, V1, V2) is an RDF of weight 18. If n = 4 + 3k for some k 0, let D1 = {x1, z2, w3, y4}, D2 = {w6t1, z6t, x6t+1 : t = 1, . . . ,
k 2

## }, and D3 = {z6t+2, w6t+3, y6t+4 : t = 1, . . .,

k 2

}. Then if V2 = D1 D2 D3 ,

V0 = V V2, then f = (V0, , V2) is an RDF for G4,n of weight 2n. If n = 8 + 3k for some k 0, let D1 = {x1 , z2, w3, y4, x5, z6, w7, y8}, D2 = {w6t+3, z6t+4, x6t+5 : t = 1, . . .,
k 2

## }, and D3 = {z6t+6, w6t+7, y6t+8 : t = 1, . . .,

k 2

}.

Then if V2 = D1 D2 D3, V0 = V V2 , then f = (V0, , V2) is an RDF for G4,n of weight 2n. If n = 12+3k for some k 0, let D1 = {x1, z2, w3, y4, x5, z6, w7, y8, x9, z10, w11, y12}, D2 = {w6t+7, z6t+8, x6t+9 : t = 1, . . . ,
k 2

45

1, . . . ,

k 2

## }. Then if V2 = D1 D2 D3, V0 = V V2, then f = (V0, , V2) is an RDF

for G4,n of weight 2n. This construction produces an RDF of weight 2n for all n = 1, 2, 3, 5, 6. We have previously shown that R (G4,n) = 2n + 1 for n = 1, 2, 3. We must now show that R(G4,n ) = 2n + 1 for n = 5 and 6. For the rest of this proof, in the grid graph G4,k , let W = {w1, . . . , wk }, and let X , Y , and Z be dened similarly.

(i) G4,5: Letting V2 = {y1 , w2, z3, x4, y5}, V1 = {w5}, and V0 = V V1 V2, f = (V0, V1, V2) is an RDF for G4,5 of weight 11. Assume there is an RDF f = (V0, V1, V2) for G4,5 of weight 10. f (W ) and f (Z ) must be at least two, because otherwise, f (X ) and f (Y ) would each have to be at least eight in order to defend the rest of W and Z . Furthermore, if f (W ) or f (Z ) is 2, then the row must contain a member of V2, not two members of V1 (otherwise, f (X ) and f (Y ) would have to be at least six). However, a member of V2 in W can defend at most three vertices in W , which would mean that at least two vertices would have to be defended by two distinct members of V2 in X , which means that f (X ) 4, and similarly, f (Y ) 4 if f (Z ) = 2. Thus, both f (W ) and f (Z ) must be at least three. If f (W ) = f (Z ) = 3, then at most one vertex in X and Y are defended by vertices in W and Z , respectively. The only way (up to rotations and reections) to defend eight vertices in X and Y with members of V2 in X and Y is if x1 and y5 are defended by vertices in V2 at w1 and z5 . This would require there to be members of V2 at y2 and x4 , but if that is the case, then w3 and w5 (similarly z1 and z3) are not defended, and it would require more than one member of V1 to do so. Similar arguments show that it is impossible for f (W ) or f (Z ) to be four or ve.

(ii) G4,6: Letting V2 = {y1, w2, z3, x4, y5, w6}, V1 = {z6 }, and V0 = V V1 V2, f = (V0, V1, V2) is an RDF for G4,5 of weight 13. Assume there is an RDF f = (V0, V1, V2) for G4,6 of weight 12. By arguments similar to those above, we can show that f (W ) and f (Z ) must both be at least four.

46

If f (W ) = 3, W either has three members of V1 or a member of V1 and V2. In either case, two vertices in W will be undefended, which means that f (X ) is at least four, and similarly for f (Y ) if f (Z ) = 3. Thus, if f (W ) = f (Z ) = 4, then f (X ) + f (Y ) = 4. Both W and Z would have to contain two members of V2, as two members of V2 in X and Y could defend at most eight vertices in X and Y , and would require vertices in V2 in W and Z to defend the remaining four vertices in X and Y . There are three possible placements for the vertices in V2 in X and Y (up to rotation and reection) that will defend eight vertices in X and Y , {x2 , y4}, {x2 , y5}, and {x3, y5}. It can quickly be shown that in each of these cases, there is no placement of the vertices in V2 in W and Z that will defend the entire grid. Similar arguments show it is impossible for f (W ) or f (Z ) to be ve or six. Sample constructions of R functions on G4,n are shown in Figure 2.9.

2.6.2

## An Algorithm to Compute R (Gk,n ) for Fixed k

This section will describe an algorithm for computing R(Gk,n ) for a xed k in O(n) time. This is a modication of a technique used by Hare, Hedetniemi, and Hare in [42], also discussed in a paper by David Fisher [28]. We can encode the state of each column as a kdigit 4ary number s = s1 s2 . . . sk , where si = 0 if the ith node is in V0 and is defended by a vertex in V2 either above, below, or to the left of the vertex, si = 1 if the ith node is in V1, si = 2 if the ith node is in V2, and si = 3 otherwise. If si = 2, then we can assume that si1 and si+1 are neither equal to 1 or 3, since no vertex in either

47

state can be adjacent to a vertex in V2 in a R function. In addition, we can assume that no two members of V1 are adjacent, so if si = 1, then neither si1 nor si+1 can equal 1. We will call a columns state legal if it does not contain 11, 12, 21, 23, or 32 as consecutive digits. We can compute the number ck of kdigit legal states as follows. For i = 0, 1, 2, 3,
i let ci k be the number of k digit legal states s = s1 s2 . . . sk where sk = i. c1 = 1 for all 1 2 3 i i, and ck = c0 k + ck + ck + ck . We can compute the values of ck recursively using the

following relations:

0 1 2 3 c0 k = ck1 + ck1 + ck1 + ck1 0 3 c1 k = ck1 + ck1 0 2 c2 k = ck1 + ck1 0 1 3 c3 k = ck1 + ck1 + ck1

## These calculations can be summarized using the matrix calculation below.

1 0 0 1 0 1 k1 0 1 1 1 1 1 1 1

ck =

1 1 1 1

1 1 0 1

The rst few values of ck are 4, 11, 33, 97, and 287. There is also a closed form
1 1 k1 k1 expression for ck = a1k + a2 k 1 2 + a3 3 + a4 4 , where the i s are the eigenvalues

## of the matrix above. a1 = 1 + a2 = 1 + a3 = 1 a4 = 1

2 5 5 2 5 5 2 5 5 2 5 5

+ +

+ +

1 = 2 = 3 = 4 =

## 3+ 5+ 30+6 5 4 3+ 5 30+6 5 4 3 5+ 306 5 4 3 5 306 5 4

An sRoman dominating function (abbreviated sRDF) of Gk,n is a function from V (Gk,n ) to {0, 1, 2} which defends the rst n 1 columns of Gk,n and has the nth column in state s. The weight of an sRDF is dened similarly to the weight of an RDF: the

48

n (s) will denote the number of vertices in V1 plus twice the number of vertices in V2. R n minimum weight of an sRDF for Gk,n , with R (s) = if there is no sRDF of Gk,n .

Given a state s, let P (s) denote the set of possible states for the (n 1)st column in an sRDF for Gk,n . If t = t1 t2 . . . tk P (s), then
2 if si = 0, si1 = 2, and si+1 = 2 0, 1, or 2 if si = 0, and si1 = 2 or si+1 = 2

ti =

0 0, 2 or 3 0 or 1

if si = 1 if si = 2 if si = 3

## Let mk denote the state s = s1 . . . sk with si = m for all i. We initialize a dummy

0 (s) = 0 if s = 0 , and 0 (s) = 0th column, whose only possible state is 0k . Thus, R k R

otherwise. If we delete the nth column from an sRDF of Gk,n , we are left with a tRDF for Gk,n1 for some t P (s). If |s| denotes the weight of a column in state s, then:
n n1 R (s) = |s| + min R (t). tP (s)

## n (s) over all states s = s . . . s To compute R(Gk,n ), we nd the minimum value of R 1 k

that have no si = 3 (that is, all of the vertices in the nth column are defended). Thus,
n R(Gk,n ) = min R (s), s2k

where denotes a partial order on states where s t if and only if si ti for all i. These calculations can be represented in the min-plus algebra on Z {}, where the traditional operations of + and are replaced by and , where a b = min{a, b} and a b = a + b, with a = a and a = , for all a Z {}. Matrix operations, such as multiplication, can also be dened under the min-plus algebra in the obvious way. We can enumerate the set of possible states s1 , . . . , sck , where s1 = 0k . Let xn be a
n vector over (Z {})ck whose ith entry is R (si ). Note that x0 = (0 . . . )T . Let

49

Note that

n R (si ) =

sj P (si )

=
sj P (si ) ck

=
j =0

## The last equality holds because Ak (i, j ) = if sj P (si ), so nding a minimum of

n1 the expression Ak (i, j ) R (sj ) over all sj is the same as nding a minimum over

all sj P (si ). With our denition of x0 above, it is clear that we can compute xn recursively using the matrix multiplication xn = Ak xn1 to compute all values of
n (s ). Then, to compute (G R i R k,n ), we nd the minimum value of the entries of xn

which correspond to the states containing no 3s. Computing each entry in xn from xn1 takes O(ck ) operations, where an operation is either adding two numbers together or nding their minimum. Therefore, it takes
2 O (c2 k ) operations to compute xn from xn1 , and O (nck ) operations to compute xn from

x0. Thus, for a xed k, this algorithm is linear in n, even though the value of c2 k may be large. We can reduce the bound on the computation time by noting that we only need to do calculations that involve the nite entries of Ak . We can determine the number of nite entries of Ak by calculating |P (si )| for each state si . If dk denotes the sum of the |P (si )|, then the time to compute R(Gk,n ) is O(dk n). Consider a column in state s = s1 . . . sk and let t = t1 . . . tk P (s). If sj = 0 for some j , the number of possible values of ti depends on whether at least one of sj 1 and sj +1 are equal to two or not. This makes computing dk very dicult. However, we can put an upper bound on dk by assuming that if sj = 0, then 0, 1, and 2 are acceptable values for tj regardless of the values of sj 1 and sj +1 . We will let P (s) denote the set of legal states of the column previous to a column in state s under our new set of rules.

50

## If s = s1 s2 . . . sk and t = t1 t2 . . . tk P (s), then

0, 1, or 2 if si = 0

ti =

if si = 1 if si = 2 if si = 3

0, 2 or 3 0 or 1

We will let ek denote the sum of the |P (s)| over all legal states of length k. For a, b {0, 1, 2, 3} dene Pa,b (k) as follows: Pa,b(k) = s = s1 . . . sk s legal, sk = b By the rules dening P (s), we know that the set of pairs (a, b) for which Pa,b (k) will be non-zero is Q = {(0, 0), (1, 0), (2, 0), (0, 1), (0, 2), (2, 2), (3, 2), (0, 3), (1, 3)}. For every pair (a, b) Q, Pa,b (1) = 1. Note that ek =
(a,b)Q Pa,b (k ).

## Furthermore, using the

rules dening P (s), we can compute the values of Pa,b (k) recursively. For example, given a legal state s = s1 . . . sk and a legal state t = t1 . . . tk P (s) with sk = tk = 0, let s = s1 . . . sk1 and t = t1 . . . tk1 P (s ). If sk1 = c and tk1 = d, then the set of possible pairs (c, d) is {(0, 0), (1, 0), (2, 0), (0, 1), (0, 2), (2, 2)}. Summing over all states s and t P (s) with sk = tk = 0 gives P0,0 (k) = P0,0(k 1) + P1,0(k 1) + P2,0(k 1) + P0,1(k 1) + P0,2(k 1) + P2,2 (k 1). We will not list all nine recursions, but as with the computation of ck , the value of ek can be computed using the following matrix.
k1 1 1 1 1 1 1 0 0 0 1

1 0 0 1 1 0 0 0 0 1 0 1 1 1 1 1 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 1 1 0 1 1 1 0 1 0 1 1 1 1 0 1 1 0 0 1 0 0 1 1 1 1 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0

1 1 1 1 1 1 1 1

ek =

1 1 1 1 1 1 1 1 1

51

Asymptotically, the value of ek is O(k ), where 5.14987 is the eigenvalue of largest magnitude in the matrix used in the computation of ek . By comparison, c2 k is O( k ), where 8.73971 is the square of the eigenvalue of largest magnitude in the matrix used in the computation of ck .

2.7

## Allowing Multiple Slides

The original formulation of the Roman domination problem dealt with the placement of armies in the regions of the Roman empire. An army could move from region A to region B as long as there was a second army left behind in region A to defend it. The empire was considered defended if every region could be secured with the movement of at most one army, under the constraint above. We can formalize this notion in graphs, and generalize it to allow for multiple movements of armies, or what we will call tokens for the remainder of this section. Given a graph G with vertex set {v1 , . . . , vn}, dene a threshold bi for each vertex, where bi is a positive integer. Also, dene a token number ti for each vertex vi , where ti is a non-negative integer denoting the number of tokens placed on vertex vi . A vertex vi is defended if there are at least bi tokens on it (i.e., ti bi ). If vi vj is an edge of G, a slide from vi to vj is a transfer of tokens from vi to vj , subject to the constraint that vi must still be defended after the transfer of tokens (that is, no more than ti bi tokens may be slid from vi to vj ). A graph with threshold set (b1, . . ., bn ) is defended by an arrangement of tokens (t1 , . . . , tn ) if for every vertex vi , there exists a (possibly empty) sequence of slides such that vi is defended after the slides. Such an arrangement of tokens is called a defender set for G. It is important to emphasize that, according to our denition, if a vertex vj is involved in a sequence of slides leading to a vertex vi being defended, then vj must be defended after every slide in the sequence subsequent to the rst slide that involves vj . The study of the case where this is not required should also be interesting. For example, let bi = 1 for every vertex vi and let f be a R function for G. If ti = f (vi ), then (t1 , . . . , tn ) is a defender set for G. However, we can often nd a

52

defender set for G that uses fewer than R (G) tokens. For example, if G = P5, then (0, 2, 0, 2, 0) is a defender set that uses R(G) tokens, but (0, 0, 3, 0, 0) is also a defender set, since to defend v1 , one can rst slide two tokens to v2, and then slide a token from v2 onto v1 , defending it. Every vertex between v3 and v1 is also defended. If we view the problem as an army placement problem, we can envision this path of defended vertices forming a supply line from a base at v3 to the armies at v1 . Viewing a token arrangement as a vector (t1 , . . . , tn ) Zn , a defender set D = (t1, . . . , tn ) is a minimal defender set if there exists no other defender set D = (t1, . . . , tn ) such that D D, where denotes that ti ti for 1 i n. The size of a defender set D = (t1 , . . . , tn ) is
n i=1 ti ,

## and a defender set D is a mini-

mum defender set if there exists no defender set of smaller size. Def (G, b) denotes the size of a minimum defender set of G with threshold vector b = (b1, . . . , bn).

Theorem 2.33 For a connected graph G, Def (G, 1) = rad(G) + 1, where 1 denotes the all 1s vector.

Proof: Clearly, if v is a center of G, then placing rad(G) + 1 tokens on v will defend G, and of the defender sets with only one vertex with a non-zero token number, this is the minimum. Thus, Def (G, 1) rad(G)+1. Assume G has a defender set D = (t1 , . . . , tn ) of size less than rad(G) + 1, and assume D has the fewest vertices with non-zero token numbers of all such defender sets. We shall reach a contradiction. Because D has size less than rad(G) + 1, D must have at least two vertices with non-zero token numbers. Let S be the set of vertices vi with ti > 0. Each vertex vi S defends on its own all vertices in its (ti 1)neighborhood. Let ND [vi ] denote the set of vertices that vi defends in the token arrangement D. Observation 2.34 If vi , vj S , there cannot be an edge between a vertex in ND [vi ] and a vertex in ND [vj ].

Proof:

53

Assume there is an edge between vk ND [vi ] and vm ND [vj ], and assume that ti tj . Consider a shortest path in G from vi to vj that contains the edge vk vm . This path, vi = vi0 , vi1 , . . ., vk , vm, . . . , vip = vj has length p, which is at most ti + tj 1. By removing the ti tokens on vi and placing ti + 1 tokens on vi1 , everything in ND [vi ] is still defended by the tokens on vi1 . Similarly, by removing the tokens from vi and placing ti + q tokens on viq , we still defend everything in ND [vi ]. By similar reasoning, removing the tokens from vj and placing tj + q tokens on vipq still defends everything in ND [vj ]. Let s = (tj + p ti )/2 . Dene a new defender set D = (t1 , . . . , tn ) If

## with ti = 0, tj = 0, tis = ti + tj , and all other entries identical to D.

vr ND [vi], then d(vis , vr ) d(vis , vi ) + d(vi , vr ) (tj + p ti )/2 + (ti 1) = (ti + tj + p)/2 1 (ti + tj + (ti + tj 1))/2 1 ti + tj 1. Also, if vr ND [vj ], then d(vis , vr ) d(vis , vj ) + d(vj , vr ) (p (tj + p ti 1)/2) +(tj 1) = (p + ti + tj 1)/2 (ti + tj 1 + ti + tj 1)/2 = ti + tj 1. Thus, all vertices defended by vi and vj in D are now defended by vis in D , and this is a defender set of size less than rad(G) + 1 with fewer vertices with non-zero token numbers than D, a contradiction.

Since D has more than one vertex with non-zero token number, then because G is connected, there must be two vertices vi and vj with non-zero token number such that va ND [vi ] and vb ND [vj ] share an edge. By Observation 2.34, we know that this cannot happen. Therefore, D can only have one vertex with non-zero token number, so Def (G, 1) rad(G) + 1, completing our proof.

To compute Def (G, b) for a graph G of order n and a threshold vector b = (b1, . . . , bn), we create the digraph Gb as follows. If vi vj is an edge in G, we create
ij ij ij ij bi 1 new vertices v1 , . . . , vb and the arcs vi v1 . . . vb vj . We also create i 1 i 1 ji ji ji ji bj 1 new vertices v1 , . . . , vb and the arcs vj v1 . . . vb vi . In addition, j 1 j 1 ii , . . . , v ii for every vertex vi we create bi 1 new vertices v1 bi1 and the cycle of arcs ii ii vi v1 . . . vb vi . An example of the construction of Gb is given in Figure i 1 ij 2.10. We will call all vertices vk transition vertices and all vertices vi hub vertices.

54

Note that if G is connected, the resulting digraph Gb is strongly connected. As we can slide tokens from vi to vj along the edge vi vj in a graph, we can slide tokens from vi to vj along the arc vi vj in a digraph. Thus, we can dene Def (G, b) when G is a digraph.

Figure 2.10: Constructing Gb . The numbers in the vertices of the graph on the left represent the thresholds for each vertex. In the digraph on the right, the smaller vertices denote transition vertices, and the larger vertices denote hub vertices.

Proposition 2.35 For a connected graph G of order n and a vector b Zn , Def (G, b) = Def (Gb, 1). Proof: If D = (t1 , . . . , tn ) is a defender set for G with threshold vector b = (b1, . . . , bn), then we can dene a token placement for Gb by placing ti tokens on each hub vertex vi and no tokens on any of the transition vertices. This placement is a defender set for Gb with threshold vector 1, since any slide of k tokens from vi to vj in G which leaves at least bi tokens on vi can be translated into a sequence of ti slides in Gb where
ij k + bi 1 tokens are slid from vi to v1 , leaving one token on vi , and then k + bi 2 ij ij ij tokens are slid from v1 to v2 , leaving one token on v1 , and so on, until k tokens are ij slid from vb to vj . Because D is a defender set for G, for every vertex vi G, there i 1

is a sequence of slides that will result in ti bi . Therefore, in Gb , there is a sequence of slides that will result in ti bi . Furthermore, since ti bi, there is a sequence of

55

ij , since each of those vertices is at slides that will defend every vertex of the form vk

most distance bi 1 from vi . Thus, we have a defender set the same size as D for Gb with the threshold vector 1, so Def (G, b) Def (Gb, 1). Let D be a defender set for Gb with the threshold vector 1, and let S be the set of
ij vertices with non-zero token numbers. If a transition vertex vk S , then the t tokens ij on some vertex w S are involved in a sequence of slides which defend vk 1 (or vi , if ij k = 1). If w = vk , dene a new token placement that places one additional token on w ij ij and removes the t tokens from vk and places t 1 tokens on vk +1 (or vj , if k = bi 1). ij This arrangement still defends Gb, since a sequence of slides to defend a vertex v = vk ij that involves the tokens on vk includes the slide which slides at most t 1 tokens onto ij vk +1 , so we can dene a new sequence of slides which removes that initial slide from ij ij ij ij vk to vk +1 . Plus, to defend vk , we use the sequence of slides that defends vk1 that

involves tokens on w and simply slide the additional token on w along with each slide,
ij ij thus leaving at least two tokens on vk 1 , in which case we can slide a token onto vk ij ij ij from vk 1 . If w = vk , then simply removing the t tokens from vk and placing t tokens ij on vk +1 will still defend the digraph.

By a series of modications as above, given a defender set for Gb, we can create a new defender set D of identical weight for which all of the tokens are on the hub vertices of Gb. If vi has ti tokens on it in D , then the token arrangement

## D = (t1 , . . . , tn ) is a defender set for G with threshold vector b. Given a sequence of

ii slides in Gb to defend vb with a single token, that sequence can be translated into i 1

a sequence of slides in G to place bi tokens on vi . Thus, Def (G, b) Def (Gb, 1), completing our proof.

In a strongly connected digraph G, Def (G, 1) rad(G) + 1, where the distance from vertex vi to vertex vj is now dened as the length of the shortest directed path from vi to vj . This observation gives us part of the following corollary:

Corollary 2.36 For a graph G and threshold vector b, rad(G) + 1 Def (G, b) rad(Gb) + 1.

56

Proof:

To show that rad(G) + 1 Def (G, b), assume that there is a defender set D = (t1, . . . , tn ) of size rad(G) for G with threshold vector b. Then Gb with threshold vector 1 has a defender set D of size rad(G) where each hub vertex vi has ti tokens on it and every transition vertex has no tokens on it. If a path of transition vertices from vi to vj is replaced with a single arc from vi to vj , then D remains a defender set for the resulting digraph. In this fashion, we can reduce all of the paths to single arcs, and we can also delete the loops of transition vertices at each hub vertex, resulting in a digraph with only the hub vertices v1 , . . . , vn and an arc joining vi to vj and vj to vi if and only if vi vj was an edge in G. Thus, the resulting digraph is equivalent to the graph G, and we have a defender set for G with the threshold vector 1 of size less than rad(G) + 1, a contradiction.

In a graph G with threshold vector b, for a defender set D = (t1 , . . . , tn ) we can similarly dene S to be the set of vertices with at least one token, and for vi S , ND [vi ] to be the set of vertices vk which can receive at least bk tokens from vi via a sequence of slides involving only the tokens from vi . Unlike the case where the threshold vector is 1, if D is a minimum defender set and vi , vj S , and there is an edge between a vertex in ND [vi] and a vertex in ND [vj ], then we can no longer guarantee that the two sets of tokens can be combined into one on a single vertex. For example, in P6 with vertices v1 , . . . , v6 and threshold vector b = (2, 1, 2, 2, 1, 2), D = (0, 3, 0, 0, 3, 0) is a defender set for P6 of size six. There is an edge between ND [v2] and ND [v5 ] (i.e., v3 v4 ), but there is no defender set consisting of a single vertex with six tokens that will defend the entire graph. In addition, the ND [vi] need not be disjoint. For example, in P7 with b = (7, 1, 2, 5, 4, 1, 9), D = (0, 8, 0, 0, 0, 10, 0) is a minimum defender set, and ND [v2] ND [v6] = {v4 }.

57

2.8

## Minimal Roman Dominating Functions

For standard domination, there is a well dened concept of a minimal dominating set. A dominating set S is minimal if no proper subset of S is a dominating set. (G) denotes the maximum cardinality of a minimal dominating set of G. With regards to Roman domination, the notion of minimality is a bit more involved. An RDF f = (V0, V1, V2) is reducible if it is possible to reduce the value of f (v ) for some vertex v and still have the resulting function be an RDF. An RDF is irreducible if it is not reducible. One would expect that irreducibility would be a necessity for any minimal RDF. We will say that an RDF is Type I minimal if it is irreducible, and let I R (G) denote the maximum weight of a Type I minimal RDF. Proposition 2.37 (EC, STH) If G is a graph of order n, then I R (G) = n. Proof: Consider the RDF f = (, V, ). f is a Type I minimal RDF of weight n. To see that there is no Type I minimal RDF of greater weight, let g = (V0, V1, V2) be a Type I minimal RDF. Every vertex in V2 has at least one private neighbor in V0, otherwise g would be reducible. Therefore, n0 n2 , and n = n0 + n1 + n2 n1 + 2n2 = g (V ).

So, irreducibility alone does not make for a very interesting denition of minimal. A second type of minimality has been suggested by Renu Laskar [46]. An RDF f = (V0, V1, V2) is Type II minimal if it is irreducible and V0 is not empty, and let II R ( G) denote the maximum weight of a Type II minimal RDF for G. Proposition 2.38 (STH, R. Laskar) If G is an isolate-free graph of order n 2, then n (G) + 1 II R (G) n. Proof: Let v be a vertex with deg(v ) = (G). Then f = (N (v ), V N [v ], {v }) is a

Type II minimal RDF of weight n (G) + 1. The upper bound follows because every Type II minimal RDF is also Type I minimal.

58

There are many graphs with Type II minimal RDFs that achieve both the upper and lower bound in Proposition 2.38. For example, if (G) = 1, then the lower and upper bounds are equal. In addition, consider G = K3 K2 with a, b, and c being the vertices in the rst copy of K3 and d, e, and f being the vertices in the second copy. (G) = 3, but f = ({a, b, c}, , {d, e, f }) is a Type II minimal RDF for G of weight n. We consider a third denition of minimality developed by Steve Hedetniemi [46] that goes back to the notion of sliding tokens between vertices in the graph. Given an RDF f = (V0, V1, V2), f (v ) = i means that there are i tokens on v . A slide of a token from u V1 V2 to v V0 V1 is called a valid slide if the new function f , dened by f (u) = f (u) 1, f (v ) = f (v ) + 1, f (w) = f (w), w = u, v is also an RDF. If f is an irreducible RDF, there are only two types of possible valid slides: sliding a token from a vertex in V1 to another vertex in V1, or sliding a token from a vertex in v V2 to vertex in w V0, provided that w is the only external V2 pn of v . An RDF f is Type III minimal if (1) f is irreducible and (2) no sequence of valid slides changes f into a reducible RDF f . In addition, an RDF f is Type III kminimal if (1) f is irreducible and (2) no sequence of k or fewer valid slides changes f into a reducible RDF f . Setting k = 0 is equivalent to the notion of Type I minimality. III R (G) and R
III,k

(G) denote the maximum weight of a Type III minimal RDF and a

Type III kminimal RDF, respectively. Proposition 2.39 (PD, STH) An irreducible RDF f = (V0, V1, V2) is Type III 1minimal if and only if: 1. G[V1] does not contain a path of length two. 2. V2 does not contain a vertex with a V2private neighborhood of size one. 3. pn(w, V2) {w} N (v ) for all w V2 and v V1 where v is not isolated in G[ V 1 ] . Proof: : If G[V1] contains a path uvw of length two, the token from u can be slid onto v and the token on w can be removed, so the new RDF is reducible. If there is a

59

vertex v V2 such that |pn(v, V2)| = 1, then v cannot be its own private neighbor. Otherwise, a token could be removed from v and every vertex would remain defended, which implies that f is reducible. If v s only V2 pn is a vertex w = v , then sliding a token from v to w is a valid slide, since every other vertex in N [v ] is defended by some other vertex in V2. Because v pn(v, V2), there is some vertex u V2 adjacent to v , and therefore, the token on v can be removed. If pn(w, V2) {w} N (v ) for some w V2 and v V1 where v is not isolated in G[V1], then let u V1 be a neighbor of v . Sliding the token from u to v is a valid slide, since u will now be defended by v . However, all of ws private neighbors (except possibly w) are now defended by v , so a token can be removed from w, and therefore the new RDF is reducible. : Assume that f = (V0, V1, V2) is not Type III 1minimal. Therefore, one of the two types of valid slides leads to a reducible RDF. If a token is slid from a vertex u V1 to another vertex v V1 resulting in a reducible RDF, then either v had a neighbor w V1 , w = u that can now have its token removed (i.e., uvw was a path of length two in G[V1]), or there is some vertex w V2 {v } such that pn(w, V2 {v }) = {w} or is empty, so one or both of the tokens can be removed from w. pn(v, V2 {v }) contains at least two vertices (namely, u and v ), so w = v . If pn(w, V2 {v }) = {w} or is empty, then all of ws V2private neighbors (except possibly w) must be adjacent to v , since they were not adjacent to any other vertex in V2. Therefore, pn(w, V2) {w} N (v ). The other valid slide of a token is from a vertex v V2 to a vertex w V0, provided that w is the only external V2 pn of v . If this new RDF is reducible, then it must be the token from v that gets removed (since v no longer defends w, and w now defends itself). If the token on v can be removed leaving an RDF, v must have a neighbor in V2 to defend it. Therefore, v pn(v, V2), and w is v s only V2 pn. So, if an irreducible RDF f = (V0, V1, V2) is not 1minimal, then at least one of the three conditions listed in the proposition must be violated.

0 +1 It is clear that for a graph G on n vertices, n = III, (G) and III,i (G) III,i ( G) R R R +1 for all i 0. For some value T 0, III,k (G) = III,k (G) = III R R R (G) for all k T .

There are no known bounds on the value of T . In addition, there is no good method

60

known for determining whether a graph is Type III kminimal or Type III minimal. We consider a nal possible denition of minimality, courtesy of Alice McRae [46]. An RDF f = (V0, V1, V2) is Type IV minimal if (1) f is irreducible and (2) V1 is independent. IV R (G) denotes the maximum weight of a Type IV minimal RDF of G. By Proposition 2.4, we know that every isolate-free graph has a Type IV minimal RDF. It turns out that this is one of the more natural denitions of minimality, as we will show below. A set of vertices S is open irredundant if every vertex v S has a private neighbor relative to S other than itself. Proposition 2.40 For a graph G on n vertices: 1. R(G) = min{2|S | + |V N [S ]| : S is maximal open irredundant} 2. IV R (G) = max{2|S | + |V N [S ]| : S is maximal open irredundant} Proof: 1. Let f = (V0, V1, V2) be a Rfunction with |V1| minimized, so V1 is independent. f is irreducible, so we know that V2 is an open irredundant set, otherwise some vertex v V2 would have no external V2 pn and the value of f (v ) could be reduced, which violates the fact that f is a Rfunction. In addition, we know that V2 is a maximal open irredundant set because V1 = V N [V2] is independent. Because f is a Rfunction, the value of 2|S | + |V N [S ]| where S is a maximal open irredundant set is minimized when S = V2 , so R(G) = 2|V2| + |V1| = min{2|S | + |V N [S ]| : S is maximal open irredundant}. 2. If an irreducible RDF f = (V0, V1, V2) is Type IV minimal, by the same argument as above, V2 must be open irredundant. In addition, V2 is a maximal open irredundant set because V1 = V N [V2] is independent by the denition of a Type IV minimal RDF. Therefore, every Type IV minimal RDF is of the form f = (N [S ] S, V N [S ], S ), where S is a maximal open irredundant set, so IV R (G) = max{2|S | + |V N [S ]| : S is maximal open irredundant}.2

61

2.9

## Algorithms and Complexity

In this section, we present a linear time algorithm for computing the value R(T ) for any tree T . However, we will show that the decision problem corresponding to computing R(G) is NP-complete. Our linear time algorithm uses a dynamic programming method developed by T.V. Wimer [93] and modied by Sandra and Stephen Hedetniemi to compute the Roman domination number for trees. We present this algorithm for the sake of completeness and because we revisit the method in the next chapter. We make use of the fact that the class of rooted trees of order n can be constructed recursively from n copies of a single vertex K1 , using the rule of composition that joins a tree T1 rooted at r1 and a tree T2 rooted at r2 (with V (T1) V (T2) = ) by adding the edge r1r2 and specifying r1 as the root of the resulting larger tree T . For a tree T rooted at a vertex r , a multiset S of vertices is an almost Roman dominating set (a-RDS) if S defends T {r }. Copies of r may appear in S to defend other vertices, but it is not necessary for S to defend r . Let T1 and T2 be two trees rooted at vertices r1 and r2, respectively. Also, let S1 and S2 be a-RDSs for T1 and T2 , respectively. If T is the composition of T1 with T2, then consider the multiset S = S1 S2 , where denotes multiset union (i.e., more than one copy of a vertex may appear in S ). S might not be an a-RDS for T , since if r2 was not defended by S2 in T2, then r2 will not be defended in T unless r1 appears twice in S1 . Therefore, it may be necessary to add one or two copies of r1 to S to defend r2. Let S be the resulting a-RDS for T . We will use the notation (T, S ) = (T1, S1) (T2, S2) to denote this composition of two trees and their associated a-RDSs. To construct an algorithm to compute R(T ) for any tree T , we characterize the class of possible tree-subset pairs (T, S ) that can occur in a tree T with root vertex r , where S is an a-RDS of T . For this problem, there are four classes of tree-subset pairs: [1] = {(T, S )|r S, r appears once in S } [2] = {(T, S )|r S, r appears twice in S } [3] = {(T, S )|r S, r is adjacent to a vertex that appears twice in S }

62

[4] = {(T, S )|r S, r is not adjacent to any vertex that appears twice in S } If (T, S ) = (T1, S1) (T2, S2), we can determine the class of (T, S ) if (T1, S1) is of class [i] and (T2, S2) is of class [j ] for each pair (i, j ), 1 i, j 4. The classes of (T, S ) resulting from each composition are summarized in Figure 2.11. The verication of the class of (T, S ) for each pair (i, j ) is straightforward. Note that in some cases, it is necessary to add copies of r1 to S in order to defend r2.

j i 1

[1]
1 1

[2]
1 2

[3]
2

[4]

[1]

[1]
2 2 1 2

[1]
2

[1] (+1)
2

[2]

[2]

[2] [3]

[2]

[2]
2

[2]

2 2

[3] [4]

[3]

[3] (+2)
2

[2]

[4]

[3]

[4] (+2)

[2]

Figure 2.11: The number in brackets in the ([i], [j ])th entry in this table gives the class of (T, S ) that results from composing (T1, S1) of class [i] with (T2, S2) of class [j ]. An example is given for each pair ([i], [j ]). The numbers inside the vertices represent the number of copies of the vertex that appear in S . A dotted edge represents the edge joining the roots of T1 and T2. If it was necessary to add copies of r1 to S to defend r2, then r1 is highlighted, and the number of copies of r1 which are added to S is noted in parentheses. Using Figure 2.11, we can write out a system of recurrence relations that capture how we can obtain a tree-subset pair of class [j ] after composition: [1] = [1] [1] [1] [2] [1] [3] (2.6)

[2] = [1] [4] [2] [1] [2] [2] [2] [3] [2] [4] [3] [4] [4] [4] (2.7) [3] = [3] [1] [3] [2] [3] [3] [4] [2] [4] = [4] [1] [4] [3] (2.8) (2.9)

63

For example, to see recurrence (2.9), we note that if (T, S ) = (T1, S1) (T2, S2) is of class [4], then (T1, S1) must be of class [4] and (T2, S2) must be of class [1] or [3]. Given a tree T of order n, we root it at an arbitrary vertex that we label v1 . We then label the remaining vertices v2 , . . . , vn using a depth rst search so that if vj is vi s parent, then i > j (see [20] for a description of depth rst search). For each vertex vi , let P arent[i] equal the subscript of the label of the parent of vi (assume that P arent[1] = 0). The algorithm will build the tree T one edge at a time. At step i, the algorithm builds a graph Gi with vertex set V and designates a root for each maximal connected subtree of Gi . Gi is obtained from Gi1 by composing the subtree rooted at vP arent[ni] with the subtree rooted at vni . In graph Gi there will be a 4place class vector associated to each root vertex. If vk is the root of a subtree Tk in Gi , then the j th entry of its class vector at step i equals the size of the smallest a-RDS Sk for Tk such that (Tk , Sk ) is of class [j ]. G0 consists of n isolated vertices, each the root of a one vertex tree. The class vector associated with each vertex vk in G0 is [1, 2, , 0], where is the entry for class [3], as it is impossible to have the root of a one vertex tree defended by another vertex appearing twice in S , since there are no other vertices in the tree besides the root vertex. For classes [1], [2], and [4], we associate the a-RDSs {vk }, {vk , vk }, and of sizes 1, 2, and 0, respectively. At step i of the algorithm, the only class vector that will change will be the one associated with the vertex vP arent[ni] . This is updated using the table in Figure 2.11 and the recurrences (2.6) - (2.9). Gn1 is the tree T rooted at v1 . Therefore, the j th entry of the class vector associated to v1 is the size of the smallest a-RDS S of T such that (T, S ) is of class [j ]. If (T, S ) is of class [1], [2], or [3], then S is also a Roman dominating set for T , but not if (T, S ) is of class [4], since v1 is not defended by S . Thus, R(T ) equals the minimum of the rst three entries of the class vector associated to v1 . We now have all the ingredients for an algorithm to compute R(T ) for a tree T . The input to the algorithm is an nplace vector P arent[1 . . . n] for T , whose ith entry is

64

P arent[i], as dened earlier. The output of the algorithm is the value of R(T ). Every vertex vi has an associated class vector Class[i] whose j th entry is denoted Class[i, j ]. Every class vector is initialized with the vector Class[i] = [1, 2, , 0]. At step i, where i runs from 0 to n2, the tree rooted at vP arent[ni] is composed with the tree rooted at vni producing a tree T . The vector Class[P arent[n i]] is updated by a procedure called combine that is derived directly from the recurrences (2.6) - (2.9) summarized in Figure 2.11. Class[P arent[n i], j ] equals the size of the smallest a-RDS S for T such that the pair (T , S ) is of class [j ]. For example, let T be the composition of a tree T1 rooted at va with a tree T2 rooted at vb . Let S be a minimum a-RDS for T such that (T , S ) is of class [1]. By relation (2.6), if (T1, S1) is of class [1], then S is the multiset union of S1 and S2, where S1 is the smallest a-RDS for T1 such that (T1, S1) is of class [1], and S2 is the smallest a-RDS for T2 such that (T2, S2) is of class [1], [2], or [3]. Since Class[a, j ] equals the size of the smallest a-RDS S1 for T1 such that (T1, S1) is of class [j ], and Class[b, j ] is similarly dened for T2, then Class[a, 1] will be updated to equal the minimum of Class[a, 1] + Class[b, 1], Class[a, 1] + Class[b, 2], and Class[a, 1] + Class[b, 3]. The other values of Class[a, j ] are updated similarly, though if (T , S ) is of class [2], then some terms have one or two added to them, reecting when additional copies of va must be added to S1 S2 for the resulting multiset S to be an a-RDS such that (T , S ) is of class [2]. For instance, in updating Class[a, 2], one minimizes a set of expressions that includes Class[a, 3] + Class[b, 4] + 2, where +2 appears because if (T1, S1) is of class [3] and (T2, S2) is of class [4], r2 is undefended by S1 S2 . Therefore, two copies of r1 need to be added to S1 S2 for the resulting multiset S to be an a-RDS for T such that (T, S ) is of class [2]. After step n 1, all of the edges of the tree T rooted at v1 have been included. Therefore, Class[1, j ] equals the size of the smallest a-RDS S for T such that (T, S ) is of class [j ]. We want S to be a minimum Roman dominating set for T , so R(T ) will be the minimum of Class[1, 1], Class[1, 2], and Class[1, 3]. An example of the algorithm is illustrated in Figure 2.12. Pseudo-code for the algorithm is given below. procedure R(Parent);

65

G0 1

[1,2, ,0] 8 [1,2, ,0] 8 [1,2, ,0] 8 [1,2, ,0] 8 [2,2,2,1] [3,2,3,2]

G1

G2

2 4 5

## 3 [1,2, ,0] 8 G3 [1,2, ,0] 8 G4 [4,4,3,4] 2 1

i 1 2 3 4 5 Parent[i] 0 1 1 2 2

Figure 2.12: An illustration of the algorithm to compute R(T ). At step i, the root vertex of each maximal connected subtree in Gi is denoted with a lled in circle, and the class vector associated to each root vertex at step i is noted next to the vertex. The bold edge denotes the edge added by the composition of the subtree rooted at vP arent[ni] with the subtree rooted at vni . The lower right tree gives the minimum Roman dominating set S of T . Note that (T, S ) is of class [3], as the root vertex is defended by one of its neighbors. Also, the minimum of the rst three entries of the class vector associated to the root vertex of G4 = T is the entry associated with class [3]. begin for i:=1 to n do initialize Class [i,1 ...4] to [1,2,,0]; for j:=0 to n-2 do k:=Parent[n-j]; combine(Class,k,n-j); R(T ) := min {Class[1,1], Class[1,2], Class[1,3]}; output R(T ); end(R); procedure combine(Class,a,b); begin Class [1]:= min {Class[a,1]+Class[b,1], Class[a,1]+Class[b,2], Class[a,1]+Class[b,3]}; Class [2]:= min {Class[a,2]+Class[b,1], Class[a,2]+Class[b,2], Class[a,2]+Class[b,3], Class[a,2]+Class[b,4], Class[a,1]+Class[b,4]+1,Class[a,3]+Class[b,4]+2, Class[a,4]+Class[b,4]+2};

66

Class [3]:= min {Class[a,3]+Class[b,1], Class[a,3]+Class[b,2], Class[a,3]+Class[b,3], Class[a,4]+Class[b,2]}; Class [4]:= min {Class[a,4]+Class[b,1], Class[a,4]+Class[b,3]}; for j:=1 to 4 do Class[a,j] = Class [j]; end(combine); Since the procedure combine takes O(1) time to compute, it is clear that the procedure R runs in O(n) time. To summarize, we have the following theorem. Theorem 2.41 (SMH,STH) For a tree T of order n, the procedure R(Parent) computes R (T ) in O(n) time. To show that the decision problem for Roman domination is NP-complete, we use a transformation from 3SAT [34]:

3SATISFIABILITY (3SAT) INSTANCE: A collection C = {C1 , . . ., Cm } of clauses on a nite set X = {X1, . . . , Xn} of variables such that |Ci | = 3 for 1 i m. QUESTION: Is there a truth assignment for X that satises all the clauses in C ?

In an instance of 3SAT, a clause Cj consists of three literals, where a literal is either a variable Xi X or its complement, which we will denote Xi . A truth assignment is a function A : X {T RU E, F ALSE }. A clause is satised by a truth assignment A if one of its three literals is set to TRUE, which happens if Xi is a literal in the clause and A(Xi ) = T RU E , or if Xi is a literal in the clause and A(Xi) = F ALSE (which we can also view as A(Xi ) = T RU E ). We now dene the decision problem for RDFs.

67

## Theorem 2.42 (SMH, STH) ROMAN complete. Proof:

DOMINATING

FUNCTION

is

NP-

To show that ROMAN DOMINATING FUNCTION is NP-complete, we construct a polynomial transformation from 3SAT. Let I be an arbitrary instance of 3SAT for the set of clauses C = {C1 , C2, . . . , Cm } on the set of variables X = {X1, . . . , Xn} We produce a graph G(I ) and a positive integer K such that I has a satisfying truth assignment if and only if G(I ) has an RDF f = (V0, V1, V2) with f (V ) K = 2n. Corresponding to each clause Ci , we construct a vertex labeled ci . Corresponding to each variable Xi X we construct a copy of the complete bipartite graph K2,3, with partite sets Ri = {xi , xi} and Si = {ui , vi, wi}. To each K2,3 we add the edge xi xi , and we add three edges from each clause vertex ci to the three vertices corresponding to the three literals in clause Ci . An example of the construction of G(I ) is given in Figure 2.13. We claim that the given instance of 3SAT has a satisfying truth assignment if and only if the graph G(I ) has an RDF f with f (V ) 2n. Let the given instance of 3SAT have a satisfying truth assignment A. For each variable Xi , if A(Xi) = T RU E , then let f (xi ) = 2. Otherwise, let f (xi ) = 2. For all other vertices w in G(I ), let f (w) = 0. It is easy to see that the function f so dened is an RDF of weight K 2n, since either xi or xi is in V2, and either vertex defends Ri Si . Also, every vertex ci has at least one neighbor in V2 because A assigns at least one literal to T RU E in every clause Ci . Conversely, assume that G(I ) has an RDF f of weight f (V ) = K 2n. It is easy to see that for each induced subgraph on Ri Si , we must have either f (xi ) = 2 or f (xi ) = 2. Therefore, f has weight at least 2n. It follows that the set of vertices v for which f (v ) = 2 defends the set of clause vertices. Therefore, the given instance of 3SAT has a satisfying truth assignment A, where A(Xi) = T RU E if and only if f (xi ) = 2.

68

C1

C2

Cm

x1

x1

x2

x2

xn

xn

u1

v1

w1

u2

v2

w2

un

vn

wn

Figure 2.13: Constructing a reduction from an instance I of 3SAT to an instance of ROMAN DOMINATING FUNCTION on the graph G(I ). In our example, clause C1 = X1X2 Xn . In addition, Alice McRae showed using similar constructions that ROMAN DOMINATING FUNCTION is NP-complete even when restricted to chordal, bipartite, split, or planar graphs [46]. A graph is chordal if every cycle of length greater than three has a chord, that is, an edge joining two non-adjacent vertices in the cycle. A split graph is a graph whose vertex set can be partitioned into two disjoint parts, where one part induces a totally disconnected subgraph and the other part induces a complete subgraph.

2.10

Open Problems

Among the many questions raised by this research, the following are of particular interest. 1. Finding other classes of Roman graphs. 2. Characterizing the class of Roman trees. 3. Determining the Roman domination number of any grid graph Gm,n . 4. Developing other interesting denitions of minimal RDFs, and determining

whether the answer to the question Is an RDF for G Type III minimal? is an NP-Hard problem. 5. Finding bounds for the minimum and maximum values of n0 , n1 and n2 for a Rfunction f = (V0, V1, V2) of a graph G. For example, Proposition 2.4(e) says that

69

you can always guarantee there is a Rfunction with n0 3n/7. 6. i(G) denotes the size of the smallest independent dominating set of a graph G. We can dene a similar concept for Roman domination; an RDF f = (V0, V1, V2) is independent if V1 V2 is an independent set. What are bounds for iR(G) (where iR (G) denotes the minimum weight of an independent RDF for G)? (G) denotes the size of the largest minimal independent dominating set. How do we dene R(G), and what are bounds for its value? 7. For what graphs do there exist polynomial algorithms for computing Def (G, b) for all threshold vectors b? 8. In [5], Arquilla and Fredricksen associate a cost function to slides, charging one unit per token per slide, and they look for token arrangements with a xed number of tokens that defend the entire graph and minimize the total cost to defend every vertex. Additional constraints may include requiring that the tokens should be arranged so that they are able to defend any pair of vertices simultaneously. Other cost functions and models for defender sets may be of interest as well. For example, in our model, we assume that if a vertex vj is involved in a sequence of slides to defend a vertex vi , then vj must be defended after every slide in the sequence subsequent to the rst slide that involves vj . Removing this requirement produces an entirely dierent problem.

70

3.1 3.1.1

## Background Automata and Neural Networks

In this chapter, we will study a type of neural network which is motivated by work in distributed computing and models of opinion formulation in groups. Automata networks are dynamical systems which are discrete in both time and space. To be precise, an automata network can be viewed as a vertex set V = {v1, . . . , vn }, where each vertex vi has a state xi (t) Q dened for all integers t 0, where Q is the set of possible states. Each vertex vi has a transition function fi : Qn Q associated to it, and the set of states is updated synchronously (in parallel) via the rule xi (t + 1) = fi (x1 (t), . . ., xn (t)), i = 1, . . ., n. There are also automata networks dened on innite vertex sets and with other update rules (sequential, block-sequential, etc.), but for our purposes, we are only interested in nite synchronous networks. Automata networks have been widely studied as models in biology, chemistry, and physics ([63], [14], [89], [36]). In addition, automata networks are used as models of abstract computation; the von Neumann Cellular Automaton [90], which is dened on a two dimensional lattice, has the same capabilities as a Universal Turing Machine. The same can be said for the Game of Life [13], a 2-state cellular automaton on a two dimensional lattice, made famous by John Conway. For our purposes, we are interested in a particular class of automata networks called synchronous neural networks, which we describe below. We will usually drop the term synchronous, since all of the neural networks we consider will be synchronous. Given a vertex set V = {v1 , . . . , vn}, we associate to each ordered pair of vertices (vi , vj ) a

71

weight aij . We often have in mind a digraph with vertex set V and a weight aij on each arc (vi , vj ), associating a weight of zero to every pair (vi , vj ) that is not an arc in the digraph. We also associate to each vertex vi a threshold bi and an initial state xi (0) (either in {0, 1} or {1, +1}). At each time step, the state of each vertex is updated in parallel according to the rule: xi (t + 1) = 1(
vj V

aji xj (t) bi ),

where 1(u) = 1 if u 0, and 0 or 1 otherwise (depending on the choice of state set). Equivalently, viewing the states and thresholds of the vertex set as column vectors x(t) = (x1(t), . . . , xn(t))T and b = (b1, . . . , bn)T , respectively, and the weights on the pairs of vertices as a matrix A = (aij ), we have the expression x(t +1) = 1(AT x(t) b). A neural network is symmetric if its associated weight matrix A is symmetric. In this chapter, we will study a special type of symmetric neural network called a threshold network. A synchronous neural network is completely determined by its matrix of weights A and its threshold vector b, so it makes sense to identify a neural network with the ordered pair (A, b). Because a neural network is nite, for any initial state vector x(0), the sequence x(0), x(1), x(2), . . . will eventually become periodic, that is, for some P 1 and T 0, x(t) = x(t + P ) for all t T . The smallest such P for which the above statement is true is called the period of the network. The sequence of vectors x(T ), x(T +1), . . . , x(T + P 1) is called the orbit of the network. For a neural network (A, b) on n vertices and a vector v {1, +1}n , let T (v) denote the number of time steps before the sequence x(0), x(1), x(2), . . . becomes periodic when x(0) = v. The transient length of a neural network (A, b), denoted (A, b), is dened as: (A, b) = max{T (v) : v {1, +1}n}. Some results regarding the period and transient length of neural networks will be important later, and they are presented here. Proposition 3.1 [38] If A is a symmetric matrix, then for all vectors b, the orbits of the synchronous neural network (A, b) are either xed points or 2cycles.

72

The above proposition is clearly not true for non-symmetric matrices; let A be the adjacency matrix for a directed cycle Cn , b be the zero vector, and x(0) = (+1, 1, 1, . . ., 1, 1). The neural network (A, b) clearly has period n, and one can trivially get exponentially large period times with disjoint directed cycles whose lengths are distinct primes. In addition, there can be symmetric neural networks with exponentially large transient lengths. Proposition 3.2 [37] For any n there exists a symmetric neural network (A, b) on n vertices such that (A, b) 2n/3. When the matrix of weights A is symmetric and the weights are integral, we get the following result. In the proposition below, for a vector or matrix X , ||X ||1 denotes the sum of the absolute values of the entries of the vector or matrix X . Proposition 3.3 [35] Let A be an n n integer symmetric matrix, and let b = (b1, . . . , bn)T be a column vector with bi = mi + 1/2, mi Z for all i. The transient length of the neural network (A, b) is either zero or it is bounded by: 1 (A, b) (||A||1 + 3||2b A1||1 n) 2 where 1 denotes the all-ones column vector of length n.

3.1.2

Majority Networks

There are several dierent processes on graphs that fall under the class of majority networks. The most common majority process is where each vertex in a graph has an initial state (say, in {1, +1}), and at each time step, a vertex v changes its state if and only if at least half of its neighbors have the opposite state. There are variations of the majority process which include the state of v in the determination of majority, along with various rules for breaking ties (always choose +1 or 1, always keep the current state, always switch states). Majority processes (sometimes also called repetitive polling processes) have had applications in problems in distributed computing (see [29], [68]). A concrete example

73

of an application in distributed computing, in particular, maintaining data consistency, was suggested by Peleg in [80]. Assume that all of the processors in a distributed network store an identical bit of data and some of these bits get changed for whatever reason (rounding error, for example). If a processor discovers that the values of the bits of some of its neighbors are dierent, a majority process could be used to update the values of all of the processors until every processor has the same value for its bit. In a general context, though, there is no guarantee that every processor will return to the same value, much less the correct one. Peleg also referred to other applications of majority processes to distributed computing in system-level diagnosis and resource allocation. The problem of maintaining data consistency raises an interesting question: for what graphs does the majority process always lead to the xed point of all of the vertices having the same state as the initial global majority state, regardless of the initial state conguration? In [73], Mustafa and Pekec analyzed democratic consensus computers (d.c.c.s), graphs that exhibit precisely this behavior. They produced a variety of results, including that a graph which is a d.c.c. has diameter at most four, has a trivial min-cut and a non-unique max-cut, and for a graph G on n vertices with (G) n 3, if G is a d.c.c., then G must have a vertex (called a master) that is adjacent to every other vertex. They conjectured that every d.c.c. contains a master, and the question of a full characterization of d.c.c.s remains open. For a given graph, one might wonder what subsets of the vertex set can force a majority process to the xed point with every vertex in the same state. More formally, a set of vertices M is a dynamic monopoly, or dynamo for short, if when a majority process is started with all of the vertices in M positive, then the system reaches the xed point with all vertices being positive. Dynamos can be incredibly small; Berger [11] proved that for every n, there exists a graph with at least n vertices containing a dynamo of size 18. In addition, in [79], Peleg showed that for all graphs, the size of a dynamo that converts all vertices to positive in a single step (Peleg called such a dynamo a (static) monopoly) must be ( n), and that there are graphs with static monopolies of size O( n).

74

One can also consider special classes of dynamos. For example, if M is a dynamo and Pt denotes the set of positive vertices at time t (P0 = M ), M is a monotone dynamo if Pt Pt+1 for all t 0. In addition, one can consider a dierent update rule where the state of a vertex changes from 1 to +1 if and only if more than half of its neighbors are positive, but not vice versa. These irreversible majority processes (and the associated irreversible dynamos) appear in the context of fault-tolerant computing, where a vertex becoming positive corresponds to permanent faults occuring in the associated processor. In [29], [30], and [68], bounds are shown for both monotone and irreversible dynamos in toroidal graphs of various types and in butteries, two graph structures which appear in parallel computation. In addition, in [80], Peleg showed that for most variants of majority processes, every monotone dynamo is of size ( n). There are, however, some majority process variants with constant size monotone dynamos; in the majority process where a vertexs state is counted in its own majority determination and in case of ties, the vertex turns positive, any pair of adjacent vertices in the cycle Cn is a monotone dynamo.

3.1.3

## Social Impact Models

Majority processes have been used in models of social inuence (see [24], [32], and [81]). In [81], Poljak and S ura developed a social model where each person has one of a nite set of opinions, each person has some measure of inuence on the opinion of every other person, and these inuences are symmetric (that is, A has the same inuence over B as B has over A). At each time step, for each opinion, a person sums up the inuences of all of the people with that opinion. The person then chooses the opinion with the highest sum of inuences. Poljak and S ura showed that this process eventually becomes periodic with period one or two. Note that this is a generalization of Proposition 3.1 in [38]. A similar model was proposed by DeGroot [24] and French [32], where in a group of n people, each person has an initial opinion Oi (0) and person i associates a non-negative weight pi,j to person j s opinion, with the pi,j s summing to 1 for a xed i. At every time step, each person reformulates their opinion as follows: Oi(t +1) =
n j =1 pi,j Oj (t).

75

Let D be a digraph on n vertices {v1 , . . ., vn } that has an arc from vj to vi if and only if pi,j > 0. The individual opinions will all converge to a consensus opinion if the digraph D is strongly connected and has a loop from a vertex to itself ([41], [85]). The problem can also be viewed in the context of Markov processes, and if D is viewed as a Markov chain, the chain is ergodic and aperiodic. Both of these models can be thought of as formalizations of the Delphi method ([21], [66]), a method developed at the RAND Corporation for consensus nding and problem solving in groups. In the Delphi method, issues are revisited through several rounds of deliberation, and a persons opinion changes from round to round based upon new information and upon the opinions of other people in the group.

In his work, Bibb Latan e used neural networks to model the theory of social impact ([60], [61], [62]). In his models, the pressure to change attitudes is proportional to the strength, immediacy, and number of individuals with opposing views and inversely proportional to the strength, immediacy, and number of individuals with the same view. These models often produce clusters of people holding very strongly polarized opinions, with the minority group smaller than when the process began. Latan es theories on social interaction which were derived from computer models were conrmed empirically in experiments involving groups of people working to obtain consensus decisions. Similar models for voter choice, both deterministic and probabilistic, were presented by Merrill in [71].

A somewhat related line of research arises in the work of Falmagne ([25], [26], [27]). In his work, Falmagne explored models for approval voting [16], where voters are allowed to select any subset of candidates as opposed to just one. He considered uctuations of opinion caused by a stochastic stream of tokens (simple messages) and their eect on the outcome of approval voting. This model can also be viewed in the context of non-deterministic neural networks.

76

3.2

## Threshold Networks and k Conversion Sets

A kthreshold network is a special type of symmetric neural network dened on a graph where each vertex has a state of 1 or +1. At each time step, a vertex changes its sign if and only if k or more of its neighbors have the opposite sign. This is clearly related to the types of models described in the previous section, but is not exactly the same as any of them. To formalize the notion of a kthreshold network, we look at its matrix formulation. Given a graph G = (V, E ), V = {v1, . . . , vn }, we associate the matrix A, where:

if vi vj E (3.1)

Aij

0 if vi vj E and i = j 2k deg(vi) 1 if i = j

For the remainder of this section, G and A will be dened as above. Proposition 3.4 For a graph G, the neural network (A, 0) models the kthreshold process for G, where A is the matrix dened above. Proof: When 0 is the threshold vector, given a state vector x(t) = (x1 (t), . . ., xn (t)), xi (t) {1, +1}, the update rule becomes x(t + 1) = 1(Ax(t)). It suces to show that xi (t) = xi (t + 1) if and only if vertex vi has at least k neighbors of the opposite sign at time t.
For a vertex vi , let n+ i (t) (respectively, ni (t)) be the number of neighbors of vi that

are positive (respectively, negative) at time t. Assume without loss of generality that xi (t) = +1. Then:

xi (t + 1) = 1((Ax(t))i)
n

= 1( =

## Aij xj (t)) n i (t) + xi (t)(2k deg(vi ) 1))

j =1 1(n+ i (t)

77

= 1(n+ i (t) ni (t) + 2k deg(vi ) 1)) + = 1(n+ i (t) ni (t) + 2k ni (t) ni (t) 1))

## = 1(2k 2n i (t) 1))

1(2k 2n i (t) 1)) = 1 if and only if 2k 2ni (t) 1 < 0, or if ni (t) k . The

## argument is similar if xi (t) = 1.

We can also dene the notion of an irreversible kthreshold network. For ease of presentation, we will assume the state space for the vertices is {0, 1}. In an irreversible kthreshold process on a graph G, a vertex enters state 1 if and only if at least k of its neighbors are in state 1. However, a vertex will never switch from state 1 to state 0. This too, has a neural network formulation (A, k), where A is the standard adjacency matrix for G and k denotes the allks vector. It is easily veried that the neural network (A, k) models an irreversible kthreshold process. We introduce some notation: for a kthreshold process, we let V+ (t) and V (t) denote the sets of vertices which are in state +1 and 1 at time t, respectively. We similarly dene V0(t) and V1 (t) for irreversible kthreshold processes. Also, we will refer to threshold processes and networks without the k prex if the threshold is not relevant to the discussion. As there are dynamos in majority processes, we can dene a similar notion for threshold processes. Given a graph G, a set of vertices S V is a kconversion set if when a kthreshold process is started with V+ (0) = S and V (0) = V S , the process reaches the xed point where all of the vertices are positive, i.e., there exists a T such that x(t) = 1 (or, V+ (t) = V ) for all t T . We can also dene monotone and irreversible conversion sets as we dened monotone and irreversible dynamos; a conversion set S is monotone if V+ (t) V+ (t + 1) for all t 0. A set of vertices S is an irreversible kconversion set if when an irreversible kthreshold process is started with S V1(0), then the process reaches the xed point with all of the vertices in state 1. When we discuss kthreshold processes in graphs, we will always assume that k 2. 1conversion in graphs is trivial, since if any two adjacent vertices have opposite signs,

78

their signs will alternate at every time step. Irreversible 1 conversion is also trivial, since in a connected graph, if any vertex is in state 1, then at time t = 1, all of its neighbors will be in state 1, and at time t = 2, all of the vertices in its 2neighborhood will be in state 1, and so on. Although much work has been done on dynamos in majority networks, conversion sets are a fairly new concept. In [53], Impagliazzo, Paturi, and Saks analyze circuits using threshold gates, which take n {0, 1} inputs x1, . . . , xn and output 1(
n i=1 (wi xi ) b)

for a given set of weights w1, . . . , wn and a threshold b, where 1(u) is the sign function dened earlier. Some of their results deal with xing the values of a subset of the inputs to the circuit to force a constant output to the circuit, regardless of the other inputs to the circuit. This is clearly a generalization of the concept of conversion sets, as every threshold network can be represented by a circuit using threshold gates. Unlike dynamos in majority processes, conversion sets are not necessarily superhereditary; that is, supersets of conversion sets do not have to be conversion sets. The simplest counterexample occurs with a 2threshold process on K4 K2 . Let S be one of the copies of K4 plus any single vertex w from the other copy of K4. This is a 2conversion set for K4 K2 : after one time step, V+ (1) = V {w}, V (1) = {w}, and at the next time step, V+ (2) = V . However, if another vertex from the second copy of K4 is added to V+ (0), the 2threshold process enters a 2cycle, with the positive and negative vertices in the second copy of K4 alternating at each time step. There are similar constructions of non-superhereditary kconversion sets for all k: on K2k K2, letting V+ (0) be one copy of K2k and any k 1 vertices from the other copy of K2k is a kconversion set, but adding another vertex to V+ (0) makes the kthreshold process enter a 2cycle. Proposition 3.5 If all of the vertices of a graph G have degree < 2k, then all supersets of a kconversion set for G are also kconversion sets. Proof: If deg(vi ) < 2k for all i, then Aii 0 for all i, and the matrix A is nonnegative. Thus, if x y, where denotes that xi yi for 1 i |V (G)|, then

79

Ax Ay. If D is a kconversion set for G, then consider the kthreshold process on G with xi (0) = +1 if and only if vi D. If D D V , then consider the kthreshold process with xi (0) = +1 if and only if vi D . Since x (0) x(0), then x (1) = Ax (0) Ax(0) = x(1), and similarly, x (t) x(t) for all t 0. Since D is a kconversion set, there is some T such that x(t) = 1 for all t T . Then x (t) = 1 for all t T as well, so D is a kconversion set for G.

Monotone conversion sets are not necessarily superhereditary, but irreversible conversion sets are superhereditary, as the matrix associated to such an irreversible threshold process is a graph adjacency matrix, and hence non-negative. For a graph G, let Convk (G) denote the size of the smallest kconversion set for
m i G. In addition, Convk (G) and Convk (G) will denote the size of the smallest monotone

## kconversion set and irreversible kconversion set, respectively.

m (G) Conv (G) Conv i (G). Observation 3.6 For a graph G, Convk k k

Proof: The rst inequality is obvious; every monotone conversion set is a conversion set. For the second inequality, if D is a kconversion set, consider an irreversible kthreshold process on G with all of the vertices in D in state 1. At each time step, the set of vertices that would be positive in a standard kthreshold process is contained in the set of vertices in state 1 in the irreversible kthreshold process. Since the standard kthreshold process will enter the state where all vertices are positive, the irreversible network will enter the state where all vertices are in state 1. Hence, every kconversion set is an irreversible kconversion set.

## The kCONVERSION SET problem is as follows:

kCONVERSION SET (kCS) Instance: A graph G and a positive integer d. Question: Does G have a kconversion set D, |D| d?

80

We can similarly dene the IRREVERSIBLE kCONVERSION SET (IRkCS) problem. We will show that both of these problems are NP-complete for a xed k 3, but we must rst prove a result about r conversion sets in r regular graphs. Lemma 3.7 Let G = (V, E ) be a connected r regular graph, and let D V . 1. D is an irreversible r conversion set if and only if V D is independent. 2. D is an r conversion set if and only if V D is independent and D is not independent. 3. D is a monotone r conversion set if and only if V D is independent and D is isolate-free (i.e., every vertex in D has a neighbor in D). Proof: 1. In an irreversible r conversion process, a vertex will switch from state 0 to state 1 if and only if all of its neighbors are in state 1. If V D is not independent, then two vertices starting in state 0 share an edge, and those adjacent vertices will never enter state 1, since both vertices will always have at least one neighbor in state 0. Hence, D cannot be an irreversible conversion set. Similarly, if V D is independent, then every vertex in V D will switch to state 1 at time t = 1. 2. For an r conversion process in an r regular graph, a vertex will change state if and only if all of its neighbors are of the opposite state. Again, this implies that if D is a kconversion set, then V D must be independent. However, if D is also independent, then the states of the vertices in D and V D would alternate signs at every time step, creating a 2cycle. If D is not independent, and V D is independent, let u and v be vertices in D that share an edge. N [u] N [v ] V+ (1), since any neighbor w V+ (0) will remain positive since it has a positive neighbor (either u or v ), and any neighbor w V (0) will switch to positive, since all of ws neighbors are in V+ (0) (because V (0) is independent). We can show inductively that V (t) will be independent for all t, since every vertex in V (t 1) will be in

81

V+ (t), and every vertex w V+ (t 1) that switched sign had all of its neighbors in V (t 1), and since all of ws neighbors are in V+ (t), no two vertices in V (t) share an edge. In addition, we can show inductively that the tneighborhoods of u and v are in V+ (t). Assume the (t 1)neighborhoods of u and v are in V+ (t 1). At time t 1, every vertex in the tneighborhoods of u and v is either positive (in which case they will not switch sign at time t since they have a positive neighbor in the (t 1)neighborhoods of u and v ) or negative (in which case they will switch sign at time t, since V (t 1) is independent). Therefore, the entire graph will be positive in at most max{d(u, w ), d(v, w) : w V } time steps. 3. If D has an isolated vertex, then it would become negative at time t = 1, hence D is not monotone. If V D is independent and D is isolate-free, then D is also not independent, so we know that D is an r conversion set. Since every vertex in D has a positive neighbor, no vertex in D will become negative. In addition, every vertex that becomes positive will have a positive neighbor, so it will never become negative again. Hence, D is a monotone r conversion set.

Corollary 3.8 Let G = (V, E ) be a connected graph with (G) r , let S V be the set of vertices of degree less than r , and let D V . 1. D is an irreversible r conversion set if and only if S D and V D is independent. 2. D is an r conversion set if and only if S D, V D is independent and if S = , then D is not independent. 3. D is a monotone r conversion set if and only if S D, V D is independent and every vertex in D S has a neighbor in D. Proof: Clearly, all vertices of degree less than r would have to be contained in any (irreversible) r conversion set for a graph G. Beyond that, the proof of the corollary is

82

nearly identical to the proof of Lemma 3.7. The rst part of the proof is identical. In the second part, if v S , then it is easily shown that for all t 0 the tneighborhood of v will be positive at time t using an argument similar to the proof of the second part in Lemma 3.7. For the third part, as long as V D is independent and we guarantee that every vertex in D will remain positive, then D is a monotone r conversion set. Since no vertex in S will ever become negative, we need only consider the vertices in D S . A vertex in D S will be positive for all t 0 if and only if it has a positive neighbor at time t = 0.

Although we do not use this result immediately, we will now prove a similar result about r conversion sets in (r + 1)regular graphs. In a graph G, a feedback vertex set is a subset S of the vertices such that G[V S ] is cycle-free (equivalently, G[V S ] is a forest). Proposition 3.9 Let G = (V, E ) be an (r + 1)regular graph, and let S V . 1. S is an irreversible r conversion set if and only if S is a feedback vertex set. 2. S is a monotone r conversion set if and only if S is a feedback vertex set and G[S ] has no vertices of degree zero or one. Proof: 1. If S is not a feedback vertex set, then V S contains a cycle. At every time step, every vertex v in the cycle will have at least two neighbors in state 0. Therefore, v will have at most r 1 neighbors in state 1, and so no vertex in the cycle will ever convert to state 1. Alternatively, if S is a feedback vertex set, then G[V S ] is a forest, so at each time step, all of the isolated vertices and leaves in the forest induced by the vertices in state 0 will enter state 1, leaving a smaller forest, and this process will eventually reach the xed point with the entire vertex set in state 1. 2. As above, if S is an r conversion set, then it must be a feedback vertex set. If G[S ] has a vertex of degree zero or one, then at time t = 1, that vertex

83

becomes negative, so S is not monotone, since V+ (0) V+ (1). Suppose that S is a feedback vertex set, and assume that no vertex in G[S ] has degree zero or one. Then no vertex of S = V+ (0) will switch from positive to negative at time t = 1, so V+ (0) V+ (1). Assume that V+ (t 1) V+ (t) for t < m. At time t = m, because V+ (t 1) V+ (t) for t < m, every vertex in V+ (m 1) has at least as many positive neighbors as it did when it became positive (that is, at least r ). Therefore, no vertex in V+ (m 1) will become negative at time t = m, so V+ (m 1) V+ (m). Hence, the process will act identically to an irreversible threshold process, that is, the state of every vertex will be the same at every time t regardless of whether an r threshold process or an irreversible r threshold process is used. By the rst part of the proposition, S will be a monotone r conversion set because every feedback vertex set is an irreversible r conversion set.

In a graph G, a detour is a simple path of maximum length, and the detour number, denoted dn(G), is the length of such a path. The detour number was rst studied in [55].

Lemma 3.10 For a connected graph G = (V, E ) of order n, the transient length of an irreversible kthreshold process is at most dn(G) (dn(G) 1 if k > 1), and the transient length of a kthreshold process is at most (4k 4)n.

Proof: Assume we have an irreversible kthreshold process on a graph G, and assume that there exists a vertex vi which enters state 1 at a time T > dn(G). Let E (t) denote the set of vertices that enter state 1 at time t 0 (E (0) = V1 (0)), and assume that E (T ) = for all T > T . The E (t) are disjoint (because it is an irreversible threshold process), and every vertex in E (t) is adjacent to some vertex in E (t 1). Thus, every vertex in E (t) is the endpoint of a simple path of length t. If E (T ) = , then there is a simple path in G of length T > dn(G), a contradiction.

84

This bound can be improved if k > 1. If k > 1, every vertex in E (t) has at least two neighbors in E (0) E (t 1). We will show that every vertex in E (T ) is in a simple path of length T +1 that includes a vertex in E (0), E (1), . . ., and E (T ). Let v E (T ). It is the endpoint of a simple path P of length T , P = vi0 vi1 . . . viT , viT = v , vij E (j ). If any of v s neighbors are not on P , then clearly G has a simple path of length T + 1 containing v . If all of v s neighbors are on P , we construct a simple path of length T +1 as follows. We will show by induction that every edge vij1 vij in P is contained in a simple path of length j +1 consisting solely of vertices in E (0) E (j ). The claim is clearly true for j = 1; vi1 has another neighbor in E (0) besides vi0 , so there is a path of length two containing the edge vi0 vi1 . Assume the claim is true for all j k. Consider the edge vik vik+1 in P , with k < T . If vik+1 has a neighbor w E (0) E (k + 1) not on P , then vi0 vi1 . . . vik vik+1 w is a simple path of length k + 2 containing the edge vik vik+1 . If all of the neighbors of vik+1 in E (0) E (k + 1) are on P , then let vij be a neighbor of vik+1 on P , j = k. By our inductive assumption, we know there is a simple path P of length j + 2 containing the edge vij vij+1 consisting of vertices in E (0) E (j + 1). Let P = P1 vij vij+1 P2 , where P1 and P2 are disjoint simple paths in G[E (0) E (j + 1)]. Consider the path P = P1 vij vik+1 vik . . . vij+1 P2 . The vertices that were in P are distinct, and the vertices vim are in E (m) for j + 1 m k + 1, so they are distinct from the vertices in P and from each other, so the path is simple, of length k + 2, and consists solely of vertices in E (0) E (k + 1). An example of this construction is given in Figure 3.1. Thus, if k > 1, T + 1 dn(G), or T dn(G) 1. This bound on the transient length of an irreversible kthreshold process is sharp. Consider an irreversible 1conversion process in a path Pn . If V1 (0) consists of one of the endpoints of the path, then the process has transient length n 1 = dn(Pn ). This can be generalized for any irreversible kconversion process by starting with a path Pk+1 = v1 v2 . . . vk+1 , adding k leaves to v1 , k 1 leaves to each of v2, . . . , vk , and an edge from vk+1 to every other vertex in Pk+1 . If V1(0) consists of all of the leaves added to the path, then vertex vi enters state 1 at time t = i. Therefore, the process reaches the xed point of all vertices positive at time t = k + 1, and the longest path in this graph is of length k +2, involving all of the vertices on the path and at most two leaves.

85

Figure 3.1: Constructing a simple path of length k + 2. The highlighted edges denote the path, and the highlighted vertices denote the vertices which are leapfrogging each other at each step of the process. For the standard kthreshold process, we use Proposition 3.3. Let A be the matrix associated to a kthreshold process as dened in Equation 3.1, and let b = all1/2s column vector of length n. ||A||1 =
i,j 1 2

be the

|Aij | = 2|E | +

n i=1

## |2k deg(vi ) 1|,

and ||2b A1||1 = ||(I A)1||1 = (2k 2)n (each row in I A sums to 2 2k). By Proposition 3.3, we get:

(A, b) = =

1 (||A||1 + 3||2b A1||1 n) 2 n 1 |2k deg(vi) 1| + 3(2k 2)n n) (2|E | + 2 i=1 1 (2|E | + 2kn 2|E | n + 6kn 6n n) 2 1 (8kn 8n) 2

= (4k 4)n Theorem 3.11 For a xed integer k 3, kCONVERSION SET and IRREVERSIBLE kCONVERSION SET are NP-complete. Proof: By Lemma 3.10, we know that the transient lengths of both standard and irreversible threshold processes are polynomial in the number of vertices, so kCS and

86

IRkCS are in NP. Our reduction will be from the INDEPENDENT SET problem, given below.

INDEPENDENT SET Instance: A graph G and an integer m. Question: Is there an independent set in G of size m?

In a paper of Fricke, Hedetniemi, and Jacobs [33], using a reduction from NOT-ALLEQUAL-3SAT, they show that for a xed k 3, INDEPENDENT SET is NP-complete for the class of kregular, non-bipartite graphs (the problem is in P for the class of bipartite graphs). Given an instance of INDEPENDENT SET for a kregular, non-bipartite graph G: Does G have an independent set of size m?, we construct an instance of (IR)kCS: Does G have a/an (irreversible) kconversion set of size |V (G)| m? For the irreversible case, by Lemma 3.7, a vertex set is an irreversible kconversion set in a kregular graph if and only if its complement is independent. Therefore, there is a kconversion set C of size |V (G)| m if and only if there is an independent set S of size m. So, there is a yes answer to the instance of IRkCS if and only if there is a yes answer to the instance of INDEPENDENT SET. For the standard kthreshold process, if there is a yes answer to the instance of kCS, then there is a kconversion set S , |S | |V (G)| m. Therefore, V (G) S is an independent set of size m, and we get a yes answer to the instance of INDEPENDENT SET. If there is a no answer to kCS, then for every S V (G), |S | |V (G)| m, either (i) V (G) S is not independent, or (ii) Both V (G) S and S are independent. Because G is not bipartite, (ii) cannot occur. We conclude that no subset of V (G) of size m is independent, so we get a no answer to the instance of INDEPENDENT SET.

The complexity of 2CS and IR2CS still remain open. We cannot use the above

87

arguments, since it is trivial to nd independent sets in 2regular graphs (i.e., vertexdisjoint unions of cycles). In addition, Li and Liu [64] have developed a polynomial algorithm for nding a minimum feedback vertex set in 3regular graphs, so we cannot use Proposition 3.9.
m i Bounds on Convk (G), Convk (G), and Convk (G)

3.3

For many classes of graphs, we have constructed minimum kconversion sets. For other slightly more dicult classes, we will present constructive upper bounds for the value of Convk (G) and give proofs of lower bounds.
i (P ) = Proposition 3.12 For the path and cycle on n vertices, Conv2 (Pn ) = Conv2 n

n+1 2

## i and Conv2 (Cn ) =

n 2

For simplicity, we will denote the vertices of Pn (Cn ) in order v1 , . . . , vn. By Lemma 3.7, if S is a (irreversible) 2conversion set in Cn , which is 2regular, V S must be independent. Thus, |V S | (Cn ) = complement of an independent set of size set of size
n 2 n 2 n 2

## . For the standard case, it is also necessary for S to not be independent.

Thus, if n is odd, then S = {v1, v3, . . . , vn } is a set which is not independent whose complement is. If n is even, then every vertex set of size n/2 with an independent complement is itself independent, hence an additional vertex is necessary, so in both the even and odd cases, Conv2 (Cn ) =
n+1 2

For the path Pn , by Corollary 3.8, both v1 and vn must be in any 2conversion set S . For the irreversible case, the largest independent set in Pn not containing v1 or vn has size
n1 2

, hence |S | n

n1 2

n+1 2

## . Therefore, the lower bound on the size

of S in the standard case is the same as in the irreversible case. If n is odd, consider the set S = {v1, v3, . . . , vn }, and if n is even, consider the set S = {v1, v3, . . . , vn1 , vn}. Both are sets of size
n+1 2

88

3.3.1

## Complete Bipartite and Multipartite Graphs

Proposition 3.13 For a complete bipartite graph Km,n : 1. If m, n k, then a set S is a kconversion set if and only if each partite set contains < k members of V S , and at least one partite set contains k members of S . 2. If m k, n < k, then a set S is a kconversion set if and only if S contains the partite set of size m. 3. If m, n < k, then a set S is a kconversion set if and only if S = V . Proof: Let A and B be the two partite sets of V , with |A| = m n = |B|. If n < k, then the signs of the vertices in A will never change. Thus, if m k, S is a kconversion set if and only if A S . If m < k, S is a kconversion set if and only if S = V . Suppose m, n k. Assume that one partite set contains at least k vertices in V S . Without loss of generality, assume that |(V S ) A| k. Then B V (1). Since n k, A V (2), and so on, so S is not a kconversion set. If |A S | and |B S | are both less than k, then no vertices in V S will ever change sign, so S is not a kconversion set. Suppose that |A (V S )| < k, |B (V S )| < k, and |AS | k. Then B V+ (1) and xi (1) = xi (0) for all vi A. Since n k, V+ (2) = V .2

## Corollary 3.14 For the complete bipartite graph Km,n , m n:

m+n m

if m < k if m k, n < k

## n+1 if m < 2k 1, n k m + n 2(k 1) if m 2k 1, n k

k m m+n

if m, n k if m k, n < k if m, n < k

i Convk (Km,n) =

89

Proof: For the standard kthreshold process, we use the constraints set by the previous proposition. Thus, if A and B are the two partite sets of V , with |A| = m n = |B|, then:

## If m k and n < k, then A is a minimum kconversion set.

If m < 2k 1 and n k, then a subset of A of size k and a subset of B of size n (k 1) is a minimum kconversion set.

If m 2k 1 and n k, then a subset of A of size m (k 1) and a subset of B of size n (k 1) is a minimum kconversion set.

For all of these processes, V+ (t) V+ (t + 1), so the minimum kconversion sets for Km,n are also minimum monotone kconversion sets. For the irreversible kthreshold process, any subset of A of size k will be an irreversible kconversion set if m, n k (at time t = 1, B is positive, and at time t = 2, the rest of A is positive, and k is the lower bound for the size of any irreversible kconversion set). If m k and n < k, A is an irreversible kconversion set (at time t = 1, B becomes positive, and there are not enough vertices in B to change the sign of any vertex in A, so all of A must be positive at time t = 0). If both partite sets are smaller than k, then V is the only kconversion set.

To step up from complete bipartite graphs to complete multipartite graphs, we must dene some terms. The complete mpartite graph will be denoted Kp1,p2 ,...,pm , and it will be assumed that p1 p2 pm ,
m j =1 pj

## For any subset J [m] = {1, . . . , m}, VJ =

j J

size just above k if |VJ | k and if VJ is created by removing the smallest partite set

90

from VJ (J = J {max{j : j J }}), then |VJ | < k. Proposition 3.15 Let G be a complete mpartite graph Kp1,p2 ,...,pm with n = and k n < 2k. If there is a union VJ V of partite sets such that: 1. VJ has size just above k, and 2. n ps k, where s is the largest element of J ,
i m i (G) = Convk (G) = k. Otherwise, Convk (G) = Convk ( G) = then Convk (G) = Convk m Convk (G) = min{|VJ | : VJ is a union of partite sets of size just above k}. m i=1 pm

Proof: Let VJ be a union of partite sets of V of size just above k. If VJ has size exactly k, then clearly VJ is a (monotone) kconversion set for G. If not, let J = J {s}, where s is the largest element of J , and let V+ (0) consist of VJ and k |VJ | vertices in Vs . At time t = 1, all vertices will be positive except for the negative vertices in Vs , which will become positive at time t = 2 if and only if |V Vs | = n ps k. Assume that no union VJ of partite sets satises the conditions in the proposition. Let S be a minimum kconversion set for G, and let VJ be the smallest union of partite sets that contains S . At time t = 1, every vertex in V VJ will be positive. We may assume that at most one partite set Vi VJ has vertices in V S . If two partite sets Vi , Vj VJ contain vertices in V S , let Si = S Vi and Sj = S Vj . Removing min{pi |Si|, |Sj |} vertices in S from Vj and adding the same number of vertices from Vi to S gives a new kconversion set S for G. This is because nothing changes in the other partite sets during the threshold process, Vj will be positive at time t = 1, and a vertex in Vi will have at least as many positive neighbors in V Vi at time t = 1 as it did in the original threshold process. We can also assume that the partite set in VJ containing members of V S is the smallest partite set in VJ . To see this, assume that Vs is a partite set in VJ of minimum size, and let Vj be the partite set in VJ containing vertices in V S . If ps > |(V S ) Vj |, consider the new set S which removes |(V S ) Vj | of the vertices in Vs from S and includes all of Vj . Clearly, S is a kconversion set. If ps |(V S ) Vj |, then consider

91

the new set S that removes all of the vertices in Vs from S and includes ps more vertices from Vj . We let J = J {s} and repeat the process of removing vertices in S from the smallest partite set in J and adding vertices from Vj to S until either no partite set contains vertices in S and V S , or the only partite set which contains vertices in S and V S is the smallest partite set in VJ . If no partite set in VJ has vertices in V S , then clearly VJ is a (monotone) kconversion set for G. If Vs is the smallest partite set in VJ and Vs is the only partite set in VJ that contains vertices in V S , then VJ is a union of partite sets of V of size just above k. At time t = 1, every vertex in V VJ switches from negative to positive, and the only negative vertices remaining are in Vs . Since we assumed that no union of partite sets VJ satises conditions (1) and (2) in the proposition, we know that n ps < k, so the negative vertices in Vs will never switch to positive. Therefore, if conditions (1) and (2) do not hold for any union VJ of partite sets, then no partite set containing vertices in S can contain vertices in V S . In that case, Convk (G) =
m ( G) Convk

min{|VJ |

## The threshold process would

run identically whether it was a standard or irreversible threshold process. Also, the minimum kconversion set described above is also a minimum monotone kconversion
i m set, so the values of Convk (G), Convk (G), and Convk (G) are identical.

Proposition 3.16 Let G be the complete mpartite graph Kp1 ,...,pm . If n 2k and
i (G) = Conv m (G) = p . p2 + + pm < k, then Convk (G) = Convk 1 k

Proof: If p2 + + pm < k, then no set of positive vertices in V2 Vm is large enough to switch the vertices in V1 from negative to positive, hence all of V1 must be positive. Since |V1| k, V1 is an irreversible kconversion set for G, as well as a monotone kconversion set.

92

Proposition 3.17 Let G be the complete mpartite graph Kp1 ,...,pm with p2 + +pm k and n 2k. Then:
i ( G) = k . 1. Convk

2. n (k 1) + Proof:

k1 m1

## m Convk (G) n (k 1).

1. Let S be any subset of V2 Vm of size k, and let si = |S Vi | for 2 i m. We claim that S is an irreversible kconversion set. Since every vertex in V1 has k neighbors in state 1 in V2 Vm , V1 V1(1). If v V0 (1) Vi, then at time t = 2, v has at least k si + p1 neighbors in state 1 in V Vi . Since p1 pi si , v has at least k neighbors in V1 (1), so v V1 (2). Hence, S is an irreversible kconversion set. 2. For a kconversion set S to be monotone, |(V Vi) (V S )| < k for all i, 1 i m. Let ni = |Vi (V S )|. Let Vi1 and Vi2 have the smallest and second smallest values of ni , respectively. ni2 is at most
k1 m1

## , since ni2 is at most the

average of the (m 1) ni s (excluding ni1 ). We get the following upper bound on |V S |, which in turn gives the lower bound on min |S | in the proposition: |V S | = (|V S | ni1 ) + ni1 (k 1) + ni2 (k 1) + k1 . m1

To prove the upper bound on min |S | in the proposition, let a be the positive integer such that p1 + p2 + + pa1 < k 1 and p1 + p2 + + pa k 1. If p1 k 1, then let a = 1. Let S consist of Va+1 Va+2 Vm and (p1 + + pa ) (k 1) vertices in Va. |S | = n (k 1) > k, and |V S | = k 1, so no vertex will ever switch from positive to negative. If a = 1, then since p2 + + pm k, V1 V+ (1). If a > 1, then consider a partite set Vi, 1 i < a. Each Vi contains no vertices in S , but each vertex in Vi has at least k neighbors in S in Va Va+1 Vm , so Vi V+ (1) for all i, 1 i < a. If Va V+ (1), then the process has reached the state with all vertices positive. If not, then at time t = 1, every vertex in Va has |V Va | positive neighbors, and |V Va| k

93

2
k1 m1

## = 0 and the upper and

lower bounds are identical. For example, if S is a minimum monotone 3conversion set in K3,3,3,3, then V S can consist of at most two vertices. If V S had three vertices, then all of the vertices in some partite set would be adjacent to three vertices in V S , and therefore S would not be a monotone 3conversion set. There exist minimum monotone 3conversion sets of size ten, namely all of the vertices in three of the partite sets plus a vertex in the fourth, or all of the vertices in two of the partite sets plus two vertices from each of the remaining two partite sets.

3.3.2

Trees

For a tree T , recall that LT denotes the set of leaves of T . Clearly, LT must be contained in any kconversion set for k > 1, and in some circumstances, LT is a minimum conversion set. Proposition 3.18 If T is a tree with every internal vertex of degree > k for k > 1,
i (T ) = |L |. then Convk (T ) = Convk T

Proof: Let v be an internal vertex of T , and let D = ecc(v ). We will prove by induction the statement, At time t 0, in a kthreshold process with V+ (0) = LT , {w : d(v, w) D t} V+ (t). Clearly, the statement is true for t = 0, since the only vertices distance D from v are leaves of T . Assume the statement is true for some t = m. If w is a vertex distance d from v , then all of ws neighbors are either distance d 1 or d + 1 from v , and w has exactly one neighbor at distance d 1 from v . If d(v, w) D m, then w is positive at time t = m, and will be positive for all t m, since at most one of its neighbors will be negative after time t = m. Furthermore, every vertex u such that d(v, u) = D (m + 1)

94

has at most one neighbor in V (m) and at least k neighbors in V+ (m) that are distance D m from v (since deg(u) > k), so u will be positive at time t = m + 1, proving the result. Again, the threshold process runs identically whether it is a standard or
i irreversible threshold process, so the values of Convk (T ) and Convk (T ) are identical.

For a monotone kconversion set in a tree T with every internal vertex of degree > k, as long as every vertex has degree less than 2k, then the leaves of T form a monotone kconversion set. However, if some internal vertex v has deg(v ) 2k, it is possible that v V (t), k of v s neighbors are in V+ (t), and k of v s neighbors are in V (t +1), in which case the sign of v would switch from negative to positive and back to negative. For such a vertex, by adding vertices to the conversion set, one can guarantee that v has at least k positive neighbors if and only if it has more than deg(v ) k positive neighbors. Recall that for a graph G = (V, E ), a set S V is a vertex cover for G if for every edge uv E , u S or v S . It is easily shown that S is a vertex cover if and only if V S is independent. Proposition 3.19 Let T be a tree with every internal vertex of degree k > 1. 1. S is a/an (irreversible) kconversion set if and only if S = C LT , where C is a vertex cover of T [V LT ]. 2. S is a monotone kconversion set if and only if S = C LT , where C is a vertex cover of T [V LT ] and no vertex in C has no neighbors in C LT . Proof: 1. The proof proceeds similarly to the proof of Lemma 3.7. If S is a kconversion set for T , it must contain LT , and V S must be independent, since if two negative vertices shared an edge, they would never become positive. Hence, S = C LT for some vertex cover C of T [V LT ]. It remains to show that for any vertex cover C of T [V LT ], S = C LT is a kconversion set. Since V S is

95

independent, all of the vertices in V S will become positive at time t = 1, and a vertex will switch from positive to negative if and only if all of its neighbors are negative, so V (1) will also be independent, and we can inductively show that V (t) will be independent for all t 0. Finally, for every vertex v , let d(v ) = d(v, LT ) = min{d(v, w) : w LT }. We can show by induction that every vertex v for which d(v ) = d will be positive for all t d. It is certainly true for d = 0, since the leaves remain positive for all t 0. Assuming the statement is true for d = m, we consider all vertices vi for which d(vi) = m + 1. Every such vi has at least one neighbor vj for which d(vj ) = m. If xi (m) = +1, then since xj (t) = +1 for all t m, xi (t) = +1 for all t m. If xi (m) = 1, then since V (m) is an independent set, xi (t) = +1 for all t m + 1. 2. If a vertex in C is isolated in T [C LT ], then it has no neighbors in S and its sign changes from positive to negative at time t = 1. Conversely,

suppose that S = C LT as described in the proposition. As in the previous part, it is necessary for the set of negative vertices to be independent for all t, which is guaranteed by the independence of V (0). Also, a vertex w C will never become negative if and only if it has at least one positive neighbor at time t = 0. Hence, no vertex in C can have no neighbors in C LT .2

To extend these results to all trees, we make a few simplifying assumptions. We will restrict our analysis to trees with all internal vertices of degree k. If there is an internal vertex v with deg(v ) < k, it will have to be in any kconversion set, and it will never change sign. Thus, to every neighbor of v , v acts exactly like a leaf, so we can break T into deg(v ) subtrees with v as a leaf in each subtree. We dene a kregion of T to be a maximal connected subset of vertices of degree k. We can partition the vertex set of a tree into leaves, kregions, and non-kregions (maximal connected subsets of vertices of degree > k). For a kregion S , dene the outer boundary of S (denoted B (S )) to be the set of vertices not in S that have a neighbor in S (or, N [S ] S ) and the inner boundary of S (denoted b(S )) to be the set

96

of vertices in S adjacent to vertices not in S (or, N [B(S )] S ). Proposition 3.20 Let T be a tree with every internal vertex of degree k, and assume that T contains no kregion consisting of a single vertex. If C is a vertex cover for every subtree T [S B(S )], where S is a kregion of T , then C LT is a kconversion set for T if for every vertex v b(S ), where S is a kregion, either: 1. v C and v has a neighbor in (S C ) LT ; or 2. v C and v has a neighbor in LT or a neighbor in S C which has a neighbor in C LT . Proof: If all of the leaves and kregions of a tree are positive at some time step, then every non-kregion will be surrounded by positive vertices that will never switch to negative, so each non-kregion will turn positive as in the proof of Proposition 3.18. For a kregion S , let v b(S ). If v C and v has a neighbor w (S C ) LT , then since deg(v ) and deg(w) are both at most k, both vertices will remain positive for all t 0. If v C and v has a neighbor w which is in LT or in S C and w has a neighbor in C LT , then v will become positive at time t = 1 because all of its neighbors are positive at time t = 0, and w will be positive at time t = 1, since w is either a leaf or deg(w) = k, w C , and w has at least one positive neighbor at time t = 0. Thus, for every kregion S , b(S ) V+ (t) for all t 1 and V+ (1) is a vertex cover for every kregion S , so all of the vertices will turn positive as in the proof of Proposition 3.19.

Proposition 3.21 Let T be a tree with every internal vertex of degree k. If C is a vertex cover for every subtree T [S B(S )], where S is a kregion of T , then C LT is an irreversible kconversion set for T . Proof: If C is a vertex cover for every subtree T [B(S ) S ], where S is a kregion, then after one time step, every vertex in every kregion will be positive, since the

97

set of negative vertices in a kregion S will be independent. At time t = 1, every non-kregion will be surrounded by positive vertices, and will proceed to turn positive as in the proof of Proposition 3.18.

If C is an irreversible kconversion set for a tree T where every internal vertex has degree k, then S C must be independent for every kregion S . This is guaranteed by Proposition 3.21, but there is no guarantee that the irreversible kconversion set described in Proposition 3.21 is minimum. If v is an inner boundary vertex of some kregion S , and w is its neighbor on the outer boundary of S , then there is no need for C to cover the edge vw, as long as k other neighbors of w eventually become positive.
i (T ) which runs in O (n) time, where We now present an algorithm to compute Convk

n is the number of vertices in the tree. For simplicity, we will present the algorithm for k = 2 and then discuss how to implement it for larger k. The algorithm is very similar to the algorithm to compute R(T ) for trees in Section 2.6.2. Here again, we use the recursive denition of a (rooted) tree, as described in Section 2.6.2. For a tree T rooted at a vertex r , a set S of vertices is an almost irreversible 2conversion set (a-I2CS) if when an irreversible 2conversion process is started with the vertices in S in state 1, then all of the vertices in T {r } enter state 1, and, after doing so, remain in state 1. The root vertex r may be in S to convert other vertices in T , but it is not necessary for r to be in state 1 when the process reaches its xed point. However, if the root vertex r of T has degree 2 or greater, then any a-I2CS S for T is also an irreversible 2conversion set. If r is not in S , then r will enter state 1 after two of its neighbors enter state 1. In Section 2.6.2, we dened the composition of a tree T1 with a tree T2 and the composition of tree-subset pairs (T1, S1) and (T2, S2) with Si being an almost Roman dominating set for Ti. Here, we mimic that idea. Recall the rule of composition that joins a tree T1 rooted at r1 and a tree T2 rooted at r2 (with V (T1) V (T2) = ) by adding the edge r1r2 and specifying r1 as the root of the resulting larger tree T . Let T1 and T2 be two trees rooted at vertices r1 and r2, respectively. Also, let S1 and S2 be a-I2CSs for T1 and T2, respectively. If T is the composition of T1 with T2, then consider

98

the set S = S1 S2. S might not be an a-I2CS for T , since if r2 is not converted to state 1 by S2 in T2 , then r2 has at most one neighbor in T2. If r2 is not an isolated vertex in T2 and r1 is converted to state 1 in T1 by S1 , then r2 will eventually have two neighbors in T in state 1, so r2 will enter state 1 as well. If not, then either r1 or r2 must be added to S for it to be an a-I2CS. Let S be the resulting a-I2CS for T . We will use the notation (T, S ) = (T1, S1) (T2, S2) to denote this composition of two trees and their associated a-I2CSs.
i To construct an algorithm to compute Conv2 (T ) for any tree T , we characterize the

class of possible tree-subset pairs (T, S ) that can occur in a tree T with root vertex r , where S is an a-I2CS of T . For this problem, there are four classes of tree-subset pairs: [0] = {(T, S )|r S } [1] = {(T, S )|r S, deg(r ) 2} [2] = {(T, S )|r S, deg(r ) = 1} [3] = {(T, S )|r S, deg(r ) = 0} If (T, S ) = (T1, S1) (T2, S2), we can determine the class of (T, S ) if (T1, S1) is of class [i] and (T2, S2) is of class [j ] for each pair (i, j ), 0 i, j 3. The classes of (T, S ) resulting from each composition are summarized in Figure 3.2. The verication of the class of (T, S ) for each pair (i, j ) is straightforward. Note that in some cases, it is necessary to add copies of r1 or r2 to S in order to convert r2. Using Figure 3.2, we can write out a system of recurrence relations that capture how we can obtain a tree-subset pair of class [j ] after composition. It is impossible to compose two tree-subset pairs to get a tree-subset pair (T, S ) of class [3], because when two trees are composed, the root vertex has degree greater than zero. The superscripts
1

and

## on some of the compositions denote that r1 or r2 has been added to S to make

an a-I2CS for T . [0] = [0] [0] [0] [1] [0] [2] [0] [3]2 [2] [2]1 [3] [2]1 [1] = [1] [0] [1] [1] [1] [2] [1] [3]2 [2] [0] [2] [1] [2] [2]2 [2] [3]2 (3.2) (3.3)

99

j i

[0]

[1]

[2]

[3]

[0] [0] [1] [1] [2] [1] [3] [2] [2] [0] (+1) [2] [2] (+1) [1] [0] [1] (+1) [1] (+1) [1] [1] [1] (+1) [0] [0] [0] (+1)

Figure 3.2: The number in brackets in the ([i], [j ])th entry in this table gives the class of (T, S ) that results from composing (T1, S1) of class [i] with (T2, S2) of class [j ]. Examples are given for each pair ([i], [j ]). The black vertices denote the vertices that appear in S . A dotted edge represents the edge joining the roots of T1 and T2. If it was necessary to add a copy of r1 or r2 to S to convert r2 , the added vertex is shown in grey, and the number of vertices which are added to S is noted in parentheses. In some cases, the class of the resulting composition is dierent depending on whether r1 or r2 is added to S . [2] = [3] [0] [3] [1] [3] [2]2 [3] [3]2 (3.4)

For example, to see recurrence (3.3), we note that if (T, S ) = (T1, S1) (T2, S2) is of class [1], then (T1, S1) must be of class [1] or [2] and (T2, S2) can be of any class. However, if (T2, S2) is of class [3] or if both (T1, S1) and (T2, S2) are of class [2], then r2 must be added to S to produce an a-I2CS. Given a tree T of order n, we root it at an arbitrary vertex that we label v1 . We then label the remaining vertices v2 , . . . , vn using a depth rst search so that if vj is vi s parent, then i > j . For each vertex vi , let P arent[i] equal the subscript of the label of the parent of vi (assume that P arent[1] = 0). The algorithm will build the tree T one edge at a time. At step i, the algorithm builds a graph Gi with vertex set V and designates a root for each maximal connected subtree of Gi . Gi is obtained from Gi1 by composing the subtree rooted at vP arent[ni] with the subtree rooted at vni .

100

In graph Gi there will be a 4place class vector associated to each root vertex. If vk is the root of a subtree Tk in Gi , then the j th entry of its class vector at step i equals the size of the smallest a-I2CS Sk for Tk such that (Tk , Sk ) is of class [j ]. G0 consists of n isolated vertices, each the root of a one vertex tree. The class vector associated with each vertex vk in G0 is [1, , , 0], where is the entry for class [1] and [2], as the degree of an isolated vertex is zero, so it is impossible for a tree-subset pair to be of class [1] or [2] at the start of the algorithm. For classes [0] and [3], we associate the a-I2CSs {vk } and of sizes 1 and 0, respectively. At step i of the algorithm, the only class vector that will change will be the one associated with the vertex vP arent[ni] . This is updated using the table in Figure 3.2 and the recurrences (3.2) - (3.4). Gn1 is the tree T rooted at v1 . Therefore, the j th entry of the class vector associated to v1 is the size of the smallest a-I2CS S of T such that (T, S ) is of class [j ]. If (T, S ) is of class [0] or [1], then S is also an irreversible 2conversion set, but not if (T, S ) is
i (T ) equals the minimum of class [2] or [3], since v1 is not converted by S . Thus, Conv2

## of the rst two entries of the class vector associated to v1 .

i We now have all the ingredients for an algorithm to compute Conv2 (T ) for a tree T .

The input to the algorithm is an nplace vector P arent[1 . . . n] for T , whose ith entry
i (T ). is P arent[i], as dened earlier. The output of the algorithm is the value of Conv2

Every vertex vi has an associated class vector Class[i] whose j th entry is denoted Class[i, j ]. Every class vector is initialized with the vector Class[i] = [1, , , 0]. At step i, where i runs from 0 to n 2, the tree rooted at vP arent[ni] is composed with the tree rooted at vni producing a tree T . The vector Class[P arent[n i]] is updated by a procedure called combine that is derived directly from the recurrences (3.2) - (3.4) summarized in Figure 3.2. Class[P arent[n i], j ] equals the size of the smallest a-I2CS S for T such that the pair (T , S ) is of class [j ]. For example, let T be the composition of a tree T1 rooted at va with a tree T2 rooted at vb . Let S be a minimum a-I2CS for T such that (T , S ) is of class [2]. By relation (3.4), if (T1, S1) is of class [2], then S is the union of the smallest a-I2CS S1 for T1 such that (T1, S1) is of class [3] and the smallest a-I2CS S2 for T2 such that (T2, S2) is of class [0] or

101

[1], or the smallest a-I2CS S2 for T2 such that (T2, S2) is of class [2] or [3], plus the vertex vb . Since Class[a, j ] equals the size of the smallest a-I2CS S1 for T1 such that (T1, S1) is of class [j ], and Class[b, j ] is similarly dened for T2, then Class[a, 2] will be updated to equal the minimum of Class[a, 3] + Class[b, 0], Class[a, 3] + Class[b, 1], Class[a, 3] + Class[b, 2] + 1, and Class[a, 3] + Class[b, 3] + 1. The other values of Class[a, j ] are updated similarly. After step n 1, all of the edges of the tree T rooted at v1 have been included. Therefore, Class[1, j ] equals the size of the smallest a-I2CS S for T such that (T, S ) is
i (T ) will be of class [j ]. We want S to be an irreversible 2conversion set for T , so Conv2

the minimum of Class[1, 0] and Class[1, 1]. An example of the algorithm is illustrated in Figure 3.3.

G0 1

[1, , ,0] [1, , ,0] 8 8 8 8 [1, , ,0] 8 8 [1, , ,0] 8 8 [2, ,1, ] 8 8 [3,2, , ] 8 8

G1 8

G2 [3,2, , ] 8 8

2 4 5

## 3 [1, , ,0] G3 8 8 [1, , ,0] G4 8 8 [4,3, , ] 8 8

i 1 2 3 4 5 Parent[i] 0 1 1 2 2

i (T ). At step i, the root Figure 3.3: An illustration of the algorithm to compute Conv2 vertex of each maximal connected subtree in Gi is denoted with a lled in circle, and the class vector associated to each root vertex at step i is noted next to the vertex. The bold edge denotes the edge added by the composition of the subtree rooted at vP arent[ni] with the subtree rooted at vni . The lled in circles in the lower right tree give the minimum irreversible 2conversion set S for T . Note that (T, S ) is of class [1], as the root vertex is not in S . Also, the minimum of the rst two entries of the class vector associated to the root vertex of G4 = T is the entry associated with class [1].

## Pseudo-code for the algorithm is given below.

i (Parent); procedure Conv2

begin for i:=1 to n do initialize Class[i, 0 . . . 3] to [1, , , 0]; for j:=0 to n-2 do p:=Parent[n-j];

102

combine(Class,p,n-j);
i Conv2 (T ) := min {Class[1,0], Class[1,1]}; i output Conv2 (T ); i ); end(Conv2

procedure combine(Class,a,b); begin Class [0]:= min {Class[a,0]+Class[b,0], Class[a,0]+Class[b,1], Class[a,0]+Class[b,2], Class[a,0]+Class[b,3]+1, Class[a,2]+Class[b,2]+1, Class[a,3]+Class[b,2]+1}; Class [1]:= min {Class[a,1]+Class[b,0], Class[a,1]+Class[b,1], Class[a,1]+Class[b,2], Class[a,1]+Class[b,3]+1, Class[a,2]+Class[b,0], Class[a,2]+Class[b,1], Class[a,2]+Class[b,2]+1, Class[a,2]+Class[b,3]+1}; Class [2]:= min {Class[a,3]+Class[b,0], Class[a,3]+Class[b,1], Class[a,3]+Class[b,2]+1, Class[a,3]+Class[b,3]+1}; Class [3]:= ; for j:=0 to 3 do Class[p,j] = Class [j]; end(combine); Since the procedure combine takes O(1) time to compute, it is clear that the proi runs in O (n) time. To summarize, we have the following theorem. cedure Conv2 i Theorem 3.22 For a tree T of order n, the procedure Conv2 (Parent) computes i (T ) in O (n) time. Conv2 i To extend this algorithm to compute Convk (T ) for k 3, one simply denes addi-

tional classes of trees: one where the root is in S , one where the root is not in S but its degree is at least k, and k classes where the root is not in S and the degree is j , 0 j < k. For a xed k, running the combine procedure takes O(1) time, and the procedure is executed n 1 times, producing an O(n) algorithm.

103

3.3.3

Grids

To recall notation from the previous chapter, Gm,n = Pm Pn is the standard m n grid, the vertices will be denoted vi,j , 1 i m, 1 j n, and there is an edge between vi,j and vk,l if and only if |i k| + |j l | = 1. We will frequently refer to the parity of a vertex vi,j which is identical to the parity (even or odd) of i + j . For simplicity, we will refer to even vertices or odd vertices, instead of vertices of even (odd) parity. We also introduce the circulant grid Cm,n = Pm Cn , which is the standard grid with the edge vi,1vi,n added for every i, 1 i m and the toroidal grid Tm,n = Cm Cn which is the circulant grid with the edge v1,j vm,j added for every j , 1 j n. We will refer to the rows and columns of a grid by Ri = {vi,1 , . . ., vi,n } and C j = {v1,j , . . . , vm,j }. The toroidal grid is 4regular, which allows us to take advantage of some of our earlier results on conversion sets in regular graphs. Proposition 3.23 For the toroidal grid graph Tm,n : 1. Conv4 (Tm,n) =
max{n m/2 , m n/2 }
mn 2

## if m or n is odd if m and n are even

+1

i (T 2. Conv4 m,n ) = Conv4 (Tm,n ) except when m and n are even, in which case i (T Conv4 m,n ) = mn 2 .

5mn/8

E (m, n) =

## 5mn/8 + n/4 if 4 |m and 4|n 11mn/16 m/4 13n/16 + 45/8 if 4 |m and 4 |n

E (m, n) E (m, n 1) + m E (m 1, n 1) + (m + n 1)

## if m and n are even if m is even, n is odd if m and n are odd

m Conv4 (Tm,n )

Proof:

104

1. By Lemma 3.7, S is a 4conversion set in a 4regular graph if and only if V S is independent and S is not. S Ri must be a vertex cover for each Ri , and S C j must be a vertex cover for each C j , so each row must contain at least n/2 positive vertices and each column must contain at least m/2 positive vertices. Hence, Conv4 (Tm,n) max{n m/2 , m n/2 }. (3.5)

If either m or n is odd, we can construct a 4conversion set as follows. Given a row Ri of a grid and a set of vertices S in that row, S is a left (right) cyclic shift of S in row Ri if vi,j S vi ,j 1 (vi ,j +1 ) S for 2 j n (1 j n 1) and vi,n (vi,1 ) S vi ,1 (vi ,n ) S . Assume that n is odd, and let C be a vertex cover for R1 of size n/2 . If m is even, then let C be the right cyclic shift of C in R2, and then let C be the left cyclic shift of C in R3 , and so on. If m is odd, then assume that n m. For the rst n + 2 rows (or n rows if n = m), generate a vertex cover for Rj via a right cyclic shift of the cover for Rj 1 (where C is the vertex cover for R1 ). If m = n, then the cover for Rm is the left cyclic shift of C , and if m = n +2, then the cover for Rm is the right cyclic shift of C . If m > n +2, in Rn+3 , let C be the left cyclic shift of the vertex cover in Rn+2 , and in Rn+4 , let C be the right cyclic shift of C , and continue to alternate cyclic shifts to the left and right so that the cover for row Rm is the right cyclic shift of C . Let S be the union of all of these vertex covers. Since we have assumed that m is odd and that if n is odd, then n m, m n/2 n m/2 . We claim that S forms a 4conversion set of size m n/2 = max{n m/2 , m n/2 }, which together with the lower bound in Equation (3.5) gives us the desired result for the case when m is odd. No vertex in V S has a neighbor in V S in its row, since S is a vertex cover for each row. Also, no vertex in V S has a neighbor in V S in its column, since both of its neighbors in the row are in S , so when the vertex cover in its row is cyclically shifted, a vertex in V S will have a neighbor in S in the row above and below it. Hence, V S is independent. Since m is odd, every vertex cover for C m has two adjacent vertices, so S is not independent.

105

If both m and n are even, then this cyclic shift method for generating a vertex cover for the entire grid checkerboards the grid so that S is also independent. Adding any vertex to S makes it no longer independent, hence Conv4 (Tm,n ) mn/2+1 when m and n are even. To show that Conv4 (Tm,n) = mn/2+1, we claim that there are only two independent sets of size mn/2 in Tm,n , namely, the set of even vertices and the set of odd vertices. To see this, let W be an independent set of size mn/2. Consider the mn/2 sets of pairs of vertices Si,a = {vi,2a1, vi,2a}, where 1 i m and 1 a n/2. Clearly, each set Si,a cannot contain more than one vertex in W , so every set Si,a must contain exactly one vertex in W . Furthermore, consider two sets Si,a and Si+1,a. If the odd vertex in Si,a is in W , then because W is independent, the even vertex in Si+1,a cannot be in W , so the odd vertex in Si+1,a must be in W . By similar arguments, we can show that every vertex in W must be of the same parity, so the only independent sets of Tm,n of size mn/2 are the set of even vertices and the set of odd vertices. Since the complement of each independent set is also independent, there cannot be a 4conversion set for Tm,n of size mn/2 when m and n are both even. 2. For the irreversible case, by Lemma 3.7, we simply remove the requirement that S not be independent. The bound remains the same if either m or n is odd, but if m and n are even, then we do not need to add an extra vertex to the vertex
i (Tm,n ) = mn/2 when m and n are even. cover created as above, so Conv4

3. For the monotone case, by Lemma 3.7, V S must be independent, and S must be isolate-free. Thus, every vertex vi,j S that does not have a neighbor in the vertex cover of Ri must have a neighbor in the vertex cover of C j , and vice versa. Some notation will be helpful. Let G(a, b, c, d) denote the rectangular subgrid of vertices with upper left corner at va,b and lower right corner at vc,d . We will also say that a vertex set A de-isolates a vertex set B in G if G[A B ] has no isolated vertex. We will rst tackle the case where m and n are even. The set of all even If either m or

## vertices S is a vertex cover, but with all vertices isolated.

106

n is a multiple of four (assume that n is a multiple of four), then consider the set S = {v4k+1,4l+4, v4k+3,4l+2 : 0 k < m/4, 0 l < n/4}, and let S = {vm,4l+1 : 0 l < n/4} if m is not a multiple of four. S , S , and S are disjoint and every vertex in S has at least one neighbor in S if m is a multiple of four, and in S S if m is not a multiple of four. If m is a multiple of four, then S S is a vertex cover with no isolated vertex, and |S S | = mn/2 + mn/8 = 5mn/8. If m is not a multiple of four and n is a multiple of four, then S S S is a vertex cover with no isolated vertex, and |S S S | = 5mn/8 + n/4. If neither m nor n is a multiple of four, then let us assume that m and n are of the form m = 4a + 6 and n = 4b + 6, a, b 0. If m = 2, then the set of even vertices S unioned with the set S = {v4k+1,2, v4k+4,1 : 0 k < b} is a vertex cover with no isolated vertices. Let S be the set of even vertices, and let S = {v2,1, v2,3, v2,5, v5,2, v5,4, v5,6}. (S S ) G(1, 1, 6, 6) is a vertex cover with no isolated vertices for G(1, 1, 6, 6). To de-isolate the remaining vertices in the vertex cover S , we use the following construction: Let S = {v4k+10,4l+1, v4k+7,4l+2, v4k+9,4l+4 : 0 k < a, 0 l < b}. For a given k and l , v4k+10,4l+1, v4k+7,4l+2 , and v4k+9,4l+4 de-isolates S in G(4k + 7, 4l + 1, 4k + 10, 4l + 4). Let S = {v4,4l+7, v1,4l+8, v3,4l+10 : 0 l < b}. S de-isolates the

vertex cover for G(1, 4l + 7, 4, 4l + 10) for a xed l . Finally, we are left with the vertex covers in G(5, 4l + 7, 6, 4l + 10) and G(m 1, 7, m, n) to de-isolate. However, v5,4l+7 and v6,4l+10 are already connected to vertices in S and S for

0 l < b, and similarly for v4k+9,m1 and v4k+10,m for 0 k < a. Thus, adding in the vertices S iv = {v5,4l+8 : 0 l < b} {v4k+7,m : 0 k < a} gives a vertex cover S S S S S iv with no isolated vertex. This vertex cover has size:

|S | + |S | + |S | + |S | + |S iv | = mn/2 + 6 + 3[(m 6)(n 2)]/16 +3(n 6)/16 + [(m 6) + (n 6)]/8 = 11mn/16 m/4 13n/16 + 45/8

107

m (Tm,n): Conv4

m (Tm,n ) Conv4

5mn/8

## 5mn/8 + n/4 if 4 |m and 4|n 11mn/16 m/4 13n/16 + 45/8 if 4 |m and 4 |n

Let E (m, n) be the value above for even m and n. If m is even and n is odd, then let S be a minimum isolate-free vertex cover for the m (n 1) subgrid G(1, 2, m, n). Then S = C 1 S is an isolate-free vertex cover for Gm,n of size m + E (m, n 1). Finally, if both m and n are odd, then let S be a minimum isolate-free vertex cover for the (m 1) (n 1) subgrid G(2, 2, m, n). Then S = R1 C 1 S is an isolate-free vertex cover for Gm,n of size E (m 1, n 1) + (m + n 1). Examples of these constructions are given in Figure 3.4.

Figure 3.4: Monotone 4conversion sets for T6,6, T6,7, T6,8, T7,9, and T8,8. The edges on the border are assumed to wrap around the grid.

m (T To get a lower bound for Conv4 m,n ), we will rst prove a result about 1step

conversion sets, that is, conversion sets which convert all of the vertices to positive in a single time step. In general, for a graph G = (V, E ), S V is an j step kconversion set for G if when a kthreshold process is started with V+ (0) = S , all of the vertices in

108

the graph are positive after at most j time steps (i.e., V+ (j ) = V ). For a non-negative
j integer j , let Convk (G) denote the size of the smallest j step kconversion set for G.

For a graph G = (V, E ) and two disjoint subsets of the vertex set A and B, A kdominates B if every vertex in B has at least k neighbors in A. Lemma 3.24 For a graph G = (V, E ) with n vertices: 1. S is a 1step kconversion set if and only if S kdominates V S and no vertex in S is kdominated by V S .
1 2. Convk ( G) kn 2k1 .

Proof: 1. Every vertex in V S will become positive after one time step if and only if every vertex in V S has at least k neighbors in S , or in other words, S kdominates V S . Similarly, no vertices in S can switch to negative, which happens if and only if no vertex in S is kdominated by V S . 2. Let S be a 1step kconversion set for a graph, and let E be the set of edges between vertices in S and vertices in V S . Every vertex in S can be in at most k 1 edges in E , and every vertex in V S must be in at least k edges in E , so (k 1)|S | |E | k|V S |, or
k1 k |S |

|V S |. Thus, k1 2k 1 |S | = |S |, k k

n = |S | + |V S | |S | +

and dividing both sides by (2k 1)/k gives the desired result.

m (T Corollary 3.25 For the toroidal grid graph Tm,n , Conv4 m,n) 4mn/7.

## Proof: Every monotone 4conversion set in a 4regular graph is also a 1step

m (T 1 4conversion set (and vice versa). By Lemma 3.24, Conv4 m,n ) = Conv4 (Tm,n)

4mn/7.

109

Before we nd minimum conversion sets for the standard grid Gm,n , we rst discuss isolate-free vertex covers. Let IF (G) denote the size of the smallest isolate-free vertex cover of G. Lemma 3.26 For the grid graph Gm,n : 1. 5(m 2)(n 2)/9 < IF (Gm,n ). 2. IF (G1,n) = n n/3 . 3.

4k

if n = 3k if n = 3k + 1

IF (G2,n) =

4k + 2

4k + 3 if n = 3k + 2

4. IF (G3,n) = 3n 2 n/2 . 5. IF (Gm,n ) IF (Gm2,n2 ) + (m + n 2) + m/3 + n/3 . Proof: 1. Let S be a minimum isolate-free vertex cover for Gm,n . For every 3 3 subgrid, label the center vertex vc with the number of vertices in the 3 3 subgrid that are in S . If vc S , then one of its neighbors must also be in S (since S is isolate-free). In addition, at most four of the remaining seven vertices can be in V S , or else V S would not be independent, so vc would have a label at least ve. If vc V S , then all of its neighbors must be in S . In addition, either at least one of the other vertices in the 3 3 subgrid is also in S , or none of them are, in which case all of the vertices that are adjacent to a border vertex of the subgrid are in S . Thus, vc either gets labeled with at least ve, or it gets labeled with a four and its four neighbors are labeled with at least six. Thus, the sum of the labels of the internal vertices of the grid (which we will denote L) is at least 5(m 2)(n 2). Each internal vertex in S is counted at most nine times in L. Similarly, each edge vertex in S that is not adjacent to a

110

corner vertex is counted three times, each edge vertex in S that does neighbor a corner is counted at most twice, and each corner vertex in S is counted once. Thus, L < 9|S |, and the result follows. 2. Every vertex in an isolate-free vertex cover must be adjacent to one other vertex in the cover, so two out of every three consecutive vertices in the path must be in the vertex cover. Thus, IF (G1,n) = IF (Pn ) n n/3 , and we achieve equality through the construction shown in Figure 3.5. 3. Let S be a minimum isolate-free vertex cover for G2,n . The rst three columns must contain at least four vertices of S : if there were only three vertices in S in the rst three columns, either V S would not be independent in those rst three columns, or there would be an isolated vertex in S . We can repeat this reasoning for the next three columns, and so on. This completes the proof if n = 3k. If n = 3k + 2, then at least three of the vertices in the last two columns must be in S . If n = 3k + 1, when we get to the nal column, at least one of the vertices must be in S . If only one vertex in C n is in S , then both vertices in C n1 must be in S , and if C n3 C n2 C n1 contains exactly four vertices of S , then both vertices in C n4 must be in S , and so on down to both vertices in C 3 being in S , which means that C 1 C 2 C 3 would contain at least ve vertices of S . Thus,

4k

if n = 3k

IF (G2,n)

4k + 2 if n = 3k + 1 , 4k + 3 if n = 3k + 2

and we achieve equality through the construction shown in Figure 3.5. 4. Let S be an isolate-free vertex cover for G3,n . By the same reasoning as above, the rst two columns must contain at least four vertices in S , and the same is true for the second pair of columns, and so on. If n is odd, then at least one vertex in C n must be in S , so IF (G3,n ) 3n 2 n/2 , and we achieve equality through the construction shown in Figure 3.5. 5. Construct an isolate-free vertex cover for Gm,n as follows. Assume that all of the

111

Figure 3.5: Constructing minimum isolate-free vertex covers for G1,n , G2,n , and G3,n , 5 n 8. vertices in V S are even vertices (so S contains all of the odd vertices), and consider the subgrid G = R1 R2 C 1 C 2 . Every 2 3 (or 3 2) subgrid contains 3 odd vertices (in S ), and these vertices can be de-isolated using one even vertex. Thus, we can de-isolate the odd vertices in R1 R2 using m/3 even vertices and we can de-isolate the odd vertices in C 1 C 2 using n/3 even vertices. It is possible that an even vertex is used in both the cover for R1 R2 and C 1 C 2 , which would reduce the total by one. Therefore, this construction uses either (m + n 2) + m/3 + n/3 1 or (m + n 2) + m/3 + n/3 vertices to produce an isolate-free vertex cover for G , which leaves G(3, 3, m, n) to be covered by an isolate-free vertex cover, and the minimum size of that cover is at most IF (Gm2,n2 ), and the result follows.

The construction above is not necessarily the best possible. See Figure 3.6.

Figure 3.6: The above construction for an isolate-free vertex cover for G8,8 (left) gives a cover of size 43, but there is also an isolate-free vertex cover (right) of size 42. The dotted lines in the construction on the left denote how the vertex cover was built up stage by stage.

112

## Proposition 3.27 For the standard grid graph Gm,n :

i (Gm,n ) = 2m + 2n 4 + (m 2)(n 2)/2 . 1. Conv4 (Gm,n ) = Conv4 m (G 2. IF (Gm,n ) Conv4 m,n ) (2m + 2n 4) + IF (Gm2,n2 ).

Proof: 1. Because all of the vertices on the border of the grid have degree less than 4, they must be in any 4conversion set S . The vertices in the interior of the grid have degree 4, and no two vertices in V S can be neighbors. Hence, |V S | (m 2)(n 2)/2 , corresponding to the set of even non-border vertices or the set of odd non-border vertices. Let V S be the larger of these two sets. It can be shown (as in Corollary 3.8) that every vertex within distance d of any border vertex will be positive for all t d, as long as V (t) remains independent for all t 0, which is guaranteed by the independence of V (0). Thus, the smallest 4conversion set for Gm,n (which is also the smallest irreversible 4conversion set for Gm,n ) has size 2m + 2n 4 + (m 2)(n 2)/2 . 2. A monotone 4conversion set for Gm,n must be an isolate-free vertex cover, so the size of Gm,n is bounded below by IF (Gm,n ). We know that the lower bound is sharp on any grid graph G2,n , but this is trivial, since the only monotone 4conversion set for G2,n is the entire vertex set. We will provide an upper bound
m (G for Conv4 m,n ) by construction. Assume that m and n are both at least three.

The border vertices of the grid will have to be in any monotone 4conversion set S . Let S be a minimum isolate-free vertex cover for G(2, 2, m 1, n 1). S unioned with the border vertices of Gm,n is a monotone 4conversion set for Gm,n of size (2m + 2n 4) + IF (Gm2,n2 ).

The following results on 3conversion sets in grids are derived from work on irreversible and monotone dynamos by Flocchini, et al. ([29], [30]), and from work on minimum feedback sets in grids by Luccio [67].

113

Proposition 3.28 ([29], [30], [67]) For the toroidal grid graph Tm,n and the standard grid graph Gm,n , assume that m n. Then: 1. 2. 3.
(m1)(n1)+1 3 mn+2 3 i Conv3 (Gm,n ) mn 3 (m1)(n1) 3

3m+2n3 4

+5

i Conv3 (Tm,n)

23m+13n5 12

mn+1 2

mn 2

m 6

2 3

## i (T 4. Conv2 m,n ) = i (Gm,n ) = 5. Conv2

The results (1) - (3) come from the work of Flocchini, et al. and Luccio, where they provided constructions of monotone strong dynamos and feedback vertex sets in toroidal grid graphs, which correspond to monotone and irreversible 3conversion sets, respectively. In addition, in the paper of Flocchini, et al., they construct minimum irreversible simple dynamos which are 2conversion sets in grids, giving the results in (4) and (5). With some small modications, their results can also be modied for standard grid graphs (which are no longer 4regular, hence requiring some additional border vertices in S ). Some sample constructions are given in Figure 3.7. We close this section with some results on 2 n and 3 n grids. Theorem 3.29 For the toroidal grid graph Tm,n , the circulant grid graph Cm,n , and the standard grid graph Gm,n : 1.
m Conv2 (G2,n) = Conv2 (G2,n) = n + 1 m Conv2 (C2,n ) = n + 2

Conv2 (C2,n ) = 2.

n+1

if n is odd

n + 2 if n is even

## Conv3 (G2,n) = n + 2 Conv3 (C2,n ) = n + 1

114

(a)

(b)

(c)

Figure 3.7: Some constructions of conversion sets based on work from Flocchini et al., and Luccio. (a) A minimum irreversible 2conversion set for G4,4. (b) A minimum irreversible 3conversion set for G9,9. (c) A monotone 3conversion set for T9,9. 3.
i Conv3 (T3,n ) = n + 1 i (G3,n ) = Conv3

(3n + 1)/2

if n is odd

i Conv3 (C3,n ) =

3n/2

if n is even

4.
(3n + 1)/2

if n is odd

Conv3 (T3,n) =

Conv3 (G3,n) =

## 3n/2 if n is even, n 6 (3n + 2)/2 if n = 2, 4 (3n + 1)/2 if n is odd

(3n + 2)/2 if n is even (3n + 1)/2 if n is odd (3n + 2)/2 if n is even

Conv3 (C3,n ) =

115

5.
m Conv3 (T3,n) =

3(n + 1)/2

if n is odd

## (3n + 2)/2 if n is even

m Conv3 (G3,n) m (C Conv3 3,n )

2n (n + 1)/4

2n (n + 1)/4 + 2

Proof: 1. For S to be a 2conversion set, C j C j +1 cannot be a subset of V S for all j , 1 j < n, as the vertices in these columns would never become positive. In addition, there cannot exist a j , 1 j < n, such that v1,j , v2,j +1 S and v2,j , v1,j +1 V S or vice versa, as those vertices would form a K2,2 with one partite set in S and the other in V S , and those vertices would switch sign at every time step. We will call this arrangement an alternating 4cycle. Assume there is a 2conversion set S in G2,n of size n. There cannot be just one vertex of S in each column, since by our above observations, such vertices would all have to be in the same row, and in that case, every vertex in V S would have exactly one neighbor in S (in the other row) and would therefore never switch to positive. Thus, there must be at least one column with both vertices in S , which also means there must be a column C j with no vertices in S . We will show that this is impossible. Assume there is a column C j with no vertices in S . Clearly, C j 1 must have at least one vertex in S . Either there exists a column C i , i < j , which contains zero or two vertices in S and i is maximal, or there exists no such column. We consider each of these four cases. Case (i): Every column C j , j < j , has exactly one vertex in S . For this case, assume that v1,j S for 1 j < j . At time t = 1, v1,j 1 switches to negative, since v2,j 1 and v1,j are in V S . In addition, v2,j 1 remains negative, since v1,j 1 is its only positive neighbor. Inductively, it can be shown that at time t, t < j , v1,j t becomes negative and v2,j t remains negative. Thus, at time t = j 1, v1,1 becomes negative and v2,1 remains negative. Since both corner

116

vertices are of degree 2, they will never become positive, since each vertex will always have a negative neighbor (namely, each other). Case (ii): Some column C i , i < j 1, has two vertices in S and every column C j , i < j j 1, has exactly one vertex in S . For this case, assume that v1,j S for i j < j . In addition, v2,i S . At time t = 1, v2,i+1 becomes positive, v1,j 1 becomes negative, and the signs of v1,i+1 and v2,j 1 remain unchanged. Thus, the subgrid G(1, i + 1, 2, j 1) at time t = 1 is identical to the subgrid G(1, i, 2, j ) at time t = 0 in the sense that the vertices in the leftmost column are both positive, the vertices in the rightmost column are both negative, and v1,j is positive and v2,j is negative for all j , i +1 < j < j 1. We can continue to repeat this argument, reducing the number of columns in between by two at each time step until either three or four columns remain. In the rst case, we have columns C a1 , C a , and C a+1 with the vertices in C a1 positive, the vertices in C a+1 negative, v1,a positive, and v2,a negative. At the next time step, v2,a becomes positive, v1,a becomes negative, v1,a1 remains positive, and v2,a+1 remains negative. If v1,a+1 or v2,a1 switch signs, then there is an alternating 4cycle. Thus, v1,a+1 and v2,a1 do not switch sign, and we are presented with the same arrangement, with only the signs of v1,a and v2,a reversed. The process continues with v1,a and v2,a alternating signs, so S is not a 2conversion set. Alternatively, we are left, say at time t = r , with four columns, C a , C a+1 , C a+2 , and C a+3 with the vertices in C a positive, the vertices in C a+3 negative, v1,a+1 and v1,a+2 positive, and v2,a+1 and v2,a+2 negative. At time t = r + 1, v2,a+1 becomes positive, v1,a+2 becomes negative, and the signs of v1,a , v1,a+1 , v2,a+2, and v2,a+3 are unchanged. In addition, v1,a+3 must switch to positive, otherwise we have two consecutive negative columns, and the signs of the vertices in those columns will never change. If v2,a remains positive at time t = r +1 , then at time t = r + 2, v1,a+1, v1,a+2 , and v2,a+1 are positive, v1,a+3 and v2,a+2 are negative, and v2,a+3 must be negative or else we have an alternating 4cycle. However,

117

if v2,a+3 is negative, we have the three column arrangement from above. If v2,a remains negative at time t = r + 1, then at time t = r + 2, v1,a+1, v1,a+2, and v2,a are positive, v1,a+3, v2,a+1, and v2,a+2 are negative, and therefore v1,a must be positive and v2,a+3 must be negative in order to avoid alternating 4cycles. This brings us back to the conguration from time t = r . Hence, this process never converges to having all vertices positive. Case (iii): Some column C i , i < j 1, has zero vertices in S and every column C j , i < j j 1, has exactly one vertex in S . For this case, assume that v1,j S for i < j < j , with all other vertices in G(1, i, 2, j ) in V S . At time t = 1, v1,i+1 and v1,j 1 become negative and v2,i+1 and v2,j 1 remain negative, so the path of positive vertices in R1 becomes shorter by two, with the path surrounded by negative vertices on all sides. We can repeat this argument, reducing the length of the path by two at each time step until at time t = r , the path of positive vertices has length zero (in which case there are two consecutive negative columns), or there is a single positive vertex v1,a surrounded by ve negative vertices. At time t = r + 1, v1,a becomes negative, and the three vertices v2,a1 , v2,a, and v2,a+1 remain negative. If either v1,a1 or v1,a+1 remain negative, there will be two consecutive negative columns, so assume they both turn positive at time t = r +1. At time t = r +2, v2,a remains negative, v1,a1 and v1,a+1 become negative again, v1,a becomes positive, and both v2,a1 and v2,a+1 must become negative again, or there would be an alternating 4cycle. Thus, we have returned to the same state for these three columns as at time t = r , and the process repeats again. Hence, the process never converges to having all vertices positive. Case (iv): C j 1 has two positive vertices. Using the same argument in the opposite direction shows that C j +1 has two positive vertices. Thus, for every column with both vertices in V S , there must be two columns adjacent to it with both vertices in S . Thus, if ci denotes the number of columns with i vertices in S , c2 c0 + 1, and since n = c0 + c1 + c2,

118

we get that n 2c2 + c1 1 = |S | 1, so n + 1 |S |. Therefore, Conv2 (G2,n ) n + 1. Let S = R1 {v2,1}. At time t = j , v2,j +1 becomes positive, and no vertices become negative. Hence, V+ (n 1) = V , and S is a monotone 2conversion set of size n + 1. For the circulant grid C2,n , we can apply the same argument to show that any column with zero vertices in S has two columns with two vertices in S adjacent to it. If n is odd, then c2 c0 + 1 again, with equality if and only if C 1 S , C 2 V S , and so on. If n is odd, then Conv2 (C2,n ) n + 1, and we achieve equality by the following construction. Let a =
n+1 2 ,

## and let S = R1 {v2,a}. At

time t = 1, vertices v2,a1 and v2,a+1 become positive, and v2,a becomes negative. At the next time step, v2,a2 , v2,a, and v2,a+2 become positive, and v2,a1 and v2,a+1 become negative. This pattern repeats for a 1 time steps at which point v2,j is positive if and only if j is odd. However, then v2,1 and v2,n are adjacent and positive, and they will never become negative again. Thus, at the next time step, v2,2 and v2,n1 become positive, and so on until the entire grid is positive. Assume that n is even. If c0 = c2, then the columns must alternate C 1 S , C 2 V S , and so on (or vice versa). However, at every time step, the signs of the columns simply alternate. If c0 + 1 = c2, then the only possible values for the ci s are c0 = 1, c2 = 2, and c1 = n 3. Every vertex in S in a column by itself must be in the same row. Assume C 1 has no vertices in S , C 2 and C n have two vertices in S , and v1,j S for 2 j n 1. At time t = 1, C 1 becomes positive, so all of R1 is positive and will remain positive. Also, at time t = 1, v2,1, v2,3, and v2,n1 are positive, and all other vertices in R2 are negative. At the next step, v2,2, v2,4, v2,n2 , and v2,n are positive. At each time step, the size of the set of positive vertices grows by one, but the positive vertices in the second row are all vertices of the same parity. Eventually, all of the odd vertices in R2 will be positive, and all of the even vertices in R2 will be negative, and they will alternate signs, so the system never converges. Thus, c2 c0 +2, which implies that Conv2 (C2,n ) n +2. We achieve

119

equality using the following construction. Let S = R1 {v2,1, v2,n}. V S is cyclefree, and the vertices in S form a cycle. Since C2,n is 3regular, by Proposition 3.9, S is a monotone 2conversion set of size n + 2. The same construction leads
m to a monotone 2conversion set when n is odd, so Conv2 (C2,n ) n + 2 for all n.

For the circulant grid C2,n , if S is a monotone 2conversion set, then by Proposition 3.9, S must have no vertices of degree zero or one in the subgraph induced by S , since C2,n is 3regular. Also, the subgraph induced by V S must be cycle-free. If there is a column C j with no vertices in S , then C j 2 C j 1 C j +1 C j +2 S or else the conversion set will not be monotone. Thus 2c0 c2, or c0 c2 /2. This implies that n = c0 + c1 + c2 c1 + 3c2/2. Since |S | = c1 + 2c2, we get that n |S | c2/2 or n + c2/2 |S |. Let us consider some values for c2. We know from previous arguments that c2 cannot be zero. If c2 = 1, then c0 = 0, in which case all of the other columns have one vertex in S , those vertices in S must all lie in the same row, and the solitary vertex in S in the second row would become negative at time t = 1. If c2 = 2, then c0 cannot equal one, as one column with no vertices in S requires four columns with two vertices in S surrounding it, so c2 > 2 (except in the case of C2,3, but it can be easily veried that c0 = 1 in that case). Thus, either c2 = 2 and c0 = 0 or c2 3. In either case, we get that
m Conv2 (C2,m ) n + 2.

2. If S is a 3conversion set for G2,n, by Corollary 3.8, all of the corner vertices must be in S , and V S must be independent, so no column can have more than one vertex in V S . Hence, Conv3 (G2,n ) n + 2. The set of corner vertices of G2,n plus all of the odd vertices in G2,n is a conversion set of size n +2. For the circulant grid C2,n , since it is 3regular, by Lemma 3.7, it is merely necessary for V S to be independent, and for S to not be independent. Thus, Conv3 (G2,n ) n + 1. If S is the set of even vertices plus any odd vertex, then V S is independent and S is not, so S is a 3conversion set of size n + 1. 3. For the toroidal grid graph T3,n , by Proposition 3.9, S is an irreversible

120

3conversion set if and only if V S is cycle free. Every column must contain a vertex in S , so |S | n. However, if every column has exactly one vertex in S , then every column has two adjacent vertices in V S . Therefore, in every column C j , some vertex in (V S ) C j has a neighbor in (V S ) C j 1 and some vertex in (V S ) C j has a neighbor in (V S ) C j +1. Therefore, the subgraph induced by V S contains a cycle which contains at least one vertex from each
i column in the grid, which is a contradiction. Hence, Conv3 (T3,n) n + 1. Let

S be v1,1 and all of the even vertices in R2 R3 . V S is cycle-free, so S is an irreversible 3conversion set of size n + 1. For the standard grid graph G3,n , if S is an irreversible 3conversion set, S must contain the four corners, since they have degree two. In addition, S must be a vertex cover of R1 and R3 , since all of the non-corner border vertices have degree three. Finally, there cannot be a path in V S connecting two border vertices in V S , as none of the vertices along such a path would ever become positive, since all of the non-border vertices would always have two negative neighbors, and the two border vertices would always have a negative neighbor. So, every path between two border vertices in V S must contain a vertex in R2 in S . If a column C j contains two border vertices in V S , then v2,j must be in S . In addition, we know that v1,j 1 , v1,j +1 , v3,j 1 , and v3,j +1 must be in S , since there cannot be two consecutive border vertices in V S . Let C i , C i+1 , . . . , C j be a maximal collection of columns where each column has two border vertices in S . We can assume that no vertex v2,j , i j j , is in S . To see this, let S be a minimum irreversible 3conversion set that contains v2,j for some j , i j j . S {v2,j } {v2,i1 } is also a minimum irreversible 3conversion set, because any path between two border vertices that contains v2,j also contains v2,i1 . Similarly, S {v2,j } {v2,j +1} is a minimum irreversible 3conversion set. If either v2,i1 or v2,j +1 was already in S , then S was not minimal, since v2,j could be removed. Let C i , C i+1 , . . . , C j be a maximal collection of consecutive columns where each

121

column has one border vertex in S . Since V S must be independent in the border vertices, the border vertices in S will have to alternate rows in consecutive columns. In addition, columns C i1 and C j +1 must have two border vertices in S , since if v1,i is in V S , v1,i1 must be in S , and since the collection of columns is maximal, v3,i1 must also be in S . For every consecutive pair of columns C a and C a+1 in this collection, at least one of v2,a and v2,a+1 must be in S , or else there would be a path of length four between two border vertices in (V S )(C a C a+1 ). Therefore, every column which contains only one vertex in S has two neighboring columns that each contain two vertices in S . If S is minimal, we can assume that no column contains three vertices in S . Thus, if ci is the number of columns with i vertices in S , then c0 = 0, c3 = 0, and |S | = c1 + 2c2. If n is even, then c1 c2 2, and |S | 3c1 + 4. Since c1 (n 2)/2, we get that |S | (3n + 2)/2. If n is odd, then c1 c2 1, and |S | 3c1 + 2. Since c1 (n 1)/2, we get that |S | (3n + 1)/2. If n is odd, letting S be the even vertices of G3,n gives an irreversible 3conversion set of size (3n + 1)/2. If n is even, letting S be the even vertices of G3,n except v2,n , and including v1,n and v3,n gives an irreversible 3conversion set of size (3n + 2)/2. It should be noted at this point that these irreversible 3conversion sets are also 3conversion sets for G3,n . If n is odd, every border vertex will be positive at time t = 1, and the non-border vertices will all eventually become positive. If n is even, every border vertex will be positive at time t = 1 except v2,n , but v2,n1 will be positive at time t = 1, so v2,n will be positive at time t = 2, and the non-border vertices eventually become
i (G all positive. Hence, Conv3 3,n ) = Conv3 (G3,n).

For the circulant grid graph C3,n , we apply the same argument as above, that every column with one vertex in S has two neighboring columns each containing two vertices of S . Again, c0 = 0, c3 = 0, and |S | = c1 + 2c2. If n is even, then c1 c2 , so |S | 3c1 3n/2. If n is odd, then c1 c2 1, and we get that |S | 3c1 + 2 (3n + 1)/2. In both cases, letting S consist of the even vertices in C3,n gives an irreversible 3conversion set of the desired size. If n is odd, then this construction also produces a 3conversion set, since at time t = 1, all of the

122

border vertices are positive, as are v2,1 and v2,n . This construction does not work if n is even, since at each time step the positive and negative vertices alternate sign. Up to rotations and reections, there is only one other set S of size 3n/2 such that every path between two border vertices in V S contains a vertex in S and S is a vertex cover for R1 and R3. Let S be the set: S = {v1,2, v1,4, . . . , v1,2n, v2,1, v2,3, . . . , v2,2n1, v3,1, v3,3, . . . , v3,2n1}. This is an irreversible 3conversion set, but not a 3conversion set, since at time t = 1, every vertex in R1 and R2 switches sign and every vertex in R3 does not. The resulting graph has all of the odd vertices positive and all of the even vertices negative, and those sets switch signs at every time step. Hence, Conv3 (C3,n ) > 3n/2 if n is even. If n is even, then the set of even vertices plus any odd vertex is a 3conversion set for C3,n of size (3n + 2)/2. 4. The only part left to prove is for 3conversion set in toroidal grids. Again, we must avoid cycles in V S , so every column must have at least one vertex in S . First, we will show that every column which has only one vertex in S must have two neighboring columns with 2 vertices in S . Assume that C j is a column with only one vertex in S , and assume without loss of generality that v2,j S . C j 1 and C j +1 must each have a positive vertex in either the rst or third row to avoid having a 4cycle with all vertices negative. Assume that C j 1 has only one vertex in S , and let v1,j 1 S . Now, assume that all of C j +1 is in S . If we show that no 3conversion set can have this arrangement, then no 3conversion set can have any subset of this arrangement, either. At time t = 1, v1,j 1 , v1,j , and v2,j must switch sign. v2,j 1 does not necessarily have to switch sign, but if it remains negative, then C j 1 is a 3cycle of negative vertices which will never become positive. So, assume that v2,j 1 becomes positive. At the next step, all four vertices will switch sign again, returning to their previous states. Hence, these three columns of vertices will never convert to all positive. Assume that no column contains three vertices in S . Then |S | = c1 + 2c2, and,

123

using previous arguments, we can show that |S | (3n + 1)/2 if n is odd, and 3n/2 if n is even, achieving equality if and only if c1 = c2 1 when n is odd, and if and only if c1 = c2 when n is even. If n is odd, then let S be the set of even vertices of T3,n. The corner vertices v1,1 , v3,1, v1,n , and v3,n form a 4cycle and will never become negative. In addition, after one time step, v1,2, v2,1 , v3,2, v1,n1 , v2,n , and v3,n1 become positive and will never switch back, and every other vertex switches sign. Every time step, six additional vertices will become positive and never switch back, so the even vertices form a 3conversion set for T3,n of size (3n + 1)/2 if n is odd. If n is even and greater than four, we can use the following construction. Let S = {v1,1, v2,2, v2,3, v3,3, v4,2, v4,3, v5,2, v6,2, v6,3, . . . , v2,n, v3,n}. The vertices in S form a path, and at time t = 1, every vertex in R2 and R3 will be positive except for v2,2 and v3,n , which will become positive at the next time step. In addition, at time t = 1, v1,2 and v1,n are positive. At time t = 2, all of R2 and R3 will be positive and never switch back, and v1,1, v1,3 , and v1,n1 will be positive, so the rst row will eventually become all positive. If n = 2 or n = 4, it is easily seen that no set of size three will be a 3conversion set for T3,2. Assume that S is a 3conversion set for T3,4 of size six, and assume that C 2 and C 4 contain one vertex of S each. The vertices in S in C 2 and C 4 are either in the same row or in dierent rows. If those vertices are in the same row, assume that v2,2 and v2,4 are in S . Both v2,1 and v2,3 cannot be in S , since otherwise, there would be some cycle in V S consisting of vertices from every column. So, assume that v2,3 S . Then v1,1 and v1,3 must be in S , and we can assume that, up to reection, v3,3 S . At time t = 1, all of R1 will be negative, as will the even vertices in R2 and R3. The odd vertices in R2 and R3 will be positive, and the vertices in R2 and R3 will switch sign at every time step. If neither of v2,1 or v2,3 are in S , then S is the set of even vertices of S , and V S is the set of odd vertices of S , and these will change sign at every time step.

124

If the vertices in S in C 2 and C 4 are in dierent rows, then assume that v1,2 and v3,4 are in S . If both v1,1 and v1,3 are in S , then either v2,1 or v2,3 must be in S to prevent R2 from being all negative. In fact, both must be in S , since if only one was positive, then at time t = 1, all of R2 would be negative. If both are in S , at time t = 1, all of R1 will be positive, as will the even vertices in R2 and R3 , but as above, these will switch sign every time step, as will the odd vertices in R2 and R3. So, assume that each of v1,2 and v3,4 have a neighbor in S . By symmetry, there are two cases: either v1,1 and v3,1 are in S , or we can assume that v1,1 and v3,3 are in S . This rst case is impossible, since it would imply that either v1,2 or v3,4 would have two neighbors in S . In the second case, we must have S = {v1,1, v1,2, v2,1, v2,4, v3,3, v3,4}. After one time step, we have V+ (1) = {v1,1, v1,4, v3,1, v3,4}, which means that all of the vertices in C 2 and C 3 are negative and will never become positive. Thus, for n = 2 and n = 4, we have that Conv3 (T3,n) > 3n/2. We will provide a construction for these cases in the next part of the proof.

5. For monotone 3conversion sets S in T3,n , we have the same lower bound as above. To achieve the lower bound, n/2 columns contain one vertex in S , n/2 columns contain two vertices in S , and no two columns containing a single vertex in S are adjacent. However, assume that there is a vertex in S in a column by itself. Both of its neighbors in the same row must be in S , or else the vertex will switch to negative at time t = 1. However, if this is the case for every vertex in S in a column by itself, then consider the vertices in V S in these columns. At least one of them will have a neighbor in V S in the preceding and following column, which means there is a cycle in V S passing through all of the columns of T3,n .

Assume we allow one column to contain three vertices in S . Consider the following construction. Let n = 4k + j , where j and k are non-negative integers and

125

## 0 j 3. Let S = {v1,4a+1, v2,4a+1, v2,4a+2, v1,4a+3, v2,4a+3, v1,4a+4 : 0 a < k}.

{v1,4k+1, v2,4k+1}

if j = 0 if j = 1 if j = 2 if j = 3

Let S =

## {v1,4k+1, v2,4k+1, v2,4k+2} {v 1,4k+1 , v2,4k+1 , v2,4k+2 , v1,4k+3 , v2,4k+3}

Let S = {v3,1} S S . Every vertex in S is in a cycle in the subgraph induced by S , so no vertex in S will ever become negative. At time t = 1, every vertex in R1 R2 becomes positive. Over the next several time steps, the remaining vertices in R3 become positive monotonically. S is a 3conversion set of size 3(n + 1)/2 if n is odd, and of size (3n + 2)/2 if n is even. S is also a monotone conversion set so:
m (T3,n) = Conv3

3(n + 1)/2

if n is odd

## (3n + 2)/2 if n is even

For the standard and circulant grid graphs G3,n and C3,n , if S is a monotone 3conversion set, then S is a vertex cover for the rst and third rows. In addition, there cannot be a path in V S joining border vertices in V S . If v is a vertex in S with no other vertices in S in the same column, then if it is in the second row, both of its neighbors in R2 must be in S , and all four of the border vertices in the adjacent columns must be in S , since V S is independent. Two consecutive columns cannot have single vertices in S , as there would be a path joining border vertices in V S . In addition, there cannot be two columns C j 1 and C j +1 with a single vertex in S each unless all of C j is in S . To see this, assume that v1,j 1 and v1,j +1 are in S . Then v3,j must be in S because V S is independent on the border vertices. In addition, v2,j must be in S , or else there would be a path in V S between v3,j 1 and v3,j +1 . However, if v2,j is in S , then v3,j must be in S or else S would not be a monotone 3conversion set. If v1,j 1 and v3,j +1 are in S , then v1,j and v3,j must be in S for V S to be independent on the border vertices, and v2,j must be in S or else there would be a path in V S between v1,j +1 and v3,j 1 . For now, let us assume that no column is completely contained in S . Let v1,j be

126

a vertex in S with no other vertices in S in that column. Then either v1,j 1 or v1,j +1 must be in S . Assume that v1,j 1 is in S . v3,j +1 must be in S since v3,j is not. In addition, v2,j +1 must be in S , otherwise v2,j would have three neighbors in V S . v1,j +2 must be in S because v1,j +1 is not, and v2,j +2 must be in S so that v2,j +1 does not have three neighbors in V S . Finally, the only restriction we have on the next column is that v3,j +3 has to be in S because v3,j +2 is not. Provided that v1,j 1 S , another column containing a single vertex in S is at least three columns away. If v1,j 1 is not in S , then v1,j +1 and v3,j +1 must be in S . v3,j +2 must be in S or else v3,j +1 is isolated, and either v1,j +2 or v2,j +2 must be in S , or else there would be a path in V S between v3,j and v1,j +2 . By our argument the proof of (3), we can assume that v2,j +2 is in S . Then, v1,j +3 must be in S because v1,j +2 is not, and v2,j +3 must be in S or else v2,j +2 would have three neighbors in V S . Finally, the only restriction we have on the next column is that v3,j +4 must be in S because v3,j +3 is not. Hence, if v1,j 1 S , then another column containing a single vertex in S is at least four columns away. Therefore, assuming no column contains three vertices in S , each column containing only one vertex in S has at least three columns to its right and left that contain at least two vertices in S , except for possibly one column which has only two columns to its left or right containing two vertices in S . In addition, if a column contains three vertices in S , then the three columns to its left and right must each contain at least four vertices in S . Therefore, every set of four consecutive columns must contain at least seven vertices in S (except one group of
m (G four which can contain six). So, for n 4, Conv3 3,n ) 2n (n + 1)/4 and m Conv3 (C3,n ) 2n (n + 1)/4 .

The argument above suggests a construction for building monotone 3conversion sets for G3,n and C3,n . Consider the following constructions: S0 = {v3,1, v1,2, v2,2, v2,3, v3,3}, S0 C3,3 S1 = {v1,1, v1,2, v3,2, v2,3, v3,3, v1,4, v2,4}, S1 C3,4

127

## S2 = {v3,1, v1,2, v3,2, v1,3, v2,3, v2,4, v3,4}, S2 C3,4

S0, S1, S2 when appended side by side produce a monotone 3conversion set for C3,11, and additional copies of S1 , S2 can be added to the right side to get a monotone 3conversion set for C3,11+8k which achieves the lower bound above. In addition, k copies of S1 and S2 appended side by side would form a monotone 3conversion set for C3,4k , and by adding the corner vertices not already included, one would form a monotone 3conversion set for G3,4k . In general, taking a contiguous subset of n columns from a suciently long string of S0, S1, S2, S1, S2, . . . and adding in possibly an additional vertex of S to the rst and/or last column to deal with border eects (i.e., corners in the standard grid and getting things to match up properly in the circulant grid) forms a monotone 3conversion set for G3,n or C3,n .

Some of the conversion sets constructed in the proofs above are shown in Figure 3.8.

3.3.4

## Lower Bounds on Convk (G)

i ( G) k , For the irreversible threshold process, we have the trivial lower bound Convk

and there are several graphs which achieve this bound. For monotone conversion sets, we can achieve a considerably stronger result.
m (G) n/k , and this bound is Theorem 3.30 For a graph G on n vertices, Convk

asymptotically sharp.

Proof: Assume that S is a monotone kconversion set for G, and assume that the transient length of this process is T . We can partition V into T + 1 sets V = V0 V1 VT such that Vi is the set of vertices which become positive at time t = i, with S = V0. Let ni = |Vi|, and let Ei,j be the number of edges between vertices in Vi and vertices in Vj .

128

## (a) (b) (c)

(d)

(e)

(f)

(g)

(h)

Figure 3.8: Minimum conversion sets (c.s.) for various 2 n and 3 n grids. (a) A monotone 2c.s. for G2,5. (b) A 2c.s. for C2,5 . (c) A 3c.s. for C2,5 . (d) An irreversible 3c.s. for T3,5. (e) An irreversible 3c.s. for C3,6 . (f) A 3c.s. for T3,6. (g) A monotone 3c.s. for T3,6. (h) A monotone 3c.s. for C3,11 . The dotted boxes separate S0 , S1 , and S2 , described in the proof. All edges that extend beyond the border of the grid are assumed to wrap around to the opposite side. If v Vi , then it cannot have k or more neighbors in Vi+1 Vi+2 VT , or else v would turn back to negative at time t = i + 1. Also, v must have at least k neighbors in V0 V1 Vi1 in order for it to turn positive at time t = i. For all i, we can write out the following inequalities:

Ei,j
j =i+1 i1

(k 1)ni kni

Ei,j
j =0

## Note that Ei,j = Ej,i, so:

T

kni
i=1

T i1

Ei,j
i=1 j =0 T i1

=
i=1 j =0

Ej,i

129

=
i=0 j =i+1 T

Ei,j (k 1)ni
i=0

To summarize, we have:

k(n1 + + nT ) (k 1)(n0 + n1 + + nT ) 0 kn0 (n0 + n1 + nT ) n/k n0 = |S | To show that this lower bound is asymptotically sharp, we consider the following construction for a given k. Let P be a set of m vertices P = {v1, . . . , vm }, where vi and vj are adjacent if and only if |i j | < k. Let S be a collection of k 1 additional vertices S = {s1 , . . . , sk1}, and vi is adjacent to sj if and only if i + j k. Every vertex in S is adjacent to at most k 1 vertices in P , and vertex vi is adjacent to k i vertices in S . Let T be a collection of
m k1

graph such that every vertex in P is adjacent to exactly one vertex in T , and no vertex in T is adjacent to more than k 1 vertices in P . The construction described above is shown in Figure 3.9.

Figure 3.9: Constructing a minimum monotone conversion set. For the example above, m = 9 and k = 4. For ease in viewing, the vertices in S are s3 , s2 , and s1 from left to right. S T is a monotone 4conversion set of size six for a graph on 15 vertices, and as |P | and |T | increase, the ratio |S T |/|S T P | will approach 1/4. For the graph constructed above, S T is a monotone kconversion set. At time t = 0, v1 has k 1 positive neighbors in S and one positive neighbor in T , so it will become positive at time t = 1. In addition, no vertex in S T has more than k 1 negative neighbors, so no vertex in S T will become negative. We can show by

130

induction that at time t = k, V+ (k) = S T {v1, v2, . . . , vk }, since at time t = r 1, vr has k 1 positive neighbors in S {v1, v2, . . . , vr1}, namely s1 , s2, . . . , skr and v1 , v2, . . . , vr1, and a positive neighbor in T , so vr will become positive at time t = r . In addition, every vertex vi V+ (r 1) has at most k 1 negative neighbors, since its only negative neighbors would be vr+1 , vr+2, . . . , vr , where r = min{r + (k 1), k}. Therefore, all of the vertices are positive at time t = m. In addition, it is easy to see that S T is a minimum monotone kconversion set, since every kconversion set must contain S T . The ratio of the size of the monotone kconversion set to the size of the vertex set is: |S T | |S T P | = = (k 1) + km 1 (k 1) + km 1 + m (k 1) + (k 1) +
m k1 mk k1

## We will now prove a similar result concerning 2step kconversion sets.

2 (G) n/k , and this bound is Proposition 3.31 For a graph G on n vertices, Convk

asymptotically sharp. Proof: Let S be a 2step kconversion set for G. Every vertex is positive at time t = 2, and we can partition V by the sign of each vertex at time t = 0 and at time t = 1. V0 = {vi : xi (0) = 1, xi (1) = 1} V1 = {vi : xi (0) = 1, xi (1) = +1} V2 = {vi : xi (0) = +1, xi (1) = 1} V3 = {vi : xi (0) = +1, xi (1) = +1} Note that V2 V3 = S . In addition, let ni = |Vi| and let Ei,j represent the number of edges between vertices in Vi and Vj . We shall show the following:

131

kn0 E0,1 + E0,3 kn1 E1,2 + E1,3 (k 1)n1 E0,1 + E1,2 (k 1)n3 E0,3 + E1,3

## (3.6) (3.7) (3.8) (3.9)

To see (3.6), note that at time t = 2, every vertex in V0 becomes positive, so each vertex in V0 must have at least k neighbors in V1 V3. The explanation of (3.7) is similar. To see (3.8), at time t = 2, no vertex in V1 becomes negative, so no vertex in V1 can have more than k 1 neighbors in V0 V2. The explanation of (3.9) is similar. We next show that n0 + n1 (k 1)(n2 + n3 ). Combining (3.6) and (3.7), we get that k(n0 + n1 ) E0,1 + E0,3 + E1,2 + E1,3. Combining (3.8) and (3.9) gives us that E0,1 + E0,3 + E1,2 + E1,3 (k 1)(n1 + n3 ). Putting these two inequalities together gives us that k(n0 + n1 ) (k 1)(n1 + n3 ), or kn0 + n1 (k 1)n3. The left hand side of the inequality is at least n0 + n1 , and the right hand side is at most (k 1)(n2 + n3 ), and our result is proven, as: n = n0 + n1 + n2 + n3 (k 1)(n2 + n3 ) + n2 + n3 = k(n2 + n3 ) = k |S | Hence |S | n/k. To show that this lower bound is asymptotically sharp, we consider the following construction for a given k. Let m k, and begin with a Kk1,m , with S and P being the partite sets of size k 1 and m, respectively. In addition, let T be a collection of
m k1

additional vertices and add m edges to the graph such that every

vertex in P is adjacent to exactly one vertex in T , and no vertex in T is adjacent to more than k 1 vertices in P . The construction described above is shown in Figure 3.10. For the graph constructed above, S T is a 2step kconversion set. At time t = 1, all of the vertices in P become positive, all of the vertices in S become negative, and

132

Figure 3.10: Constructing a minimum 2step conversion set. For the example above, m = 9 and k = 4. S T is a 2step 4conversion set of size six for a graph on 15 vertices, and as |P | and |T | increase, the ratio |S T |/|S T P | will approach 1/4. the vertices in T remain positive since they have at most k 1 neighbors in P . At time t = 2, every vertex in P has only k 1 negative neighbors in S , so no vertex in P switches sign, but every vertex in S has m positive neighbors, and m k, so all of the vertices in S become positive. S T is also a minimum kconversion set, since any kconversion set must contain T . If some vertex in S is not positive, then no vertex in P will ever become positive unless it was in V+ (0). The ratio of the size of the 2step kconversion set to the size of the vertex set is: |S T | |S T P | = = (k 1) + m/(k 1) (k 1) + m/(k 1) + m (k 1) + km 1 . mk (k 1) + k1

## Letting m , we see that this ratio approaches 1/k.

By combining the constructions from the previous two proofs, for any integers j and k greater than two, we can construct an innite class of graphs with minimum j step kconversion sets of size approaching |V |/k as |V | grows large. This suggests the following conjecture. Conjecture 3.32 For a graph G on n vertices, Convk (G) n/k, and this bound is asymptotically sharp. To compare with majority processes, in [11] and [80], Berger and Peleg show that depending on the choice of rules to break ties, there are graphs with constant size

133 dynamos or monotone dynamos of size ( n). We close this section with a lower bound for irreversible conversion set sizes for r regular graphs, using a method suggested by Eli Berger [12].

## i (G) (1 Proposition 3.33 If G is an r regular graph with n vertices, Convk

r 2k )n

for k r 2k.

Proof: We dene a slightly dierent method for updating an irreversible kthreshold network. Instead of switching every negative vertex with k or more positive neighbors simultaneously, at each time step, we pick any negative vertex with k or more positive neighbors and switch it to positive, and repeat this process until no more vertices can be switched. If S is an irreversible kconversion set under the normal update rule and St is the set of vertices which become positive at time t, then under the new update rule, one can switch all of the vertices in S1 one at a time, then the vertices in S2 , and so on. Therefore, if S is an irreversible kconversion set under the normal update rule, S will also be an irreversible kconversion set under this new update rule. Dene the energy of a network to be the number of edges between vertices of opposite sign. Let E (t) be the energy of the network at time t. For every vertex that we switch from negative to positive, we lose an amount of energy of size at least k and create an amount of energy of size at most r k. Hence, switching a vertex from negative to positive reduces the amount of energy in the network by at least 2k r , so E (t + 1) + (2k r) E (t). If S is an irreversible kconversion set, then E (n |S |) = 0. Therefore, (n |S |)(2k r ) E (0), or n |S | + so n |S | +
r |S | 2kr E (0) 2kr .

2 k |S | 2kr ,

and |S | (1

r 2k )n.

2
If we con-

## This lower bound also applies to the standard threshold process.

sider 4conversion on the toroidal grid Tm,n , this result provides a sharp bound
i (Conv4 (Tm,n ) mn/2) for irreversible 4conversion sets when m and n are even,

and a sharp bound for 4conversion sets when m and n are odd.

134

3.4

## Threshold Processes in Digraphs

We can dene threshold processes for digraphs as well as for graphs. For a kthreshold process in a digraph D = (V, A), at each time step a vertex vj changes sign if and only if k or more of the vertices in vj s in-neighborhood have the opposite sign. All of the questions regarding conversion sets in graphs can be asked for conversion sets in digraphs, although there is no longer a guarantee of a polynomial transient length for the process, nor can we guarantee that the process ends in a xed point or a 2cycle. Consider the digraph which consists of directed cycles of lengths p1 , p2, . . ., pk that intersect at a single vertex v , where pi is the ith largest prime number. Consider the 1threshold process in this digraph (i.e., a vertex switches sign if any of its in-neighbors have the opposite sign) that begins with every vertex negative except v . This process has a period of N = p1p2 . . . pk , and a corollary of the Prime Number Theorem shows that ek < N ln(ln(N )) << N for suciently large N . The concept of 1conversion sets is trivial in graphs, but not necessarily in digraphs. Let S be a 1conversion set for a digraph D = (V, A). All of the vertices in a strong component of S must have the same sign at all times in order for the system not to oscillate. Therefore, we can discuss negative and positive strong components in D, and S will be a union of strong components in D. For a digraph D we construct the condensation of D (denoted D ) as follows. The vertices of D represent the strong components of D, and we will denote them by V (D) = {SC1, SC2, . . . , SCm}. There is an arc from SCi to SCj in D if and only if there is an arc in D from a vertex in SCi to a vertex in SCj . If SCi has no in-neighbors in D , then SCi S , or the strong component will never become positive, so we can condense all of the strong components with no in-neighbors into a single vertex S . If there is a vertex v in some strong component SCi such that there is no arc from a vertex outside of SCi to v , then not only is SCi S , but every strong component that has a path to SCi in D must be in S . If SCi is not in S , then at some time t, some vertices in SCi will become positive, but v will not become positive at time t, so that strong component will oscillate. If SCi is in S and there is a
2

135

path from SCj to SCi and SCj is not in S , then at some time t, some vertices in SCi will become negative and v will not. Thus, for now, let us assume that every vertex not in S has an in-neighbor outside of its strong component. For a vertex v SCi , dene a component path from SCj of length t to be a path w0w1 . . . wt, where w0 SCj , wt = v , and every vertex wi is in a distinct strong component. Proposition 3.34 For a digraph D = (V, A), S V is a monotone 1conversion set if and only if: 1. There is no arc from a vertex in V S to a vertex in S . 2. d(S, v ) is nite for all vertices v and if v and w are vertices in the same strong component, then d(S, v ) = d(S, w ). 3. If (v, w) A, then d(S, v ) d(S, w ). Proof: : If there is an arc from a vertex in V S to a vertex in S , then a vertex in S will become negative at time t = 1, so S is not a monotone conversion set. It can be easily shown by induction that every vertex v V S switches from negative to positive for the rst time at time t = d(S, v ). Therefore, if there is no path from a vertex in S to a vertex v V S (i.e., d(S, v ) is not nite), then v will never become positive. If there are two vertices v and w in the same strong component such that d(S, v ) < d(S, w ), then v would become positive at time t = d(S, v ), but w would not, so that strong component would oscillate. In fact, condition (2) is necessary for any 1conversion set. If there exist vertices v and w such that (v, w) A and d(S, v ) > d(S, w ), then at time t = d(S, w ), w becomes positive for the rst time. However, v V (d(S, w )), so w becomes negative again at time t = d(S, w ) + 1, so S is not a monotone 1conversion set. : Let S be a vertex set that satises conditions (1) - (3). To show that S is a monotone 1conversion set, we must show that every vertex eventually becomes positive, and once a vertex becomes positive, it remains positive. The vertices of

136

S = V+ (0) are positive at time t = 0, and by condition (1), no vertex in S has a negative in-neighbor, so the vertices in S will always be positive. Because d(S, v ) is nite for all vertices v , there is a component path from S to every vertex in V S . Because d(S, v ) = d(S, w ) for all vertices v and w in the same strong component, all of the vertices in the same strong component will become positive at the same time. Let w be a vertex in V S that switches from positive back to negative at time t > 0. Of all vertices in V S that become negative again, assume that w switches back rst. Therefore, w must have an in-neighbor v such that d(S, v ) t, but this contradicts condition (3), since d(S, w ) < t. Therefore, S is a monotone 1conversion set.2

3.5

Open Problems

There are several questions that would provide avenues for further research. 1. We would like a characterization of minimum conversion sets for all complete multipartite graphs and trees, as well as other classes of graphs (chordal graphs, interval graphs, planar graphs, etc.), or possibly algorithms for nding such sets. 2. We would like to know the complexity of the (IR)2 CS problem. 3. In our work, updates to the vertices occur in parallel at each time step. We could update individual vertices serially, which would certainly have an eect on the dynamics of the network. In addition, we have considered a deterministic update rule. In [43] and [44], Hassin and Peleg replace the deterministic update rule with a random one, where the probability that a vertex switches signs is equal to the fraction of its neighbors with the opposite sign. We could also replace this with any probability function, perhaps one based on some threshold k (for example, a vertex switches sign with probability i/k where i is the number of neighbors with the opposite sign: if i k the vertex switches sign automatically). 4. There is certainly more work to be done for conversion sets in digraphs. We discussed 1conversion, but other possibilities could be pursued. What about conversion sets in random digraphs? In addition, Homan and Latan e [84] have suggested the

137

following model for opinion formulation. In a digraph D, for every t 0, every vertex vi V has an opinion Oi (t) {1, +1} and a condence in that opinion ci (t) 0. The update rule is as follows. A vertex vi broadcasts its opinion at time t if ci (t) , where denotes a non-negative integer condence threshold. At time t, if more than k of vi s in-neighbors are broadcasting the opposite opinion, then Oi (t + 1) = Oi (t) and ci (t + 1) = 0. If not, then Oi (t + 1) = Oi (t) and ci (t + 1) = ci(t) + 1. This model includes the assumption that the longer no one publicly disagrees with someones opinion, the more certain of the opinion that person becomes. However, if the person switches opinions, it takes some time before the person has the condence to state their opinion publicly. Some results for this model have been proven [84], but we leave a further investigation of this model for another time. 5. Mustafa and Pekecs concept of the democratic consensus computer for majority networks [73] has an analog in threshold processes. Which graphs will always converge to the majority opinion globally under a kthreshold process? 6. In majority networks, a set of vertices S is a drawing set if when a majority process is started with the vertices of S positive, then the set of positive vertices is of size at least |V | for some constant > 0 when the system reaches its xed point or 2cycle [80]. There is an analog for this in threshold networks as well. A set of vertices is a kdrawing set if when a kthreshold process is started with the vertices of S positive, then the set of positive vertices is of size at least |V | for some constant > 0 when the system reaches its xed point or 2cycle. Although kdrawing sets have not been studied in great detail, they provide an interesting direction for further research.

138

## Chapter 4 Search Structures for Protein Sequence Libraries

4.1

Introduction

Fueled by its applicability to the elds of medicine and biology and to projects such as mapping the human genome and due to advancements in technology that have made previously intractable problems feasible, research into problems in computational biology has exploded over the past decade. This chapter will concentrate on problems involving the analysis of DNA or amino acid sequences, although there are scores of other problems in biology for which techniques from discrete math and computer science have had a signicant impact (see [40], [86], [92]). A single strand of DNA or RNA is a sequence of nucleotides, which consist of a sugar (2-deoxyribose for DNA, ribose for RNA), a phosphate group, and one of four bases, adenine, cytosine, guanine, and thymine (uracil replaces thymine in RNA), which are abbreviated A, C, G, and T (U). Thus, a strand of DNA or RNA can be described by its sequence of bases (e.g., ACGTACAC. . . ). Similarly, the proteins generated from these DNA strands are chains of amino acids, of which twenty appear in most organisms. Hence, DNA sequences and amino acid sequences can be viewed as sequences over a four-letter and twenty-letter alphabet, respectively. As new DNA, RNA, and protein sequences are discovered, many are added to sequence libraries such as GenBank (maintained by the National Center for Biotechnology Information) [8] and protein sequence libraries such as SWISS-PROT and TrEMBL (maintained by the Swiss Institute for Bioinformatics and the European Molecular Biology Laboratory, respectively). These libraries are immense; as of June 2000, GenBank contains approximately 8.6 billion bases in seven million sequence records, and the June 2000 release of TrEMBL contains 351,834 sequence entries, comprising 100,069,442

139

amino acids. Many biologists who discover new sequences compare those sequences against these libraries to nd other similar sequences, as similarity in sequence often implies a similarity in function, physical structure, or genetic heritage. An excellent example of an application of sequence analysis in biological research involved the discovery of the section of the genome which contains the gene whose mutation often causes cystic brosis (CF) [83]. The protein produced by this section of the genome (which they called the cystic brosis transmembrane conductance regulator, or CFTR) was compared to the protein sequences in the Protein Identication Resource (PIR) library. Most of the similar sequences that were discovered were contained in proteins involved in the transport of ions across cell membranes. One similar sequence came from a protein responsible for the transport of eye pigment molecules in fruit ies, while another similar protein was involved in vitamin B12 transport in the bacteria Eschericia coli. The information gained from the sequence analysis combined with other data helped the researchers conclude that mutations in CFTR were directly responsible for CF. In addition, the information from the sequence analysis helped researchers to develop theories about the exact biochemical causes of cystic brosis. When this research was done, the PIR library was small enough so that the CFTR sequence could be compared to every sequence in the library using the most accurate comparison method known at that time, a method that took time on the order of the product of the lengths of the two sequences being compared. We will describe this method in the next section. However, considering the current size of these libraries, such a comparison takes quite a long time. To remedy this, heuristics for the comparison method have been developed to speed up searches ([3], [4], [78]). However, searches that use these heuristics can potentially miss similar sequences in the library that would have been detected using slower, non-heuristic methods. In this chapter, we discuss a method for building an index structure to speed up searches through a library while allowing a slower, more accurate comparison method to be used. Dominating sets play the role of sets of representatives for the library. A new sequence is rst compared against a small set of representative sequences. These comparisons help determine which sections of the library should continue to be searched,

140

and then the new sequence is compared against sets of representative sequences for each section still being searched, and so on. This index structure can be built for any library of objects with a metric to compare objects in the library. We analyze the expected time to build this index structure and the space necessary to store it, and also determine the expected increase in speed of searches through restructured libraries. We will exhibit the performance of this index structure by restructuring subsets of the SWISS-PROT amino acid sequence library.

4.2

Sequence Comparison

To determine the similarity of two DNA or amino acid sequences, one can consider the number of mutations in the sequence that would be necessary to transform one sequence to another. The fewer the mutations, the more similar the sequences. The types of mutations we will consider are substitutions of one nucleotide for another (e.g., ATGCGA ATGCGT) and insertions or deletions of nucleotides (e.g., ACTGCG ACTGG). Since we cannot know the common sequence that two sequences derive from (or if there is such a sequence), we cannot distinguish between insertions or deletions; if we have two related sequences AGCT and AGT, we do not know whether the rst sequence derived from the second due to an insertion of a C or if the second sequence derived from the rst due to the deletion of a C. Thus, the term indels will refer to any insertion or deletion. Assume we have a nite alphabet = {w1, w2, . . . , wp}, and let = { }, where will denote a space representing an indel in a sequence of characters from . Let S = s1 s2 . . . sk be a sequence of length k of characters from , and let S = s1 s2 . . . sn be a sequence of length n of characters from . S is an augmentation of S if when all of the spaces are deleted from S , then the resulting sequence is identical to S . For

example, S = AT TC A is an augmentation of the sequence S = ATTCA. Of course, if S is an augmentation of S , then the length of S is greater than or equal to the length of S . Assume that A and B are two sequences of length at most n of characters from

141

. Let A = a1 a2 . . . an and B = b1b2 . . . bn be augmentations of length n of A and B , respectively. The pair (A, B ) is an alignment of A and B if there exists no j , 1 j n, such that aj = bj = . If A and B are sequences of length n, then we will say that the length of the alignment (A, B ) is also n. For example, if A = ATG and B = ACT, then A1 = A TG and A2 = AT G are augmentations of A , and B1 = ACT and B2 = AC T are augmentations of B . (A1, B1 ) is an alignment of A and B of length four, but (A2, B2) is not, as A2 and B2 both have a space in the third position. To present an alignment (A, B ), we will write one sequence above the other, where characters and spaces in the same position in the two sequences will appear in the same column. For example, (A1, B1) = A A C T T G .

If (A, B ) is an alignment, then we say that characters or spaces in the same position in the two sequences are aligned with one another. In the example above, the A in A1 is aligned with the A in B1 in the rst column, a space in A1 is aligned with the C in B1 in the second column, and so on.

4.2.1

Scoring Alignments

Let (A, B ) be an alignment of length n of two sequences A and B from a nite alphabet = {w1, w2, . . . , wp}. Let M be a p p scoring matrix whose (i, j ) entry Mi,j is interpreted as some measure of similarity of the characters wi and wj . The greater the value of Mi,j , the more similar that wi and wj are. We will discuss several dierent types of scoring matrices in the next section. We associate a score Score(A, B ) to the alignment (A, B ) as follows. If A = a1 a2 . . . an and B = b1b2 . . . bn , where the ai and bi represent spaces or characters in A and B , then Score(A, B ) =

n j =1

s(aj , bj ), where:

s(aj , bj ) =

## if aj or bj is a space (but not both) otherwise

M (aj , bj )

The parameter g 0 is called a gap penalty. We will dene a gap to be any maximal, consecutive run of spaces in an alignment. If there is a gap in an alignment consisting of

142

more than one consecutive space, it is more likely that the gap was the result of a single mutation event, rather than several individual consecutive mutations. To take this into account, the constant gap penalty can replaced by an ane gap penalty, where a gap of length k incurs a penalty of g (k) = + k, , 0. Here, there is a penalty of for starting a gap, plus for each space in the gap. Typically, < , representing the greater likelihood of a gap representing a single mutation event as opposed to several individual consecutive indels. For our rst example, we will use a constant gap penalty g = 1 and the scoring matrix M (aj , bj ) =
1

if aj = bj

2 if aj = bj

Let S1 = ATTCGTA and S2 = ATATGGT be two nucleotide sequences, and consider two possible alignments of these sequences. A A T T T A C T G G T G A T Score 5

A A

T T A

T T

C G

G G

T T

Score +1

The rst alignment has three matched pairs of characters and four unmatched pairs of characters, for a score of 3(+1) + 4(2) = 5. By adding a space to S1 and S2 , the second alignment has ve matched pairs, one unmatched pair, and two spaces, for a score of 5(+1) + 1(2) + 2(1) = +1. One may wonder if the second alignment is the highest scoring alignment for these two sequences. We dene the global similarity of two sequences A and B to be the maximum score of an alignment of A and B. An alignment of two sequences is optimal if the score of the alignment is the maximum score of an alignment of the two sequences. Two sequences may not be similar under a measure of global similarity, but they may have highly similar substrings, where we dene a substring of a sequence S to be a sequence formed by consecutive characters of S , in the same order as they appear in S . If S = s1 s2 . . . sn and S is a non-empty substring of S , then S = si si+1 . . . sj 1 sj

143

for some i and j , 1 i j n. We dene the local similarity of two sequences A and B to be the maximum score of an alignment of A and B , where A and B are substrings of A and B , respectively. An alignment (A , B ) of A and B is called a local alignment of A and B. If the score of the alignment (A , B ) is the maximum score among all alignments of substrings of A and B, then we say that (A , B ) is an optimal local alignment of A and B. In many applications in biology, nding similar substrings is more useful than nding sequences that are similar globally. For example, many protein sequences contain structural and functional subunits called motifs and domains, respectively, that are highly similar in a variety of dierent proteins. Such highly similar regions would not be detected by a global comparison of two sequences, but would be detected by a local comparison. We will let S (A, B ) denote the (global or local) similarity score of two sequences A and B . Dynamic programming algorithms have been developed to compute the global and local similarity scores for a pair of sequences. An algorithm for nding optimal global alignments was rst developed by Needleman and Wunsch [74] in 1970 for a constant gap penalty function. Smith and Waterman [87] developed algorithms to compute local similarity scores with an ane gap penalty function and to recover the optimal local alignments. We will rst present an algorithm for nding optimal global alignments of two sequences using a constant gap penalty g and a scoring matrix M . Some denitions are necessary. A prex of a sequence S = s1 s2 . . . sn is the substring Si = s1 s2 . . . si , 1 i n. A sux of a sequence S = s1 s2 . . . sn is the substring S j = sj sj +1 . . . sn , 1 j n. Note that every substring of a sequence S can be viewed as a sux of a prex of S (or vice versa). For global alignments, we nd optimal alignments for prexes of each sequence using information from previously computed alignments. Given two sequences A = (a1, a2, . . . , am ) and B = (b1, b2, . . . , bn), say we want to nd the optimal alignment for the prexes Ai and Bj , having already computed the scores of optimal alignments for all pairs of prexes Ak and Bl , k + l i + j . An optimal alignment of Ai and Bj can end in one of three ways: a space can be

144

aligned with ai , a space can be aligned with bj , or ai can be aligned with bj . If an optimal alignment ends with ai aligned with a space, then the rest of the alignment must align Ai1 and Bj optimally. The argument is similar if an optimal alignment ends with bj aligned with a space. If an optimal alignment ends with ai aligned with bj , then the remainder of the alignment must align Ai1 and Bj 1 optimally. Having already computed the scores of optimal alignments for these prexes, we can compute the score for the optimal alignment of Ai and Bj .

S (Ai, Bj 1 )

S (Ai , Bj ) = max

## As an initialization step for the algorithm to compute S (A, B ), we set S (2, 2) = 0,

2 denotes the empty sequence. In addition, we let S (Ai, 2) = ig for 1 i m, and S (2, Bj ) = jg for 1 j n, as the only alignment of a prex Ai with the empty sequence 2 is to align every character in Ai with a space. Once S (Am , Bn ) = S (A, B )
where has been computed, we can trace back all routes to the beginning of the algorithm to recover the optimal alignments. For example, if S (A, B ) = S (Am1 , B ) + g , then we know that in the nal column of an optimal alignment of A and B, am is aligned with a space. If S (A, B ) also equals S (Am1 , Bn1 ) + M (am , bn), then there are also optimal alignments of A and B in which the nal column is am aligned with bn . Consider an (m + 1) (n + 1) array whose (i, j ) entry is S (Ai , Bj ) (with A0 = B0 = 2). Then the score of the global alignment is the (m, n) entry in the array. For local alignments, we modify the above method slightly. For each pair of prexes Ai and Bj , we will nd the maximum scoring alignment of a sux of Ai and sux of Bj . As with global alignments, an optimal alignment of a non-empty sux of Ai and a non-empty sux of Bj can end in one of three ways: a space can be aligned with ai , a space can be aligned with bj , or ai can be aligned with bj . There is a fourth option for optimal local alignments, which is to align the empty sux of Ai with the empty sux of Bj with a score of zero. To compute S (Ai , Bj ) for local alignments, we take

145

## the maximum score of these four options:

S (Ai, Bj 1 ) S (Ai1, Bj )

+ +

g g .

S (Ai , Bj ) = max

S (Ai1 , Bj 1 ) + M (ai , bj ) 0

## Hence, every local similarity score will be non-negative.

We initialize S (2, 2) =

S (Ai , 2) = S (2, Bj ) = 0 for 1 i m and 1 j n, as the optimal alignment of a sux of any sequence S with

## 2 is to align the empty sux of S with 2, with a

score of zero. If we consider the (m + 1) (n + 1) array whose (i, j ) entry is the score of an optimal alignment of a sux of Ai and a sux of Bj , then the local alignment score of these two sequences will be the maximum entry in the array. If the (i, j ) entry of the array contains the maximum value over all entries in the array, then some alignment of a sux of Ai (i.e., a substring of A) and a sux of Bj (i.e., a substring of B) achieves the highest score over all possible alignments of a substring of A with a substring of B, and hence is an optimal local alignment. The optimal local alignments can be traced back using a method similar to the one used for global alignments. In Figure 4.1, we illustrate how to compute the global and local similarity score for S1 and S2. The global alignment we suggested earlier for S1 and S2 is indeed optimal, but there are four optimal global alignments all with score one, shown in Table 4.1. There are several optimal local alignments with score two. The longest of the optimal local alignments omit the nal column in each of the global alignments of S1 and S2 in Table 4.1 so that the penalty for aligning the nal A in S1 with a space is not incurred. A A A A T T T T T T T T C C G G G T T T T A A A A A A T T T T T T T T C G G G G C T T G G A T T A

A A

G G G

A A

Table 4.1: The four optimal global alignments of S1 and S2 . The method described above to compute global and local similarity scores takes O(mn) time and O(mn) space to compute the similarity score and nd the optimal alignments. To nd the similarity score without recovering the alignment, one can

146

A T A T G G T
0 1 2 3 4 5 6 7 0

A T A T G G T
0 1 0 0 0 0 0 1 0 0 2 1 0 0 1 0 0 1 1 0 0 0 0 2 0 0 2 2 1 0 1 1 0 0 1 1 0 2 1 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 2 0

A T T C G T A

1 1 2 0

0 1 2 3 4 5 2 1 0 0 1 2 3 2 1 2 0 1 1 0 0 2 0 1 2

3 1 1

4 2 0 1 1 5 3 1 2 0

6 4 2 3 1 1

7 5 3 1 2 0 1 1

A T T C G T A

0 0 0 0 0 0 0

Figure 4.1: Finding optimal global and local alignments for S1 and S2. The (i, j ) entry in the left array equals the score of an optimal alignment of S (Ai, Bj ), with A0 and B0 being the empty sequence 2. The (i, j ) entry in the right array equals the maximum score of an alignment of a sux of Ai with a sux of Bj . In the array on the left, the traceback to recover the optimal alignments of S1 and S2 is shown. If the (i, j ) entry is circled, then an optimal alignment of Ai and Bj appears in some optimal alignment of A and B . note that the scores in row i of the arrays in Figure 4.1 depend only on the scores in rows i 1 and i, so the space requirements can be reduced to O(m + n). In addition, there are O(mn) time, O(m + n) space divide-and-conquer algorithms that nd optimal alignments for two sequences ([49], [52], [72]). We now show how to modify the method above for ane gap penalties, g (k) = +k for a gap of length k. Given two sequences S = (s1 , . . . , sm ) and T = (t1 , . . . , tn ), we dene three arrays A, B , and C for the prexes Si and Tj , 0 i m, 0 j n, where S0 and T0 both denote the empty sequence. A(i, j ) = Maximum score of an alignment of Si and Tj that ends with si aligned with tj . B (i, j ) = Maximum score of an alignment of Si and Tj that ends with a space aligned with tj . C (i, j ) = Maximum score of an alignment of Si and Tj that ends with si aligned with a space. We update the arrays as follows: A(i, j ) = M (si , tj ) + max{A(i 1, j 1), B (i 1, j 1), C (i 1, j 1)}

147

B(i, j ) = max{ + + A(i, j 1), + B (i, j 1), + + C (i, j 1)} C (i, j ) = max{ + + A(i 1, j ), + + B (i 1, j ), + C (i 1, j )} To explain these updates, we note that to compute A(i, j ), we know that the last column of the alignment will have si aligned with tj , so we merely need to nd the score of an optimal alignment of Si1 and Tj 1 . To compute B(i, j ), we are aligning tj with a space, and we must assess the correct gap penalty. If the alignment of Si and Tj 1 ends with aligning tj 1 with a space, then a gap penalty of only needs to be assessed for aligning tj with a space. In the other two cases, a new gap is started, at a cost of + . Computing C (i, j ) is similar to computing B(i, j ). The initialization of the arrays is as follows, where denotes that it is impossible to have an alignment of that type. For example, there is no alignment of Si with the empty sequence T0 that ends with a space in Si aligned with a character in T0, because there is no character in T0. Hence, B (i, 0) = . A(0, 0) = 0, A(i, 0) = A(0, j ) = for 1 i m, 1 j n B (i, 0) = , B (0, j ) = + j for 1 i m, 1 j n C (i, 0) = + i, C (0, j ) = for 1 i m, 1 j n After all of the entries of the arrays have been computed, then S (S, T ) = max{A(m, n), B (m, n), C (m, n)}. This algorithm can be easily modied to compute local similarity. A clearly related notion to the similarity between two sequences is the notion of a distance between two sequences. We dene two admissible operations on a sequence S of characters from = {w1, w2, . . . , wp}: insertion or deletion of characters from S , or substituting a character in S with another character from . Any sequence S of characters from can be transformed into any other sequence S by a successive application of admissible operations. If we attach a cost of g 0 to every insertion or deletion (or similarly, a cost of g (k) to the insertion or deletion of k consecutive characters into or out of S ) and a cost of c(wi, wj ) for substituting a character wi

148

with a character wj , then the weighted edit distance between two sequences S and S , denoted dist(S, S ), is the minimum cost of a sequence of admissible operations that transforms S into S . For dist to be a metric, it is necessary for c(wi, wj ) 0 for all i and j , with equality if and only if i = j , and c must be symmetric: c(wi, wj ) = c(wj , wi). We will also assume that the values of c(wi, wj ) satisfy the triangle inequality: c(wi, wk ) c(wi, wj ) + c(wj , wk ) for all triples wi, wj , wk . If there were a triple such that c(wi, wk ) > c(wi, wj ) + c(wj , wk ), then if we replace wi with wk in a sequence, then there is a lower cost associated to replacing wi with wj , and then later replacing wj with wk , which has a cost of less than c(wi, wk ). By assuming that the triangle inequality holds, we avoid this situation. There are dynamic programming algorithms to compute the weighted edit distance between two sequences that are nearly identical to the algorithms presented above to compute similarity. However, weighted edit distance cannot be used for local comparisons. In addition, c(wi, wi) = 0 for all i, but for similarity scores, the values of M (wi, wi) may be dierent for dierent values of i. Because of this, the similarity score is used more often in practice. In [65], Linial, Linial, Tishby, and Yona dene a metric between two amino acid sequences S and S : d(S, S ) = S (S, S ) + S (S , S ) 2S (S, S ), where S (S, S ) can be either the global or local similarity score between S and S . However, there are occasions where the triangle inequality fails to be satised by this metric, but these failures do not occur very often (with probability less than 107 , according to [65]).

4.2.2

Scoring Matrices

There are several dierent scoring matrices that can be used to compare nucleotides or amino acids. In unitary matrices, all matches receive the same score and all mismatches receive the same penalty. These scoring matrices are often useful for nucleotide sequence comparisons, but not so useful for protein sequences, as they ignore information about protein evolution and structure. Some alternatives for comparing amino acids that have been suggested include the minimum mutation distance matrix. Sixty one of the 64 possible triplets of nucleotides

149

(called codons) encode amino acids. There are only twenty amino acids encoded by these codons, so many triplets encode the same amino acid. The minimum mutation distance between two amino acids is based on the minimum number of bases that must be changed to convert a codon for one amino acid into a codon for another. For example, the amino acid lysine is encoded by the codon AAA, and the amino acid arginine is encoded by AGA, so their minimum mutation distance is one. There are other matrices that are based on physical, chemical, or structural properties shared or not shared by pairs of amino acids. Some examples of properties used are the charge of the amino acid, the degree of hydrophobicity, whether the amino acid is polar or non-polar, and the amino acids size and shape. More commonly used matrices involve counting observed substitutions in organisms, the idea being that a mutation being observed implies that such a mutation does not kill o the organism and allows the mutation to propagate. Observed mutations that appear more often than predicted by chance would receive a positive score, while those that appear less often than predicted by chance would receive a negative score. One such set of scoring matrices is the Point Accepted Mutations (PAM) matrices, developed by Dayho, et. al [22]. There are dierent PAM matrices corresponding to dierent evolutionary distances. A PAMk matrix represents a score based upon an amount of evolution producing on average k mutations per 100 amino acids. To compute the PAM matrices, a probability transition matrix P is developed based upon the values pa , the probability of the occurrence of an amino acid a, and fab , the number of times the substitution a b is observed to occur in a collection of closely related proteins (e.g., the hemoglobin chains in humans and orangutans). For each amino acid a, fa =
a=b fab ,

fa 100pa
b

fb

## , i.e., how often an

amino acid mutates in one unit of evolutionary distance. The entries of P are given by: Pab =
Pr[a does not mutate] = 1 ma Pr[a mutates into b] =
fab fa ma

if a = b if a = b

P represents the transition probabilities corresponding to an average mutation rate of 1 mutation per 100 amino acids, so P k represents the transition probabilities for an

150

average mutation rate of k mutations per 100 amino acids. To compute the PAMk scoring matrix M k , for each pair of amino acids a and b,
k = 2 log ( the log-odds score Mab 2
k Pab pb ),

## rounded to the nearest integer, is calculated. If

the score for a pair is positive, then the observed frequency of the pair is greater than the frequency expected by chance. A similar method for developing scoring matrices is the Block Substitution Matrix (BLOSUM) method developed by Steven and Jorja Heniko [47]. Given a family of related proteins, a set of blocks (ungapped alignments of several substrings) of conserved regions (sections of proteins where few mutations have taken place) is produced. In each column of each block, the frequency of each pair of amino acids is counted. For example, if a column in a block of six sequences contains 5 As and 1 S, then 10 AA pairs and 5 AS pairs are counted. Repeating this process for every column in every block, one creates a frequency count fab for all pairs of amino acids. The observed probability of occurrence for each pair of amino acids is qab = fab /
{c,d} fcd .

The expected probability of occurrence of an amino acid is pa = The expected probability of occurrence of each pair of amino acids
pa pa p p +p p a b b a

qaa + 1/2

b=a qab .

## (a, b), denoted eab , is: eab =

if a = b otherwise

qab ), rounded The log-odds score for the BLOSUM matrix is given by M (a, b) = 2 log2 ( e ab

to the nearest integer. To reduce the contribution of large groups of very similar blocks to the scores, in the calculation of the BLOSUMn scoring matrix, sequences that are at least n% identical are clustered together and weighted as a single sequence for the purposes of frequency counts. The major dierence between the PAM and BLOSUM matrices is that the mutation frequency counts for PAM matrices are based upon mutations observed in both highly conserved and highly mutable regions in proteins, while BLOSUM matrices restrict their counts to highly conserved regions of proteins. Part of the diculty in sequence comparison is picking the proper scoring matrix for alignments. In [2], Altschul places

151

log-odds scoring matrices in an information theoretic context and shows that for gap-free alignments, using a PAMk matrix to compare sequences that are actually separated by a PAM distance of D, the closer that k is to D, the more information that is provided per alignment position toward determining whether a local alignment is signicant or not. The scores in the PAM matrices actually correspond to the number of half-bits of information contributed by each alignment pair toward determining whether an alignment is signicant or not. In comparing an amino acid sequence of length m to a sequence of length n, log2(mn) bits of information are necessary to determine that a high scoring gap-free alignment is signicant. For example, if one compares two amino acid sequences of length 250, log2 (2502) 16 bits of information are necessary for a signicant alignment. If the PAM-200 scoring matrix is used and the two sequences are actually 160 PAM units apart, then according to Altschul [2], each alignment pair contributes on average 0.68 bits of information. This means that a high scoring gap-free local alignment of length 16/0.68 24 would be considered signicant. However, since the actual PAM distance between two sequences is rarely known, researchers choose which PAM matrix to use based upon an estimate of the PAM distance between two sequences, or nd optimal alignments using multiple scoring matrices to cover a range of PAM distances. In addition to the work above, the statistics of gap-free alignments have been studied in great detail ([56], [57]). Consider two independent random sequences of lengths m and n on a set of characters {a1, a2, . . . , ar }, where the frequency of character ai is pi in the rst sequence and qi in the second, 1 i r , pi = qi = 1. If M is an r r

## scoring matrix for the set of characters a1 , . . . , ar , then: Pr S > ln nm + x K exp(x),

where S is the maximum score of a gap-free local alignment of two sequences, is the unique positive solution of the equation
i,j

## pi qj exp(Mi,j ) = 1, and K is a function

of and the scoring matrix M . As an example, a gap-free local alignment of two sequences of length m and n has a statistically signicant high score, say at the 1%

152

4.2.3

## Heuristics for Sequence Comparison

As mentioned earlier, to calculate the similarity of two sequences of lengths m and n takes O(mn) time. However, comparing a sequence of length m against a library of sequences containing N characters total takes O(mN ) time. For comparisons against libraries such as GenBank (where N 8.6 109), these comparisons can take quite some time, especially for long query sequences or multiple query sequences. To remedy this, heuristics have been developed to estimate the similarity score. We will describe two of the heuristics in detail, FASTA [78], and BLAST [3], and we will also briey describe two new variants of BLAST, Gapped BLAST and PSI-BLAST [4]. FASTA, developed by Lipman and Pearson, is a heuristic for global alignments, although there is also a variant (called LFASTA) that is used for local alignments. Given a query sequence S , for each sequence S in the library, FASTA nds all substrings of some xed length that appear in both S and S , reporting the position of each match by the oset of S with S in order for the substrings to align. To explain oset, assume that FASTA reports all substring matches of length four. If the substring ATCG starts in S at position 4 and starts in S at position 11, then an oset of +7 would be reported for that match. For each library sequence, the osets with the most matches are determined, and for each of these osets, the score of an optimal gap-free local alignment (also called a maximal segment pair, or MSP) is computed. The sequences in the library are then ranked by the scores of these MSPs, and library sequences that score above some threshold continue in the process. For each surviving sequence, FASTA determines whether some of these high scoring MSPs can be combined together into a single higher scoring alignment with the inclusion of a limited number of gaps (with associated gap penalties). For the sequences in the library with the highest scoring combined alignments, a dynamic programming method is used to compute the score of an optimal global alignment with a limit on the maximum number of spaces that appear in the alignment. By xing the maximum number of spaces (at k, for example), computing the score of an optimal global alignment of two

153

sequences of length m and n, with m n, now takes O(kn) time instead of O(mn) time. FASTA reports the sequences with the highest scoring global alignments. In addition, to test the statistical signicance of a high scoring alignment of the query sequence with a library sequence, FASTA compares the score of the alignment with the global similarity scores of the query sequence with a set of shues, or random permutations, of the characters in the library sequence. The Basic Local Alignment Search Tool, or BLAST, developed by Altschul, et. al, nds high scoring segment pairs (gap-free alignments of substrings) of a query sequence and sequences in the library. The advantage of locating high scoring segment pairs is that, as we explained earlier, the statistics of the scores of gap-free alignments are well understood ([2], [56], [57]), so that determining the statistical signicance of a high scoring segment pair is fairly straightforward. Given a query sequence, BLAST rst compiles a list L of all substrings of the query sequence of some short xed length k. BLAST then looks for hits in the library: a hit is a substring S L and a substring S of length k in the library that have a gap-free alignment score above some threshold T . The parameters k and T are chosen to keep the number of hits small, but not so small that signicant local alignments are potentially lost. For each hit, BLAST extends the two substrings in both directions in order to nd a high scoring segment pair (HSP) that contains S and S aligned with one another. The extending stops when the score of the segment pair drops a certain distance below the best score found for shorter extensions. Finally, BLAST reports the statistically signicant HSPs. In Gapped BLAST, when two hits are found suciently close together in a gap-free alignment of two sequences, a HSP is found containing both hits, and if the score of the HSP is above some threshold, then an optimal alignment allowing gaps is computed using the dynamic programming methods mentioned earlier. With PSI-BLAST (Position-Specic Iterated BLAST), the library sequences which are similar to the query sequence are used to develop a scoring matrix for each position of the query sequence, and then PSI-BLAST is repeated using the new scoring matrices for each position in the query sequence, and so on. Both of the new versions of BLAST perform considerably better than the original BLAST in nding signicant matches,

154

and by choosing program parameters carefully, the new heuristics often run as fast as the original BLAST or faster.

Several papers ([48], [76], [77]) compare the performance of BLAST, FASTA, and the Smith-Waterman algorithm for local alignments for their ability to correctly identify biologically similar sequences. In almost all of the papers, the criterion for two sequences to be related is if they belong to the same protein superfamily, which is a group of proteins that can be shown to be evolutionarily related (such as globin chains in multiple species, kinases involved in phosphate transfer, and viral coat proteins). Usually, one query sequence would be chosen from each superfamily and compared against the entire library to see which sequences returned as most similar. Every method has a varying sensitivity, the ability to recognize distantly related sequences (or, the ability to avoid false negatives), and selectivity or specicity, the ability to avoid matches between unrelated sequences (or, the ability to avoid false positives). To determine whether one method is better than another, one needs to set a criterion for putative superfamily inclusion. Some criteria include whether a score is some number of standard deviations above the average, or higher than the top 0.5 % of scores of sequences not in the family. There is also the notion of the equivalence number developed by Pearson [77]. One rst nds the threshold score for putative family inclusion by which the number of false positives is equal to the number of false negatives. The number of sequences which are incorrectly placed in the superfamily (or equivalently, the number which are incorrectly placed outside of the superfamily) is the equivalence number. The lower the equivalence number, the better the comparison method. In tests, the Smith-Waterman method was the most sensitive, although in many cases BLAST and FASTA were nearly equivalent to Smith-Waterman in detecting superfamilies. FASTA, however, typically performed worse than BLAST and the Smith-Waterman method. In tests, FASTA ran on average six times faster than Smith-Waterman, BLAST ran about 36 times as fast as SmithWaterman, and Gapped BLAST ran about three times as fast as normal BLAST ([4], [77]).

155

4.3

## Index Structures for Searching Point Sets

There are various types of searches that are of interest in applications, two being nearest neighbor searches and range queries. In a nearest neighbor search, given a set of points S and a query point q that is usually not in S , one would like to nd the point p S which is closest to q under some metric. Alternatively, one may be interested in nding the k nearest neighbors to a query point, or merely nding a point which is within a distance (1 + )dmin for some xed > 0, where dmin is the minimum distance between q and any point in S . For range queries, given a set of points S , a query point q , and a distance threshold T , one wishes to nd all of the points within S that are within distance T of q . While naive algorithms can solve any of these problems in polynomial time, the challenge lies in nding ways to preprocess the point set S to enable faster nearest neighbor searches and range queries. There is an extensive literature on methods to speed up queries; see [9], [10], [17], [58], [70], and [91] just to list a few. The term index structure is used generally to dene any data structure for speeding up the execution of queries on a set of data [31]. The index structures in the papers listed above use essentially the same method to speed up searches through point sets in Rd . The region containing the point set is split into subregions according to some method (using hyperplanes, spheres, rectangles, etc.), these subregions are stored as nodes in a search tree, and then the method is repeated on the subregions. These methods take advantage of the fact that geometric concepts like halfspaces, spheres and hyperplanes are well dened in Rd . For less well understood metrics (such as those related to similarity scores of pairs of amino acid sequences), these methods are not as useful. For point sets in such metric spaces, one can embed the point set into Rd (also called feature extraction - see [50], [51], and [65]). However, if the dimension d of the space is small, then embedding the point set into Rd often introduces a large distortion in the metric. In addition, many of the range trees above do not work as well in high-dimensional Euclidean spaces, so there are trade-os that arise due to the choice of d between the accuracy of the metric and the performance of the range trees.

156

The index structure we will describe below can be applied to any point set with an associated metric without embedding the point set into Rd . While we use a similar method to the index structures in the papers listed above in that the point set is split repeatedly, the subregions are associated to dominating sets in graphs, a process that we will describe in detail in Section 4.3.2. Similar structures to the index structure we will describe below have been developed for decomposing a graph into a set of disjoint connected regions, or clusters (see [6] and [7]). These clustering methods have several applications in distributed network algorithms such as the ecient routing and tracking of objects through a network.

4.3.1

## Dominating Sets in Random Graphs

There is extensive literature on the topic of random graphs ([1], [15], [59]). For the random graph model Gn,p , we consider a graph with n vertices where each pair of vertices is joined by an edge with probability p. We rst present some generalizations of results of Nikoletseas and Spirakis on dominating sets in Gn,p [75]. Recall Bernoullis Inequality, which states that (1 + x)a 1 + ax for a > 1 and x > 1. If p [0, 1), we let q = 1/(1 p). Lemma 4.1 Let T be any vertex set of size (1 + ) logq n in Gn,p, where Pr[T is a dominating set] approaches 1 as n approaches innity. Proof: If T is a set of size D, then we note that Pr[T is a dominating set] = (1 (1 p)D )nD . To see this, consider a vertex v V T . The vertex v fails to be dominated by T with probability (1 p)D . If |T | = (1 + ) logq n, Pr[T is a dominating set] = (1 (1 p)(1+ ) logq n )n(1+ ) logq n = (1 (using Bernoullis Inequality) 1 1 n1+ )n(1+ ) logq n > 0. Then

n (1 + ) logq n n1+

157

## = 1 n + > 1 n which approaches 1 as n .

(1 + ) logq n n1+

A similar proof shows that sets of size < logq (n) are dominating sets in Gn,p with probability approaching zero as n approaches innity. In their paper, Nikoletseas and Spirakis present two algorithms for nding dominating sets D in Gn,p of size (1 + ) logq n for every > 0. Both algorithms run in expected time O(n logq n). In their greedy algorithm, a random vertex v is added to a set D, and N [v ] is deleted from the graph. The process is repeated until < logq n vertices are left in the graph, at which point all remaining vertices are added to D. The resulting set D is clearly a dominating set for the graph. Although the algorithm is presented for random graphs, the algorithm will produce a dominating set for any graph. Lemma 4.2 [75] For a xed positive and , the greedy algorithm above constructs a
2 8

, where

4.3.2

## An Index Structure for Range Queries

In this section we will describe an algorithm for building an index structure, which we will call a dominating set tree, or a DS tree for short, to speed up range queries on a set of points S = {s1 , s2, . . . , sn } with a metric d dened on all pairs of points in S . Building DS trees Let P be the multiset {d(si, sj ) : 1 i < j n} of all of the distances between distinct points in S . Let N =
n 2

## , and we will assume

that d0 = 0. Let M be the set M = {m1/2, m1/4, . . . , m(1/2)L }, where L = log2 N . Consider the graphs Gk = (V, Ek) for 1 k L, where V = {v1 , . . . , vn} and vi vj Ek d(si , sj ) m(1/2)k . We think of the vertex vi V as representing the

158

point si S . The edge density of a graph G = (V, E ) is the fraction of the total number of possible edges that G has, or
| (|V 2 )

|E |

## . Because m(1/2)k is greater than or equal to (1/2)k

of the elements of P (more if m(1/2)k appears in P repeatedly), Gk has an edge density of approximately (1/2)k . Note that N is not an integer power of two unless n 2, so L > log2 N , which implies that isolated vertices. The rst step of the algorithm to build a DS tree will be to nd a dominating set D1 in G1. In our algorithm, we use the greedy algorithm described by Nikoletseas and Spirakis to generate our dominating set. Recall that their algorithm is presented for random graphs, but the algorithm will produce a dominating set for any graph. D1 should be viewed a set of representative vertices for S . When we perform a range query on S , we will rst compare the query point q to each point si S represented by a vertex vi D1 to help determine in which portions of the point set the search should continue to locate points in S close to q . Each vertex vi D1 is a representative for the vertices in its neighborhood in G1 (and their corresponding points in S ). For an integer k, 1 k L, we will let Nk (v ) and Nk [v ] denote the open and closed neighborhoods of a vertex v in Gk , respectively. In the next step of the algorithm, for each vertex vi D1, we will nd a dominating set D(vi ) in G2 restricted to N1 (vi) (V D1). The vertices in D(vi ) should be viewed as a set of representatives for N1 (vi) (V D1), each representing a subneighborhood of N1(vi ) (V D1 ) in G2 . We omit D1 from V because we do not want vertices in D1 reappearing as representatives for a neighborhood in G2 . Once a query point q has been compared to a point si represented by a vertex vi D1, there is no need to compare q and si again. Let D2 =
vi D1 N 2L

## < 1, so m(1/2)L = d0 = 0, and GL will consist of n

D(vi).

At step j of the algorithm, where j runs from 3 to L, we will nd dominating sets (sets of neighborhood representatives) in Gj for each vertex in Dj 1 . In particular, for each vertex vi Dj 1 , we will nd a dominating set D(vi ) in Gj restricted to
1 Nj 1 (vi ) (V j k=1 Dk ), and we will let Dj = vi Dj 1

D(vi).

The DS tree we construct for a point set S with metric d consists of the pair of collections of sets ({Dk : 1 k L}, {D(vi) : 1 i n}). We will abuse notation and denote a DS tree by ({Dk }, {D(vi)}).

159

In Figure 4.2, we give an example of building a DS tree for a set of points S R2 using the Manhattan (or L1 ) metric, where if (x1, y1 ) and (x2 , y2) are two points in R2 , then d((x1, y1), (x2, y2)) = |x1 x2| + |y1 y2 |.
v (x,y) 1 (1,7) 2 (3,5) 3 (3,0) 4 (4,6) 5 (6,3) 6 (6,1) 7 (7,8) 8 (8,2) 9 (9,6) 10 (10,9) d 1 2 3 4 5 6 7 8 9 10 1 0 4 9 4 9 11 7 12 9 11 2 0 5 2 5 7 7 8 7 11 3 0 7 6 4 12 7 12 16 4 0 5 7 5 8 5 9 5 0 2 6 3 6 10 6 0 8 3 8 12 7 0 7 4 4 8 0 5 9 9 M={7,5,4,3,2,0} 0 4 10 0

10
7 1 4

10

9 2

5 6 3

0 0

10 10 G3
7 1 4 9

10 G1
7 1 4

10

10 G2
7 1 4

10

10

9 2

9 2

5 3 6

8 6 3

8 6 3

0 0

0 5 10 0

## D(4) = {2,9} D(6) = {3,8} D(7) = {9} D3 = {2,3,8,9}

Figure 4.2: An illustration of the algorithm to build a DS tree ({Dk }, {D(vi)}) for a set of points S R2 using the L1 metric. In the top row, the rst table lists the coordinates of the ten points in S , plotted in the graph next to the table. The table on the right lists the L1 distances between each pair of points in S , and the set of distances M = {m1/2, m1/4, . . . , m1/64} is given. The three graphs in the bottom row are the Gk as described in the algorithm for k = 1, 2, 3. Under each Gk , the sets Dk and Nk (j ) are given for each vertex j Dk . In addition, the sets D(j ) are given for each vertex j Dk1 . The collection of sets {D(v ) : v S } is summarized in the table to the right of G3. The algorithm to build a DS tree is given below.

Algorithm BuildIndex Input: A set of points S = {s1 , . . ., sn } and a metric d dened on S . Output: The set of distances M = {m1/2, m1/4, . . . , m(1/2)L }, where L = log2 and a DS tree ({Dk }, {D(vi)}) for performing range queries. 1. Compute all of the distances d(si, sj ), 1 i < j n.
n 2

160

2. Sort the d(si , sj ) and determine the set M = {m1/2, m1/4, . . . , m(1/2)L}, where L = log2
n 2

. Output M .

3. Let Gk = (V, Ek) for k = 1, 2, . . ., L, where V = {v1 , . . . , vn} and vi vj Ek d(si, sj ) m(1/2)k . 4. Use the greedy algorithm to nd a dominating set D1 for G1 . Output D1. 5. Let j = 2, V = V D1, and D = D1 . 6. Let Dj = . 7. For each vertex vi D , use the greedy algorithm to nd a dominating set D(vi ) of Gj restricted to Nj 1(vi ) V . Output vi followed by the list of vertices in D(vi), and let Dj = Dj D(vi). 8. Output Dj . Let V = V Dj , D = Dj . 9. If V = , then STOP. Otherwise, let j = j + 1, and go to Step 6. Querying DS trees To perform range queries on a point set S with metric d, we use the set of distances M = {m1/2, m1/4, . . . , m(1/2)L} and DS tree ({Dk }, {D(vi)}) generated by the algorithm BuildIndex. For a query point q , we wish to nd all points si S such that d(q, si) T for some T 0. At step j of the algorithm, where j runs from 1 to L 1, the algorithm will produce a set of vertices Dj +1 Dj +1 that is a set of representatives of neighborhoods in Gj +1 . The vertices in these neighborhoods correspond to points in S that may be within T of the query point q . Conversely, any vertex vi Dj +1 Dj +1 represents a neighborhood Nj +1 [vi ] that contains no vertices corresponding to points within T of the query point q. In the rst step, the algorithm will compute the distance from the query point q to each point si corresponding to a vertex vi D1. For each point si , either (i) d(q, si) T , (ii) T < d(q, si) T + m1/2, or (iii) d(q, si) > T + m1/2. In case (i), we

161

have found a point si within T of q , so we output it. In cases (i) and (ii), there is the possibility that a point represented by a vertex in N1(vi ) is within T of q , so we add the vertices in D(vi ) to D2. In case (iii), not only is si not within T of q , neither is any point sj represented by a vertex vj N1(vi ), since d(q, sj ) + m1/2 > d(q, sj ) + d(sj , si ) d(q, si) > T + m1/2, which implies that d(q, sj ) > T for all vj N1(vi ). Therefore, we do not add the vertices in D(vi) to D2. In the second step, the algorithm will compute the distance from q to each point si corresponding to a vertex vi D2 , but now the three cases are (i) d(q, si) T , (ii) T < d(q, si) T + m1/4, and (iii) d(q, si) > T + m1/4. Again, in case (i), we output si . In cases (i) and (ii), N2(vi ) may contain vertices that represent points within distance T of q , so the vertices in D(vi ) are added to D3. If d(q, si) > T + m1/4, then no point represented by a vertex in N2(vi ) is within T of q , so the vertices in D(vi ) are not added to D3. At step j of the algorithm, for a point si represented by a vertex vi Dj , the three cases are (i) d(q, si) T , (ii) T < d(q, si) T + m(1/2)j , and (iii) d(q, si) > T + m(1/2)j . In case (i), we output si . In cases (i) and (ii), Nj (vi ) may contain vertices that represent points within distance T of q , so the vertices in D(vi ) are added to Dj +1 . If d(q, si) > T + m(1/2)j , then no point represented by a vertex in Nk (vi ) is within T of q , so the vertices in D(vi ) are not added to Dj +1 . This process repeats until either Dj +1 = or j = L 1. In the latter case, we test whether each point represented by a vertex in DL is within T of the query point q or not, outputting the points within T of q . We illustrate this range query algorithm with the DS tree generated by BuildIndex in Figure 4.2. Recall that the set of distances M is M = {7, 5, 4, 3, 2, 0} and the dominating set D1 of G1 is D1 = {1, 5, 10}. We perform a range query on S using the L1 metric with query point q = (7, 0) and distance threshold T = 3. The execution of the algorithm is summarized in Table 4.2. We now present the algorithm to perform range queries using a DS tree generated by BuildIndex.

162

D1 = {1, 5, 10} Compute d(q, 1) = 13 Compute d(q, 5) = 4 Compute d(q, 10) = 12 D2 = {4, 6} Compute d(q, 4) = 9 Compute d(q, 6) = 2 D3 = {3, 8} Compute d(q, 3) = 5 Compute d(q, 8) = 3 D4 =

Initialize D2 = Case (iii) (> m1/2 + T ) Case (ii): D2 = D2 D(5) Case (iii) (> m1/2 + T ) Initialize D3 = Case (iii) (> m1/4 + T ) Case (i): Output point 6 and D3 = D3 D(6) Initialize D4 = Case (ii): D4 = D4 D(3) Case (i): Output point 8 and D4 = D4 D(8) STOP

Table 4.2: Summary of a range query on the point set S in Figure 4.2 for the query point q = (7, 0) and distance threshold T = 3. The range query correctly outputs the points in S within distance 3 of q : point 6 (with coordinates (6, 1)) and point 8 (with coordinates (8, 2)).

Algorithm QueryIndex Input: The set of distances M and DS tree ({Dk }, {D(vi)}) generated by BuildIndex for a set of points S = {s1, . . . , sn } with metric d, a query point q , and a distance threshold T 0. Output: Every point si S such that d(q, si) T . 1. Let D = D1, j = 1. 2. Let Dj +1 = . 3. Compute d(q, si) for each point vi D. (a) If d(q, si) T , then output si . (b) If d(q, si) T + m(1/2)j , then Dj +1 = Dj +1 D(vi). 4. Let D = Dj +1 . 5. If D = or j = L, then STOP. Otherwise, let j = j + 1, and go to Step 2. We need to verify that the algorithm QueryIndex correctly performs a range query on the point set S . If a point si S is within T of the query point q , and vj is a vertex

163

in Dk such that vi Nk [vj ], then the vertices in D(vj ) are added to Dk+1 because d(q, vj ) d(q, vi) + d(vi, vj ) T + m(1/2)k . Therefore, every representative vertex vj Dk+1 of a neighborhood Nk+1 [vj ] that contains vi will be in Dk+1 . Since every vertex is the representative of some neighborhood, vi will appear in Dk+1 for some k, the distance between si and q will be computed, and si will be outputted as a point within T of the query point q . Therefore, the algorithm QueryIndex performs a range query, as it outputs all points within distance T of q . Performance of DS trees We are interested in determining the expected time it takes to perform a range query using a DS tree, as well as the expected time to build a DS tree and the expected space needed to store it. To do so, we make some assumptions on the space U that contains the point set S , as well as some assumptions on the distribution of the points of S in U . We will assume that U is a measure space with a measure (X ) dened on every subset X U and a metric d dened for every pair of points in U . We will also assume that the measure space is nite, so that (U ) < . If U is a nite, countable set, then is simply the counting measure on U (that is, for a set X U , (X ) equals the number of points contained in X ). For a point x U , we will let Br (x) = {y U : d(x, y ) r }
c (x) = {y U : d(x, y ) > r }. We denote the ball of radius r centered at x. Similarly, Br

will assume that the measure space U is uniform in the sense that all balls of the same radius have the same measure, that is, (Br (x)) = (Br (y )) for all x, y U . We will denote the measure of a ball of radius r by (Br ). Because (U ) < , we can dene a probability measure V ol (X ) for every subset X U by V ol (X ) = (X )/(U ). Thus, if S U , then P r [x S ] = V ol (S ), and for
c (x)). all x, y U , P r [d(x, y ) r ] = V ol (Br (x)) = 1 V ol (Br

We will also assume that the point set S = {s1, . . . , sn } is evenly distributed throughout the space U . That is, there exists an r 0 and 0 such that for any point

x U and r r , (1 )V ol (Br ) P r [d(x, si) r ] (1 + )V ol (Br ) for all points si S . For our purposes, we will assume that r and are small enough such that

164

P r [d(x, si) r ] V ol (Br ) for all values of r used in our analysis. Theorem 4.3 Let S = {s1 , . . . , sn } be an evenly distributed point set in a nite, uniform measure space U , and let d be a metric dened on the points of S . Let L = log2
n 2

## , and let M be the set of distances M = {m1/2, m1/4, . . . , m(1/2)L} and

({Dk }, {D(vi)}) be a DS tree generated by the algorithm BuildIndex for S . For a query point q and a distance threshold T 0, the algorithm QueryIndex nds all points in S within T of q in expected time

O |D1| +

L j =2

## (V ol (BT +m(1/2)j1 )|Dj |) C ,

where C is the average time to compute the distance between two points in S . Proof: We have already proven the correctness of the algorithm QueryIndex by showing that it performs a range query. In the rst step of the algorithm QueryIndex, the distances between the query point q and all of the points represented by vertices in D1 are computed. A vertex vi D2 will be contained in D2 if and only if d(si, q ) T + m1/2, which occurs with probability V ol (BT +m1/2 ). Here, we assume that V ol (Br ) = 1 for any r max{d(x, y ) : x, y U }. Therefore, the expected size of D2 is V ol (BT +m1/2 )|D2|. Similarly, in step j of the algorithm, where j runs from 2 to L 1, the set Dj +1 Dj +1 of vertices that corresponds to the set of points compared to the query point in step j + 1 of the algorithm is determined. A vertex vi Dj +1 will be contained in Dj +1 if and only if d(si , q ) T + m(1/2)j , which occurs with probability V ol (BT +m(1/2)j ). So, the expected size of Dj +1 is V ol (BT +m(1/2)j )|Dj +1 |. The expected number of points in S to which the query point is compared is
L L

| D1 | +
j =2

E [ | Dj | ] = | D1 | +
j =2

## (V ol (BT +m(1/2)j1 )|Dj |).

If C is the average time it takes to compute the distance between two points, then we get the desired result.

165

To determine the expected time it takes the algorithm BuildIndex to build a DS tree and the expected space needed to store it, we will assume that for a vertex set W , the greedy algorithm produces a dominating set in Gk of size c logqk |W | in O(|W | logqk |W |) expected time, where c is a constant greater than one and qk =
1 . 1(1/2)k

We will discuss the validity of this assumption after we give the expected time

and space requirements for building and storing a DS tree under this assumption. Assume that the multiset P = {d(si , sj ) : 1 i < j n} and the set of distances M = {m1/2, m1/4, . . . , m(1/2)L } have already been computed. In the rst step of the algorithm BuildIndex, it takes O(n logq1 n) expected time to nd a dominating set D1 of size c logq1 n in G1. It can be conrmed using Lagrange multipliers that the worst case scenario for computing the dominating sets in G2 in the second step of the algorithm occurs when |N1[vj ]| =
n c logq1 n

## for all vertices vj D1 .

In the second step of the algorithm, for each vertex vj D1, it takes O(|N1(vj )| logq2 |N1(vj )|) = O( n n logq2 ( )) c logq1 n c logq1 n

expected time to compute D(vj ). Since |D1| = c logq1 n, it takes O(c logq1 n n n n logq2 ( )) = O(n logq2 ( )) c logq1 n c logq1 n c logq1 n

expected time to compute the D(vi ) for all vi D1. ) for 2 k Let a1 = c logq1 n, and let ak be dened recursively by ak = logqk ( akn 1 L. It can be shown inductively that for a given k, 1 k L, in the worst case it takes O(nak ) expected time to compute D(vi ) for all vi Dk . Therefore, the expected time to compute D(vi ) for all vi V is O(n(a1 + + aL )). Since ak = logqk ( akn ), then 1
ak ak we know that ak1 qk = n. Because qk 1 for all k, we can conclude that ak1 n

n 2

## , and the algorithm BuildIndex

takes O(n2 log n) expected time to build a DS tree for a set of n points. If C is the average time to compute the distance between two points in S , then the algorithm BuildIndex takes O(n2 C + n2 log n) expected time to compute the sets P and M and to build the DS tree. Note that instead of computing the entire set of distances

166

P to determine the set M , we could compute a set of size R of distances between random pairs of points in the set and use those distances to estimate the values of m1/2, m1/4, and so on. Also, instead of using a lookup table for the values of d(si, sj ), they can be computed when necessary. This modied process takes O(RC + R log R + n2 C log n) time. To determine the expected space needed to store a DS tree generated by BuildIndex, we note that each vertex vi is contained in exactly one set Dk , but may be contained in several sets D(vj ) for vj Dk1 . By our earlier assumptions, the expected number of sets D(vj ), vj Dk1 , that contain a particular vertex in Dk is the same for all vertices in Dk . For a vertex vi Dk , we will let E [Sk ] denote the expected number of sets D(vj ), vj Dk1 , that contain vi . Also, we will let E [Nk ] denote the expected number of neighborhoods Nk1 (vj ), vj Dk1 , that contain vi . Note that E [Sk ] = E [Nk ]P r [vi D(vj )|vi Nk1 (vj )]. There are |Dk1 | neighborhoods Nk1 (vj ), and since the edge density of Gk1 is (1/2)k1, the expected number of vertices vj Dk1 that are adjacent to vi in Gk1 is
|Dk1 | , 2k1 |Dk1 | . 2k1 k1 j =1

so E [Nk ] =

## Let Wk = V E [|Nk1(vj )|] =

Dj . For a vertex vj Dk1 , the expected size of Nk1 (vj ) is Similarly, for some constant c > 1, |Wk1 | ). 2k1

|Wk1 | . 2k1

E [|D(vj )|] = c logqk (E [|Nk1(vj )|]) = c logqk ( Therefore, P r [vi D(vj )|vi Nk1 (vj )] = = and

## E [|D(vj )|] E [|Nk1(vj )|] c logqk (

|Wk1 | ) 2k1 , |Wk1 | 2k1

## E [Sk ] = E [Nk ]P r [vi D(vj )|vi Nk1 (vj )] =

k1 |Dk1 | c logqk ( 2k 1 ) k 1 | W | k1 2 k1

|W

167

## c|Dk1 | logqk ( |Wk1 |

|Wk1 | ) 2k1

The value E [Sk ] is the same for all vi Dk , so the expected space needed to store the DS tree ({Dk }, {D(vi)}) is O(
L k=2 (|Dk |E [Sk ])).

The graphs Gk , although they have edge density p = (1/2)k , are not random graphs of the model Gn,p . However, assume we use the greedy algorithm to create a dominating set for Gk . At each step, the algorithm removes a vertex and its neighborhood from the graph. If the edge density of the remaining graph is at least p, then using the greedy algorithm to create a dominating set in Gk will produce a dominating set comparable in size to using the greedy algorithm for random graphs in Gn,p. Assume that we have an evenly distributed set of points S = {s1, . . . , sn } and a metric d dened on a nite, uniform measure space U containing S . Let G be a graph on n vertices {v1, . . . , vn }, where vi and vj are adjacent if and only if d(si , sj ) r for some r 0. The edge density of this graph is P = P r [d(si , sj ) r ] = V ol (Br ). If the neighborhood N [vk ] is deleted from the graph, then the edge density of the remaining graph is P = P r [d(si , sj ) r |d(si, sk ) r, d(sj , sk ) r ]. P = = = = P r [d(si , sj ) r, d(si, sk ) r, d(sj , sk ) r ] P r [d(si, sk ) r, d(sj , sk ) r ] c si :d(si ,sk )r V ol (Br (si ) Br (sk )) dsi
c (s ))2 V ol (Br k V ol ( B ( s r i )) V ol (Br (si ) Br (sk )) dsi si :d(si ,sk )r c (s ))2 V ol (Br k (1 V ol (Br ))V ol (Br ) si :d(si ,sk )r V ol (Br (si ) Br (sk )) dsi

## (4.1) (4.2) (4.3) (4.4)

(1 V ol (Br ))2

Equation (4.1) comes from the denition of conditional probability. To see Equation (4.2), we note that the two events in the denominator of Equation (4.1) are independent
c (s ))2 . In addition, of one another, so the probability of both events occurring is V ol (Br k

if we x two points si and sk such that d(si , sk ) r , then d(si , sj ) r and d(sj , sk ) r if and only if sj lies inside the ball of radius r centered at si and outside the ball of
c (s )). Integrating radius r centered at sk , which occurs with probability V ol (Br (si ) Br k c this probability over all points si Br (sk ) gives the desired result, since P r [d(si, sj )

## r, d(si, sk ) r, d(sj , sk ) r ] is identical for all sk . To see Equation (4.3), we note

168

that for any sets A1 and A2 , A1 Ac 2 = A1 (A1 A2 ). For Equation (4.4), we note that the rst term in the integral in Equation (4.3) is constant for all si , so we can simplify that part of the integral. If d(si , sk ) > 2r , then V ol (Br (si ) Br (sk )) = 0. Let I=
si :r d(si ,sk )2r

V ol (Br (si ) Br (sk )) dsi. Hence, P P if and only if V ol (Br ) (1 V ol (Br ))V ol (Br ) I , (1 V ol (Br ))2

169

4.3.3

## Experiments with the SWISS-PROT Protein Library

We wrote programs in C to implement the algorithms BuildIndex and QueryIndex to build a DS tree for a set of amino acid sequences from the SWISS-PROT Protein Library and to perform range queries using a DS tree. The code for the programs is available at http://dimacs.rutgers.edu/pdreyer/struct.tar.gz. For amino acid sequences, we chose to use the metric from [65]: d(si , sj ) = S (si , si )+ S (sj , sj ) 2S (si , sj ) for all pairs of sequences si and sj , 1 i < j n, where S is the global similarity score for two sequences using a xed scoring matrix and gap penalty function. We built DS trees on subsets of the SWISS-PROT library of sizes ranging from 100 to 6400 sequences. In [76], Pearson showed that BLOSUMn matrices for n between 45 and 62 performed better than other scoring matrices in correctly detecting protein superfamily membership. To calculate distances between sequences, we chose to use the BLOSUM50 scoring matrix and the gap penalty function g (k) = 12 6k, which was similar to gap penalties used in Pearsons study. An unfortunate aspect of using DS trees for range queries on protein sequence libraries is that it is necessary to build a DS tree for each scoring matrix and gap penalty function. Once the DS trees were built for each subset of the library, we used a random subset of 100 sequences from the SWISS-PROT library as query sequences to determine the average number of library sequences that are compared to a query sequence for range queries using the DS trees. We repeated these range queries using distance thresholds between zero and 1500, although the latter queries often returned large portions of the library. The results of these tests are shown in Figure 4.3. Recall that in [77], Pearson showed that FASTA typically ran six times faster than Smith-Waterman to compare a query sequence to every sequence in a sequence library. However, in [48], [76], and [77], it was shown that Smith-Waterman is far more accurate than FASTA at identifying amino acid sequences that belong to the same protein superfamily as some query sequence. Using DS trees generated by BuildIndex on

170

a sequence library, we can perform range queries using QueryIndex that use SmithWaterman to determine similarity. However, the query sequence does not have to be compared to every sequence in the library, resulting in a faster range query. The results in Figure 4.3 suggest that FASTA would be only two to three times faster than using DS trees with the Smith-Waterman measure of similarity to perform range queries, since only about 30 - 50% of the sequences in the library are compared to the query sequence. Further tests will be necessary to determine whether DS trees perform as well on other sequence libraries using other metrics.

## Average Fraction of Library Compared to Query Sequence

0.55 0.5 0.45 0.4 0.35 0.3 1000 2000 3000 4000 5000 6000
Size of Library

## Thresholds 0 250 500 750 1000 1250 1500

Figure 4.3: For subsets of the SWISS-PROT library of sizes ranging from 100 to 6400, a series of 100 range queries with distance threshold T were performed using DS trees generated by BuildIndex, where T varied from zero to 1500. For each subset S of the library and for each distance threshold T , this graph shows the average fraction of S that a query sequence was compared to during a range query with distance threshold T using the DS trees.

4.3.4

Open Problems

The expected time of a range query using QueryIndex with a DS tree generated by BuildIndex is based upon several factors, such as the distribution of the point set S ,

171

the metric d, and the method used to choose dominating sets. We gave estimates of the expected time of a range query using a DS tree under a certain set of assumptions about S , d, and the size of dominating sets produced by the greedy algorithm, but more work needs to be done for other cases. For example, analyzing the performance of DS trees for point sets in other metrics would be of interest. Further work may involve analyzing the performance of DS trees in Rd using metrics such as L1 , L2, and L . The metric that we used to compute distances between amino acid sequences is not well understood, which makes an analytical assessment of the expected time of range queries using DS trees on protein sequence libraries dicult. A better understanding of this metric and of the weighted edit distance metric would be of great benet. We also wish to test the performance of DS trees on more structured subsets of the SWISSPROT library (e.g., letting the subset of the library consist of a collection of protein superfamilies, instead of a group of random sequences from the library).

172

References
[1] N. Alon and J. Spencer. The Probabilistic Method. Wiley and Sons, New York, 1992. [2] S.F. Altschul. Amino acid substitution matrices from an information theoretic perspective. Journal of Molecular Biology, 219:555565, 1991. [3] S.F. Altschul, W. Gish, W. Miller, E.W. Myers, and D.J. Lipman. A basic local alignment search tool. Journal of Molecular Biology, 215:403410, 1990. [4] S.F Altschul, T.L. Madden, A.A. Schaer, J. Zhang, Z. Zhang, W. Miller, and D.J. Lipman. Gapped BLAST and PSI-BLAST: A new generation of protein database search programs. Nucleic Acids Research, 25(17):33893402, 1997. [5] J. Arquilla and H. Fredricksen. Graphing an optimal grand strategy. Military Operations Research, 1:317, 1995. [6] B. Awerbuch, B. Berger, L. Cowen, and D. Peleg. Near-linear time construction of sparse neighborhood covers. SIAM Journal of Computing, 28(1):263277, 1998. [7] B. Awerbuch and D. Peleg. Sparse partitions (extended abstract). In 31st Annual Symposium on Foundations of Computer Science, pages 503513, Piscataway, NJ, 1990. IEEE. [8] D.A. Benson, M.S. Boguski, D.J. Lipman, J. Ostell, B.F. Ouellette, B.A. Rapp, and D.L. Wheeler. GenBank. Nucleic Acids Research, 27(1):1217, January 1999. [9] S. Berchtold, C. Bohm, and H.-P. Kriegel. The pyramid-technique: Towards breaking the curse of dimensionality. In Proceedings of the SIGMOD Conference 1998, pages 142153, 1998. [10] S. Berchtold, D. Keim, and H.-P. Kriegel. The X tree: An index structure for high dimensional data. In Proceedings of the 22nd Conference on Very Large Databases, pages 2839, Bombay, India, 1996. [11] E. Berger. Dynamic monopolies of constant size. Technical report, Los Alamos National Laboratories, 1999. Available at http://xxx.lanl.gov/abs/math/9911125. [12] E. Berger. Personal communications via e-mail, May 1999. [13] E.R. Berlekamp, J.H. Conway, and R.K. Guy. Winning Ways. Academic Press, London, 1985. [14] E. Bienenstock, F. Fogelman-Soulie, and G. Weisbuch, editors. Disordered Systems and Biological Organization, volume 20 of NATO ASI Series F: Computing and System Sciences. Springer Verlag, 1986.

173

[15] B. Bollob as. Random Graphs. Academic Press, London, 1985. [16] S.J. Brams and P.C. Fishburn. Approval Voting. Birkhauser, Boston, 1983. [17] K.L. Clarkson. A randomized algorithm for closest-point queries. SIAM Journal on Computing, 17(4):830847, August 1988. [18] E.J. Cockayne, Jr. P.A. Dreyer, S.M. Hedetniemi, and S.T. Hedetniemi. Roman domination in graphs. Submitted to Discrete Mathematics. [19] E.J. Cockayne, Jr. P.A. Dreyer, S.T. Hedetniemi S.M. Hedetniemi, and A.A. McRae. Roman domination in graphs II. In Preparation. [20] T.H. Cormen, C.E. Leiserson, and R.L. Rivest. Introduction to Algorithms. MIT Press, Cambridge, MA, 1990. [21] N.C. Dalkey. The Delphi method: An experimental study of group opinion. Memorandum RM-5888-PR, RAND Corporation, Santa Monica, June 1969. [22] M. Dayho, R.M. Schwartz, and B.C. Orcutt. A model of evolutionary change in proteins. In M. Dayho, editor, Atlas of Protein Sequence and Structure, volume 5, pages 345352. National Biomedical Research Foundation, Silver Spring, MD, 1978. [23] C.F. de Jaenisch. Trait des Applications de lAnalyse Mathematique au Jeu des Echecs. Petrograd, 1862. [24] M.H. Degroot. Reaching a consensus. Journal of the American Statistical Association, 69:167182, 1974. [25] J.-P. Doignon and J.-C. Falmagne. Well-graded families of relations. Discrete Mathematics, 173:3544, 1997. [26] J.-C. Falmagne. Stochastic token theory. Journal of Mathematical Psychology, 41:129143, 1997. [27] J.-Cl. Falmagne and M. Regenwetter. A random utility model for approval voting. Journal of Mathematical Psychology, 40:152159, 1996. [28] D. Fisher. The domination number of complete grid graphs. To appear in Journal of Graph Theory. [29] P. Flocchini, E. Lodi, F. Luccio, L. Pagli, and N. Santoro. Irreversible dynamos in tori. In Proceedings of EUROPAR, pages 554562, 1998. [30] P. Flocchini, E. Lodi, F. Luccio, L. Pagli, and N. Santoro. Monotone dynamos in tori. In Proceedings of the 6th Colloquium on Structural Information and Communication Complexity, 1999. [31] I. Flores and A.H. Seidman, editors. The Handbook of Computers and Computing. Van Nostrand Reinhold Co., New York, 1984. [32] J.R.P. French. A formal theory of social power. Psychology Review, 63:181194, 1956.

174

[33] G.H. Fricke, S.T. Hedetniemi, and D.P. Jacobs. Independence and irredundance in kregular graphs. Ars Combinatorica, 49:271279, 1998. [34] M.R. Garey and D.S. Johnson. Computers and Intractability: A Guide to the Theory of NP-completeness. Freeman, New York, 1979. [35] E. Goles. Positive automata networks. In E. Bienenstock, F. Fogelman Souli e, and G. Weisbuch, editors, Disordered Systems and Biological Organization, pages 101112. Springer-Verlag, 1986. [36] E. Goles and S. Mart inez. Statistical Physics, Automata Networks, and Dynamical Systems. Klewer Academic Publishers, Dordrecht, Netherlands, 1992. [37] E. Goles and J. Olivos. The convergence of symmetric threshold automata. Information and Control, 51:98104, 1981. [38] E. Goles and J. Olivos. Periodic behavior of binary threshold functions and applications. Discrete Applied Mathematics, 3(2):93105, 1981. [39] G. Gunther, B. Hartnell, L.R. Markus, and D. Rall. Graphs with unique minimum dominating sets. Congressus Numerantium, 101:5563, 1994. [40] D. Guseld. Algorithms on Strings, Trees, and Sequences: Computer Science and Computational Biology. Cambridge University Press, New York, 1997. [41] F. Harary. A criterion for unanimity in Frenchs theory of social power. In D. Cartwright, editor, Studies in Social Power, pages 168182. University of Michigan, Ann Arbor, Michigan, 1959. [42] E.O. Hare, S.T. Hedetniemi, and W.R. Hare. Algorithms for computing the domination number of k n complete grid graphs. Congressus Numerantium, 55:8192, 1987. [43] Y. Hassin and D. Peleg. Distributed probabilistic polling and applications to proportionate agreement. In Proceedings of the 26th International Colloquium on Automata, Languages, and Programming, pages 402411, 1999. [44] Y. Hassin and D. Peleg. Extremal bounds for probabilistic polling in graphs. In Proceedings of the 7th International Colloquium on Structural Information and Communication Complexity, 2000. [45] T.W. Haynes, S.T. Hedetniemi, and P.J. Slater. Fundamentals of Domination in Graphs. Marcel Dekker, New York, 1998. [46] S.T. Hedetniemi. Roman domination in graphs II. Slides and notes from presentation at Ninth Quadrennial International Conference on Graph Theory, Combinatorics, Algorithms, and Applications at Western Michigan University, Kalamazoo, MI, June 2000. Joint work with E.J. Cockayne, P.A. Dreyer, Jr., S.M. Hedetniemi, and A.A. McRae. [47] S. Heniko and J. Heniko. Amino acid substitution matrices from protein blocks. Proceedings of the National Academy of Science, USA, 89:1091510919, 1992.

175

[48] S. Heniko and J. Heniko. Performance evaluation of amino acid substitution matrices. Proteins: Structure, Function, and Genetics, 17:4961, 1993. [49] D. Hirschberg. A linear space algorithm for computing maximal common subsequences. Communications of the ACM, 18:341343, 1975. [50] G. Hristescu and M. Farach-Colton. Cluster-preserving embedding of proteins. Technical Report 99-50, DIMACS, 1999. Available at http://dimacs.rutgers.edu/TechnicalReports/1999/99-50.ps.gz. [51] G. Hristescu and M. Farach-Colton. Cofe: A scalable method for feature extraction from complex objects. In Proceedings of the 2nd International Conference on Data Warehousing and Knowledge Discovery, pages 358371, 2000. [52] X. Huang, R.C. Hardison, and W. Miller. A space-ecient algorithm for local similarities. Computer Applications in the Biosciences, 6(4):373381, 1990. [53] R. Impagliazzo, R. Paturi, and M. Saks. Size-depth tradeos for threshold circuits. SIAM Journal of Computing, 26(3):693707, June 1997. [54] M.S. Jacobson and L.F. Kinch. On the domination number of products of a graph I. Ars Combinatoria, 10:3344, 1983. [55] S.F. Kapoor, H.V. Kronk, and D.R. Lick. On detours in graphs. Canadian Mathematics Bulletin, 11:195201, 1968. [56] S. Karlin and S. Altschul. Methods for assessing the statistical signicance of molecular sequence features by using general scoring schemes. Proceedings of the National Academy of Science, USA, 87:22642268, 1990. [57] S. Karlin, A. Dembo, and T. Kawabata. Statistical compostion of high-scoring segments from molecular sequences. Annals of Statistics, 18(2):571581, 1990. [58] N. Katayama and S. Satoh. The SRtree: An index structure for high-dimensional nearest neighbor queries. In Proceedings of the ACM SIGMOD Conference on Management of Data, pages 369380, 1997. [59] V.F. Kolchin. Random Graphs. Cambridge University Press, New York, 1999. [60] B. Latan e. The emergence of clustering and correlation from social interaction. In R. Hegselmann and H.O. Peitgen, editors, Models of Social Dynamics: Order, Chaos, and Complexity, pages 79104. Holder-Pichler-Tempsky, Vienna, 1996. [61] B. Latan e and E. Fink. Symposium: Dynamical social impact theory and communciation. Journal of Communication, 46(4):477, 1996. [62] B. Latan e and A. Nowak. Attitudes as catastrophes: From dimensions to categories with increasing involvement. In R.R. Vallacher and A. Nowak, editors, Dynamical Systems in Social Psychology, pages 219249. Academic Press, New York, 1994. [63] A. Lejeune and J.M. Perdang, editors. Cellular Automata: Prospects in Astrophysical Applications. World Scientic Publishing, Singapore, 1993.

176

[64] D. Li and Y. Liu. A polynomial algorithm for nding the minimum feedback vertex set of a 3regular simple graph. Acta Mathematica Scientia, 19:375381, 1999. [65] M. Linial, N. Linial, N. Tishby, and G. Yona. Global self-organization of all known protein sequences reveals inherent biological signatures. Journal of Molecular Biology, 268(2):539556, 1997. [66] H.A. Linstone and M. Turo, editors. The Delphi Method: Techniques and Applications. Addison-Wesley, Reading, MA, 1975. [67] F. Luccio. Almost exact minimum feedback vertex set in meshes and butteries. Information Processing Letters, 66:5964, 1998. [68] F. Luccio, L. Pagli, and H. Sanossian. Irreversible dynamos in butteries. In Proceedings of the Sixth Colloquium on Structural Information and Communication Complexity, 1999. [69] E. N. Luttwak. The Grand Strategy of the Roman Empire. Johns Hopkins University Press, Baltimore, 1976. [70] S. Manewongvatana and D.M. Mount. Analysis of approximate nearest neighbor searching with clustered point sets. In Proceedings of ALENEX, 1999. [71] S. Merrill. A Unied Theory of Voting: Directional and Proximity Spatial Models. Cambridge University Press, New York, 1999. [72] W. Miller and E.W. Myers. Optimal alignments in linear space. Computer Applications in the Biosciences, 4(1):1117, 1988. [73] N. Mustafa and A. Pekec. Democratic consensus and the majority rule. Technical report, BRICS, 2000. Available at http://www.brics.dk/RS/00/8/. [74] S. B. Needleman and C. D. Wunsch. A general method applicable to the search for similarities in the amino acid sequence of two proteins. Journal of Molecular Biology, 48:443453, 1970. [75] S.E. Nikoletseas and P.G. Spirakis. Near optimal dominating sets in dense random graphs in polynomial expected time. In J. van Leeuwen, editor, Graph Theoretic Concepts in Computer Science, volume 790 of Lecture Notes in Computer Science, pages 110. Springer, Berlin, 1994. [76] W. Pearson. Searching protein sequence libraries: Comparison of the sensitivity and selectivity of the Smith-Waterman and FASTA algorithms. Genomics, 11:635 650, 1991. [77] W. Pearson. Comparison of methods for searching protein sequence databases. Protein Science, 4:11451160, 1995. [78] W. Pearson and D. Lipman. Improved tools for biological sequence comparison. Proceedings of the National Academy of Science, USA, 85:24442448, 1988. [79] D. Peleg. Local majorities, coalitions, and monopolies in graphs: A review. In Proceedings of the Third Colloquium on Structural Information and Communication Complexity, 1996.

177

[80] D. Peleg. Size bounds for dynamic monopolies. Discrete Applied Mathematics, 86:263273, 1998. [81] S. Poljak and M. S ura. On periodical behavior in society with symmetric inuences. Combinatorica, 3:119121, 1983. [82] C.S. ReVelle and K.E. Rosing. Defending the Roman empire: A classical problem in military strategy. To appear in American Mathematical Monthly. [83] J.R. Riordan, J.M. Rommens, B. Kerem, N. Alon, R. Rozmahel, Z. Grzelczak, J. Zielenski, S. Lok, N. Plavsic, J.-L. Chou, M.L. Drumm, M.C. Iannuzzi, F.S. Collins, and L.-C. Tsui. Identication of the cystic brosis gene: Cloning and characterization of complementary DNA. Science, 245:10661073, 1989. [84] F. S. Roberts. Notes on threshold models, 1999. [85] F.S. Roberts. Discrete Mathematical Models, with Applications to Social, Biological, and Environmental Problems. Prentice-Hall, Englewood Clis, New Jersey, 1976. [86] J. C. Setubal and J. Meidanis. Introduction to Computational Molecular Biology. PWS Publishing, Boston, 1997. [87] T.F. Smith and M.S. Waterman. Identication of common molecular subsequences. Journal of Molecular Biology, 147:195197, 1981. [88] I. Stewart. Defend the Roman empire! Scientic American, pages 136138, December 1999. [89] T. Tooli and N. Margolus. Cellular Automata Machines: A New Environment for Modeling. MIT Press, Cambridge, MA, 1987. [90] J. von Neumann. The Theory of Self-Reproducing Automata. University of Illinois Press, Urbana, Illinois, 1966. [91] R.R. Muntz W. Wang, J. Yang. P K tree: A spatial index structure for high dimensional point data. In Proceedings of the 5th International Conference of Foundations of Data Organization, 1998. [92] M.S. Waterman. Introduction to Computational Biology. Chapman and Hall, London, 1995. [93] T.V. Wimer. Linear Algorithms on K terminal Graphs. PhD thesis, Clemson University, 1987.

178

Vita
Paul Andrew Dreyer, Jr.
1991 1991-95 Graduated from the North Carolina School of Science and Mathematics, Durham, North Carolina. Attended Duke University, Durham, North Carolina. Majored in Mathematics and History.

1993, 1995 Participated in the Directors Summer Program, National Security Agency, Fort Meade, MD. 1993-94 1995 1995-2000 1996 Attended University of Warwick, Coventry, England. B.Sc. in Mathematics, summa cum laude, Duke University. Graduate work in Mathematics, Rutgers, The State University of New Jersey, New Brunswick, New Jersey. Participated in SCAMP (summer research program), Institute for Defense Analysis, Center for Computing Sciences, Bowie, MD.

1997, 1998 Participated in Graduate Student Summer Intern Program, RAND Corporation, Santa Monica, CA. 1996 1997 1999 Knot Theory and the Human Pretzel Game, Congressus Numerantium, 122 (1996), 99108. (with T. Biedl) Rectangle Breaking in Grids, Congressus Numerantium, 128 (1997), 1932. (with X.R. Yong) The Adjacency Matrix and Spectrum of a Graph with Negative Third Largest Eigenvalue, submitted to Linear Algebra and its Applications (DIMACS Technical Report 99-45) (with C. Malon and J. Ne set ril) Universal H colorable Graphs Without A Given Conguration, submitted to Discrete Mathematics (DIMACS Technical Report 99-46) (with E. Cockayne, S.M. Hedetniemi, and S.T. Hedetniemi) Roman Domination in Graphs, submitted to Discrete Mathematics

1999

2000