Thinness and its variations on some graph families and coloring graphs of bounded thinness

Interval graphs and proper interval graphs are well known graph classes, for which several generalizations have been proposed in the literature. In this work, we study the (proper) thinness, and several variations, for the classes of cographs, crowns graphs and grid graphs. We provide the exact values for several variants of thinness (proper, independent, complete, precedence, and combinations of them) for the crown graphs $CR_n$. For cographs, we prove that the precedence thinness can be determined in polynomial time. We also improve known bounds for the thinness of $n \times n$ grids $GR_n$ and $m \times n$ grids $GR_{m,n}$, proving that $\left \lceil \frac{n-1}{3} \right \rceil \leq \mbox{thin}(GR_n) \leq \left \lceil \frac{n+1}{2} \right \rceil$. Regarding the precedence thinness, we prove that $\mbox{prec-thin}(GR_{n,2}) = \left \lceil \frac{n+1}{2} \right \rceil$ and that $\left \lceil \frac{n-1}{3} \right \rceil \left \lceil\frac{n-1}{2} \right \rceil + 1 \leq \mbox{prec-thin}(GR_n) \leq \left \lceil\frac{n-1}{2} \right \rceil^2+1$. As applications, we show that the $k$-coloring problem is NP-complete for precedence $2$-thin graphs and for proper $2$-thin graphs, when $k$ is part of the input. On the positive side, it is polynomially solvable for precedence proper $2$-thin graphs, given the order and partition.


Introduction
This work studies the classes of -thin and proper -thin graphs, which generalize interval and proper interval graphs, respectively.A graph  is an interval graph if there is a mapping of  () on intervals of the real line, each  ∈  () corresponding to the interval   , such that (, ) ∈ () if and only if   ∩   ̸ = ∅ for all distinct ,  ∈  ().Moreover,  is called a proper interval graph if there is such a mapping of vertices to intervals such that   ̸ ⊆   for all distinct ,  ∈  ().There are several characterizations and recognition algorithms for interval and proper interval graphs [8,17,18].A well known characterization for interval graphs is the following: Theorem 1 ( [17]).A graph  is an interval graph if and only if there is an ordering  of  () such that, for any triple (, , ) of vertices of  () ordered according to , if (, ) ∈ (), then (, ) ∈ ().
The ordering  of Theorem 1 is said to be a canonical ordering or interval ordering.An analogous characterization for proper interval graphs is described next.Theorem 2 ( [18]).A graph  is a proper interval graph if and only if there is an ordering  of  () for which  and its reversal are both canonical.
The ordering  of Theorem 2 is said to be a proper canonical ordering or proper interval ordering.A -thin graph  is a graph for which there is a -partition  = ( 1 ,  2 . . .,   ) of  (), and an ordering  of  () such that, for any triple (, , ) of vertices of  () ordered according to , if ,  ∈   for some 1 ≤  ≤  and (, ) ∈ (), then (, ) ∈ ().Such an ordering  is said to be consistent with .A graph  is called a proper -thin graph if  () admits a -partition  of  () and an ordering  such that both  and its reversal are consistent with .An ordering of this type is said to be strongly consistent with .
Although not all graphs  are (proper) interval graphs, all of them are (proper) -thin graphs for some  ≥ 1.This is so because if  = | ()|, any ordering of  () is (strongly) consistent with the unique possible partition in which each part consists of a single vertex.Moreover, since (proper) interval graphs are precisely the (proper) 1-thin graphs, the parameter  of (proper) -thin graphs measures "how far" a graph is from being a (proper) interval graph.
Under such classes, some NP-complete problems can be solved in polynomial time, as proved in [1,2,16].For instance, generalized versions of -coloring are polynomial-time solvable for graphs of bounded thinness, when the number of colors  is also a constant [1,2].Despite that, the complexity of -coloring on graphs with bounded thinness at least two is open when  ≥ 3 is part of the input (it is polynomial-time solvable for 1-thin graphs, i.e., interval graphs [14]).
Variations of the concept of (proper) thinness have been studied in the literature, by constraining either the vertices that can share a part in the partition, or how vertices can be arranged in the ordering.The classes of precedence -thin and precedence proper -thin graphs were defined in [6], as (proper) -thin graphs such that the vertices belonging to a same part must be consecutive in the (strongly) consistent ordering.It still holds that precedence (proper) 1-thin graphs are equivalent to (proper) interval graphs.In [6], among other results, it was presented a characterization of such classes based on threshold graphs.In [5], there have been defined the classes of (proper) -independent-thin and (proper) -complete-thin graphs, for which each part of the partition must be an independent and a complete set, respectively.The authors proved some bounds on the thinness for such variants for some graphs operations.In [4], it is proved that 2-independent-thin graphs are equivalent to interval bigraphs, and that proper independent 2-thin graphs are equivalent to bipartite permutation graphs, so (proper) -independent-thin graphs can be seen as generalizations of those classes.
The crown graph CR  is the graph obtained from a complete bipartite graph  , by removing a perfect matching.It was proven in [5] that thin(CR  ) ≥  2 .The grid graph GR , is defined as the Cartesian product of two path graphs   and   .We denote GR , simply by GR  .It was proved in [16] that   4 ≤ thin(GR  ) ≤ +1.In [9], the upper bound for thin(GR  ) was improved to ⌈︀ 2 3 ⌉︀ .In this work, we provide a characterization of consistent solutions for the crown graphs CR  , and solve all known variants of the thinness parameter for this class.With respect to the grid graphs, we prove that the thinness of GR  is at least ⌈︀ −1

⌉︀
, which are tighter lower and upper bounds than the ones found in the literature.Also, we show that the precedence thinness of GR of the disjoint union and join of two graphs in terms of their precedence thinness, thus proving that it is possible to efficiently compute the precedence thinness of cographs.In Section 5, we prove lower and upper bounds for the thinness and precedence thinness of grid graphs, improving the previously known ones.In Section 6, we prove that the -coloring problem is NP-complete for both precedence 2-thin and proper 2-thin graphs when  is part of the input, but polynomially solvable for precedence proper 2-thin graphs.Also, we show that precedence proper 2-thin graphs are perfectly orderable.Finally, some concluding remarks are presented in Section 7.

Preliminaries
Let  be a graph.We denote by  () its vertex set and by () its edge set.The size (cardinality) of a set  is denoted by ||.Let ,  ∈  (),  and  are adjacent if (, ) ∈ ().
The subgraph of  induced by the subset of vertices  ′ ⊆  (), denoted by Let  ∈  ().The (open) neighborhood of , denoted by   (), is defined as When  is clear in the context, it may be omitted from the notation.
A clique or complete set (resp.stable set or independent set) is a set of pairwise adjacent (resp.nonadjacent) vertices.The clique graph   is the graph such that  (  ) is a clique.
Let  = (, ), the complement of  is defined as The union of  1 and  2 is the graph , and the join of  1 and  2 is the graph . (The join is sometimes also noted by  1 ⊗  2 , but we follow the notation in [1]).
The class of cographs can be defined as the graphs that can be obtained from trivial graphs by the union and join operations [13].
The thinness (resp.proper thinness) of , or thin() (resp.pthin()), is defined as the minimum value  for which  is a -thin graph (resp.proper -thin graph).Similarly, the other types of thinness have their related parameters, listed next.With respect to each restriction, we have -the precedence thinness of , or prec-thin(); -the independent thinness of , or thin ind (); -the complete thinness of , or thin cmp (); -the precedence proper thinness of , or prec-pthin(); -the independent proper thinness of , or pthin ind (); -the complete proper thinness of , or pthin cmp ().Also, as some of those restrictions can be combined, this leads to the following parameters: -the precedence independent thinness of , or prec-thin ind (); -the precedence complete thinness of , or prec-thin cmp (); -the precedence independent proper thinness of , or prec-pthin ind (); -the precedence complete proper thinness of , or prec-pthin cmp ().
A graph  is bipartite if its vertex set can be partitioned into two independent sets, and this is denoted by  = ( 1 ∪  2 , ), where  1 and  2 are independent.The complete bipartite graph  , is a bipartite graph such that For a graph  and ,  ⊆  () such that  ∩  = ∅, the bipartite graph induced by the two subsets, denoted by [, ], is the bipartite graph [, ] = ( ∪ ,  ′ ), where  ′ ⊆ () are the edges with one endpoint in  and one endpoint in .
A matching ℳ of a graph  is defined as a set of pairwise non-adjacent edges of .If all vertices in  () are endpoints of the edges in ℳ, then ℳ is said to be a perfect matching.
For  ⊆ , let first() and last() be the smallest and the greatest elements of  according to <, respectively.We say  is consecutive in  according to < if there is no  in  ∖  such that first() <  < last().Notice that for each  ∈ , there are at most two elements  ∈  such that {, } is consecutive in  according to <. Namely, if the elements of  are ordered  1 < • • • <   and  =   , such two elements are  −1 when  > 1 and  +1 when  < .
Lemma 3 (Alternative characterization for strong consistency [7]).Given a graph , an ordering < of  () and a partition  of  () are strongly consistent if and only if for every  ∈  () and every  ∈ , the set Given a graph , a partition  of  () and an ordering  of  (), we say that the pair (, ) is a solution which is (strongly) consistent if  is a (strongly) consistent ordering with respect to  and .
Given an order < and a partition of the vertices, we say that a triple (, , ) breaks the consistency meaning that  <  < ,  and  belong to the same class, and there is an edge between  and  but there is no edge between  and .
Let  be a graph,  be an induced subgraph of , and let  be one of the parameters under study in this paper (i.e., those appearing in Tab. 1).An observation that we will use often in the proofs of lower bounds is that  () ≤  ().This holds because the order and partition of  () involved in the definition of  , when restricted to  (), preserve all the desired properties in , i.e., consistency, strong consistency, precedence, and independence or completeness of the classes.
A coloring of a graph  is a labeling of its vertices such that adjacent vertices have distinct labels, regarded as colors.A -coloring is a coloring that maps the vertex set into a set of size .Along this paper, we will regard a -coloring of a graph  as a function  :  () → N such that  () ≤  for every  ∈  (), and  () ̸ =  () for adjacent vertices  and .A graph is -colorable if it admits a -coloring.The -coloring problem takes as input a graph  and a natural number , and consists of deciding whether  is -colorable.
It is known that generalized versions of -coloring are polynomial-time solvable for graphs of bounded thinness, when  is a constant [1,2,11].But the complexity of -coloring on graphs with bounded thinness at least two remained open when  is part of the input (it is polynomial-time solvable for 1-thin graphs, i.e., interval graphs [14]).

The thinness of crown graphs
In this section, we prove the exact value of the thinness and its variations for CR  , along with consistent orderings and partitions in each case.The main results are summarized in Table 1.
We will introduce next some additional definitions and notations that are necessary for this section.Let  = CR  .Define {  ,  ′  } as the bipartition of  () such that is the only vertex of  ′  that is not adjacent to   , for all 1 ≤  ≤ .We will also define mirror(  ) =  ′  , mirror( ′  ) =   , side(  ) =   , and side( ′  ) =  ′  .Given an ordering < of  (), we say that  is a little vertex if  < mirror(), and  is a big vertex otherwise.Similarly, for a set of vertices  ⊆  (), we define Little() as the subset of  that are little vertices.

Characterization of consistent solutions for CR 𝑛
Let < and  be an ordering and a partition of  (), respectively.Next, we define two conditions that will be used to characterize consistency of < and  in .
Condition 2. For any  ∈  and 1 ≤ ,  ≤  such that   ,  ′  ∈  , there is no These two conditions are necessary and sufficient to characterize consistency in CR  , as shown in the following theorem.
Theorem 4. Let  = CR  , and let < and  be an ordering and a partition of  (), respectively.Then < and  are consistent for  if, and only if, both Conditions 1 and 2 hold.
Proof.Suppose that < and  are consistent for .First suppose that Condition 1 does not hold.That is, there are  ∈  and  ∈  such that  < mirror() =  ′ and  = first( ∩ side()) < .There is a contradiction with the fact that < and  are consistent, as (,  ′ ) ∈ () and (,  ′ ) ̸ ∈ ().Now suppose that Condition 2 does not hold.That is, there are  ∈ ,   ,  Proof.Otherwise, it would contradict Condition 2.
Claim 7. Given four distinct vertices of  = CR  , ,  in one side of the bipartition and ,  in the other side, and such that, in a consistent solution: - and  belong to the same class; - and  belong to the same class; - < ; - < ; then at least one of {, } is not a little vertex.
Proof.Without loss of generality let us assume that  < .By Corollary 6 we know that  must be either the last vertex or the penultimate vertex of side(); but since  < , we can say that  and  are respectively the penultimate and last vertex of side(), and that  = mirror().And since  <  < , this implies that  is not a little vertex.
Claim 8.In a consistent solution for  = CR  , the number of classes containing a little vertex is at least  − 1.
In other words, at most one class can contain two little vertices, one of each side, since by Corollary 5 no class can contain more than one little vertex of the same side.
Proof.Suppose, on the contrary, that there are 4 distinct little vertices , ,  and  such as ,  ∈   and ,  ∈  ′  ,  and  belong to the same class,  and  belong to the same class (by Cor. 5, no class can contain more than one little vertex of the same side).By Claim 7, it is neither possible that  <  and  < , nor that  >  and  > .
Suppose then, without loss of generality, that  <  and  > .By Corollary 6,  and  can only be the last or penultimate vertices in   and  ′  , respectively.Moreover, if  is the penultimate vertex of   then last(  ) = mirror(), and if  is the penultimate vertex of  ′  then last( ′  ) = mirror().Without loss of generality, let us assume  > .Notice as mirror() >  >  the vertex  cannot be the last vertex in  ′  , implying that  is the penultimate vertex in  ′  and mirror() = last( ′  ).But then mirror() = last( ′  ) = mirror(); thus  = , a contradiction.By the arguments above, there is at most one pair of little vertices {, } such that they belong to the same class.Then there must be at least different classes containing the little vertices.

Consequences for strongly consistent solutions for CR 𝑛
Corollary 9.If  and  are two distinct big vertices of  = CR  and side() = side(), then they cannot belong to the same class in a strongly consistent solution.
Proof.Otherwise, the reverse order would contradict Corollary 5, since big vertices for an ordering are little vertices for its reverse.
Corollary 10.No class contains three vertices of the same side in a strongly consistent solution of  = CR  .
Proof.Since every vertex is either little or big, if a class contains three vertices of the same side then either there are at least two little vertices of the same side, contradicting Corollary 5, or there are at least two big vertices of the same side, contradicting Corollary 9.
Corollary 11.Let (, <) be a strongly consistent solution for  = CR  .If  and  are two vertices of  such that side() ̸ = side(),  and  belong to the same class of , and  < , then  must be either the first or second vertex of side().Moreover, if  is the second vertex of side(), then the first vertex of side() must be mirror().
Proof.It follows from applying Corollary 6 to the reverse order of <.Proof.Let (, <) be a strongly consistent solution for  = CR  , where  ≥ 4. Suppose a class  ∈  contains at least four vertices.By Corollary 10, it contains exactly four vertices, two of each side.Moreover, by Claim 12, the class must be composed by four distinct vertices  <  <  <  such that side() = side(), side() = side(), and side() ̸ = side().Applying Corollary 6 to  <  and  < , it follows that  must be the penultimate vertex of side(), thus  = mirror() and  = mirror(), a contradiction.Claim 14.In a strongly consistent solution for  = CR  , the number of classes containing a big vertex is at least  − 1.In other words, at most one class can contain two big vertices, one of each side, since by Corollary 9 no class can contain more than one big vertex of the same side.
Proof.It follows from Claim 8 applied to the reverse order of the solution.
Claim 15.There are at most two classes of three vertices in a strongly consistent solution of  = CR  ,  ≥ 4.Moreover, if there are two such classes, then one of them has vertices (, , ), where  and  are the first two vertices of their side and  belongs to the opposite side, and the other one has vertices (, , ), where  and  are the last two vertices of the side of  and  belongs to the side of .In particular, they contain four vertices of one side and two of the other side, and the four vertices of the same side are the first two and the last two of the side in the order.
Proof.Let (, <) be a strongly consistent solution for  = CR  , where  ≥ 4. Suppose a class  ∈  contains three vertices.Then it contains either two little vertices or two big vertices.By Claims 8 and 14, this may happen only once for little vertices and once for big vertices, so there are at most two classes of three vertices.Suppose there are indeed two classes ,  of three vertices each.By Corollary 10 and Claim 12, we may assume that  = {, , } where  <  < , side() = side() and side() ̸ = side().By Corollary 11 applied to  < , it follows that  and  are the first and second vertices of side(), and  = mirror().In particular,  is little and  is big.By Corollary 5,  has to be big too.Suppose  = {, , },  <  < , has two vertices of side() and one of side().By Corollary 10 and Claim 12, there are two cases: either side() = side() = side(), and side() = side(), or side() = side() = side(), and side() = side().In the first case, reasoning as above,  and  are the first and second vertices of side(),  = mirror(),  is little and ,  are big.This is a contradiction to Claim 14.In the second case, by Corollary 11 applied to  < , it follows that  is either the first or the second vertex of side(), but  ̸ ∈ {, }, a contradiction.Thus, suppose  = {, , },  <  < , has two vertices of side() and one of side().By Corollary 10 and Claim 12, there are two cases: either side() = side() = side(), and side() = side(), or side() = side() = side(), and side() = side().In the first case, reasoning as above,  and  are the first and second vertices of side(), a contradiction because  ̸ = .So the second case holds, and  and  are the penultimate and last vertices of side().

Proofs of the results in Table 1
Theorem 16.
Proof.The thinness of a non-empty graph is always at least 1, and by Claim 8, thin(CR  ) ≥  − 1.
Suppose  ≥ 5 is odd, and suppose (, <) is a strongly consistent solution for  = CR  , with  − 1 classes.By Corollary 13 and Claim 15, the solution has to have two classes of three vertices each, and  − 3 classes of two vertices each.Moreover, since for one of the sides, the first two and the last two vertices belong to these classes of size three, by Corollaries 6 and 11, no other class can contain elements of both sides.But since  is odd, both  − 4 and  − 2 are odd, so there is no way to partition the remaining 2 − 6 vertices into classes of size 2 where no class can contain elements of both sides.Hence, for  ≥ 5 odd, pthin(CR  ) ≥ .
We will conclude the proof by construction.We will first show strongly partitions and orders for  ≤ 4.
For  = 1, let  = ( 1 ,  ′ 1 ) and In all the cases, it is not hard to check that Conditions 1 and 2 are satisfied for both (, ) and (, ).For  ≥ 6 even, we build a strongly consistent solution (, ) with  − 1 classes for CR  , from the solution for  = 4 by inserting the remaining vertices into the order and distributing them into  − 4 classes of two vertices each.The construction is shown in Algorithm 1.
For  ≥ 5 odd, we can build a strongly consistent solution (, ) with  classes for CR  following Algorithm 3, and a consistent solution (, ) with  − 1 classes for CR  following Algorithm 2.
In each case, it is not hard to check that Conditions 1 and 2 hold either for (, ) or for both (, ) and (, ), as required.
Next, we deal with the independent and complete versions of thinness in crowns.
Let < and  be an ordering and a partition of  () into independent sets, respectively, that are consistent.Let  ∈ , and  ∈  .Since  is an independent set of , either  = {, mirror()} or  ⊆ side().Thus, by Condition 1, if  is a little vertex then  = first( ).This implies that for each pair {  , ◁ in each iteration we set the order and classes of 4 vertices In both cases, any order works.For  = 3, the order  = ( 1 ,  ′ Proof.By Theorem 16, prec-thin(CR  ) ≥ max(1,  − 1).We prove constructively that prec-thin(CR  ) ≤ max(1,  − 1).
For  = 2, let ).The consistency for these cases is easy to check.For  > 4 let Note that, for all  ∈ , [ ] is an interval graph and the order is a canonical order of [ ].It is easy to see that both Conditions 1 and 2 are being satisfied for  1 and  −1 .Each one of the remaining parts consists of vertices of either   or  ′  , where the first vertex is a little vertex and the second one is a big vertex.Thus, for these remaining parts, both conditions are also satisfied.Therefore, the orders and partitions defined are consistent.
Proof.The cases of CR 1 and CR 2 are trivial, since they are proper interval graphs.Let  ≥ 3, and suppose (, <) is a strongly consistent solution for  = CR  .
We claim that if  is the first or the last part in the solution, then | | = 1.Let  be the first part, and suppose by contradiction that | | > 1.Let  <  ∈  be the first two vertices of  .If side() = side(), then they are two little vertices of the same side in the same class, contradicting Corollary 5.If side() ̸ = side(), then, by Corollary 6,  is either the penultimate or the last vertex of side(), a contradiction because it is the first vertex of side() and there are at least three vertices on its side.The argument for the last class is analogous, by using Corollaries 5 and 11.
In particular, this implies that prec-pthin(CR 3 ) ≥ 3. A strongly consistent solution with three classes is ). Suppose now  ≥ 4. By Corollary 13, every class has size at most three.Moreover, given that the first class and the last class have size one, in order to obtain a solution with less than  + 1 classes, at least two classes of size three are needed.In that case, by Claim 15, one of them, say  , has vertices (, , ), where  and  are the first two vertices of their side, say   , and  belongs to  ′  , and the other one, say  , has vertices (, , ), where  and  are the last two vertices   and  belongs to  ′  .In particular,  precedes  , but these are not the first or last classes, because the first and the last class contain only one vertex.Indeed, this situation implies that the only vertex  in the first class and the only vertex  in the last class belong to  ′  .But then we have  <  <  ∈  ′  , which contradicts Corollary 6 applied to  < .Hence, for  ≥ 4, prec-pthin(CR  ) ≥  + 1.We will complete the proof by construction.Define the following ordered sets: - 1 = ( 1 ); -for all 2 ≤  ≤ , if  is even, then   = ( ′  ,  ′ −1 ), otherwise,   = (  ,  −1 ); -if  is even, then  +1 = (  ), otherwise,  +1 = ( ′  ).Let  = ( 1 ,  2 , . . .,   ,  +1 ) be an ordered ( + 1)-partition of  (CR  ).Note that, for all parts   = {  ,  −1 } (resp.  = { ′  ,  ′ −1 }),   <  ′  and  −1 >  ′ −1 (resp. ′  <   and  ′ −1 >  −1 ).Thus, Condition 1 is satisfied for both the order and its reversal.Moreover, note that all parts consist of vertices of either   or  ′  , so Condition 2 is also satisfied for both the order and its reversal.Therefore, the order defined is strongly consistent with , and for  ≥ 4, prec-pthin(CR  ) ≤  + 1.
Let < and  be an ordering and a precedence partition of  () into independent sets, respectively, that are consistent.Let  ∈ , and  ∈  .Since  is an independent set of , either  = {, mirror()} or  ⊆ side().Thus, by Condition 1, if  is a little vertex then  = first( ).This implies that for each pair (  ,  ′  ) there is a class of the partition in which either   or  ′  (the little one) is the first vertex of the class.By the precedence constraint and Condition 2, at most one class is composed by a vertex and its mirror.Since  ≥ 2, there is a little vertex that is not in the same class as its mirror.Let  be the greatest such vertex according to <, and let  ∈  such that mirror() ∈  .Then  < mirror(),  ̸ ∈  , and by the precedence constraint,  < first( ).Since mirror(first( )) ̸ = mirror(), mirror(first( )) is not in the same class as its mirror.By definition of , first( ) is not a little vertex.Therefore, there is a class of the partition for each little vertex , where  is the first of the class, plus the class  whose first vertex is not little.Hence prec-thin ind () ≥  + 1.
An order and precedence partition into  + 1 independent sets that are strongly consistent can be defined as follows.

Precedence thinness of cographs
In this section, we describe the behavior of the precedence thinness under the union and join operations, which allows to compute the precedence thinness of cographs efficiently.
With respect to the behavior of the thinness under the union and join operations, the following results were proved in the literature.These results allowed to compute the thinness of cographs in polynomial time, as well as to characterize -thin graphs by forbidden induced subgraphs within the class of cographs.
Also in [5], it was observed that the proper thinness of the join  1 ∨  2 cannot be expressed as a function whose only parameters are the proper thinness of  1 and  2 (even excluding simple particular cases, like trivial or complete graphs).
Next, we present a theorem that describes the precedence thinness over the union of two graphs.
Suppose  contains more than one mixed class, and let  be the smallest index such that   is mixed.Notice that  < .Let  1  =   ∩  ( 1 ) and  2  =   ∩  ( 2 ).Suppose that last(  ) belongs to  ( 1 ).Then, for every  > , the vertices of  2  have no neighbors in   : they have no neighbors in  ( 1 ) ∩   by definition of disjoint union, and they cannot have a neighbor in  ( 2 ) ∩   , since such a vertex should be adjacent to last(  ) by consistency, and that contradicts the definition of disjoint union.We will define a partition  .But this contradicts the fact that  and  are adjacent.We conclude that  is adjacent to , and that  ′ and  ′ are consistent.
The case in which last(  ) belongs to  ( 2 ) is symmetric, and we can repeat this procedure until obtaining an ordering and a consistent partition into  classes, such that at most one class is mixed (the repetition stops because the index of the smallest mixed class is strictly increasing after each step).If there are  1 classes containing at least one vertex of  1 ,  2 classes containing at least one vertex of  2 , and  3 mixed classes, then Since that ordering and partition restricted to each of  ( 1 ) and  ( 2 ) are consistent, prec-thin( 1 ) + prec-thin( Theorem 26 (Precedence thinness of join).Let  1 and  2 be graphs.
Suppose  contains a mixed class, and let  be the smallest index such that   is mixed.Let  1  =   ∩  ( 1 ) and  2  =   ∩ ( 2 ).Suppose that first(  ) belongs to  ( 1 ).Then,  2  induces a complete graph and for every  > , the vertices of  2  are adjacent to all the vertices of   : they are adjacent to every vertex in  ( 1 ) ∩   by definition of join, and they cannot have a non-neighbor in  ( 2 ) ∩   , since such a vertex should be adjacent to first(  ) by definition of join, and that would break consistency.
If  2 is not a complete graph, then there is another class containing vertices of  2 .Let  be the greatest index different from  such that   ∩  ( 2 ) ̸ = ∅.If  > ,   may be either uniform or mixed, while if  < ,   is uniform.Moreover, if  < , the vertices of  2  are also adjacent to all the vertices of classes between  +1 and   (both included), since those classes contain only vertices of  1 .
We will define a partition }, and the order  ′ obtained by  by deleting the vertices of  2  and reinserting them right after the vertices of   .Let  <  ′  <  ′  such that  and  are in the same class of  ′ ,  and  are adjacent.Since  and  are consistent, if  <   <   and  and  are in the same class of , then  is adjacent to .So, suppose first that  and  are not in the same class of .Then  ∈   and  ∈  2  .This implies that either  ∈  2  or  ∈  ℓ with ℓ > .In either case,  is adjacent to .Suppose now that some of the two inequalities do not hold for .By definition of  ′ , this implies that at least one of the vertices belongs to  2  .If  ∈  2  , then  is adjacent to , since every vertex of  2  is adjacent to every vertex greater than itself, both according to  and according to  ′ .If  ∈  2  , since  and  are in the same class of  ′ , and by the definition of the order and partition, it must be  ∈  2   , thus adjacent to .By last, if  ∈  2  , there are two cases.If  <  , then  is adjacent to .If  <  , since we are assuming that some of the inequalities do not hold in , necessarily  <  ; and since  and  belong to the same class of  ′ , it must be that  ∈   and  ∈  2  .But then, it is clear that  is adjacent to .
The case in which first(  ) belongs to  ( 2 ) is symmetric, and we can repeat this procedure until obtaining an ordering and a consistent partition into  classes, such that at most one class is mixed, and this happens only in the case in which one of the graphs is complete (the repetition of the procedure stops because the index of the smallest mixed class is strictly increasing after each step).
Suppose that at the end of the process there are  1 classes containing at least one vertex of  1 and  2 classes containing at least one vertex of  2 .In the case in which we have a mixed class,  =  1 +  2 − 1, thus  1 +  2 =  + 1.Since that ordering and partition restricted to each of  ( 1 ) and  ( 2 ) are consistent, prec-thin( 1 ) + prec-thin( 2 ) ≤  1 +  2 =  + 1 = prec-thin( 1 ∪  2 ) + 1.If none of the graphs is complete, we have no mixed class at the end of the process, so  =  1 +  2 .Since that ordering and partition restricted to each of  ( 1 ) and  ( 2 ) are consistent, prec-thin( 1 ) + prec-thin( Corollary 27.The precedence thinness of cographs can be computed in polynomial time. The thinness of the complement of an interval graph can be arbitrarily large,  2 being an example of it, but it can be also equal to one, as for example in the case of complete graphs or edgeless graphs.So, we cannot express the thinness of a graph in terms of the thinness of its complement.However, one can aim to relate the complete thinness of a graph in terms of the independent thinness of its complement, and viceversa.As we will show next, this is not possible for the regular complete/independent thinness or proper thinness (Prop.28), but a relation exists for the precedence versions of complete and independent thinness.Proposition 28.For a matching  2 ,  ≥ 2, it holds that pthin ind ( 2 ) = 2, while thin cmp ( 2 ) = .For the crown CR  ,  ≥ 2, it holds that pthin cmp (CR  ) = 2, while thin ind (CR  ) = .
Proof.Let  be a graph and  be an order of  ().Let  1 , . . .,   be a precedence partition of  () into independent sets which is consistent (respectively strongly consistent) with  (i.e.,  <   for  ∈   and  ∈   with 1 ≤  <  ≤ ).
Consider now the same ordered partition  1 , . . .,   in  (now into complete sets), but where we order internally the vertices of each part according to .We will prove that the partition and the order are consistent (respectively strongly consistent) for , implying that prec-thin ind () ≥ prec-thin cmp (), and prec-pthin ind () ≥ prec-pthin cmp ().
To prove the converse inequalities, it is enough to observe that the same argument, applied to  and exchanging independent sets by complete sets, proves that prec-thin ind () ≤ prec-thin cmp (), and prec-pthin ind () ≤ prec-pthin cmp ().

Bounds for the thinness of grids
In this section, we show that the linear decomposition in [19] for mim-width (a width parameter with several algorithmic applications), leads to a consistent ordering and partition of  (GR  ) into ⌈︀ +1 2 ⌉︀ classes, thus improving the previously known upper bound for the thinness of the grid.
Theorem 30 (Bound for the thinness of GR , ).

⌉︀
, is composed by the union of the vertices (2 − 2, ), 1 ≤  ≤ ,  ≡  mod 2, and the vertices (, ), 1 ≤  ≤ , in the case in which  is odd.Examples for  = 7 and  = 6 can be seen in Figure 1, where the bold edges are the ones that are internal to a class.
Corollary 31 (Bound for the thinness of GR  ).For  ≥ 1, The grid GR 2, can be also viewed as the Cartesian product of the path   and the complete graph  2 .So, as a corollary of the results in [1] for thinness of Cartesian products of graphs, thin(GR 2, ) = 2, for  ≥ 2.
The precedence thinness instead, grows linearly in  for GR ,2 and quadratically in  for GR  , as it can be seen in the following theorems, whose proofs are based on Theorem 25.

𝑟
For the upper bound, we present the partition depicted in Figure 3, consisting of ⌈︀ −1

2
⌉︀ 2 + 1 parts: each set of vertices reached by a same drawing of a "claw" is a part, and the caterpillar in the top and right sector of the grid is also a part.(Note that the diagonal edge of the claw is not part of the grid; each claw only represents the vertices belonging to a same part.)Depending on the position in the grid, the portions of the claws that would cross the left and the bottom sides of the grid are absent, but nevertheless they will be called a claw anyway.Also, depending on the parity of , the last part can be either a caterpillar or an independent set, but we will refer to it as a caterpillar.
We build an ordering  of the vertices of the grid as follows.Enumerate all parts  1 , . . .,   with  = ⌈︀ −1

2
⌉︀ 2 according to the relative positions among the corresponding claws in the scheme, from bottom to top, and for claws at the same level, from left to right.Therefore,  1 is the bottommost leftmost claw (indeed, the corner and the vertex that dominates its neighborhood),  2 is the first (partial) claw at the right of  1 , and so on.For each 1 ≤  ≤ , if the vertices of   = {, , , } are laid out as depicted in the right portion of the figure, then order them in  as  <  <  < .A vertex of a claw in the relative position of  will be called of type , and analogously for types , , .Moreover, for all  ∈   ,  ∈   , we let  <  ⇐⇒  < .Finally, define a new part  +1 having all remaining vertices.The vertices in  +1 are ordered according to a canonical order of the caterpillar.Besides, all vertices in  +1 come in  after all other vertices of the grid.
It is easy to verify that all vertices belonging to a same part are consecutive in .Let us show that  is consistent to ( 1 , . . .,  +1 ).Suppose there is (, , ) breaking the consistency.It is trivial to check that , ,  cannot all be in any   , 1 ≤  ≤ , and also cannot all be in  +1 since we have used a canonical order.Therefore, ,  ∈   and  ∈   with  ̸ = .Since  < , then  < .
Notice that, by the chosen ordering among classes, vertices of type  and  of   have no neighbors in   , and all possible neighbors in   of the vertex of type  of   are also neighbors of the vertex of type .Since  <  <  <  in   , it is not possible to break consistency with vertices ,  ∈   and  ∈   , where  < .Thus,  is consistent with the partition.Therefore, prec-thin(GR  ) ≤ ⌈︀ −1 2 ⌉︀ 2 + 1.A vertex order < of  is perfect if  contains no  4  with  <  and  < .A graph is perfectly orderable if it admits a perfect order.Perfectly ordered graphs can be optimally colored by applying the greedy coloring algorithm in the perfect order [12].
The polynomiality of the -coloring problem on precedence proper 2-thin graphs, given the order and partition, is then a consequence of the following result.
Theorem 35.Precedence proper 2-thin graphs are perfectly orderable.Moreover, given a partition of  () into two sets  1 ,  2 , strongly consistent with an order < such that every vertex of  1 is smaller than every vertex of  2 , a perfect order ≺ of  can be obtained by taking the vertices on  1 ordered according to the reverse of <, followed by the vertices of  2 ordered according to <.
Proof.Suppose (, ≺) contains one of the ordered induced subgraphs  4 ,  5 or  6 (Fig. 5).Since ≺ restricted to both  1 and  2 is a proper interval order, it does not contain any of the ordered induced subgraphs  1 ,  2 or  3 (Fig. 4).It follows that in any of the cases, the first vertex of the ordered subgraph of Figure 5 belongs to  1 and the last vertex belongs to  2 .Moreover, in the case of  4 and  5 the first two vertices belong to  1 , and in the case of  4 the last two vertices belong to  2 .
Therefore, ≺ is a perfect order for .
The complexity of the -coloring problem ( part of the input) remains open for precedence proper -thin graphs,  ≥ 3.

Conclusion
Interval graphs and proper interval graphs are well known graph classes, to which hundreds of papers have been dedicated.Due to its importance, and since not all graphs are (proper) interval graphs, several authors have defined larger classes of graphs by relaxing the definition of (proper) interval graphs or some characterization for this class.This paper aims to one of such generalizations, namely, the (proper) -thin graphs and its variations.
We provide several properties of such generalizations, some of them restricted to the special classes of crown and grid graphs, in order to present the exact values for (proper) thinness, (proper) independent thinness, (proper) complete thinness, precedence (proper) thinness, precedence (proper) independent thinness, and precedence (proper) complete thinness for the crown graphs CR  .The exact values are provided in Table 1.For cographs, we prove that the precedence thinness can be determined in polynomial time.In particular, we compute the precedence thinness of the union and join of two graphs in terms of their own precedence thinness.We also provide bounds for the thinness of  ×  grids GR  and  ×  grids GR , , proving that for 1 ≤  ≤ , ⌈︀ −1 ⌉︀ 2 + 1. Regarding applications, we show that the -coloring problem ( being part of the input) is NP-complete for both precedence 2-thin graphs and proper 2-thin graphs.On the positive side, it is polynomially solvable for precedence proper 2-thin graphs, given the order and partition.This last result is obtained by showing that precedence proper 2-thin graphs are perfectly orderable graphs, which are optimally colored by the greedy algorithm on any of its corresponding perfect orderings, and that from the order and partition in the precedence proper 2-thin representation a perfect order can be computed.

Figure 1 .
Figure 1.Scheme for the consistent partition and ordering of a grid in Theorem 30.The third drawing shows the combined ordering of two consecutive classes (bottom up).

Figure 2 .
Figure 2. Scheme for the partition of a grid in Theorem 32.

Figure 3 .
Figure 3. Scheme for the partition of a grid in Theorem 33.

Figure 5 .
Figure 5.The forbidden ordered induced subgraphs for a perfect order.

Table 1 .
The value of different thinness variations on crown graphs.
Consider now that both conditions hold for < and .Suppose that < is not consistent with .That is, there are  ∈  and  <  <  such that ,  ∈  , (, ) ∈ () and (, ) ̸ ∈ ().Consider, without loss of generality that side() =   .If side() =   = side(), then  =  ′ , as  ′ is the only vertex of  ′  that is not adjacent to .This fact contradicts Condition 1, as  <  ′ , and therefore  is little, but  ̸ = first( ∩ side()), since  < .If side() =  ′  ̸ = side(), then side() =  ′  , as  is adjacent to .Then there is  ′  ∈  ′  with  ̸ =  such that   <  ′  <  ′  , for   = ,  ′  = , and  ′  = , contradicting Condition 2.3.2.Consequences for consistent solutions for CR Corollary 5.If  and  are two distinct little vertices of  = CR  and side() = side(), then they cannot belong to the same class in a consistent solution.Let (, <) be a consistent solution for  = CR  .If  and  are two vertices of  such that side() ̸ = side(),  and  belong to the same class of , and  < , then  must be either the last vertex or the penultimate vertex of side().Moreover, if  is the penultimate vertex of side(), then the last vertex of side() must be mirror().
2  ∪  +1 }, and the order  ′ such that  <  ′  if, and only if, either  ∈  1  and  ∈  2  , or  <   and it is not the case that  ∈  2  and  ∈  1  .Let  <  ′  <  ′  such that  and  are in the same class of  ′ ,  and  are adjacent.Since  and  are consistent, if  <   <   and  and  are in the same class of , then  is adjacent to .So, suppose first that  and  are not in the same class of .Then  ∈  2  and  ∈  +1 .This implies that  ∈   with  ≥  + 1, but  and  are adjacent, and vertices of  2  have no neighbors in   with  > , a contradiction.Suppose then that some of the two inequalities do not hold for .By definition of  ′ , this can only happen if one of the vertices belongs to  1  and the other one to  2  .Since  and  are in the same class of  ′ , it must be  ∈  1  and  ∈  2  , implying that  ∈  1 Suppose that | 1 | ≥ 3 and let  1 ,  2 ,  3 be the three first elements of  1 .(Ordering relations are assumed to be according to .)Note that ( 1 ) ≥ (GR 2, ) = 2. Let  1 <  2 be two Proof.Let GR 2, = (, ) with  = {(, ) : 1 ≤  ≤ 2, 1 ≤  ≤ }.Let (, ) be any solution for the precedence thinness of GR 2, , with  = ( 1 , . ..,   ).Let us show first that | 1 | ≤ 2.