Background {#Sec1}
==========

The physical mapping of DNA is a key problem in computational biology \[[@CR5]\]. A large DNA molecule is a long string composed of four nucleotides, A, C, G and T. To understand the structure of DNA molecules, it is of interest to determine the occurrences of short substrings, such as GAATTC, on the DNA. Double digest experiments (DDE for short) are a standard approach for constructing physical DNA maps \[[@CR2]\]. Given two restriction enzymes, denoted by $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \mathfrak{A} $$\end{document}$ and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \mathfrak{B} $$\end{document}$, this approach cuts a target DNA sequence by using only enzyme $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \mathfrak{A} $$\end{document}$, only enzyme $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \mathfrak{B} $$\end{document}$, and both enzymes simultaneously, in three separate and parallel experiments \[[@CR5]\]. As a result, we obtain three multisets of short DNA fragments. However, due to certain experimental limitations, only the length information (i.e., The number of nucleotides) of these short fragments can be measured with certain accuracy using certain mature biological techniques, such as gel electrophoresis. The objective of the double digest problem (DDP) is to reconstruct the original ordering of the fragments in the target DNA molecule.

Since the first successful reconstruction of restriction site mapping in the earlier 1970s \[[@CR7], [@CR11]\], the DDP problem has become an intensively studied issue that covers a variety of disciplines \[[@CR6], [@CR9]\]. Although the major concerns come from the community of bioinformation, the challenges related to this problem have also attracted attention from the artificial intelligence, algorithmic complexity, and optimization communities. We now know that DDP is strongly NP-complete \[[@CR1], [@CR2]\], and many algorithms have been proposed for solving the DDP problem \[[@CR3]--[@CR6], [@CR8]--[@CR10], [@CR12]--[@CR15]\]. However, the DDP problem is still far from being resolved. All of the algorithms developed to address this problem have encountered significant difficulties as the number of restriction sites increases. Moreover, even for different DDP instances with the same size, the hardness for finding an exact solution might vary remarkably.

The main motivation of this work comes from three considerations: First, almost all existing formulations of the DDP problem use multiset as the basic data structure, while we find that it is even easier to model the DDP problem by using vectors. Second, some recently proposed genetic algorithms \[[@CR3], [@CR13]\] for addressing the DDP problem should be improved. Third, it is of interest to develop an open-source package for studying the DDP problem by using easily accessible engineering computation platforms, such as MATLAB.

Our main contributions are summarized as follows:A vector-based formulation of the DDP problem is presented and illustrated step-by-step.A novel genetic algorithm for solving the DDP problem is proposed by combining six genetic operators, and a MATLAB package, DDmap, is implemented by integrating the proposed genetic algorithm and other necessary supporting and testing widgets. Then, by using DDmap, exact solutions for typical DDP test instances \[[@CR13]\] are explicitly derived and depicted. (See the right column of Table [1](#Tab1){ref-type="table"}.)A relation between the hardness of certain DDP instances and the maximum length of double digest sequences is revealed based on our simulations of 1000 random DDP instances. Meanwhile, an approximate approach for typical hard DDP instances is conceived based on this relation.Table 1Main results: separated and integrated effects of all six genetic operators. Instance 1,3,4,5,7,8 come from \[[@CR13]\], instance 2\' is derived by using a scaling-rounding-adjusting process towards instance 2, *m*, *n*, *k* are the lengths of the input fragments A, B and C, respectively. There are six genetic operators, RWS is selection operator defined as the well-known roulette wheel algorithm. PCC and RSC are crossing operators, PCC is the combination of two permutations, RSC is Referencing Sorting Crossing, P4X, FLP, CSH are mutation operators, P4X is a four-point mutating, FLP defined as the flipping of the given fragment. CSH defined as the cyclic shifting of the given fragment. The average running time, average evolution generations and success rate are listed in the table. At the right of the table, we draw pie charts of DDmap's two solutions.

Results {#Sec2}
=======

To test the utility of DDmap, eight DDP instances, referred to as INS~*j*~(*j* = 1⋯8), are taken from \[[@CR13]\]. They are shown in the following Table [2](#Tab2){ref-type="table"}:Table 2Test instances from \[[@CR13]\]. Suppose giving two restriction enzymes, denoted by $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \mathfrak{A} $$\end{document}$ and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \mathfrak{B} $$\end{document}$, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{a},\overrightarrow{b},\overrightarrow{c} $$\end{document}$ are the multisets of short DNA fragments by cuts a target DNA sequence by using enzyme $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \mathfrak{A} $$\end{document}$ only, enzyme $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \mathfrak{B} $$\end{document}$ only, and both enzymes simultaneously.

First, the integrated effects of the six aforementioned genetic operators of DDmap are verified. For the instances INS~1,\ 3,\ 4,\ 5,\ 7,\ 8~, DDmap performs considerably well, and the related results are collected in Table [1](#Tab1){ref-type="table"}. For *each* instance, 100 trails were run using DDmap with respect to *each* combination of six genetic operators. Then, the average running time, the average evolution generation and the success rate of finding exact DDP solutions are counted. Two different exact solutions for the instances *INS*~1,\ 3,\ 4,\ 5,\ 7,\ 8~ are also depicted in the right column of Table [1](#Tab1){ref-type="table"}. In addition, the average running time and the average evolution generations of finding exact DDP solutions are depicted in Fig. [1](#Fig1){ref-type="fig"}. From Table [1](#Tab1){ref-type="table"} and Fig. [1](#Fig1){ref-type="fig"}. We can see that the genetic operators combination of RWS + PCC performs best in running time, RWS + ALL performs best in evolving generation, while other combinations of different genetic operators perform similarly and equally effective. Moreover, the tendency of running time curve and evolving generation curve are very similar.Fig. 1Main results: separated and integrated effects of all six genetic operators. **a** is the average running time. **b** is the average evolution generations. DDmap has six genetic operators, for each instance, 100 trails were run by using DDmap with respect to each combination of six genetic operators. Then draw bar charts of the average running time. INS~6~ doesn't have data because it is invalid

However, we find that DDmap performs very poorly for INS~2~ and INS~6~. Upon further examination, we find that INS~6~, is *invalid*, Simple calculation shows that as for INS~6~, we have$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ 45=\sum \left(\overrightarrow{a}\right)=\sum \left(\overrightarrow{b}\right)\ne \sum \left(\overrightarrow{c}\right)=19 $$\end{document}$$

because it violates the restriction condition of (5) (See Definition 1).

For INS~2~, we run DDmap 100 trails and successfully obtain exact solutions of INS~2~ in 67 trails. But the average running time and evolution generations for reaching the exact solution of INS~2~ are 122 s and 3828, respectively, i.e., approximately 1000 times slower than the results of other test instances (see Table [1](#Tab1){ref-type="table"}). Furthermore, we find that these 67 solutions are essentially the same: One solution is depicted in Fig. [2](#Fig2){ref-type="fig"}(a), and another solution is just to read out the sequences A, B and C of Fig. [2](#Fig2){ref-type="fig"}(a) in an reverse order. It seems that the solution to INS~2~ 's solutions are very sparse, and thus, DDmap faces the difficulty of escaping from so many local optima.Fig. 2Effects of scaling-rounding-adjusting method. **a** is an exact solution of INS~2~. **b** is an approximate solution of INS~2~, derived by using the scaling-rounding-adjusting process towards INS~2~

We deal with the INS~2~ by using the scaling-rounding-adjusting approach. As expected, DDmap can find solutions towards INS~2′~ very efficiently. For each combination of six genetic operators, we run DDmap towards INS~2′~ 100 trials. The average running time is no more than 2 s, the evolution generation is no more than 80, and the success rate for finding exact DDP solutions is always 100%. The results are already contained in Table [1](#Tab1){ref-type="table"} and Fig. [1](#Fig1){ref-type="fig"}. Now, we directly take some INS~2~, 's solution, (*μ*, *ν*) ∈ *S*~*m*~ × *S*~*n*~, as an approximate solution of INS~2~. The resulted double digest pie charts are depicted in Fig. [2](#Fig2){ref-type="fig"}(b). Compared to the exact solution given in Fig. [2](#Fig2){ref-type="fig"}(a), we think this kind of approximation is an interesting result in the sense that the relative error, defined as the proportion of total length of gaps between two miss-aligned fragments, is merely 4.8%, calculated by$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \frac{115+17+256+171+117+188+280+1120}{48502}=0.0487. $$\end{document}$$

Next, via a number of simulations, we find that DDmap's performance is tightly related to the maximum length of a piece in the sequence of C, denoted by *ρ*~*C*~ = max *c*~*i*~. This is reasonable considering that for a fixed length of sequence C, denoted by *L*~*C*~ = \|*C*\|, the smaller *ρ*~*C*~ is, the denser the solutions, and thus, the easier for genetic algorithms, such as DDmap, to meet an exact solution during the evolution process. Based on our simulations towards 1000 random DDP instances with different *ρ*~*C*~, the relationship between the success rate of finding exact DDP solutions with respect to *ρ*~*C*~ is depicted in Fig. [3](#Fig3){ref-type="fig"}.Fig. 3Success Rate vs. Maximum Length of Piece in C. DDmap's performance is tightly related to the maximum length of piece in C, we generated a series of random double digest instances with the maximum length of C ranging from 10 to 100, then test the DDmap's success rate, the line of success rate changing with the maximum length of C is shown in Fig. 3

Discussion {#Sec3}
==========

♦ Cases of k ≠ m + n − 1

Note that in both INS~4~ and INS~5~, the given two enzymes cut the target DNA molecule at some of the same sites and lead to the case where k ≠ m + n − 1. At the beginning, DDmap performs very poorly on INS~4~ and INS~5~. The performance of DDmap on INS~4~ and INS~5~ improves remarkably after we adopt the following simple preprocessing strategy:

• If k \< m + n − 1, then introduce δ = (m + n − 1) − k fragments with length 0 into.

the sequence $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{c} $$\end{document}$;

• Otherwise, if k \> m + n − 1, then introduce δ = k − (m + n − 1) fragments with length 0.

into the shorter sequence among $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{a} $$\end{document}$ and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{b} $$\end{document}$;

• Otherwise, do nothing.

An interesting observation is that the newly introduced 0-length fragments will explicitly appear in the pie charts of exact DDP solutions. For instance, Fig. [4](#Fig4){ref-type="fig"}(a) shows that a 0-length fragment in sequence $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{c} $$\end{document}$ of INS~4~ appears at the fifteenth site, while Fig. [4](#Fig4){ref-type="fig"}(b) shows that two 0-length fragments in sequence $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{c} $$\end{document}$ of INS~5~ appear at the sixth and eighth sites, respectively.Fig. 4Appearance of 0-length fragments *m*, *n*, *k* are the length of the input instance A B and C, when k ≠ m + n − 1, We introduce some 0-length fragments into the sequence, (**a**) shows that a 0-length fragment in sequence $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{c} $$\end{document}$ of INS~4~ appears at the fifteenth site, (**b**) shows that two 0-length fragments in sequence $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{c} $$\end{document}$ of INS~5~ appear at the sixth and the eighth sites, respectively

Here, we follow the convention of reading a pie chart from 0^°^ to 180^°^ or 360^°^.

♦ Comparison

Figure [5](#Fig5){ref-type="fig"}(a) and (b) are the comparison of the average running time between DDmap and the algorithm in 2005 \[[@CR13]\] and 2012 \[[@CR3]\]. Operator 1--5 are the crossover and mutation operator in DDmap. Because the crossover operator in \[[@CR13]\] is the same as our operator 2 and the two mutation operators in \[[@CR3]\] are similar to our operators op4 and op5, so we only implement the mutation operator op6 in \[[@CR13]\] and crossover operator op7 in \[[@CR3]\]. Eight instances are from the paper \[[@CR13]\]. In the comparison experiment, each instance is run 100 times for operators op1--7 respectively, and then we got the average running time and the success rate of finding the exact DDP solution.Fig. 5Comparison of DDmap and algorithm in \[[@CR3], [@CR13]\]. Operators 1--5 are the crossover and mutation operators in DDmap, op6 is the mutation operator in \[[@CR13]\] and op7 is the crossover operator in \[[@CR3]\]. Each instance is run 100 times by using op1--7 respectively. **a** is a logarithmic coordinate system figure, we can see the average running time comparison between DDmap and the algorithm in \[[@CR13]\] in (**a**). **b** is the average running time comparison between DDmap and the algorithm in \[[@CR3]\]. **c** is the success rate comparison between DDmap and the algorithm in \[[@CR3], [@CR13]\]

Through the experimental data, we found the data of op6 is much larger than that of the other six operators, the data of the other six operators will be neglected in the rectangular coordinate system, so we choose the logarithmic coordinate system. Figure [5](#Fig5){ref-type="fig"}(a) is the comparison between DDmap and the algorithm in 2005 \[[@CR13]\], the blue line is the average running time of op6, it is higher than the other six lines, our algorithm has a significant time advantage over the \[[@CR3]\]'s algorithm. As can be seen from Fig. [5](#Fig5){ref-type="fig"}(b), the six lines have little difference, however, the op7's line is always at the top, so our algorithm has a slight advantage over that of \[[@CR3]\].

The comparison of success rate is shown in Fig. [5](#Fig5){ref-type="fig"}(c). The success rate of operators 1, 2, 3, 4, 5, 7 is 100%, they are all effective for these instances. Operator 6 runs very irregularly and the results are not very good.

Instance 2 and 6 does not appear in Fig. [5](#Fig5){ref-type="fig"}. In fact, INS~6~ is invalid. As aforementioned, INS~2~ is very complex, so we analyze it separately. To reset the maximum evolution generation as large as 100,000, running each operator 10 times towards INS~2~, the average running time and the success rate is shown in Fig. [6](#Fig6){ref-type="fig"}(a) and (b), respectively. We can see that the running time of op6 is about 10 times longer than other operators, while the running time of op7 is about twice longer than our operators op1--5. The success rates of our five operators are all 100%, however, op7's success rate is 90%, but op6 does not produce the exact DDP solution.Fig. 6Comparison of DDmap and algorithm in \[[@CR3], [@CR13]\] under the condition of INS~2~. The maximum evolution generation is set to 100,000, running each operator 10 times, (**a**) is the average running time of each operator. **b** is the success rate of each operatorFig. 7Flowchart of main GA algorithm of DDmap. The input DDP instance includes the instances in \[[@CR13]\] and random instances, after calculating the fitness value, if not satisfied the stop condition, the crossover and mutation operators will be performed probabilistically, then generate new offsprings and recalculate the fitness values

In conclusion, DDmap is much better than the algorithm in \[[@CR13]\] and it is slightly better than \[[@CR3]\]'s algorithm.

Conclusions {#Sec5}
===========

An open-source MATLAB package DDmap based on a newly designed genetic algorithm that combines six genetic operators is designed for solving the double digest problem. This algorithm finds exact solutions within approximately 1 s for typical DDP test instances. For some hard DDP instances, DDmap performs very well via a scaling-rounding-adjusting process. The experimental results of our algorithm confirm its efficiency.

Methods {#Sec6}
=======

Problem formulation {#Sec7}
-------------------

Let *S*~*m*~ denote the symmetric group on m indices {1, 2, ⋯, *m*}. Then, for a given permutation π ∈ *S*~*m*~ and a given vector $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{a}=\left({a}_1,\cdots, {a}_m\right) $$\end{document}$, the action of π on $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{\mathrm{a}} $$\end{document}$ derives a vector $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ {\overrightarrow{a}}^{\pi }=\left({a}_{\pi (i)},\cdots, {a}_{\pi (m)}\right) $$\end{document}$, reassembling of the order of entries of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{\mathrm{a}} $$\end{document}$ according to π. Further, let us define the *accumulative sum vector* of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{\mathrm{a}} $$\end{document}$, denoted by $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \mathrm{AS}\left(\overrightarrow{\mathrm{a}}\right) $$\end{document}$, and the *step difference vector* of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{\mathrm{a}} $$\end{document}$, denoted by $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \mathrm{AS}\left(\overrightarrow{\mathrm{a}}\right) $$\end{document}$, as follows:$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \mathrm{AS}\left(\overrightarrow{\mathrm{a}}\right)=\left(\Sigma \left(\overrightarrow{a},1\right),\cdots, \Sigma \left(\overrightarrow{a},\mathrm{m}\right)\right) $$\end{document}$$

and$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \mathrm{SD}\left(\overrightarrow{\mathrm{a}}\right)=\left(\sum \left(\overrightarrow{a},1\right),\sum \left(\overrightarrow{a},2\right)-\sum \left(\overrightarrow{a},1\right),\cdots, \sum \left(\overrightarrow{a},\mathrm{m}\right)-\sum \left(\overrightarrow{a},\mathrm{m}-1\right)\right) $$\end{document}$$

where $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \Sigma \left(\overrightarrow{a},\mathrm{j}\right)={\sum}_{i=1}^j{a}_i\left(j=1,\cdots, m\right) $$\end{document}$ indicates the partial sum of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{\mathrm{a}} $$\end{document}$.

Now, the double digest problem (DDP) can be formulated by the following steps:Given two vectors $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{a}=\left({a}_1,\cdots, {a}_m\right) $$\end{document}$ and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{b}=\left({b}_1,\cdots, {b}_n\right) $$\end{document}$ with the restriction $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \Sigma \left(\overrightarrow{a},\mathrm{m}\right)=\Sigma \left(\overrightarrow{b},\mathrm{n}\right) $$\end{document}$, we define the combining sequence of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{\mathrm{a}} $$\end{document}$ and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{\mathrm{b}} $$\end{document}$, denoted by $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \coprod \left(\overrightarrow{a},\overrightarrow{b}\right) $$\end{document}$, as the concatenation of vectors $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \mathrm{AS}\left(\overrightarrow{\mathrm{a}}\right) $$\end{document}$ and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \mathrm{AS}\left(\overrightarrow{\mathrm{b}}\right) $$\end{document}$ and removing the tail entry. That is,

$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \coprod \left(\overrightarrow{a},\overrightarrow{b}\right)=\left(\mathrm{AS}{\left(\overrightarrow{\mathrm{a}}\right)}_1,\cdots, \mathrm{AS}{\left(\overrightarrow{\mathrm{a}}\right)}_m,\mathrm{AS}{\left(\overrightarrow{\mathrm{b}}\right)}_1,\cdots, \mathrm{AS}{\left(\overrightarrow{\mathrm{b}}\right)}_{n-1}\right) $$\end{document}$$ The sequence $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \coprod \left(\overrightarrow{a},\overrightarrow{b}\right) $$\end{document}$ can be reassembled to obtain a new sequence according to the nondecreasing order, denoted by $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \hat{\bigsqcup}\left(\overrightarrow{a},\overrightarrow{b}\right) $$\end{document}$.The double digest sequence of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{\mathrm{a}} $$\end{document}$ and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{\mathrm{b}} $$\end{document}$, denoted by $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \mathrm{DDS}\left(\overrightarrow{a},\overrightarrow{b}\right) $$\end{document}$, can be defined as the step difference vector of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \hat{\bigsqcup}\left(\overrightarrow{a},\overrightarrow{b}\right) $$\end{document}$. That is,

$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \mathrm{DDS}\left(\overrightarrow{a},\overrightarrow{b}\right)= SD\left(\hat{\bigsqcup}\left(\overrightarrow{a},\overrightarrow{b}\right)\right) $$\end{document}$$ Now, we introduce the following definition:

### Definition 1 {#Sec8}

*A double digest problem (DDP) instance is specified by three vectors* $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{a}=\left({a}_1,\cdots, {a}_m\right),\overrightarrow{b}=\left({b}_1,\cdots, {b}_n\right)\  and\;\overrightarrow{c}=\left({c}_1,\cdots, {c}_k\right) $$\end{document}$ *with the restriction of*$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \Sigma \left(\overrightarrow{a},m\right)=\Sigma \left(\overrightarrow{b},n\right)=\Sigma \left(\overrightarrow{c},k\right) $$\end{document}$$*and the objective is to find a pair permutations* (*μ*, *ν*) ∈ *S*~*m*~ × *S*~*n*~ *such that.*$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ DDS\left({\overrightarrow{a}}^{\mu },{\overrightarrow{b}}^v\right)={\overrightarrow{c}}^{\pi }\  for\; som\ \pi \in {S}_m $$\end{document}$$

### Remark 1 {#Sec9}

*If two enzymes cut a target DNA molecule at disjoint sites, then we have the condition k* = *m* + *n* − 1*. It was previously suspected that this case might lead to easier reconstruction problems* \[[@CR2]\]*. (However, our simulation does support this conjecture, and details are given in the supplementary part). However, due to some unavoidable experimental errors, this condition does not always hold. Thus, in DDmap, we employ a very simple strategy to address the cases of k* = *m* + *n* − 1*: Introducing 0-length fragments in sequence A,B, or C if necessary. Our simulation results show that this method is considerably robust.*

### Remark 2 {#Sec10}

*If we take into consideration possible partial cleavage errors, then the optimization goal (6) should be updated to*$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \left.{\mathit{\min}}_{\mu \in {S}_m,\nu \in {S}_n}\right|\left| DDS\left({\overrightarrow{a}}^{\mu },{\overrightarrow{b}}^{\nu}\right)\oplus \overrightarrow{c}\right| $$\end{document}$$*where symbol* ⊕ *indicates the set exclusive operation, and the two operands* $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ DDS\left({\overrightarrow{a}}^{\mu },{\overrightarrow{b}}^{\nu}\right) $$\end{document}$ *and*$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{c} $$\end{document}$ *should be regarded as unordered multisets. By doing so, the searching space of the DDP solution is reduced to S*~*m*~ × *S*~*n*~*, instead of S*~*m*~ × *S*~*n*~ × *S*~*k*~*. In fact,π can be easily extracted from any valid solution* (*μ*, *ν*)*. A simple method for obtaining π is to at first sort* $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ DDS\left({\overrightarrow{a}}^{\mu },{\overrightarrow{b}}^{\nu}\right) $$\end{document}$ *to obtain a nondecreasing sequence and then let π be the permutation specified by the reverse index of the sorting subscripts. Apparently, this step can be performed within the complexity* Ο(*klogk*)*.*

### Example 1 {#Sec11}

*For given three vectors* $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{a}=\left(1,2,3,5\right) $$\end{document}$ *,* $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{b}=\left(2,2,3,4\right) $$\end{document}$ *and* $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{c}=\left(1,1,1,2,2,2,2\right) $$\end{document}$ *as well as two permutations.*

$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \mu =\left(\begin{array}{c}1\ 2\ 3\ 4\\ {}2\ 4\ 3\ 1\end{array}\right) $$\end{document}$ *and* $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \nu =\left(\begin{array}{c}1\ 2\ 3\ 4\\ {}3\ 1\ 2\ 4\end{array}\right) $$\end{document}$*, we can verify that* (*μ*, *ν*) *is a valid solution for the DDP instance specified by* $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \left(\overrightarrow{a},\overrightarrow{b},\overrightarrow{c}\right) $$\end{document}$*. The pie charts of a solution and the corresponding calculation steps and complexities are depicted in* *Table* [*3*](#Tab3){ref-type="table"}*.*Table 3Illustration of the proposed formulation. This is the detailed process of solving the double digest problem, The calculation process of example 1 is listed in (a). The pie chart for this example's solution is in (b).

The proposed genetic operators {#Sec12}
------------------------------

Recall that the basic idea of a genetic algorithm consists of the following concepts: an individual is totally specified by a chromosome; a chromosome is the carrier of a gene, and the position of a gene in a chromosome is called a locus; the gene composition of an individual is called the genotype; and the fitness value, called phenotype, is the result of mutual effects of genotype and external environments. Thus, to design a genetic algorithm for a given optimization problem, we need to specify how to represent a chromosome, evaluate the fitness value, design genetic operators, and determine evolution strategies such as the population size, the maximum evolution generation, the elitism keeping method, the probabilities for each genetic operator, etc.

First, for a given DDP instance $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \left(\overrightarrow{a},\overrightarrow{b},\overrightarrow{c}\right) $$\end{document}$, we directly use a random pair of permutations (*μ*, *ν*) ∈ *S*~*m*~ × *S*~*n*~ to represent a chromosome, and its fitness value is given by$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ f\left(\mu, \nu \right)=\frac{1}{1+\left| DDS\left({\overrightarrow{a}}^{\mu },{\overrightarrow{b}}^{\nu}\right)\oplus \overrightarrow{c}\right|} $$\end{document}$$

Second, the following 6 genetic operators are employed in this work:**RWS**. This is a natural selection operator defined as the well-known roulette wheel algorithm.**PCC**. This is a crossing operator defined as a combination of two permutations. Given two chromosomes (*μ*^(1)^, *ν*^(1)^) and (*μ*^(2)^, *v*^(2)^), this operator produces two new offspring

$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \left({\mu}^{(1)}\circ {\mu}^{(2)}\circ {\nu}^{(1)}\circ {\nu}^{(2)}\right) $$\end{document}$$

and$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \left({\mu}^{(2)}\circ {\mu}^{(1)}\circ {\nu}^{(2)}\circ {\nu}^{(1)}\right) $$\end{document}$$

respectively.**RSC**. This is a crossing operator defined as the so-called referencing sorting (RS). Given a target sequence $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{a} $$\end{document}$ and a reference sequence $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{b} $$\end{document}$, assuming both are defined over the same alphabet. Then, during the sorting process, the swapping operation of two elements in $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{a} $$\end{document}$ is performed only if they are in the reverse order in the referencing sequence $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{b} $$\end{document}$. RS is a generalization of ordinary sorting in the sense that any two elements can be compared even if they do not come from a complete order. RS is inspired by operator precedence grammars. More details about RS and RSC are given in the supplementary section. In fact, RSC is called *order preserving weighted crossover* in \[[@CR13]\].**P4X**. This is a four-point mutating operator defined as follows: Given a chromosome (*μ*, *ν*), randomly exchange two elements of μ and two elements of ν.**FLP**. This is a fragment mutating operator defined as flipping of the given fragment. By flipping a fragment (2, 5, 4, 1), we obtain (1, 4, 5, 2).**CSH**. This is a fragment mutating operator defined as cyclic shifting of the given fragment. By cyclically shifting a fragment (2, 5, 4, 1), we obtain (5, 4, 1, 2).

More details about the referenced sorting crossover (RSC) genetic operator.

RSC is in fact the order preserving weighted crossover given in \[[@CR13]\]. Suppose two parent chromosomes are$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ {\displaystyle \begin{array}{l}{\mathrm{p}}_1=\left(1,3,2,1,3,4,2,2\right)\mathrm{and}\\ {}{\mathrm{p}}_2=\left(1,2,2,2,4,3,3,1\right),\end{array}} $$\end{document}$$

and the crossover point is 3. Then, the producing of the offspring is given below:p~1~ is split into two pieces: p~11~ = (1, 3, 2) and p~12~ = (1, 3, 4, 2, 2), and p~2~ is split into two pieces: p~21~ = (1, 2, 2) and p~22~ = (2, 4, 3, 3, 1).The piece p~12~ is sorted by taking p~2~ as the referenced sequence. Since in p~2~ there exists a chain 2 − 2 − 4 − 3 − 1 this leads to p \' ~12~ = (2, 2, 4, 3, 1).Similarly, p~22~ is sorted by taking p~1~ as the referenced sequence. This time, we obtain p \'~ 22~ = (3, 1, 3, 4, 2) since there exists a chain 3 − 1 − 3 − 4 − 2 in p~1~.Two offspring chromosomes are

$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ {\displaystyle \begin{array}{l}{\mathrm{c}}_1={\mathrm{p}}_{11}\Big\Vert {\mathrm{p}}_{12}^{\prime }=\operatorname{}\left(1,3,2,2,2,4,3,1\right)\mathrm{and}\\ {}{\mathrm{c}}_2={\mathrm{p}}_{21}\Big\Vert {\mathrm{p}}_{22}^{\prime}\operatorname{}\left(1,2,2,3,1,3,4,2\right).\end{array}} $$\end{document}$$

Among the above 6 genetic operators, RWS is widely used in most genetic algorithms, and RSC was first used in \[[@CR13]\] to solve the DDP problem. Four other genetic operators, although being easily conceived, are new to DDP-oriented genetic algorithms, as far as we know.

Third, the evolution strategies in this work refer to \[[@CR13]\]. That is, the population size and maximum evolution generation are set to 50 and 10,000, respectively. Elitists in each generation are kept, and the crossing probability is set to 0.85. The linearly adaptive mutation probability in \[[@CR13]\] is also used in our work, but with a slight modification to ensure the cyclic increment of mutation probability is nonnegative. The details are as follows:

We follow the suggestion given in \[[@CR13]\] by letting the mutation probability vary linearly in cycles of 200 iterations. However, in the original paper, this cycle varies from $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \frac{2}{m+n} $$\end{document}$ to 0.45, while in our work, the cycle varies from $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \frac{2}{m+n} $$\end{document}$ to 0.55, considering that in the case of m = n = 2, the start point would be 0.5, which is larger than 0.45.

Scaling-rounding-adjusting approach {#Sec13}
-----------------------------------

Based on the above observation, we try to deal with the instance INS~2~ in another way. A new test instance, INS~2~, is derived by using a scaling-rounding-adjusting process on INS~2~. The details of this process are as follows:Scaling and rounding. Because the minimum length of pieces in sequence $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{c} $$\end{document}$ of INS~2~ is 1120, we take 0.001 as the scaling factor. That is, we multiply the sequences $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \overrightarrow{\mathrm{a}},\overrightarrow{\mathrm{b}},\overrightarrow{\mathrm{c}} $$\end{document}$ by 0.001 and then round them. By doing so, we obtain

$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ {\displaystyle \begin{array}{c}\overrightarrow{{\mathrm{a}}^{\prime }}=\left(6,6,7,7,7,17\right)\\ {}\overrightarrow{{\mathrm{b}}^{\prime }}=\left(4,5,6,6,7,21\right)\\ {}\overrightarrow{{\mathrm{c}}^{\prime }}=\left(1,2,3,3,3,4,4,4,5,6,16\right)\end{array}} $$\end{document}$$ Adjusting. Next, we find that

$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \sum \left(\overrightarrow{{\mathrm{a}}^{\prime }}\right)=50\ne \sum \left(\overrightarrow{{\mathrm{b}}^{\prime }}\right)=49\ne \sum \left(\overrightarrow{{\mathrm{c}}^{\prime }}\right)=51 $$\end{document}$$

That is, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \left(\overrightarrow{\mathrm{a}},\overrightarrow{\mathrm{b}},\overrightarrow{\mathrm{c}}\right) $$\end{document}$ is an invalid DDP instance. Intuitively, this occurs because the round operation, round(·), introduces more errors. Thus, we try to adjust the rounding operation in the previous step according to the so-called rounding-up and rounding-down strategies:

\- Rounding-up: round(x) is replaced by x \'  = round(x + 0.1), and we obtain$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ {\displaystyle \begin{array}{c}\overrightarrow{{\mathrm{a}}^{{\prime\prime} }}=\left(6,6,7,7,7,17\right)\\ {}\overrightarrow{{\mathrm{b}}^{{\prime\prime} }}=\left(4,5,6,6,8,21\right)\\ {}\overrightarrow{{\mathrm{c}}^{{\prime\prime} }}=\left(1,2,3,3,3,4,4,4,5,6,16\right)\end{array}} $$\end{document}$$

This DDP instance is again invalid since$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \sum \left(\overrightarrow{{\mathrm{a}}^{{\prime\prime} }}\right)=50=\sum \left(\overrightarrow{{\mathrm{b}}^{{\prime\prime} }}\right)\ne \sum \left(\overrightarrow{{\mathrm{c}}^{{\prime\prime} }}\right)=51 $$\end{document}$$

\- Rounding-down: round(x) is replaced by x \'  = round(x − 0.1)$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ {\displaystyle \begin{array}{c}\overrightarrow{{\mathrm{a}}^{{\prime\prime\prime} }}=\left(5,6,6,7,7,17\right)\\ {}\overrightarrow{{\mathrm{b}}^{{\prime\prime\prime} }}=\left(3,5,6,6,7,21\right)\\ {}\overrightarrow{{\mathrm{c}}^{{\prime\prime\prime} }}=\left(1,2,2,3,3,3,4,4,5,5,16\right)\end{array}} $$\end{document}$$

Now, the DDP instance may be valid since$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \sum \left(\overrightarrow{{\mathrm{a}}^{{\prime\prime\prime} }}\right)=\sum \left(\overrightarrow{{\mathrm{b}}^{{\prime\prime\prime} }}\right)=\sum \left(\overrightarrow{{\mathrm{c}}^{{\prime\prime\prime} }}\right)=48 $$\end{document}$$

Note that the constant 0.1 in rounding-up/rounding-down is a value defined by experience. A reasonable domain of this constant would be the interval \[0.0001, 0.4999\].

• Now, the newly derived DDP instance INS~2~, is given by the three vectors $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \left(\overrightarrow{{\mathrm{a}}^{{\prime\prime\prime} }},\overrightarrow{{\mathrm{b}}^{{\prime\prime\prime} }},\overrightarrow{{\mathrm{c}}^{{\prime\prime\prime} }}\right) $$\end{document}$.

Finally, we would like to mention that all simulations in this work are conducted on a X1 Carbon laptop with Windows(TM) 8, Intel(R)Core(TM)i5 − 4300U CPU @ 1.90 GHz/2.49 GHz and 8GB RAM. The complete genetic algorithm for solving the DDP problem is implemented as a MATLAB package, DDmap, and a Maple source code for drawing DDP solutions as nested pie charts is also included in this package.

The package DDmap consists of13 MATLAB algorithms:permGA.m, the MATLAB genetic algorithm for solving the DDP problem. This is the main algorithm, and its flowchart is depicted in Fig. [7](#Fig7){ref-type="fig"}. Note that this file also contains the definitions of five genetic operators --- RWS, PCC, P4X, FLP, CSH and related MATLAB functions for calculating the fitness values.

referIndexSort.m, the MATLAB algorithm for implementing the so-called referenced sorting (based on index).opPermCross.m, the MATLAB algorithm for implementing the RSC genetic operator.getInstance.m, the auxiliary MATLAB algorithm for outputting test DDP instances in \[Sur-Kolay S. et al., 2005\].randDDPinstance.m, the auxiliary MATLAB algorithm for producing a valid DDP instance according the given parameters.strABC.m, the auxiliary MATLAB algorithm for producing Maple commands for reading data before calling the Maple algorithm DDdraw.mws.simu1004.m, simu1004plots.m, simu1007.m, and simu1008.m, the auxiliary MATLAB algorithms for organizing simulations and producing the related figures.Trans.m, the MATLAB algorithm for implementing Scaling-rounding-adjusting approach for Cases of INS~2.~Plot1.m, the auxiliary MATLAB algorithms for comparison of DDmap and algorithm in \[[@CR3], [@CR13]\].Plot2.m, the auxiliary MATLAB algorithms for comparison of DDmap and other algorithms under the condition of INS~2.~1 Maple algorithm, DDdraw.mws, is used for drawing the DDP solution in nested pie charts, with inputs A, B and C that are assigned by using Maple commands produced by strABC.m.43 Data files: 42 of them are named as INS~xx − ggg~. TEX, where xx ∈ {01, 03, 04, 05, 07, 08, 10} and ggg ∈ {pcc, rsc, p4x, flp, csh, all}, and the last is named as INS~02 − rs − 1008~. TEX. These data files are in fact the running records of our simulations towards the 7 valid DDP test instances given in \[[@CR13]\]. In these running records, many exact DDP solutions are provided.

CSH

:   Cyclic shifting

DDE

:   Double digest experiments

DDP

:   Double digest problem

FLP

:   Flipping

P4X

:   Four-point exchange

PCC

:   Permutations combination crossing

RSC

:   Referencing sorting crossing

RWS

:   Roulette wheel selection

We thank the anonymous reviewers for giving us valuable suggestions.

Funding {#FPar1}
=======

This work was supported by the National Key R&D Program of China (Grant No. 2016YFB0800602), the Shandong provincial Key R&D Program of China (Grant No. 2018CXGC0701), and the 111 Project (No. B08004). The experimental environments and the editing services are supported by the Shandong provincial Key R&D Program of China (Grant No. 2018CXGC0701) and the 111 Project (No. B08004), respectively. The publication cost is funded by National Key R&D Program of China (Grant No. 2016YFB0800602). The funders had no role in the design of the study and collection, analysis, and interpretation of data and in writing the manuscript.

Availability of data and materials {#FPar2}
==================================

DDmap is open source and available at <https://github.com/wanglc2012/DDmap>.

LW proposed the main concept of the presented technique, implemented the main framework. JS finished the main experimental study, as well as analysis on related work. YP conceived the main idea about this work and implemented the algorithms about different genetic operators. LL verified the main method, checked the correctness of the presented technique. All authors reviewed the manuscript and approved the final manuscript.

Not applicable.

Not applicable.

The authors declare that they have no competing interests.

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
