ISSN 0032-9460, Problems of Information Transmission, 2017, Vol. 53, No. 1, pp. 55–72. c Pleiades Publishing, Inc., 2017. Original Russian Text c K.Yu. Gorbunov, V.A. Lyubetsky, 2017, published in Problemy Peredachi Informatsii, 2017, Vol. 53, No. 1, pp. 60–78. LARGE SYSTEMS Linear Algorithm for Minimal Rearrangement of Structures 1 K. Yu. Gorbunov ∗ and V. A. Lyubetsky ∗∗ Kharkevich Institute for Information Transmission Problems, Russian Academy of Sciences, Moscow, Russia e-mail : * gorbunov@iitp.ru, ** lyubetsk@iitp.ru Received December 29, 2014; in final form, April 25, 2016 Abstract—We propose a linear time and linear space algorithm which constructs a minimal sequence of operations rearranging one structure (directed graph of cycles and paths) into another. Structures in such a sequence may have a varying number of edges; a list of operations is fixed and includes deletion and insertion of a fragment of a structure. We give a complete proof that the algorithm is correct, i.e., finds the corresponding minimum. DOI: 10.1134/S0032946017010057 1. INTRODUCTION In Section 2 we present formulations and definitions related to the problem considered in the paper and problems close to it. There are many publications devoted to such problems, among which we note the fundamental work [1]. Below we only mention some papers most close to the present paper; see also [2]. These problems are evoked by biological and medical subjects, so terms from these areas are commonly used in their settings. However, we consider the mathematical component of these problems only; the obtained solutions can also be applied, for example, in engineering issues. In [3] there were proposed operations for rearranging chromosome structure (see Section 2); in what follows they are referred to as standard operations and are a part of our more general set of operations. In [3] there is also given an algorithm to compute the number of operations in the minimal (in the number of operations) sequence transforming one structure into another if the structures consist of paths (“linear chromosomes”) only; the algorithm is almost linear in time, and no estimate for the runtime is presented. These operations being applied to paths only correspond to reversals, translocations, fusions, and fissions previously considered in [4]. In the case where all intermediate structures also consist of linear chromosomes, an algorithm for computing the minimum number of operation is also given in [4]. The general case of genomes having equal gene content and equal cost of operations was solved in [5] using ideas from [3,4]. In the case of genomes with unequal gene content one needs additional operations: deletion and insertion of strings of unique genes, which were proposed in [6,7]. Papers [6–8] uses the notion of an adjacency graph: its vertices are adjacencies of extremities (heads and tails) of genes that belong to both structures and ends of the original paths. Two adjacencies from different structures are joined by an edge if they represent the head or tail of the same gene. Furthermore, an end of the original path is assumed to be adjacent to an “empty extremity” (telomere); between adjacent extremities of common genes of two structures there can 1 The research was carried out at the Institute for Information Transmission Problems of the Russian Academy of Sciences at the expense of the Russian Science Foundation, project no. 14-50-00150. 55