Possible and Impossible Vector Clock Sets Esteban Meneses and Francisco J. Torres-Rojas Abstract— It is well known that vector clocks capture perfectly the causality relationship among events in a distributed system. However, there are some interesting properties of vector clocks that are still to be explored. In particular, we are interested in discovering whether there is an efficient procedure for deciding if a given set of vector clocks is contained in some distributed history. We call this the possible vector clock set problem. Index Terms— Distributed Computing, Logical Clocks, Vector Clocks. I. I NTRODUCTION S OME relationships among events happening in real life can be deduced just by comparing the times when they happened. Typically, if event a occurred before event b we can say that a is potentially a cause for b. The same happens with events in a distributed system. The general problem here is to find a mechanism such that, given two arbitrary events a and b, it can be established which the causality relationship between them is or, if it were the case, conclude that both events are concurrent [6]. Vector clocks [3], [5] define a technique to de- termine precisely the causality relationship among events in a distributed system, including the con- current case. Given a distributed system with N sites, each site keeps a N entry vector of integers where the j-th entry accounts for the quantity of events occurred in site j that are known to this site. When event a happens at certain site, it is timestamped with the current vector clock of the site. There are a few, but precise, rules for updating local clocks when a message in sent or received. By comparing the vector clocks assigned to any two arbitrary events, it can be precisely determined the causality relation between them. Besides this well known property of vector clocks, there are still a Esteban Meneses (esteban.meneses@predisoft.com), Predisoft and Centro de Investigaci´ on en Computaci´ on e In- form´ atica Avanzada (CIenCIA), Costa Rica. Francisco J. Torres-Rojas (torres@ic-itcr.ac.cr), Costa Rica Institute of Technology and Centro de Investigaci´ on en Computaci´ on e Inform´ atica Avanzada (CIenCIA), Costa Rica. number of interesting questions about vector clocks that are worthy of exploring [8]. In particular, we propose the possible (or impos- sible) vector clock set problem, where, given an arbitrary, finite set of vector clocks, we are to find a distributed history that contains events timestamped with the vector clocks of the set. As we will show, there exist impossible sets, for which there are no distributed history that contains them. In Section II, some basic concepts about vector clocks are reviewed. The problem of possible sets of vector clocks is presented in Section III. Some properties of these logical clocks, useful for the problem at hand, are explained in Section IV. A preliminary approach to finding a distributed history that contains a given set of vector clocks is explored in Section V, and Section VI gives an example of the proposed technique. Finally, conclusions and future work are listed in Section VII. II. VECTOR CLOCKS Let’s assume a distributed system with N sites, where all the communications are made through message exchange. There are three kinds of events: internal, send and receive. The local history H i for site i is the total-ordered sequence of events H i =e i1 e i2 ... that are executed at site i. The global or distributed history H for the distributed system is the partially ordered set of events occurring at every site in the system. Leslie Lamport [4] proposed the concept of log- ical clocks, i.e., a mapping between events in a distributed history H and integer numbers that can be used to detect some of the causal relationships between events. Although they are very easy to implement, Lamport clocks cannot capture all the causality information. For example, concurrency between events is poorly detected. These clocks are consistent with causality, but they do not character- ize it [6]. Vector clocks [3], [5], [2], [6] consist of a map- ping between events in a distributed history H and