U-Bubble Model for Mixed Unit Interval Graphs and its Applications: The MaxCut Problem Revisited

Interval graphs, intersection graphs of segments on a real line (intervals), play a key role in the study of algorithms and special structural properties. Unit interval graphs, their proper subclass, where each interval has a unit length, has also been extensively studied. We study mixed unit interval graphs---a generalization of unit interval graphs where each interval has still a unit length, but intervals of more than one type (open, closed, semi-closed) are allowed. This small modification captures a much richer class of graphs. In particular, mixed unit interval graphs are not claw-free, compared to unit interval graphs. Heggernes, Meister, and Papadopoulos defined a representation of unit interval graphs called the bubble model which turned out to be useful in algorithm design. We extend this model to the class of mixed unit interval graphs and demonstrate the advantages of this generalized model by providing a subexponential-time algorithm for solving the MaxCut problem on mixed unit interval graphs. In addition, we derive a polynomial-time algorithm for certain subclasses of mixed unit interval graphs. We point out a substantial mistake in the proof of the polynomiality of the MaxCut problem on unit interval graphs by Boyaci, Ekim, and Shalom (2017). Hence, the time complexity of this problem on unit interval graphs remains open. We further provide a better algorithmic upper-bound on the clique-width of mixed unit interval graphs. Clique-width is one of the most general structural graph parameters, where a large group of natural problems is still solvable in the tractable time when an efficient representation is given. Unfortunately, the exact computation of the clique-width representation is \NP-hard. Therefore, good upper-bounds on clique-width are highly appreciated, in particular, when such a bound is algorithmic.


Introduction
A graph G is an intersection graph if there exists a family of nonempty sets F = {S 1 , . . . , S n } such that for each vertex v i in G, a set S i ∈ F is assigned in a way that there is an edge v i v j in G if and only if S i ∩ S j = ∅. We say that G has an F-intersection representation. Any graph can be represented as an intersection graph since per each vertex, we can use the set of its incident edges. However, many important graph classes can be described as intersection graphs with a restricted family of sets. Depending on the geometrical representation, different types of intersection graphs There are lots of characterizations of interval and unit interval graphs. Among many of the characterizations, we single out a matrix-like representation called bubble model [23]. A similar notion was independently discovered by Lozin [31] under the name canonical partition. In the bubble model, vertices of a unit interval graph G are placed into a "matrix" where each matrix entry may contain more vertices as well as it can be empty. Edges of G are represented implicitly with quite strong conditions: each column forms a clique; and in addition, edges are only between consecutive columns where they form nested neighborhood (two vertices u and v from consecutive columns are adjacent if and only if v occurs in a higher row than u). In particular, there are no edges between non-consecutive columns. This representation can be computed and stored in linear space given a proper interval ordering representation.
We introduce a similar representation of mixed unit interval graphs, called U-bubble model, and we extend some results from unit interval graphs to mixed unit interval graphs using this representation. The representation has almost the same structure as the original bubble model, except that edges are allowed in the same row under specific conditions. We show that a graph is a mixed unit interval graph if and only if it can be represented by a U-bubble model. In addition, we show properties of our model, such as the relation of the size of a maximum independent set or maximum clique, and the size of the model, see Subsection 2.6.
Given a graph G, the MaxCut problem is a problem of finding a partition of vertices of G into two sets S and S such that the number of edges with one endpoint in S and the other one in S is maximum among all partitions. There were two results about polynomiality of the MaxCut problem in unit interval graphs in the past years; the first one by Bodlaender, Kloks, and Niedermeier in 1999 [5], the second one by Boyaci, Ekim, and Shalom which has been published in 2017 [7]. The result of the first paper was disproved by authors themselves a few years later [4]. In the second paper, the authors used a bubble model for proving the polynomiality. However, we realized that this algorithm is also incorrect. Moreover, it seems to us to be hardly repairable. We provide further discussion and also a concrete example, in Subsection 3.2. The complexity of the MaxCut problem in interval graphs was surprisingly unknown for a long time. Interestingly, a result about NP-completeness by Adhikary, Bose, Mukherjee, and Roy has appeared on arXiv [1] very recently 1 .
Using the U-bubble model, we obtain at least a subexponential-time algorithm for MaxCut in mixed unit interval graphs. We are not aware of any subexponential algorithms on interval graphs. In general graphs, there has been extensive research dedicated to approximation of MaxCut in subexponential time, see e.g. [2] or [24]. Furthermore, we obtain a polynomial-time algorithm if the given graph has a U-bubble model with a constant number of columns. This extends a result by Boyaci, Ekim, and Shalom [8] who showed a polynomial-time algorithm for MaxCut on unit interval graphs which have a bubble model with two columns (also called co-bipartite chain graphs). The question of whether the MaxCut problem is polynomial-time solvable or NP-hard in unit interval graphs still remains open. he third part of the paper is devoted to clique-width, one of the graph parameters that is used to measure the complexity of a graph. Many NP-hard problems can be solved efficiently on graphs with bounded clique-width [11]. In general, it is NP-complete to compute the exact value of clique-width. Furthermore, it is NP-complete even to decide if the graph has clique-width at most k for a given number k, see [15].
Unit interval graphs are known to have unbounded clique-width [20]. It follows from results by Fellows, Rosamond, Rotics, and Szeider [14], and Kaplan and Shamir [26] that the clique-width of (mixed) unit interval graphs is upper-bounded by ω (the maximum size of their clique) +1. Heggernes, Meister, and Papadopoulos [23] improved this result for unit interval graphs using the bubble model. There, the clique-width is upper-bounded by a minimum of α (the maximum size of an independent set) + 1, and a parameter related to the bubble model representation which is in the worst case ω + 1. We use similar ideas to extend these bounds to mixed unit interval graphs using the U-bubble model. In particular, we obtain that the upper-bound on clique-width is the minimum of the analogously defined parameter for a U-bubble model and 2α + 3. The upper-bound is still in the worst case ω + 1. The upper-bound can be also expressed in the number of rows or columns of U-bubble model. Refer to Theorem 21 and Corollary 22 in Section 4 for further details. As a consequence, we obtain an analogous result to Corollary 3 for rows using the following result. Fomin, Golovach, Lokshtanov, and Saurabh [16] showed that the MaxCut problem can be solved in time O(n 2t+O(1) ) where t is clique-width of the input graph. By the combination of their result and our upper-bounds on clique-width (Theorem 21 in Section 4) we derive not only polynomial-time algorithm when the number of columns is bounded (with worse running time) but also a polynomial-time algorithm when the number of rows is bounded, formulated as Corollary 4.

Corollary 4.
The size of a maximum cut in the graph class defined by U-bubble models with k rows can be determined in the time O(n 4k+O(1) ).

Preliminaries and Notation
By a graph we mean a finite, undirected graph without loops and multiedges. Let G be a graph. We denote by V (G) and E(G) the vertex and edge set of G, respectively; with n = |V (G)| and m = |E(G)|. Let α(G) and ω(G) denote the maximum size of an independent set of G and the maximum size of a clique in G, respectively. By a family we mean a multiset {S 1 , . . . , S n } which allows the possibility that S i = S j even though i = j.
Let x, y ∈ R be real numbers. We call the set {z ∈ R : We further denote the set of all unit intervals by From now on, we will be speaking only about unit intervals.
Let I be an interval, we define the left and right end of I as (I) := inf(I) and r(I) := sup(I), respectively. Let I, J ∈ U be unit intervals, I, J are almost twins if (I) = (J). The type of an interval I is a pair (r, s) where I ∈ U r,s , r, s ∈ {+, −}.
Let G = (V, E) be a graph and I an interval representation of G. Let v ∈ V be represented by an interval I v ∈ U r,s , where r, s ∈ {+, −}, in I. The type of a vertex v ∈ V in I, denoted by type I (v), is the pair (r, s). We use type(v) if it is clear which interval representation we have in mind. We follow the standard approach where the maximum over the empty set is −∞. The notion ofÕ denotes the standard "big 0" notion which ignores polylogarithmic factors, i.e, O(f (n) log k n) =Õ(f (n)), where k is a constant.

Recognition and U-representation of mixed unit interval graphs
All the classes of mixed unit interval graphs can be characterized using forbidden induced subgraphs, sometimes by infinitely many. Rautenbach and Szwarcfiter [34] gave a characterization of U ± -graphs using five forbidden induced subgraphs. Joos [25] gave a characterization of mixed unit interval graphs without twins by an infinite class of forbidden induced subgraphs. Shuchat, Shull, Trenk, and West [39] proved independently also this characterization, moreover, they complemented it by a quadratic-time algorithm that produces a mixed proper interval representation. Finally, Kratochvíl and Talon [40] characterized the remaining classes.
Le and Rautenbach [30] characterized graphs that have a mixed unit interval representations in which all intervals have integer endpoints, and provided a quadratic-time algorithm that decides whether a given interval graph admits such a representation.
We refer the reader to the original papers for more details and concrete forbidden subgraphs.
Moreover, there are nice structural results of the subclasses of mixed unit interval graphs. For example, it is shown in [34] that for U ± -intersection representations, open intervals are only really needed to represent claws, in particular, for any U ± -graph there exist a U ± -representation such that for every open interval, there is a closed interval with the same endpoints. More structural results can be found in [40].
Theorem 5 ([40]). The classes of semi-mixed and mixed unit interval graphs can be recognized in time O(n 2 ). Moreover, there exists an algorithm which takes a graph G ∈ U ±,+− on input, and outputs a corresponding U ±,+− -representation of G in time O(n 2 ).

Corollary 6 ([40]
). It is possible to modify the algorithm for semi-mixed unit interval graphs such that given a mixed unit interval graph G, it outputs a mixed unit interval representation of G in time O(n 2 ).

Bubble model for mixed unit interval graphs
In this section, we present a U-bubble model, a new representation of mixed unit interval graphs which is inspired by the notion of bubble model for proper interval graphs created by Heggernes, Meister, and Papadopoulos [23] in 2009.

Definition of bubble model
First, we present the bubble model for proper interval graphs as it was introduced by Heggernes et al.

Definition 2 (Heggernes et al. [23], reformulated). If A is a finite non-empty set, then a
|j − j | ≤ 1, and one of the two conditions holds:

Theorem 7 (Heggernes et al. [23]). A graph is a proper interval graph if and only if it has a bubble model.
We define a similar matrix-type structure for mixed unit interval graphs where each set B i,j is split into four parts and edges are allowed also in the same row under specific conditions.

Definition 3. Let A be a finite non-empty set and
Bubbles with the same i-index form a row of B, and with the same j-index a column of B, we say vertices from bubbles B i,1 ∪ . . . ∪ B i,k appear in row i, and we denote i as their row-index. We define an analogous notion for columns. We denote the index of the first row with a non-empty bubble as top(j) := min {i | B i,j ∈ B and B ij = ∅}. Thus, B top(j),j is the first non-empty bubble in the column j. Let B be a bubble, then row(B) and col(B) is the row-index and column-index of B, respectively. Let u ∈ B i,j , v ∈ B i ,j ; we say that u is under than v and v is above u if i > i .
, and one of the three conditions holds: The definition says that the edges are only between vertices from the same or consecutive columns and if u ∈ B i,j and v ∈ B i ,j+1 , there is an edge between u and v if and only if u is lower than v (i > i ), or they are in the same row and u ∈ B * + i,j , v ∈ B + * i ,j+1 .  For a U-bubble model B = B i,j 1≤j≤k,1≤i≤rj , by the number of rows of B we mean max{r j | 1 ≤ j ≤ k}. We define the size of the U-bubble model B as the number of columns multiplied by the number of rows, i.e., k · max{r j | 1 ≤ j ≤ k}.
See Figure 1 with an example of a mixed unit interval graph, given by a mixed unit interval representation, and by a U-bubble model.

Construction of U-bubble model
First, we construct a mixed unit interval representation I of a graph G using the quadratic-time algorithm see Corollary 6; then each vertex of G is represented by a corresponding interval in I. Having a mixed unit interval representation of the graph, our algorithm outputs a U-bubble model for the graph in O(n) time.
Given a mixed unit interval representation I, we put all intervals (vertices) that are almost-twins in I into a single bubble, to the particular quadrant which corresponds by its type to the type of the interval. From now on, we speak about bubbles only, we denote the set of all such bubbles by B. We are going to determine their place (row and column) to create a 2-dimensional U-bubble structure for B. We show that the U-bubble structure is a U-bubble model for our graph. Based on the order σ by endpoints of intervals in the representation I from left to right, we obtain the same order on bubbles in B. The idea of the algorithm is to process the bubbles in the order σ, and assign to each bubble its column immediately after processing it. During the processing, the algorithm maintains an auxiliary path in order to assign rows at the end. Thus, rows are assigned to each bubble after all bubbles are processed.
For bubbles A, B ∈ B, A < σ B denotes that A is smaller than B in order σ. We denote the order of bubbles by subscripts, i.e., B 1 < σ B 2 < σ . . . are all bubbles in the described order σ. For technical reasons, we create two new bubbles: B start , B end such that (B start ) = r(B start ) = −∞. We refer to them as auxiliary bubbles, in particular, if we speak about bubbles, we exclude auxiliary bubbles. We enhance the representation in a way that each bubble B ∈ B has a pointer prev : In order to set rows at the end, the algorithm is creating a single oriented path P that has the necessary information about the height of elements in the U-bubble structure being constructed. Some of the arcs of the path can be marked with level indicator (L). For ease of notation, we use next P (B i ) = B j to say that B j is the next element on path P after B i . Note that we can view P as an order of bubbles; we denote by A < P B, A, B ∈ B, the information that A occurs earlier than B on P . Also from technical reasons, P starts and ends with B start and B end , respectively.
Except P and pointers prev and next P , the algorithm remembers the highest bubble of column i, denoted by C top i . Also, denote by curr, the index of the currently processed column. Now, we are able to state the algorithm for assigning columns and rows to bubbles in B and its properties which will be useful for showing the correctness. Property 1: Bubbles are processed (and therefore added somewhere to P ) one by one respecting the order σ. Property 2: The order induced by P of already processed vertices never changes, i.e., once A ≤ P B then A ≤ P B for the rest of the algorithm.

Algorithm
Given bubbles B 1 , B 2 , . . . in B ordered by σ, the algorithm creates P by processing bubbles one by one in order σ. The algorithm outputs a row and a column to each bubble. Initially, set col( iii. (B i ) < r(C top curr ): Set col(B i ) = curr. We continue only with cases i. and iii. and distinguish multiple possibilities: ). Then substitute arc in P from prev(B i ) to Q with two new arcs prev(B i ) to B i that has L indicator set and from B i to Q.

r(prev(B i )) < (B i ): And split this case further based on the properties of
Now, assign rows to bubbles by a single run over P , inductively: Take the first bubble B of P and assign row(B) := 1. Let B be the last bubble on P with already set row index. We are about to determine row(next P (B)). If arc in P from B to next P (B) has L indicator, set row(next P (B)) := row(B), otherwise row(next P (B)) := row(B) + 1.

Correctness
Here, we show that the algorithm above gives us a U-bubble model for a graph given by mixed unit interval representation. It gives us the forward implication of Theorem 1. Proof of Lemma 9. We show the correctness of the construction, i.e., that the constructed object satisfies Definition 5 and that declared Properties 1-6 are satisfied during the whole algorithm. It follows immediately from the construction that Properties 1-4 are satisfied. Observe that prev(B) is always in the previous column than B, for B ∈ B. Moreover, observe that in step ii. of the algorithm, C top col(Bi)−1 = prev(B i ). Then, Property 5 follows from the construction. Property 6 can be seen by examining the construction. Let A, B be two bubbles in the same column such that A < σ B. Either prev(A) = prev(B), then B is put later than A on P . Or prev(A) < σ prev(B), then, by the construction, prev(B) is put after A and B is put after prev(B). In both cases, A < P B. Using Property 2, the Property 6 holds.
Let B be the U-bubble structure for B output by the construction above and G(B) be a graph given by B. We show that B is a U-bubble model for G. Parts (ii), (iii) from Definition 4 are clearly satisfied. It remains to show (i) and (iv). Let Since this case is trivially satisfied, without loss of generality, we assume B i < σ B j . We distinguish a few cases based on the position of B i and B j in B.
By Properties 1 and 2 of P , it is sufficient to verify only the situation when bubble B j was added. Observe that if B < P B then row(B) ≤ row(B ). We split the case into the following all possibilities: • prev(B j ) > σ B i : By the definition of prev and the interval property, u is non-adjacent to v.
By Property 5, prev(B j ) < P B j . By Property 6, • prev(B j ) = B i : By Properties 3, 5 and the rows assignment, row(B j ) = row(B i ) if and only if (B j ) = r(B i ). Therefore, there is an edge in both models if and only if u and v are of correct type; that is u has type ( * , +) and v has type (+, * ).
• prev(B j ) < σ B i : By the definition of prev and the interval property, u is adjacent to v and r(B i ) > (B j ). By Property 6, prev(B j ) < P B i . By Property 5 and the rows assignment, row(B i ) ≥ row(B j ). By Property 3, the equality cannot occur. Therefore, row(B i ) > row(B j ).
Part (iv) follows by the construction of P .
for every possible j. Also note that row(B 1 ) = row(C top 1 ) = 1. It remains to show the running-time of the algorithm. Note that prev can be easily computed by a single run over the representation, as well as the assigning columns can be done simultaneously by a single run over the representation (having prev and remembering top bubbles of columns). Moreover, rows of the vertices are assigned by a single run over path P which leads to overall running time O(n) where n is the number of intervals of the given mixed unit interval representation.

Proof of Theorem 1
Proof of Theorem 1. First, we prove the reverse implication: given a U-bubble model for a graph G, we construct a mixed unit interval representation of G.
We create a mixed unit interval representation I of G as follows. Let v ∈ B r,s i,j , where r, s ∈ {+, −}. The corresponding interval I v of v has the properties: Note that all vertices from the same bubble are represented by intervals that are almost twins (they have the same left ends) and the type of an interval corresponds with the type of the bubble quadrant. Since ε was chosen such that ε(i − 1) < 1 for any row i in B, the graph given by the constructed mixed unit interval representation is isomorphic to the graph given by B.
The forward implication follows from Lemma 9.

Properties of U-bubble model
In this section, we give basic properties of a U-bubble model which are used later in the text. It is readily seen that a U-bubble model of graph G = (V, E) has at most n rows and n columns where n is the number of vertices of G since each column and each row contains at least one vertex. Consequently, the size of a U-bubble model is at most n 2 . Two basic characterizations of a graph are the size of a maximum clique and the size of a maximum independent set in the graph. The problem of finding those numbers is NP-complete in general but it is polynomial-time solvable in interval graphs. We show a relation between those two numbers and the size of a U-bubble model for the graph. We start with the size of a maximum independent set.
Lemma 10. Let G be a mixed unit interval graph, and let B be a U-bubble model for G. The number of columns of B is at least α(G) and at most 2α(G).
Proof. Let I be a maximum independent set of G, and let k be the number of columns of B. We have that α(G) ≥ k/2 from the property that two non-consecutive columns from B are not adjacent in G(B). Since each column forms a clique, only one vertex from each column can be in I.
In the bubble model for unit interval graphs, α(G) is equal to the number of columns [23]. However, the gap in Lemma 10 cannot be narrowed in general-consider an even number k and the following unit interval graphs: path on k-vertices (P k ) and a clique on k vertices (K k ). There exists a unit interval representation of P k using only closed intervals which leads to a U-bubble model of P k containing one row and k columns, where α(P k ) = k/2 . A U-bubble model of K k contains k rows and one column, where α(K k ) = 1 = number of columns.
Another important and useful property of graphs is the size of a maximum clique. We show that a maximum clique of a mixed unit interval graph can be found in two consecutive columns of a U-bubble model of the graph, see Figure 2.
Lemma 11. Let G be a mixed unit interval graph, and let B be a U-bubble model for G. Then the size of a maximum clique is Proof. Let K be a maximum clique of G. Notice, K does not contain two vertices from nonconsecutive columns, as there are no edges between nonconsecutive columns. Furthermore, vertices u and v from two consecutive columns C j and C j+1 , respectively, can be in K only if u is under v or they are in the same row in quadrants of types { * +} and {+ * }, respectively.
On the other hand, vertices from one column of B create a clique in G(B). Moreover, if we split any two consecutive columns C j and C j+1 in row i (for any index i ∈ {1, . . . , min {r j , r j+1 }}), the second part of C j with the first part of C j+1 form a clique. This is true even together with bubble quadrants B * + i,j ∪ B + * i,j+1 .

Maximum cardinality cut
This section is devoted to the time complexity of the MaxCut problem on (mixed) unit interval graphs.

Notation
A cut of a graph G(V, E) is a partition of V (G) into two subsets S, S, where S = V (G) \ S. Since S is the complement of S, we say for the brevity that a set S is a cut and similarly we use terms cut vertex and non-cut vertex for a vertex v ∈ S and v ∈ S, respectively. The cut-set of cut S is the set of edges of G with exactly one endpoint in S, we denote it E(S, S). Then, the value |E(S, S)| is the cut size of S. A maximum (cardinality) cut on G is a cut with the maximum size among all cuts on G. We denote the size of a maximum cut of G by mcs(G). Finally, the MaxCut problem is the problem of determining the size of the maximum cut.

Time complexity is still unknown on unit interval graphs
As it was mentioned in the introduction, there is a paper A polynomial-time algorithm for the maximum cardinality cut problem in proper interval graphs by Boyaci, Ekim, and Shalom from 2017 [7], claiming that the MaxCut problem is polynomial-time solvable in unit interval graphs and giving a dynamic programming algorithm based on the bubble model representation. We realized that the algorithm is incorrect; this section is devoted to it. We start with a counterexample to the original algorithm. Example. Then, according to the paper [7], the size of a maximum cut in G is eight. To be more concrete, the algorithm from [7] fills the following values of dynamic table: F 0,1 (0, 0) = 4, F 2,1 (1, 1) = 8 for s 2,1 = 1, s 2,2 = 1, and finally, F 0,0 (0, 0) = 8 which is the output of the algorithm. However, the size of a maximum cut in G is only seven. Suppose, for contradiction, that the size of a maximum cut is eight. As there are ten edges in total in G, at least one vertex of the triangle v 3 , v 4 , v 5 must be a cut-vertex and one not. Then, those two vertices have three common neighbors. Therefore, the size of a maximum cut is at most seven which is possible; for example, v 1 , v 4 , v 5 are cut-vertices.
The brief idea of the algorithm in [7] is to process the columns from the biggest to the lowest column from the top bubble to the bottom one. Once we know the number of cut-vertices in the actual processed bubble B (in the column j) and the number of cut-vertices which are above B in the columns j and j + 1, we can count the exact number of edges. For each bubble and each such number of cut-vertices in the columns j and j + 1 (above the bubble), we remember only the best values of MaxCut 2 .
We claim that the algorithm and its full idea from [7] are incorrect since we lose the consistency there-to obtain a maximum cut, we do not remember anything about the distribution of cut vertices within bubbles, that was used in the previously processed column. Therefore, there is no guarantee that the final outputted cut of the computed size exists. To be more specific, one of two problems is in the moving from the column j to the column j − 1 since we forget there too much. The second problem is that for each bubble B i,j and for each possible numbers x, x we count the size F i,j (x, x ) of a specific cut and we choose some values s i,j , s i,j+1 (possibly different; they represents the number of cut-vertices in the bubbles B i,j , B i,j+1 ) which maximize the values of F i,j (x, x ). In few steps later, when we are processing the bubble B i,j−1 , again, for each possible values y and y we choose some values s i,j−1 and s i,j such that they maximize the size of F i,j−1 (y, y ). However, we need to be consistent with the selection in the previous column, i.e., to guarantee that s i ,j = s i,j for any particular values y, y = x, and x .
A straightforward correction of the algorithm would lead to remembering too much for a polynomial-time algorithm. However, we can be inspired by it to obtain a subexponential-time algorithm. We attempted to correct the algorithm or extend the idea leading to the polynomiality. However, despite lots of effort, we were not successful and it seemed to us that the presented algorithm is hardly repairable. We note here, that there is another paper by the same authors [8] where a very similar polynomial algorithm is used for MaxCut of co-bipartite chain graphs with twins. Those graphs can be viewed as graphs given by bubble models with two columns; but having two columns is a crucial property for the algorithm.
To conclude, the time complexity of the MaxCut problem on unit interval graphs is still not resolved and it seems to be a challenging open question.

Subexponential algorithm in mixed unit interval graphs
Here, we present a subexponential-time algorithm for the MaxCut problem in mixed unit interval graphs. Our aim is to have an algorithm running in 2Õ ( √ n) time. Some of the ideas, for unit interval graphs, originated in discussion with Karczmarz, Nadara, Rzazewski, and Zych-Pawlewicz at Parameterized Algorithms Retreat of University of Warsaw 2019 [10].
Let us start with a notation. Let G be a graph, H be a subgraph of G, and S be a cut of H, we say that a cut X of G agrees with S in H if X = S on H. Let G be a mixed unit interval graph. We take a U-bubble model B = B i,j 1≤j≤k,1≤i≤rj for G and we distinguish columns of B according to their number of vertices. We denote by b ij the number of vertices in bubble B i,j and by c j the number of vertices in column j, i.e., b ij = |B i,j | and c j = rj i=1 b i,j . We call a column j with c j > √ n a heavy column, otherwise a light column. We call consecutive heavy columns and their two bordering light columns a heavy part of B (if B starts or ends with a heavy column, for brevity, we add an empty column at the beginning or the end of B, respectively), and we call their light columns borders. Heavy part might contain no heavy columns in the case that two light columns are consecutive.
Note that we can guess all possible cuts in one light column without exceeding the aimed time and that most of those light column guesses are independent of each other-once we know the cut in the previous column, it does not matter what the cut is in columns before. Furthermore, there are at most √ n consecutive heavy columns which allow us to process them together. More formally, we show that we can determine a maximum cut independently for each heavy part, given a fixed cut on its borders, as stated in the following lemma.

Lemma 12.
Let G be a mixed unit interval graph and B be a U-bubble model for G partitioned into heavy partsB 1 , · · · ,B p in this order. If S = S 0 ∪ · · · ∪ S p is a (fixed) cut of light columns C 0 , . . . , C p in G(B) such that S j is a cut of C j , j ∈ {0, . . . , p}, then the size of a maximum cut of G that agrees with S in light columns is where mcs(G(B j ), S j−1 ∪ S j ) denotes the size of a maximum cut of G(B j ) that agrees with S j−1 ∪ S j in its borders C j−1 , C j .
Proof. It is readily seen that once we have a fixed cut in an entire column C of a bubble model, a maximum cut of columns which are to the left of C (including C) is independent on a maximum cut of those which are to the right of C (including C). Therefore, we can sum the sizes of maximum cuts in heavy parts which are separated by fixed cuts. However, the cut size of middle light columns is counted twice since they are contained in two heavy parts. Therefore, we subtract them. Now, our aim is to determine the size of a maximum cut for a heavy partB given a fixed cut on its borders. Note that ifB is a heavy part with no heavy columns, we can straightforwardly count the number of cut edges of G(B), i.e., mcs(G(B)), assuming a fixed cut on borders is given. Therefore, we are focusing on a situation where at least one heavy column is present in a heavy part. We use dynamic programming to determine the size of a maximum cut on each such heavy part.
First, we present a brief idea of the dynamic programming approach, followed by technical definitions and proofs later. We take bubbles inB which are not in borders and process them one-by-one in top-bottom, left-right order. When processing a bubble, we consider all the possibilities of numbers of cut-vertices in each its quadrant. We refer to the already processed part after i-th step as where C 0 and C l+1 are borders ofB and B j , j ∈ {1, . . . , i} are first i bubbles in top-bottom, left-right order inB (as it is shown in Figure 4).
We store all possible (l + 1)-tuples (s 1 , s 2 , . . . , s l , a), where l is the number of heavy columns, s j characterizes the number of all cut vertices in the j-th heavy column, and number a characterizes the number of cut vertices of types ( * , +) in the last processed bubble. Then, we define recursive function f where f i will be related to the maximum size of a cut that has exactly s j cut vertices in column j (for all j) in the already processed part G i . More precisely, we want the recursive function f to satisfy the properties later covered by Lemma 13. Once, f satisfies the desired properties, we easily obtain the size of a maximum cut in the heavy part (Theorem 14, below). Now, we present a key observation for the construction of f . Observe, by the properties of U-bubble model, that the edges of G i can be partitioned into following disjoint sets: Therefore, the idea there is to count the size of a desired cut of G i using the sizes of possible cuts in G i−1 and add the size of a cut using edges E 2 − E 7 . The former is stored in f i−1 and the later can be counted from the number of cut vertices in currently processed bubble B i and numbers in the (l + 1)-tuple we are processing. Now, let us properly define the function f and prove Theorem 2 formally. We develop more notation. LetB be a heavy part with l ≥ 1 heavy columns (numbered by 1, . . . , l) and borders C 0 and C l+1 . Let B 1 ,. . . ,B m be bubbles inB \ (C 0 ∪ C l+1 ) numbered in the top-bottom, left-right order. Let S 0 and S l+1 be (fixed) cuts in C 0 and C l+1 . To handle borders, we define auxiliary functions n ↓ , n ← , n ↑ , n → which output the number of cut vertices in borders in a specific position depending on the given row and column; they output 0 if the given column is not next to the borders. We define: • the number of (fixed) cut vertices in C 0 under the row r (or 0 if the previous column is not C 0 ): • the number of (fixed) cut vertices of type ( * , +) in the left border C 0 in the row r: • the number of (fixed) cut vertices in the right border C l+1 above the row r: • the number of (fixed) cut vertices of type (+, * ) in the right border C l+1 in the row r: We denote the number of vertices in B i by b i := |B i |, analogously b xy i := |B xy i |, x, y ∈ {+, −}. We further denote the set of counts corresponding to all possible choices of cut vertices in the bubble B i by β i , i.e., In addition, we denote the set of (l + 1)-tuples characterizing all possible counts of cut-vertices in the l heavy columns and an auxiliary number characterizing the count of possible edges from the last processed bubble, by Let e(s 1 , s 2 ) denote the number of cut-edges between two sets S 1 , S 2 which are complete to each other and S k , k ∈ {1, 2}, contains s k cut vertices and s k non-cut vertices, i.e., e(s 1 , s 2 ) = s 1 · s 2 + s 1 · s 2 . We remark that it is important to know the numbers of non-cut vertices (s 1 and s 2 ), however, we will not write them explicitly for the easier formulas. It will be seen that they can be, for instance, stored in parallel with the numbers of cut vertices (or counted in each step again). Finally, we define a recursive function f by the following recurrence relation: ∀(s 1 , . . . , s l , a) ∈ T : if s 1 ≤ b 1 , s 2 = · · · = s l = 0 : otherwise: ((s 1 , . . . , s l , a) f i ((s 1 , . . . , s l , a)) = max ((s 1 , . . . , s c − b, . . . , s l , z)) c).
where C 0 and C l+1 are borders ofB. For each s = (s 1 , . . . , s l , a) ∈ T and for every i ∈ {1, . . . , m}, the value f i (s) is equal to the maximum size of a cut S in G i that satisfies the following • for every j ∈ {1, . . . , l}, the number of cut vertices in the column j in G i is equal to s j , and S agrees with S 0 ∪ S l+1 in C 0 ∪ C l+1 , and • a is equal to the number of cut vertices from B ++

Lemma 13.
Proof. We prove Lemma 13 by induction on the number of steps (bubbles). Since B 1 is in the first heavy column, Lemma 13 is true for i = 1 by Definition 5 (iv).
In the inductive step, suppose that for every s = (v 1 , v 2 , · · · , v l , z) ∈ T , f i−1 (s) is equal to the size of a maximum cut S i−1 in G i−1 such that the number of cut vertices in each column j, for every j ∈ {1, 2, . . . , l}, in G i−1 is equal to v j , and the number of cut vertices from B * + i−1 is equal to z. Or f i−1 (s) is equal to −∞ if such a cut does not exist.
As it was mentioned, the edges of G i can be partitioned into disjoint sets E 1 -E 7 . Recall: Note that E 6 is non-empty only if B i is in the column 1, similarly E 7 is non-empty only if B i is in the column l. Let s = (s 1 , . . . , s l , a) ∈ T be fixed. At first assume, S is a maximum cut in G i (that agrees with S 0 ∪ S l+1 in C 0 ∪ C l+1 ) such that it contains s j vertices from the column j for each j ∈ {1, 2, · · · , l} and a vertices from B * + i ; we say S satisfies the conditions s. We discuss the case where no such cut exists, later. We denote by s xy the number of vertices in B xy i ∩ S, x, y ∈ {+, −}, and by s the sum of these values, i.e., s = s ++ + s +− + s −+ + s −− . We denote col(B i ) by j, and row(B i ) by r. Then, Which leads to the expression: n ↓ (r, j)) + e(s ++ + s +− , n ← (r, j)) + e(s ++ + s −+ , n → (r, j)), By the induction hypothesis, It gives us together with the right part of the equation, the definition of f i for b xy = s xy , b = s and z = |S ∩ B * + i−1 |. Therefore, Furthermore, we show that f i (s) is the size of a cut satisfying the conditions s. Since the value of the function f i−1 ((s 1 , · · · , s j − b, · · · , s l , z)) is for any number b ∈ {0, . . . , min (s j , b i )} a size of a cut in G i−1 which satisfies the conditions (s 1 , · · · , s j − b, · · · , s l , z), or −∞ (if no such cut exists), we can extend that cut into G i by adding b xy vertices from B xy Finally, we obtain the next theorem about a maximum cut of a heavy part as a corollary of Lemma 13.

Theorem 14.
LetB be a heavy part with l ≥ 1 heavy columns (numbered by 1, . . . , l) and borders C 0 and C l+1 . Let B 1 ,. . . ,B m be bubbles inB \ (C 0 ∪ C l+1 ) numbered in the top-bottom, left-right order. Let S 0 and S l+1 be (fixed) cuts in C 0 and C l+1 . Then, the size of a maximum cut in G(B) that agrees with S 0 ∪ S l+1 in light columns is Towards proving Theorem 2 and Corollary 3, it remains to prove the time complexity of processing a heavy part.

Lemma 15.
LetB be a heavy part with l ≥ 1 columns, m bubbles, and a fixed cut in the borders. The size of a maximum cut ofB that agrees with the fixed cut in the borders can be determined in the time: where c j is the number of vertices in the column j, i.e., c j = rj i =1 B i ,j , and a = max i |B * + i |. Proof. We analyze the time complexity of the algorithm from Lemma 15. Let T denote all the possible (l + 1)-tuples. Then |T | = (c 1 + 1) · · · (c l + 1) · (a + 1). The time for processing a bubble The time complexity of processingB is then Now, we are ready to prove Theorem 2.
Proof of Theorem 2. By Lemma 12, heavy parts can be processed independently on each other, given a cut on their borders. Moreover, it is sufficient for a light column C to remember only the biggest cuts on the left of C (containing C) for each possible cut in C. Therefore, there is no need to guess cuts in all light columns at once. It is sufficient to guess a cut only in two consecutive light columns at once. Observe that there are at most 2 √ n guesses of cut vertices for a light column and there are at most n light columns. Therefore, the time complexity of determining the size of a maximum cut in G is at most n · (2 √ n ) 2 · P, where P is the maximum time for processing a heavy part. Now, we want to prove that a time complexity of processing a heavy partB = B i,j 1≤j≤l,1≤i≤rj with a given guess of light columns is 2Õ ( √ n) . By Lemma 15, the time complexity of processing a heavy part with a given guess of light columns is To sum up, we can determine the size of a maximum cut in the time: n · (2 √ n ) 2 · P ∈ 2Õ ( √ n) . For brevity, we analyzed only the size of a maximum cut. However, the maximum cut itself can be determined retroactively in the time 2Õ ( √ n) , as well.
Lemma 15 has a nice corollary for graphs with a U-bubble model with a constant number of columns. According to Lemma 15, we are able to solve the MaxCut problem in those graphs in polynomial time which is formulated as Corollary 3 in the introduction.Therefore, we improved another polynomial-time algorithm by Boyaci, Ekim, Shalom [8] solving the MaxCut problem in co-bipartite chain graphs with possible twins (which is exactly the class of graphs defined by a classic bubble model with only two columns).
Proof. Let G be a graph on n vertices which is defined by a U-bubble model B with k columns and m bubbles. The bubble model B can be seen as a heavy part with no cut-vertices in its borders. By Lemma 15, the size of a maximum cut in B can be determined in time It remains to prove the special case where k = 2. Notice, it is sufficient to distinguish only between vertices in quadrants of types ( * , +) and ( * , −) in the first column, and simillarly (+, * ) and (−, * ) in the second column. Therefore, we obtain bi Note that Theorem 14 states the explicit size of a maximum cut.

Clique-width of mixed unit interval graphs
The clique-width is one of the parameters which are used to measure the complexity of a graph. Many NP-hard problems, those which are expressible in Monadic Second-Order Logic using secondorder quantifiers on vertices (M SO 1 ), can be solved efficiently in graphs of bounded clique-with [11]. For instance, 3-coloring. Definition of the clique-width is quite technical but it follows the idea that a graph of the clique-width at most k can be iteratively constructed such that in any time, there are at most k types of vertices, and vertices of the same type behave indistinguishably from the perspective of the newly added vertices.  by η i,j ).
Such a construction of a graph can be represented by an algebraic term composed of the operations ⊕, ρ i→j , and η i,j , called cwd-expression. We call k-expression a cwd-expression in which at most k different labels occur. Using this, we can say that the clique-width of a graph G is the smallest integer k such that the graph G can be defined by a k-expression.
Example. The diamond graph G on the four vertices u, v, w, x (the complete graph K 4 without an edge vw) is defined by the following cwd-expression: Therefore, cwd(G) ≤ 2.
Fellows, Rosamond, Rotics, and Szeider [15] proved in 2009 that the deciding whether the clique-width of a graph G is at most k is NP-complete. Therefore, researchers put effort into computing an upper-bound of the clique-width.
Courcelle and Olariu [12] showed in 2000 that bounded treewidth implies bounded clique-width (but not vice versa). They showed that for any graph G with the treewidth k, the clique-width of G is at most 4 · 2 k−1 + 1.
Golumbic and Rotics [20] proved that unit interval graphs have unbounded clique-width, consequently, (mixed unit) interval graphs have unbounded clique-width as well. Therefore, computing upper-bounds are of particular interest. Fellows et al. [14] showed that the clique-width of a graph is bounded by its pathwidth + 2, therefore, the clique-width of interval graphs as well as of unit interval graphs is upper-bounded by the size of their maximum clique + 1 [26,14]. Using a bubble model structure, subclasses of unit interval graphs were characterized in terms of (linear) clique-width [31,32]. Courcelle [12] observed that clique-width can be computed componentwise.
Lemma 16 (Courcelle 2000,[12]). Any graph G satisfies that We provide an upper-bound of the clique-width of a graph G depending on the number of columns in a U-bubble model of G. We express it also in the size of a maximum independent set. Proof. The proof is inspired by the proof for unit interval graphs [23].
We find a (k + 3)-expression defining G and, therefore, prove that cwd(G) ≤ k + 3. We use k + 3 labels where label i will be assigned to i-th column of B and the remaining three labels, denoted by l 1 , l 2 , l 3 , are used for maintaining the last two added vertices.
We define a linear order on vertices of G according to B as follows: (i) We take the vertices from top to bottom, left to right. Formally, let x ∈ B i,j , y ∈ B l,m , we define x ≺ y if i < l or (i = l and j < m); (ii) we define the following order on bubble quadrants: (iii) we define an arbitrary linear order on vertices in the same quadrant of the same bubble.
The idea of the proof is that every column has its own label and we need three more labels for maintaining the last added vertices. We will add vertices to G in the described order which ensures that a new vertex is complete to all vertices from the following column and anti-complete to all vertices from the previous column except those from the same row. Recall that according to the definition of U-bubble model, there is an edge between vertices x ∈ B i,j and y ∈ B i,j+1 if and only if x ∈ B * ,+ i,j and y ∈ B + * i,j+1 . Therefore, vertices from the last constructed bubble in the previous column must have two distinct labels according to the types of the vertices. However, once we add all vertices from the actual bubble, we do not need to distinguish between vertices from the previous column, anymore. Therefore, we rename their labels to the label of their column.
Formally. Let x be the first (smallest) vertex of G according to the defined linear order. We know that x is from the first column by Definition 5 (iv). If x is of type (−, +) or (+, +), we label it by l 1 , otherwise by 1, so the expression for G[{x}] is 1(x) if x is of type (+, −) or (−, −), and l 1 (x) otherwise.
Let y be the first non-processed vertex from G, i.e., a label is assigned to all preceding vertices. Let l 2 , l 3 ∈ {k + 1, k + 2, k + 3} are currently unused labels or l 2 is used in the actual bubble B i,j and l 3 is unused, and l 1 may be used (in the previous column). Note that at most one label from {k + 1, k + 2, k + 3} is used in the previous column any time. We split the proof according to the type of y, the bubble quadrant where y belongs.
(a) y ∈ B −− i,j . We use label l 2 for y. Then, we make y (the only one vertex with label l 2 ) complete to vertices with labels j + 1 (if j < k) and j. Relabel l 2 to j.
We use label l 2 for y. Then, we make y (the only one vertex with label l 2 ) complete to vertices with labels j + 1 (if j < k), j, l 1 . Relabel l 2 to j.
(c) y ∈ B −+ i,j . We use label l 2 for y. Then, we make all vertices with label l 2 complete to vertices with labels j + 1 (if j < k), j, l 2 . (Do not relabel vertices with label l 2 ).
(d) y ∈ B ++ i,j . We use label l 3 for y. Then, we make y (the only one vertex with label l 3 ) complete to vertices with labels j + 1 (if j < k), j, l 1 , l 2 . Relabel l 3 to l 2 .
If all vertices from B i,j were used, we rename all vertices with the label l 1 to j − 1 if j > 1. If j = k, we relabel l 2 to k.
For the correctness, observe that the previous column has always at most two labels and in a), b), and d) the temporary label for y is unique (no other vertices are labeled by it at that time). The rest follows from the definition of adjacency in the U-bubble model. Since we constructed G using at most k + 3 labels, cwd(G) ≤ k + 3.
The described algorithm processes each vertex once and each vertex has at most three labels in total. Moreover, the algorithm needs a constant work for each vertex-for instance, a cwd-expression for the option a) is: where G is the already constructed graph before adding the vertex y. Therefore, the (k + 3)expression defining G is constructed in linear time given a U-bubble model in an appropriate structure. Proof. We apply Lemma 17 and Lemma 10 together to obtain the statements.
Next, we provide a different bound for clique-width which is obtained by a small extension of the proof for unit interval graphs using the bubble model by Heggernes, Meister, and Papadopoulos [23]. We include the full proof for completeness.
We need more notation. Let G be a mixed unit interval graph and let B = B i,j 1≤j≤k,1≤i≤rj be a U-bubble model for G. We say that vertices from the same column j of B create a group if they have the same neighbours in the following column j + 1 of B. Let v ∈ B i,j , the group number of vertex v in B, denoted by g B (v), is defined as the maximum number of groups in Then the group number of G in B is defined as G is a mixed unit interval graph and B a U-bubble model for G. The following inequality holds Proof. Our aim is to find a (ϕ B (G) + 2)-expression defining G. We add vertices in the order from left to right, top to bottom of B processing vertices of type (+, * ) at first, i. e., in the following linear order:

Lemma 19. Let
(iii) an arbitrary linear order on the vertices in the same quadrant of the same bubble. Now, we follow the original proof. Shortly, we add each vertex v in a proper way. We assume that a label is assigned for each previous vertex and all the vertices which belong to the same group have the same label. At first, we change to 1 the label of all the previous vertices which are nonadjacent to v. We know that at most g B (v) distinct labels are used in the remaining groups, say labels {2, . . . , g B (v) + 1}. This is true since all the groups are adjacent to v and because of the linear order.
Note that it is important to add first all the vertices of type (+, * ) from a bubble. Otherwise, g B (v) + 1 remaining groups could be there; in the situation that v is of type (+, * ), a potentially one distinct label is needed for B * + i,j−1 , and another for B * − i,j . One the other hand, if all the vertices of type (+, * ) precede vertices of type (−, * ) in one bubble, this situation does not happen-a potential label of B * + i,j−1 would be released. Therefore, it is enough to take into account only the parts A = B * + i,j−1 ∪ B + * i,j , and A = B i,j , and not the bigger one A = B * + i,j−1 ∪ B i,j , in the definition of g B (v).
We use a free label, say g B (v) + 2, for v and join all the vertices with this label with vertices with labels 2, . . . , g B (v) + 1. Next, change the label of v to a label of its group if v belongs to an already existing group. We continue with the next vertex. During the processing of each vertex, we need no more than its group number + 2 distinct labels. Therefore, cwd(G) ≤ ϕ B (G) + 2.
It remains to determine the running time for the construction of the expression defining G. Assume a U-bubble model is given in a way that going over all vertices takes linear time in the number of vertices. First, we count the time for the creation of groups. For each vertex v we compare its neighbors from the next column with the neighbors of the previous vertex in this column. Therefore, the splitting vertices into groups and determining the group number of G take O(m + n) time. In a constant time, we determine a free label for each vertex. Then, we need to check the labels of groups in the neighborhood of each vertex v and create a O(g B (v)) long cwd-expression, yielding O(m + n) time in total. Furthermore, each vertex is at most once relabeled to 1 since once it is relabeled to 1, its label remains 1 for the rest of the algorithm. Therefore, the relabeling of vertices that are nonadjacent to a newly added vertex takes O(n) time in total. To sum up, the algorithm outputs the construction in O(n + m) time.
Combination of Theorems 18 and 20 give us the following theorem. Note that by an application of Lemma 4.1 in [31], slightly worse bounds on clique-width in terms of rows and columns can also be derived. In particular, if we take two natural orderings of the bubbles in the U-bubble model, one taking rows first and the other taking columns first, we obtain two times larger multiplicative factor than in Corollary 22.

Conclusion
The main contribution of this work is a new representation of mixed unit interval graphs-the U-bubble model. This structure is particularly useful in the design of algorithms and their analysis. Using the U-bubble model, we presented new upper-bounds for the clique-width of mixed unit interval graphs and designed a subexponential-time algorithm for the MaxCut problem on mixed unit interval graphs. We further realized that the state-of-the-art polynomial-time algorithm for the MaxCut problem on unit interval graphs is incorrect. A long-term task is to determine the difference between the time complexity of basic problems on unit interval graphs compared to interval graphs. In particular, on a more precise scale of mixed unit interval graphs, determine what is a key property for the change of the complexity. Independently, a long-standing open problem is the time complexity of the MaxCut problem on unit interval graphs, in particular, decide if it is NP-hard or polynomial-time solvable. An interesting direction to pursue the first task could be the study of labeling problems; either L 2,1 -labeling or Packing Coloring. Both problems were motivated by assigning frequencies to transmitters.The L 2,1 -labeling problem was first introduced by Griggs and Yeh in 1992 [21]. The packing coloring problem is newer, it was introduced by Goddard et al. in 2008 [18]. Although, these are well-known problems, quite surprisingly, their time complexity is open for interval graphs.
The L 2,1 -labeling problem assigns labels {0, . . . , k} to vertices such that the labels of neighboring vertices differ by at least two and the labels of vertices in distance two are different. The time complexity of this problem is still wide open even for unit interval graphs, despite partial progress on specific values for the largest used label. Sakai proved that the value of the largest label lies between 2χ − 2 and 2χ where χ is the chromatic number [38].
The packing coloring problem asks for an existence of such a mapping c : V → {1, . . . , m} that for all u = v with c(u) = c(v) = i the distance between u and v is at least i. This problem is wide open on interval graphs. Recently, there was a small progress on unit interval graphs leading to an FPT algorithm (time f (k) · n O(1) for some computable function f and parameter k). It is shown in [28] that the packing coloring problem is in FPT parameterized by the size of a maximum clique. We note that the algorithm can be straightforwardly extended to mixed unit interval graphs. However, a polynomial-time algorithm or alternatively NP-hardness for (unit) interval graphs is of a much bigger interest.