• Keine Ergebnisse gefunden

The HEG Problem and the HGM Problem

3.3 Investigating the Algorithmic Use of Grid-Homogeneous Graphs

3.3.1 The HEG Problem and the HGM Problem

Consider a connected planar graph G = (V, E) on n vertices that contains a k×kgrid as a minor withk≥5. LetHGbe a minimal graph that contains ak×kgrid as a minor. Furthermore, consider an embedding ofH in the plane, which can be extended to an embedding ofGsuch that all properties in Definition 3.18 are satisfied for G0 =G, except possibly condition (H2), which says that, for some fixed`∈N, each face of the induced embedding ofH contains at most`vertices including the vertices on the boundary of the face. First, the problem of deciding whether (H2) can be satisfied is discussed under the assumption thatG=G0 andH are given as input. This is made precise by stating theHEG Problemand its optimization version, theMin HEG Problem. There and in the remaining chapter, the following convention is used. When counting the vertices that are embedded in a facef of a plane graph, then the vertices on the boundary off are counted as well.

f1 ofH, then the embedding cannot be extended to an embedding ofGwithout crossing edges.

Figure 3.13: Choosing where to embed the components ofGV(H). The graphH is colored blue and not shown completely. The labelsf1andf2 refer to faces of the induced embedding ofH.

Homogeneous Embedding Into a Square Grid (=HEG):

Input: k∈Nwith k≥5,`∈N, a connected planar graphG, a plane subgraphHGsuch thatH is a minimal graph containing thek×k grid as a minor.

Question: Can the embedding ofH be extended to an embedding ofGsuch that each small face ofH contains at most` vertices ofGand no vertex ofV(G)\V(H) is embedded in the large face ofH?

Minimum Homogeneous Embedding Into a Square Grid (=Min HEG):

Input: k∈Nwithk≥5, a connected planar graphG, a plane subgraphHGsuch thatH is a minimal graph containing thek×k grid as a minor.

Question: What is the smallest`∈Nsuch that the embedding ofHcan be extended to an embedding ofG where each small face ofH contains at most`vertices ofGand no vertex ofV(G)\V(H) is embedded in the large face ofH? If there is no such `∈N, return`=∞.

Consider an instance (k, `, G, H) of theHEG Problem. Roughly speaking, one needs to decide whether the vertices inV(G)\V(H) can be distributed homogeneously over the small faces of the plane graph H, where homogeneous is captured by the parameter `. Similarly, for an instance (k, G, H) of theMin HEG Problem, one needs to determine the smallest integer`such that the vertices inV(G)\V(H) can be spread homogeneously over the small faces of the plane graphH. Note that the input to both problems contains an embedding of the graphH and this is not a restriction due to Remark 3.15. Sometimes not only the optimal value of`for the instance (k, G, H) of theMin HEG Problemis of interest, but also an embedding of the graphGwith the properties required by theMin HEG Problem. The corresponding embedding ofGfor the instance (k, G, H) of theMin HEG Problemis an embedding ofG, that is an extension of the embedding ofH, such that no vertex inV(G)\V(H) is embedded in the large face of H and, for each small facef ofH, there are at most`vertices ofGembedded in the facef, where`denotes the optimal solution of the instance (k, G, H) of theMin HEG Problem.

Let (k, G, H) be an instance of theMin HEG Problemand consider a component ˜GofGV(H).

Then, in every corresponding embedding ofG, there is one face ofH, where all vertices of ˜Gare embedded.

So, to find a solution for the instance (k, G, H) one needs to distribute the components ofGV(H) to the faces ofH. Choosing to embed one component ˜G in a facef of H can influence the possibilities

to embed other components ofGV(H). Figure3.13a)shows an example where two components ˜G1

and ˜G2 ofGV(H) can each be embedded in the facesf1 andf2ofH but not both at the same time.

Figure3.13b)shows that choosing to embed one component ˜GofGV(H) in a certain face of H might yield a plane embedding ofG[V(H)∪V( ˜G)] that cannot be extended to a plane embedding ofG.

Recall Definition3.18, which defined a (γ, k, `)-grid-homogeneous graphG, and denote byG0 andH the subgraphs therein. If there is an edgeeE(G0)\E(H) such thatG00=G0eis connected, then the properties required in Definition3.18are also satisfied when usingG00 instead ofG0. IfG0eis not connected for everyeE(G0)\V(H), then the problems displayed in Figure3.13cannot occur. More precisely, when constructing an embedding ofG, then choosing to embed one component ofG0V(H) in a facef ofH does not affect the choices for embedding other components ofG0V(H). Therefore, the following version of theHEG Problemis defined. LetSimplified Homogeneous Embedding Into a Square Grid, or shortSimplified HEG, denote the restricted version of theHEG Problem, where the graphGhas the additional property thatGeis not connected for everyeE(G)\E(H). Define analogously a restricted version of theMin HEG Problem, which is denoted by Simplified Minimum Homogeneous Embedding Into a Square Grid, or shortSimplified Min HEG. Observe that the property thatGeis not connected for everyeE(G)\E(H) immediately implies thatGis planar and thatGhas an embedding in the plane that is an extension of the embedding of the plane graphH, where no vertex inV(G)\V(H) is embedded in the large face of H.

TheSimplified Min HEG Problemis similar to the following scheduling problem, which is examined by Lenstra, Shmoys, and Tardos in [LST90]. There, jobs need to be distributed to unrelated machines, which means that the processing time of a job depends on the machine to which it is assigned.

Scheduling on Unrelated Parallel Machines (=UPM Scheduling):

Input: number of jobsn0∈N, number of machinesm0∈N, makespan`0∈N, processing timep0i,j∈Nof jobion machine j for eachi∈[n0] andj∈[m0].

Question: Is there a schedule such that all jobs are processed within`0 time units?

Min Scheduling on Unrelated Parallel Machines (=Min UPM Scheduling):

Input: number of jobsn0 ∈N, number of machinesm0∈N, processing timep0i,j ∈Nof jobion machinej for eachi∈[n0] andj ∈[m0].

Question: What is the smallest number`0∈Nsuch that all jobs can be processed within`0 time units?

The UPM Scheduling Problem is NP-complete in the strong sense, since the more restricted version, wherepi,j = pi,j0 for all i ∈[n0] and all j, j0 ∈[m0] is required, is NP-complete in the strong sense, see Problem SS8 in [GJ79]. Next, it is argued that each instance of the Simplified HEG Problemcan be converted into an equivalent instance of theUPM Scheduling Problem. Consider an instanceI= (k, `, G, H) of theSimplified HEG Problem. Let there be a machine for each small face ofH, i. e., m0= (k−1)2. Moreover, let there be a job for each component ˜Gof GV(H) and for each face ofH, i. e., n0 is the number of components ofGV(H) plus (k−1)2. Define`0=`. Whenever a component ˜GofGV(H) can be embedded in the small facef ofH let the processing time of the job corresponding to ˜Gon the machine corresponding tof be the number of vertices of ˜Gand otherwise define this processing time to be`+ 1. To take care of the vertices on the boundary of each small face f ofH, define the processing time of the job corresponding tof as the number of vertices on the boundary off when scheduled on the machine corresponding tof and`+ 1 when scheduled on any other machine. This defines an instanceI0 = (n0, m0, `0,(p0i,j)) of theUPM Scheduling Problem. Clearly, any embedding ofGthat shows thatIis a yes-instance of the Simplified HEG Problemcorresponds to a schedule of

length at most`0 for the instanceI0 of theUPM Scheduling Problem. Observe that, in any feasible schedule of length at most `0 for the instance I0, each job corresponding to a facef is assigned to the machine corresponding tof. Moreover, each job corresponding to a component ˜GofGV(H) is assigned to a machine that corresponds to a small face f ofH such that ˜G can be embedded inf. Hence, the Simplified HEG Problemis a special version of theUPM Scheduling Problem.

On the positive side, it is known that there is a polynomial-time algorithm that finds a schedule whose length is at most twice the optimal length for each instance of theMin UPM Scheduling Problem, i. e., there is a 2-approximation for theMin UPM Scheduling Problem, see Theorem 2 in [LST90].

Recall that an algorithm is called anα-approximationfor a minimization problem if it runs in polynomial time and it returns a solution that has cost at mostαtimes the cost of an optimal solution. This implies the following corollary.

Corollary 3.25.

There is a2-approximation for the Simplified Min HEG Problem.

On the negative side, it is NP-hard to approximate an optimal solution of theMin UPM Scheduling Problem within a factor less than 32, meaning that, unless P = NP, there is no algorithm computing a schedule of length strictly less than 32 the optimum length in polynomial time, see Theorem 5 and Corollary 2 in [LST90]. This does not yet imply that it is NP-hard to approximate an optimal solution of the Simplified Min HEG Problemwithin a factor smaller than 32 and, indeed, it seems that the reduction used in [LST90] cannot be modified to a reduction for theHEG Problem. The reduction in the proof of Theorem 5 in [LST90] is from a problem called3-Dimensional Matching, which considers a hypergraph on a vertex set ABC, where |A|= |B|=|C| =n00 and whose edge-set is a subset ofA×B×C. The question is whether there are n00 edges whose union isABC, i. e., each vertex inABCis in exactly one of the edges. From an instance of the3-Dimensional Matching Problem, they create an instance of theUPM Scheduling Problem with processing times in{1,2,3}and one asks whether there is a schedule of length 2. Hence, one can conclude that the UPM Scheduling Problemis NP-complete, even when all processing times are in{1,2,3} and it is asked for a schedule of length 2. So the following result for theHEG Problemis not surprising.

Theorem 3.26.

The HEG Problemis NP-hard, even for`= 6.

The proof for the previous theorem is presented in Section 3.3.3. There, the Planar Monotone 3-SAT Problemis reduced to theHEG Problem, where all components ofGV(H) have size one or two. It will follow that, even for`= 6, theHEG Problemis NP-hard. Here, the approach of a reduction from the 3-Dimensional Matching Problem is not considered, as it seems hard to deal with the geometric restrictions imposed by the grid in theHEG Problemcompared to theUPM Scheduling Problem.

Observe also that, for ` = 5, theSimplified HEG Problem can be solved in polynomial time in the following way. Let (k, `, G, H) be an instance of theSimplified HEG Problemwith `= 5. First, the algorithm checks whether each small face of the plane graph H contains at most five vertices on its boundary, which takes O(kHk) time by Lemma2.26 as ∆(H)≤4 by Proposition 3.16. If not, it returns no. So, from now on, assume that every small face ofH has at most five vertices on its boundary.

Note that each small face ofH has at least four vertices on its boundary and that the small faces ofH with four vertices on their boundary are the only faces of H in which vertices fromV(G)\V(H) can be embedded, when trying to construct an embedding that shows that (k,5, G, H) is a yes-instance of

theSimplified HEG Problem. Next, the algorithm computes a listLface of all small faces ofH that contain exactly four vertices on their boundary. Note that every edge inG[V(H)] is also an edge ofH and, hence, is already embedded. Deciding whether (k,5, G, H) is a yes-instance of theSimplified HEG Problemmeans to decide whether the vertices inV(G)\V(H) can be distributed to the faces inLface such that each facef inLface receives at most one of these vertices and, if a facef receives a vertexv, thenv can be embedded inf. Next, the algorithm computes a listLcomp of all components ofGV(H), which takesO(kGk) time by Lemma2.25. If there is a component that contains two or more vertices, the algorithm returns no. So assume that every component ofGV(H) contains exactly one vertex. Then, the algorithm checks which component in Lcomp can be embedded in which face inLface. Consider a component ˜GinLcomp, which is an isolated vertexvinGV(H) that has precisely one neighborwinG as (k,5, G, H) is an instance of theSimplified HEG Problem. Hence, ˜Gcan be embedded in every facef that containswon its boundary. Lemma2.27states that, for all verticeswV(H), lists Lw with the faces that containwon their boundary can be computed all together inO(kHk) time. The information, which component can be embedded in which face, is stored in a bipartite graph Gemb, whose vertices are the entries ofLface andLcomp. The graphGemb contains an edge between a component ˜GinLcomp

and a facef inLface if and only if the component ˜Gcan be embedded in the facef. So, (k,5, G, H) is a yes-instance of theSimplified HEG Problemif and only ifGemb contains a matching that covers all vertices representing entries inLcomp or, equivalently, if a maximum matching inGemb contains as many edges as entries ofLcomp. The graph Gemb can be computed inO(kGk) time and the algorithm of Hopcroft and Karp [HK73] can be used to determine the cardinality of a maximum matching inGemb inO(kGembkp

|V(Gemb)|) time, which is polynomial in kGk.

Next, the minimization version of theHEG Problem, theMin HEG Problemis considered further.

Clearly, the Min HEG Problem is NP-hard. As it is an optimization problem, it is natural to ask for approximations, i. e., is there an α > 1 such that there is anα-approximation for the Min HEG Problem. When discussing the relation to theUPM Scheduling Problem, it was mentioned that the hardness results for theUPM Scheduling Problemdo not immediately imply similar hardness results for theMin HEG Problem, but the following corollary can be derived directly from Theorem 3.26.

Corollary 3.27.

It is NP-hard to approximate theMin HEG Problem withinαfor everyα < 76.

Proof. Fix an arbitraryα < 76. The idea is to show that approximating theMin HEG Problemwithinα is at least as hard as solving theHEG Problemfor`= 6, which is NP-complete due to Theorem3.26.

Assume there is an α-approximation for theMin HEG Problem and let (k, `, G, H) be an arbitrary instance of theHEG Problem with`= 6. Then (k, G, H) is an instance of theMin HEG Problem and applying the α-approximation returns a number `app. If `app ≥7, then the optimal value`opt of the instance (k, G, H) of the Min HEG Problemsatisfies `optα1`app > 6. Therefore, (k, `, G, H) is a no-instance of the HEG Problem. Otherwise, i. e., if `app < 7, then `opt`app and `opt ≤ 6 as`opt is an integer. Therefore, (k, `, G, H) is a yes-instance of theHEG Problem. Consequently, an α-approximation for theMin HEG Problemcan be used to solve theHEG Problem. 2 The previous corollary can be improved from 76 ≈1.166 to 1.5 as stated by the next theorem. Its proof also relies on Theorem3.26but requires to look at the details of the proof of Theorem3.26and, hence, is presented later in Section3.3.3.

Theorem 3.28.

It is NP-hard to approximate theMin HEG Problem withinαfor everyα < 32.

Recall that, as discussed earlier, theUPM Scheduling Problemis NP-hard to approximate withinα for everyα < 32 as well, but this does not imply that theMin HEG Problemis NP-hard to approximate withinαfor everyα < 32.

Next, some positive results on the approximability of theMin HEG Problemare presented. Recall that, as stated in Corollary3.25, the algorithm by Lenstra et al. in [LST90] yields a 2-approximation for theSimplified Min HEG Problem. However, this algorithm relies on integer programming, relaxing the integrality constraints, and rounding techniques. Hence, it is complex to implement and it does not run in linear time. There are algorithms that compute an embedding of a planar graph in linear time, i. e.,O(n) time for a graphGonn vertices, see Theorem2.28. Consider an instance (k, G, H) of the Min HEG Problem. SinceHis uniquely embeddable due to Remark3.15, any embedding ofGis an extension of the given embedding of the plane graphH. This is used to derive a linear-time 9-approximation as presented in the next lemma. An embedding ofGcorresponds to anα-approximation for the instance (k, G, H) of theMin HEG Problemif the embedding ofGis an extension of the embedding of the plane graphH, where no vertex fromV(G)\V(H) is embedded in the large face ofH and each small face ofH contains at mostα`opt vertices ofG, where`opt denotes the optimal solution for the instance (k, G, H).

Lemma 3.29.

Let(k, G, H)be an instance of the Min HEG Problemand denote byn the number of vertices ofG.

Any polynomial-time algorithm that computes an embedding ofG, which is an extension of the embedding of the plane graphH such that no vertex of V(G)\V(H)is embedded in the large face ofH, computes an embedding of G that corresponds to a 9-approximation for the Min HEG Problem. If no edge inE(G)\E(H)joins two vertices inH, then such an embedding ofGcan be computed inO(n)time.

The proof of Lemma3.29is presented in Section3.3.5, where it is also shown that the approximation ratio is tight. As argued earlier, when introducing theSimplified MIN HEG Problem, the restriction thatGdoes not contain certain edges, which do not belong toH and can be removed without destroying the connectivity ofG, is little. Observe that the restriction in the last lemma is weaker than requiring that (k, G, H) is an instance of theSimplified Min HEG Problem. Given an arbitrary instance (k, G, H) of theMin HEG Problem, it is easy to remove all edges inE(G)\E(H) that join two vertices in H inO(n) time, wherendenotes the number of vertices ofG. Indeed, recall thatV(G) = [n] and consider the following algorithm. First, the algorithm initializes a binary arrayAH of lengthnwith zeros, which takesO(n) time. Then, it set to one all entries ofAH that correspond to vertices inH by traversingH with a depth-first search to obtain a list of the vertices inH, which takes time proportional tokHk ≤ kGk by Lemma2.25. Afterwards, for each vertexvV(H), the algorithm traverses the adjacency list ofv inG. Whenever an entryuV(H) is discovered, the algorithm deletesufrom the adjacency list ofv inGif and only ifuis not a neighbor ofvinH, i. e., if and only if {u, v}is not an edge of H. Observe that the arrayAH can be used to check in constant time whetheruV(H) and, if so, it takes constant time to check whetheruis a neighbor ofvinH as ∆(H)≤4 implies that the adjacency list ofuinH can be traversed in constant time. Therefore, the traversals of the adjacency lists ofGtakeO(kGk) time together. Consequently, the entire procedure takesO(n+kGk) =O(n) time by Corollary2.9.

When considering the simplified version of theMin HEG Problemand choosing the embedding of G in Lemma3.29a bit more carefully, then the following result is obtained.

Theorem 3.30.

There is a5-approximation for theSimplified Min HEG Problemthat runs inO(n√

n)time when given an instance(k, G, H)where Gis a graph onn vertices. Furthermore, without increasing the asymptotic running time, the algorithm can return a corresponding embedding ofG.

As Lemma 3.29, Theorem 3.30 is also proved in Section 3.3.5. There, it is also shown that the approximation ratio is tight with respect to the used construction. The reason for considering only instances (k, G, H) of the simplified version of the Min HEG Problemin Theorem3.30, is that when extending the embedding ofH to an embedding ofGand choosing to embed one component ofGV(H) in a small face ofH, then this does not affect the possibilities where the other components ofGV(H) can be embedded.

Recall Definition 3.18, which defines (γ, k, homogeneous graphs, and consider a (γ, k, `)-grid-homogeneous graphGwith subgraphsG0 andH as in Definition3.18. TheHEG Problemfocuses on

Recall Definition 3.18, which defines (γ, k, homogeneous graphs, and consider a (γ, k, `)-grid-homogeneous graphGwith subgraphsG0 andH as in Definition3.18. TheHEG Problemfocuses on