A graph \(G = (V,E)\) is said to be an interval graph if it is possible to assign to each vertex of \(G\) a closed interval on the real line such that two distinct vertices of \(G\) are adjacent if and only if the corresponding intervals have a non-empty intersection, that is, if there exists a collection \({{\mathcal {I}}} = \{I_v v \in V(G)\}\) of closed intervals on the real line such that \(G\) is isomorphic to the intersection graph \(\Omega ({\mathcal {I}})\) of \({{\mathcal {I}}}\). In such a situation, the collection \({\mathcal {I}}\) is called an interval representation of \(G\). Without loss of generality we may assume that an interval representation consists of closed, nonempty, finite intervals in which all end points of the intervals are distinct. The first characterization of interval graphs has been proved by Lekkerkerker and Boland [1]. In some applications of interval graphs it is desirable to have an interval graph with as few different interval representations as possible. In [2] a class of interval graphs whose representations are far from being unique is demonstrated.

Let \({\mathcal I} = \{I_1,\ldots ,I_p\}\) be a set of intervals of the real line, where \(I_i = [a_i,b_i]\) for \(i = 1,2,\ldots ,p\). An interval \(I_i\) is called an end interval of the set \({\mathcal {I}}\) if \(a_i \le a_j\) for all \(j\), or \(b_i \ge b_j\) for all \(j\). A graph \(G\) is called a homogeneously representable interval graph (shortly, an HRI graph) if for every vertex \(v\) of \(G\) there exists an interval representation of \(G\) in which the interval representing \(v\) is an end interval. Homogeneously representable interval graphs were characterized in terms of forbidden subgraphs by Skrien and Gimbel [2].

FormalPara Theorem 1

(Skrien and Gimbel) A graph \(G\) is an HRI graph if and only if it does not contain any of the graphs \(P_4\), \(C_4\), \(C_5\) or \(G_1\) (Fig. 1) as an induced subgraph.

Fig. 1
figure 1

Graphs \(P_4\), \(P_5\), \(C_4\), \(C_5\), \(G_1\) and \(G_2\)

The line graph of a graph \(G\), denoted by \(L(G)\), is the intersection graph \(\Omega (\overline{E}(G))\) of the family \(\overline{E}(G) = \{\{u,v\} : uv \in E(G)\}\), that is, \(L(G)\) is the graph whose vertices are in one-to-one correspondence with the edges of \(G\), and two vertices of \(L(G)\) are adjacent if and only if the corresponding edges of \(G\) are adjacent. Whitney [3] proved that \(K_{1,3}\), \(K_3\) is the only pair of non-isomorphic connected graphs with isomorphic line graphs. In the next two theorems we characterize all graphs \(G\) whose line graphs \(L(G)\) are homogeneously representable interval graphs.

FormalPara Theorem 2

The line graph \(L(G)\) of a graph \(G\) is an HRI graph if and only if \(G\) contains no \(P_5\), \(C_4\), \(C_5\) or \(G_2\) (Fig. 1) as a subgraph.

FormalPara Proof

Note that \(P_4 = L(P_5)\), \(C_4 = L(C_4)\), \(C_5 = L(C_5)\), and \(G_1 = L(G_2)\). Now, Whitney’s theorem implies that if at least one of the graphs \(P_4\), \(C_4\), \(C_5\), and \(G_1\) is an induced subgraph of the line graph \(L(G)\), then at least one of the graphs \(P_5\), \(C_4\), \(C_5\), and \(G_2\) is a subgraph of \(G\). From this and from Theorem 1 it follows that if \(L(G)\) is not an HRI graph, then at least one of the graphs \(P_5\), \(C_4\), \(C_5\), and \(G_2\) is a subgraph of \(G\). The opposite implication is straightforward. \(\square \)

FormalPara Theorem 3

The line graph \(L(G)\) of a graph \(G\) is an HRI graph if and only if every connected component of \(G\) is a subgraph of any of the graphs \(H_1\), \(H_2\), and \(H_3\) Fig. 2.

FormalPara Proof

Since \(L(G)\) is an HRI graph if and only if every connected component of \(L(G)\) is an HRI graph, without loss of generality we may assume that \(G\) is connected and different from \(K_1\). First note that if \(G\) is a subgraph of any of the graphs given in Fig. 2, then it contains no \(P_5\), \(C_4\), \(C_5\) or \(G_2\) as a subgraph, and therefore \(L(G)\) is an HRI graph, by Theorem 2.

Now assume that \(L(G)\) is an HRI graph. According to Theorem 2, the graph \(G\) does not contain \(P_5\), \(C_4\), \(C_5\) or \(G_2\) as a subgraph. Let \(P = (v_0,v_1,\ldots ,v_d)\) be a longest path in \(G\). Since \(P_5\) is not a subgraph of \(G\) and \(G \ne K_1\), we have \(1 \le d\) \(\le 4\). If \(d = 1\), then \(G = K_2\) and \(G\) is a subgraph of \(H_i\). If \(d = 2\), then \(G\) is a star or a complete graph on three vertices. Notice that \(G\) is a subgraph of the graphs \(H_1\) and \(H_2\). If \(d = 3\) and \(P\) has no chord in \(G\), then it follows from the choice of \(P\) that the sets \(N_G(v_1)\) and \(N_G(v_2)\) are disjoint, and every vertex of \(N_G(v_1) \cup N_G(v_2){\setminus}\{v_1,v_2\}\) is a leaf in \(G\). Thus \(G\) is a double star, and it is a subgraph of \(H_2\). Now assume that \(d = 3\) and \(P\) has a chord in \(G\). From the absence of \(C_4\) in \(G\), it follows that either \(v_0v_2\) or \(v_1v_3\) is a chord of \(P\) in \(G\). Without loss of generality, assume that \(v_0v_2\) is a chord of \(P\) in \(G\). Since \(P\) is a longest path in \(G\), we have \(N_G(v_0) = \{v_1,v_2\}\), \(N_G(v_1) = \{v_0,v_2\}\), and each vertex of \(N_G(v_2) {\setminus} \{v_0,v_1\}\) is a leaf in \(G\). Therefore \(G\) can be obtained from \(K_3\) by attaching a positive number of leaves to exactly one vertex of \(K_3\). Certainly, \(G\) is a subgraph of \(H_2\). Now assume that \(d = 4\). From the absence of \(C_4\) and \(C_5\) in \(G\) and from the choice of \(P\), it easily follows that \(N_G(v_0){{\setminus}}\{v_1\} \subseteq \{v_2\}\) and \(N_G(v_4){{\setminus}}\{v_3\} \subseteq \{v_2\}\). In addition, \(N_G(v_2) {\setminus} \{v_1, v_3\} \subseteq \{v_0, v_4\}\) as otherwise \(G_2\) would be a subgraph of \(G\). Again from the choice of \(P\) and from the absence of \(C_4\) in \(G\), it follows that \(N_G(v_1) = \{v_0, v_2\}\) if \(v_0v_2\) is a chord of \(P\) in \(G\). Similarly, \(N_G(v_3) = \{v_2,v_4\}\) if \(v_2 v_4\) is a chord of \(P\) in \(G\). This implies that \(G = H_3\) if both \(v_0 v_2\) and \(v_2 v_4\) are chords of \(P\) in \(G\). If \(v_0 v_2\) is a chord of \(P\) and \(v_2 v_4\) is not a chord of \(P\), then the choice of \(P\) implies that the vertices belonging to \(N_G(v_3)\) are independent, and \(G\) is a subgraph of \(H_1\). Similarly, \(G\) is a subgraph of \(H_1\) if \(v_2 v_4\) is a chord and \(v_0 v_2\) is not a chord of \(P\) in \(G\). Finally assume that neither \(v_0 v_2\) nor \(v_2 v_4\) is a chord of \(P\) in \(G\). Then from the choice of \(P\) and from the absence of \(C_4\) in \(G\), it follows that the sets \(N_G(v_1) {\setminus} \{v_2\}\) and \(N_G(v_3) {\setminus} \{v_2\}\) are disjoint and each of them consists of independent vertices. Therefore \(G\) is a subgraph of \(H_2\). \(\square \)

Fig. 2
figure 2

Graphs \(H_1\), \(H_2\) and \(H_3\)

The middle graph of a graph \(G\), denoted by \(M(G)\), is the intersection graph \(\Omega ({\mathcal {F}})\) of the family \({\mathcal {F}} = \{\{v\} : v \in V(G)\} \cup \{\{v,u\} : vu \in E(G)\}\). It is known that \(M(G)\) is isomorphic to the line graph \(L(G \circ K_1)\) [4], where \(G \circ K_1\) is a graph obtained by taking the graph \(G\) and \(|V(G)|\) copies of \(K_1\) and then joining the \(i\)-th vertex of \(G\) to the \(i\)-th copy of \(K_1\).

The following result follows from Theorems 1 and 2.

FormalPara Theorem 4

The middle graph \(M(G)\) of a graph \(G\) is an HRI graph if and only if every connected component of \(G\) is isomorphic to \(K_1\) or \(K_2\).

FormalPara Proof

If every component of \(G\) is isomorphic to \(K_1\) or \(K_2\), then every component of \(M(G)\) is \(K_1 = M(K_1)\) or \(K_{1,2} = M(K_2)\). Thus by Theorem 1, \(M(G)\) is an HRI graph. Now assume that \(M(G)\) is an HRI graph. Suppose that \(G\) has a component different from \(K_1\) and \(K_2\). Then \(K_{1,2}\) is a subgraph of \(G\) and therefore \(G_2 = K_{1,2} \circ K_1\) is a subgraph of \(G \circ K_1\). Consequently, by Theorem 2, the middle graph \(M(G) = L(G \circ K_1)\) is not an HRI graph, a contradiction. \(\square \)

The total graph of a graph \(G\), denoted by \(T(G)\), is the intersection graph \(\Omega (F)\) of the family \(F = \overline{E}(G) \cup \overline{VE}(G) = \{\{v,u\} : vu \in E(G)\} \cup \{\{v\} \cup \{\{v,u\}\) \(: u \in N_G(v)\} : v \in V(G)\}\), that is, \(T(G)\) is the graph for which there exists a one-to-one correspondence between its vertices and the vertices and edges of \(G\) such that two vertices of \(T(G)\) are adjacent if and only if the corresponding elements in \(G\) are adjacent or incident. This concept was originated by Behzad [5]. It is interesting to note that the graphs \(G\) and \(L(G)\) are induced subgraphs of the total graph \(T(G)\).

We now determine all graphs whose total graphs are HRI graphs.

FormalPara Theorem 5

The total graph \(T(G)\) of a graph \(G\) is an HRI graph if and only if every connected component of \(G\) is isomorphic to \(K_1\), \(K_2\) or \(K_{1,2}\).

FormalPara Proof

The sufficiency follows immediately from Theorem 1. Now assume that \(T(G)\) is an HRI graph. It is easy to see that if \(T(G)\) is an interval graph, then every connected component of \(G\) is triangle-free. From this and from the absence of \(G_1\) in \(T(G)\) (Theorem 1) it follows that \(P_3\) is not a subgraph of \(G\). Thus every component of \(G\) is isomorphic to one of the graphs \(K_1\), \(K_2\), or \(K_{1,2}\). \(\square \)