1 Introduction
Let be an integer. A addressing of a graph is a function for some natural number such that for any two vertices , the distance between and in the graph equals the number of positions such that the th entries of and are distinct and neither equals . Let denote the minimum for which such an addressing is possible. Addressings of length will be called optimal. The distance multigraph of the graph is the multigraph whose vertex set is , where the number of edges between equals the distance in between and . It is not too hard to see that equals the minimum number of complete multipartite graphs whose edges partition the edge multiset of the distance multigraph of , where each complete multipartite graph in the partition must have between and color classes.
For , Graham and Pollak [8] conjectured that for any connected graph with vertices. This conjecture, also known as the squashed cube conjecture, was proved by Winkler [15]. Graham and Pollak [8] proved the following result (which they attributed to Witsenhausen):
(1) 
where is the matrix whose entry is the distance in between and , and and
denote the number of positive and negative eigenvalues of
, respectively. Following Kratzke, Reznick and West [12], an addressing of of length will be called eigensharp. Note that eigensharp addressings are optimal. Graham and Pollak [8] proved that complete graphs, trees and odd cycles of order have eigensharp addressings of length and even cycles have eigensharp addressings of length . Elzinga, Gregory and Vander Meulen [5] proved that the Petersen graph does not have an eigensharp addressing and found an optimal addressing of it of length (one more than the lower bound (1)). Cioabă, Elzinga, Markiewitz, Vander Meulen and Vanderwoerd [4] gave two proofs showing that the Hamming graphs have eigensharp addressings and started the investigation of optimal addressings for the Johnson graphs. The Johnson graph has as vertices all the subsets of the set and two subsets and are adjacent if and only if . In this paper, we prove that by constructing an explicit addressing of with words of length . We answer a question from [4] and show that for . In the case of and , using the computer, we prove that which is smaller than our general bound above. The best known lower bound is (see [4, Theorem 5.3]).For , Watanabe, Ishii and Sawa [14] studied addressings and proved that . Note that the stronger result follows from the work of Gregory and Vander Meulen [9, Theorem 4.1] (see also [13]). In [14], the first three authors prove that the Petersen graph can be optimally addressed with words of length and show that for any even and any . For odd cycles, they prove that for and ask whether this statement is true for larger values of . In this paper, we determine that this is true for and , but fails for , where , and .
For , let denote the complete partite graph where each color class has exactly vertices. The problem of computing has been investigated by Hoffman [11] and Zaks [16]. Using the some small length addressings found by computer for and and a simple combinatorial blowup argument, we obtain the upper bounds below for any :
The lower bounds follow from (1) and unfortunately are quite far from our upper bounds.
We conclude our paper with an investigation of the typical value of for connected graphs on vertices. We start with computations describing the distribution of when ranges over all connected graphs with vertices. These computations led us to believe that for any fixed integer , almost all connected graphs of order must have , contradicting a suggested conjecture of Ron Graham from [7, page 148], where he writes that it is natural to guess that for almost all graphs on vertices. Motivated by these computations we have been able to prove our conjecture, showing that in fact for almost all graphs on vertices.
2 Johnson graphs
For any natural number , we use to denote the set . Let be two integers. The Johnson graph has as vertices all the subsets of the set and two subsets and are adjacent if and only if . When , the Johnson graph is the complete graph . When , the Johnson graph is the line graph of , also known as the triangular graph. Note that the distance between and in equals [3, p. 255].
To describe our addressing of , we need the following function. Let denote the family of all subsets of and let denote the powerset of a set . Define as follows. If , then . If , then let , with and and let with . Define
(2) 
For example, if and , then and .
Our addressing of each vertex of with words of length
(indexed by the ordered pairs of the form
with and ) is done by the following procedure:
If , then , else

if , then , else

if , then , else

if , then , else

if , , else

.
We give below three examples of this addressing in the cases of , , and . The superscripts in the tables below indicate the rule used for generating that symbol. Since the symbol can only be generated in step 1, we omit that superscript.

(3) 

(4) 

(5) 
We give two examples below where the order of our algorithm is significant to the output.

(6) 

(7) 
For , a pair is called good if
Let denote the number of good pairs. Our goal is to prove the following result which implies that our procedure on page 2 gives a valid addressing of .
Theorem 2.1.
For any .
Proof.
The following results gives a characterization of the good pairs and we will use it later in this section.
Lemma 2.2.
Let and . Then
if and only if the following three conditions are satisfied:
(8) 
and
(9) 
and
(10) 
Proof.
Assume that the conditions (8), (9) and (10) are true. From (8), we deduce immediately that and . Thus, is or . When evaluating , the first step fails since . If , then step 2 succeeds, we get and we are done. Otherwise, assume that . Step of evaluating fails because (10) is satisfied. If , then step 4 succeeds, and we are done. Otherwise, assume that . There exists such that . By condition (9), we must have that . Note that if , then we would have that , contradiction with . Thus, . But now step 5 is satisfied and . Thus, and .
Assume that and . From the definition on the previous page, we deduce that . Thus, (8) is true.
Assume that (9) is not true. Thus, there exists such that and . This implies that . When evaluating , step 1 obviously fails. Also, since , step 2 fails as well. Because , step 3 must also fail. Because , then step 4 must fail. Thus, in order to have , step 5 must succeed and therefore, there is such that . Now and provide a contradiction which shows that (9) is true.
Assume that (10) is not true. Thus, there exists such that and . Hence, and . When evaluating , step 1 obviously fails. Also, because , we must have that and step 2 fails. The existence of with the above properties implies that step 3 succeeds and , contradiction with . Thus, (10) is true and our proof is complete. ∎
For , let denote the graph with vertex set whose edges are the pairs in . When , the graph has no edges and when , is a matching. For , let denote the multigraph obtained as union of the graphs and . The nontrivial components of must be cycles or paths. We prove later in this section (Lemma 2.6) that the only cycle components possible are cycles of length , but first we will show that the distance in between and equals the number of path components in .
Lemma 2.3.
The set of vertices of degree one in equals . Consequently, the number of path components in equals .
Proof.
First, we show that has degree in if and only if .
Assume that has degree in . Without loss of generality, there exists such . This implies that . Also, we deduce that , as otherwise there would exist such that is an edge in implying that the degree of is 2, contradiction. Hence, .
Assume that . This means that and without loss of generality, assume that and . Because , there exists such that is an edge in . The edge is the only edge involving in . Because , it means that there is no such that . Hence, is not contained in any edges of . Thus, has degree in .
Secondly, we show that has degree in if and only if .
Assume that has degree in . Without loss of generality, there exists such that . This implies that . Also, , as otherwise there would exist such that is an edge in implying that the degree of is , contradiction. Hence, .
Assume that . Without loss of generality, assume that and . Because , there exists such that is an edge in . This edge is the only edge involving in . Because , it means that there is no edge involving in . Hence, has degree in . This finishes our proof. ∎
Our goal for the remaining part of this section will be to prove that each path component of contains exactly one good pair and that any other component of (isolated vertex or cycle) contains no good pairs.
For the remaining part of this section, let . Let be a nontrivial component of . Define the following:
Lemma 2.4.
Given any nontrivial component in , at least one of the following statements is true:

The vertex has degree one.

The vertex has degree one.

The edge is contained in both and .
Proof.
Assume that each claim above is false. If and are adjacent, then since , assume that . Because both and have degree two, there exists and such that and . Because , the definition of implies that , contradiction. If and are not adjacent (a case that we will see later in Lemma 2.8, never happens), then we can derive a contradiction in a similar manner. ∎
Lemma 2.5.
Given any nontrivial component in , at least one of the following is true:

The vertex has degree one.

The vertex has degree one.

The edge is contained in both and .
Proof.
The proof is similar to Lemma 2.4 and will be omitted. ∎
A consequence of Lemma 2.4 is that the only cycle components of are cycles of length (double edges joining a pair of vertices).
Lemma 2.6.
The graph does not contain cycles with more than vertices.
Proof.
If is a cycle component of , then each vertex has a degree two. Thus by Lemma 2.4, and must be doubly adjacent and each only adjacent to one another, and thus must be all the vertices of the cycle. ∎
This limits the cases of components in to just paths, isolated vertices, and doubly adjacent pairs of vertices. The following lemma uses Lemma 2.2 to give the first restriction on good pairs showing that the only possible good pairs are edges involving a vertex of degree one.
Lemma 2.7.
No edge in with both vertices of degree two is good.
Proof.
Let be an edge with both vertices and having degree two. Assume that . Thus there must exist such that . If , then is not satisfied. If , then is not satisfied. If , then there must also exist such that . Because , it must be that and is not satisfied. Thus, is not good. ∎
Lemma 2.8.
For any nontrivial component of , and are adjacent.
Proof.
We prove this result by contradiction. If and are not adjacent, then assume that for some . It must be that , and thus no edge from could contain (C). Thus, there is only one edge containing , say . As well, by how is constructed, there are no edges from that contain . However, this would result in and . Since both and have degree one, in this path component neither nor can have degree one and by Lemma 2.4, they are doubly adjacent, which can not happen in a path component. This contradiction disproves the assumption and proves the lemma. ∎
Lemma 2.9.
For any nontrivial component of , and are adjacent.
Proof.
The proof is similar to the one of the previous lemma and will be omitted. ∎
Lemma 2.10.
For any path component in , the only edge that is good is .
Proof.
By Lemma 2.8, and are adjacent and without loss of generality, suppose that . Because is a path, and (8) is satisfied. Because there is no in such that ,(9) is satisfied. Also, there is no in such that and thus (10) is satisfied. Hence, is good.
If the component is a single edge, then we are done. If has two or more edges, then the only other edge with a degree one vertex is as shown by Lemma 2.5 and Lemma 2.9. Because is not a single edge, one of or has degree one and the other has degree two. If has a degree of two, there exists such that is an edge and does not satisfy as . Otherwise, if has a degree of two, there is such that is an edge. In this case, does not satisfy , as . Hence, is not good if has two or more edges. ∎
2.1 An improved addressing
Given that for and for , it might be tempting to conjecture that for any integers . However, this fails for and where we found that . Under the obvious symmetries, there are exactly 246 equivalence classes of addressings of length 8, one of which we show below. We leave determining for other values of and as an open problem.

3 Odd cycles
Watanabe, Ishii and Sawa [14] studied the optimal addressings of various graphs. They observed the following pattern for odd cycles and asked the natural question whether for ?
By computation, we have confirmed these results as well as showing that . However, the pattern does not continue further and we have computed , , and . The first four of these values were verified by two independent programs. Examples of minimal addressings are below. It would be nice to determine in general.

Comments
There are no comments yet.