Avoiding and Extending Partial Edge Colorings of Hypercubes

We consider the problem of extending and avoiding partial edge colorings of hypercubes; that is, given a partial edge coloring φ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\varphi $$\end{document} of the d-dimensional hypercube Qd\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Q_d$$\end{document}, we are interested in whether there is a proper d-edge coloring of Qd\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Q_d$$\end{document} that agrees with the coloring φ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\varphi $$\end{document} on every edge that is colored under φ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\varphi $$\end{document}; or, similarly, if there is a proper d-edge coloring that disagrees with φ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\varphi $$\end{document} on every edge that is colored under φ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\varphi $$\end{document}. In particular, we prove that for any d≥1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$d\ge 1$$\end{document}, if φ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\varphi $$\end{document} is a partial d-edge coloring of Qd\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Q_d$$\end{document}, then φ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\varphi $$\end{document} is avoidable if every color appears on at most d/8 edges and the coloring satisfies a relatively mild structural condition, or φ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\varphi $$\end{document} is proper and every color appears on at most d-2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$d-2$$\end{document} edges. We also show that φ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\varphi $$\end{document} is avoidable if d is divisible by 3 and every color class of φ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\varphi $$\end{document} is an induced matching. Moreover, for all 1≤k≤d\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$1 \le k \le d$$\end{document}, we characterize for which configurations consisting of a partial coloring φ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\varphi $$\end{document} of d-k\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$d-k$$\end{document} edges and a partial coloring ψ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\psi $$\end{document} of k edges, there is an extension of φ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\varphi $$\end{document} that avoids ψ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\psi $$\end{document}.


Introduction
An edge precoloring (or partial edge coloring) of a graph G is a proper edge coloring of some subset E ′ ⊆ E(G); a t-edge precoloring is such a coloring with t colors.A t-edge precoloring ϕ is extendable if there is a proper t-edge coloring f such that f (e) = ϕ(e) for any edge e that is colored under ϕ; f is called an extension of ϕ.
Related to the notion of extending a precoloring is the idea of avoiding a precoloring: if ϕ is an edge precoloring of a graph G, then a proper edge coloring f of G avoids ϕ if f (e) = ϕ(e) for every e ∈ E(G).More generally, if L is a list assignment for the edges of a graph G, then a proper edge coloring ϕ of G avoids the list assignment L if ϕ(e) / ∈ L(e) for every edge e of G.
In general, the problem of extending a given edge precoloring is an N P-complete problem, already for 3-regular bipartite graphs [11,14].One of the earlier references explicitly discussing the problem of extending a partial edge coloring is [23]; there a necessary condition for the existence of an extension is given and the authors find a class of graphs where this condition is also sufficient.More recently, questions on extending and avoiding a precolored matching have been studied in [12,16].In particular, in [12] it is proved that if G is subcubic or bipartite and ϕ is an edge precoloring of a matching M in G using ∆(G) + 1 colors, then ϕ can be extended to a proper (∆(G) + 1)-edge coloring of G, where ∆(G) as usual denotes the maximum degree of G; a similar result on avoiding a precolored matching of a general graph is obtained as well.Moreover, in [16] it is proved that if ϕ is an (∆(G) + 1)-edge precoloring of a distance-9 matching in any graph G, then ϕ can be extended to a proper (∆(G)+1)-edge coloring of G; here, by a distance-9-matching we mean a matching M where the distance between any two edges in M is at least 9; the distance between two edges e and e ′ is the number of edges contained in a shortest path between an endpoint of e, and an endpoint of e ′ .A distance-2 matching is usually called an induced matching.
Questions on extending and avoiding partial edge colorings have specifically been studied to a large extent for balanced complete bipartite graphs, usually formulated in terms of completing partial Latin squares and avoiding arrays, respectively.In this form, the problem goes back to the famous Evans conjecture [13] which states that for every positive integer n, if n − 1 edges in the complete bipartite graph K n,n have been (properly) colored, then this partial coloring can be extended to a proper n-edge coloring of K n,n .This conjecture was solved for large n by Häggkvist [18] and later for all n by Smetaniuk [24], and independently by Andersen and Hilton [1].
The problem of avoiding partial edge colorings (and list assignments) of complete bipartite graphs was introduced by Häggkvist [17] and has been further studied in e.g [2,4,5].In particular, by results of [9,10,25], any partial proper n-edge coloring of K n,n is avoidable, given that n ≥ 4.Moreover, a conjecture first stated by Markström suggests that if ϕ is a partial n-edge coloring of K n,n , where any color appears on at most n − 2 edges, then ϕ is avoidable (see e.g.[5]).In [5], several partial results towards this conjecture are obtained; in particular, it is proved that the conjecture holds if each color appears on at most n/5 edges, or if the graph is colored by altogether at most n/2 colors.
Combining the notion of extending a precoloring and avoiding a list assignment, Andren et al. [3] proved that every "sparse" partial edge coloring of K n,n can be extended to a proper n-edge coloring avoiding a given list assignment L satisfying certain "sparsity" conditions, provided that no edge e is precolored by a color that appears in L(e); we refer to [3] for the exact definition of "sparse" in this context.An analogous result for complete graphs was recently obtained in [8].
The study of problems on extending and avoiding partial edge colorings of hypercubes was recently initiated in the papers [6,7].In [6] Casselgren et al obtained several analogues for hypercubes of classic results on completing partial Latin squares, such as the famous Evans conjecture.Moreover, questions on extending a "sparse" precoloring of a hypercube subject to the condition that the extension should avoid a given "sparse" list assignment were investigated in [7].
In this paper we continue the work on extending and avoiding partial edge colorings of hypercubes, with a particular focus on the latter variant.We obtain a number of results towards an analogue for hypercubes of Markström's aforementioned conjecture for complete bipartite graphs (see Conjecture 3.1), and also prove several related results; in particular, we prove the following.
• For any d ≥ 1, if ϕ is a partial d-edge coloring of Q d where every color appears on at most d/8 edges, and ϕ satisfies a structural condition (described in Theorem 3.6 below), then ϕ is avoidable; • for any d ≥ 1, if ϕ is a partial proper d-edge coloring of Q d where every color appears on at most d − 2 edges, then ϕ is avoidable; where k ≥ 1 is a positive integer, and every color class of the partial d-edge coloring ϕ of Q d is an induced matching, then ϕ is avoidable; we conjecture that this holds for any d ≥ 1; • for any d ≥ 1 and any 1 ≤ k ≤ d, we characterize for which configurations consisting of a partial coloring ϕ of d − k edges and a partial coloring ψ of k edges, there is an extension of ϕ that avoids ψ.

Preliminaries
In this paper, all (partial) d-edge colorings use colors 1, . . ., d unless otherwise stated.If ϕ is an edge precoloring of G, and an edge e is colored under ϕ, then we say that e is ϕ-colored.
If ϕ is a (partial) proper t-edge coloring of G and 1 ≤ a, b ≤ t, then a path or cycle in G is called (a, b)-colored under ϕ if its edges are colored by colors a and b alternately.We also say that such a path or cycle is bicolored under ϕ.By switching colors a and b on a maximal (a, b)-colored path or an (a, b)-colored cycle, we obtain another proper t-edge coloring of G; this operation is called an interchange.We denote by ϕ −1 (i) the set of edges colored i under ϕ.
In the above definitions, we often leave out the explicit reference to a coloring ϕ, if the coloring is clear from the context.
Havel and Moravek [20] (see also [19]) proved a criterion for a graph G to be a subgraph of a hypercube: Proposition 2.1.A graph G is a subgraph of Q d if and only if there is a proper d-edge coloring of G with integers {1, . . ., d} such that (i) in every path of G there is some color that appears an odd number of times; (ii) in every cycle of G no color appears an odd number of times.As pointed out in [6], the colors in the proper edge coloring in Proposition 2.1 correspond to dimensional matchings in Q d (see also [19]).In particular, Proposition 2.1 holds if we take the dimensional matchings as the colors.Furthermore we have the following.
Lemma 2.3.The subgraph induced by r dimensional matchings in Q d is isomorphic to a disjoint union of r-dimensional hypercubes.
This simple observation shall be used quite frequently below.In particular, for future reference, we state the following consequence of Lemma 2.3.We shall also need some standard definitions on list edge coloring.Given a graph G, assign to each edge e of G a set L(e) of colors.If all lists have equal size k, then L is called a k-list assignment.Usually, we seek a proper edge coloring ϕ of G, such that ϕ(e) ∈ L(e) for all e ∈ E(G).If such a coloring ϕ exists then G is L-colorable and ϕ is called an L-coloring.Denote by χ ′ L (G) the minimum integer t such that G is L-colorable whenever L is a t-list assignment.A fundamental result in list edge coloring theory is the following theorem by Galvin [15].As usual, χ ′ (G) denotes the chromatic index of a multigraph G.

Avoiding general partial edge colorings
Most of the results of this paper are partial results towards the following general conjecture for hypercubes.This is a variant of a conjecture for K n,n first suggested by Markström based on unavoidable n-edge colorings of K n,n (see e.g.[5,22]).Note further that such a statement as in Conjecture 3.1 does not hold for general d-regular (bipartite) graphs.Indeed, we have the following: This is a reformulation for general graphs of a theorem in [5] for complete bipartite graphs; the proof is identical to the argument given there; thus, we omit it.
Note further that Proposition 3.3 does not set any restrictions on where colors may appear, so several colors may be assigned to the same edge.Thus, it has a natural interpretation as a statement on list edge coloring.
By the example preceding Proposition 3.3, it is in general sharp; however, by requiring that the colored edges satisfy some structural condition, we can prove that other configurations are avoidable as well.
Proposition 3.4.Let G be a d-edge colorable graph.If ϕ is a partial d-edge coloring of G, and there is a set K of k vertices such that every precolored edge is incident to some vertex from K, and every color occurs on at most d − k edges, then ϕ is avoidable.
The proof of this proposition is similar to the proof of the previous one.The only essential difference is that instead of using the fact that the precoloring uses at most k colors, one employs the property that every matching in a decomposition obtained from a proper k-edge coloring of G contains edges with at most k distinct colors from ϕ; we omit the details.
Next, we prove the following weaker version of Conjecture 3.1.Following [7], we say that two edges in a hypercube are parallel if they are non-adjacent and contained in a common 4-cycle.
We shall use the following simple lemma.
, where every color appears on at most one edge, then ϕ is avoidable.
Proof.Let f be the proper d-edge coloring of Q d obtained by assigning color i to the ith dimensional Consider the bipartite graph B(f ), with vertices for the colors {1, . . ., d} and for the color classes f −1 (i) of f , and where there is an edge between f −1 (i) and j if there is no edge colored i under f that is colored j under ϕ.If there is no set violating Hall's condition for a matching in a bipartite graph, then B(f ) has a perfect matching, and by assigning colors to the color classes of f according to this perfect matching, we obtain a proper d-edge coloring of Q d that avoids ϕ.Now, if there is such a set violating Hall's condition, then one of the color classes of f contains all ϕ-colored edges.Without loss of generality, assume that M 1 is such a color class and consider the subgraph , where M 2 is another arbitrarily chosen color class of f .By Lemma 2.3, H consists of a collection of bicolored 4-cycles.By interchanging colors on such a bicolored cycle that contains at least one ϕ-colored edge, we obtain a proper edge coloring f ′ of Q d such that the bipartite graph B(f ′ ), defined as above, contains a perfect matching.Thus there is a proper d-edge coloring that avoids ϕ.Proof of Theorem 3.6.We first prove part (i) of the theorem.Let f be the standard edge coloring of Q d .As in the proof of the preceding lemma, our goal is to transform f into a coloring f ′ where every color class contains edges of at most 7  8 d distinct colors under ϕ, using interchanges on 2colored 4-cycles; this ensures that in the bipartite graph B, with vertices for the colors {1, . . ., d} and for the color classes f ′−1 (i) of f ′ , and where there is an edge between f ′−1 (i) and j if there is no edge colored i under f ′ that is colored j under ϕ, there is no set violating Hall's condition for a matching in a bipartite graph.Hence, B has a perfect matching, and by coloring the color classes of f ′ according to the perfect matching, we obtain a proper d-edge coloring of Q d that avoids ϕ.
We shall use the following method for obtaining such a proper coloring f ′ from f .Suppose that there is some color class of f that contains at least 7  8 d + 1 edges that are colored under ϕ; let M 1 = f −1 (1) be such a color class.We call such a color class heavy; a color class that contains at most 7  8 d − 2 edges that are colored under ϕ is called a light color class.Since there are at most 1  8 d 2 edges in Q d that are colored under ϕ, there must be some light color class of f ; without loss of generality assume that such that by interchanging colors on C we obtain a coloring f 1 where the color class f −1 1 (1) contains at least one less edge that is colored under ϕ and f −1 1 (2) contains at least one more edge that is colored under ϕ.We shall apply this procedure iteratively and repeatedly select previously unused edges of a light color class that are not colored under ϕ (where unused means that the edges have not been involved in any interchanges performed by the algorithm before), together with previously unused edges from a heavy color class, at least one of which is colored under ϕ, which together form a bicolored 4-cycle, and then interchange colors on this 4-cycle.Thus we shall construct a sequence of colorings f 1 , . . ., f q , where f i+1 is obtained from f i by interchanging colors on a bicolored 4-cycle, and f q is the required coloring f ′ where every color class contains at most 7d 8 ϕ-colored edges.Note that since Q d contains at most d 2 /8 ϕ-colored edges, q ≤ d 2 /8.
We now give a brief counting argument for showing that as long as there is a heavy color class, there is a 4-cycle in the current coloring f i so that after interchanging colors on this 4-cycle, the obtained coloring f i+1 contains fewer or equally many heavy color classes, but in the latter case one heavy color class contains fewer ϕ-colored edges. Suppose then we can perform all the necessary steps in the algorithm and thus the required coloring f ′ exists.Let us now prove part (ii).The proof of this part is similar to the proof of part (i).We shall prove that we can perform all the necessary steps in the algorithm described above, and choose each 4-cycle C that is used by the algorithm in such a way that for each of the edges of C that belongs to a heavy color class, there are at most d Our task is thus to prove that in each step of the algorithm, we can select a 4-cycle so that each of the edges from the heavy color class are parallel with at most d 34C 1 unused ϕ-colored edges.So suppose that some steps of the algorithm have been performed and we have selected some 4-cycles satisfying this condition.Then, since (1) holds, there is some 4-cycle C = uvxyu that is edge-disjoint from all previously considered 4-cycles and such that uv and xy are edges from some heavy color class, at least one of which is ϕ-colored, and the edges vx and yu are not ϕ-colored and lie in a color class that is light under the current coloring f i .Suppose that one of the edges uv and xy, uv say, are parallel with at least d 34C 1 unused ϕ-colored edges.Denote by M 1 the dimensional matching containing uv and consider the set E ′ ⊆ M 1 of all these ϕ-colored edges that are parallel to uv.At most d 34(C 1 +2) of the edges in E ′ are parallel with at least d 34C 1 ϕ-colored edges edges, because any edge (except uv) that is parallel with an edge from E ′ is parallel with at most one other edge from E ′ and d C 2 , and Q d contains altogether at most d 2 C 2 ϕ-colored edges.Let E ′′ ⊆ E ′ be the set of edges that are parallel with uv and which are parallel with at most Next, we shall estimate the number of 4-cycles with unused edges, that contains exactly one edge from E ′′ , and two edges from a light color class, and satisfying that two cycles containing different edges from E ′′ are disjoint.Now, since |E ′′ | ≥ 4d C 2 and any edge that is parallel with an edge from E ′ are contained in at most 2 such 4-cycles, arguing as above, we deduce that there are at least such unused cycles.Denote the set of all such cycles by C.
By construction, all the edges of E ′′ that are in cycles in C are parallel with at most d 34C 1 unused ϕ-colored edges.We shall prove that this holds for both edges of M 1 in at least one of the cycles of C.
Consider a cycle C = abcda ∈ C, where ab ∈ E ′′ , cd ∈ M 1 \E ′′ , the edges ua and bv are contained in the dimensional matching M i , and the edges bc and ad are contained in the dimensional matching M j .Now, if cd is parallel with at least d 34C 1 unused ϕ-precolored edges, then there are at least d where k = i.Then, since i = k, and there are six permutations of the matchings M i , M j , M k , it follows from Proposition 2.1, that there are at most 5 other cycles from C that contain an edge which is parallell with c ′ d ′ .Summing up, we conclude that if all cycles in C contains an edge from M 1 that is parallel with at least d 34C 1 unused ϕ-colored edges, then ϕ-colored edges.However, by Lemma 3.5, we may assume that d ≥ 2C 2 , so this is not possible since Q d contains at most d 2 C 2 precolored edges.We conclude that at least one cycle in C satisfies that every edge from M 1 is parallel with at most d 34C 1 other ϕ-precolored edges.Consequently, we can perform all the necessary steps in the algorithm to obtain the required coloring f ′ .
It is trivial that Conjecture 3.1 is true in the case when only one color appears in the coloring that is to be avoided; the case of two involved colors is also straightforward.We give a short argument showing that Conjecture 3.1 holds in the case when the partial coloring uses at most three colors.Proposition 3.7.If ϕ is a partial edge coloring of Q d with at most three colors and every color appears on at most d − 2 edges, then ϕ is avoidable.
Proof.It is a simple exercise to show that the result holds in the case when d = 3.Thus, we may assume that d ≥ 4 and that exactly three colors appear in the partial coloring ϕ.
Let f be standard edge coloring of Q d , and consider the bipartite graph B(f ) with parts consisting of the color classes C(f ) of f and the colors {1, . . ., n} used in ϕ, and where an edge appears between a color i of ϕ and a color class M j of f if and only if no edge of M j is colored i under ϕ.
As in the proof of the preceding theorem, if there is a perfect matching in B(f ), then the coloring ϕ is avoidable, so suppose that this is not the case.Then there is an anti-Hall set S ⊆ C(f ), that is, a set S ⊆ C(f ), such that |N (S)| < |S|.Our goal is to prove that there is a coloring f ′ that can be obtained from f by interchanging colors on some 4-cycles, so that in the bipartite graph B(f ′ ), defined as above, there is a perfect matching.Now, if S is a anti-Hall set, then since every color in ϕ appears at most d − 2 times, |S| ≤ d − 2. On the other hand, since at most 3 colors appear in the coloring ϕ, |N (S)| ≥ d − 3, so |S| ≥ d − 2; consequently, |S| = d − 2, that is, every dimensional matching in S contains edges of all three colors under ϕ, and thus there are two dimensional matchings in Q d where no edges are colored under ϕ.Without loss of generality, we assume that M 1 is a dimensional matching with color 1 under f that is in S. If d ≥ 5, then we pick a dimensional matching, M d , with color d under f , say, not contained in the set S. Now, since M d contains no ϕ-colored edges and M 1 contains d − 2 such edges, there is a 4-cycle in the edge-induced subgraph Q d [M 1 ∪ M d ] containing at least one ϕ-colored edge.Since d ≥ 5, by interchanging colors on this 4-cycle, we obtain the required coloring f ′ .
It remains to consider the case when d = 4. Let M 1 be a dimensional matching in S; then M 1 contains exactly one edge ϕ-colored i, for i = 1, 2, 3.The graph Q d − M 1 , consisting of two copies of the graph Q 3 , thus contains exactly one edge colored i, i = 1, 2, 3; so by our initial observation, there is a proper 3-edge coloring of Q d − M 1 that avoids the restriction of ϕ to Q d − M 1 .Now, by assigning color 4 to M 1 , we obtain a proper d-edge coloring of Q d that avoids ϕ.Remark 3.8.We remark that by using the same strategy it is straightforward to prove a version of the preceding result with four instead of three colors, provided that d ≥ 5; indeed, the only essential difference is that one has to consider two different cases on the size of the anti-Hall set, namely, when it has size d − 2 and d − 3, respectively.However, for the case when d = 4, the only proof we have proceeds by long and detailed case analysis, so we abstain from giving the details in the case when the coloring to be avoided contains four different colors.
As a final observation of this section, let us consider the case when all precolored edges lie in a hypercube of dimension d − 1 contained in a d-dimensional hypercube.
The following was first conjectured in [21].
, where all colored edges lie in a subgraph that is isomorphic to and contains all precolored edges.Then Q d consists of the two copies H 1 and H 2 of Q d−1 and a dimensional matching M joining vertices of H 1 and H 2 .We define a list assignment L for H 1 by setting L(e) = {1, . . ., d} \ {ϕ(e)}, for every edge e ∈ E(H 1 ), where we assume that ϕ(e) = ∅ if e is not colored under ϕ.By Galvin's Theorem 2.5, there is a proper d-edge coloring of H 1 with colors from the lists.Since H 1 and H 2 are isomorphic, this also yields a corresponding d-edge coloring of H 2 .By coloring all edges of M by the unique color in {1, . . ., d} missing at its endpoints, we obtain a proper d-edge coloring of Q d which avoids ϕ.

Avoiding partial proper edge colorings
In [21], Johansson presented a complete list of minimal unavoidable partial 3-edge colorings of Q 3 , where minimal means that removing a color from any colored edge yields an avoidable edge coloring; the list is complete in the sense that it contains all such colorings up to permuting colors and/or applying graph automorphisms.There are 29 such configurations, and we refer to [21] for a comprehensive list of all such colorings.Let us here just remark that, based on this list of minimal unavoidable partial edge colorings, it seems to be a difficult task to characterize the family of unavoidable partial edge colorings of Q d for general d.Note further that a similar investigation for complete bipartite graphs was pursued in [22].
Here, we shall focus on the unavoidable partial proper 3-edge colorings of Q 3 .As explained in [21], there are six such minimal configurations.The proof of this proposition is by an exhaustive computer search; we refer to [21] for details.As in the non-proper case, based on this list of minimal unavoidable partial proper 3-edge colorings of Q 3 , it seems difficult to make any specific conjecture as to whether it is possible to characterize the minimal unavoidable partial proper d-edge colorings of Q d for general d.It is, however, easy to construct infinite families of minimal unavoidable partial (non-proper) 3-edge colorings of hypercubes; for the case when the coloring is required to be proper, this problem appears to be more difficult; in fact, we are interested in whether the following might be true: As mentioned in the introduction above, for the balanced complete bipartite graphs the answer to the corresponding question is positive and it suffices to require that the graph has at least 8 vertices [9,10,25].
Next, we shall deduce some general consequences of Proposition 4.1.We begin by considering the special case of Problem 4.2 when all colored edges are contained in a matching.We shall need the following lemmas, which are immediate from Proposition 4.1.
Lemma 4.3.If ϕ is a partial 3-edge coloring Q 3 where all colored edges are contained in a matching, then ϕ is avoidable.
We note that an analogous statement does not hold for Q 2 , since the partial coloring where two non-adjacent edges of Q 2 are colored by 1 and 2, respectively, is unavoidable.
Now, by Lemma 4.3, there is a proper edge coloring of H i using colors 3i − 2, 3i − 1, 3i that avoids the restriction of ϕ to H i , for i = 1, . . ., k. Combining such colorings yields a proper d-edge coloring of Q d that avoids ϕ.
If we insist that all precolored edges are contained in a bounded number of dimensional matchings, then we obtain another family of avoidable partial (not necessarily proper) d-edge colorings of Q d .Corollary 4.6.If ϕ is a partial d-edge coloring of Q d where all colored edges are contained in ⌊d/3⌋ dimensional matchings, then ϕ is avoidable.
Proof.Suppose that M 1 , . . ., M a are the dimensional matchings that contain edges that are colored under ϕ, where a = ⌊d/3⌋.As in the proof of the preceding corollary, we decompose Q d into a = ⌊d/3⌋ subgraphs H 1 , . . ., H a consisting of 3-dimensional hypercubes, and possibly one subgraph H a+1 that consists of disjoint copies of 1-or 2-dimensional hypercubes.Moreover, without loss of generality we assume that M i is contained in H i , i = 1, . . ., d.The result now follows from Lemma 4.3 as in the proof of Corollary 4.5.
If we require that the partial coloring is proper, then we can allow up to 2⌊d/3⌋ dimensional matchings in Q d containing colored edges, while still being able to avoid the partial coloring.A weaker and perhaps more tractable version of Problem 4.2 is obtained by requiring that every color class in the partial edge coloring to be avoided is an induced matching.(C2) there is a vertex u and a color c such that u is incident with at least one colored edge, u is not incident with any edge of color c, and every uncolored edge incident with u is adjacent to another edge colored c; (C3) there is a vertex u and a color c such that every edge incident with u is uncolored and every edge incident with u is adjacent to another edge colored c; Proof.If Q d contains altogether d − 1 edges that are colored under ϕ and ψ (i.e.some edge is colored under both ϕ and ψ), then since at most d − 1 edges are colored, we can form a new partial proper edge coloring from ϕ by greedily assigning some color from {1, . . ., d} \ ψ(e) to any edge e that is colored under ψ, but not colored under ϕ, so that the resulting coloring ϕ ′ is proper.By Theorem 5.1, ϕ ′ is extendable, so there is an extension of ϕ that avoids ψ.Now assume that altogether exactly d edges are colored under ϕ and ψ, so no edge is colored under both ϕ and ψ.Let E ϕ,ψ be the set of edges in E(Q d ) that are colored under ϕ or ψ.The case when d ≤ 2 is trivial, so assume that d ≥ 3. We shall consider some different cases.
Suppose first that there are two non-adjacent edges e 1 and e 2 that are colored under ψ.Then we consider the coloring ϕ ′ obtained from ϕ by in addition coloring every ψ-colored edge in such a way that the resulting precoloring is proper and avoids ψ; note that since e 1 and e 2 are non-adjacent, this is possible.At most d edges are colored under the resulting coloring ϕ ′ , so if it is not extendable, then ϕ ′ ∈ C.
If ϕ ′ ∈ C 1 , then there is an uncolored edge uv in Q d such that u is incident with edges of r ≤ d distinct colors under ϕ ′ and v is incident to d − r edges ϕ ′ -colored with d − r other distinct colors.Suppose without loss of generality that e 1 is incident with u, e 2 is incident with v and that at least

Lemma 2 . 4 .
In the standard d-edge coloring, every edge of Q d is in exactly d− 1 2-colored 4-cycles.

Proposition 3 . 2 .Proposition 3 . 3 .
For any d ≥ 1, there is a d-regular bipartite graph G and a partial proper d-edge coloring with exactly d colored edges that is not avoidable.Proof.The case when d = 1 is trivial, so assume that d ≥ 2. Let G 1 , . . ., G d be d copies of the graph K d,d − e, that is, the complete bipartite graph K d,d with an arbitrary edge e removed.Denote by a i b i the edge that was removed from K d,d to form the graph G i .From G 1 , . . ., G d , we construct the d-regular bipartite graph G by adding the edges a 1 b 2 , a 2 b 3 , . . ., a d−1 b d , a d b 1 .We define a partial d-edge coloring ϕ of G by coloring a i b i+1 by the color i, i = 1, . . ., d (where indices are taken modulo d).Now, it is straightforward that any proper d-edge coloring of G uses the same color on all the edges in the set {a 1 b 2 , a 2 b 3 , . . ., a d−1 b d , a d b 1 }; therefore, ϕ is not avoidable.On the other hand, a partial coloring of at most d − 1 edges of a d-edge-colorable graph is always avoidable: Let k ∈ {1, . . ., d} and let G be a d-edge-colorable graph.If G is colored with at most k colors, and every color appears on at most d − k edges, then there is a proper d-edge coloring of G that avoids the preassigned colors.

Theorem 3 . 6 .
Let d ≥ 1, and let ϕ be a partial d-edge coloring of Q d .Assume a(d) and b(d) are functions satisfying that 109 1776 d 2 − 2b(d) a(d) − 7d 8 ≥ 0 and a(d) ≥ b(d).(i) If every color appears on at most d/8 edges, for every edge in Q d there is at most b(d) other parallel ϕ-colored edges, and every dimensional matching in Q d contains at most a(d) ϕ-precolored edges, then ϕ is avoidable.(ii) For every constant C 1 ≥ 1, there is a positive constant C 2 = 2C 1 (C 1 + 2)34 2 , such that if every dimensional matching contains at most C 1 d ϕ-colored edges and every color appears on at most d C 2 edges under ϕ, then ϕ is avoidable.Before proving Theorem 3.6, allow us to comment on the possible values of a(b) and b(d) for which the inequality in the theorem holds.If we choose b(d) to be as large as possible, that is, a(d) = b(d), then it suffices to require that a(d) = b(d) ≤ 109 3552 + 49 96 1/2 + 7 16 d ≈ 1.17d for part (i) of the theorem to hold.On the other hand, if b(d) is a "sufficiently small" linear function of d, then we can pick a(d) to be an arbitrarily large linear function of d.

4 -
that Q d initially contains k heavy color classes under the coloring f , where k ≤ d, and that exactly α(d) ϕ-colored edges are not contained in the heavy k color classes in Q d , where α(d) ≤ d 2 /8 is some function of d.Consider a color class M that is heavy under f i .Suppose that M (initially) contains β(d) ϕ-colored edges, where β(d) ≤ d 2 /8 is some function of d.By Lemma 2.4, every edge in Q d is contained in d − 1 2-colored 4-cycles under f , so initially there are at least (d − k) 2 β(d) − α(d) 4-cycles containing edges from M that may be used by the algorithm, because every ϕ-colored edge of a heavy color class is contained in (d − k) 4-cycles, where two edges are in a light color class, and up to α(d) such cycles are unavailable since they contain a ϕ-colored edge of a light color class.Now, after performing some steps of this algorithm we might have used edges from some of these cycles in some steps of the algorithm.Suppose that the algorithm have used • s 4-cycles C with two edges from M , such that both edges from M in C are ϕ-colored, and • r 4-cycles C with two edges from M , such that one edge from M in C is ϕ-colored.Moreover, since Q d contains at most d 2 /8 ϕ-precolored edges and a light color class contains at most 7d 8 − 2 ϕ-precolored edges, we might be unable to use 4-cycles with edges from at most 2 d 2 8 − α(d) + α(d) the d − k initially light color classes, because such a color class contains at least 7d 8 − 1 ϕ-colored edges after performing some steps of the algorithm, and, in light of Lemma 3.5, we may assume that d ≥ 16.Furthermore, since every 4-cycle that has been used by the algorithm contains two edges from a light color class, cycles C are unavailable because C contains an edge from a light color class that was used previously in another 4-cycle.Similarly, for every edge from M , there are at most b(d) parallel edges that are ϕ-colored, so at most 2b(d)(s + r)4-cycles C are unavailable because it contains an edge from M that was used previously in another 4-cycle by the algorithm.Consequently, if

34C 1
parallel unused edges that are ϕ-colored.Part (ii) of the theorem then holds if (1) is valid under the assumptions that a(d) = C 1 d and b(d) = d 34C 1 .Since 109 1776 > 1 17 , this, in turn, follows from the fact that (2) holds, given that a(d) = C 1 d and b

Problem 4 . 2 .
Is there an integer d 0 ≥ 0 such that every partial proper d-edge coloring of Q d is avoidable if d ≥ d 0 ?

Lemma 4 . 4 .Corollary 4 . 5 .
If ϕ is a partial proper 3-edge coloring of Q 3 where all colored edges are contained in two dimensional matchings, then ϕ is avoidable.If d = 3k and ϕ is a partial d-edge coloring of Q d where all colored edges are contained in a matching, then ϕ is avoidable.Proof.Let M 1 , . . ., M d be the dimensional matchings in Q d

Corollary 4 . 7 .
If ϕ is a partial proper d-edge coloring of Q d where all colored edges are contained in 2⌊d/3⌋ dimensional matchings, then ϕ is avoidable.The only difference in the proof of Corollary 4.7 compared to the proof of Corollary 4.6 is that we use Lemma 4.4 in place of Lemma 4.3; we omit the details.

Conjecture 4 . 8 .
If d ≥ 3 and ϕ is a partial d-edge coloring of Q d where every color class is an induced matching, then ϕ is avoidable.Using Proposition 4.1 and proceeding as in the proofs of the preceding Corollaries, we can prove the following stronger version of Conjecture 4.8 in the case when d is divisible by 3.

(Theorem 5 . 2 .
C4) d = 3 and the three precolored edges use three different colors and form a subset of a dimensional matching.For i = 1, 2, 3, 4, we denote by C i the set of all colorings of Q d , d ≥ 1, satisfying the corresponding condition above, and we set C = ∪C i .Theorem 5.1.[6] If ϕ is a partial proper d-edge coloring of at most d edges in Q d , then ϕ is extendable to a proper d-edge coloring of Q d unless ϕ ∈ C. For 1 ≤ k ≤ d, let ϕ be a proper precoloring of d − k edges of Q d and ψ be a partial coloring of k edges in Q d .Using the preceding theorem, we shall prove that there is a proper d-edge coloring of Q d that agrees with ϕ and which avoids ψ unless one of the following conditions are satisfied: (D1) there is a vertex v such that every edge incident with v is either ψ-colored c, ϕ-colored by a color distinct from c, or not colored under ϕ or ψ, but adjacent to an edge with color c under ϕ; or (D2) exactly one edge uv is colored under ψ and for every i ∈ {1, . . ., d} \ {ψ(uv)} there is an edge incident with u or v that is colored i under ϕ; or (D3) d = 2 and two non-adjacent edges are colored by different colors under ψ, or there is one edge e colored under ϕ and another edge e ′ colored under ψ, such that e and e ′ have different colors if they are adjacent, and the same color if they are non-adjacent.Let ϕ be a proper d-edge precoloring of d − k edges of Q d and ψ be a partial coloring of k edges in Q d , where 1 ≤ k ≤ d.There is an extension of ϕ that avoids ψ unless some edge of Q d has the same color under ϕ or ψ, or the colorings satisfy one of the conditions (D1)-(D3).

evidently there are precisely d dimensional matchings in Q d . We state this as a lemma.
Lemma 2.2.Let d ≥ 2 be an integer.Then there are d different dimensional matchings in Q d ; indeed Q d decomposes into d such perfect matchings.The proper d-edge coloring of Q d obtained by coloring the ith dimensional matching of Q d by color i, i = 1, . . ., d, we shall refer to as the standard edge coloring of Q d .
Conjecture 3.1.For any d ≥ 1, if ϕ is a partial d-edge coloring of Q d where every color appears on at most d − 2 edges, then ϕ is avoidable.Conjecture 3.1 is best possible: consider the partial coloring of Q d obtained by coloring d − 1 edges incident with a vertex u by the color 1, and coloring d − 1 edges incident with another vertex v by the color 2. This partial coloring is unavoidable if uv ∈ E(Q d ) and it is uncolored.