On the hydra number of disconnected graphs

On the hydra number of disconnected graphs

Discrete Applied Mathematics 267 (2019) 201–208 Contents lists available at ScienceDirect Discrete Applied Mathematics journal homepage: www.elsevie...

335KB Sizes 2 Downloads 156 Views

Discrete Applied Mathematics 267 (2019) 201–208

Contents lists available at ScienceDirect

Discrete Applied Mathematics journal homepage: www.elsevier.com/locate/dam

Note

On the hydra number of disconnected graphs Angelika Nicgorska-Miśkiewicz, Michał Tuczyński



Faculty of Mathematics and Information Science, Warsaw University of Technology, Koszykowa 75, 00-662 Warsaw, Poland

article

info

Article history: Received 9 October 2018 Received in revised form 3 April 2019 Accepted 17 April 2019 Available online 20 May 2019 Keywords: Directed hypergraphs Horn formulas Horn minimization Hydra Hydra number

a b s t r a c t The hydra number is a new graph parameter related to some minimization problem for Horn formulas in propositional logic. The hydra number of a graph G = (V , E) is the smallest number of hyperarcs of the form uv → w in a directed hypergraph H = (V , F ) such that if uv ∈ E, then all vertices in V are reachable from {u, v} in H and if uv ̸ ∈ E, then no other vertex apart from u and v is reachable from {u, v}. Reachability is defined by forward chaining, a standard marking procedure. In this paper we answer negatively a question posed in Sloan et al. (2017) concerning an anticipated formula for the hydra number of disconnected graphs. On the positive side, we show that the expression which appears in this formula is an upper bound for the hydra number of these graphs. © 2019 Elsevier B.V. All rights reserved.

1. Introduction In this paper we study a recently introduced (see Sloan, Stasi and Turán [9] and also [8,10]) graph parameter called the hydra number. We consider directed hypergraphs, i.e. pairs H = (V , E), where V is the set of vertices and E is the set of hyperarcs. Each hyperarc is a pair ({u, v}, w ), where u, v and w are distinct vertices. For short we write uv → w instead of ({u, v}, w ). The pair {u, v} is called the body and the vertex w is called the head of the hyperarc. We say that a vertex v ∈ V is reachable from a set S ⊆ V if the following marking procedure (called forward chaining) marks v : start with marking all vertices of S and, as long as there exists a hyperarc with both vertices of the body marked and the head unmarked, mark the head as well. For a given undirected graph G = (V , E) we are interested in finding the minimum number of hyperarcs in a directed hypergraph H = (V , F ) such that for every pair of vertices u, v all vertices of G are reachable from {u, v}, if uv ∈ E, and no other vertex apart from u and v is reachable from {u, v} otherwise. This minimum number of hyperarcs is called the hydra number of G and is denoted by h(G). The main motivation of studying the hydra number of a graph comes from some minimization problems in propositional logic related to Horn formulas. Horn formulas constitute an expressive and tractable part of propositional logic. For this reason they provide a basic framework for knowledge representation and reasoning (see [7]). Generally speaking, in Horn minimization problems we look for shortest possible Horn formula equivalent to a given Horn formula. Such problems have been extensively studied from both theoretical and algorithmic point of view (see [1–5]). For a more thorough discussion of the connection of the hydra number to the Horn formula minimization problems we refer the reader to Sloan et al. [9]. ∗ Corresponding author. E-mail address: [email protected] (M. Tuczyński). https://doi.org/10.1016/j.dam.2019.04.015 0166-218X/© 2019 Elsevier B.V. All rights reserved.

202

A. Nicgorska-Miśkiewicz and M. Tuczyński / Discrete Applied Mathematics 267 (2019) 201–208

In [9] the authors determined the hydra number for several classes of graphs such as paths, cycles, stars, caterpillars and spiders. They provided some general bounds on the hydra number of connected graphs in terms of different graph parameters. They also defined and studied a class of so-called single-headed graphs. These are graphs whose hydra number is equal to the number of edges (which is an obvious lower bound for the hydra number). Computational complexity aspects of the hydra number were recently studied by Kučera [6] who proved that deciding if a graph is single-headed is NP-complete which implies NP-hardness of the problem of computing the hydra number. The problem of hydra number for disconnected graphs was discussed shortly in Sloan et al. [9] as well. The authors observed that h(G) ≥ |E | + k if G = (V , E) is a disconnected graph with k ≥ 2 components and no isolated vertices. They also asked the following question (see [9, Problem 4.4]): For a graph G with k ≥ 2 connected components G1 , . . . , Gk and ∑k h(G no isolated vertices, is it true that h(G) = i ) + s, where s is the number of single-headed components Gi ? They i=1 showed that the answer to this question is positive when each component Gi is single-headed or contains a spanning caterpillar tree. In Section 2 we introduce notation and definitions related to the hydra number. Moreover, we list some basic observations that are used in the following parts of the paper. ∑k In Section 3 we prove one of the main results of this paper (Theorem 3.3). We show that the number i=1 h(Gi ) + s, appearing in the question posed by Sloan at al. [9] mentioned above, is an upper bound for the hydra number of disconnected graphs. We also observe that our gives in fact a stronger result (Theorem 3.4): for any partition ∑proof k E1 , . . . , Ek of the edge set of a graph G, h(G) ≤ i=1 h(Gi ) + s, where G1 , . . . , Gk are graphs induced by the sets of edges E1 , . . . , Ek , respectively, and s is the number of single-headed subgraphs Gi of G. In Section 4 we present the other main result of this paper - a negative answer to the question posed by Sloan at al. [9]. W define a family of graphs that we call octopuses and use them to construct graphs G ∑k a family of disconnected k−s with k ≥ 2 connected components G1 , . . . , Gk and the hydra number as low as i=1 h(Gi ) + s − ⌊ 2 ⌋ (Theorem 4.3). We conclude the paper with Section 5, where we formulate two open problems. 2. Preliminaries Generally, we follow the definitions and notation introduced in Sloan et al. [9]. In particular, we denote hyperedges ({u, v}, w ) by u, v → w or just uv → w . To simplify notation, we denote the body {u, v} of a hyperarc by uv . If the body uv belongs to only one hyperarc in H, then we say that this body is single-headed; otherwise it is multi-headed. In particular, if the body belongs to exactly two hyperarcs, then it is two-headed. If the body uv is also an edge of a graph, then we may alternatively use the word edge instead of the word body. In this paper the notions of adjacency or neighborhood refer to graphs only; we never use them in reference to hypergraphs. For technical reasons, for every directed hypergraph H = (V , F ) that we consider, we fix an arbitrary linear order on F and use this linear order without defining it explicitly. Definition 2.1 ([9]). Let H = (V , F ) be a directed hypergraph and S ⊆ V . By a forward chaining starting from the set S we mean the following procedure: 1: mark all vertices of S 2: while there exists a hyperarc with marked both vertices of the body and not marked head do 3: mark the head of the first such hyperarc Definition 2.2 ([9]). Let H = (V , F ) be a directed hypergraph. We say that a vertex v ∈ V is reachable from a set S ⊆ V in H, if the forward chaining procedure starting from S marks v . We say that a set W ⊆ V is reachable from a set S ⊆ V in H, if each vertex in W is reachable from S in H. The definition of the closure of a set is closely related to the reachability of a vertex described above. Definition 2.3 ([9]). Let H = (V , F ) be a directed hypergraph and S ⊆ V . The closure of the set S in H, denoted by clH (S), is the set of all vertices reachable in H from the set S. Definition 2.4 ([9]). Let G = (V , E) be a graph. We say that a directed hypergraph H = (V , F ) represents G, if: 1. uv ∈ E ⇒ clH (uv ) = V and 2. uv ∈ / E ⇒ clH (uv ) = {u, v}. In other words, a directed hypergraph H represents a graph G if for each edge in G the set of vertices reachable in H from this edge is equal to the set V of all vertices in G, but for any pair of non-adjacent vertices in G, these vertices are the only reachable ones in H by forward chaining algorithm starting from this pair. Every graph G has a representing hypergraph, for example the hypergraph (V (G), {uv → w : u, v, w are distinct vertices from V (G) and uv ∈ E(G)}) represents G.

A. Nicgorska-Miśkiewicz and M. Tuczyński / Discrete Applied Mathematics 267 (2019) 201–208

203

Definition 2.5 ([9]). The hydra number h(G) (or simply hydra) of a graph G = (V , E) is min {|F | : directed hypergraph H = (V , F ) represents the graph G} . Definition 2.6 ([9]). Any directed hypergraph for which the minimum in the definition above is achieved is called an optimal hypergraph representing G (or simply optimal for G). Given a graph G and its hydra number h(G), it is easy to compute the hydra number of a graph obtained by adding an isolated vertex or an isolated edge to G. Therefore we consider only graphs whose components have at least three vertices. Graphs with the lowest possible hydra number form an important class. Their name refers to the fact that all the bodies in optimal hypergraphs representing them are single-headed. Definition 2.7 ([9]). A graph G = (V , E) is called single-headed, if h(G) = |E |. In the rest of this section we present some simple observations on directed hypergraphs representing graphs. We shall use them extensively in proofs of our main results. Proposition 2.8. Let H = (V , F ) be a directed hypergraph. If H ′ = (V , F ′ ) is a directed subhypergraph of H, then clH ′ (S) ⊆ clH (S) for every S ⊆ V . Directly from the definition of a hypergraph representing a graph we get the following simple observation. Proposition 2.9. Let H = (V , F ) be a directed hypergraph representing a graph G. Every body in H has either a head which is adjacent to a vertex from the body or two heads which are adjacent to each other. Notice that a hyperarc α → q of a directed hypergraph H = (V , F ) representing a graph G = (V , E) is not needed to reach vertices of the body α from any body β in H. More precisely, the following statement holds. Proposition 2.10. Let H = (V , F ) be a directed hypergraph representing a graph G. Let Fα ⊆ F be the set of hyperarcs with α as the body. For every body β in H, α ⊆ clH −Fα (β ). The next proposition concerns the situation when we can remove some edges from a directed hypergraph representing a graph. Proposition 2.11. Let H = (V , F ) be a directed hypergraph representing a graph G and let H ′ be the directed hypergraph obtained from H by removing some hyperarcs α1 → v1 , . . . , αk → vk . If for every i ∈ {1, . . . , k} the vertex vi is reachable from the body αi in H ′ , then H ′ represents G. Corollary 2.12.

For each hyperarc uv → w in an optimal hypergraph H representing a graph G, w ∈ / clH −{uv→w} (uv ).

3. The upper bound We start with a lemma that describes a property of directed hypergraphs representing non-single-headed graphs that plays a crucial role in the proof of our first main result. For a compact formulation of this lemma we need the following definition. Definition 3.1. Let H be a directed hypergraph representing a graph G. We say that H has a coupler if there exists a multi-headed body in H with two adjacent heads in G. Lemma 3.2. Every non-single-headed graph G = (V , E) without isolated vertices has an optimal hypergraph representing G which has a coupler. Proof. Let H = (V , F ) be an optimal hypergraph representing G. Assume that H does not have a coupler. We prove that H can be transformed to another optimal hypergraph representing G which has a coupler. Consider any multi-headed body uv in H and denote its heads by v1 , . . . , vp . We consider three cases. 1. There exists i ∈ {1, . . . , p} such that vi is adjacent neither to u nor to v . Consider a forward chaining starting from uv in H. Let w be the first marked neighbor of vi and denote by α the body of the hyperarc used to mark w . Since H does not have a coupler, α → vi ∈ / F . Note that the hyperarc uv → vi is not needed to reach α , because α was marked before vi had any marked neighbor. Let H ′ = (V , F ′ ), where F ′ = F − {uv → vi } ∪ {α → vi }. Since α ⊆ clH ′ (uv ), also vi ∈ clH ′ (uv ). By Proposition 2.11, the directed hypergraph H ′ represents G and is optimal for G, because |F ′ | = |F |. Finally, H ′ has a coupler, because the body α has two adjacent heads w and vi .

204

A. Nicgorska-Miśkiewicz and M. Tuczyński / Discrete Applied Mathematics 267 (2019) 201–208

2. There exist i, j ∈ {1, . . . , p}, i ̸ = j, such that vi is adjacent to u and vj is adjacent to v . Note that vj is not reachable from uvi in H − {uv → vj }. Otherwise, since vi is reachable from uv in H − {uv → vj }, also vj is reachable from uv in H − {uv → vj }, contrary to Corollary 2.12. Consider forward chaining starting from uvi in H. Since vj ∈ / clH −{uv→vj } (uvi ), vertex v must be marked before vj . Denote by α the body of the hyperarc used to mark v . Let H ′ = (V , F ′ ), where F ′ = F − {uv → vj } ∪ {α → vj }. Since vi ∈ clH ′ (uv ), also α ⊆ clH ′ (uv ) and thus vj ∈ clH ′ (uv ). By Proposition 2.11, the directed hypergraph H ′ represents G and is optimal for G, because |F ′ | = |F |. Finally, H ′ has a coupler, because the body α has two adjacent heads v and vj . 3. For every i ∈ {1, . . . , p}, vi is adjacent to (without loss of generality) u but not to v . ⋃ p Let Hu = (V , {ux → y ∈ F : x ̸ = v}). For i ∈ {1, . . . , p}, let Wi = clHu (uvi ) and let W = i=1 Wi − {u} ∪ {v}. We will show that W ̸ ⊆ NG (u). Suppose W ⊆ NG (u). Let W = {v, v1 , . . . , vp , . . . , vq } for some q ≥ p. Then, r = |{ux → y : x ∈ W }| ≥ q + 2 because there are q + 1 bodies ux with x ∈ W and uv is multi-headed. Let H ′ be the directed hypergraph obtained from H by replacing these r hyperarcs with the following q + 1 hyperarcs: uv → v1 , uv1 → v2 , . . . , uvq → v . Then, for every x ∈ W , W ⊆ clH ′ (ux), so by Proposition 2.11 directed hypergraph H ′ represents G and has less hyperarcs than H, contrary to optimality of H. Thus, for some i ∈ {1, . . . , p} there exists x ∈ Wi such that x ∈ / NG (u). Without loss of generality we can assume that i = 1. Let uw → x be a hyperarc such that w ∈ W1 and x ∈ / NG (u). Let H ′ = (V , F ′ ), where F ′ = F − {uv → v2 } ∪ {uw → v2 }. Since v1 ∈ clH ′ (uv ), also w ∈ clH ′ (uv ) and thus v2 ∈ clH ′ (uv ). By Proposition 2.11, the directed hypergraph H ′ represents G and is optimal for G, because |F ′ | = |F |. Now consider the body uw and its heads x and v2 . The vertex x is non-adjacent to u. If x is also non-adjacent to w , then we apply Case 1 to the directed hypergraph H ′ and the body uw . Otherwise, we apply Case 2 to H ′ and uw . In both cases we obtain an optimal hypergraph representing G which has a coupler. □ Theorem 3.3. Let G = (V , E) be a disconnected graph with components G1 = (V1 , E1 ), . . ., Gk = (Vk , Ek ) such that each component Gi has at least three vertices. Then h(G) ≤

k ∑

h(Gi ) + s,

i=1

where s is the number of single-headed components Gi . Proof. Renumber the components of G, if necessary, so that G1 , . . . , Gs are single-headed. For i = 1, . . . , k, let Hi = (Vi , Fi ) be an optimal hypergraph representing Gi . For i = s + 1, . . . , k, we assume in addition that Hi has a coupler, which is guaranteed by Lemma 3.2. In each Hi , where i ∈ {s + 1, . . . , k}, we choose a multi-headed body ui vi with two heads wi , xi adjacent in Gi . In each Hi , where i ∈ {1, . . . , s}, we choose any body ui vi with the head wi and a neighbor xi of wi in Gi . We shall show how to connect the directed hypergraphs Hi with hyperarcs to get a directed hypergraph H = (V , F ) representing G. We will join Hi to i+1 , for every i = 1, . . . , k − 1, and Hk to H1 . In the rest of the proof we shall identify ⋃H k the index k + 1 with 1. Let F = i=1 ((Fi − Ri ) ∪ Ai ), where: Ri Ri

= =

{ui vi → wi } for i = 1, . . . , s; {ui vi → wi , ui vi → xi } for i = s + 1, . . . , k;

are the sets of removed hyperarcs and Ai

=

{ui vi → wi+1 , ui vi → xi+1 } for i = 1, . . . , k

are the sets of added hyperarcs. We will show that clH (ui vi ) = V for every i ∈ {1, . . . , k}. Consider any body ui vi and a forward chaining from ui vi in H. Using the added hyperarcs we mark wi+1 and xi+1 . By Proposition 2.10, starting with the edge wi+1 xi+1 and using the hyperarcs from Fi+1 − Ri+1 we can mark all vertices of Hi+1 . Clearly, using the same procedure we can extend this marking in turn of Hi+2 , . . . , H∑ i . By Proposition 2.11 the directed hypergraph H represents G. Thus we get ∑s to all vertices ∑ k k h(G) ≤ |F | = ( | F | + 1) + | F | = i i i=1 i=s+1 i=1 h(Gi ) + s. □ Notice that the proof of Theorem 3.3 does not make use of the fact that the graph G is disconnected but only of the fact that the sets E1 , . . . , Ek are disjoint. Thus, a more general theorem holds. Theorem 3.4. Let G = (V , E) be a graph without isolated vertices and isolated edges and let E1 , . . . , Ek be any partition of E (i.e. Ei ∩ Ej = ∅ for i ̸ = j and Ei ̸ = ∅ for i, j ∈ {1, . . . , k}). For i = 1, . . . , k denote by Gi = (Vi , Ei ) the subgraph of G induced by Ei . Then h(G) ≤

k ∑

h(Gi ) + s,

i=1

where s is the number of single-headed subgraphs Gi of G.

A. Nicgorska-Miśkiewicz and M. Tuczyński / Discrete Applied Mathematics 267 (2019) 201–208

205

Fig. 1. A connected component Gij of G for αi = αj (i ̸ = j).

4. Octopuses In this section we define a special family of graphs that we call octopuses. Their properties allow us to construct ∑k a graph that answers negatively the question (posed in [9]) if h(G) = i=1 h(Gi ) + s for disconnected graphs with k components, s of which are single-headed. We start with proving a result needed to calculate the hydra numbers of octopuses. Let l(G) be the number of leaves (i.e. vertices of degree 1) in a graph G and define G− to be the graph obtained from G by removing all its leaves. We shall show now a slight strengthening of a result proved in [9, Corollary 6.3]. The authors gave a lower bound for the hydra number of connected graphs with l(G− ) > 1. By reformulating the proof of this result given in [9] we are able to drop the assumption l(G− ) > 1 and show the same statement for an arbitrary graph G. Theorem 4.1.

For any graph G = (V , E), h(G) ≥ |E | + ⌈l(G− )/2⌉.

Proof. If l(G− ) = 0, then we get a true inequality h(G) ≥ |E |, so we assume that l(G− ) > 0. Let l = l(G− ) and denote by v1 , . . . , vl the leaves of G− . For i = 1, . . . , l let ui be the unique neighbor of vi in G− and let Li be the set of leaves of G adjacent to vi . Consider any optimal hypergraph H = (V , F ) representing G. Let k be the number of sets Li for which at least one element is the head of a hyperarc whose body does not contain vi . Without loss of generality we may assume that L1 , . . . , Lk are these k sets. For each i ∈ {1, . . . , k} select one such hyperarc αi → xi . Since the vertices from {x1 , . . . , xk } are pairwise non-adjacent and for every i ∈ {1, . . . , k} the vertex xi is non-adjacent to the vertices of αi , by Proposition 2.9, for every i ∈ {1, . . . , k} there exists a hyperarc with body αi in F − {α1 → x1 , . . . , αk → xk }. Hence h(G) ≥ |E | + k. Now we will show that h(G) ≥ |E | + l − k. For every i ∈ {k + 1, . . . , l} the body ui vi has at least one head in Li . Choose one such head and denote it by xi . For every i ∈ {k + 1, . . . , l} there exists a multi-headed body αi containing vi . Otherwise, by Proposition 2.9, clH (ui vi ) ⊆ {ui , vi } ∪ Li ̸ = V , contrary to the fact that H represents G. We will find a set of pairwise distinct hyperarcs {Ak+1 , . . . , Al } such that in (V , F − {Ak+1 , . . . , Al }) every body has at least one head. Let i ∈ {k + 1, . . . , l}. If αi is distinct from any αj , where j ∈ {k + 1, . . . , l} and i ̸ = j, then let Ai = αi → xi . Otherwise, αi = αj for some j ∈ {k + 1, . . . , l}, i ̸= j. Then, αi = vi vj since vi ∈ αi and vj ∈ αj . Hence, ui = vj and uj = vi and G has a connected component Gij shown in Fig. 1. If G is connected, then G = Gij , l(G− ) = 2 and h(G) ≥ |E | + 1 because vi vj is multi-headed, so the theorem holds. Now assume that G is disconnected. Then, there exists a body β in Gij with at least one head z in a different component of G. By Proposition 2.9, β is multi-headed. We define Ai = αi → xi and Aj = β → z. Because αi has also a head in Lj , removing Ai and Aj leaves αi with at least one head. We continue in the same manner until we choose all hyperarcs {Ak+1 , . . . , Al }. Since in (V , F − {Ak+1 , . . . , Al }) every body has at least one head, h(G) ≥ |E | + l − k. Finally, h(G) ≥ max {|E | + k, |E | + l − k} ≥ |E | + ⌈l/2⌉. □ We introduce now a family of graphs called octopuses. An octopus with n tentacles consists of a cycle of length n + 3 with n chords and n pendant paths. The paths and the chords have a common end in one of vertices of the cycle. (see Fig. 2). Definition 4.2. V E

= =

Let n ≥ 1. We define

{u0 , . . . , un+2 , v0 , . . . , vn−1 , w0 , . . . , wn−1 } and ⋃ ⋃ {u0 u1 , . . . , un+1 un+2 , un+2 u0 } ∪ ni=−01 {un+1 ui } ∪ ni=−01 {un+1 vi , vi wi }.

The graph On = (V , E) is called an octopus with n tentacles. The following theorem providing a negative answer to a question asked in Sloan, Stasi and Turán [9, Problem 4.4] is the main result of this section. It turns out that the hydra number of a disconnected graph may be smaller than the authors of the question anticipated.

206

A. Nicgorska-Miśkiewicz and M. Tuczyński / Discrete Applied Mathematics 267 (2019) 201–208

Fig. 2. An octopus with n tentacles.

Fig. 3. Octopus O3 with its optimal hypergraph.

Fig. 4. Three components of G with its optimal hypergraph.

A. Nicgorska-Miśkiewicz and M. Tuczyński / Discrete Applied Mathematics 267 (2019) 201–208

207

Theorem 4.3. For any positive integer k ≥ 2 there exists a graph G = (V , E) with components G1 = (V1 , E1 ), . . . , Gk = (Vk , Ek ) such that h(G) =

k ∑

⌊ h(Gj ) + s −

k−s



2

j=1

,

(1)

where s is the number of single-headed components of G. To prove Theorem 4.3 it suffices to consider the graph G with all components isomorphic to O3 . One can show that for every graph whose every component is isomorphic to an octopus with an odd number of tentacles the equality (1) holds too. The proof is very similar but contains more notational details. For the same reason of notational complexity we omit the proof in the case when G has an odd number of components. Lemma 4.4.

h(O3 ) = |E(O3 )| + ⌈l(O− 3 )/2⌉.

Proof. Consider the directed hypergraph H = (V (O3 ), F ), where F contains the following hyperarcs:

• • • •

ui ui+1 → ui+2 for i ∈ {0, . . . , 5}, ui u4 → vi for i ∈ {0, 1, 2}, u4 vi → wi , vi wi → vi+1 , vi wi → wi+1 for i ∈ {0, 2}, w1 v1 → u4 , v1 u4 → u5 ,

where addition of indices of vertices ui is modulo 6 and addition of indices of vertices vi and wi is modulo 3 (see Fig. 3). It is easy to check that H represents O3 . It has two two-headed bodies v0 w0 , v2 w2 and all the remaining bodies are − single-headed. Since l(O− 3 ) = 3, we get h(O3 ) ≤ |E | + 2 = |E | + ⌈l(O3 )/2⌉. The converse inequality follows from Theorem 4.1. □ j

Lemma 4.5. Let G = (V , E) be a graph with components O3 = (Vj , Ej ), j = 1, . . . , k, where k is a positive even integer. Then, h(G) = |E | + ⌈l(G− )/2⌉. j

j

j

j

j

j

j

j

j

Proof. Let Vj = {u0 , . . . , u5 , v0 , v1 , v2 , w0 , w1 , w2 } be the set of vertices of O3 . We will construct a directed hypergraph H = (V , F ) representing G by joining optimal hypergraphs representing the j+1 j components. We will join every directed hypergraph representing O3 to the directed hypergraph representing O3 for k 1 j ∈ {1, . . . , k − 1} and the directed hypergraph representing O3 to the directed hypergraph representing O3 . In the rest of the proof we shall identify the index k + 1 with 1. Let F be the set of the following hyperarcs: for j = 1, 3, . . . , k − 1 :

• • • •

j j

j

ui ui+1 → ui+2 for i ∈ {0, . . . , 5}, j j ui u4 j j i i j j u4 2

j i for i j j j u4 i u4 j j j 2 2 2

→v ∈ {0, 1, 2}, w v → , v → uj5 for i ∈ {0, 1}, v → w , v w → v0j+1 , v2j w2j → w0j+1 ,

for j = 2, 4, . . . , k :

• • • • •

j j

j

ui ui+1 → ui+2 for i ∈ {0, . . . , 5}, j j ui u4 j j 0 0 j j u4 1 j j u4 2

j i

→ v for i ∈ {0, 1, 2}, w v → uj4 , v0j uj4 → uj5 , v → w1j , v1j w1j → v0j+1 , v1j w1j → w0j+1 , v → w2j , v2j w2j → v1j+1 , v2j w2j → w1j+1 , j

j

j

where addition in subscript indices of vertices ui is modulo 6 and in subscript indices of vertices vi and wi is modulo 3 (see Fig. 4). j j Again, it is easy to check that the directed hypergraph H = (V , F ) represents G. There is one two-headed body v2 w2 for j j j j every odd j and two two-headed bodies v1 w1 , v2 w2 for every even j in H. All the remaining bodies in H are single-headed. Since l(G− ) = 3k, h(G) ≤ |E | +

k 2

+2

k 2

= |E | +

3k 2

⌈ = |E | +

l(G− ) 2

The converse inequality follows from Theorem 4.1. □ We are now ready to show Theorem 4.3.



.

208

A. Nicgorska-Miśkiewicz and M. Tuczyński / Discrete Applied Mathematics 267 (2019) 201–208

Proof of Theorem 4.3. As it was mentioned before, for technical reasons, we restricted ourselves to the case of even k in Lemma 4.5 but this lemma is also true for odd k. For any positive k ≥ 2, let G be the graph defined in Lemma 4.5. Since O3 is not single-headed, s = 0. By Lemmas 4.4 and 4.5,

⌈ h(G) = |E | +

3k 2



⌊ ⌋ = |E | + 2k −

k

2

=

k ∑

⌊ h(Gj ) + s −

j=1

k−s 2



. □

5. Open problems In the proof of Theorem 4.3 we saw that two non-single-headed connected components may ‘reduce’ the hydra number of a graph by one. This fact inclines us to state the following question which obviously has a positive answer for graphs with octopuses or single-headed graphs as components. Problem 5.1. Let G be a disconnected graph with components G1 , . . . , Gk such that each component Gi has at least three vertices. Is it true that h(G) ≥

k ∑

⌊ h(Gj ) + s −

j=1

k−s 2



,

where s is the number of single-headed components of G? Here is another problem, concerning the structure of an optimal hypergraph, which seems to be of some interest. Problem 5.2. Is it true that for any graph G there exists an optimal hypergraph representing G in which all bodies are at most two-headed? Observe that if we ask for any hypergraph representing G, not necessarily optimal, then the answer is trivially positive — we can assign to each body as heads one or two vertices of the next edge in our fixed linear order on the edge set of G (one or two vertices of the first edge if the body is the last edge). Acknowledgment The authors are very grateful to Zbigniew Lonc for his help in preparation of this paper. References [1] G. Ausiello, A. D’Atri, D. Saccà, Minimal representation of directed hypergraphs, SIAM J. Comput. 15 (2) (1986) 418–431. [2] K. Bérczi, E. Boros, O. Čepek, P. Kučera, K. Makino, Approximating minimum representations of key Horn functions, 2018, https://arxiv.org/abs/ 1811.05160. [3] A. Bhattacharya, B. DasGupta, D. Mubayi, G. Turán, On approximate Horn formula minimization, in: S. Abramsky, C. Gavoille, C. Kirchner, F. Meyer auf der Heide, P.G. Spirakis (Eds.), Automata, Languages and Programming, in: Lecture Notes in Comput. Sci., Springer Berlin Heidelberg, 2010, pp. 438–450. [4] E. Boros, A. Gruber, Hardness results for approximate pure Horn CNF formulae minimization, Ann. Math. Artif. Intell. 71 (2014) 327–363. [5] P.L. Hammer, A. Kogan, Optimal compression of propositional Horn knowledge bases: complexity and approximation, Artificial Intelligence 46 (1993) 131–145. [6] P. Kučera, Hydras: Complexity on general graphs and a subclass of trees, Theoret. Comput. Sci. 658 (2017) 399–416. [7] S. Russell, P. Norvig, Artificial intelligence: A modern approach, Prentice Hall, 2002. [8] R.H. Sloan, D. Stasi, G. Turán, Hydras: Directed hypergraphs and Horn formulas, in: M.C. Golumbic, M. Stern, A. Levy, G. Morgenstern (Eds.), Graph-Theoretic Concepts in Computer Science, in: Lecture Notes in Comput. Sci., 7551, Springer Berlin Heidelberg, 2012, pp. 237–248. [9] R.H. Sloan, D. Stasi, G. Turán, Hydras: Directed hypergraphs and Horn formulas, Theoret. Comput. Sci. 658 (2017) 417–428. [10] D. Stasi, Combinatorial Problems in Graph Drawing and Knowledge Representation (Ph.D. thesis), University of Illinois at Chicago, 2012.