Examples of distance magic labelings of the 6-dimensional hypercube
aa r X i v : . [ m a t h . G M ] F e b Examples of distance magic labelings of the -dimensional hypercube Petr Savick´y ∗ A distance magic labeling of an n -dimensional hypercube is a labelingof its vertices by natural numbers from { , . . . , n − } , such that for allvertices v the sum of the labels of the neighbors of v is the same. Sucha labeling is called neighbor-balanced, if, moreover, for each vertex v andan index i = 0 , . . . , n −
1, exactly half of the neighbors of v have digit 1at i -th position of the binary representation of their label. We demonstrateexamples of non-neighbor-balanced distance magic labelings of 6-dimensionalhypercube obtained by a SAT solver. By the results of [2], a distance magic labeling (DML) of an n -dimensional hypercubeexists if and only if n ≡ n (2 n − n satisfying the condition above disproving aconjecture formulated in [1]. In this note, we present a non-neighbor-balanced distancemagic labeling of the 6-dimensional hypercube Q which solves Problem 3.7 formulatedin [2]. In order to encode the search for distance magic labelings of Q n into a SAT instance,we use n n variables to encode binary digits of the labels. In order to enforce therequired conditions on the labels we use the following simple approach with n = 6. Thecondition that two n -digit binary numbers are different is encoded using a formula with n auxiliary variables and 2 n +1 clauses. The condition that the labels are pairwise differentis expressed using (cid:0) n (cid:1) copies of this formula with disjoint sets of auxiliary variables.The condition that the sum of n binary n -digit numbers is n (2 n −
1) can be expressedin different ways. For n = 6, n (2 n −
1) = 189 and the formula was obtained usingPySAT [3] interface to PBLib [4]. A copy of this formula with new auxiliary variables is ∗ Institute of Computer Science of the Czech Academy of Sciences, Czech Republic, [email protected] Q . Additionally, theformula was extended with literals enforcing the label of the zero vertex and the labelsof its neighbors. The resulting formula consists of 26176 variables and 67146 clauses andcan be solved by CaDiCal SAT solver [5] in a few minutes. For 20 different seeds, therunning time on Intel Xeon processor (X5680, 3.33 GHz) was between 13 sec and 768sec with average 175 sec. For each of these seeds, the solver obtained a different solutionand the first 5 of them are presented below. Q The formula used to construct the labelings enforces that the zero vertex has label 0 andits neighbors have labels 4 , , , , ,
53. The binary expansions of these numbers are4 0 0 0 1 0 06 0 0 0 1 1 036 1 0 0 1 0 038 1 0 0 1 1 052 1 1 0 1 0 053 1 1 0 1 0 1so all the obtained labelings are non-neighbor-balanced. Verification of correctness ofeach of the labelings can be done by computing the 64 required sums and is left to thereader.Examples of the obtained labelings of Q are presented in Table 1 in the appendixas tables 8 × { , } = { , } × { , } where the rows of the tablescorrespond to all possible combinations of the first three components in the lexicographicorder and, similarly, the columns correspond to the combinations of the last three com-ponents. References [1] B. D. Acharya, S. B. Rao, T. Singh, and V. Parameswaran, Neighborhood magicgraphs, In National Conference on Graph Theory, Combinatorics and Algorithm,2004.[2] Petr Gregor, Petr Kov´aˇr, Distance magic labelings of hypercubes, Electronic Notesin Discrete Mathematics 40 (2013), 145–149.[3] PySAT: SAT technology in Python, https://pysathq.github.io/ [4] PBLib – A C++ Toolkit for Encoding Pseudo-Boolean Constraints into CNF, http://tools.computational-logic.org/content/pblib.php [5] CaDiCaL SAT solver, http://fmv.jku.at/cadical/ Q6