DeepAI
Log In Sign Up

An Algorithmic Framework for Locally Constrained Homomorphisms

01/27/2022
by   Laurent Bulteau, et al.
Newcastle University
Durham University
0

A homomorphism f from a guest graph G to a host graph H is locally bijective, injective or surjective if for every u∈ V(G), the restriction of f to the neighbourhood of u is bijective, injective or surjective, respectively. The corresponding decision problems, LBHOM, LIHOM and LSHOM, are well studied both on general graphs and on special graph classes. Apart from complexity results when the problems are parameterized by the treewidth and maximum degree of the guest graph, the three problems still lack a thorough study of their parameterized complexity. This paper fills this gap: we prove a number of new FPT, W[1]-hard and para-NP-complete results by considering a hierarchy of parameters of the guest graph G. For our FPT results, we do this through the development of a new algorithmic framework that involves a general ILP model. To illustrate the applicability of the new framework, we also use it to prove FPT results for the Role Assignment problem, which originates from social network theory and is closely related to locally surjective homomorphisms.

READ FULL TEXT VIEW PDF

page 3

page 5

page 7

page 11

page 13

page 17

page 21

page 27

05/22/2021

Parameterized Complexity of Locally Minimal Defensive Alliances

The Defensive Alliance problem has been studied extensively during the l...
08/06/2022

Parameterized Algorithms for Locally Minimal Defensive Alliance

A set D of vertices of a graph is a defensive alliance if, for each elem...
10/30/2018

Parameterized Complexity of Equitable Coloring

A graph on n vertices is equitably k-colorable if it is k-colorable and ...
08/05/2022

Offensive Alliances in Graphs

A set S⊆ V of vertices is an offensive alliance in an undirected graph G...
07/30/2018

Parameterized Orientable Deletion

A graph is d-orientable if its edges can be oriented so that the maximum...
07/20/2022

Contraction Bidimensionality of Geometric Intersection Graphs

Given a graph G, we define bcg(G) as the minimum k for which G can be co...
01/07/2023

What is a decision problem?

This paper presents a general framework about what is a decision problem...

1 Introduction

A homomorphism from a graph to a graph is a mapping such that for every . Graph homomorphisms generalise graph colourings (let be a complete graph) and have been intensively studied over a long period of time, both from a structural and an algorithmic perspective. We refer to the textbook of Hell and Nešetřil [44] for a further introduction.

We write if there exists a homomorphism from to ; here, is called the guest graph and is the host graph. We denote the corresponding decision problem by Hom, and if is fixed, that is, not part of the input, we write -Hom. The renowned Hell-Nešetřil dichotomy [42] states that -Hom is polynomial-time solvable if is bipartite, and NP-complete otherwise. We denote the vertices of by and call them colours. The reason for doing this is that graph homomorphisms generalise graph colourings: there exists a homomorphism from a graph to the complete graph on vertices if and only if is -colourable.

Instead of fixing the host graph , one can also restrict the structure of the guest graph  by bounding some graph parameter. A classical result states that Hom is polynomial-time solvable when the guest graph  has bounded treewidth [16, 37]. The core of a graph is the subgraph of such that and there is no proper subgraph of with (the core is unique up to isomorphism [43]). Dalmau, Kolaitis and Vardi [18] proved that the Hom problem is polynomial-time solvable even if the core of the guest graph  has bounded treewidth. This result was strengthened by Grohe [40], who proved that if , then Hom can be solved in polynomial time if and only if this condition holds.

Locally constrained homomorphisms. We are interested in three well-studied variants of graph homomorphisms that occur after placing constraints on the neighbourhoods of the vertices of the guest graph . Consider a homomorphism from a graph to a graph . We say that is locally injective, locally bijective or locally surjective for if the restriction to the neighbourhood of is injective, bijective or surjective. We say that is locally injective, locally bijective or locally surjective if it is locally injective, locally bijective, or locally surjective for every . We denote these locally constrained homomorphisms by , and , respectively.

The three variants have been well studied in several settings over a long period of time. For example, locally injective homomorphisms are also known as partial graph coverings and are used in telecommunications [29], in distance constrained labelling [28] and as indicators of the existence of homomorphisms of derivative graphs [58]. Locally bijective homomorphisms originate from topological graph theory [4, 57] and are more commonly known as graph coverings. They are used in distributed computing [2, 3, 7] and in constructing highly transitive regular graphs [5]. Locally surjective homomorphisms are sometimes called colour dominations [52]. They have applications in distributed computing [12, 13] and in social science [26, 63, 66, 69]. In the latter context they are known as role assignments, as we will explain in more detail below.

Let LBHom, LIHom and LSHom be the three problems of deciding, for two graphs and , whether , or holds, respectively. As before, we write -LBHom, -LIHom and -LSHom in the case where the host graph  is fixed. Out of the three problems, only the complexity of -LSHom

has been completely classified, both for general graphs and bipartite graphs 

[32]. We refer to a series of papers [1, 6, 29, 31, 49, 50, 55] for polynomial-time solvable and NP-complete cases of -LBHom and -LIHom; see also the survey by Fiala and Kratochvíl [30]. Some more recent results include sub-exponential algorithms for -LBHom, -LIHom and -LSHom on string graphs [60] and complexity results for -LBHom for host graphs that are multigraphs [51] or that have semi-edges [9].

In our paper we assume that both and are part of the input. We note a fundamental difference between locally injective homomorphisms on one hand and locally bijective and surjective homomorphisms on the other hand. Namely, for connected graphs and , we must have if or , whereas might be arbitrarily larger than if holds. For example, if we let be a complete graph, then holds if and only if contains a clique on at least vertices.

The above difference is also reflected in the complexity results for the three problems under input restrictions. In fact, LIHom is closely related to the Subgraph Isomorphism problem and is usually the hardest problem. For example, LBHom is Graph Isomorphism-complete on chordal guest graphs, but polynomial-time solvable on interval guest graphs and LSHom is NP-complete on chordal guest graphs, but polynomial-time solvable on proper interval guest graphs [41]. In contrast, LIHom is NP-complete even on complete guest graphs , which follows from a reduction from the Clique problem via the aforementioned equivalence: holds if and only if contains a clique on at least vertices.

To give another example, LBHom, LSHom and LIHom are NP-complete for guest graphs  of path-width at most , and , respectively [15] (all three problems are polynomial-time solvable if is a tree [15, 33]). Note that these hardness results imply that the aforementioned polynomial-time result on Hom for guest graphs  of bounded treewidth [16, 37] does not carry over to any of the three locally constrained homomorphism problems. It is also known that LBHom [48], LSHom [52] and LIHom [29] are NP-complete even if is cubic and is the complete graph on four vertices, but polynomial-time solvable if  has bounded treewidth and one of the two graphs  or  has bounded maximum degree [15].

An Application. Locally surjective homomorphisms from a graph to a graph are known as -role assignments in social network theory. We will include this topic in our investigation and provide some brief context. Suppose we are given a social network of individuals whose properties we aim to characterise. Can we assign each individual a role such that individuals with the same role relate in the same way to other individuals with some role, using exactly different roles in total? To formalise this question, we model the network as a graph , where vertices represent individuals and edges represent the existence of a relationship between two individuals. We now ask whether has an -role assignment, that is, a function that assigns each vertex a role , such that and for every two vertices and , if then .

Role assignments were introduced by White and Reitz [69] as regular equivalences and were called role colourings by Everett and Borgatti [26]. We observe that two adjacent vertices and may have the same role, that is, is allowed (so role assignments are not proper colourings). Hence, a connected graph has an -role assignment if and only if for some connected graph with , as long as we allow to have self-loops (while we assume that is a graph with no self-loops).

The Role Assignment problem is to decide, for a graph and an integer , whether has an -role assignment. If is fixed, we denote the problem -Role Assignment. Whereas -Role Assignment is trivial, -Role Assignment is NP-complete [66]. In fact, -Role Assignment is NP-complete for planar graphs  [64], cubic graphs  [65], bipartite graphs  [62], chordal graphs  [68] and split graphs  [20]. Very recently, Pandey, Raman and Sahlo [61] gave an -time algorithm for Role Assignment on general graphs and an -time algorithm on forests.

Our Focus. We continue the line of study in [15] and focus on the following research question:

For which parameters of the guest graph do LBHom, LSHom and LIHom become fixed-parameter tractable?

We will also apply our new techniques towards answering this question for the Role Assignment problem. In order to address our research question, we need some additional terminology. A graph parameter dominates a parameter  if there is a function  such that for every graph . If dominates but does not dominate , then is more powerful (less restrictive) than . We denote this by . If neither dominates nor dominates , then and are incomparable (orthogonal). Given the para-NP-hardness results on LBHom, LSHom and LIHom for graph classes of bounded path-width [15], we will consider a range of graph parameters that are less powerful than path-width. In this way we aim to increase our understanding of the (parameterized) complexity of LBHom, LSHom and LIHom.

For an integer , a -deletion set of a graph is a subset such that every connected component of has at most vertices. The -deletion set number of a graph is the minimum size of a -deletion set in . If , then we obtain the vertex cover number of . The -deletion set number is also known as vertex integrity [23]. It is closely related to the fracture number , introduced in [24], which is the minimum such that has a -deletion set on at most  vertices. Note that holds for every integer . The feedback vertex set number of a graph is the size of a smallest set such that is a forest. We write , and for the treewidth, path-width and tree-depth of a graph , respectively; see [59] for more information, in particular on tree-depth. It is known that

where the second relationship is proven in [8] and the others follow immediately from their definitions (see also Section 2.2). It is readily seen that

and that is incomparable with the parameters , , and for every fixed (consider e.g. a tree of arbitrarily large path-width and the disjoint union of arbitrarily many triangles).

guest graph parameter LIHom LBHom LSHom
XP, W[1]-hard [21] FPT FPT
vertex cover number XP (Theorem 5), W[1]-hard FPT FPT
-deletion set number (fixed ) para-NP-c (Theorem 5) FPT FPT
fracture number para-NP-c FPT (Theorem 4) FPT (Theorem 4)
tree-depth para-NP-c para-NP-c (Theorem 6) para-NP-c (Theorem 6)
path-width para-NP-c [15] para-NP-c [15] para-NP-c [15]
treewidth para-NP-c para-NP-c para-NP-c
maximum degree para-NP-c [29] para-NP-c [48] para-NP-c [52]
treewidth plus maximum degree XP, W[1]-hard XP [15] XP [15]
feedback vertex set number para-NP-c para-NP-c (Theorem 6) para-NP-c (Theorem 6)
Table 1: Table of results. The results in blue are the new results proven in this paper. The results in black are either known results, some of which are now also implied by our new results, or follow immediately from other results in the table; in particular, for a graph , if , and if . Also note that LIHom is W[1]-hard when parameterized by , as Clique is W[1]-hard when parameterized by the clique number [21], so as before, we can let be the complete graph in this case.

Our Results. We prove a number of new parameterized complexity results for LBHom, LSHom and LIHom by taking some property of the guest graph  as the parameter. In particular, we consider the graph parameters above. Our two main results, which are proven in Section 4, show that LBHom and LSHom are fixed-parameter tractable parameterized by the fracture number of . These two results cannot be strengthened to the tree-depth of the guest graph, for which we prove para-NP-completeness in Section 6. Note that the latter results imply the known para-NP-completeness results for path-width of the guest graph [15]. In Section 6 we also prove that LBHom and LSHom are para-NP-complete when parameterized by the feedback vertex set number of the guest graph. This result and the para-NP-hardness for tree-depth motivated us to consider the fracture number as a natural remaining graph parameter for obtaining an fpt algorithm.

The above para-NP-completeness results for LBHom in fact even hold for -FoldCover, the restriction of LBHom to input pairs where . The -FoldCover problem was introduced in [7] (where it was called the -Graph Covering problem). In fact, the aforementioned result of [15] on LBHom for path-width is the first proof that -FoldCover is NP-complete, and the proof can easily be adapted for , as observed by Klavík [47].

In Section 5 we prove that LIHom is in XP and W[1]-hard when parameterized by the vertex cover number, or equivalently, the -deletion set number for . We then show that the XP-result for LIHom cannot be generalised to hold for . In fact, in the same section, we will determine the complexity of LIHom on graphs with -deletion set number at most for every fixed pair of integers and . Our results for LBHom, LSHom and LIHom are summarised, together with the known results, in Table 1.

Algorithmic Framework. The FPT algorithms for LBHom and LSHom are proven via a new algorithmic framework (described in detail in Section 3) that involves a reduction to an integer linear program (ILP) that has a wider applicability. To illustrate this, in Section 4 we also use our general framework to prove that Role Assignment is FPT when parameterized by . We emphasize that in our framework the host graph  is not fixed, but part of the input, in contrast to other frameworks that include the locally constrained homomorphism problems (and that consequently work for more powerful graph parameters), such as the framework of locally checkable vertex partitioning problems [10, 67] or the framework of Gerber and Kobler [39] based on (feasible) interval degree constraint matrices.

Techniques. The main ideas behind our algorithmic ILP framework are as follows. Let and be the guest and host graphs, respectively. First, we observe that if has a -deletion of size at most and there is a locally surjective homomorphism from to , then must also have a -deletion set of size at most . However it does not suffice to compute -deletion sets and for and , guess a partial homomorphism from to , and use the structural properties of -deletion sets to decide whether can be extended to a desired homomorphism from to . This is because a homomorphism from to does not necessarily map to . Moreover, even if it did, vertices in can still be mapped to vertices in . Consequently, components of can still be mapped to more than one component of . This makes it difficult to decompose the homomorphism from to into small independent parts. To overcome this challenge, we prove that there are small sets and of vertices in and , respectively, such that every locally surjective homomorphism from to satisfies:

  1. the pre-image of is a subset of ,

  2. is a -deletion set for for some bounded in terms of only , and

  3. all but at most components of have at most vertices and, while the remaining components can be arbitrary large, their treewidth is bounded in terms of .

As and are small, we can enumerate all possible homomorphisms from some subset of to . Condition 2 allows us to show that any locally surjective homomorphism from to can be decomposed into locally surjective homomorphisms from a small set of components of (plus ) to one component of (plus ). This enables us to formulate the question of whether a homomorphism from a subset of to a subset of can be extended to a desired homomorphism from to in terms of an ILP. Finally, Condition 3 allows us to efficiently compute the possible parts of the decomposition, that is, which (small) sets of components of can be mapped to which components of .

2 Preliminaries

We use standard notation from graph theory, as can be found in e.g. [19]. Let be a graph. We denote the vertex set and edge set of by and , respectively. Let be a set of vertices of . The subgraph of induced by , denoted , is the graph with vertex set and edge set . Whenever the underlying graph is clear from the context, we will sometimes refer to an induced subgraph simply by its set of vertices. We use to denote the subgraph of induced by . Similarly, for we let be the subgraph of obtained by deleting all edges in from .

For a graph and a vertex , we let and denote the open and closed neighbourhood of in , respectively. We let be the maximum degree of . Recall that we assume that the guest graph  does not contain self-loops, while the host graph  is permitted to have self-loops. In this case, by definition, if .

2.1 Parameterized Complexity

In parameterized complexity [17, 22, 35], the complexity of a problem is studied not only with respect to the input size, but also with respect to some problem parameter(s). The core idea behind parameterized complexity is that the combinatorial explosion resulting from the NP-hardness of a problem can sometimes be confined to certain structural parameters that are small in practical settings. We now proceed to the formal definitions.

A parameterized problem is a subset of , where is a fixed alphabet. Each instance of is a pair , where is called the parameter. A parameterized problem is fixed-parameter tractable (FPT[17, 22, 35], if there is an algorithm, called an FPT-algorithm, that decides whether an input is a member of in time , where is a computable function and is the size of the input instance. The class FPT denotes the class of all fixed-parameter tractable parameterized problems.

A parameterized problem is FPT-reducible to a parameterized problem if there is an algorithm, called an FPT-reduction, that transforms each instance of into an instance of in time , such that and if and only if , where and are computable functions. By fpt-time, we denote time of the form , where is a computable function. Based on the notion of FPT-reducibility, a hierarchy of parameterized complexity, the W-hierarchy , where for all , has been introduced, in which the -th level W[0] is the class FPT. The notions of hardness and completeness have been defined for each level W[] of the W-hierarchy for [17, 22]. It is commonly believed that (see [17, 22]). This assumption has served as the main working hypothesis of fixed-parameter intractability. The class XP contains parameterized problems that can be solved in time, where is a computable function. It contains the class W[t], for all , and every problem in XP is polynomial-time solvable when the parameter is bounded by a constant. The class paraNP is the class of parameterized problems that can be solved by non-deterministic algorithms in time, where is a computable function. A problem is paraNP-hard if it is NP-hard for a constant value of the parameter [35].

2.2 Graph Parameters

A -extended deletion set for is a set such that:

  • every component of either has at most vertices or has a -deletion set of size at most and

  • at most components of have more than vertices.

We need the following well-known fact: [[53]] Let be a graph and let and be natural numbers. Then, deciding whether has a -deletion set of size at most is fixed-parameter tractable parameterized by .

Tree-depth.

Tree-depth is closely related to treewidth, and the structure of graphs of bounded tree-depth is well understood [59]. A useful way of thinking about graphs of bounded tree-depth is that they are (sparse) graphs with no long paths.

The tree-depth of an undirected graph , denoted by , is the smallest natural number such that there is an undirected rooted forest with vertex set of height at most for which is a subgraph of , where is called the closure of and is the undirected graph with vertex set having an edge between and if and only if is an ancestor of in . A forest for which is a subgraph of is also called a tree-depth decomposition, whose depth is equal to the height of the forest plus one. Informally a graph has tree-depth at most if it can be embedded in the closure of a forest of height . Note that if is connected, then it can be embedded in the closure of a tree instead of a forest.

Treewidth.

A tree-decomposition  of a graph is a pair , where is a tree and is a function that assigns each tree node a set of vertices such that the following conditions hold:

  1. For every edge , there is a tree node such that .

  2. For every vertex , the set of tree nodes with induces a non-empty subtree of .

The sets are called bags of the decomposition  and is the bag associated with the tree node . The width of a tree-decomposition is the size of a largest bag minus . The treewidth of a graph , denoted by , is the minimum width over all tree-decompositions of .

Relationships and Properties.

The following proposition summaries the known relationships between the parameters we consider.

[[59]] Let be a graph and let and be natural numbers. Then:

  • if has a -deletion set of size at most , then .

  • if has a -extended deletion set of size at most , then .

  • .

2.3 Locally Constrained Homomorphisms

We always allow self-loops for the host graph, but not for the guest graph (see also Section 1). Here we show some basic properties of locally constrained homomorphisms.

Let and be non-empty connected graphs and let be a locally surjective homomorphism from to . Then is surjective.

Proof.

Suppose not, and let be the set of vertices in . Note that (because otherwise is surjective) and (because is non-empty). Because is connected, there is an edge such that and . But then, the mapping is not surjective for any vertex . ∎

Let and be non-empty connected graphs with a homomorphism from to and let . Let and . If is a locally injective, surjective or bijective homomorphism, then is a locally injective, surjective or bijective homomorphism, respectively, from to .

Proof.

Clearly, is a homomorphism from to and since is a restriction of , it follows that if is locally injective, then so is . It remains to show that if is locally surjective, then so is . Suppose, for contradiction, that is locally surjective, but is not. Then there is a vertex such that . However, since does not map any vertex in to a vertex of , it follows that , so . Thus is not surjective, a contradiction. ∎

Let and be graphs, let , and let be a homomorphism from to . Then, for every component of such that , there is a component of such that . Moreover, if is locally injective/surjective/bijective, then is a homomorphism from to that is locally injective/surjective/bijective for every .

Proof.

Suppose for a contradiction that this is not the case. Then, there is a component of and an edge such that and are in different components of . Therefore, , contradicting our assumption that is a homomorphism.

Towards showing the second statement, first note that is a homomorphism from to . Moreover, for every vertex , so if is locally injective/surjective/bijective for a vertex , then so is . ∎

The following lemma is a basic but crucial observation showing that if and has a small -deletion set, then so does . Let and be non-empty connected graphs, let be a -deletion set for , and let be a locally surjective homomorphism from to . Then is a -deletion set for .

Proof.

Suppose not, then there is a component of such that . By Observation 2.3, it follows that is surjective and therefore is defined. Let . Then and therefore is in some component of . Observation 2.3 implies that is a homomorphism from to that is locally surjective for every .

Now , so there must be a vertex in . Because is connected, there is an edge such that and . But then, the mapping is not surjective for any vertex . ∎

2.4 Integer Linear Programming

Given a set of variables and a set of linear constraints (i.e. inequalities) over the variables in with integer coefficients, the task in the feasibility variant of integer linear programming (ILP) is to decide whether there is an assignment of the variables satisfying all constraints in . We will use the following well-known result by Lenstra [54].

[[27, 36, 45, 54]] ILP is fpt parameterized by the number of variables.

3 Our Algorithmic Framework

In this section we present our main algorithmic framework that will allow us to show that LSHom, LBHom and Role Assignment are fpt parameterized by , whenever the guest graph has -deletion set number at most . To illustrate the main ideas behind our framework, let us first explain these ideas for the examples of LSHom and LBHom. In this case we are given and and we know that has a -deletion set of size at most . Because of Lemma 2.3, it then follows that if is a yes-instance of LSHom or LBHom, then also has a -deletion set of size at most . Informally, our next step, which is given in Section 3.1, is to compute a small (i.e. with size bounded by a function of ) set of partial locally surjective homomorphisms such that (1) every locally surjective homomorphism from to augments some and (2) for every , the domain of is a -extended deletion set of and the co-domain of is a -deletion set of , where is bounded by a function of . Here and in what follows, we say that a function augments (or is an augmentation of) a partial function , where and if and . This allows us to reduce our problems to (boundedly many) subproblems of the following form: Given a -extended deletion set for , a -deletion set for , and a locally surjective (respectively bijective) homomorphism from to , find a locally surjective homomorphism from to that augments . In Section 3.2 we will then show how to formulate this subproblem as an integer linear program and in Section 3.3 we will show that we can efficiently construct and solve the ILP for this subproblem. Importantly, our ILP formulation will allow us to solve a much more general problem, where the host graph is not explicitly given, but defined in terms of a set of linear constraints. We will then exploit this in Section 4 to solve not only LSHom and LBHom, but also the Role Assignment problem.

3.1 Partial Homomorphisms for the Deletion Set

For a graph and we let . The aim of this subsection is to show that there is a small set of partial homomorphisms such that every locally surjective (respectively bijective) homomorphism from to augments some and, for every , the domain of is a -extended deletion set for  of size at most and its co-domain is a -deletion set of size at most for . The main idea behind finding this set is to consider the set of high degree vertices in and , i.e. the sets and . As it turns out (see Lemma 3.1), for every subset , is a -extended deletion set for of size at most and is a -deletion set for  of size at most , where . Moreover, as we will show in Lemma 3.1, every locally surjective (respectively bijective) homomorphism from to has to augment a locally surjective (respectively bijective) homomorphism from some induced subgraph of to . Intuitively, this holds because for every locally surjective homomorphism, only vertices of high degree in can be mapped to a vertex of high degree in and for every vertex in , there must be a vertex in  that is mapped to it. Let be a graph. If has a -deletion set of size at most , then the set is a -deletion set of size at most . Furthermore, every subset is a -extended deletion set of .

Proof.

Let be a -deletion set of of size at most . Then every vertex has degree at most , as each of its neighbours lies either in its own component of or in . Hence and therefore . Let be the components of that contain a vertex adjacent to a vertex in . Since and every vertex in has degree at most , we find that and . Since every component in is either contained in a component of or contained in , we find that is a -deletion set.

Let . We will show that is a -extended deletion set of . The components of that contain no vertices from are components of and thus have size at most . Consider a component of that contains at least one vertex from . Let . Every component of is a component of and thus has size at most . Moreover, has size at most . We conclude that every component of either has size at most  or has a -deletion set of size at most . Furthermore, since there are at most vertices in , and every component of that has size larger than  must contain a vertex of , it follows that there are at most components of that have size larger than . This completes the proof. ∎

Using the above lemma, we now get to the most important result of this subsection, which informally speaking shows that there are only boundedly many possible pre-images of the vertices in and, moreover, these pre-images are subsets of .

Let and be non-empty connected graphs such that has a -deletion set of size at most . If there is a locally surjective homomorphism from to , then there is a set and a locally surjective homomorphism from to such that augments . If is locally bijective, then and is a locally bijective homomorphism.

Proof.

By Lemma 3.1, is a -deletion set of size at most . Furthermore, observe that for a locally surjective homomorphism from to , the inequality holds for every ( holds in the locally bijective case). Since is surjective by Section 2.3, this implies that (and if is locally bijective, then ). By Section 2.3, is a -deletion set for . Let , so (note that if is locally bijective). Now is a surjective map from to . Furthermore, . Moreover, for every , , since . Furthermore, is a homomorphism from to because is a homomorphism. We argue that is locally surjective (bijective resp.) by contradiction. Suppose is not locally surjective. Then there is a vertex and a neighbour of such that . Since is locally surjective, there must be such that . This contradicts the fact that . Hence is a locally surjective homomorphism. In the bijective case we just need to additionally observe that restricted to the neighbourhood of any vertex must be injective. This completes the proof. ∎

Finally, we show that we can easily compute all possible pre-images of in any locally surjective (respectively bijective) homomorphism from to . Let and be non-empty connected graphs and let be non-negative integers. For any , we can compute the set of all locally surjective (respectively bijective) homomorphisms from to in time. Furthermore, .

Proof.

Let and suppose there is a surjective map . Then for every vertex , there must be a vertex such that . Therefore , so if this condition fails, then we can immediately return that .

Otherwise, for each vertex of , there are possible choices for where a map could map this vertex. We can list all of the at most resulting maps in time, and for each such map, we can check whether it is a locally surjective (respectively bijective) homomorphism in time. ∎

3.2 ILP Formulation

Figure 1: Top: A locally bijective homomorphism from a graph (left) to a graph (right), augmenting a partial homomorphism mapping the vertices of the vertex cover into A,B. The th vertex of mapped to some vertex X of is denoted x. Vertices in are grouped by type (e.g. and have type ), each is characterised by the neighbours of its vertices, recalled below each column. Vertices in all have the same type . Rows are extensions that can be minimally -B-mapped to (in particular, each a and b must have a neighbour in some type in , which can be used as a pre-image of any vertex in C,D,E,F. Using once (for colour C), twice (for colours D and E) and once (for colour F) yields the given locally bijective homomorphism, and it can be verified that each a and b indeed has all four colours in its neighbourhood.
Bottom: a locally surjective homomorphism from a graph (left) to a graph (right), where is a -deletion set. The extensions can be minimally -S-mapped to ; only can also be minimally -S-mapped to . Furthermore, and can each be weakly -S-mapped to some type in (respectively and ). Using pair and once is sufficient to ensure that the mapping is locally surjective for each a.

In this section, we will show how to formulate the subproblem obtained in the previous subsection in terms of an ILP instance. More specifically, we will show that the following problem can be formulated in terms of an ILP: given a partial locally surjective (respectively bijective) homomorphism from some induced subgraph of to some induced subgraph of , can this be augmented to a locally surjective (respectively bijective) homomorphism from to ? See the top of Figure 1 for an illustration of the subproblem for the simpler case when is a vertex cover of and we are looking for a locally bijective homomorphism. Moreover, we will actually show that for this to work, the host graph does not need to be given explicitly, but can instead be defined by a certain system of linear constraints.

The main ideas behind our translation to ILP are as follows. Suppose that there is a locally surjective (respectively bijective) homomorphism from to that augments . Because augments , Observation 2.3 implies that maps every component of entirely to some component of , moreover, is already locally surjective (respectively bijective) for every vertex . Our aim now is to describe in terms of its parts consisting of locally surjective (respectively bijective) homomorphisms from extensions of in , i.e. sets of components of plus , to simple extensions of in , i.e. single components of plus . Note that the main difficulty comes from the fact that we need to ensure that is locally surjective (respectively bijective) for every and not only for the vertices within the components of . This is why we need to describe the parts of using sets of components of and not just single components. However, as we will show, it will suffice to consider only minimal extensions of in , where an extension is minimal if no subset of it allows for a locally surjective (respectively bijective) homomorphism from it to some simple extension of in . The fact that we only need to consider minimal extensions is important for showing that we can compute the set of all possible parts of efficiently (see Section 3.3). Having shown this, we can create an ILP that has one variable for every minimal extension and every simple extension such that there is a locally surjective (respectively bijective) homomorphism from to that augments . The value of the variable now corresponds to the number of parts used by that map minimal extensions isomorphic to to simple extensions isomorphic to that augment . We can then use linear constraints on these variables to ensure that:

(SB2’)

contains exactly the right number of extensions isomorphic to required by the assignment for ,

(B1’)

contains exactly the right number of minimal extensions isomorphic to required by the assignment for (if is locally bijective),

(S1’)

contains at least the number of minimal extensions isomorphic to required by the assignment for (if is locally surjective),

(S3’)

for every simple extension of that is not yet used in any part of , there is a homomorphism from to some simple extension of in that augments and is locally surjective for every vertex in (if is locally surjective).

Together, these constraints ensure that there is a locally surjective (respectively bijective) homomorphism from to that augments . See also the bottom of Figure 1 for an illustration of the main ideas. We are now ready to formalise these ideas. To do so, we need the following additional notation.

Given a graph , an extension for is a graph containing as an induced subgraph. It is simple if is connected, and complex in general. Given two extensions of , we write if there is an isomorphism from to with for every . Then is an equivalence relation. Let the types of , denoted , be the set of equivalence classes of of simple extensions of . We write to denote the set of types of of size at most , so .

Given a complex extension of , let be a connected component of . Then has type if (depending on the context, we also say that the extension has type ). The type-count of is the function such that for is the number of connected components of with type (in particular if is simple, the type-count is for and for other types). Note that two extensions are equivalent if and only if they have the same type-counts; this then also implies that there is an isomorphism between the two extensions satisfying for every . We write if for all types . If is an extension of , we write for the set of types of and for the set of simple extensions of . Moreover, for , we write for the set of simple extensions in having type .

A target description is a tuple where is a graph, is an integer and CH is a set of linear constraints over variables , . Note that a type-count for is an integer assignment of the variables . A graph satisfies the target description if it is an extension of , for , and setting for all satisfies all constraints in CH.

In what follows, we assume that the following are given: the graphs , , an extension of , a target description , and a locally surjective (respectively bijective) homomorphism . Let be an extension of with and let ; note that we only consider , because we assume that is a type of a simple extension of a graph that satisfies the target description . We say can be weakly -S-mapped to a type if there exists an augmentation of such that is locally surjective for every . We say that can be -S-mapped (respectively -B-mapped) to a type if there exists an augmentation of such that is locally surjective (respectively locally bijective). Furthermore, can be minimally -S-mapped (respectively minimally -B-mapped) to if