Observability of Lattice Graphs
aa r X i v : . [ c s . D M ] M a y Observability of Lattice Graphs
Fangqiu Han Subhash Suri Xifeng YanDepartment of Computer ScienceUniversity of CaliforniaSanta Barbara, CA 93106, USA
Abstract
We consider a graph observability problem: how many edge colors are needed for an unlabeledgraph so that an agent, walking from node to node, can uniquely determine its location from just the observed color sequence of the walk?
Specifically, let G ( n, d ) be an edge-colored subgraph of d -dimensional (directed or undirected) lattice of size n d = n × n × · · · × n . We say that G ( n, d )is t -observable if an agent can uniquely determine its current position in the graph from the colorsequence of any t -dimensional walk, where the dimension is the number of different directions spanned by the edges of the walk. A walk in an undirected lattice G ( n, d ) has dimension between 1and d , but a directed walk can have dimension between 1 and 2 d because of two different orientationsfor each axis.We derive bounds on the number of colors needed for t -observability. Our main result is thatΘ( n d/t ) colors are both necessary and sufficient for t -observability of G ( n, d ), where d is considereda constant. This shows an interesting dependence of graph observability on the ratio between thedimension of the lattice and that of the walk. In particular, the number of colors for full-dimensional walks is Θ( n / ) in the directed case, and Θ( n ) in the undirected case, independent of the latticedimension. All of our results extend easily to non-square lattices: given a lattice graph of size N = n × n × · · · × n d , the number of colors for t -observability is Θ( t √ N ). Imagine an agent or a particle moving from node to node in an edge-colored graph. During its walk,the agent only learns the colors of the edges it traverses. If after a sufficiently long walk, the agentcan uniquely determine its current node, then the graph is called observable. Namely, an edge-coloredgraph is observable if the current node of an arbitrary but sufficiently long walk in the graph canbe uniquely determined simply from the color sequence of the edges in the walk [7]. A fundamentalproblem in its own right, graph observability also models the “localization” problem in a variety ofapplications including monitoring, tracking, dynamical systems and control, where only partial or localinformation is available for tracking [1, 2, 4, 6, 9, 10, 11, 12]. This is often the case in networks withhidden states, anonymized nodes, or information networks with minimalistic sensing: for instance,observability quantifies how little information leakage (link types) can enable precise tracking of usersin anonymized networks. As another contrived but motivating scenario, consider the following problemof robot localization in minimally-sensed environment.A low-cost autonomous robot must navigate in a physical environment using its own odometry(measuring distance and angles). The sensor measurements are noisy and inaccurate, the robot invari-ably accumulates errors in the estimates of its own position and pose, and it must perform periodicrelocalizations. Without global coordinates (GPS), unique beacons, or other expensive navigationaids, this is a difficult problem in general. In many situations, however, an approximate relocalization1s possible through inexpensive and ubiquitous sensors, such as those triggered by passing throughdoors (beam sensors). Privacy or cost concerns, however, may prevent use of uniquely identifiable sensors on all doors or entrances. Instead, sensors of only a few types (colors) are used as long as wecan localize the robot from its path history . Formally, the robot’s state space (positions and poses)is a subset of R d , which is partitioned into N = n × n × · · · × n cells, each representing a desiredlevel of localization accuracy in the state space. We assume access to a minimalist binary sensor thatdetects the robot’s state transition from one cell to another. The adjacency graph of this partition isa d -dimensional lattice graph, and our robot localization problem is equivalent to observability, whereedge colors correspond to different type of sensors on cell boundaries. Problem Statement.
With this general motivation, we study the observability problem for (sub-graphs of) d -dimensional lattices (directed and undirected), and derive upper and lower bounds onthe minimum number of colors needed for their observability. Lattices, while lacking the full powerof general graphs, do provide a tractable but non-trivial setting: their uniform local structure andsymmetry makes localization challenging but, as we will show, their regularity allows coding schemesto reconstruct even relatively short walks. We begin with some definitions to precisely formulate ourproblem and the results.Let G ( n, d ) denote a subgraph of d -dimensional regular square lattice of size N = n d . We want tocolor the edges of G ( n, d ) so that a walk in the graph can be localized based solely on the colors ofthe edges in the walk. The starting node of the walk is not known, neither is any other informationabout the walk except the sequence of colors of the edges visited by the walk. By localizing the walk,we mean that its current node can be uniquely determined.When the graph is directed, an edge has both a natural dimension and an orientation : dimensionis the coordinate axis parallel to the edge, and orientation is the direction along that axis (positive ornegative). There are 2 d distinct orientations in a directed lattice, two for each axis. When the graphis undirected, each edge has a dimension but not an orientation. The lack of orientation makes theobservability of undirected graphs more complicated: in fact, even if all edges have distinct colors ,the agent can create arbitrarily long walks by traversing back and forth on a single edge so that onecannot determine the current vertex from the color sequence alone. Nevertheless, we show that anyundirected walk that includes at least two distinct edges can be observed (localized). Our Results.
We show that lattice observability depends not on the length of the walk, but ratheron the number of different directions spanned by the walk. In order to discuss both directed andundirected graphs without unnecessary notational clutter, we use a common term dimension to countthe number of different directions: it is the number of distinct edge orientations in a directed walkand the number of distinct axes spanned by an undirected walk. In particular, we say that a directed walk W has dimension t if it includes edges with t distinct orientations, for t ≤ d . An undirected walk W has dimension t if it includes edges parallel to t distinct axes, for t ≤ d . We say that G ( n, d )is t -observable if an agent, walking from node to node, can uniquely determine its current positionfrom the color sequence of any t -dimensional walk.Our main result shows that O ( t √ N ) colors are always sufficient for t -observability of (directed orundirected) lattice graph G ( n, d ), where N = n d is the size of the graph and d is assumed to bea constant. A matching lower bound easily follows from a simple counting argument. The upperbound proof uses a combinatorial structure called orthogonal arrays to construct the observable colorschemes, which may have other applications as well. We prove the results for subgraphs of squarelattices, but the bounds are easily extended to rectangular lattices: given a lattice graph of size N = n × n × · · · × n d , the number of colors for t -observability is Θ( t √ N ). An interesting implicationis that for full-dimensional walks, the number of colors is independent of d : it is O ( n / ) for directed,2nd O ( n ) for undirected, graphs. Related Work.
The graph observability problem was introduced by Jungers and Blodel [7], whoshow that certain variations of the problem are NP -complete in general directed graphs. They alsopresent a polynomial-time algorithm for deciding if an edge-colored graph G is observable based on thefact that the following two conditions are necessary and sufficient: ( i ) G does not have an asymptoticallyreachable node u with two outgoing edges of the same color, where an asymptotically reachable nodeis one reachable by arbitrarily long paths, and ( ii ) G does not have two cycles with the same edgecolor sequence but different node orders. These results hold only for directed graphs, and not muchis known for observability of undirected graphs. By contrast, our results show a universal (extremal)bound that holds for all lattices of size N = n d , and apply to both directed and undirected graphs.The graph observability is related to a number of other concepts in dynamical systems, including trackable graphs where the goal is to detect and identify dynamical processes based on a sequence ofsensor observations [4], discrete event systems where the goal is to learn the state of the process basedpurely on the sequence (colors) of the transitions [11], and the local automata where a finite stateautomaton is called ( d, k )-local if any two paths of length k and identical color sequence pass throughthe same state at step d [10]. The primary objectives, however, in those papers are quite differentfrom the combinatorial questions addressed in our paper. A d -dimensional lattice graph is one whose drawing in Euclidean d -space forms a regular tiling.Specifically, such a graph of size N = n d has nodes at the integer-valued points ( x , x , . . . , x d ),for x i ∈ { , , . . . , n − } . Two nodes can be connected if their distance is one: in undirected graphs,there is at most one such edge, and in directed graphs, there can be two edges with opposite orienta-tions. (Our results hold for any subgraph of the lattice, and do not require the full lattice.) In thisand the following three sections, we focus on directed graphs only, and return to undirected graphs inSection 6. We use the notation G ( n, d ) for a directed lattice graph of size n d . We say a directed walk W in G ( n, d ) is t -dimensional if it includes edges with t distinct orientations, for t ≤ d . An edgecolored graph G ( n, d ) is called t -observable if an agent can uniquely determine its current positionin the graph from the observed edge color sequence of any directed walk of dimension t , for t ≤ d .Figure 1 below show a 4-observable graph (1a) and a non-observable graph 1(b). The main focusof our paper is to derive bounds on the minimum number of colors that suffice for t -observability of G ( n, d ). We begin with a few basic definitions and preliminaries.The embedding of the lattice graph G ( n, d ) induces a total order (cid:22) on the nodes. Let u =( x , x , . . . , x d ) and u ′ = ( x ′ , x ′ , . . . , x ′ d ) of two nodes in the graph. Then, we say that u (cid:22) u ′ if u precedes u ′ in the coordinate-wise lexicographic ordering. That is, u (cid:22) u ′ if either x < x ′ , or x = x ′ , . . . , x i = x ′ i and x i +1 < x ′ i +1 , for some 1 ≤ i < d . Given a directed walk in G , there is aunique minimum node under this total order, which we call the root of the walk. The node-orderingalso allows us to associate edges with nodes. If e = ( u, v ) is a directed edge, then we say that e is rooted at u if u (cid:22) v , and at v otherwise. (We remark that the root of an edge is unrelated to itsorientation: it simply allows us to associate edges to nodes in a unique way.) Thus, for any node u in G , at most 2 d edges may be rooted at u : at most two directed edges in each dimension for which u isminimum under the (cid:22) order. In Figure 1, for example, the edges (1 ,
2) and (4 ,
1) are both rooted atnode 1, while both (6 ,
5) and (5 ,
8) are rooted at 5. The walk (5 , , , , ,
8) is rooted at node 1.Each edge of the graph G also has a natural orientation: it is directed either in the positive or thenegative direction along its axis. To be able to refer to this directionality, we call an edge j -up-edge a) (b)1 2 34 5 67 8 9 1 2 36547 8 9 Figure 1: Two nearly identical 2-colored lattice graphs, one observable (on left), the other non-observable (on right). The two colors are shown as solid (S) and dashed (D). Only the color of edge(5 ,
8) differs in the two graphs. In (b), the color sequence (
SSSD ) ∗ can lead to either node 4 or 8,making it non-observable. In (a), any walk of dimension 4 is observable.(resp., j -down-edge ) if it has positive (resp. negative) orientation in j th dimension. In Figure 1, forinstance, the edge (5 ,
8) is the y -up-edge rooted at 5, and (6 ,
5) is the x -down-edge at 5. t -Observability Theorem 1.
A directed lattice G ( n, d ) requires at least ( n/ d/t colors for t -observability in the worst-case, for any t ≤ d .Proof. Assume, without loss of generality, that n is even. The nodes of G ( n, d ) have coordinates ofthe form ( x , x , . . . , x d ), with x j ∈ { , , . . . , n − } , for all j = 1 , , . . . , d . Consider ( n ) d unit d -cubesrooted at all the even nodes, namely, (2 x , x , . . . , x d ), with x j ∈ { , , . . . , n/ } , for j = 1 , , . . . , d .These unit cubes are pairwise edge-disjoint. We assign orientations to the some of the edges to createmany t -dimensional walks, and then use a counting argument to lower bound the number of colorsneeded for the t -observability of this graph. See Figure 2 for an illustration. Consider a prototypical (0,0,0) (1,0,0) (1,1,1) (a) (b) Figure 2: Illustration of the lower bound. The left figure (a) shows the even d = 3.copy of a d -cube, with opposite corners at u = (0 , , . . . ,
0) and v = (1 , , . . . , t -dimensional directed walk of length t , as follows. Starting at u , for the first min { t, d } steps, take the j -up-edge in step j = 1 , , . . . , t ; for the remaining ( t − d ) steps, take the (2 d − t + j )-down-edges, for j = 1 , , . . . , t − d . This construction assigns directions to t ≤ d edges of the d -cube; the remainingedges can be directed arbitrarily. (Figure 2b illustrates the construction for d = 3 and t = 6.) Byrepeating the construction at all d -cubes rooted at the even nodes of G ( n, d ), we get ( n/ d disjoint t -dimensional walks, which must have pairwise distinct color sequences for t -observability. Since k k t distinct color sequences of length t , the minimum number of colors k satisfies k t ≥ ( n ) d , from which it follows that k ≥ ( n/ d/t . It is easy to see that this argument holdsfor undirected walk as well, where we just have to ensure that t ≤ d . This completes the proof.We now describe the main result of the paper, an upper bound for t -observability. In order tobuild some intuition for the proof, and explain the coloring scheme, we first consider a much simplerspecial case: the 2-dimensional lattice G ( n,
2) and full-dimensional walks, namely, t = 4, where weshow that O ( √ n ) colors suffice. While the coloring and the decoding techniques for the general caseare somewhat different, this special case is useful to explain the main ideas. -Dimensional Lattices In discussing the two-dimensional lattice, we name the two coordinate axes x and y , instead of x , x .Similarly, we use the more natural and visual use of left-right and up-down for the directionality ofedges; i.e., we say left (resp. right) edge instead of 1-up (resp. 1-down) edge, and up (resp. down)edge instead of 2-up (resp. 2-down) edge. We begin with a discussion of our coloring scheme, andthen show its correctness. We will use 4 blocks of colors, one each for left, right, up and down typesof edges, where each block has ⌈√ n ⌉ colors. The coloring depends on the position of the root node u associated with the edge, and uses the quotient and the remainder of u ’s coordinates modulo ⌈√ n ⌉ .We use the notation x ÷ m to denote the quotient, and x mod m to denote the remainder.Specifically, consider a node u = ( x u , y u ) in G ( n, u : a rightoutgoing edge, a left incoming edge, an up outgoing edge, and a down incoming edge. The followingalgorithm assigns colors to all edges rooted at node u = ( x u , y u ). Color2 ( u ) : • If e is the outgoing right edge of u , give it color ( x u ÷ ⌈√ n ⌉ );if it is outgoing up edge, give it color ( y u ÷ ⌈√ n ⌉ ) + 2 ⌈√ n ⌉ . • If e is the incoming left edge of u , give it color ( x u mod ⌈√ n ⌉ ) + ⌈√ n ⌉ ;if it is incoming down edge, give it color ( y u mod ⌈√ n ⌉ ) + 3 ⌈√ n ⌉ .The following lemma is easy. Lemma 1.
All edges of G ( n, are colored, using at most ⌈√ n ⌉ colors. No two outgoing edges of anode are assigned the same color. A simple but important fact throughout our analysis is the following tracing lemma . Lemma 2. [Tracing Lemma] Let W be a walk in G ( n, under the coloring scheme Color2 . Fixingthe position of any node of W leads to a unique embedding of W in G ( n, .Proof. In our coloring scheme, the colors are grouped by the direction of edges (left, right, up anddown), and so given the color of an edge, we know its direction. Once a node of the walk is fixed, allsubsequent (and preceding) edges are uniquely mapped in the lattice graph.By the Tracing Lemma, our color sequence uniquely specifies the “trace” (or, shape) of the walk’sembedding, and once we localize any node of the walk, we can determine the embedding of the entirewalk. Thus, the main problem, which will consume the rest of the paper, is to decode the position ofone node of the walk from the color sequence. For G ( n,
2) and t = 4, we will use the following simplelemma, which the more complex coloring scheme of Section 5 does not need.5 emma 3. [Pairing Lemma] Suppose a directed walk W in G ( n, d ) contains both up- and down-edgesfor some dimension j . Then W must contain a j -up and a j -down edge that are both rooted at verticeswith the same j th coordinate.Proof. Mark each edge of W parallel to the j th axis either + or − depending on whether it is an up-or a down-edge. Since W contains both a j -up and a j -down edge, the sign changes at least once.Assume without loss of generality that it changes from + to − , with e and f being the edges associatedwith them. None of the (unmarked) edges between e and f are parallel to the j th axis, so both e and f project to the same unit interval ( x j , x j + 1) on the j th axis. By convention, both e and f arerooted at vertices whose j th coordinate is x j . This completes the proof.We can now explain our decoding scheme. Lemma 4.
Suppose G ( n, is colored using Color2 , and W is a -dimensional walk in this graph.Then, the color sequence of W uniquely determines the position of the root node of W in the lattice.Proof. Let u be the root node of W , and let ( x u , y u ) be its coordinates. (These coordinates areprecisely what we want to infer from the color sequence.) By the Pairing Lemma, since W includesall four orientations, it has two oppositely oriented edges e (positive) and e ′ (negative), both parallelto the x -axis and rooted at vertices with the same x coordinate. Let v = ( x , y ) and v ′ = ( x , y ′ ),respectively, be the root vertices of e and e ′ . By the color assignment, e and e ′ , respectively, receivecolors ( x ÷ ⌈√ n ⌉ ) and ( x mod ⌈√ n ⌉ ) + ⌈√ n ⌉ , which together are sufficient to uniquely calculate x .Since the edge colors uniquely determine the edge directions (dimension and orientation), we can trace W from e to find the correct value of x u , the x coordinate of the root node u . Similarly, since W alsoincludes edges with both y -orientations, we can calculate u y , thus uniquely localizing the root node u .This completes the proof. Theorem 2. O ( n / ) colors suffice for -observability of a directed lattice G ( n, .Proof. By Lemma 4, the color sequence of W uniquely determines the position of W ’s minimum node(root) in the lattice. Once u is localized, the tracing lemma can construct the unique embedding of W in G ( n, t -Observability of Directed Lattices We now describe the general coloring scheme for t -observability of G ( n, d ), for any fixed d and all t ≤ d . The scheme uses a tool from combinatorial design, called orthogonal array . We first describeour orthogonal array construction, and then explain its application to observability. Let σ, t, d be positive integers, with t ≤ d . The parameters t and d are in fact the walk and the latticedimensions, while σ is chosen as the smallest prime larger than n d/t . (There always exists a primebetween m and 2 m , for any integer m , and therefore σ < n d/t .) Our choice of σ ensures that σ t ≥ n d ,which will be useful later because each row of the array is used to assign colors to the edges rootedat a distinct node of G ( n, d ). An ( σ, t, d ) -orthogonal array A is an array of size σ t × d satisfying thefollowing two properties: • The entries of A are integers from the set { , , . . . , σ − } , and6 For any choice of t columns in A , the rows (ordered t -tuples) are unique.Several methods for constructing orthogonal arrays are known [5, 3]. Our construction uses poly-nomials of degree less than t over the Galois field GF ( σ ) = { , , . . . , σ − } . In particular, consider theset of all polynomials of degree less than t . Each such polynomial can be written as P ( x ) : P ti =1 a i x t − i ,with coefficients a i ranging over GF ( σ ). (Throughout the paper, when we use the word polynomial,we always mean these polynomials over GF ( σ ).) There are exactly σ t such polynomials, and we canorder them using the lexicographic order of their coefficients. More specifically, let ( a , a , . . . , a t ) and( b , b , . . . , b t ) be two t -tuples from GF ( σ ), and let P and P ′ denote the polynomials associated withthese coefficients. Then, P (cid:22) P ′ iff ( a , a , . . . , a t ) (cid:22) ( b , b , . . . , b t ) under the lexicographic order.In particular, the polynomial for (0 , , . . . ,
0) is the first element in this order, and the polynomial for( σ − , σ − , . . . , σ −
1) the last.We will frequently need this ordering of the polynomials, and so for ease of reference, let usdefine p -index , which gives the unique position of a polynomial in the ordered list. Specifically, if apolynomial has coefficients ( a , a , . . . , a t ), then its p -index equals P ti =1 a i σ t − i . We can now describehow to construct our orthogonal array. The ( i, j ) entry of the array is defined as follows: A ij = P i ( j ) mod σ, (1)where P i ( x ) is the polynomial whose p -index is i , for 0 ≤ i < σ t , and the array entry is the evaluationof this polynomial at x = j (mod σ ), where 1 ≤ j ≤ d . More precisely, if the i th polynomial hascoefficients ( a , a , . . . , a t ), then A ij = a j t − + a j t − + · · · + a t − j + a t (mod σ )In Figure 3, we show an example of the orthogonal array constructed by our scheme for ( σ, , d ).index 1 2 . . . d . . .
01 1 1 . . . . . . . . . . . . . . . . . .σ − σ − σ − . . . σ − σ . . . dσ + 1 2 3 . . . d + 1 . . . . . . . . . . . . . . . σ − . . . d − . . . . . .σ − σ σ − σ − . . . σ − dσ − σ + 1 0 σ − . . . σ − d + 1 . . . . . . . . . . . . . . .σ − σ − σ − . . . σ − d − σ, , d ) orthogonal array. For any two columns, all rows (ordered tuples) are distinct.The i th row entries are computed from the polynomial a x + a , where i is the p -index associatedwith ( a , a ). Row 0 has all zeroes because it belongs to the polynomial 0 x + 0, which evaluates to 0for j = 1 , , . . . , d . The last row belongs to the polynomial ( σ − x + ( σ − σ − , σ − j = 1, is ( σ − σ − ≡ σ − ≡ σ − σ ).The following lemma shows that the construction is valid.7 emma 5. The array A constructed by Equation (1) is an orthogonal array.Proof. The array has dimensions σ t × d , and its entries come from the set { , , . . . , σ − } , by con-struction. Thus, we only need to show that within any t columns of A , all rows are distinct. Weprove this by contradiction. Let j , j , . . . , j t , for 1 ≤ j < j < · · · < j t ≤ d be any t columns of A , and suppose that two different rows with indices i and i , for i < i are identical over thesecolumns. Let ( a , a , . . . , a t ) and ( b , b , . . . , b t ) denote the coefficients corresponding to polynomialsused for rows i and i , respectively. Then, by Equation (1), the polynomial used to construct entriesof row i is P i : a x t − + a x t − + · · · + a t , and the polynomial used to construct entries of row i is P i : b x t − + b x t − + · · · + b t . If these rows are identical, then we must have P i ( j k ) ≡ P i ( j k ) (mod σ ),for k = 1 , , . . . , t . This implies that j , j , . . . , j t are t distinct roots of the equation P i ( x ) − P i ( x )(mod σ ), which is not possible since this polynomial has degree t − t − Therefore, the rows i and i are not identical over the chosen t columns, proving that A is anorthogonal array.Note that not all orthogonal arrays could help us on coloring. Here we carefully constructed A such that the regular structure of A helps us map colors to edges of the lattice graph in such a waythat a small number of appropriate colors can be used to determine the position of a node in thelattice. We begin by indexing the nodes of G ( n, d ) in the lexicographic rank order of their coordinates. Specif-ically, a node u with coordinates ( x , x , . . . , x d ) has node rank r ( u ) = P di =1 x i n d − i , where recallthat each x j ∈ { , , . . . n − } . This ordering assigns rank 0 to the origin (0 , , . . . , n d − n − P di =1 n d − i to the anti-origin ( n − , n − , . . . , n − A satisfies σ t ≥ n d , and thus we can uniquely associate the node with rank i to the i th row of A .Let u be a node of G ( n, d ) whose rank (lexicographic order) is r ( u ) = i , where 0 ≤ i < n d . Then,we use the i th row of A to assign to colors to the edges rooted at u . The rules for assigning colors aredescribed in the following algorithm. The algorithm uses 2 t groups of disjoint colors C , C , . . . , C t − ,each with 2 d × σ colors. Each edge’s color depends on its orientation, so we assign integers 1 , , . . . , d to the 2 d orientations. (Any such labeling will suffice but, for the sake of concreteness, we may numberthe j -up orientation as j and the j -down orientation as j + d , for 1 ≤ j ≤ d .) ColorD ( u ) : • Let ( a , a , . . . , a t ) be the unique coefficient vector of a polynomial whose p -index i equals therank of u , namely, i = r ( u ). • Let m = P tk =1 ( a k mod 2)2 t − k . • If e has orientation j , then give it color A ij + ( j − σ from the color group C m .The use of disjoint color groups C m is required to allow unique decoding of the position of a nodein the lattice from the edge colors of the walk. (These groups are used critically in the proof ofLemma 10.) The following two lemmas follow easily from the color assignment. Finite fields belong to unique factorization domains, and therefore a polynomial of order r over finite fields has aunique factorization, and at most r roots. emma 6. ColorD assigns colors to all the edges of G ( n, d ) , uses O ( n d/t ) colors, and no twooutgoing edges of a node receive the same color. Lemma 7. [ d -Dimensional Tracing Lemma] Let G ( n, d ) be colored using the scheme ColorD , andlet W be a walk in G ( n, d ) . Fixing the position of any node of W leads to a unique embedding of W in G ( n, d ) . Lemma 8.
Let p , p , respectively, denote the p -indices of polynomials with coefficient vectors ( a , . . . , a t ) and ( b , . . . , b t ) . Then, the quantity A p j − A p j can be uniquely calculated, for any j , from the t co-ordinate differences , namely, a k − b k , for k = 1 , , . . . , t .Proof. By construction, A p j − A p j ≡ P p ( j ) − P p ( j ) (mod σ ) ≡ P tk =1 ( a k − b k ) j t − k (mod σ ).If p and p , where p > p , are the p -indices of ( a , a , . . . , a t ) and ( b , b , . . . , b t ), then by definition p = P tk =1 a k σ t − k and p = P tk =1 b k σ t − k . Let ℓ = ( p − p ) be the distance between these p -indices,and let ( c , c , . . . , c t ), with c i ∈ GF ( σ ), be the coefficient vector that yields the p -index ℓ . Since ℓ = P tk =1 c k σ t − k , we can easily find each coefficient c k from ℓ by modular arithmetic: c k = ( ℓ mod σ t − k +1 ) ÷ σ t − k . The following two lemmas establish important properties of these coefficients, and are key toinferring locations from distances . Lemma 9.
Let ( a , a , . . . , a t ) and ( b , b , . . . , b t ) be coefficient vectors with p -indices p , p , for p >p , respectively. Let ℓ = p − p , and suppose ( c , c , . . . , c t ) is the coefficient vector of the polynomialwith p -index ℓ . Then, for each k = 1 , , . . . , t , we either have a k − b k ≡ c k (mod σ ) , or we have a k − b k ≡ c k + 1 (mod σ ) .Proof. Because ℓ = p − p , we have ℓ = P tk =1 ( a k − b k ) σ t − k . Perform a (mod σ t − k +1 ) operationon both sides of the equality: ( a − b ) σ t − + · · · + ( a t − b t ) ≡ c σ t − + · · · + c t . We get ( a k − b k ) σ t − k + · · · + ( a t − b t ) ≡ c k σ t − k + · · · + c t (mod σ t − k +1 ), which is equivalent to ( a k − b k − c k ) σ t − k ≡ P ti = k +1 ( c i − a i + b i ) σ t − i (mod σ t − k +1 ). Because a i , b i , c i ∈ GF ( σ ), the right hand side clearly satisfiesthe following bounds: − σ t − k < t X i = k +1 ( c i − a i + b i ) σ t − i < σ t − k . But since a k , b k , c k on the left side are positive integers, there are only two feasible solutions: P ti = k +1 ( c i − a i + b i ) σ t − i ≡ σ t − k +1 ) or P ti = k +1 ( c i − a i + b i ) σ t − i ≡ σ t − k (mod σ t − k +1 ). Therefore, we musthave either a k − b k − c k ≡ σ ), or a k − b k − c k ≡ σ ). This completes the proof.The following lemma shows that while we cannot reconstruct the unknown coefficient vectors( a , a , . . . , a t ) and ( b , b , . . . , b t ) from the edge colors, we can still compute enough information abouttheir entries in the orthogonal array A . Lemma 10.
Let G ( n, d ) be colored using the scheme ColorD , and let W be a walk in G ( n, d ) . Let e and e be two edges in this walk rooted, respectively, at u and u with ranks (lexicographic order) r ( u ) = r and r ( u ) = r , with r < r . Then, the difference r − r along with the colors of e and e are sufficient to compute A r j − A r j (mod σ ) . roof. Suppose that the colors of e and e belongs to color groups C m and C m , respectively.Let us consider the binary representations of m , m , namely, m = P tk =1 ( a k mod 2)2 t − k − and m = P tk =1 ( b k mod 2)2 t − k − . If ( a k − b k ) ≡ a k − b k ) ≡ c k (mod σ ) if c k is even; otherwise it equals c k + 1. Similarly, ( a k − b k ) ≡ a k − b k ) ≡ c k (mod σ ) if c k is odd (and c k + 1 otherwise). Because we can infer from theembedding whether a k > b k , we can calculate a k − b k from a k − b k (mod σ ). Once we know all a k − b k ,for k = 1 , , . . . , t we can compute A r j − A r j (mod σ ) using Lemma 8. Lemma 11. [Ranking Lemma] Let a lattice graph G ( n, d ) be colored using the algorithm ColorD ,and let u , u be two nodes in a walk W of G ( n, d ) . We can calculate the difference of their ranks r ( u ) − r ( u ) from just the color sequence of W .Proof. Using the colors of edges in W starting at u , we can trace the walk, and count the number ofedges in each dimension. Suppose the number of j -up and j -down edges included in the walk from u to u are α j and β j , respectively. Then, the j th coordinate of u differs from that of u by precisely α j − β j . We can, therefore, calculate r ( u ) − r ( u ) = P dj =1 ( β j − α j ) n d − j .We are now ready to prove our main theorem. Theorem 3. O ( n d/t ) colors suffice for t -observability of any directed lattice graph G ( n, d ) , for anyfixed dimension d and t ≤ d .Proof. We color the graph G ( n, d ) using ColorD , and show how to localize a walk W of dimension t . Suppose j , j , . . . , j t , where 1 ≤ j < j < · · · < j t ≤ d , are the t distinct edge orientations of W .Let e be a j -oriented edge in W , rooted at a node u , and let r ( u ) = r be the rank of u . Then,the color of e can be used to uniquely determine the value A r j .Now, suppose the root of the walk W is the node u ∗ , with r ∗ = r ( u ∗ ). We can compute thedifference r − r ∗ , by using the Ranking Lemma. By Lemma 10, this difference along with the colorsequence of W gives us A r j − A r ∗ j , from which we can calculate A r ∗ j . By repeating this argumentfor each of the t dimensions spanned by W , we can calculate A r ∗ j , A r ∗ j , . . . , A r ∗ ,j t . By the propertyof orthogonal arrays, the ordered t -tuple ( A r ∗ j , A r ∗ j , . . . , A r ∗ j t ) is unique in A . Therefore, the rankof the root node u ∗ can be uniquely determined, which in turn uniquely localizes u ∗ in the latticegraph G ( n, d ). This completes the proof. Observing a walk is more complicated in undirected graphs because edge colors fail to determine thedirection of the walk. An undirected edge e = ( u, v ) may be traversed in either direction by the walk,but reveals the same color. We say that a walk has dimensions t if it contains edges parallel to t distinctdimensions. A minor modification of the lower bound construction (Theorem 1) shows that Ω( n t/d )colors are necessary for t -observability of undirected lattices: there are ( n/ d undirected paths, eachof length t ≤ d , and k colors can disambiguate at most k t paths, giving the lower bound. We nowprove a matching upper bound for t -observability. As we mentioned earlier, there is one trivial walkthat cannot be observed in undirected graphs: a walk that traverses a single edge back and forth. Inthis case, the current node cannot be determined from the color sequence. However, we show belowthat walks that include at least two distinct edges can always be observed.10 .1 Signs of Undirected Edges and an Auxiliary Coloring Although the edges of G ( n, d ) are undirected, a walk imposes an orientation on the edges it visits.To exploit this induced directionality, we introduce the notion of a sign . First, we consider a walkas a sequence of nodes W = ( u , u , . . . , u ℓ ), where e i = ( u i − , u i ) is the i th edge in the walk. Thus,the observed sequence is the colors of edges e , e , . . . , e ℓ . Next, recall that a node u with coordinates( x , x , . . . , x d ) has node rank r ( u ) = P di =1 x i n d − i . Now, consider an edge e i = ( u i − , u i ), and assumethat it is parallel to the dimension j . Then, it is easy to see that r ( u i ) − r ( u i − ) = ± n d − j . We saythat the sign of the edge e i is positive if r ( u i ) − r ( u i − ) = + n d − j , and negative otherwise. (Intuitively,the sign is positive if the walk traverses the edge in the positive direction of the axis, and negativeotherwise.)We first show that the signs of the edges in a walk can be computed from a simple 3-coloring. Let o = (0 , , . . . ,
0) be the origin and u = ( x , x , . . . , x d ) be a node of G ( n, d ). Let d o ( u ) = P di x i be thelength of the shortest path from the origin to u . Then, mod3 ( o ) colors the edges of G ( n, d ) as follows.See Figure 4 for an example. Assign color m = d o ( u ) mod 3 to all the edges rooted at node u . Figure 4: mod3 coloring. A monochromatic walk using color 2 is shown as solid.
Lemma 12.
Let G ( n, d ) be 3-colored using mod3 ( o ) , and let W = ( u , u , . . . , u ℓ ) be a walk with atleast two distinct observed colors. Then we can compute the sign of all ( u i − , u i ) , for i = 1 , , . . . , ℓ .Proof. Assume, without loss of generality, that the walk includes two consecutive edges e i = ( u i − , u i )and e i +1 = ( u i , u i +1 ) with distinct colors c i and c i +1 under mod3 ( o ). We observe the followingrelationship between the colors and signs. When e i ’s sign is positive, namely, d o ( u i − ) = d o ( u i ) − c i +1 = c i + 1 mod 3 if e i +1 ’s sign is positive, and c i +1 = c i mod 3 if e i +1 ’s sign is negative.Similarly, when e i ’s sign is negative, namely, d o ( u i ) = d o ( u i − ) + 1, we have c i +1 = c i mod 3 if e i +1 ’ssign is positive, and c i +1 = c i − c i = c i +1 mod 3, we conclude that e i +1 ’ssign is positive if c i +1 = c i + 1, and negative otherwise. Once the sign of one edge in the walk isdetermined, we can repeat this process to infer the signs of all other edges.When the walk includes only edges of one color, we try mod3 with d − t + 1 other choices ofthe origin . In particular, let mod3 ( o j ) be the 3-coloring with respect to the origin o = o and origin o j = (0 , , . . . , n − , . . . ,
0) with j th coordinate n − j = 1 , , . . . , d − t +1. Lemma 13.
Given any t -dimensional walk W = ( u , u , . . . , u ℓ ) in G ( n, d ) that visits at least twoedges, there is a 3-coloring mod3 ( o j ) for which W is not monochromatic, for j = 0 , , . . . , d − t + 1 . roof. By the pigeon principle, a t -dimensional walk must contain at least one edge that parallels toone of the first d − t + 1 axis. Assume, without loss of generality, that the walk includes two consecutiveedges e i = ( u i − , u i ) and e i +1 = ( u i , u i +1 ) and edge e i parallels to the j th dimension, 1 ≤ j ≤ d − t + 1.Let c ji denote the color for edge e i using 3-coloring mod3 ( o j ). We show in Figure 5 the color of edges e i and e i +1 are distinct under 3-coloring mod3 ( o ) or mod3 ( o j ), namely, either c i = c i +1 or c ji = c ji +1 holds. (1) When e i roots at u i − and e i +1 roots at u i , we have c i +1 = c i + 1 mod 3. Similarly (2)when e i roots at u i and e i +1 roots at u i +1 , we have c i +1 = c i − e i and e i + roots at u i , we have c ji +1 = c ji + 1 mod 3. And at last, (4) when e i roots at u i − and e i +1 roots at u i +1 , we have c ji +1 = c ji − u i u i+1 u i-1 u i-1 u i u i+1 u i+1 u i+1 u i u i u i-1 u i-1 o o j The jth axis e i e i e i e i e i+1 e i+1 e i+1 e i+1 (1) (2) (3) (4) Figure 5: Demonstration of 4 situations in Lemma 13. t -Observability Our final coloring scheme combines the orthogonal array based coloring with the mod3 coloring.We use the orthogonal array A with σ t ≥ n d , whose i th row is used to color edges rooted at nodewith rank i . The algorithm uses 2 t d − t +2 groups of disjoint colors, C j , each with dσ colors, where0 ≤ j < t d − t +2 , and σ = O ( n d/t ). UndirColor ( u ) : • Let ( a , a , . . . , a t ) be the unique coefficient vector of a polynomial whose p -index i equals therank of u , namely, i = r ( u ). Let ( x , x , . . . , x d ) be the coordinates of u . • Let m = P tk =1 ( a k mod 2)2 t − k . • Let m = P d − t +1 j =1 (( P dk =1 x k ) + n − x j mod 3)3 j + ( P dk =1 x k mod 3). • Let m = 2 t m + m . • An edge e rooted at u gets color A ij + ( j − σ from the color group C m if e is parallel todimension j .We can now prove the following result for undirected t -dimensional walks in G ( n, d ). Theorem 4.
Given an undirected lattice graph G ( n, d ) , we can color its edges with O ( n d/t ) colors sothat any t -dimensional walk that visits at least two distinct edges of G ( n, d ) can be observed, where d is a constant and t ≤ d . roof. We color the graph G ( n, d ) using UndirColor , and show how to localize a walk W of di-mension t . Suppose that the color of edge e i belongs to color group C m i . Let m i = m i mod 2 t , m i = m i ÷ t and consider a ternary representation of m i , namely, m i = P d − t +1 j =0 c ji j . Then c ji is the color of edge e i using 3-coloring mod3 ( o j ), j = 0 , , . . . , d − t + 1. By Lemma 13 there is a3-coloring mod3 ( o j ) for which W is not monochromatic. Then we can compute the sign of all edgesin W by using Lemma 12. Now for any two nodes in this walk, we could using the sign of all edgeson the path between them to compute their rank different. Therefore, similar argument in Theorem 3can be applied to uniquely localize the root node of W in lattice graph G ( n, d ). In this paper, we explored an observability problem for lattice graphs, and presented asymptoticallytight bounds for t -observability of both directed and undirected graphs. The bounds reveal an inter-esting dependence on the ratio between the dimension of the lattice and that of the walk, the largerthe dimension of the walk the smaller the color complexity of observing it , as well as an unexpectedconclusion that the color complexity for full-dimensional walks is independent of the lattice dimension.Our results are easy to generalize to non-square lattice graphs, albeit at the expense of moreinvolved calculations. In particular, given a lattice graph of size N = n × n × · · · × n d , the numberof colors for t -observability is Θ( t √ N ). Briefly, we use an ( σ, t, d ) orthogonal array with σ as thesmallest prime larger than N /t . The nodes of the lattice are ranked in the lexicographic orderof their coordinates, and we can calculate the rank of a node u with coordinates ( x , x , . . . x d ), x j ∈ { , , . . . , n j − } , as r ( u ) = x n n · · · n d + x n · · · n d + · · · + x d − n d + x d = d X j =1 ( x j Π dk = j +1 n k ) . Except for these minor modifications, the coloring scheme remains unchanged. Given a walk W , andtwo nodes u , u in the walk, the rank distances is calculated as follows: if the number of j -up and j -down edges in the walk from u to u is α j and β j , then r ( u ) − r ( u ) = Σ dj =1 ( β j − α j )Π dk = j +1 n k . Theremaining technical machinery does not depend on the square lattice, and carries over to rectangularlattices.A number of research directions and open problems are suggested by this research. Our coloringscheme and proof techniques should extend to other regular but non-rectangular lattices; we can showthis for planar hexagonal lattices but have not explored the idea fully. On the other hand, observabilityof general graphs, even planar graphs of bounded degree, appears to be quite challenging. It will alsobe interesting to explore observability under node-coloring .Finally, some of the small world graph models are essentially lattice graphs with few randomlong-range neighbors at each node [8, 13]. It will be interesting to extend our results to those graphs. References [1] J. Aslam, Z. Butler, F. Constantin, V. Crespi, G. Cybenko, and D. Rus. Tracking a movingobject with a binary sensor network. In
Proc. of SenSys , pages 150–161. ACM, 2003.[2] L. Bobadilla, O. Sanchez, J. Czarnowski, and S. LaValle. Minimalist multiple target trackingusing directional sensor beams. In
Proc. of IROS , pages 3101–3107, 2011.[3] K. A. Bush. Orthogonal arrays of index unity.
The Annals of Mathematical Statistics , 23(3):pp.426–434, 1952. 134] V. Crespi, G. Cybenko, and G. Jiang. The theory of trackability with applications to sensornetworks.
TOSN , 4(3), 2003.[5] A. Hedayat, N. Sloane, and Stufken J.
Orthogonal Arrays: Theory and Applications . Springer,1999.[6] Lopez I, M. Gamez, and R. Carreno. Observability in dynamic evolutionary models.
Biosystems ,73(2), 2004.[7] R. Jungers and V. Blondel. Observable graphs.
Discrete Appl. Math. , pages 981–989, 2011.[8] J. M. Kleinberg. The small-world phenomenon: an algorithm perspective. In
STOC , pages163–170, 2000.[9] D. Laschov, M. Margaliot, and G. Even. Observability of boolean networks: A graph-theoreticapproach.
Automatica , 49(8), 2013.[10] D. Lind and B. Marcus.
An introduction to symbolic dynamics and coding . Cambridge UniversityPress, 1995.[11] C.M. Ozveren and A.S. Willsky. Observability of discrete event dynamic systems.
AutomaticControl, IEEE Transactions on , 35:797–806, 1990.[12] N. Shrivastava, R. Mudumbai, U. Madhow, and S. Suri. Target tracking with binary proximitysensors.
ACM Transactions on Sensor Networks , 5(4), 2009.[13] D. J. Watts and S. H. Strogatz. Collective dynamics of small-world networks.
Nature , 393, 1998.14
Appendix: Omitted Proofs and Details
A.1 Omitted Proofs from Section 5
A.1.1 Proof of Lemma 5
The array has dimensions σ t × d , and its entries come from the set { , , . . . , σ − } , by construction.Thus, we only need to show that within any t columns of A , all rows are distinct. We prove thisby contradiction. Let j , j , . . . , j t , for 1 ≤ j < j < · · · < j t ≤ d be any t columns of A , andsuppose that two different rows with indices i and i , for i < i are identical over these columns.Let ( a , a , . . . , a t ) and ( b , b , . . . , b t ) denote the coefficients corresponding to polynomials used forrows i and i , respectively. Then, by Equation (1), the polynomial used to construct entries ofrow i is P i : a x t − + a x t − + · · · + a t , and the polynomial used to construct entries of row i is P i : b x t − + b x t − + · · · + b t . If these rows are identical, then we must have P i ( j k ) ≡ P i ( j k ) (mod σ ),for k = 1 , , . . . , t . This implies that j , j , . . . , j t are t distinct roots of the equation P i ( x ) − P i ( x )(mod σ ), which is not possible since this polynomial has degree t − t − Therefore, the rows i and i are not identical over the chosen t columns, proving that A is anorthogonal array. A.1.2 Proof of Lemma 9
Because ℓ = p − p , we have ℓ = P tk =1 ( a k − b k ) σ t − k . Perform a (mod σ t − k +1 ) operation on both sidesof the equality: ( a − b ) σ t − + · · · +( a t − b t ) ≡ c σ t − + · · · + c t . We get ( a k − b k ) σ t − k + · · · +( a t − b t ) ≡ c k σ t − k + · · · + c t (mod σ t − k +1 ), which is equivalent to ( a k − b k − c k ) σ t − k ≡ P ti = k +1 ( c i − a i + b i ) σ t − i (mod σ t − k +1 ). Because a i , b i , c i ∈ GF ( σ ), the right hand side clearly satisfies the following bounds: − σ t − k < t X i = k +1 ( c i − a i + b i ) σ t − i < σ t − k . But since a k , b k , c k on the left side are positive integers, there are only two feasible solutions: P ti = k +1 ( c i − a i + b i ) σ t − i ≡ σ t − k +1 ) or P ti = k +1 ( c i − a i + b i ) σ t − i ≡ σ t − k (mod σ t − k +1 ). Therefore, we musthave either a k − b k − c k ≡ σ ), or a k − b k − c k ≡ σ ). This completes the proof. A.1.3 Proof of Lemma 10
Suppose that the colors of e and e belongs to color groups C m and C m , respectively. Let us considerthe binary representations of m , m , namely, m = P tk =1 ( a k mod 2)2 t − k − and m = P tk =1 ( b k mod2)2 t − k − . If ( a k − b k ) ≡ a k − b k ) ≡ c k (mod σ )if c k is even; otherwise it equals c k + 1. Similarly, ( a k − b k ) ≡ a k − b k ) ≡ c k (mod σ ) if c k is odd (and c k + 1 otherwise). Because we can infer from the embedding whether a k > b k ,we can calculate a k − b k from a k − b k (mod σ ). Once we know all a k − b k , for k = 1 , , . . . , t we cancompute A r j − A r j (mod σ ) using Lemma 8. A.2 Omitted Proofs from Section 6
A.2.1 Proof of Lemma 12
Assume, without loss of generality, that the walk includes two consecutive edges e i = ( u i − , u i ) and e i +1 = ( u i , u i +1 ) with distinct colors c i and c i +1 under mod3 ( o ). We observe the following relationship Finite fields belong to unique factorization domains, and therefore a polynomial of order r over finite fields has aunique factorization, and at most r roots. e i ’s sign is positive, namely, d o ( u i − ) = d o ( u i ) −
1, we have c i +1 = c i + 1 mod 3 if e i +1 ’s sign is positive, and c i +1 = c i mod 3 if e i +1 ’s sign is negative. Similarly,when e i ’s sign is negative, namely, d o ( u i ) = d o ( u i − ) + 1, we have c i +1 = c i mod 3 if e i +1 ’s sign ispositive, and c i +1 = c i − c i = c i +1 mod 3, we conclude that e i +1 ’s sign ispositive if c i +1 = c ii