On local structures of cubicity 2 graphs

# On local structures of cubicity 2 graphs

## Abstract

A 2-stab unit interval graph (2SUIG) is an axes-parallel unit square intersection graph where the unit squares intersect either of the two fixed lines parallel to the -axis, distance () apart. This family of graphs allow us to study local structures of unit square intersection graphs, that is, graphs with cubicity 2. The complexity of determining whether a tree has cubicity 2 is unknown while the graph recognition problem for unit square intersection graph is known to be NP-hard. We present a polynomial time algorithm for recognizing trees that admit a 2SUIG representation.

Keywords: cubicity, geometric intersection graph, unit square intersection graph, 2-stab unit interval graph.

## 1 Introduction

Cubicity of a graph is the minimum such that is representable as a geometric intersection graph of -dimensional (axes-parallel) cubes [6]. The notion of cubicity is a special case of boxicity [6]. Boxicity of a graph is the minimum such that is representable as a geometric intersection graph of -dimensional (axes-parallel) hyper-rectangles. Given a graph it is NP-hard to decide if  [5] and  [3] for all . On the other hand, the family of graphs with boxicity 1 and the family of graphs with cubicity 1 are just the families of interval and unit interval graphs, respectively. The graph recognition problems for both these families are solvable in polynomial time.

Trees with boxicity 1 are the caterpiller graphs while all trees have boxicity 2. On the contrary, determining cubicity of a tree seems to be a more difficult problem. It is easy to note that trees with cubicity 1 are paths. For higher dimensions, Babu et al. [1] presented a randomized algorithm that runs in polynomial time and computes cube representations of trees, of dimension within a constant factor of the optimum. The complexity of determining the cubicity of a tree is unknown [1].

In a recent work [2], some new families of graphs, based on the local structure of boxicity 2 and cubicity 2 graphs were introduced and studied. A 2-stab unit interval graph (2SUIG) is an axes-parallel unit square intersection graph where the unit squares intersect either of the two fixed lines, called upper and lower stab lines, parallel to the -axis, distance () apart (see Fig. 1 for example). For convenience, let be the lower stab line and be the upper stab line where is a constant, for the rest of the article. The family of such graphs are called the 2SUIG family, introduced [2] for studying the local structures of cubicity 2 graphs. A geometric representation of the above mentioned type of a graph is called a 2SUIG representation of the graph. Given a 2SUIG representation of a graph , the vertices corresponding to the unit squares intersecting the upper stab line are called upper vertices and the vertices corresponding to the unit squares intersecting the lower stab line are called lower vertices. If a set of vertices are all lower (or upper) vertices then we say they are in the same stab.

In this article, we characterize all trees that admit a 2SUIG representation using forbidden structures. In particular, we prove the following:

###### Theorem 1.1.

Determining whether a given tree is a 2SUIG can be done in time.

If a tree is a 2SUIG, then our algorithm can be used to find a 2SUIG representation of it. Our algorithm finds a forbidden structure responsible for the tree not having a 2SUIG representation. In particular, 2SUIG is a graph family with cubicity (and boxicity) 2 which contains the family of unit interval graphs as a subfamily. Moreover, the family of 2SUIG graphs is not perfect [4] as 5-cycle has a 2SUIG representation (see Fig. 1). So our work, to the best of our knowledge, is the first non-trivial work on recognizing subclass of trees with cubicity 2.

## 2 Preliminaries

To prove our results we will need several standard and non-standard definitions which we will present in this section.

Let be a graph. The set of vertices and edges are denoted by and , respectively. A vertex subset of is an independent set if all the vertices of are pairwise non-adjacent. The cardinality of the largest independent set of is its independence number, denoted by .

Let be a unit square intersection graph with a fixed representation . We denote the unit square in corresponding to the vertex of by . In this article, by a unit square we will always mean a closed unit square. The co-ordinates of the left lower-corner of is denoted by . Given a graph with a 2SUIG representation and two vertices we say if and if (see figure 2). Let be a connected subgraph of . Consider the union of intervals obtained from the projection of unit squares corresponding to the vertices of on axis. This so obtained interval is called the span of in .

A leaf is a vertex with degree 1. A caterpillar is a tree where every leaf vertex is adjacent to a vertex of a fixed path. A branch vertex is a vertex having degree more than 2. A branch edge is an edge incident to a branch vertex. A claw is the complete bipartite graph . Given a 2SUIG representation of a graph , an edge is a bridge edge if and intersect different stab lines.

Let be a path with a 2SUIG representation . The path is a monotone path if either or . Let be a monotone path with and all ’s are in the same stab. Observe that are tight bounds for . Fix some constant for the rest of this article. A monotone representation of is stretched if and is shrinked if (see Fig. 3). The value of will not affect our proof. If all the vertices of are in the same stab, then must be monotone. So, a path like can have four different such 2SUIG representations:

• lower-right monotone: all the vertices of the path are lower vertices with ;

• upper-right monotone: all the vertices of the path are upper vertices with ;

• lower-left monotone: all the vertices of the path are lower vertices with ;

• upper-left monotone: all the vertices of the path are upper vertices with .

The first two types of monotone paths are called right monotone and last two types are called left monotone.

A path is called a folded path if it has a degree two vertex such that either for all or for all .

A red edge of a tree is an edge such that each component of contains a claw. A red path is a path induced by red edges. A maximal red path is a red path that is not properly contained in another red path. Let be a maximal red path in . The vertices and are endpoints of .

## 3 Proof of Theorem 1.1

Given a tree , here our objective is to determine whether has a 2SUIG representation. Let be a fixed tree. We will now prove several necessary conditions for being a 2SUIG. On the other hand, we will show that these conditions together are also sufficient and can be verified in time.

### 3.1 Structural properties

We will start by proving some structural properties of assuming it is a 2SUIG.

###### Lemma 3.1.

If has a 2SUIG representation, then its vertices have degree at most four.

###### Proof.

Let be a vertex of . Any unit square intersecting must contain one of the four corners of . Therefore, if has degree greater than four, then at least two unit squares will contain the same corner of creating a 3-cycle. ∎

Note that the above lemma can easily be extended for trees that are unit sqaure intersection graphs.

A tree that admits a 2SUIG representation does not necessarily have a red edge. But if has at least one red edge then the red edges of must induce a path.

###### Lemma 3.2.

If has a 2SUIG representation, then either has no red edge or the set of red edges of induces a connected path.

###### Proof.

Let has at least one red edge and be the graph induced by all red edges. First we will show that is connected. Thus, assume that has at least two components and . Then there is a path in connecting and . Note that removing an edge of creates two components of each of which contains a claw. Thus, should be a red edge. Therefore, is connected.

Now we will show that is a path. Assume that is a vertex of with degree at least 3. Also, let and be three neighbors of in . In any 2SUIG representation of , at least three corners of must be intersected by and . Without loss of generality, we assume that intersects the upper-left corner of , intersect the upper-right corner of , and intersects the left lower-corner of . This implies that intersect the upper stab line while intersects the lower stab line.

Note that a claw has a 2SUIG representation. Any such representation of a claw will have squares intersecting the upper stab line and squares intersecting the lower stab line. As each component of has a claw, there must be a path of the form in such that for all where intersects the lower stab line. Similarly, as each component of has a claw, there must be a path of the form in such that for all where intersects the lower stab line. Moreover, as each component of has a claw, there must be a path of the form in where intersects the upper stab line. This will force a cycle in the representation of , a contradiction. Thus, must be a path. ∎

The above result leads us to two cases: when has a red path and when does not have any red path. Note that by Lemma 3.2, if is a 2SUIG, then either has no red edge or the red edges induces a path in . If the red edges of induces a path , then construct the extended red path by including the edge(s), that are not red, incident to the endpoint(s) of that have degree two in . In particular, if both the end points of are branch vertices, the extended red path . On the other hand, if has no red edges, then distance between any two branch vertices is at most 2. Thus, there exist a vertex in whose closed neighborhood contains all the branch vertices of . Choose (if not found to be unique) one such special vertex . If has degree two then consider the path induced by the closed neighborhood of and call it the extended red path of . If does not have degree two, then the extended red path of is the singleton vertex . In any case, rename the vertices of the extended red path so that we can speak about it in an uniform framework along with the case having red edges. We fix such an extended red path for the rest of this article. The vertices of this extended red path are called the red vertices.

###### Lemma 3.3.

If has a 2SUIG representation and does not have any red edge, then the number of branch vertex in is at most 5.

The above follows directly from the fact that the vertices of has degree at most four.

###### Lemma 3.4.

If has at most one branch vertex with degree at most four, then has a 2SUIG representation.

###### Proof.

If has no branch vertices, then is a path which admits a unit interval representation. On the other hand, with one branch vertices of degree at most four is a subdivision of or . These graphs clearly admit 2SUIG representation. ∎

The next result will provide intuition about how a tree having a 2SUIG representation looks like.

###### Lemma 3.5.

A branch vertex of a tree is either a red vertex or is adjacent to a red vertex.

###### Proof.

If has no red edges, then there exists a red vertex in such that all the branch vertices are in the closed neighborhood of .

Thus suppose that the red edges of induces a path. Let a red vertex and a non-red branch vertex be connected by a path with no red edges of length at least 2. Clearly after deleting this path, the component containing contatins a claw. Thus if we delete the edge of the path incident to , then both the components of contains a claw, a contradiction. ∎

Note that if is a 2SUIG tree with at least two branch vertices, then the endpoints and of the extended path must be branch vertices of . Assume that be the branch vertices of where .

The neighbors of red vertices that are not red are called agents. An agent is adjacent to exactly one red vertex, say , of . We call is an agent of in this case.

If we delete all the red vertices and agents from a 2SUIG tree then by Lemma 3.5 we will be left with some disjoint paths. Each such path actually starts from (that is, is one endpoint of) one of the agents. Let be a path where is an agent and the other vertices are neither agent nor red vertices. Also are degree 2 vertices and is a leaf. Then the path is called a tail of agent . Let be an agent of the red vertex . Sometimes we will also use the term “tail of the red vertex ”. Deleting the tail is to delete all the vertices of . The red vertex , all its agents and tails are together called and its associates for each . Note that an agent has exactly two tails by allowing tails with zero vertices. Let us set the following conventions: the tails of an agent are the long tail and the short tail such that where and denotes the number of vertices in the respective tails. Now we have enough nomenclatures (see Fig. 4) to present the rest of the proof.

Observe that if we delete all the tails of a 2SUIG tree , then we are left with a caterpillar with maximum degree at most 4. This is an interesting observation as we know that a tree is an interval graph if and only if it is a caterpillar graph.

### 3.2 Partial description of the canonical representation

Till now we have proved some structural properties of a 2SUIG tree. Now we will discuss about the structure of its 2SUIG representation. In the following, we will show that there is a canonical way to represent a 2SUIG tree. First we will describe the representation of the extended red path followed by representation of the agents and their tails.

###### Lemma 3.6.

If is a 2SUIG with at least one red edge, then there exists a 2SUIG representation where the extended red path of is monotone.

###### Proof.

Let be the extended red path of with a representation . If is not monotone then one of the following is true. (i) is a folded path. (ii) There are three vertices such that and where and for all we have .

(i) There is a vertex with for all . Then there will be two claws in two different components of with for all . But as is a 2SUIG, this configuration will force a cycle in it. This is a contradiction.

(ii) Without loss of generality assume intersects the lower stab line. Then and must intersect the upper stab line. Let be the component of obtained by deleting the edge and contains . There is a claw in with for all . Thus, an agent of with is not a branch vertex as otherwise this will force a cycle. Hence its tail can be presented by a lower-right monotone representation. Therefore, we can translate (rigid motion) the component to the right to obtain a 2SUIG representation of where the extended red path is monotone. ∎

Similarly it can be shown that if is a 2SUIG with no red edge, still it admits a representation where the extended red path is monotone. The proof can be argued in a way similar to the proof of Lemma 3.6.

Now we will show that it is possible to streach the monotone extended red path without much problem. The following result is also applicable for trees without red edges.

###### Lemma 3.7.

If admits a 2SUIG representation with a monotone extended red path, then there exists a 2SUIG representation where is stretched.

###### Proof.

Let be an edge of the extended red path with in . Let and be the components of containing and , respectively. Now translate (rigid motion) the component to the right obtaining a 2SUIG representation with . We are done by performing this operation on every edge of . ∎

We turn our focus on the bridge edges of the extended red path.

###### Lemma 3.8.

If admits a 2SUIG representation with a stretched monotone extended red path, then there exists a 2SUIG representation where every red bridge vertex is a branch vertex.

###### Proof.

Let be a right monotone extended red path of with respect to . Let be a bridge edge of the extended red path where is not a branch vertex. Also assume that a bridge vertex is a branch vertex for all .

Let . Let be the graph induced by . Note that contains the vertex . Now consider the reflextion of the 2SUIG representation of induced by with respect to the -axis. This will give us a picture where every unit square corresponding to the vertices of lies under the -axis. This is a particular unit square representation of which in fact is also a 2SUIG representation of it if we consider the stab lines to be and . In this 2SUIG representation , the lower vertices with respect to of became upper vertices and vice versa. Now translate the unit square representation upwards until all the upper vertices (with respect to ) of intersects , all the lower vertices intersect . Note that can have at most one degree 2 agent in and thus, that agent can have at most one tail. After what we did above, we can adjust the -co-ordinates of that agent and its tail, if needed, to obtain a 2SUIG representation of .

We will be done by induction after handling one more case. The case where is the first bridge vertex of which is not a branch vertex while is a branch vertex. Let and let be the graph induced by . To achieve our goal, we do the exact same thing with that we did with . This will provide us a 2SUIG representation of where each bridge vertex is a branch vertex for all . Hence we are done by induction. ∎

After proving that the extended red path is stretched and monotone we will prove the opposite for tails in the following sense:

###### Lemma 3.9.

If admits a 2SUIG representation , then there exists a 2SUIG representation where each tail is a shrinked monotone path and all its vertices are in the same stab.

###### Proof.

Let be a tail of agent . Note that if all vertices of the tail are in the same stab then must be monotone. Furthermore, if is not shrinked in then we can shrink it to obtain a new representation of without changing anything else of .

Therefore, to complete the proof, let us assume that not all vertices of are in the same stab. Then at least one edge of is a bridge edge. Any brige edge divides the stab lines into two parts, left and right. Assume, without loss of generality, that is in the left part. Thus, as there are no branch vertices in the tail, we do not have any vertex with lying in the right part. Thus, we can modify the representation by placing all the vertices of the tail in the same stab making use of the empty right part. ∎

### 3.3 Properties of the canonical representation

According to the preceding discussions, we know that if is a 2SUIG, then it admits a representation where its extended red path is a monotone stretched path. Without loss of generality, assume that is such a 2SUIG representation of . The other vertices of are the agents and the vertices of the tails. Note that the endpoints and can have at most 3 agents and 6 tails while the other red vertices can have at most 2 agents and 4 tails.

###### Lemma 3.10.

Let be a 2SUIG tree with a representation where the extended red path is a stretched right monotone path and satisfies the conditions of Lemma 3.8 and 3.9.

• If each right monotone tail of is such that it is not possible to make the tail left monotone and obtain a 2SUIG representation of from without changing anything else, then any red vertex other than has at most one right monotone tail having at least two vertices.

• If each left monotone tail of is such that it is not possible to make the tail right monotone and obtain a 2SUIG representation of from without changing anything else, then any red vertex other than has at most one left monotone tail having at least two vertices.

###### Proof.

Let () be a red vertex of with at least two monotone tails. Without loss of generality, assume that is a lower vertex. Note that contains either the upper-right corner or the lower-right corner of . Let be an agent of .

• If contains the lower-left corner of , then cannot have a right monotone tail for any as contains the upper-left corner of . If , then a right monotone tail of must be upper-right monotone. This means is a bridge edge. This will mean, there is no upper vertex in with . Thus, if we make the tail an upper-left monotone tail instead (we keep the position of as before but change the positions of the other vertices of ), then we obtain a 2SUIG representation of . But this should not be possible according to the assumptions. Hence cannot have a right-monotone tail for any red vertex ().

• If contains the upper-left corner of , then can indeed have an upper-right monotone tail. Note that, in this case, can have at most one right monotone path, an upper-right monotone that is. If some other neighbor of contains the upper-right corner of , then the right monotone tail of can have at most one vertex in order to avid cycles in .

• If contains the upper-right corner of , then can have at most one right monotone tail, an upper-right monotone tail to be specific, as this situation implies that contains the lower-right corner of .

Therefore, only the agents containing upper-left corner or upper-right corner of can have at most one right monotone tail each. But if both types of agents are present, then the right monotone tail of the agent containing upper-left corner of can have at most one vertex.

This proof can be done similarly like . ∎

From the above we can infer the following:

###### Lemma 3.11.

Let be a 2SUIG tree with a representation where a lower (or upper) red vertex has two upper (or lower) neighbors.

• If the left neighbor is an agent then it can have at most one right monotone tail having at most one vertex.

• If the right neighbor is an agent then it can have at most one left monotone tail having at most one vertex.

• If both the neighbors are agents then the left neighbor can have a right monotone tail and the right neighbor can have a left monotone tail having one vertex each.

In the above lemma, the third case is to say that the worst case scenarios of the first two cases can take place simultaniously. Now we will discuss the length of the tails that can be accommodated between two red branch vertices.

###### Lemma 3.12.

Let be a 2SUIG tree with a representation with a stretched right monotone extended red path . Let , ( is possible) be two red branch vertices such that has a right monotone tail and has a left monotone tail in the same stab with no vertex of satisfying where are the leaf vertices of the tails , respectively. Then, depending on the positions of the corresponding agents of and of , must satisfy one of the following conditions:

• If and , then ;

• If and , then ;

• If and , then ;

• If and , then ;

where is the path induced by and is the path induced by .

###### Proof.

Let and and . As is stretched and and are both shrinked we have . This implies and hence condition .

The other conditions can be proved similarly. ∎

In our prescribed representation of , assuming it is a 2SUIG, bridge edges of the extended red path are induced by red branch vertices. Here we show that if two adjacent red vertices have degree 4 each, then they must be branch vertices.

###### Lemma 3.13.

If two adjacent red vertices both have degree 4, then they must be in different stabs.

###### Proof.

Without loss of generality assume that is such an edge where are both degree 4 lower vertices with . Then either the upper-right corner of is contained in or the upper-left corner of is contained in . If the upper-right corner of is contained in , then cannot have more than three neighbors as no neighbor other than can contain one of the right corners of . We can argue similarly for the other case as well. ∎

### 3.4 The canonical representation

In this section suppose that is a tree with maximum degree 4 such that either there is no red edge or the red edges induces a path. We will try to obtain a 2SUIG representation of and if our process fails to obtain such a presentation, then we will conclude that is not a 2SUIG. Also assume that the extended red path of is . Due to Lemma 3.6 and 3.7 we can assume that is a stretched right monotone path and is a lower vertex.

Our strategy is to first represent and its associates and then to represent and its associates one by one in accending order of indices where . In each step our strategy is to represent and its associates in such a way that the maximum value of is minimized where is a vertex from and its associates.

Note that the main difficulty is to represent and its associates when as otherwise do not have any agents or tails. We start off with the following useful lemma.

###### Lemma 3.14.

There exists a 2SUIG representation, satisfying all the properties of the canonical representation proved till now, with and in the same stab if and only if either or .

###### Proof.

The “only if” part follows from Lemma 3.13. The “if” part can be proved similarly like the proof of Lemma 3.8. ∎

The above result completely determines when will be in the lower stab and when it will be in the upper stab.

#### Representation of a1 and its associates when k≠1

First we will handle the case . Now we are going to list out the way to obtain the canonical representation of and its associates and the conditions for it to be valid through case analysis. Also in any representation the agents intersecting the lower-left corner, the upper-left corner, the upper-right corner and the lower-right corner of are renamed as and , respectively. The conditions below are simple conditions for avoiding cycles in the graph.

• . In this case is an upper vertex by Lemma 3.13, intersects the upper-right corner of and the three agents of are .

• is shrinked lower-left monotone and is shrinked upper-left monotone.

• is shrinked upper-left monotone and is shrinked upper-right monotone.

• and if , then .

• .

• . In this case is a lower vertex by Lemma 3.14, intersects the upper-right corner of and the two agents of are .

• conditions (1)–(3) of Case 1.

• . In this case is a lower vertex by Lemma 3.14, intersects the lower-right corner of and the three agents of are .

• condition (1)–(3) from Case 1.

• , is shrinked upper-left monotone and is shrinked upper-right monotone.

• . In this case is a lower vertex by Lemma 3.14, intersects the lower-right corner of and the two agents of are .

• is shrinked lower-left monotone and is shrinked upper-left monotone.

• if , then is shrinked upper-right monotone with and is shrinked upper-left monotone .

• if , then is shrinked upper-left monotone and is shrinked upper-right monotone .

• . In this case is a lower vertex by Lemma 3.14, intersects the lower-right corner of and the three agents of are .

• condition (1)–(3) from Case 1.

• if , then is shrinked upper-left monotone and is shrinked upper-right monotone.

• if , then and is shrinked upper-right monotone and is shrinked upper-left monotone.

• . In this case is a lower vertex by Lemma 3.14, intersects the lower-right corner of and the two agents of are from .

• is shrinked lower-left monotone and is shrinked upper-left monotone.

• if both exists and , then is shrinked upper-left monotone and is shrinked upper-right monotone.

• if both exists, and , then is shrinked upper-left monotone and is shrinked upper-right monotone.

• if both exists, and , then is shrinked upper-left monotone and is shrinked upper-right monotone with .

• there is no case when both exists as we can always modify this representation by making the agent playing the role of play the role of instead.

• there is no case when both exists with as we can always modify this representation by making the agent playing the role of play the role of instead.

• there is no case when both exists with and as we can always modify this representation by making the agent playing the role of play the role of instead.

• if both exists, and , then is shrinked upper-left monotone and is shrinked upper-right monotone.

• if both exists, and , then is shrinked upper-left monotone with and is shrinked upper-right monotone.

The square must intersect one of the right corners of . In each of the cases listed above, there can be at most possible ways of in which the agents of can play the role of . Among all possible ways those which satisfies the above conditions, we choose the one for which the leaf of the right-monotone tail of (only when does not exist) or ( cannot exist) or ( cannot exist) is minimized with respect to . As there are at most a constant number of probes to be made, this is achieveable in constant time. Moreover, such a representation, if found, will be called the optimized representation of and its associates. Otherwise, is not a 2SUIG.

#### Representation of a1 and its associates when k=1

Now we will handle the case . Let be a lower vertex and the agents intersecting the lower-left corner, the upper-left corner, the upper-right corner and the lower-right corner of are renamed as and , respectively. The agents should follow the conditions listed below. These are simple conditions for avoiding cycles.

• is shrinked lower-left monotone and is shrinked upper-left monotone where .

• is shrinked upper-left monotone and is shrinked upper-right monotone where .

• is shrinked upper-left monotone and is shrinked upper-right monotone where .

• is shrinked lower-right monotone and is shrinked upper-right monotone where .

• either or .

• if does not exist, then either or .

• if both exist, then .

• either or .

• if does not exist, then either or .

As there are at most a constant number of probes to be made, this is achieveable in constant time. For this special case too, such a representation, if found, will be called the optimized representation of and its associates. Otherwise, is not a 2SUIG.

#### Representation of ai and its associates for all 1<i<k

Now we will inductively describe the canonical representation of and its associates given the canonical representation of and its associates for all and the conditions for it to be valid through case analysis. Note that as the way of having the canonical representation of and its associates is known, the conditions listed below is readily applicable for finding the canonical representation of and its associates. Furthermore, it is applicable for finding the canonical representation of and its associates by induction for all as is a parameter that we need to know for finding a representation.

Throughout the case analysis we will assume without loss of generality that is an upper vertex. Also assume that be the maximum such that ( is possible). Moreover, in any representation the agents intersecting the lower-left corner, the upper-right corner and the lower-right corner of are renamed as and , respectively. The conditions below are simple conditions for avoiding cycles in the graph.

• If exists and is a lower vertex, then and is a lower-left shrinked monotone path satisfying conditions of Lemma 3.12.

• If exists, is an upper vertex and either or exists, then is a lower-right shrinked monotone path with and is a lower-left shrinked monotone path satisfying conditions of Lemma 3.12.

• If exists, is an upper vertex and neither nor exists, is shrinked lower-left monotone satisfying conditions of Lemma 3.12 and is shrinked lower-right monotone where .

• If exists with being an upper vertex, then and is an upper-right shrinked monotone path.

• If exists with being a lower vertex, then has an upper-left monotone tail satisfying and an upper-right monotone tail with some .

• If exists with being an upper vertex and also exists, then has a lower-left monotone tail satisfying and a lower-right monotone tail with some .

• If exists with being an upper vertex and does not exist, then has a lower-left monotone tail conditions of Lemma 3.12 and a lower-right monotone tail with some .

• If exists with being a lower vertex, then and is a lower-right shrinked monotone path.

In each of the cases listed above, there can be at most possible ways of in which the agents of can play the role of . And for each agent playing the role of the tails can play the role of in different ways for each . Thus there can be at most possible ways in which and its associates can be represented. Among all possible ways those which satisfies the above conditions, we choose the one for which the leaf of the right-monotone tail of ( cannot exist) or ( cannot exist) is minimized with respect to . As there are at most a constant number of probes to be made, this is achieveable in constant time. Moreover, such a representation, if found, will be called the optimized representation of and its associates. Otherwise, is not a 2SUIG.

#### Representation of ak and its associates

The canonical representation of and its associates is relatively simpler. Note that can have at most 3 agents and each of them can have at most 2 tails. Suppose that in any representation the agents intersecting the lower-left corner, the upper-right corner and the lower-right corner of are renamed as and , respectively. Without loss of generality assume that is an upper vertex. Then our goal will be to find a representation of and its associates which satisfies the following conditions.

• If exists with being a lower vertex, then and is a lower-left shrinked monotone path satisfying conditions of Lemma 3.12.

• If exists with being an upper vertex and exists, then . Moreover, if , then is a lower-right shrinked monotone path and is a lower-left shrinked monotone path satisfying conditions of Lemma 3.12. Otherwise, is a lower-right shrinked monotone path and is a lower-left shrinked monotone path satisfying conditions of Lemma 3.12.

• If exists with being an upper vertex, does not exist and exists with , then . Moreover, if , then is a lower-right shrinked monotone path and is a lower-left shrinked monotone path satisfying conditions of Lemma 3.12. Otherwise, is a lower-right shrinked monotone path and is a lower-left shrinked monotone path satisfying conditions of Lemma 3.12.

• If exists with being an upper vertex, does not exist and exists with , then is a lower-right shrinked monotone path and is a lower-left shrinked monotone path satisfying conditions of Lemma 3.12.

• If exists with being an upper vertex, then is a lower-right shrinked monotone path and is an upper-right shrinked monotone path. Moreover, if exists, then .

• If has an upper-right monotone tail with and is a lower vertex, then cannot exist.

• If exists with being a lower vertex and exists with