<?xml version='1.0'?>
<!DOCTYPE art SYSTEM 'http://www.biomedcentral.com/xml/article.dtd'>
<art>
   <ui>1748-7188-2-11</ui>
   <ji>1748-7188</ji>
   <fm>
      <dochead>Research</dochead>
      <bibl>
         <title>
            <p>Mapping sequences by parts</p>
         </title>
         <aug>
            <au id="A1" ca="yes">
               <snm>Didier</snm>
               <fnm>Gilles</fnm>
               <insr iid="I1"/>
               <email>didier@iml.univ-mrs.fr</email>
            </au>
            <au id="A2">
               <snm>Guziolowski</snm>
               <fnm>Carito</fnm>
               <insr iid="I2"/>
               <email>cvargas@irisa.fr</email>
            </au>
         </aug>
         <insg>
            <ins id="I1">
               <p>Institut de Math&#233;matiques de Luminy, 163 avenue de Luminy, Case 907, 13288 Marseille Cedex 9, France.</p>
            </ins>
            <ins id="I2">
               <p>Projet Symbiose, IRISA &#8211; campus de Beaulieu, 35042 Rennes Cedex, France.</p>
            </ins>
         </insg>
         <source>Algorithms for Molecular Biology</source>
         <issn>1748-7188</issn>
         <pubdate>2007</pubdate>
         <volume>2</volume>
         <issue>1</issue>
         <fpage>11</fpage>
         <url>http://www.almob.org/content/2/1/11</url>
         <xrefbib>
            <pubidlist>
               <pubid idtype="pmpid">17880695</pubid>
               <pubid idtype="doi">10.1186/1748-7188-2-11</pubid>
            </pubidlist>
         </xrefbib>
      </bibl>
      <history>
         <rec>
            <date>
               <day>02</day>
               <month>2</month>
               <year>2007</year>
            </date>
         </rec>
         <acc>
            <date>
               <day>19</day>
               <month>9</month>
               <year>2007</year>
            </date>
         </acc>
         <pub>
            <date>
               <day>19</day>
               <month>9</month>
               <year>2007</year>
            </date>
         </pub>
      </history>
      <cpyrt>
         <year>2007</year>
         <collab>Didier and Guziolowski; licensee BioMed Central Ltd.</collab>
         <note>This is an Open Access article distributed under the terms of the Creative Commons Attribution License (<url>http://creativecommons.org/licenses/by/2.0</url>), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</note>
      </cpyrt>
      <abs>
         <sec>
            <st>
               <p>Abstract</p>
            </st>
            <sec>
               <st>
                  <p>Background:</p>
               </st>
               <p>We present the <it>N</it>-map method, a pairwise and asymmetrical approach which allows us to compare sequences by taking into account evolutionary events that produce shuffled, reversed or repeated elements. Basically, the optimal <it>N</it>-map of a sequence <it>s </it>over a sequence <it>t </it>is the best way of partitioning the first sequence into <it>N </it>parts and placing them, possibly complementary reversed, over the second sequence in order to maximize the sum of their gapless alignment scores.</p>
            </sec>
            <sec>
               <st>
                  <p>Results:</p>
               </st>
               <p>We introduce an algorithm computing an optimal <it>N</it>-map with time complexity <it>O </it>(|<it>s</it>| &#215; |<it>t</it>| &#215; <it>N</it>) using <it>O </it>(|<it>s</it>| &#215; |<it>t</it>| &#215; <it>N</it>) memory space. Among all the numbers of parts taken in a reasonable range, we select the value <it>N </it>for which the optimal <it>N</it>-map has the most significant score. To evaluate this significance, we study the empirical distributions of the scores of optimal <it>N</it>-maps and show that they can be approximated by normal distributions with a reasonable accuracy. We test the functionality of the approach over random sequences on which we apply artificial evolutionary events.</p>
            </sec>
            <sec>
               <st>
                  <p>Practical Application:</p>
               </st>
               <p>The method is illustrated with four case studies of pairs of sequences involving non-standard evolutionary events.</p>
            </sec>
         </sec>
      </abs>
   </fm>
   <bdy>
      <sec>
         <st>
            <p>Background</p>
         </st>
         <p>Classic alignments methods are unable to extract homologies involving shuffled, reverse-complemented or repeated elements between sequences, despite the fact that there are identified mechanisms of evolution of sequences which lead to such types of homologies. This can happen on large scale with genome rearrangements but it can also occur on a smaller scale, for instance within genes, with domain recombinations, duplications, exon shufflings, <it>etc</it>.</p>
         <p>On the other hand, there are few methods allowing us to compare sequences with relaxed assumptions about conservation of linear order and one-to-one association of positions between sequences <abbrgrp><abbr bid="B1">1</abbr><abbr bid="B2">2</abbr><abbr bid="B3">3</abbr></abbrgrp>. In particular, as it is pairwise and asymmetrical, the approach proposed in <abbrgrp><abbr bid="B1">1</abbr></abbrgrp> is similar to the work presented here. The authors introduce the transformation distance, similar to the Levenstein distance between sequences, which includes editing operations like transposition, duplication, <it>etc</it>. The algorithmic complexity of the computation of this distance, which was initially high, has been improved in <abbrgrp><abbr bid="B4">4</abbr></abbrgrp>.</p>
         <p>However, the transformation distance has some drawbacks; mainly, it does not take into account mutations. In <abbrgrp><abbr bid="B2">2</abbr></abbrgrp>, the authors introduce the Glocal alignment method which allows one to compare sequences with shuffled or inverted elements. The main idea of their work is to combine local and global alignments. During the first stage, the method selects conserved segments (local) and during the second stage, it chains an optimal subset of the pairs of segments previously selected (global). Many specialized approaches have been developed to model the specific evolutions "by blocks" of certain elements of sequences: minisatellites <abbrgrp><abbr bid="B5">5</abbr></abbrgrp> or swaps in proteins sequences <abbrgrp><abbr bid="B6">6</abbr></abbrgrp>. In the latter, the method is based on selection of common segments by local alignments scores and can be applied in a more general framework. The approach proposed in <abbrgrp><abbr bid="B3">3</abbr></abbrgrp>, mostly applied to more than two sequences, proceeds in similar manner in its first stage, then performs post-treatments and a graph representation of common elements of sequences.</p>
         <p>For simplicity, we present the <it>N</it>-maps without taking into account inversions. Some hints will be given about how to extend the definitions and the algorithms in order to handle this type of evolution. Under this restriction, the (optimal) <it>N</it>-map of a sequence <it>s </it>over a sequence <it>t </it>is basically the way of cutting <it>s </it>into <it>N </it>parts that maximizes the sums of the scores of the gapless alignments of all the <it>N </it>parts against <it>t</it>. The gapless alignments can be local or global and so can be the <it>N</it>-map. This approach can be seen as a generalization of the "alignment with a fixed number of gaps" method initially introduced in <abbrgrp><abbr bid="B7">7</abbr></abbrgrp> and recently studied in <abbrgrp><abbr bid="B8">8</abbr><abbr bid="B9">9</abbr></abbrgrp>. As this method, our approach is an attempt to avoid the introduction of some arbitrary costs on the transformations between sequences (like gap penalties in the case of alignment). For this purpose, we need a concrete way to determine the "best" number <it>N </it>of parts for mapping a sequence <it>s </it>over a sequence <it>t</it>. As in <abbrgrp><abbr bid="B9">9</abbr></abbrgrp>, we define this problem from a probabilistic point of view. Practically, we choose the number of parts leading to the most significant optimal score. The significance is empirically evaluated among pairs of independent identically distributed (iid) random sequences of same lengths and symbols distributions as <it>s </it>and <it>t</it>.</p>
         <p>The rest of this paper is organized as follows. Section 1 is devoted to formal definitions and basic properties of the <it>N</it>-maps. We present the algorithms computing the optimal scores and correponding <it>N</it>-maps of a sequence <it>s </it>over a sequence <it>t </it>in Section 2. The algorithmic complexities of these computations are <it>O </it>(|<it>s</it>| &#215; |<it>t</it>| &#215; <it>N</it>) in time and <it>O </it>(|<it>s</it>| + |<it>t</it>| &#215; <it>N</it>) in memory space. These complexities have an extra factor <it>N </it>with regard to the classical pairwise alignment algorithms. However typical values of interest of <it>N </it>are small compared to the lengths of the sequences: choosing a number of parts of the same order as the lengths of the sequences does not make any sense. The choice of the number of parts is discussed in Section 3, in which we investigate the distributions of the scores of the optimal <it>N</it>-maps of random sequences. In particular, empirical evidences lead us to approximate these distributions by normal ones and to measure the significance of optimal scores in terms of <it>Z</it>-values. The approach is evaluated in Section 4 by applying artificial evolutionary events over random sequences and by measuring the ability of the approach to retrieve the corresponding homologous segments. Section 5 shows four case studies of sequences (two pairs of proteins, a pair of DNA sequences of transposon elements and a pair of sequences of genes of microbial genomes) in which the homologies cannot be reported by a classic alignment. Finally in Section 6, we discuss the approach and present some research directions we plan to explore.</p>
         <p>The sources of the software computing <it>N</it>-maps are available at <abbrgrp><abbr bid="B10">10</abbr></abbrgrp>. We also provide additional utilities to estimate <it>Z</it>-values, represent <it>N</it>-maps as pictures (see Section 5), filter, merge and extract common segments.</p>
      </sec>
      <sec>
         <st>
            <p>1 Notations and Definitions</p>
         </st>
         <p>We consider sequences (or strings) over some finite alphabet <inline-formula><m:math name="1748-7188-2-11-i1" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mi mathvariant="script">A</m:mi><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFaeFqaaa@3820@</m:annotation></m:semantics></m:math></inline-formula> of elements called letters or symbols. In practical applications, symbols can represent nucleotides, amino acids or genes. The elements of a sequence <it>s </it>are indexed from 1 to |<it>s</it>|, where |<it>s</it>| denotes the length of <it>s</it>, <it>i.e</it>. <it>s </it>= <it>s</it><sub>1 </sub><it>s</it><sub>2 </sub>... <it>s</it><sub>|<it>s</it>|</sub>. For 1 &#8804; <it>i </it>&#8804; <it>j </it>&#8804; |<it>s</it>|, the notation <it>s</it><sub>[<it>i</it>, <it>j</it>] </sub>designates the substring <it>s</it><sub><it>i </it></sub><it>s</it><sub><it>i</it>+1 </sub>... <it>s</it><sub><it>j</it></sub>. We note <inline-formula><m:math name="1748-7188-2-11-i2" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mover accent="true"><m:mi>s</m:mi><m:mo>^</m:mo></m:mover><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuWGZbWCgaqcaaaa@2E2B@</m:annotation></m:semantics></m:math></inline-formula> the reverse sequence of <it>s</it>, <it>i.e</it>.</p>
         <p><inline-formula><m:math name="1748-7188-2-11-i2" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mover accent="true"><m:mi>s</m:mi><m:mo>^</m:mo></m:mover><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuWGZbWCgaqcaaaa@2E2B@</m:annotation></m:semantics></m:math></inline-formula> = <it>s</it><sub>|<it>s</it>| </sub><it>s</it><sub>|<it>s</it>|</sub>-1 ...<it>s</it><sub>1</sub>. The set of all sequences of length <it>l </it>over <inline-formula><m:math name="1748-7188-2-11-i1" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mi mathvariant="script">A</m:mi><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFaeFqaaa@3820@</m:annotation></m:semantics></m:math></inline-formula> is noted <inline-formula><m:math name="1748-7188-2-11-i3" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi mathvariant="script">A</m:mi><m:mi>l</m:mi></m:msup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFaeFqdaahaaWcbeqaaiabdYgaSbaaaaa@39AE@</m:annotation></m:semantics></m:math></inline-formula>. Let <it>s </it>and <it>t </it>be two sequences. A pair of intervals of positions ([<it>a</it>, <it>b</it>], [<it>c</it>, <it>d</it>]) is a <it>diagonal </it>of (<it>s</it>, <it>t</it>) if 1 &#8804; <it>a </it>
&#8804; <it>b </it>&#8804; |<it>s</it>|, 1 &#8804; <it>c </it>&#8804; <it>d </it>&#8804; |<it>t</it>| and <it>b </it>- <it>a </it>= <it>d </it>- <it>c</it>. The first (<it>resp</it>. the second) interval of a diagonal <it>D </it>of (<it>s</it>, <it>t</it>) will be designated as the <it>s-interval </it>(<it>resp</it>. the <it>t-interval</it>) of <it>D</it>. In order to avoid to deal specifically with some "pathological cases", we allow diagonals to be empty (of length 0).</p>
         <p><b>Definition 1 </b><it>Let s and t be two sequences. A N-map of s over t is a N-tuple of diagonals of </it>(<it>s</it>, <it>t</it>): [([<it>a</it><sub>1</sub>, <it>b</it><sub>1</sub>], [<it>c</it><sub>1</sub>, <it>d</it><sub>1</sub>]), ([<it>a</it><sub>2</sub>, <it>b</it><sub>2</sub>], [<it>c</it><sub>2</sub>, <it>d</it><sub>2</sub>]), ...,([<it>a</it><sub><it>N</it></sub>, <it>b</it><sub><it>N</it></sub>], [<it>c</it><sub><it>N</it></sub>, <it>d</it><sub><it>N</it></sub>])] <it>such that </it>[<it>a</it><sub><it>i</it></sub>, <it>b</it><sub><it>i</it></sub>] &#8745; [<it>a</it><sub><it>j</it></sub>, <it>b</it><sub><it>j</it></sub>] = &#8709; <it>for all </it>1 &#8804; <it>i, j </it>&#8804; <it>N with j </it>&#8800; <it>i</it>.</p>
         <p>Without loss of generality, we assume in the following that the diagonals of a <it>N</it>-map of <it>s </it>over <it>t </it>are indexed according to the positions of their <it>s</it>-intervals. In particular, the <it>first diagonal </it>(<it>resp</it>. the <it>last diagonal</it>) is the one with the smallest (<it>resp</it>. the greatest) start position of <it>s</it>-interval. Notation <inline-formula><m:math name="1748-7188-2-11-i4" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msubsup><m:mi>&#937;</m:mi><m:mrow><m:mo stretchy="false">(</m:mo><m:mi>s</m:mi><m:mo>,</m:mo><m:mi>t</m:mi><m:mo stretchy="false">)</m:mo></m:mrow><m:mi>N</m:mi></m:msubsup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqqHPoWvdaqhaaWcbaGaeiikaGIaem4CamNaeiilaWIaemiDaqNaeiykaKcabaGaemOta4eaaaaa@34FE@</m:annotation></m:semantics></m:math></inline-formula> denotes the set of all the <it>N</it>-maps of <it>s </it>over <it>t</it>.</p>
         <p>A <it>N</it>-map of <it>s </it>over <it>t </it>is nothing but a peculiar type of map from a subset of positions of <it>s </it>to the set of positions of <it>t</it>. In other words, it associates at most one position of <it>t </it>to a position of <it>s</it>; and none, one or several positions of <it>s </it>to a position of <it>t </it>(See Figure <figr fid="F1">1</figr> or Figure <figr fid="F2">2</figr> for dotplot representation).</p>
         <fig id="F1">
            <title>
               <p>Figure 1</p>
            </title>
            <caption>
               <p>Representation of the 3-map [([2, 3], [1,2]), ([4,8], [7,11]), ([11,13], [5,7])] of <it>s </it>over <it>t</it></p>
            </caption>
            <text>
               <p>Representation of the 3-map [([2, 3], [1,2]), ([4,8], [7,11]), ([11,13], [5,7])] of <it>s </it>over <it>t</it>. The positions associated in a diagonal are connected by a line.</p>
            </text>
            <graphic file="1748-7188-2-11-1"/>
         </fig>
         <fig id="F2">
            <title>
               <p>Figure 2</p>
            </title>
            <caption>
               <p>Dotplot representations of two 4-maps</p>
            </caption>
            <text>
               <p>Dotplot representations of two 4-maps. a) Position <it>m </it>is inside a diagonal. b) Position <it>m </it>is not inside a diagonal.</p>
            </text>
            <graphic file="1748-7188-2-11-2"/>
         </fig>
         <p>A given classical alignment (which is also a map between positions) can be seen, for a certain positive integer <it>N</it>, as a <it>N</it>-map, both of <it>s </it>over <it>t </it>and of <it>t </it>over <it>s</it>. More precisely, an alignment with a fixed number <it>K </it>of gaps, like studied in <abbrgrp><abbr bid="B7">7</abbr><abbr bid="B8">8</abbr><abbr bid="B9">9</abbr></abbrgrp>, is a (<it>K </it>+ 1)-map which, with notations of Definition 1, verifies the additional conditions: [<it>c</it><sub><it>i</it></sub>, <it>d</it><sub><it>i</it></sub>] &#8745; [<it>c</it><sub><it>j</it></sub>, <it>d</it><sub><it>j</it></sub>] = &#8709; and (<it>a</it><sub><it>i </it></sub>- <it>a</it><sub><it>j</it></sub>) &#215; (<it>c</it><sub><it>i </it></sub>- <it>c</it><sub><it>j</it></sub>) > 0 for all 1 &#8804; <it>i</it>, <it>j </it>&#8804; <it>K </it>+ 1 with <it>j </it>&#8800; <it>i</it>. For 0 &lt;<it>N </it>&#8804; <it>K </it>&#8804; |<it>s</it>| and a given <it>N</it>-map of <it>s </it>over <it>t</it>, there is at least one <it>K</it>-map defining the same map from positions of <it>s </it>to positions of <it>t</it>.</p>
         <p>Let <inline-formula><m:math name="1748-7188-2-11-i5" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mi mathvariant="script">S</m:mi><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFse=uaaa@3844@</m:annotation></m:semantics></m:math></inline-formula> be a <it>scoring scheme, i.e</it>. a map from <inline-formula><m:math name="1748-7188-2-11-i6" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mstyle displaystyle="true"><m:msub><m:mo>&#8746;</m:mo><m:mrow><m:mi>l</m:mi><m:mo>&#8712;</m:mo><m:mi>&#8469;</m:mi></m:mrow></m:msub><m:mrow><m:msup><m:mi mathvariant="script">A</m:mi><m:mi>l</m:mi></m:msup><m:mo>&#215;</m:mo><m:msup><m:mi mathvariant="script">A</m:mi><m:mi>l</m:mi></m:msup></m:mrow></m:mstyle></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaadaWeqaqaamrtHrhAL1wy0L2yHvtyaeHbnfgDOvwBHrxAJfwnaGabaiab=bq8bnaaCaaaleqabaGaemiBaWgaaOGaey41aqRae8haXh0aaWbaaSqabeaacqWGSbaBaaaabaGaemiBaWMaeyicI48efv3ySLgznfgDOjdarCqr1ngBPrginfgDObcv39gaiuaacqGFveItaeqaniablQIivbaaaa@4E0E@</m:annotation></m:semantics></m:math></inline-formula> to &#8477;. The score associated to a <it>N</it>-map following <inline-formula><m:math name="1748-7188-2-11-i5" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mi mathvariant="script">S</m:mi><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFse=uaaa@3844@</m:annotation></m:semantics></m:math></inline-formula> is:</p>
         <p>
            <display-formula>
               <m:math name="1748-7188-2-11-i7" xmlns:m="http://www.w3.org/1998/Math/MathML">
                  <m:semantics>
                     <m:mrow>
                        <m:mi mathvariant="script">S</m:mi>
                        <m:mo stretchy="false">[</m:mo>
                        <m:mo stretchy="false">(</m:mo>
                        <m:mo stretchy="false">[</m:mo>
                        <m:msub>
                           <m:mi>a</m:mi>
                           <m:mn>1</m:mn>
                        </m:msub>
                        <m:mo>,</m:mo>
                        <m:msub>
                           <m:mi>b</m:mi>
                           <m:mn>1</m:mn>
                        </m:msub>
                        <m:mo stretchy="false">]</m:mo>
                        <m:mo>,</m:mo>
                        <m:mo stretchy="false">[</m:mo>
                        <m:msub>
                           <m:mi>c</m:mi>
                           <m:mn>1</m:mn>
                        </m:msub>
                        <m:mo>,</m:mo>
                        <m:msub>
                           <m:mi>d</m:mi>
                           <m:mn>1</m:mn>
                        </m:msub>
                        <m:mo stretchy="false">]</m:mo>
                        <m:mo stretchy="false">)</m:mo>
                        <m:mo>,</m:mo>
                        <m:mn>...</m:mn>
                        <m:mo>,</m:mo>
                        <m:mo stretchy="false">(</m:mo>
                        <m:mo stretchy="false">[</m:mo>
                        <m:msub>
                           <m:mi>a</m:mi>
                           <m:mi>N</m:mi>
                        </m:msub>
                        <m:mo>,</m:mo>
                        <m:msub>
                           <m:mi>b</m:mi>
                           <m:mi>N</m:mi>
                        </m:msub>
                        <m:mo stretchy="false">]</m:mo>
                        <m:mo>,</m:mo>
                        <m:mo stretchy="false">[</m:mo>
                        <m:msub>
                           <m:mi>c</m:mi>
                           <m:mi>N</m:mi>
                        </m:msub>
                        <m:mo>,</m:mo>
                        <m:msub>
                           <m:mi>d</m:mi>
                           <m:mi>N</m:mi>
                        </m:msub>
                        <m:mo stretchy="false">]</m:mo>
                        <m:mo stretchy="false">)</m:mo>
                        <m:mo stretchy="false">]</m:mo>
                        <m:mo>=</m:mo>
                        <m:mstyle displaystyle="true">
                           <m:munderover>
                              <m:mo>&#8721;</m:mo>
                              <m:mrow>
                                 <m:mi>k</m:mi>
                                 <m:mo>=</m:mo>
                                 <m:mn>1</m:mn>
                              </m:mrow>
                              <m:mi>N</m:mi>
                           </m:munderover>
                           <m:mrow>
                              <m:mi mathvariant="script">S</m:mi>
                              <m:mo stretchy="false">(</m:mo>
                              <m:msub>
                                 <m:mi>s</m:mi>
                                 <m:mrow>
                                    <m:mo stretchy="false">[</m:mo>
                                    <m:msub>
                                       <m:mi>a</m:mi>
                                       <m:mi>k</m:mi>
                                    </m:msub>
                                    <m:mo>,</m:mo>
                                    <m:msub>
                                       <m:mi>b</m:mi>
                                       <m:mi>k</m:mi>
                                    </m:msub>
                                    <m:mo stretchy="false">]</m:mo>
                                 </m:mrow>
                              </m:msub>
                              <m:mo>,</m:mo>
                              <m:msub>
                                 <m:mi>t</m:mi>
                                 <m:mrow>
                                    <m:mo stretchy="false">[</m:mo>
                                    <m:msub>
                                       <m:mi>c</m:mi>
                                       <m:mi>k</m:mi>
                                    </m:msub>
                                    <m:mo>,</m:mo>
                                    <m:msub>
                                       <m:mi>d</m:mi>
                                       <m:mi>k</m:mi>
                                    </m:msub>
                                    <m:mo stretchy="false">]</m:mo>
                                 </m:mrow>
                              </m:msub>
                              <m:mo stretchy="false">)</m:mo>
                           </m:mrow>
                        </m:mstyle>
                     </m:mrow>
                     <m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFse=ucqGGBbWwcqGGOaakcqGGBbWwcqWGHbqydaWgaaWcbaGaeGymaedabeaakiabcYcaSiabdkgaInaaBaaaleaacqaIXaqmaeqaaOGaeiyxa0LaeiilaWIaei4waSLaem4yam2aaSbaaSqaaiabigdaXaqabaGccqGGSaalcqWGKbazdaWgaaWcbaGaeGymaedabeaakiabc2faDjabcMcaPiabcYcaSiabc6caUiabc6caUiabc6caUiabcYcaSiabcIcaOiabcUfaBjabdggaHnaaBaaaleaacqWGobGtaeqaaOGaeiilaWIaemOyai2aaSbaaSqaaiabd6eaobqabaGccqGGDbqxcqGGSaalcqGGBbWwcqWGJbWydaWgaaWcbaGaemOta4eabeaakiabcYcaSiabdsgaKnaaBaaaleaacqWGobGtaeqaaOGaeiyxa0LaeiykaKIaeiyxa0Laeyypa0ZaaabCaeaacqWFse=ucqGGOaakcqWGZbWCdaWgaaWcbaGaei4waSLaemyyae2aaSbaaWqaaiabdUgaRbqabaWccqGGSaalcqWGIbGydaWgaaadbaGaem4AaSgabeaaliabc2faDbqabaGccqGGSaalcqWG0baDdaWgaaWcbaGaei4waSLaem4yam2aaSbaaWqaaiabdUgaRbqabaWccqGGSaalcqWGKbazdaWgaaadbaGaem4AaSgabeaaliabc2faDbqabaGccqGGPaqkaSqaaiabdUgaRjabg2da9iabigdaXaqaaiabd6eaobqdcqGHris5aaaa@8817@</m:annotation>
                  </m:semantics>
               </m:math>
            </display-formula>
         </p>
         <p>As in classical alignment methods, we will consider in the following only additive scoring schemes, <it>i.e</it>. defined from a <inline-formula><m:math name="1748-7188-2-11-i8" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mi mathvariant="script">A</m:mi><m:mo>&#215;</m:mo><m:mi mathvariant="script">A</m:mi></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFaeFqcqGHxdaTcqWFaeFqaaa@3BEE@</m:annotation></m:semantics></m:math></inline-formula> substitution matrix <it>&#960;</it>, for all lengthes <it>l </it>and all pairs of sequences (<it>u, v</it>) &#8712; <inline-formula><m:math name="1748-7188-2-11-i3" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi mathvariant="script">A</m:mi><m:mi>l</m:mi></m:msup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFaeFqdaahaaWcbeqaaiabdYgaSbaaaaa@39AE@</m:annotation></m:semantics></m:math></inline-formula> &#215; <inline-formula><m:math name="1748-7188-2-11-i3" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi mathvariant="script">A</m:mi><m:mi>l</m:mi></m:msup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFaeFqdaahaaWcbeqaaiabdYgaSbaaaaa@39AE@</m:annotation></m:semantics></m:math></inline-formula>, by:</p>
         <p>
            <display-formula>
               <m:math name="1748-7188-2-11-i9" xmlns:m="http://www.w3.org/1998/Math/MathML">
                  <m:semantics>
                     <m:mrow>
                        <m:mi mathvariant="script">S</m:mi>
                        <m:mo stretchy="false">(</m:mo>
                        <m:mi>u</m:mi>
                        <m:mo>,</m:mo>
                        <m:mi>v</m:mi>
                        <m:mo stretchy="false">)</m:mo>
                        <m:mo>=</m:mo>
                        <m:mstyle displaystyle="true">
                           <m:munderover>
                              <m:mo>&#8721;</m:mo>
                              <m:mrow>
                                 <m:mi>j</m:mi>
                                 <m:mo>=</m:mo>
                                 <m:mn>1</m:mn>
                              </m:mrow>
                              <m:mi>l</m:mi>
                           </m:munderover>
                           <m:mrow>
                              <m:msub>
                                 <m:mi>&#960;</m:mi>
                                 <m:mrow>
                                    <m:mo stretchy="false">[</m:mo>
                                    <m:msub>
                                       <m:mi>u</m:mi>
                                       <m:mi>j</m:mi>
                                    </m:msub>
                                    <m:mo>,</m:mo>
                                    <m:msub>
                                       <m:mi>v</m:mi>
                                       <m:mi>j</m:mi>
                                    </m:msub>
                                    <m:mo stretchy="false">]</m:mo>
                                 </m:mrow>
                              </m:msub>
                           </m:mrow>
                        </m:mstyle>
                     </m:mrow>
                     <m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFse=ucqGGOaakcqWG1bqDcqGGSaalcqWG2bGDcqGGPaqkcqGH9aqpdaaeWbqaaGGaciab+b8aWnaaBaaaleaacqGGBbWwcqWG1bqDdaWgaaadbaGaemOAaOgabeaaliabcYcaSiabdAha2naaBaaameaacqWGQbGAaeqaaSGaeiyxa0fabeaaaeaacqWGQbGAcqGH9aqpcqaIXaqmaeaacqWGSbaBa0GaeyyeIuoaaaa@5110@</m:annotation>
                  </m:semantics>
               </m:math>
            </display-formula>
         </p>
         <p>The score of an empty diagonal (<it>l </it>= 0) is 0.</p>
         <p>The maximum of the scores over all the <it>N</it>-maps of <it>s </it>over <it>t </it>is noted <inline-formula><m:math name="1748-7188-2-11-i10" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#8499;</m:mi><m:mi>N</m:mi></m:msup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabd6eaobaaaaa@38E1@</m:annotation></m:semantics></m:math></inline-formula> (<it>s</it>, <it>t</it>):</p>
         <p>
            <display-formula>
               <m:math name="1748-7188-2-11-i11" xmlns:m="http://www.w3.org/1998/Math/MathML">
                  <m:semantics>
                     <m:mrow>
                        <m:msup>
                           <m:mi>&#8499;</m:mi>
                           <m:mi>N</m:mi>
                        </m:msup>
                        <m:mo stretchy="false">(</m:mo>
                        <m:mi>s</m:mi>
                        <m:mo>,</m:mo>
                        <m:mi>t</m:mi>
                        <m:mo stretchy="false">)</m:mo>
                        <m:mo>=</m:mo>
                        <m:munder>
                           <m:mrow>
                              <m:mi>max</m:mi>
                              <m:mo>&#8289;</m:mo>
                           </m:mrow>
                           <m:mrow>
                              <m:mi>&#915;</m:mi>
                              <m:mo>&#8712;</m:mo>
                              <m:msubsup>
                                 <m:mi>&#937;</m:mi>
                                 <m:mrow>
                                    <m:mo stretchy="false">(</m:mo>
                                    <m:mi>s</m:mi>
                                    <m:mo>,</m:mo>
                                    <m:mi>t</m:mi>
                                    <m:mo stretchy="false">)</m:mo>
                                 </m:mrow>
                                 <m:mi>N</m:mi>
                              </m:msubsup>
                           </m:mrow>
                        </m:munder>
                        <m:mi mathvariant="script">S</m:mi>
                        <m:mo stretchy="false">(</m:mo>
                        <m:mi>&#915;</m:mi>
                        <m:mo stretchy="false">)</m:mo>
                     </m:mrow>
                     <m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabd6eaobaakiabcIcaOiabdohaZjabcYcaSiabdsha0jabcMcaPiabg2da9maaxababaGagiyBa0MaeiyyaeMaeiiEaGhaleaacqqHtoWrcqGHiiIZcqqHPoWvdaqhaaadbaGaeiikaGIaem4CamNaeiilaWIaemiDaqNaeiykaKcabaGaemOta4eaaaWcbeaakiab=jr8tjabcIcaOiabfo5ahjabcMcaPaaa@540B@</m:annotation>
                  </m:semantics>
               </m:math>
            </display-formula>
         </p>
         <p>An <it>optimal N</it>-map of <it>s </it>over <it>t </it>is a <it>N</it>-map with score <inline-formula><m:math name="1748-7188-2-11-i10" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#8499;</m:mi><m:mi>N</m:mi></m:msup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabd6eaobaaaaa@38E1@</m:annotation></m:semantics></m:math></inline-formula> (<it>s</it>, <it>t</it>). By convention, a 0-map is the empty set and <inline-formula><m:math name="1748-7188-2-11-i12" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#8499;</m:mi><m:mn>0</m:mn></m:msup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabicdaWaaaaaa@38AA@</m:annotation></m:semantics></m:math></inline-formula> (<it>s</it>, <it>t</it>) = 0.</p>
         <p>Depending on whether the substitution matrix contains negative values or not, the optimal <it>N</it>-map is said to be local or global. These concepts are used by analogy with the case of alignment. When the matrix contains only non-negative values (global case), a corresponding optimal <it>N</it>-map of <it>s </it>over <it>t </it>will attempt to associate each position of <it>s </it>with a position of <it>t</it>, as in a global alignment. When the matrix contains some negative values (local case), the optimal <it>N</it>-map will be reached by considering only subparts of <it>s </it>which lead to a positive contribution of the total score when associated with a segment of <it>t</it>, once more as in local alignment. Basically, a global <it>N</it>-map of <it>s </it>over <it>t </it>spans the entire length of <it>s </it>(except possibly some boundary positions) while a local <it>N</it>-map identifies <it>N </it>non-overlapping segments of <it>s </it>with maximum scores against <it>t</it>.</p>
         <p>Some pathological situations could arise in the local case. In particular there could be some positions <it>i </it>of <it>s </it>such that <it>&#960; </it>[<it>s</it><sub><it>i</it></sub>, <it>t</it><sub><it>j</it></sub>] is negative for all positions <it>j </it>of <it>t</it>. Without considering empty diagonals, <inline-formula><m:math name="1748-7188-2-11-i10" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#8499;</m:mi><m:mi>N</m:mi></m:msup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabd6eaobaaaaa@38E1@</m:annotation></m:semantics></m:math></inline-formula> (<it>s</it>, <it>t</it>) would be not always growing with <it>N</it>.</p>
         <p>The current software implementation incorporates various substitution matrices in particular for amino acids (PAM, BLOSUM, <it>etc</it>.).</p>
         <p>For handling inversions, which is not allowed by Definition 1, it is first needed to extend this definition by adding a sign to the pair of intervals:</p>
         <p>&#8226; (+, [<it>a</it>, <it>b</it>], [<it>c</it>, <it>d</it>]) means that the positions [(<it>a</it>, <it>c</it>), (<it>a </it>+ 1, <it>c </it>+ 1),...] are associated (normal case),</p>
         <p>&#8226; (-, [<it>a</it>, <it>b</it>], [<it>c</it>, <it>d</it>]) means that the positions [(<it>a</it>, <it>d</it>), (<it>a </it>+ 1, <it>d </it>- 1),...] are associated (inversion case).</p>
         <p>Another required extension concerns the way of calculating the score for "reverse diagonals". This point depends on the nature of sequences. For instance in the case of DNA sequences, the score of (-, [<it>a</it>, <it>b</it>], [<it>c</it>, <it>d</it>]) is computed by summing the individual substitution scores of <it>s</it><sub>[<it>a</it>, <it>b</it>] </sub>against the complementary-reverse of <it>t</it><sub>[<it>c</it>, <it>d</it>]</sub>. If <it>s </it>and <it>t </it>are sequences of genes, this score is obtained by considering <it>s</it><sub>[<it>a</it>, <it>b</it>] </sub>against the reverse of <it>t</it><sub>[<it>c</it>, <it>d</it>]</sub>.</p>
      </sec>
      <sec>
         <st>
            <p>2 Algorithms</p>
         </st>
         <p>Given two sequences <it>s</it>, <it>t </it>and a positive integer <it>N</it>, we address two problems:</p>
         <p>&#8226; <b>Problem 1</b>: computing the optimal scores <inline-formula><m:math name="1748-7188-2-11-i13" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#8499;</m:mi><m:mi>K</m:mi></m:msup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabdUealbaaaaa@38DB@</m:annotation></m:semantics></m:math></inline-formula> (<it>s</it>, <it>t</it>) with <it>K </it>running from 1 to <it>N</it>.</p>
         <p>&#8226; <b>Problem 2</b>: outputting the diagonals of an optimal <it>N</it>-map.</p>
         <sec>
            <st>
               <p>Computing the optimal scores</p>
            </st>
            <p>Let Best<sub>[<it>i</it>, <it>j</it>, <it>K</it>] </sub>be the maximal score obtained by a <it>K</it>-map of <it>s</it><sub>[1, <it>i</it>] </sub>over <it>t ending at </it>(<it>i</it>, <it>j</it>), <it>i.e</it>. such that its last diagonal ([<it>a</it><sub><it>K</it></sub>, <it>b</it><sub><it>K</it></sub>], [<it>c</it><sub><it>K</it></sub>, <it>d</it><sub><it>K</it></sub>]) verifies <it>b</it><sub><it>K </it></sub>= <it>i </it>and <it>d</it><sub><it>K </it></sub>= <it>j</it>. By setting Best<sub>[0, <it>j</it>, <it>K</it>]</sub>, Best<sub>[<it>i</it>, 0 , <it>K</it>] </sub>and Best<sub>[<it>i</it>, <it>j</it>, 0] </sub>to 0 for all integers <it>i</it>, <it>j </it>and <it>K</it>, we have the following recurrence relation:</p>
            <p>
               <display-formula>
                  <m:math name="1748-7188-2-11-i14" xmlns:m="http://www.w3.org/1998/Math/MathML">
                     <m:semantics>
                        <m:mrow>
                           <m:msub>
                              <m:mrow>
                                 <m:mtext>Best</m:mtext>
                              </m:mrow>
                              <m:mrow>
                                 <m:mo stretchy="false">[</m:mo>
                                 <m:mi>i</m:mi>
                                 <m:mo>+</m:mo>
                                 <m:mn>1</m:mn>
                                 <m:mo>,</m:mo>
                                 <m:mi>j</m:mi>
                                 <m:mo>+</m:mo>
                                 <m:mn>1</m:mn>
                                 <m:mo>,</m:mo>
                                 <m:mi>K</m:mi>
                                 <m:mo stretchy="false">]</m:mo>
                              </m:mrow>
                           </m:msub>
                           <m:mo>=</m:mo>
                           <m:msub>
                              <m:mi>&#960;</m:mi>
                              <m:mrow>
                                 <m:mo stretchy="false">[</m:mo>
                                 <m:msub>
                                    <m:mi>s</m:mi>
                                    <m:mrow>
                                       <m:mi>i</m:mi>
                                       <m:mo>+</m:mo>
                                       <m:mn>1</m:mn>
                                    </m:mrow>
                                 </m:msub>
                                 <m:mo>,</m:mo>
                                 <m:msub>
                                    <m:mi>t</m:mi>
                                    <m:mrow>
                                       <m:mi>j</m:mi>
                                       <m:mo>+</m:mo>
                                       <m:mn>1</m:mn>
                                    </m:mrow>
                                 </m:msub>
                                 <m:mo stretchy="false">]</m:mo>
                              </m:mrow>
                           </m:msub>
                           <m:mo>+</m:mo>
                           <m:mi>max</m:mi>
                           <m:mo>&#8289;</m:mo>
                           <m:mrow>
                              <m:mo>{</m:mo>
                              <m:mrow>
                                 <m:mtext>Best</m:mtext>
                                 <m:msub>
                                    <m:malignmark/>
                                    <m:mrow>
                                       <m:mo stretchy="false">[</m:mo>
                                       <m:mi>i</m:mi>
                                       <m:mo>,</m:mo>
                                       <m:mi>j</m:mi>
                                       <m:mo>,</m:mo>
                                       <m:mi>K</m:mi>
                                       <m:mo stretchy="false">]</m:mo>
                                    </m:mrow>
                                 </m:msub>
                                 <m:mo>,</m:mo>
                                 <m:munder>
                                    <m:mrow>
                                       <m:mi>max</m:mi>
                                       <m:mo>&#8289;</m:mo>
                                    </m:mrow>
                                    <m:mrow>
                                       <m:mi>k</m:mi>
                                       <m:mo>&#8804;</m:mo>
                                       <m:mi>i</m:mi>
                                       <m:mo>,</m:mo>
                                       <m:mi>l</m:mi>
                                       <m:mo>&#8804;</m:mo>
                                       <m:mrow>
                                          <m:mo>|</m:mo>
                                          <m:mi>t</m:mi>
                                          <m:mo>|</m:mo>
                                       </m:mrow>
                                    </m:mrow>
                                 </m:munder>
                                 <m:msub>
                                    <m:mrow>
                                       <m:mtext>Best</m:mtext>
                                    </m:mrow>
                                    <m:mrow>
                                       <m:mo stretchy="false">[</m:mo>
                                       <m:mi>k</m:mi>
                                       <m:mo>,</m:mo>
                                       <m:mi>l</m:mi>
                                       <m:mo>,</m:mo>
                                       <m:mi>K</m:mi>
                                       <m:mo>&#8722;</m:mo>
                                       <m:mn>1</m:mn>
                                       <m:mo stretchy="false">]</m:mo>
                                    </m:mrow>
                                 </m:msub>
                              </m:mrow>
                              <m:mo>}</m:mo>
                           </m:mrow>
                           <m:malignmark/>
                        </m:mrow>
                        <m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqqGcbGqcqqGLbqzcqqGZbWCcqqG0baDdaWgaaWcbaGaei4waSLaemyAaKMaey4kaSIaeGymaeJaeiilaWIaemOAaOMaey4kaSIaeGymaeJaeiilaWIaem4saSKaeiyxa0fabeaakiabg2da9GGaciab=b8aWnaaBaaaleaacqGGBbWwcqWGZbWCdaWgaaadbaGaemyAaKMaey4kaSIaeGymaedabeaaliabcYcaSiabdsha0naaBaaameaacqWGQbGAcqGHRaWkcqaIXaqmaeqaaSGaeiyxa0fabeaakiabgUcaRiGbc2gaTjabcggaHjabcIha4naacmaabaGaeeOqaiKaeeyzauMaee4CamNaeeiDaqNaaCjaVpaaBaaaleaacqGGBbWwcqWGPbqAcqGGSaalcqWGQbGAcqGGSaalcqWGlbWscqGGDbqxaeqaaOGaeiilaWYaaCbeaeaacyGGTbqBcqGGHbqycqGG4baEaSqaaiabdUgaRjabgsMiJkabdMgaPjabcYcaSiabdYgaSjabgsMiJoaaemaabaGaemiDaqhacaGLhWUaayjcSdaabeaakiabbkeacjabbwgaLjabbohaZjabbsha0naaBaaaleaacqGGBbWwcqWGRbWAcqGGSaalcqWGSbaBcqGGSaalcqWGlbWscqGHsislcqaIXaqmcqGGDbqxaeqaaaGccaGL7bGaayzFaaGaaCjaVdaa@875A@</m:annotation>
                     </m:semantics>
                  </m:math>
               </display-formula>
            </p>
            <p>The correctness of this relation is straightforwardly proved by induction. Let us consider the maximum involved in the right part of this equation. It is equal to:</p>
            <p>&#8226; Best<sub>[<it>i</it>, <it>j</it>, <it>K</it>]</sub>, if the greatest score is obtained by incrementing the length of the last diagonal of an optimal <it>K</it>-map of <it>s</it><sub>[1, <it>i</it>] </sub>over <it>t </it>ending at (<it>i</it>, <it>j</it>) &#8211; then the last diagonal will end at (<it>i </it>+ 1, <it>j </it>+ 1).</p>
            <p>&#8226; <inline-formula><m:math name="1748-7188-2-11-i15" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:munder><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo></m:mrow><m:mrow><m:mi>k</m:mi><m:mo>&#8804;</m:mo><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>l</m:mi><m:mo>&#8804;</m:mo><m:mi>j</m:mi></m:mrow></m:munder><m:msub><m:mrow><m:mtext>Best</m:mtext></m:mrow><m:mrow><m:mo stretchy="false">[</m:mo><m:mi>k</m:mi><m:mo>,</m:mo><m:mi>l</m:mi><m:mo>,</m:mo><m:mi>K</m:mi><m:mo>&#8722;</m:mo><m:mn>1</m:mn><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaadaWfqaqaaiGbc2gaTjabcggaHjabcIha4bWcbaGaem4AaSMaeyizImQaemyAaKMaeiilaWIaemiBaWMaeyizImQaemOAaOgabeaakiabbkeacjabbwgaLjabbohaZjabbsha0naaBaaaleaacqGGBbWwcqWGRbWAcqGGSaalcqWGSbaBcqGGSaalcqWGlbWscqGHsislcqaIXaqmcqGGDbqxaeqaaaaa@4A37@</m:annotation></m:semantics></m:math></inline-formula>, if the greatest score is obtained by adding the diagonal of length 1 ([<it>i </it>+ 1, <it>i </it>+ 1], [<it>j </it>+ 1, <it>j </it>+ 1]) to an optimal (<it>K </it>- 1)-map of <it>s</it><sub>[1, <it>i</it>] </sub>over <it>t</it>.</p>
            <p>To compute the entries of Best referred to the index (<it>i </it>+ 1), we only need to know the entries referred to the index <it>i</it>. Thus computing the optimal scores of all the <it>K</it>-maps of <it>s </it>over <it>t</it>, with <it>K </it>from 1 to <it>N</it>, can be done in <it>O </it>(|<it>s</it>| &#215; |<it>t</it>| &#215; <it>N</it>) time using <it>O </it>(|<it>t</it>| &#215; <it>N</it>) memory space to store the dynamic programming variables. We can introduce now the formal algorithm <b>Alg_1 </b>which solves the problem of computing the optimal scores for global or local <it>N</it>-maps without inversion.</p>
            <p>Algorithm <b>Alg_1 </b>takes as input two sequences <it>s</it>, <it>t </it>and a number of parts <it>N </it>and returns:</p>
            <p>&#8226; B<sub>s </sub>and B<sub>l</sub>, two |<it>t</it>| &#215; <it>N </it>matrices where the entry B<sub>s[<it>j</it>, <it>K</it>] </sub>contains the maximal score of a <it>K</it>-map of <it>s </it>over <it>t </it>ending at (|<it>s</it>|, <it>j</it>) &#8211; with the preceding notations B<sub>s[<it>j</it>, <it>K</it>] </sub>= Best<sub>[|<it>s</it>|, <it>j</it>, <it>K</it>] </sub>&#8211; and the entry B<sub>l[<it>j</it>, <it>K</it>] </sub>stores the length of the last diagonal of a <it>K</it>-map ending at (|<it>s</it>|, <it>j</it>) with score B<sub>s[<it>j</it>, <it>K</it>]</sub>;</p>
            <p>&#8226; M<sub>s </sub>and M<sub>d</sub>, two arrays of size <it>N </it>where the entry M<sub>s[<it>K</it>] </sub>stores the optimal score of a <it>K</it>-map of <it>s </it>over <it>t </it>&#8211; with the preceding notations M<sub>s[<it>K</it>] </sub>= <inline-formula><m:math name="1748-7188-2-11-i13" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#8499;</m:mi><m:mi>K</m:mi></m:msup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabdUealbaaaaa@38DB@</m:annotation></m:semantics></m:math></inline-formula> (<it>s</it>, <it>t</it>) = max<sub><it>q </it>&#8804; |<it>s</it>|, <it>p </it>&#8804; |<it>t</it>| </sub>Best<sub>[<it>q</it>, <it>p</it>, <it>K</it>] </sub>&#8211; and the entry M<sub>d[<it>K</it>] </sub>stores the last diagonal of a <it>K</it>-map with score M<sub>s[<it>K</it>]</sub>.</p>
            <p>The correctness of Algorithm <b>Alg_1 </b>is proved by induction over the positions of <it>s</it>. The time and memory space complexities are straightforwardly analyzed.</p>
            <p>The variables B<sub>l </sub>and M<sub>d </sub>are not involved in the computation of the maximal scores of <it>K</it>-maps for 1 &#8804; <it>K </it>&#8804; <it>N </it>(they will be used by the algorithm in charge of outputting the diagonals). If we are only interested in solving Problem 1, these variables as well as the lines 7, 10, 14 and 19 can be deleted. Algorithm <b>Alg_1 </b>will still return the optimal scores of <it>K</it>-maps with 0 &#8804; <it>K </it>&#8804; <it>N </it>in the array M<sub>s</sub>.</p>
            <p><b>Algorithm 1 Alg_1 </b>(<it>s</it>, <it>t</it>, <it>N</it>, B<sub>s</sub>, B<sub>l</sub>, M<sub>s</sub>, M<sub>d</sub>)</p>
            <p>1: B<sub>s[<it>j</it>, <it>K</it>] </sub>&#8592; 0 ; B<sub>l[<it>j</it>, <it>K</it>] </sub>&#8592; 0 ; M<sub>s[<it>K</it>] </sub>&#8592; 0 ; M<sub>d[<it>K</it>] </sub>&#8592; NULL ; (<it>j </it>= 0 ... |<it>t</it>|, <it>K </it>= 0 ... <it>N</it>)</p>
            <p>2: <b>for </b><it>i </it>= 1 <b>to </b>|<it>s</it>| <b>do</b></p>
            <p>3:&#160;&#160;&#160;<b>for </b><it>j </it>= 1 <b>to </b>|<it>t</it>| <b>do</b></p>
            <p>4:&#160;&#160;&#160;&#160;&#160;&#160;<b>for </b><it>K </it>= <it>N </it><b>to </b>1 <b>do</b></p>
            <p>5:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<b>if </b>B<sub>s[<it>j</it>-1, <it>K</it>] </sub>&#8805; M<sub>s[<it>k</it>-1] </sub><b>then</b></p>
            <p>6:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<inline-formula><m:math name="1748-7188-2-11-i16" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mtext>B</m:mtext><m:mo>&#8242;</m:mo></m:msup><m:mrow><m:mtext>s</m:mtext><m:mo stretchy="false">[</m:mo><m:mi>j</m:mi><m:mo>,</m:mo><m:mi>K</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuqGcbGqgaqbamaaBaaaleaacqqGZbWCcqGGBbWwcqWGQbGAcqGGSaalcqWGlbWscqGGDbqxaeqaaaaa@3538@</m:annotation></m:semantics></m:math></inline-formula> &#8592; <it>&#960;</it><sub>[<it>s</it><sub><it>i</it></sub>, <it>t</it><sub><it>j</it></sub>] </sub>+ B<sub>s[<it>j</it>-1, <it>K</it>] </sub>;</p>
            <p>7:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<inline-formula><m:math name="1748-7188-2-11-i17" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mtext>B</m:mtext><m:mo>&#8242;</m:mo></m:msup><m:mrow><m:mtext>l</m:mtext><m:mo stretchy="false">[</m:mo><m:mi>j</m:mi><m:mo>,</m:mo><m:mi>K</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuqGcbGqgaqbamaaBaaaleaacqqGSbaBcqGGBbWwcqWGQbGAcqGGSaalcqWGlbWscqGGDbqxaeqaaaaa@352A@</m:annotation></m:semantics></m:math></inline-formula> &#8592; B<sub>l[<it>j</it>-1, <it>K</it>] </sub>+ 1 ;</p>
            <p>8:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<b>else</b></p>
            <p>9:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<inline-formula><m:math name="1748-7188-2-11-i16" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mtext>B</m:mtext><m:mo>&#8242;</m:mo></m:msup><m:mrow><m:mtext>s</m:mtext><m:mo stretchy="false">[</m:mo><m:mi>j</m:mi><m:mo>,</m:mo><m:mi>K</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuqGcbGqgaqbamaaBaaaleaacqqGZbWCcqGGBbWwcqWGQbGAcqGGSaalcqWGlbWscqGGDbqxaeqaaaaa@3538@</m:annotation></m:semantics></m:math></inline-formula> &#8592; <it>&#960;</it><sub>[<it>s</it><sub><it>i</it></sub>, <it>t</it><sub><it>j</it></sub>] </sub>+ M<sub>s[<it>K</it>-1] </sub>;</p>
            <p>10:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<inline-formula><m:math name="1748-7188-2-11-i17" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mtext>B</m:mtext><m:mo>&#8242;</m:mo></m:msup><m:mrow><m:mtext>l</m:mtext><m:mo stretchy="false">[</m:mo><m:mi>j</m:mi><m:mo>,</m:mo><m:mi>K</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuqGcbGqgaqbamaaBaaaleaacqqGSbaBcqGGBbWwcqWGQbGAcqGGSaalcqWGlbWscqGGDbqxaeqaaaaa@352A@</m:annotation></m:semantics></m:math></inline-formula> &#8592; 1;</p>
            <p>11:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<b>end if</b></p>
            <p>12:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<b>if </b><inline-formula><m:math name="1748-7188-2-11-i16" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mtext>B</m:mtext><m:mo>&#8242;</m:mo></m:msup><m:mrow><m:mtext>s</m:mtext><m:mo stretchy="false">[</m:mo><m:mi>j</m:mi><m:mo>,</m:mo><m:mi>K</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuqGcbGqgaqbamaaBaaaleaacqqGZbWCcqGGBbWwcqWGQbGAcqGGSaalcqWGlbWscqGGDbqxaeqaaaaa@3538@</m:annotation></m:semantics></m:math></inline-formula> &#8805; M<sub>s[<it>K</it>] </sub><b>then</b></p>
            <p>13:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;M<sub>s[<it>K</it>] </sub>&#8592; <inline-formula><m:math name="1748-7188-2-11-i16" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mtext>B</m:mtext><m:mo>&#8242;</m:mo></m:msup><m:mrow><m:mtext>s</m:mtext><m:mo stretchy="false">[</m:mo><m:mi>j</m:mi><m:mo>,</m:mo><m:mi>K</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuqGcbGqgaqbamaaBaaaleaacqqGZbWCcqGGBbWwcqWGQbGAcqGGSaalcqWGlbWscqGGDbqxaeqaaaaa@3538@</m:annotation></m:semantics></m:math></inline-formula> ;</p>
            <p>14:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;M<sub>d[<it>K</it>] </sub>&#8592; ([<it>i </it>- <inline-formula><m:math name="1748-7188-2-11-i17" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mtext>B</m:mtext><m:mo>&#8242;</m:mo></m:msup><m:mrow><m:mtext>l</m:mtext><m:mo stretchy="false">[</m:mo><m:mi>j</m:mi><m:mo>,</m:mo><m:mi>K</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuqGcbGqgaqbamaaBaaaleaacqqGSbaBcqGGBbWwcqWGQbGAcqGGSaalcqWGlbWscqGGDbqxaeqaaaaa@352A@</m:annotation></m:semantics></m:math></inline-formula> + 1, <it>i</it>], [<it>j </it>- <inline-formula><m:math name="1748-7188-2-11-i17" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mtext>B</m:mtext><m:mo>&#8242;</m:mo></m:msup><m:mrow><m:mtext>l</m:mtext><m:mo stretchy="false">[</m:mo><m:mi>j</m:mi><m:mo>,</m:mo><m:mi>K</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuqGcbGqgaqbamaaBaaaleaacqqGSbaBcqGGBbWwcqWGQbGAcqGGSaalcqWGlbWscqGGDbqxaeqaaaaa@352A@</m:annotation></m:semantics></m:math></inline-formula> + 1, <it>j</it>]) ;</p>
            <p>15:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<b>end if</b></p>
            <p>16:&#160;&#160;&#160;&#160;&#160;&#160;<b>end for</b></p>
            <p>17:&#160;&#160;&#160;<b>end for</b></p>
            <p>18:&#160;&#160;&#160;<b>swap </b>(B<sub>s</sub>, <inline-formula><m:math name="1748-7188-2-11-i18" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mtext>B</m:mtext><m:mo>&#8242;</m:mo></m:msup><m:mtext>s</m:mtext></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuqGcbGqgaqbamaaBaaaleaacqqGZbWCaeqaaaaa@2F5C@</m:annotation></m:semantics></m:math></inline-formula>) ;</p>
            <p>19:&#160;&#160;&#160;<b>swap </b>(B<sub>l</sub>, <inline-formula><m:math name="1748-7188-2-11-i19" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mtext>B</m:mtext><m:mo>&#8242;</m:mo></m:msup><m:mtext>l</m:mtext></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuqGcbGqgaqbamaaBaaaleaacqqGSbaBaeqaaaaa@2F4E@</m:annotation></m:semantics></m:math></inline-formula>) ;</p>
            <p>20: <b>end for</b></p>
            <p><b>Theorem 1 </b><it>Algorithm </it><b>Alg_1 </b><it>computes the optimal score of the K-maps of a sequence s over a sequence t, for K from </it>1 <it>to N, in time O </it>(|<it>s</it>| &#215; |<it>t</it>| &#215; <it>N</it>) <it>using O </it>(|<it>s</it>| + |<it>t</it>| &#215; <it>N</it>) <it>memory space</it>.</p>
         </sec>
         <sec>
            <st>
               <p>Outputting the diagonals of an optimal <it>N</it>-map</p>
            </st>
            <p>Before presenting the formal algorithm, we need to introduce some additional notations and results about "dividing maps".</p>
            <p>We say that a position <it>m </it>of <it>s </it>is <it>inside a diagonal </it>of a <it>N</it>-map &#915; if there is a diagonal ([<it>a</it>, <it>b</it>], [<it>c</it>, <it>d</it>]) &#8712; &#915; such that <it>a </it>&#8804; <it>m </it>&lt;<it>b </it>(Figure <figr fid="F2">2a</figr>). This notion excludes two cases:</p>
            <p>1. when <it>m </it>is not contained by any diagonal (this is usual with local <it>N</it>-maps),</p>
            <p>2. when a diagonal is exactly ending at <it>m </it>in its first interval.</p>
            <p>We denote as <inline-formula><m:math name="1748-7188-2-11-i20" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mrow><m:mover accent="true"><m:mrow><m:mtext>Best</m:mtext></m:mrow><m:mo stretchy="true">&#175;</m:mo></m:mover></m:mrow><m:mrow><m:mo stretchy="false">[</m:mo><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi><m:mo>,</m:mo><m:mi>K</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaadaqdaaqaaiabbkeacjabbwgaLjabbohaZjabbsha0baadaWgaaWcbaGaei4waSLaemyAaKMaeiilaWIaemOAaOMaeiilaWIaem4saSKaeiyxa0fabeaaaaa@3A38@</m:annotation></m:semantics></m:math></inline-formula> the maximal score obtained by a <it>K</it>-map of <it>s</it><sub>[<it>i</it>,|<it>s</it>|] </sub>over <it>t</it><sub>[<it>j</it>,|<it>t</it>|] </sub><it>starting at </it>(<it>i</it>, <it>j</it>), <it>i.e</it>. such that its first diagonal ([<it>a</it><sub>1</sub>, <it>b</it><sub>1</sub>], [<it>c</it><sub>1</sub>, <it>d</it><sub>1</sub>]) verifies <it>a</it><sub>1 </sub>= <it>i </it>and <it>c</it><sub>1 </sub>= <it>j</it>.</p>
            <p><b>Lemma 1 </b><it>Let s and t be two sequences, m a position of s and N a positive integer. The optimal score of a N-map </it><inline-formula><m:math name="1748-7188-2-11-i10" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#8499;</m:mi><m:mi>N</m:mi></m:msup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabd6eaobaaaaa@38E1@</m:annotation></m:semantics></m:math></inline-formula> (<it>s</it>, <it>t</it>) <it>is equal to the maximum of the two following quantities:</it></p>
            <p>
               <display-formula>&#8226; <m:math name="1748-7188-2-11-i21" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi mathvariant="script">Q</m:mi><m:mn>1</m:mn></m:msub><m:mo>=</m:mo><m:munder><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo></m:mrow><m:mrow><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:mi>K</m:mi><m:mo>&#8804;</m:mo><m:mi>N</m:mi><m:mo>;</m:mo><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:mi>p</m:mi><m:mo>&lt;</m:mo><m:mrow><m:mo>|</m:mo><m:mi>t</m:mi><m:mo>|</m:mo></m:mrow></m:mrow></m:munder><m:mo>{</m:mo><m:msub><m:mrow><m:mtext>Best</m:mtext></m:mrow><m:mrow><m:mo stretchy="false">[</m:mo><m:mi>m</m:mi><m:mo>,</m:mo><m:mi>p</m:mi><m:mo>,</m:mo><m:mi>K</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub><m:mo>+</m:mo><m:msub><m:mrow><m:mover accent="true"><m:mrow><m:mtext>Best</m:mtext></m:mrow><m:mo stretchy="true">&#175;</m:mo></m:mover></m:mrow><m:mrow><m:mo stretchy="false">[</m:mo><m:mi>m</m:mi><m:mo>+</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mi>p</m:mi><m:mo>+</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mi>N</m:mi><m:mo>&#8722;</m:mo><m:mi>K</m:mi><m:mo>+</m:mo><m:mn>1</m:mn><m:mo stretchy="false">]</m:mo></m:mrow></m:msub><m:mo>}</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFqeFudaWgaaWcbaGaeGymaedabeaakiabg2da9maaxababaGagiyBa0MaeiyyaeMaeiiEaGhaleaacqaIXaqmcqGHKjYOcqWGlbWscqGHKjYOcqWGobGtcqGG7aWocqaIXaqmcqGHKjYOcqWGWbaCcqGH8aapdaabdaqaaiabdsha0bGaay5bSlaawIa7aaqabaGccqGG7bWEcqqGcbGqcqqGLbqzcqqGZbWCcqqG0baDdaWgaaWcbaGaei4waSLaemyBa0MaeiilaWIaemiCaaNaeiilaWIaem4saSKaeiyxa0fabeaakiabgUcaRmaanaaabaGaeeOqaiKaeeyzauMaee4CamNaeeiDaqhaamaaBaaaleaacqGGBbWwcqWGTbqBcqGHRaWkcqaIXaqmcqGGSaalcqWGWbaCcqGHRaWkcqaIXaqmcqGGSaalcqWGobGtcqGHsislcqWGlbWscqGHRaWkcqaIXaqmcqGGDbqxaeqaaOGaeiyFa0haaa@76C3@</m:annotation></m:semantics></m:math></display-formula>
            </p>
            <p>
               <display-formula>&#8226; <m:math name="1748-7188-2-11-i22" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi mathvariant="script">Q</m:mi><m:mn>2</m:mn></m:msub><m:mo>=</m:mo><m:munder><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo></m:mrow><m:mrow><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:mi>K</m:mi><m:mo>&#8804;</m:mo><m:mi>N</m:mi></m:mrow></m:munder><m:mo>{</m:mo><m:msup><m:mi>&#8499;</m:mi><m:mi>K</m:mi></m:msup><m:mo stretchy="false">(</m:mo><m:msub><m:mi>s</m:mi><m:mrow><m:mo stretchy="false">[</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mi>m</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub><m:mo>,</m:mo><m:mi>t</m:mi><m:mo stretchy="false">)</m:mo><m:mo>+</m:mo><m:msup><m:mi>&#8499;</m:mi><m:mrow><m:mi>N</m:mi><m:mo>&#8722;</m:mo><m:mi>K</m:mi></m:mrow></m:msup><m:mo stretchy="false">(</m:mo><m:msub><m:mi>s</m:mi><m:mrow><m:mo stretchy="false">[</m:mo><m:mi>m</m:mi><m:mo>+</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mo>|</m:mo><m:mi>s</m:mi><m:mo>|</m:mo><m:mo stretchy="false">]</m:mo></m:mrow></m:msub><m:mo>,</m:mo><m:mi>t</m:mi><m:mo stretchy="false">)</m:mo><m:mo>}</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFqeFudaWgaaWcbaGaeGOmaidabeaakiabg2da9maaxababaGagiyBa0MaeiyyaeMaeiiEaGhaleaacqaIXaqmcqGHKjYOcqWGlbWscqGHKjYOcqWGobGtaeqaaOGaei4EaSNae83mH00aaWbaaSqabeaaieGacqGFlbWsaaGccqGGOaakcqWGZbWCdaWgaaWcbaGaei4waSLaeGymaeJaeiilaWIaemyBa0Maeiyxa0fabeaakiabcYcaSiabdsha0jabcMcaPiabgUcaRiab=ntinnaaCaaaleqabaGaemOta4KaeyOeI0Iaem4saSeaaOGaeiikaGIaem4Cam3aaSbaaSqaaiabcUfaBjabd2gaTjabgUcaRiabigdaXiabcYcaSiabcYha8jabdohaZjabcYha8jabc2faDbqabaGccqGGSaalcqWG0baDcqGGPaqkcqGG9bqFaaa@6C6E@</m:annotation></m:semantics></m:math></display-formula>
            </p>
            <p><b>Proof: </b>Let &#915; = [([<it>a</it><sub>1</sub>, <it>b</it><sub>1</sub>], [<it>c</it><sub>1</sub>, <it>d</it><sub>1</sub>]), ..., ([<it>a</it><sub><it>N</it></sub>, <it>b</it><sub><it>N</it></sub>], [<it>c</it><sub><it>N</it></sub>, <it>d</it><sub><it>N</it></sub>])] be a <it>N</it>-map of <it>s </it>over <it>t </it>with score <inline-formula><m:math name="1748-7188-2-11-i10" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#8499;</m:mi><m:mi>N</m:mi></m:msup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabd6eaobaaaaa@38E1@</m:annotation></m:semantics></m:math></inline-formula> (<it>s</it>, <it>t</it>). There are two possibilities: either the position <it>m </it>is inside a diagonal <it>K </it>of &#915;, or not. In the first case, there are a <it>K</it>-map &#915;<it>' </it>ending at [<it>m</it>, <it>c</it><sub><it>K </it></sub>+ <it>m </it>- <it>a</it><sub><it>K</it></sub>] and a (<it>N </it>- <it>K </it>+ 1)-map &#915;<it>" </it>starting at position [<it>m </it>+ 1, <it>c</it><sub><it>K </it></sub>+ <it>m </it>- <it>a</it><sub><it>K </it></sub>+ 1] such that <inline-formula><m:math name="1748-7188-2-11-i23" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mi mathvariant="script">S</m:mi><m:mo stretchy="false">(</m:mo><m:msup><m:mi>&#915;</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mo stretchy="false">)</m:mo><m:mo>+</m:mo><m:mi mathvariant="script">S</m:mi><m:mo stretchy="false">(</m:mo><m:msup><m:mi>&#915;</m:mi><m:mo>&#8243;</m:mo></m:msup><m:mo stretchy="false">)</m:mo><m:mo>=</m:mo><m:msup><m:mi>&#8499;</m:mi><m:mi>N</m:mi></m:msup><m:mo stretchy="false">(</m:mo><m:mi>s</m:mi><m:mo>,</m:mo><m:mi>t</m:mi><m:mo stretchy="false">)</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFse=ucqGGOaakcuqHtoWrgaqbaiabcMcaPiabgUcaRiab=jr8tjabcIcaOiqbfo5ahzaagaGaeiykaKIaeyypa0Jae83mH00aaWbaaSqabeaacqWGobGtaaGccqGGOaakcqWGZbWCcqGGSaalcqWG0baDcqGGPaqkaaa@4A48@</m:annotation></m:semantics></m:math></inline-formula>, which implies <inline-formula><m:math name="1748-7188-2-11-i24" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#8499;</m:mi><m:mi>N</m:mi></m:msup><m:mo stretchy="false">(</m:mo><m:mi>s</m:mi><m:mo>,</m:mo><m:mi>t</m:mi><m:mo stretchy="false">)</m:mo><m:mo>&#8804;</m:mo><m:msub><m:mi mathvariant="script">Q</m:mi><m:mn>1</m:mn></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabd6eaobaakiabcIcaOiabdohaZjabcYcaSiabdsha0jabcMcaPiabgsMiJkab=br8rnaaBaaaleaacqaIXaqmaeqaaaaa@4305@</m:annotation></m:semantics></m:math></inline-formula>. In the second case, let <it>K </it>be such that <it>m </it>= <it>b</it><sub><it>K </it></sub>or <it>b</it><sub><it>K </it></sub>&lt;<it>m </it>&lt;<it>a</it><sub><it>K</it>+1</sub>. There is a <it>K</it>-map &#915;<it>' </it>of <it>s</it><sub>[1, <it>m</it>] </sub>over <it>t </it>and a (<it>N </it>- <it>K</it>)-map &#915;<it>" </it>of <it>s</it><sub>[<it>m</it>+1,|<it>s</it>|] </sub>over <it>t </it>such that <inline-formula><m:math name="1748-7188-2-11-i23" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mi mathvariant="script">S</m:mi><m:mo stretchy="false">(</m:mo><m:msup><m:mi>&#915;</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mo stretchy="false">)</m:mo><m:mo>+</m:mo><m:mi mathvariant="script">S</m:mi><m:mo stretchy="false">(</m:mo><m:msup><m:mi>&#915;</m:mi><m:mo>&#8243;</m:mo></m:msup><m:mo stretchy="false">)</m:mo><m:mo>=</m:mo><m:msup><m:mi>&#8499;</m:mi><m:mi>N</m:mi></m:msup><m:mo stretchy="false">(</m:mo><m:mi>s</m:mi><m:mo>,</m:mo><m:mi>t</m:mi><m:mo stretchy="false">)</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFse=ucqGGOaakcuqHtoWrgaqbaiabcMcaPiabgUcaRiab=jr8tjabcIcaOiqbfo5ahzaagaGaeiykaKIaeyypa0Jae83mH00aaWbaaSqabeaacqWGobGtaaGccqGGOaakcqWGZbWCcqGGSaalcqWG0baDcqGGPaqkaaa@4A48@</m:annotation></m:semantics></m:math></inline-formula>, which implies <inline-formula><m:math name="1748-7188-2-11-i25" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#8499;</m:mi><m:mi>N</m:mi></m:msup><m:mo stretchy="false">(</m:mo><m:mi>s</m:mi><m:mo>,</m:mo><m:mi>t</m:mi><m:mo stretchy="false">)</m:mo><m:mo>&#8804;</m:mo><m:msub><m:mi mathvariant="script">Q</m:mi><m:mn>2</m:mn></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabd6eaobaakiabcIcaOiabdohaZjabcYcaSiabdsha0jabcMcaPiabgsMiJkab=br8rnaaBaaaleaacqaIYaGmaeqaaaaa@4307@</m:annotation></m:semantics></m:math></inline-formula>. In both cases, <inline-formula><m:math name="1748-7188-2-11-i10" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#8499;</m:mi><m:mi>N</m:mi></m:msup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabd6eaobaaaaa@38E1@</m:annotation></m:semantics></m:math></inline-formula> (<it>s</it>, <it>t</it>) is smaller than max{<inline-formula><m:math name="1748-7188-2-11-i26" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi mathvariant="script">Q</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi mathvariant="script">Q</m:mi><m:mn>2</m:mn></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFqeFudaWgaaWcbaGaeGymaedabeaakiabcYcaSiab=br8rnaaBaaaleaacqaIYaGmaeqaaaaa@3D3B@</m:annotation></m:semantics></m:math></inline-formula>}.</p>
            <p>On the other hand, for all integers 1 &#8804; <it>K </it>&#8804; <it>N</it>, for all positions 1 &#8804; <it>p </it>&lt; |<it>t</it>|, for all <it>K</it>-maps <inline-formula><m:math name="1748-7188-2-11-i27" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#915;</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mo>=</m:mo><m:mo stretchy="false">[</m:mo><m:mo stretchy="false">(</m:mo><m:mo stretchy="false">[</m:mo><m:msub><m:msup><m:mi>a</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:msup><m:mi>b</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mn>1</m:mn></m:msub><m:mo stretchy="false">]</m:mo><m:mo>,</m:mo><m:mo stretchy="false">[</m:mo><m:msub><m:msup><m:mi>c</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:msup><m:mi>d</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mn>1</m:mn></m:msub><m:mo stretchy="false">]</m:mo><m:mo stretchy="false">)</m:mo><m:mo>,</m:mo><m:mn>...</m:mn><m:mo>,</m:mo><m:mo stretchy="false">(</m:mo><m:mo stretchy="false">[</m:mo><m:msub><m:msup><m:mi>a</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>K</m:mi></m:msub><m:mo>,</m:mo><m:mi>m</m:mi><m:mo stretchy="false">]</m:mo><m:mo>,</m:mo><m:mo stretchy="false">[</m:mo><m:msub><m:msup><m:mi>c</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>K</m:mi></m:msub><m:mo>,</m:mo><m:mi>p</m:mi><m:mo stretchy="false">]</m:mo><m:mo stretchy="false">)</m:mo><m:mo stretchy="false">]</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuqHtoWrgaqbaiabg2da9iabcUfaBjabcIcaOiabcUfaBjqbdggaHzaafaWaaSbaaSqaaiabigdaXaqabaGccqGGSaalcuWGIbGygaqbamaaBaaaleaacqaIXaqmaeqaaOGaeiyxa0LaeiilaWIaei4waSLafm4yamMbauaadaWgaaWcbaGaeGymaedabeaakiabcYcaSiqbdsgaKzaafaWaaSbaaSqaaiabigdaXaqabaGccqGGDbqxcqGGPaqkcqGGSaalcqGGUaGlcqGGUaGlcqGGUaGlcqGGSaalcqGGOaakcqGGBbWwcuWGHbqygaqbamaaBaaaleaacqWGlbWsaeqaaOGaeiilaWIaemyBa0Maeiyxa0LaeiilaWIaei4waSLafm4yamMbauaadaWgaaWcbaGaem4saSeabeaakiabcYcaSiabdchaWjabc2faDjabcMcaPiabc2faDbaa@5ADE@</m:annotation></m:semantics></m:math></inline-formula> and for all (<it>N </it>- <it>K </it>+ 1)-maps <inline-formula><m:math name="1748-7188-2-11-i28" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#915;</m:mi><m:mo>&#8243;</m:mo></m:msup><m:mo>=</m:mo><m:mo stretchy="false">[</m:mo><m:mo stretchy="false">(</m:mo><m:mo stretchy="false">[</m:mo><m:mi>m</m:mi><m:mo>+</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:msub><m:msup><m:mi>b</m:mi><m:mo>&#8243;</m:mo></m:msup><m:mn>1</m:mn></m:msub><m:mo stretchy="false">]</m:mo><m:mo>,</m:mo><m:mo stretchy="false">[</m:mo><m:mi>p</m:mi><m:mo>+</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:msub><m:msup><m:mi>d</m:mi><m:mo>&#8243;</m:mo></m:msup><m:mn>1</m:mn></m:msub><m:mo stretchy="false">]</m:mo><m:mo stretchy="false">)</m:mo><m:mo>,</m:mo><m:mn>...</m:mn><m:mo>,</m:mo><m:mo stretchy="false">(</m:mo><m:mo stretchy="false">[</m:mo><m:msub><m:msup><m:mi>a</m:mi><m:mo>&#8243;</m:mo></m:msup><m:mrow><m:mi>N</m:mi><m:mo>&#8722;</m:mo><m:mi>K</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>,</m:mo><m:msub><m:msup><m:mi>b</m:mi><m:mo>&#8243;</m:mo></m:msup><m:mrow><m:mi>N</m:mi><m:mo>&#8722;</m:mo><m:mi>K</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo stretchy="false">]</m:mo><m:mo>,</m:mo><m:mo stretchy="false">[</m:mo><m:msub><m:msup><m:mi>c</m:mi><m:mo>&#8243;</m:mo></m:msup><m:mrow><m:mi>N</m:mi><m:mo>&#8722;</m:mo><m:mi>K</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>,</m:mo><m:msub><m:msup><m:mi>d</m:mi><m:mo>&#8243;</m:mo></m:msup><m:mrow><m:mi>N</m:mi><m:mo>&#8722;</m:mo><m:mi>K</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo stretchy="false">]</m:mo><m:mo stretchy="false">)</m:mo><m:mo stretchy="false">]</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuqHtoWrgaGbaiabg2da9iabcUfaBjabcIcaOiabcUfaBjabd2gaTjabgUcaRiabigdaXiabcYcaSiqbdkgaIzaagaWaaSbaaSqaaiabigdaXaqabaGccqGGDbqxcqGGSaalcqGGBbWwcqWGWbaCcqGHRaWkcqaIXaqmcqGGSaalcuWGKbazgaGbamaaBaaaleaacqaIXaqmaeqaaOGaeiyxa0LaeiykaKIaeiilaWIaeiOla4IaeiOla4IaeiOla4IaeiilaWIaeiikaGIaei4waSLafmyyaeMbayaadaWgaaWcbaGaemOta4KaeyOeI0Iaem4saSKaey4kaSIaeGymaedabeaakiabcYcaSiqbdkgaIzaagaWaaSbaaSqaaiabd6eaojabgkHiTiabdUealjabgUcaRiabigdaXaqabaGccqGGDbqxcqGGSaalcqGGBbWwcuWGJbWygaGbamaaBaaaleaacqWGobGtcqGHsislcqWGlbWscqGHRaWkcqaIXaqmaeqaaOGaeiilaWIafmizaqMbayaadaWgaaWcbaGaemOta4KaeyOeI0Iaem4saSKaey4kaSIaeGymaedabeaakiabc2faDjabcMcaPiabc2faDbaa@6E7B@</m:annotation></m:semantics></m:math></inline-formula> the <it>N</it>-map <inline-formula><m:math name="1748-7188-2-11-i29" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mi>&#915;</m:mi><m:mo>=</m:mo><m:mo stretchy="false">[</m:mo><m:mo stretchy="false">(</m:mo><m:mo stretchy="false">[</m:mo><m:msub><m:msup><m:mi>a</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:msup><m:mi>b</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mn>1</m:mn></m:msub><m:mo stretchy="false">]</m:mo><m:mo>,</m:mo><m:mo stretchy="false">[</m:mo><m:msub><m:msup><m:mi>c</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:msup><m:mi>d</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mn>1</m:mn></m:msub><m:mo stretchy="false">]</m:mo><m:mo stretchy="false">)</m:mo><m:mo>,</m:mo><m:mn>...</m:mn><m:mo>,</m:mo><m:mo stretchy="false">(</m:mo><m:mo stretchy="false">[</m:mo><m:msub><m:msup><m:mi>a</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>K</m:mi></m:msub><m:mo>,</m:mo><m:msub><m:msup><m:mi>b</m:mi><m:mo>&#8243;</m:mo></m:msup><m:mn>1</m:mn></m:msub><m:mo stretchy="false">]</m:mo><m:mo>,</m:mo><m:mo stretchy="false">[</m:mo><m:msub><m:msup><m:mi>c</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>K</m:mi></m:msub><m:mo>,</m:mo><m:msub><m:msup><m:mi>d</m:mi><m:mo>&#8243;</m:mo></m:msup><m:mn>1</m:mn></m:msub><m:mo stretchy="false">]</m:mo><m:mo stretchy="false">)</m:mo><m:mo>,</m:mo><m:mn>...</m:mn><m:mo>,</m:mo><m:mo stretchy="false">(</m:mo><m:mo stretchy="false">[</m:mo><m:msub><m:msup><m:mi>a</m:mi><m:mo>&#8243;</m:mo></m:msup><m:mrow><m:mi>N</m:mi><m:mo>&#8722;</m:mo><m:mi>K</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>,</m:mo><m:msub><m:msup><m:mi>b</m:mi><m:mo>&#8243;</m:mo></m:msup><m:mrow><m:mi>N</m:mi><m:mo>&#8722;</m:mo><m:mi>K</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo stretchy="false">]</m:mo><m:mo>,</m:mo><m:mo stretchy="false">[</m:mo><m:msub><m:msup><m:mi>c</m:mi><m:mo>&#8243;</m:mo></m:msup><m:mrow><m:mi>N</m:mi><m:mo>&#8722;</m:mo><m:mi>K</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>,</m:mo><m:msub><m:msup><m:mi>d</m:mi><m:mo>&#8243;</m:mo></m:msup><m:mrow><m:mi>N</m:mi><m:mo>&#8722;</m:mo><m:mi>K</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo stretchy="false">]</m:mo><m:mo stretchy="false">)</m:mo><m:mo stretchy="false">]</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqqHtoWrcqGH9aqpcqGGBbWwcqGGOaakcqGGBbWwcuWGHbqygaqbamaaBaaaleaacqaIXaqmaeqaaOGaeiilaWIafmOyaiMbauaadaWgaaWcbaGaeGymaedabeaakiabc2faDjabcYcaSiabcUfaBjqbdogaJzaafaWaaSbaaSqaaiabigdaXaqabaGccqGGSaalcuWGKbazgaqbamaaBaaaleaacqaIXaqmaeqaaOGaeiyxa0LaeiykaKIaeiilaWIaeiOla4IaeiOla4IaeiOla4IaeiilaWIaeiikaGIaei4waSLafmyyaeMbauaadaWgaaWcbaGaem4saSeabeaakiabcYcaSiqbdkgaIzaagaWaaSbaaSqaaiabigdaXaqabaGccqGGDbqxcqGGSaalcqGGBbWwcuWGJbWygaqbamaaBaaaleaacqWGlbWsaeqaaOGaeiilaWIafmizaqMbayaadaWgaaWcbaGaeGymaedabeaakiabc2faDjabcMcaPiabcYcaSiabc6caUiabc6caUiabc6caUiabcYcaSiabcIcaOiabcUfaBjqbdggaHzaagaWaaSbaaSqaaiabd6eaojabgkHiTiabdUealjabgUcaRiabigdaXaqabaGccqGGSaalcuWGIbGygaGbamaaBaaaleaacqWGobGtcqGHsislcqWGlbWscqGHRaWkcqaIXaqmaeqaaOGaeiyxa0LaeiilaWIaei4waSLafm4yamMbayaadaWgaaWcbaGaemOta4KaeyOeI0Iaem4saSKaey4kaSIaeGymaedabeaakiabcYcaSiqbdsgaKzaagaWaaSbaaSqaaiabd6eaojabgkHiTiabdUealjabgUcaRiabigdaXaqabaGccqGGDbqxcqGGPaqkcqGGDbqxaaa@8518@</m:annotation></m:semantics></m:math></inline-formula> has score <inline-formula><m:math name="1748-7188-2-11-i30" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mi mathvariant="script">S</m:mi><m:mo stretchy="false">(</m:mo><m:msup><m:mi>&#915;</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mo stretchy="false">)</m:mo><m:mo>+</m:mo><m:mi mathvariant="script">S</m:mi><m:mo stretchy="false">(</m:mo><m:msup><m:mi>&#915;</m:mi><m:mo>&#8243;</m:mo></m:msup><m:mo stretchy="false">)</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFse=ucqGGOaakcuqHtoWrgaqbaiabcMcaPiabgUcaRiab=jr8tjabcIcaOiqbfo5ahzaagaGaeiykaKcaaa@414E@</m:annotation></m:semantics></m:math></inline-formula>, which is by definition smaller than <inline-formula><m:math name="1748-7188-2-11-i10" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#8499;</m:mi><m:mi>N</m:mi></m:msup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabd6eaobaaaaa@38E1@</m:annotation></m:semantics></m:math></inline-formula> (<it>s</it>, <it>t</it>). It implies that <inline-formula><m:math name="1748-7188-2-11-i31" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi mathvariant="script">Q</m:mi><m:mn>1</m:mn></m:msub><m:mo>&#8804;</m:mo><m:msup><m:mi>&#8499;</m:mi><m:mi>N</m:mi></m:msup><m:mo stretchy="false">(</m:mo><m:mi>s</m:mi><m:mo>,</m:mo><m:mi>t</m:mi><m:mo stretchy="false">)</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFqeFudaWgaaWcbaGaeGymaedabeaakiabgsMiJkab=ntinnaaCaaaleqabaGaemOta4eaaOGaeiikaGIaem4CamNaeiilaWIaemiDaqNaeiykaKcaaa@430F@</m:annotation></m:semantics></m:math></inline-formula>. A similar argument establishes that <inline-formula><m:math name="1748-7188-2-11-i32" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi mathvariant="script">Q</m:mi><m:mn>2</m:mn></m:msub><m:mo>&#8804;</m:mo><m:msup><m:mi>&#8499;</m:mi><m:mi>N</m:mi></m:msup><m:mo stretchy="false">(</m:mo><m:mi>s</m:mi><m:mo>,</m:mo><m:mi>t</m:mi><m:mo stretchy="false">)</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFqeFudaWgaaWcbaGaeGOmaidabeaakiabgsMiJkab=ntinnaaCaaaleqabaGaemOta4eaaOGaeiikaGIaem4CamNaeiilaWIaemiDaqNaeiykaKcaaa@4311@</m:annotation></m:semantics></m:math></inline-formula> and ends the proof.</p>
            <p><b>Remark 1 </b><it>Let s and t be two sequences, N a positive integer, and </it>[<it>D</it><sub>1</sub>, ..., <it>D</it><sub><it>N</it></sub>] <it>an optimal N-map of s over t with diagonals D</it><sub>1</sub>, ..., <it>D</it><sub><it>N </it></sub><it>indexed following the increasing order of their s-intervals</it>.</p>
            <p><it>1. For all </it>1 &#8804; <it>K </it>&lt;<it>N</it>, [<it>D</it><sub>1</sub>, ... , <it>D</it><sub><it>K</it></sub>] <it>is an optimal K-map of </it><inline-formula><m:math name="1748-7188-2-11-i33" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi>s</m:mi><m:mrow><m:mo stretchy="false">[</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:msub><m:mi>a</m:mi><m:mrow><m:mi>K</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>&#8722;</m:mo><m:mn>1</m:mn><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqWGZbWCdaWgaaWcbaGaei4waSLaeGymaeJaeiilaWIaemyyae2aaSbaaWqaaiabdUealjabgUcaRiabigdaXaqabaWccqGHsislcqaIXaqmcqGGDbqxaeqaaaaa@38E8@</m:annotation></m:semantics></m:math></inline-formula><it>over t. Reciprocally, if </it><inline-formula><m:math name="1748-7188-2-11-i34" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mo stretchy="false">[</m:mo><m:msub><m:msup><m:mi>D</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:mn>...</m:mn><m:mo>,</m:mo><m:msub><m:msup><m:mi>D</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>K</m:mi></m:msub><m:mo stretchy="false">]</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqGGBbWwcuWGebargaqbamaaBaaaleaacqaIXaqmaeqaaOGaeiilaWIaeiOla4IaeiOla4IaeiOla4IaeiilaWIafmiraqKbauaadaWgaaWcbaGaem4saSeabeaakiabc2faDbaa@384D@</m:annotation></m:semantics></m:math></inline-formula><it>is an optimal K-map of </it><inline-formula><m:math name="1748-7188-2-11-i33" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi>s</m:mi><m:mrow><m:mo stretchy="false">[</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:msub><m:mi>a</m:mi><m:mrow><m:mi>K</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>&#8722;</m:mo><m:mn>1</m:mn><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqWGZbWCdaWgaaWcbaGaei4waSLaeGymaeJaeiilaWIaemyyae2aaSbaaWqaaiabdUealjabgUcaRiabigdaXaqabaWccqGHsislcqaIXaqmcqGGDbqxaeqaaaaa@38E8@</m:annotation></m:semantics></m:math></inline-formula><it>over t then </it><inline-formula><m:math name="1748-7188-2-11-i35" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mo stretchy="false">[</m:mo><m:msub><m:msup><m:mi>D</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:mn>...</m:mn><m:mo>,</m:mo><m:msub><m:msup><m:mi>D</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>K</m:mi></m:msub><m:mo>,</m:mo><m:msub><m:mi>D</m:mi><m:mrow><m:mi>K</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>,</m:mo><m:mn>...</m:mn><m:mo>,</m:mo><m:msub><m:mi>D</m:mi><m:mi>N</m:mi></m:msub><m:mo stretchy="false">]</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqGGBbWwcuWGebargaqbamaaBaaaleaacqaIXaqmaeqaaOGaeiilaWIaeiOla4IaeiOla4IaeiOla4IaeiilaWIafmiraqKbauaadaWgaaWcbaGaem4saSeabeaakiabcYcaSiabdseaenaaBaaaleaacqWGlbWscqGHRaWkcqaIXaqmaeqaaOGaeiilaWIaeiOla4IaeiOla4IaeiOla4IaeiilaWIaemiraq0aaSbaaSqaaiabd6eaobqabaGccqGGDbqxaaa@443D@</m:annotation></m:semantics></m:math></inline-formula><it>is an optimal N-map of s over t</it>.</p>
            <p><it>2. For all </it>1 &lt;<it>K </it>&#8804; <it>N</it>, [<it>D</it><sub><it>K</it></sub>, ..., <it>D</it><sub><it>N</it></sub>] <it>is an optimal </it>(<it>N </it>- <it>K </it>+ 1)-<it>map of </it><inline-formula><m:math name="1748-7188-2-11-i36" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi>s</m:mi><m:mrow><m:mo stretchy="false">[</m:mo><m:msub><m:mi>b</m:mi><m:mrow><m:mi>K</m:mi><m:mo>&#8722;</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>+</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mrow><m:mo>|</m:mo><m:mi>s</m:mi><m:mo>|</m:mo></m:mrow><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqWGZbWCdaWgaaWcbaGaei4waSLaemOyai2aaSbaaWqaaiabdUealjabgkHiTiabigdaXaqabaWccqGHRaWkcqaIXaqmcqGGSaaldaabdaqaaiabdohaZbGaay5bSlaawIa7aiabc2faDbqabaaaaa@3C8B@</m:annotation></m:semantics></m:math></inline-formula><it>over t. Reciprocally, if </it><inline-formula><m:math name="1748-7188-2-11-i37" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mo stretchy="false">[</m:mo><m:msub><m:msup><m:mi>D</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>K</m:mi></m:msub><m:mo>,</m:mo><m:mn>...</m:mn><m:mo>,</m:mo><m:msub><m:msup><m:mi>D</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>N</m:mi></m:msub><m:mo stretchy="false">]</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqGGBbWwcuWGebargaqbamaaBaaaleaacqWGlbWsaeqaaOGaeiilaWIaeiOla4IaeiOla4IaeiOla4IaeiilaWIafmiraqKbauaadaWgaaWcbaGaemOta4eabeaakiabc2faDbaa@3882@</m:annotation></m:semantics></m:math></inline-formula><it>is an optimal </it>(<it>N </it>- <it>K </it>+ 1)-<it>map of </it><inline-formula><m:math name="1748-7188-2-11-i36" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi>s</m:mi><m:mrow><m:mo stretchy="false">[</m:mo><m:msub><m:mi>b</m:mi><m:mrow><m:mi>K</m:mi><m:mo>&#8722;</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>+</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mrow><m:mo>|</m:mo><m:mi>s</m:mi><m:mo>|</m:mo></m:mrow><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqWGZbWCdaWgaaWcbaGaei4waSLaemOyai2aaSbaaWqaaiabdUealjabgkHiTiabigdaXaqabaWccqGHRaWkcqaIXaqmcqGGSaaldaabdaqaaiabdohaZbGaay5bSlaawIa7aiabc2faDbqabaaaaa@3C8B@</m:annotation></m:semantics></m:math></inline-formula><it>over t then </it><inline-formula><m:math name="1748-7188-2-11-i38" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mo stretchy="false">[</m:mo><m:msub><m:mi>D</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:mn>...</m:mn><m:mo>,</m:mo><m:msub><m:mi>D</m:mi><m:mrow><m:mi>K</m:mi><m:mo>&#8722;</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>,</m:mo><m:msub><m:msup><m:mi>D</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>K</m:mi></m:msub><m:mo>,</m:mo><m:mn>...</m:mn><m:mo>,</m:mo><m:msub><m:msup><m:mi>D</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>N</m:mi></m:msub><m:mo stretchy="false">]</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqGGBbWwcqWGebardaWgaaWcbaGaeGymaedabeaakiabcYcaSiabc6caUiabc6caUiabc6caUiabcYcaSiabdseaenaaBaaaleaacqWGlbWscqGHsislcqaIXaqmaeqaaOGaeiilaWIafmiraqKbauaadaWgaaWcbaGaem4saSeabeaakiabcYcaSiabc6caUiabc6caUiabc6caUiabcYcaSiqbdseaezaafaWaaSbaaSqaaiabd6eaobqabaGccqGGDbqxaaa@4448@</m:annotation></m:semantics></m:math></inline-formula><it>is an optimal N-map of s over t</it>.</p>
            <p>We are now able to introduce the formal algorithm <b>Alg_2 </b>which solves the problem of outputting the diagonals of an optimal global <it>N</it>-map without inversion.</p>
            <p>Algorithm <b>Alg_2 </b>takes as inputs two sequences <it>s </it>and <it>t</it>, two positions <it>i </it>and <it>j </it>bounding a substring of <it>s</it>, and a number of parts <it>N</it>. It outputs the diagonals of an optimal <it>N</it>-map of <it>s</it><sub>[<it>i</it>, <it>j</it>] </sub>over <it>t </it>ordered according to their first intervals.</p>
            <p><b>Algorithm 2 Alg_2 </b>(<it>s</it>, <it>i</it>, <it>j</it>, <it>t</it>, <it>N</it>)</p>
            <p>1: <b>if </b><it>N </it>= 0 <b>then</b></p>
            <p>2:&#160;&#160;&#160;<b>return</b>;</p>
            <p>3: <b>end if</b></p>
            <p>4: S<sub>max </sub>&#8592; -&#8734; ; <inline-formula><m:math name="1748-7188-2-11-i39" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mi>m</m:mi><m:mo>=</m:mo><m:mrow><m:mo>&#8970;</m:mo><m:mrow><m:mfrac><m:mrow><m:mi>i</m:mi><m:mo>+</m:mo><m:mi>j</m:mi></m:mrow><m:mn>2</m:mn></m:mfrac></m:mrow><m:mo>&#8971;</m:mo></m:mrow></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqWGTbqBcqGH9aqpdaGbdaqaamaalaaabaGaemyAaKMaey4kaSIaemOAaOgabaGaeGOmaidaaaGaayj84laawUp+aaaa@38C9@</m:annotation></m:semantics></m:math></inline-formula> ; <inline-formula><m:math name="1748-7188-2-11-i40" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mtext>D</m:mtext><m:mo>&#8242;</m:mo></m:msup><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuqGebargaqbamaaBaaaleaacyGGTbqBcqGGHbqycqGG4baEaeqaaaaa@3219@</m:annotation></m:semantics></m:math></inline-formula> &#8592; NULL ;</p>
            <p>5: <b>Alg_1 </b>(<it>s</it><sub>[<it>i</it>, <it>m</it>]</sub>, <it>t</it>, <it>N</it>, B<sub>s</sub>, B<sub>l</sub>, M<sub>s</sub>, M<sub>d</sub>) ;</p>
            <p>6: <b>Alg_1 </b><inline-formula><m:math name="1748-7188-2-11-i41" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mo stretchy="false">(</m:mo><m:mover accent="true"><m:mrow><m:msub><m:mi>s</m:mi><m:mrow><m:mo stretchy="false">[</m:mo><m:mi>m</m:mi><m:mo>+</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mi>j</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:mo stretchy="true">^</m:mo></m:mover><m:mo>,</m:mo><m:mover accent="true"><m:mi>t</m:mi><m:mo>^</m:mo></m:mover><m:mo>,</m:mo><m:mi>N</m:mi><m:mo>,</m:mo><m:msubsup><m:mtext>B</m:mtext><m:mtext>s</m:mtext><m:mo>&#8727;</m:mo></m:msubsup><m:mo>,</m:mo><m:msubsup><m:mtext>B</m:mtext><m:mtext>l</m:mtext><m:mo>&#8727;</m:mo></m:msubsup><m:mo>,</m:mo><m:msubsup><m:mtext>M</m:mtext><m:mtext>s</m:mtext><m:mo>&#8727;</m:mo></m:msubsup><m:mo>,</m:mo><m:msubsup><m:mtext>M</m:mtext><m:mtext>d</m:mtext><m:mo>&#8727;</m:mo></m:msubsup><m:mo stretchy="false">)</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqGGOaakdaqiaaqaaiabdohaZnaaBaaaleaacqGGBbWwcqWGTbqBcqGHRaWkcqaIXaqmcqGGSaalcqWGQbGAcqGGDbqxaeqaaaGccaGLcmaacqGGSaalcuWG0baDgaqcaiabcYcaSiabd6eaojabcYcaSiabbkeacnaaDaaaleaacqqGZbWCaeaacqGHxiIkaaGccqGGSaalcqqGcbGqdaqhaaWcbaGaeeiBaWgabaGaey4fIOcaaOGaeiilaWIaeeyta00aa0baaSqaaiabbohaZbqaaiabgEHiQaaakiabcYcaSiabb2eannaaDaaaleaacqqGKbazaeaacqGHxiIkaaGccqGGPaqkaaa@4F15@</m:annotation></m:semantics></m:math></inline-formula> ;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;\* <it>Loop </it><inline-formula><m:math name="1748-7188-2-11-i42" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi mathvariant="script">Q</m:mi><m:mn>1</m:mn></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFqeFudaWgaaWcbaGaeGymaedabeaaaaa@395C@</m:annotation></m:semantics></m:math></inline-formula> *\</p>
            <p>7: <b>for </b><it>K </it>&#8592; 1 <b>to <it>N </it>do</b></p>
            <p>8:&#160;&#160;&#160;<it>L </it>&#8592; <it>N </it>- <it>K </it>+ 1 ;</p>
            <p>9:&#160;&#160;&#160;<b>for </b><it>p </it>&#8592; 1 <b>to </b>(|<it>t</it>| - 1) <b>do</b></p>
            <p>10:&#160;&#160;&#160;&#160;&#160;&#160;<it>q </it>&#8592; |<it>t</it>| - <it>p </it>;</p>
            <p>11:&#160;&#160;&#160;&#160;&#160;&#160;<b>if </b>(B<sub>s[<it>p</it>, <it>K</it>] </sub>+ <inline-formula><m:math name="1748-7188-2-11-i43" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msubsup><m:mtext>B</m:mtext><m:mrow><m:mtext>s</m:mtext><m:mo stretchy="false">[</m:mo><m:mi>q</m:mi><m:mo>,</m:mo><m:mi>L</m:mi><m:mo stretchy="false">]</m:mo></m:mrow><m:mo>&#8727;</m:mo></m:msubsup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqqGcbGqdaqhaaWcbaGaee4CamNaei4waSLaemyCaeNaeiilaWIaemitaWKaeiyxa0fabaGaey4fIOcaaaaa@362C@</m:annotation></m:semantics></m:math></inline-formula>) > S<sub>max </sub><b>then</b></p>
            <p>12:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;S<sub>max </sub>&#8592; B<sub>s[<it>p, K</it>] </sub>+ <inline-formula><m:math name="1748-7188-2-11-i43" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msubsup><m:mtext>B</m:mtext><m:mrow><m:mtext>s</m:mtext><m:mo stretchy="false">[</m:mo><m:mi>q</m:mi><m:mo>,</m:mo><m:mi>L</m:mi><m:mo stretchy="false">]</m:mo></m:mrow><m:mo>&#8727;</m:mo></m:msubsup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqqGcbGqdaqhaaWcbaGaee4CamNaei4waSLaemyCaeNaeiilaWIaemitaWKaeiyxa0fabaGaey4fIOcaaaaa@362C@</m:annotation></m:semantics></m:math></inline-formula> ;</p>
            <p>13:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;D<sub>max </sub>&#8592; ([<it>m </it>- B<sub>l[<it>p, K</it>] </sub>+ 1, <it>m </it>+ <inline-formula><m:math name="1748-7188-2-11-i44" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msubsup><m:mtext>B</m:mtext><m:mrow><m:mtext>l</m:mtext><m:mo stretchy="false">[</m:mo><m:mi>q</m:mi><m:mo>,</m:mo><m:mi>L</m:mi><m:mo stretchy="false">]</m:mo></m:mrow><m:mo>&#8727;</m:mo></m:msubsup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqqGcbGqdaqhaaWcbaGaeeiBaWMaei4waSLaemyCaeNaeiilaWIaemitaWKaeiyxa0fabaGaey4fIOcaaaaa@361E@</m:annotation></m:semantics></m:math></inline-formula>], [<it>p </it>- B<sub>l[<it>p, K</it>] </sub>+ l, <it>p </it>+ <inline-formula><m:math name="1748-7188-2-11-i44" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msubsup><m:mtext>B</m:mtext><m:mrow><m:mtext>l</m:mtext><m:mo stretchy="false">[</m:mo><m:mi>q</m:mi><m:mo>,</m:mo><m:mi>L</m:mi><m:mo stretchy="false">]</m:mo></m:mrow><m:mo>&#8727;</m:mo></m:msubsup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqqGcbGqdaqhaaWcbaGaeeiBaWMaei4waSLaemyCaeNaeiilaWIaemitaWKaeiyxa0fabaGaey4fIOcaaaaa@361E@</m:annotation></m:semantics></m:math></inline-formula>]) ;</p>
            <p>14:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<it>N</it><sub>L </sub>&#8592; <it>K </it>- 1 ; <it>N</it><sub>R </sub>&#8592; <it>L </it>- 1 ; <it>j</it><sub>L </sub>&#8592; <it>m </it>- B<sub>l[<it>p</it>, <it>K</it>] </sub>; <it>i</it><sub>R </sub>&#8592; <it>m </it>+ <inline-formula><m:math name="1748-7188-2-11-i44" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msubsup><m:mtext>B</m:mtext><m:mrow><m:mtext>l</m:mtext><m:mo stretchy="false">[</m:mo><m:mi>q</m:mi><m:mo>,</m:mo><m:mi>L</m:mi><m:mo stretchy="false">]</m:mo></m:mrow><m:mo>&#8727;</m:mo></m:msubsup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqqGcbGqdaqhaaWcbaGaeeiBaWMaei4waSLaemyCaeNaeiilaWIaemitaWKaeiyxa0fabaGaey4fIOcaaaaa@361E@</m:annotation></m:semantics></m:math></inline-formula> + 1;</p>
            <p>15:&#160;&#160;&#160;&#160;&#160;&#160;<b>end if</b></p>
            <p>16:&#160;&#160;&#160;<b>end for</b></p>
            <p>17: <b>end for</b>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;\* <it>Loop </it><inline-formula><m:math name="1748-7188-2-11-i45" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi mathvariant="script">Q</m:mi><m:mn>2</m:mn></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFqeFudaWgaaWcbaGaeGOmaidabeaaaaa@395E@</m:annotation></m:semantics></m:math></inline-formula> *\</p>
            <p>18: <b>for </b><it>K </it>&#8592; 0 <b>to </b><it>N </it><b>do</b></p>
            <p>19:&#160;&#160;&#160;<it>L </it>&#8592; <it>N </it>- <it>K </it>;</p>
            <p>20:&#160;&#160;&#160;<b>if </b>(M<sub>s[<it>K</it>] </sub>+ <inline-formula><m:math name="1748-7188-2-11-i46" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msubsup><m:mtext>M</m:mtext><m:mrow><m:mtext>s</m:mtext><m:mo stretchy="false">[</m:mo><m:mi>L</m:mi><m:mo stretchy="false">]</m:mo></m:mrow><m:mo>&#8727;</m:mo></m:msubsup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqqGnbqtdaqhaaWcbaGaee4CamNaei4waSLaemitaWKaeiyxa0fabaGaey4fIOcaaaaa@33F7@</m:annotation></m:semantics></m:math></inline-formula>) > S<sub>max </sub><b>then</b></p>
            <p>21:&#160;&#160;&#160;&#160;&#160;&#160;S<sub>max </sub>&#8592; M<sub>s[<it>K</it>] </sub>+ <inline-formula><m:math name="1748-7188-2-11-i46" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msubsup><m:mtext>M</m:mtext><m:mrow><m:mtext>s</m:mtext><m:mo stretchy="false">[</m:mo><m:mi>L</m:mi><m:mo stretchy="false">]</m:mo></m:mrow><m:mo>&#8727;</m:mo></m:msubsup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqqGnbqtdaqhaaWcbaGaee4CamNaei4waSLaemitaWKaeiyxa0fabaGaey4fIOcaaaaa@33F7@</m:annotation></m:semantics></m:math></inline-formula></p>
            <p>22:&#160;&#160;&#160;&#160;&#160;&#160;<b>if </b><it>K </it>> 0 <b>and </b>M<sub>d[<it>K</it>] </sub>&#8800; NULL <b>then</b></p>
            <p>23:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;([<it>a</it>, <it>b</it>], [<it>c</it>, <it>d</it>]) &#8592; M<sub>d[<it>K</it>] </sub>; D<sub>max </sub>&#8592; ([<it>a </it>+ <it>i </it>- 1, <it>b </it>+ <it>i </it>- 1], [<it>c</it>, <it>d</it>]) ;</p>
            <p>24:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<it>N</it><sub>L </sub>&#8592; <it>K </it>- 1 ; <it>j</it><sub>L </sub>&#8592; <it>a </it>+ <it>i </it>- 2 ;</p>
            <p>25:&#160;&#160;&#160;&#160;&#160;&#160;<b>else</b></p>
            <p>26:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;D<sub>max </sub>&#8592; NULL ; <it>N</it><sub>L </sub>&#8592; 0 ;</p>
            <p>27:&#160;&#160;&#160;&#160;&#160;&#160;<b>end if</b></p>
            <p>28:&#160;&#160;&#160;&#160;&#160;&#160;<b>if </b><it>L </it>> 0 <b>and </b><inline-formula><m:math name="1748-7188-2-11-i47" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msubsup><m:mtext>M</m:mtext><m:mrow><m:mtext>d</m:mtext><m:mo stretchy="false">[</m:mo><m:mi>L</m:mi><m:mo stretchy="false">]</m:mo></m:mrow><m:mo>&#8727;</m:mo></m:msubsup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqqGnbqtdaqhaaWcbaGaeeizaqMaei4waSLaemitaWKaeiyxa0fabaGaey4fIOcaaaaa@33D9@</m:annotation></m:semantics></m:math></inline-formula> &#8800; NULL <b>then</b></p>
            <p>29:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;([<it>a</it>, <it>b</it>], [<it>c</it>, <it>d</it>]) &#8592; <inline-formula><m:math name="1748-7188-2-11-i47" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msubsup><m:mtext>M</m:mtext><m:mrow><m:mtext>d</m:mtext><m:mo stretchy="false">[</m:mo><m:mi>L</m:mi><m:mo stretchy="false">]</m:mo></m:mrow><m:mo>&#8727;</m:mo></m:msubsup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqqGnbqtdaqhaaWcbaGaeeizaqMaei4waSLaemitaWKaeiyxa0fabaGaey4fIOcaaaaa@33D9@</m:annotation></m:semantics></m:math></inline-formula> ; <inline-formula><m:math name="1748-7188-2-11-i40" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mtext>D</m:mtext><m:mo>&#8242;</m:mo></m:msup><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuqGebargaqbamaaBaaaleaacyGGTbqBcqGGHbqycqGG4baEaeqaaaaa@3219@</m:annotation></m:semantics></m:math></inline-formula> &#8592; ([<it>a </it>+ <it>m</it>, <it>b </it>+ <it>m</it>], [<it>c</it>, <it>d</it>]) ;</p>
            <p>30:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<it>N</it><sub>R </sub>&#8592; <it>L </it>- 1 ; <it>i</it><sub>R </sub>&#8592; <it>b </it>+ <it>m </it>+ 1 ;</p>
            <p>31:&#160;&#160;&#160;&#160;&#160;&#160;<b>else</b></p>
            <p>32:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<inline-formula><m:math name="1748-7188-2-11-i40" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mtext>D</m:mtext><m:mo>&#8242;</m:mo></m:msup><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuqGebargaqbamaaBaaaleaacyGGTbqBcqGGHbqycqGG4baEaeqaaaaa@3219@</m:annotation></m:semantics></m:math></inline-formula> &#8592; NULL ; <it>N</it><sub>R </sub>&#8592; 0 ;</p>
            <p>33:&#160;&#160;&#160;&#160;&#160;&#160;<b>end if</b></p>
            <p>34:&#160;&#160;&#160;<b>end if</b></p>
            <p>35: <b>end for</b></p>
            <p>36: <b>Alg_2 </b>(<it>s</it>, <it>i</it>, <it>j</it><sub>L</sub>, <it>t</it>, <it>N</it><sub>L</sub>) ;</p>
            <p>37: <b>Output </b>(D<sub>max</sub>) ; <b>output </b>(<inline-formula><m:math name="1748-7188-2-11-i40" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mtext>D</m:mtext><m:mo>&#8242;</m:mo></m:msup><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuqGebargaqbamaaBaaaleaacyGGTbqBcqGGHbqycqGG4baEaeqaaaaa@3219@</m:annotation></m:semantics></m:math></inline-formula>) ;</p>
            <p>38: <b>Alg_2 </b>(<it>s</it>, <it>i</it><sub>R</sub>, <it>j</it>, <it>t</it>, <it>N</it><sub>R</sub>) ;</p>
            <sec>
               <st>
                  <p>Correctness of Algorithm Alg_2</p>
               </st>
               <p>Let us consider Best and <inline-formula><m:math name="1748-7188-2-11-i48" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mover accent="true"><m:mrow><m:mtext>Best</m:mtext></m:mrow><m:mo stretchy="true">&#175;</m:mo></m:mover></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaadaqdaaqaaiabbkeacjabbwgaLjabbohaZjabbsha0baaaaa@31F5@</m:annotation></m:semantics></m:math></inline-formula> defined for <it>s</it><sub>[<it>i</it>, <it>j</it>] </sub>as follows. For all <it>r </it>such that <it>i </it>&#8804; <it>r </it>&#8804; <it>j </it>and <it>v </it>such that 1 &#8804; <it>v </it>&#8804; |<it>t</it>|, Best<sub>[<it>r</it>, <it>v</it>, <it>K</it>] </sub>is the maximal score obtained by a <it>K</it>-map of <it>s</it><sub>[<it>i</it>, <it>r</it>] </sub>over <it>t</it><sub>[1, <it>v</it>] </sub>ending at (<it>r, v</it>). Analogously, <inline-formula><m:math name="1748-7188-2-11-i49" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mrow><m:mover accent="true"><m:mrow><m:mtext>Best</m:mtext></m:mrow><m:mo stretchy="true">&#175;</m:mo></m:mover></m:mrow><m:mrow><m:mo stretchy="false">[</m:mo><m:mi>r</m:mi><m:mo>,</m:mo><m:mi>v</m:mi><m:mo>,</m:mo><m:mi>K</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaadaqdaaqaaiabbkeacjabbwgaLjabbohaZjabbsha0baadaWgaaWcbaGaei4waSLaemOCaiNaeiilaWIaemODayNaeiilaWIaem4saSKaeiyxa0fabeaaaaa@3A62@</m:annotation></m:semantics></m:math></inline-formula> is the maximal score obtained by a <it>K</it>-map of <it>s</it><sub>[<it>r</it>, <it>j</it>] </sub>over <it>t</it><sub>[<it>v</it>, |<it>t</it>|] </sub>starting at (<it>r</it>, <it>v</it>). For all positions <it>p </it>of <it>t </it>and all 1 &#8804; <it>K </it>&#8804; <it>N</it>, we have B<sub>s[<it>p, K</it>] </sub>= Best<sub>[<it>m</it>, <it>p</it>, <it>K</it>]</sub>, <inline-formula><m:math name="1748-7188-2-11-i50" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msubsup><m:mtext>B</m:mtext><m:mrow><m:mtext>s</m:mtext><m:mo stretchy="false">[</m:mo><m:mo>|</m:mo><m:mi>t</m:mi><m:mo>|</m:mo><m:mo>&#8722;</m:mo><m:mi>p</m:mi><m:mo>,</m:mo><m:mi>K</m:mi><m:mo stretchy="false">]</m:mo></m:mrow><m:mo>&#8727;</m:mo></m:msubsup><m:mo>=</m:mo><m:msub><m:mrow><m:mover accent="true"><m:mrow><m:mtext>Best</m:mtext></m:mrow><m:mo stretchy="true">&#175;</m:mo></m:mover></m:mrow><m:mrow><m:mo stretchy="false">[</m:mo><m:mi>m</m:mi><m:mo>+</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mi>p</m:mi><m:mo>+</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mi>K</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqqGcbGqdaqhaaWcbaGaee4CamNaei4waSLaeiiFaWNaemiDaqNaeiiFaWNaeyOeI0IaemiCaaNaeiilaWIaem4saSKaeiyxa0fabaGaey4fIOcaaOGaeyypa0Zaa0aaaeaacqqGcbGqcqqGLbqzcqqGZbWCcqqG0baDaaWaaSbaaSqaaiabcUfaBjabd2gaTjabgUcaRiabigdaXiabcYcaSiabdchaWjabgUcaRiabigdaXiabcYcaSiabdUealjabc2faDbqabaaaaa@4DDA@</m:annotation></m:semantics></m:math></inline-formula> (since it is obtained from <inline-formula><m:math name="1748-7188-2-11-i51" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mover accent="true"><m:mrow><m:msub><m:mi>s</m:mi><m:mrow><m:mo stretchy="false">[</m:mo><m:mi>m</m:mi><m:mo>+</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mi>j</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:mo stretchy="true">^</m:mo></m:mover></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaadaqiaaqaaiabdohaZnaaBaaaleaacqGGBbWwcqWGTbqBcqGHRaWkcqaIXaqmcqGGSaalcqWGQbGAcqGGDbqxaeqaaaGccaGLcmaaaaa@3705@</m:annotation></m:semantics></m:math></inline-formula>), <inline-formula><m:math name="1748-7188-2-11-i52" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mtext>M</m:mtext><m:mrow><m:mtext>s</m:mtext><m:mo stretchy="false">[</m:mo><m:mi>K</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub><m:mo>=</m:mo><m:msup><m:mi>&#8499;</m:mi><m:mi>K</m:mi></m:msup><m:mo stretchy="false">(</m:mo><m:msub><m:mi>s</m:mi><m:mrow><m:mo stretchy="false">[</m:mo><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>m</m:mi><m:mo stretchy="false">]</m:mo><m:mo>,</m:mo></m:mrow></m:msub><m:mi>t</m:mi><m:mo stretchy="false">)</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqqGnbqtdaWgaaWcbaGaee4CamNaei4waSLaem4saSKaeiyxa0fabeaakiabg2da9mrtHrhAL1wy0L2yHvtyaeHbnfgDOvwBHrxAJfwnaGabaiab=ntinnaaCaaaleqabaGaem4saSeaaOGaeiikaGIaem4Cam3aaSbaaSqaaiabcUfaBjabdMgaPjabcYcaSiabd2gaTjabc2faDjabcYcaSaqabaGccqWG0baDcqGGPaqkaaa@4C14@</m:annotation></m:semantics></m:math></inline-formula> and <inline-formula><m:math name="1748-7188-2-11-i53" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msubsup><m:mtext>M</m:mtext><m:mrow><m:mtext>s</m:mtext><m:mo stretchy="false">[</m:mo><m:mi>K</m:mi><m:mo stretchy="false">]</m:mo></m:mrow><m:mo>&#8727;</m:mo></m:msubsup><m:mo>=</m:mo><m:msup><m:mi>&#8499;</m:mi><m:mi>K</m:mi></m:msup><m:mo stretchy="false">(</m:mo><m:msub><m:mi>s</m:mi><m:mrow><m:mi>m</m:mi><m:mo>+</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mi>j</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub><m:mo>,</m:mo><m:mi>t</m:mi><m:mo stretchy="false">)</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqqGnbqtdaqhaaWcbaGaee4CamNaei4waSLaem4saSKaeiyxa0fabaGaey4fIOcaaOGaeyypa0ZenfgDOvwBHrxAJfwnHbqeg0uy0HwzTfgDPnwy1aaceaGae83mH00aaWbaaSqabeaacqWGlbWsaaGccqGGOaakcqWGZbWCdaWgaaWcbaGaemyBa0Maey4kaSIaeGymaeJaeiilaWIaemOAaOMaeiyxa0fabeaakiabcYcaSiabdsha0jabcMcaPaaa@4D9A@</m:annotation></m:semantics></m:math></inline-formula>. Following the notations of Lemma 1, "Loop <inline-formula><m:math name="1748-7188-2-11-i42" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi mathvariant="script">Q</m:mi><m:mn>1</m:mn></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFqeFudaWgaaWcbaGaeGymaedabeaaaaa@395C@</m:annotation></m:semantics></m:math></inline-formula>" (<it>resp</it>. "Loop <inline-formula><m:math name="1748-7188-2-11-i45" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi mathvariant="script">Q</m:mi><m:mn>2</m:mn></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFqeFudaWgaaWcbaGaeGOmaidabeaaaaa@395E@</m:annotation></m:semantics></m:math></inline-formula>") parses the quantities maximized by <inline-formula><m:math name="1748-7188-2-11-i42" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi mathvariant="script">Q</m:mi><m:mn>1</m:mn></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFqeFudaWgaaWcbaGaeGymaedabeaaaaa@395C@</m:annotation></m:semantics></m:math></inline-formula> (<it>resp</it>. by <inline-formula><m:math name="1748-7188-2-11-i45" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi mathvariant="script">Q</m:mi><m:mn>2</m:mn></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFqeFudaWgaaWcbaGaeGOmaidabeaaaaa@395E@</m:annotation></m:semantics></m:math></inline-formula>). Thus, Lemma 1 ensures that <inline-formula><m:math name="1748-7188-2-11-i54" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#8499;</m:mi><m:mi>N</m:mi></m:msup><m:mo stretchy="false">(</m:mo><m:msub><m:mi>s</m:mi><m:mrow><m:mo stretchy="false">[</m:mo><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub><m:mo>,</m:mo><m:mi>t</m:mi><m:mo stretchy="false">)</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabd6eaobaakiabcIcaOiabdohaZnaaBaaaleaacqGGBbWwcqWGPbqAcqGGSaalcqWGQbGAcqGGDbqxaeqaaOGaeiilaWIaemiDaqNaeiykaKcaaa@44AB@</m:annotation></m:semantics></m:math></inline-formula> is stored in the variable S<sub>max </sub>after the execution of these two loops. If the maximum is reached in "Loop <inline-formula><m:math name="1748-7188-2-11-i42" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi mathvariant="script">Q</m:mi><m:mn>1</m:mn></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFqeFudaWgaaWcbaGaeGymaedabeaaaaa@395C@</m:annotation></m:semantics></m:math></inline-formula>", the variable <inline-formula><m:math name="1748-7188-2-11-i40" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mtext>D</m:mtext><m:mo>&#8242;</m:mo></m:msup><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuqGebargaqbamaaBaaaleaacyGGTbqBcqGGHbqycqGG4baEaeqaaaaa@3219@</m:annotation></m:semantics></m:math></inline-formula> is NULL and the variable D<sub>max </sub>contains the diagonal including <it>m</it>, let us say the <it>K</it><sup>th</sup>, of a <it>N</it>-map with score <inline-formula><m:math name="1748-7188-2-11-i54" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#8499;</m:mi><m:mi>N</m:mi></m:msup><m:mo stretchy="false">(</m:mo><m:msub><m:mi>s</m:mi><m:mrow><m:mo stretchy="false">[</m:mo><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub><m:mo>,</m:mo><m:mi>t</m:mi><m:mo stretchy="false">)</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabd6eaobaakiabcIcaOiabdohaZnaaBaaaleaacqGGBbWwcqWGPbqAcqGGSaalcqWGQbGAcqGGDbqxaeqaaOGaeiilaWIaemiDaqNaeiykaKcaaa@44AB@</m:annotation></m:semantics></m:math></inline-formula>. Remark 1 allows us to output the <it>K</it><sup>th </sup>diagonal ([<it>a</it><sub><it>K</it></sub>, <it>b</it><sub><it>K</it></sub>], [<it>c</it><sub><it>K</it></sub>, <it>d</it><sub><it>K</it></sub>]) and to compute recursively an optimal (<it>K </it>- 1)-map of <inline-formula><m:math name="1748-7188-2-11-i55" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi>s</m:mi><m:mrow><m:mo stretchy="false">[</m:mo><m:mi>i</m:mi><m:mo>,</m:mo><m:msub><m:mi>a</m:mi><m:mi>K</m:mi></m:msub><m:mo>&#8722;</m:mo><m:mn>1</m:mn><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqWGZbWCdaWgaaWcbaGaei4waSLaemyAaKMaeiilaWIaemyyae2aaSbaaWqaaiabdUealbqabaWccqGHsislcqaIXaqmcqGGDbqxaeqaaaaa@3781@</m:annotation></m:semantics></m:math></inline-formula> over <it>t</it>, and a (<it>N </it>- <it>K</it>)-map of <inline-formula><m:math name="1748-7188-2-11-i56" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi>s</m:mi><m:mrow><m:mo stretchy="false">[</m:mo><m:msub><m:mi>b</m:mi><m:mi>K</m:mi></m:msub><m:mo>+</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mi>j</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqWGZbWCdaWgaaWcbaGaei4waSLaemOyai2aaSbaaWqaaiabdUealbqabaWccqGHRaWkcqaIXaqmcqGGSaalcqWGQbGAcqGGDbqxaeqaaaaa@377A@</m:annotation></m:semantics></m:math></inline-formula> over <it>t</it>.</p>
               <p>If the maximum is reached in "Loop <inline-formula><m:math name="1748-7188-2-11-i45" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi mathvariant="script">Q</m:mi><m:mn>2</m:mn></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFqeFudaWgaaWcbaGaeGOmaidabeaaaaa@395E@</m:annotation></m:semantics></m:math></inline-formula>", the variables D<sub>max </sub>and <inline-formula><m:math name="1748-7188-2-11-i40" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mtext>D</m:mtext><m:mo>&#8242;</m:mo></m:msup><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuqGebargaqbamaaBaaaleaacyGGTbqBcqGGHbqycqGG4baEaeqaaaaa@3219@</m:annotation></m:semantics></m:math></inline-formula> contain the two diagonals on both sides of position <it>m </it>of a <it>N</it>-map with score <inline-formula><m:math name="1748-7188-2-11-i54" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#8499;</m:mi><m:mi>N</m:mi></m:msup><m:mo stretchy="false">(</m:mo><m:msub><m:mi>s</m:mi><m:mrow><m:mo stretchy="false">[</m:mo><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub><m:mo>,</m:mo><m:mi>t</m:mi><m:mo stretchy="false">)</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabd6eaobaakiabcIcaOiabdohaZnaaBaaaleaacqGGBbWwcqWGPbqAcqGGSaalcqWGQbGAcqGGDbqxaeqaaOGaeiilaWIaemiDaqNaeiykaKcaaa@44AB@</m:annotation></m:semantics></m:math></inline-formula>. The diagonal D<sub>max </sub>(<it>resp</it>. <inline-formula><m:math name="1748-7188-2-11-i40" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mtext>D</m:mtext><m:mo>&#8242;</m:mo></m:msup><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo></m:mrow></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuqGebargaqbamaaBaaaleaacyGGTbqBcqGGHbqycqGG4baEaeqaaaaa@3219@</m:annotation></m:semantics></m:math></inline-formula>) is possibly NULL &#8211; and not outputted &#8211; if <it>m </it>is smaller than the first position (<it>resp</it>. greater than the last position) of the <it>N</it>-map. Applying again Remark 1 leads to the correctness of the algorithm.</p>
            </sec>
            <sec>
               <st>
                  <p>Time and space analysis of Algorithm Alg_2</p>
               </st>
               <p>Let us consider the recursion tree of an execution of <b>Alg_2 </b>which outputs an optimal <it>N</it>-map of <it>s </it>over <it>t</it>. The root of this tree is the initial call to <b>Alg_2 </b>with the parameters (<it>s</it>, 1, |<it>s</it>|, <it>t</it>, <it>N</it>), its two children are the two recursive calls in lines 36 and 38, and so on. The depth level of recursion of the initial call/root is 0. The depth level of another call is recursively defined as the incremented depth level of its direct ancestor. Before the two recursive calls at lines 36 and 38, the execution time of a call to <b>Alg_2 </b>with the parameters (<it>s</it>, <it>i</it>, <it>j</it>, <it>t</it>, <it>N</it>) is bounded by <it>c </it>&#215; (<it>j </it>- <it>i </it>+ 1) &#215; |<it>t</it>| &#215; <it>N</it>, for a constant <it>c</it>. Time is spent essentially in the two calls to <b>Alg_1 </b>at lines 5 and 6. The two recursive calls are done with the parameters (<it>s</it>, <it>i</it>, <it>j</it><sub>L</sub>, <it>t</it>, <it>N</it><sub>L</sub>) and (<it>s</it>, <it>i</it><sub>R</sub>, <it>j</it>, <it>t</it>, <it>N</it><sub>R</sub>) where:</p>
               <p>
                  <display-formula id="M1">&#8226; <m:math name="1748-7188-2-11-i57" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mo stretchy="false">(</m:mo><m:msub><m:mi>j</m:mi><m:mtext>L</m:mtext></m:msub><m:mo>&#8722;</m:mo><m:mi>i</m:mi><m:mo>+</m:mo><m:mn>1</m:mn><m:mo stretchy="false">)</m:mo><m:mo>&#8804;</m:mo><m:mfrac><m:mrow><m:mi>j</m:mi><m:mo>&#8722;</m:mo><m:mi>i</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow><m:mn>2</m:mn></m:mfrac><m:mtext>&#160;and&#160;</m:mtext><m:mo stretchy="false">(</m:mo><m:mi>j</m:mi><m:mo>&#8722;</m:mo><m:msub><m:mi>i</m:mi><m:mtext>R</m:mtext></m:msub><m:mo>+</m:mo><m:mn>1</m:mn><m:mo stretchy="false">)</m:mo><m:mo>&#8804;</m:mo><m:mfrac><m:mrow><m:mi>j</m:mi><m:mo>&#8722;</m:mo><m:mi>i</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow><m:mn>2</m:mn></m:mfrac></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqGGOaakcqWGQbGAdaWgaaWcbaGaeeitaWeabeaakiabgkHiTiabdMgaPjabgUcaRiabigdaXiabcMcaPiabgsMiJoaalaaabaGaemOAaOMaeyOeI0IaemyAaKMaey4kaSIaeGymaedabaGaeGOmaidaaiabbccaGiabbggaHjabb6gaUjabbsgaKjabbccaGiabcIcaOiabdQgaQjabgkHiTiabdMgaPnaaBaaaleaacqqGsbGuaeqaaOGaey4kaSIaeGymaeJaeiykaKIaeyizIm6aaSaaaeaacqWGQbGAcqGHsislcqWGPbqAcqGHRaWkcqaIXaqmaeaacqaIYaGmaaaaaa@5399@</m:annotation></m:semantics></m:math></display-formula>
               </p>
               <p>
                  <display-formula id="M2">&#8226; <it>N</it><sub>L </sub>+ <it>N</it><sub>R </sub>&#8804; <it>N </it>- 1</display-formula>
               </p>
               <p>Let us remark that because of the possibly unbalanced repartition of <it>N </it>into <it>N</it><sub>L </sub>and <it>N</it><sub>R </sub>between the subcalls, the Master Theorem <abbrgrp><abbr bid="B11">11</abbr></abbrgrp>, generally used to evaluate complexity of divide and conquer algorithms, cannot be applied to prove the desired time complexity.</p>
               <p>Since the initial call is done with the parameters (<it>s</it>, 1, |<it>s</it>|, <it>t</it>, <it>N</it>), the following assertions can be proved by induction over the depth level of recursion.</p>
               <p>&#8226; From Inequalities (1), the length of the substring of <it>s </it>bounded by the two parameters "positions" in a call of depth level <it>d </it>is smaller than <inline-formula><m:math name="1748-7188-2-11-i58" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mfrac><m:mrow><m:mrow><m:mo>|</m:mo><m:mi>s</m:mi><m:mo>|</m:mo></m:mrow></m:mrow><m:mrow><m:msup><m:mn>2</m:mn><m:mi>d</m:mi></m:msup></m:mrow></m:mfrac></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaadaWcaaqaamaaemaabaGaem4CamhacaGLhWUaayjcSdaabaGaeGOmaiZaaWbaaSqabeaacqWGKbazaaaaaaaa@33BD@</m:annotation></m:semantics></m:math></inline-formula>.</p>
               <p>&#8226; From Inequality (2), the sum of the parameters "number of parts" of all the calls of depth level <it>d </it>is smaller than (<it>N </it>- <it>d</it>).</p>
               <p>Thus, the total time spent at a level of recursion <it>d </it>is smaller than <it>c </it>&#215; <inline-formula><m:math name="1748-7188-2-11-i58" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mfrac><m:mrow><m:mrow><m:mo>|</m:mo><m:mi>s</m:mi><m:mo>|</m:mo></m:mrow></m:mrow><m:mrow><m:msup><m:mn>2</m:mn><m:mi>d</m:mi></m:msup></m:mrow></m:mfrac></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaadaWcaaqaamaaemaabaGaem4CamhacaGLhWUaayjcSdaabaGaeGOmaiZaaWbaaSqabeaacqWGKbazaaaaaaaa@33BD@</m:annotation></m:semantics></m:math></inline-formula> &#215; |<it>t</it>| &#215; <it>N</it>. By summing over all the possible levels (at most <it>N </it>levels), it comes that the total (including all the recursive subcalls) execution time of a call to <b>Alg_2 </b>with the parameters (<it>s</it>, 1, |<it>s</it>|, <it>t</it>, <it>N</it>) is smaller than 2 &#215; <it>c </it>&#215; |<it>s</it>| &#215; |<it>t</it>| &#215; <it>N</it>. This ends the time analysis.</p>
               <p>The analysis of the memory space complexity is straightforward: each call needs only <it>O </it>(|<it>t</it>| &#215; <it>N</it>) of local storage space to run; the sequences are stored once in <it>O </it>(|<it>s</it>| + |<it>t</it>|) and, from Inequality (2), there are at most <it>N </it>recursive calls to <b>Alg_2</b>.</p>
               <p><b>Theorem 2 </b><it>Algorithm </it><b>Alg_2 </b><it>outputs the diagonals of an optimal N-map of a sequence s over a sequence t in time O </it>(|<it>s</it>| &#215; |<it>t</it>| &#215; <it>N</it>) <it>using O </it>(|<it>s</it>| + |<it>t</it>| &#215; <it>N</it>) <it>memory space</it>.</p>
               <p>The algorithm taking into account inversions follows the same general outline with additional and symmetrical dynamic programming variables for "reverse diagonals".</p>
               <p>A similar idea can be used to compute an optimal alignment with a fixed number <it>N </it>of gaps in <it>O </it>(|<it>s</it>| &#215; |<it>t</it>| &#215; <it>N</it>) time complexity using <it>O </it>(|<it>s</it>| + |<it>t</it>| &#215; <it>N</it>) memory space. It improves the "SANK_AL" algorithm described in <abbrgrp><abbr bid="B9">9</abbr></abbrgrp>, which needs <it>O </it>(|<it>s</it>| &#215; |<it>t</it>| &#215; <it>N</it>) memory space.</p>
            </sec>
         </sec>
      </sec>
      <sec>
         <st>
            <p>3 Choice of the number of parts</p>
         </st>
         <p>Given two sequences <it>s </it>and <it>t</it>, the score of an optimal <it>N</it>-map of <it>s </it>over <it>t </it>increases with <it>N</it>. The maximum of the optimal scores is reached at most with <it>N </it>= |<it>s</it>| and the corresponding maps generally do not make sense. Some <it>a priori </it>knowledge could help us to decide whether the increase of the score between the <it>K</it>-and the (<it>K </it>+ 1)-map deserves to consider an extra diagonal, for instance by introducing a penalty growing linearly with the number of parts.</p>
         <p>Without such <it>a priori </it>knowledge, a natural choice is to consider the most significant optimal <it>N</it>-map: here the one which minimizes the probability of observing an optimal score greater than <inline-formula><m:math name="1748-7188-2-11-i10" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#8499;</m:mi><m:mi>N</m:mi></m:msup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabd6eaobaaaaa@38E1@</m:annotation></m:semantics></m:math></inline-formula> (<it>s</it>, <it>t</it>) between a pair of iid random sequences with the same lengths as <it>s </it>and <it>t</it>, and with the probabilities of symbols set to the frequencies observed over <it>s </it>and <it>t</it>. This choice needs to have informations about the probability distributions of the optimal scores of <it>N</it>-maps. Even if the problem could sound more homogeneous than the alignment case, we failed to derive an analytical approximation of this distribution. However, two cases are quite simple to check:</p>
         <p><ul><it>N </it>= 1</ul> A 1-map is nothing but a gapless alignment of <it>s </it>and <it>t</it>. The distributions of the maximal scores were well studied in the local case and are known to converge to extreme value (EV) distributions <abbrgrp><abbr bid="B12">12</abbr></abbrgrp>.</p>
         <p><ul><it>N </it>= |<it>s</it>|</ul> The optimal score of a |<it>s</it>|-map is obtained by summing the maximal substitution scores of all the positions of <it>s </it>against the whole sequence <it>t</it>. Let <it>t </it>be fixed and <it>s </it>be an iid sequence, then the scores associated to all the positions of <it>s </it>correspond to a set of iid random variables of expected value <inline-formula><m:math name="1748-7188-2-11-i59" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:mi>&#956;</m:mi><m:mi>t</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mrow><m:mstyle displaystyle="true"><m:msub><m:mo>&#8721;</m:mo><m:mrow><m:mi>x</m:mi><m:mo>&#8712;</m:mo><m:mi mathvariant="script">A</m:mi></m:mrow></m:msub><m:mrow><m:msub><m:mtext>p</m:mtext><m:mi>x</m:mi></m:msub><m:mi>max</m:mi><m:mo>&#8289;</m:mo></m:mrow></m:mstyle></m:mrow><m:mrow><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:mi>p</m:mi><m:mo>&#8804;</m:mo><m:mo>|</m:mo><m:mi>t</m:mi><m:mo>|</m:mo></m:mrow></m:msub><m:mo>{</m:mo><m:msub><m:mi>&#960;</m:mi><m:mrow><m:mo stretchy="false">[</m:mo><m:mi>x</m:mi><m:mo>,</m:mo><m:msub><m:mi>t</m:mi><m:mi>p</m:mi></m:msub><m:mo stretchy="false">]</m:mo></m:mrow></m:msub><m:mo>}</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaaiiGacqWF8oqBdaWgaaWcbaGaemiDaqhabeaakiabg2da9maaqababaGaeeiCaa3aaSbaaSqaaGqabiab+Hha4bqabaGccyGGTbqBcqGGHbqycqGG4baEaSqaaiab+Hha4jabgIGioprtHrhAL1wy0L2yHvtyaeHbnfgDOvwBHrxAJfwnaGabaiab9bq8bbqab0GaeyyeIuoakmaaBaaaleaacqaIXaqmcqGHKjYOcqWGWbaCcqGHKjYOcqGG8baFcqWG0baDcqGG8baFaeqaaOGaei4EaSNae8hWda3aaSbaaSqaaiabcUfaBjab+Hha4jabcYcaSiabdsha0naaBaaameaacqWGWbaCaeqaaSGaeiyxa0fabeaakiabc2ha9baa@5FEC@</m:annotation></m:semantics></m:math></inline-formula> and variance <inline-formula><m:math name="1748-7188-2-11-i60" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msubsup><m:mi>&#963;</m:mi><m:mi>t</m:mi><m:mn>2</m:mn></m:msubsup><m:mo>=</m:mo><m:mstyle displaystyle="true"><m:msub><m:mo>&#8721;</m:mo><m:mrow><m:mi>x</m:mi><m:mo>&#8712;</m:mo><m:mi mathvariant="script">A</m:mi></m:mrow></m:msub><m:mrow><m:msub><m:mi>p</m:mi><m:mi>x</m:mi></m:msub><m:mo stretchy="false">(</m:mo><m:msub><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo></m:mrow><m:mrow><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:mi>p</m:mi><m:mo>&#8804;</m:mo><m:mo>|</m:mo><m:mi>t</m:mi><m:mo>|</m:mo></m:mrow></m:msub><m:mo>{</m:mo><m:msub><m:mi>&#960;</m:mi><m:mrow><m:mo stretchy="false">[</m:mo><m:mi>x</m:mi><m:mo>,</m:mo><m:msub><m:mi>t</m:mi><m:mi>p</m:mi></m:msub><m:mo stretchy="false">]</m:mo></m:mrow></m:msub></m:mrow></m:mstyle><m:mo>}</m:mo><m:mo>&#8722;</m:mo><m:msub><m:mi>&#956;</m:mi><m:mi>t</m:mi></m:msub><m:msup><m:mo stretchy="false">)</m:mo><m:mn>2</m:mn></m:msup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaaiiGacqWFdpWCdaqhaaWcbaGaemiDaqhabaGaeGOmaidaaOGaeyypa0ZaaabeaeaaieaacqGFWbaCdaWgaaWcbaacbeGae0hEaGhabeaakiabcIcaOiGbc2gaTjabcggaHjabcIha4naaBaaaleaacqaIXaqmcqGHKjYOcqWGWbaCcqGHKjYOcqGG8baFcqWG0baDcqGG8baFaeqaaOGaei4EaSNae8hWda3aaSbaaSqaaiabcUfaBjab9Hha4jabcYcaSiabdsha0naaBaaameaacqWGWbaCaeqaaSGaeiyxa0fabeaaaeaacqqF4baEcqGHiiIZt0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqaFaeFqaeqaniabggHiLdGccqGG9bqFcqGHsislcqWF8oqBdaWgaaWcbaGaemiDaqhabeaakiabcMcaPmaaCaaaleqabaGaeGOmaidaaaaa@67EF@</m:annotation></m:semantics></m:math></inline-formula>, where p<sub>x </sub>is the probability of the symbol <b>x </b>in <it>s</it>. The optimal score turns out to be a sum of |<it>s</it>| random variables of this type. Thanks to the Central Limit Theorem, its distribution converges with |<it>s</it>| to the normal distribution <inline-formula><m:math name="1748-7188-2-11-i61" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mi mathvariant="script">N</m:mi><m:mo stretchy="false">(</m:mo><m:msub><m:mi>&#956;</m:mi><m:mi>t</m:mi></m:msub><m:mo>|</m:mo><m:mi>s</m:mi><m:mo>|</m:mo><m:mo>,</m:mo><m:msubsup><m:mi>&#963;</m:mi><m:mi>t</m:mi><m:mn>2</m:mn></m:msubsup><m:mo>|</m:mo><m:mi>s</m:mi><m:mo>|</m:mo><m:mo stretchy="false">)</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFneVtcqGGOaakiiGacqGF8oqBdaWgaaWcbaGaemiDaqhabeaakiabcYha8jabdohaZjabcYha8jabcYcaSiab+n8aZnaaDaaaleaacqWG0baDaeaacqaIYaGmaaGccqGG8baFcqWGZbWCcqGG8baFcqGGPaqkaaa@4B64@</m:annotation></m:semantics></m:math></inline-formula>. If <it>t </it>is not fixed but random, this distribution becomes a mixture of <inline-formula><m:math name="1748-7188-2-11-i61" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mi mathvariant="script">N</m:mi><m:mo stretchy="false">(</m:mo><m:msub><m:mi>&#956;</m:mi><m:mi>t</m:mi></m:msub><m:mo>|</m:mo><m:mi>s</m:mi><m:mo>|</m:mo><m:mo>,</m:mo><m:msubsup><m:mi>&#963;</m:mi><m:mi>t</m:mi><m:mn>2</m:mn></m:msubsup><m:mo>|</m:mo><m:mi>s</m:mi><m:mo>|</m:mo><m:mo stretchy="false">)</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFneVtcqGGOaakiiGacqGF8oqBdaWgaaWcbaGaemiDaqhabeaakiabcYha8jabdohaZjabcYha8jabcYcaSiab+n8aZnaaDaaaleaacqWG0baDaeaacqaIYaGmaaGccqGG8baFcqWGZbWCcqGG8baFcqGGPaqkaaa@4B64@</m:annotation></m:semantics></m:math></inline-formula> with weights depending on the probabilities of sequences <it>t</it>. With reasonable assumptions about the length and the probability distribution of <it>t</it>, we can neglect all the components of the mixture except the one which has distribution <inline-formula><m:math name="1748-7188-2-11-i62" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mi mathvariant="script">N</m:mi><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFneVtaaa@383A@</m:annotation></m:semantics></m:math></inline-formula> (<it>&#956;</it>|<it>s</it>|, <it>&#963;</it><sup>2 </sup>|<it>s</it>|) where <inline-formula><m:math name="1748-7188-2-11-i63" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:mi>&#956;</m:mi><m:mo>=</m:mo><m:mstyle displaystyle="true"><m:msub><m:mo>&#8721;</m:mo><m:mrow><m:mi>x</m:mi><m:mo>&#8712;</m:mo><m:mi mathvariant="script">A</m:mi></m:mrow></m:msub><m:mrow><m:msub><m:mtext>p</m:mtext><m:mi>x</m:mi></m:msub><m:msub><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo></m:mrow><m:mrow><m:mi>y</m:mi><m:mo>&#8712;</m:mo><m:mi mathvariant="script">A</m:mi></m:mrow></m:msub><m:mo>{</m:mo><m:msub><m:mi>&#960;</m:mi><m:mrow><m:mo stretchy="false">[</m:mo><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>y</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub><m:mo>}</m:mo></m:mrow></m:mstyle></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaaiiGacqWF8oqBcqGH9aqpdaaeqaqaaiabbchaWnaaBaaaleaaieqacqGF4baEaeqaaOGagiyBa0MaeiyyaeMaeiiEaG3aaSbaaSqaaiab+Lha5jabgIGioprtHrhAL1wy0L2yHvtyaeHbnfgDOvwBHrxAJfwnaGabaiab9bq8bbqabaGccqGG7bWEcqWFapaCdaWgaaWcbaGaei4waSLae4hEaGNaeiilaWIae4xEaKNaeiyxa0fabeaakiabc2ha9bWcbaGae4hEaGNaeyicI4Sae0haXheabeqdcqGHris5aaaa@571A@</m:annotation></m:semantics></m:math></inline-formula> and <inline-formula><m:math name="1748-7188-2-11-i64" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#963;</m:mi><m:mn>2</m:mn></m:msup><m:mo>=</m:mo><m:mstyle displaystyle="true"><m:msub><m:mo>&#8721;</m:mo><m:mrow><m:mi>x</m:mi><m:mo>&#8712;</m:mo><m:mi mathvariant="script">A</m:mi></m:mrow></m:msub><m:mrow><m:msub><m:mtext>p</m:mtext><m:mi>x</m:mi></m:msub><m:msup><m:mrow><m:mo stretchy="false">(</m:mo><m:msub><m:mrow><m:mi>max</m:mi><m:mo>&#8289;</m:mo></m:mrow><m:mrow><m:mi>y</m:mi><m:mo>&#8712;</m:mo><m:mi mathvariant="script">A</m:mi></m:mrow></m:msub><m:mo>{</m:mo><m:msub><m:mi>&#960;</m:mi><m:mrow><m:mo stretchy="false">[</m:mo><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>y</m:mi><m:mo stretchy="false">]</m:mo></m:mrow></m:msub><m:mo>}</m:mo><m:mo>&#8722;</m:mo><m:mi>&#956;</m:mi><m:mo stretchy="false">)</m:mo></m:mrow><m:mn>2</m:mn></m:msup></m:mrow></m:mstyle></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaaiiGacqWFdpWCdaahaaWcbeqaaiabikdaYaaakiabg2da9maaqababaGaeeiCaa3aaSbaaSqaaGqabiab+Hha4bqabaGccqGGOaakcyGGTbqBcqGGHbqycqGG4baEdaWgaaWcbaGae4xEaKNaeyicI48enfgDOvwBHrxAJfwnHbqeg0uy0HwzTfgDPnwy1aaceaGae0haXheabeaakiabcUha7jab=b8aWnaaBaaaleaacqGGBbWwcqGF4baEcqGGSaalcqGF5bqEcqGGDbqxaeqaaOGaeiyFa0NaeyOeI0Iae8hVd0MaeiykaKYaaWbaaSqabeaacqaIYaGmaaaabaGae4hEaGNaeyicI4Sae0haXheabeqdcqGHris5aaaa@5DB4@</m:annotation></m:semantics></m:math></inline-formula>.</p>
         <p>Figure <figr fid="F3">3</figr> shows the evolution of the empirical density functions of optimal scores of <it>N</it>-maps with <it>N </it>in the range of 1 to 15. In Figure <figr fid="F4">4</figr>, we can see that the empirical density function corresponding to <it>N </it>= 1 in the local case is well approximated by an extreme value distribution. As <it>N </it>increases, even for small values, the empirical distributions differ more and more from extreme value distributions and approach quickly normal distributions both in local and global cases. For a given <it>N</it>, the empirical distributions of global optimal scores are closer to the normal approximations than the ones of local optimal scores.</p>
         <p>Even if the distribution of optimal scores is of unknown form for intermediate values of <it>N</it>, the empirical observations show that normal approximations fit well except for very small values. This fact leads us to measure significance of the score of an optimal <it>N</it>-map in terms of <it>Z</it>-values as in <abbrgrp><abbr bid="B9">9</abbr></abbrgrp>. The estimated <it>Z</it>-value of an optimal score <inline-formula><m:math name="1748-7188-2-11-i10" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#8499;</m:mi><m:mi>N</m:mi></m:msup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabd6eaobaaaaa@38E1@</m:annotation></m:semantics></m:math></inline-formula> (<it>s</it>, <it>t</it>) is the number of standard deviations separating this score from the mean:</p>
         <fig id="F3">
            <title>
               <p>Figure 3</p>
            </title>
            <caption>
               <p>Empirical and approximated density functions of the optimal scores of local (a) and global (b) <it>N</it>-maps (<it>N </it>= 1, ..., 15 from left to right)</p>
            </caption>
            <text>
               <p>Empirical and approximated density functions of the optimal scores of local (a) and global (b) <it>N</it>-maps (<it>N </it>= 1, ..., 15 from left to right). The <it>N</it>-maps are computed using BLOSUM62 substitution matrix (made positive by adding a constant term in the global case) over 15000 random sequences with the same lengths and symbol distributions as Case study 5.2.</p>
            </text>
            <graphic file="1748-7188-2-11-3"/>
         </fig>
         <fig id="F4">
            <title>
               <p>Figure 4</p>
            </title>
            <caption>
               <p>Empirical and approximated density functions of the optimal scores of: a) local 1-maps, 5-maps and 15-maps, b) global 1-maps, 5-maps and 15-maps</p>
            </caption>
            <text>
               <p>Empirical and approximated density functions of the optimal scores of: a) local 1-maps, 5-maps and 15-maps, b) global 1-maps, 5-maps and 15-maps. The <it>N</it>-maps are computed using BLOSUM62 substitution matrix over 15000 random sequences with the same lengths and symbol frequencies as Case study 5.2.</p>
            </text>
            <graphic file="1748-7188-2-11-4"/>
         </fig>
         <p>
            <display-formula>
               <m:math name="1748-7188-2-11-i65" xmlns:m="http://www.w3.org/1998/Math/MathML">
                  <m:semantics>
                     <m:mrow>
                        <m:mi>Z</m:mi>
                        <m:mo stretchy="false">(</m:mo>
                        <m:msup>
                           <m:mi>&#8499;</m:mi>
                           <m:mi>N</m:mi>
                        </m:msup>
                        <m:mo stretchy="false">(</m:mo>
                        <m:mi>s</m:mi>
                        <m:mo>,</m:mo>
                        <m:mi>t</m:mi>
                        <m:mo stretchy="false">)</m:mo>
                        <m:mo stretchy="false">)</m:mo>
                        <m:mo>=</m:mo>
                        <m:mfrac>
                           <m:mrow>
                              <m:msup>
                                 <m:mi>&#8499;</m:mi>
                                 <m:mi>N</m:mi>
                              </m:msup>
                              <m:mo stretchy="false">(</m:mo>
                              <m:mi>s</m:mi>
                              <m:mo>,</m:mo>
                              <m:mi>t</m:mi>
                              <m:mo stretchy="false">)</m:mo>
                              <m:mo>&#8722;</m:mo>
                              <m:msup>
                                 <m:mover accent="true">
                                    <m:mi>&#956;</m:mi>
                                    <m:mo>^</m:mo>
                                 </m:mover>
                                 <m:mi>N</m:mi>
                              </m:msup>
                              <m:mo stretchy="false">(</m:mo>
                              <m:mi>s</m:mi>
                              <m:mo>,</m:mo>
                              <m:mi>t</m:mi>
                              <m:mo stretchy="false">)</m:mo>
                           </m:mrow>
                           <m:mrow>
                              <m:msup>
                                 <m:mover accent="true">
                                    <m:mi>&#963;</m:mi>
                                    <m:mo>^</m:mo>
                                 </m:mover>
                                 <m:mi>N</m:mi>
                              </m:msup>
                              <m:mo stretchy="false">(</m:mo>
                              <m:mi>s</m:mi>
                              <m:mo>,</m:mo>
                              <m:mi>t</m:mi>
                              <m:mo stretchy="false">)</m:mo>
                           </m:mrow>
                        </m:mfrac>
                     </m:mrow>
                     <m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacqWGAbGwcqGGOaakt0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabd6eaobaakiabcIcaOiabdohaZjabcYcaSiabdsha0jabcMcaPiabcMcaPiabg2da9maalaaabaGae83mH00aaWbaaSqabeaacqWGobGtaaGccqGGOaakcqWGZbWCcqGGSaalcqWG0baDcqGGPaqkcqGHsisliiGacuGF8oqBgaqcamaaCaaaleqabaGaemOta4eaaOGaeiikaGIaem4CamNaeiilaWIaemiDaqNaeiykaKcabaGaf43WdmNbaKaadaahaaWcbeqaaiabd6eaobaakiabcIcaOiabdohaZjabcYcaSiabdsha0jabcMcaPaaaaaa@5C78@</m:annotation>
                  </m:semantics>
               </m:math>
            </display-formula>
         </p>
         <p>where <inline-formula><m:math name="1748-7188-2-11-i66" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mover accent="true"><m:mi>&#956;</m:mi><m:mo>^</m:mo></m:mover><m:mi>N</m:mi></m:msup><m:mo stretchy="false">(</m:mo><m:mi>s</m:mi><m:mo>,</m:mo><m:mi>t</m:mi><m:mo stretchy="false">)</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaaiiGacuWF8oqBgaqcamaaCaaaleqabaGaemOta4eaaOGaeiikaGIaem4CamNaeiilaWIaemiDaqNaeiykaKcaaa@3547@</m:annotation></m:semantics></m:math></inline-formula> and <inline-formula><m:math name="1748-7188-2-11-i67" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mover accent="true"><m:mi>&#963;</m:mi><m:mo>^</m:mo></m:mover><m:mi>N</m:mi></m:msup><m:mo stretchy="false">(</m:mo><m:mi>s</m:mi><m:mo>,</m:mo><m:mi>t</m:mi><m:mo stretchy="false">)</m:mo></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaaiiGacuWFdpWCgaqcamaaCaaaleqabaGaemOta4eaaOGaeiikaGIaem4CamNaeiilaWIaemiDaqNaeiykaKcaaa@3554@</m:annotation></m:semantics></m:math></inline-formula> denote respectively the mean and the standard deviation of the optimal scores estimated from a given number of trials of pairs of random sequences with the same lengths and the same frequencies of symbols as <it>s </it>and <it>t</it>. The higher the <it>Z</it>-value of <inline-formula><m:math name="1748-7188-2-11-i10" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msup><m:mi>&#8499;</m:mi><m:mi>N</m:mi></m:msup></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaat0uy0HwzTfgDPnwy1egaryqtHrhAL1wy0L2yHvdaiqaacqWFZestdaahaaWcbeqaaiabd6eaobaaaaa@38E1@</m:annotation></m:semantics></m:math></inline-formula> (<it>s</it>, <it>t</it>), the lower the probability of observing a greater score in the normal approximation. So an optimal <it>N</it>-map of <it>s </it>over <it>t </it>with a higher <it>Z</it>-value will be consider more significant.</p>
         <p>The <it>Z</it>-values must be taken with caution for small <it>N </it>&#8211; let us say less than 5 &#8211; because the corresponding probabilities are underestimated (the tails of the empirical distributions are heavier than the tails of the normal ones when <it>N </it>is smaller). This point is not crucial because we use <it>Z</it>-values to select a relevant number of part <it>N </it>rather than to assess an absolute significance of <it>N</it>-maps, but it could cause an underestimation of the "real" optimal number of parts. When the estimated most significant number of parts is small, it may be useful to check one or two next values.</p>
         <p>Because it is time consuming and its accuracy is not rigorously evaluated, the way of estimating the significance of an optimal score is not fully satisfying. Analytical approximations of the distributions of the optimal scores should be pretty much better but they are beyond the scope of this article.</p>
      </sec>
      <sec>
         <st>
            <p>4 Evaluation</p>
         </st>
         <p>To evaluate the ability of the approach to retrieve segments of sequences related by evolution, we apply a given number of evolutionary events (mutations and shuffles) to random sequences and we measure the intersection between the homologies known from the artificial evolution and the ones reported by the most significant <it>N</it>-map.</p>
         <p>More precisely, given a length <it>L</it>, a number of parts <it>K </it>and an identity proportion <it>&#945;</it>, the protocol follows the steps below for a fixed number of trials.</p>
         <p>1. Generate a reference random sequence <it>s</it><sub><it>a </it></sub>iid with uniform probabilities over symbols of length <it>L </it>over an alphabet of 4 or 20 symbols ("random DNA" or "random protein").</p>
         <p>2. Split <it>s</it><sub><it>a </it></sub>into <it>K </it>equal parts and let <it>s</it><sub><it>b </it></sub>be the sequence obtained by shuffling these parts with respect to the reverse permutation: (1, 2, ..., <it>K</it>) &#8594; (<it>K, K </it>- 1, ..., 1). This step defines a reference <it>K</it>-map of <it>s</it><sub><it>a </it></sub>over <it>s</it><sub><it>b</it></sub>.</p>
         <p>3. Let <inline-formula><m:math name="1748-7188-2-11-i68" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mi>s</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>b</m:mi></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuWGZbWCgaqbamaaBaaaleaacqWGIbGyaeqaaaaa@2FA0@</m:annotation></m:semantics></m:math></inline-formula> be a sequence obtained by mutating (1 - <it>&#945;</it>) &#215; <it>L </it>different positions of <it>s</it><sub><it>b </it></sub>randomly chosen with uniform probabilities. Here "mutating" implies an actual (and random) change of symbol, so the identity proportion between <it>s</it><sub><it>b </it></sub>and <inline-formula><m:math name="1748-7188-2-11-i68" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mi>s</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>b</m:mi></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuWGZbWCgaqbamaaBaaaleaacqWGIbGyaeqaaaaa@2FA0@</m:annotation></m:semantics></m:math></inline-formula> is <it>&#945;</it>. The <it>K</it>-map of Step 2 is kept as reference when mapping <it>s</it><sub><it>a </it></sub>over <inline-formula><m:math name="1748-7188-2-11-i68" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mi>s</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>b</m:mi></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuWGZbWCgaqbamaaBaaaleaacqWGIbGyaeqaaaaa@2FA0@</m:annotation></m:semantics></m:math></inline-formula>.</p>
         <p>4. Determine the number <it>M </it>leading to the moat significant global <it>M</it>-map of <it>s</it><sub><it>a </it></sub>over <inline-formula><m:math name="1748-7188-2-11-i68" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mi>s</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>b</m:mi></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuWGZbWCgaqbamaaBaaaleaacqWGIbGyaeqaaaaa@2FA0@</m:annotation></m:semantics></m:math></inline-formula> (by using Identity substitution matrix and by checking the <it>Z</it>-values for <it>M </it>between 1 and <it>K </it>+ 10).</p>
         <p>5. Compute an optimal global <it>M</it>-map of <it>s</it><sub><it>a </it></sub>over <inline-formula><m:math name="1748-7188-2-11-i68" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mi>s</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>b</m:mi></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuWGZbWCgaqbamaaBaaaleaacqWGIbGyaeqaaaaa@2FA0@</m:annotation></m:semantics></m:math></inline-formula> and measure its intersection with the reference <it>K</it>-map of Step 2, <it>i.e</it>. the number of pairs of positions of <it>s</it><sub><it>a </it></sub>and <inline-formula><m:math name="1748-7188-2-11-i68" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mi>s</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>b</m:mi></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuWGZbWCgaqbamaaBaaaleaacqWGIbGyaeqaaaaa@2FA0@</m:annotation></m:semantics></m:math></inline-formula> which are associated both in a diagonal of the reference <it>K</it>-map and in a diagonal of the optimal <it>M</it>-map computed. Normalize this value by dividing by <it>L </it>= |<it>s</it><sub><it>a</it></sub>| = |<inline-formula><m:math name="1748-7188-2-11-i68" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mi>s</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>b</m:mi></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuWGZbWCgaqbamaaBaaaleaacqWGIbGyaeqaaaaa@2FA0@</m:annotation></m:semantics></m:math></inline-formula>| to get the <it>intersection ratio</it>.</p>
         <p>We do not apply insertion/deletion events over sequences in the protocol because the approach deals with this type of evolution exactly in the same way as the "split and shuffle" of Step 2.</p>
         <p>Figure <figr fid="F5">5</figr> shows the evolution of the means of the intersection ratios for <it>K </it>= 2, 5, 10 and 15 parts, as functions of the identity proportion conserved in Step 3, over:</p>
         <fig id="F5">
            <title>
               <p>Figure 5</p>
            </title>
            <caption>
               <p>Evolution of the intersection ratio with the identity proportion for: a) random DNA sequences of length 500, b) random DNA sequences of length 250, c) random protein sequences of length 250</p>
            </caption>
            <text>
               <p>Evolution of the intersection ratio with the identity proportion for: a) random DNA sequences of length 500, b) random DNA sequences of length 250, c) random protein sequences of length 250.</p>
            </text>
            <graphic file="1748-7188-2-11-5"/>
         </fig>
         <p>&#8226; 500 random DNA sequences of length 500 (Figure <figr fid="F5">5a</figr>),</p>
         <p>&#8226; 500 random DNA sequences of length 250 (Figure <figr fid="F5">5b</figr>),</p>
         <p>&#8226; 500 random protein sequences of length 250 (Figure <figr fid="F5">5c</figr>).</p>
         <p>The error bars displayed in Figure <figr fid="F5">5</figr> report the corresponding standard deviations.</p>
         <p>The agreement of the results is perfect or almost perfect when the identity proportion is high. The identity proportion, the number of parts, the length of the sequences and the number of symbols in the alphabet affect the intersection ratio. This can be explained by the fact that the ability of the approach to associate a given segment of <it>s</it><sub><it>a </it></sub>with its artificially evolved counterparts in <inline-formula><m:math name="1748-7188-2-11-i68" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mi>s</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>b</m:mi></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuWGZbWCgaqbamaaBaaaleaacqWGIbGyaeqaaaaa@2FA0@</m:annotation></m:semantics></m:math></inline-formula> depends on the probability of observing another segment in <inline-formula><m:math name="1748-7188-2-11-i68" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mi>s</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>b</m:mi></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuWGZbWCgaqbamaaBaaaleaacqWGIbGyaeqaaaaa@2FA0@</m:annotation></m:semantics></m:math></inline-formula> with a better score (here identity proportion). For instance in the case of DNA sequences the expected identity proportion of two segments is 0.25 under the random model used in the protocol. So it is not surprising to observe that the intersection ratio is 0 when the identity proportion artificially required in Step 3 is smaller than this value (Figure <figr fid="F5">5a</figr> and Figure <figr fid="F5">5b</figr>). In the case of protein sequences, the expected identity proportion is 0.05. Eve tunes smaller than in the DNA case and we observe better results for small values of the identity proportion in Figure <figr fid="F5">5c</figr>. Clearly the identity proportion and the length of the sequence <inline-formula><m:math name="1748-7188-2-11-i68" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:semantics><m:mrow><m:msub><m:msup><m:mi>s</m:mi><m:mo>&#8242;</m:mo></m:msup><m:mi>b</m:mi></m:msub></m:mrow><m:annotation encoding="MathType-MTEF">
 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaacuWGZbWCgaqbamaaBaaaleaacqWGIbGyaeqaaaaa@2FA0@</m:annotation></m:semantics></m:math></inline-formula> affect the probability of associating with the artificial counterpart. The role played by the number of parts is twofold. First, since it determines the length of the segments split in Step 2 of our protocol, it has a direct effect on the preceding probability. Second, it increases the number of boundaries and the possibility of an error when associating positions which are located at the beginning or at the end of the segments.</p>
      </sec>
      <sec>
         <st>
            <p>5 Case studies</p>
         </st>
         <p>In the three first case studies, <it>N</it>-maps are represented as pictures where horizontal bold lines represent the sequences compared. The names of the sequences are specified over and under the lines. Each diagonal is represented as two boxes connected by an edge, where each box corresponds to a segment of one of the sequences. The height of the two boxes depends upon the score of the diagonal divided by its length (see Figures <figr fid="F6">6</figr>, <figr fid="F7">7</figr> and <figr fid="F8">8</figr>). This type of graphical representation is also used in <abbrgrp><abbr bid="B1">1</abbr><abbr bid="B6">6</abbr></abbrgrp>. In the last case study we display <it>N</it>-maps as dotplots in order to make the results easily comparable with the ones of <abbrgrp><abbr bid="B13">13</abbr></abbrgrp>. For convenience reasons, the scores represented in all the figures are normalized by being divided by the greatest entry of the substitution matrix.</p>
         <fig id="F6">
            <title>
               <p>Figure 6</p>
            </title>
            <caption>
               <p>a) An optimal local 5-map both of SHK1 over ABL1 and of ABL1 over SHK1</p>
            </caption>
            <text>
               <p>a) An optimal local 5-map both of SHK1 over ABL1 and of ABL1 over SHK1. b) An optimal global 9-map of SHK1 over ABL1. c) An optimal global 15-map of ABL1 over SHK1. Local and global maps are computed using BLOSUM62 substitution matrix (made positive by adding a constant term in the global case).</p>
            </text>
            <graphic file="1748-7188-2-11-6"/>
         </fig>
         <fig id="F7">
            <title>
               <p>Figure 7</p>
            </title>
            <caption>
               <p>a) An optimal local 5-map of CRK over NCK</p>
            </caption>
            <text>
               <p>a) An optimal local 5-map of CRK over NCK. b) An optimal local 6-map of NCK over CRK. The <it>N</it>-maps are computed using BLOSUM62 substitution matrix.</p>
            </text>
            <graphic file="1748-7188-2-11-7"/>
         </fig>
         <fig id="F8">
            <title>
               <p>Figure 8</p>
            </title>
            <caption>
               <p>a) An optimal local 5-map of P-element over P-repressor and reciprocally (BLAST substitution matrix)</p>
            </caption>
            <text>
               <p>a) An optimal local 5-map of P-element over P-repressor and reciprocally (BLAST substitution matrix). b) An optimal global 15-map of P-element over P-repressor (Identity substitution matrix). c) An optimal global 24-map of P-repressor over P-element (Identity substitution matrix). Diagonals with average score (here identity proportion) smaller than 0.6 were removed from the global <it>N</it>-maps.</p>
            </text>
            <graphic file="1748-7188-2-11-8"/>
         </fig>
         <sec>
            <st>
               <p>5.1 Proteins 1</p>
            </st>
            <p>We begin with a case study from <abbrgrp><abbr bid="B3">3</abbr></abbrgrp>. It compares SHK1 protein present in <it>Dictyostelium </it>(SwissProt ID <ext-link ext-link-type="sprot" ext-link-id="Q9BI25">Q9BI25</ext-link>) with ABL1 protein present in human (SwissProt ID ABL1_HUMAN). These proteins share two common domains which occur in a different order in each protein.</p>
            <p>When comparing these sequences, the most significant optimal scores are obtained for:</p>
            <p>&#8226; <it>N </it>= 5 for both local maps of SHK1 over ABL1 and of ABL1 over SHK1 (<it>Z</it>-values respectively 36.67 and 36.79 &#8211; Figure <figr fid="F6">6a</figr>),</p>
            <p>&#8226; <it>N </it>= 9 for global map of SHK1 over ABL1 (<it>Z</it>-value 19.46 &#8211; Figure <figr fid="F6">6b</figr>),</p>
            <p>&#8226; <it>N </it>= 15 for global map of ABL1 over SHK1 (<it>Z</it>-value 10.79 &#8211; Figure <figr fid="F6">6c</figr>).</p>
            <p>With the global approach, each part of the sequence to map is associated to the segment which maximizes its gapless alignment score in the second sequence, even if this score is small and does not correspond to a "real" homology. As a result, a most significant global <it>N</it>-maps contain a greater number of diagonals and look more confusing than with the local case. However, despite the fact that not all the homologies reported are relevant, the global <it>N</it>-maps are interesting because they provide a more complete representation of the common elements. They allow us to consider diagonals formed by segments which are not homologous or not long enough to be selected in an optimal local <it>N</it>-map but which can be meaningful and can suggest an evolutionary history when taken in the whole context. Let us illustrate this point with the 15-map of ABL1 over SHK1 (Figure <figr fid="F6">6c</figr>). The diagonal with the ABL1-interval [1, 27] (the first segment of ABL1 in Figure <figr fid="F6">6c</figr>) is too short to be selected in the most significant optimal local <it>N</it>-map but it can make sense when taking into account the larger diagonal with the ABL1-interval [113,198] (the third segment of ABL1 in Figure <figr fid="F6">6c</figr>) that follows it &#8211; not consecutively &#8211; in the two sequences. This could suggest the deletion or the insertion of the ABL1-interval [28 &#8211; 112] along the evolutionary history of this protein.</p>
            <p>A simple solution to make a global <it>N</it>-map clearer is to select only diagonals with scores greater than a given threshold and/or long enough (see Figure <figr fid="F8">8</figr> &#8211; case study 5.3). In particular, by considering only diagonals with average scores over a threshold in the two global <it>N</it>-maps of this case study, we would obtain pictures very similar to the local 5-map.</p>
            <p>Finally, the common domains reported in <abbrgrp><abbr bid="B3">3</abbr></abbrgrp> are both retrieved in the homologies pointed out with the local and the global <it>N</it>-maps: Pkinase domain (positions about 110&#8211;200 in ABL1) and SH2 domain (positions about 230&#8211;510 in ABL1). The homology involving the SH2 domain is split into 4 diagonals in all the maps. Naturally, as these two domains are shuffled between the two sequences, a classical alignment could not point out the two homologies at once.</p>
         </sec>
         <sec>
            <st>
               <p>5.2 Proteins 2</p>
            </st>
            <p>We compare two proteins sequences from <abbrgrp><abbr bid="B6">6</abbr></abbrgrp>. A CRK like protein (SwissProt ID <ext-link ext-link-type="sprot" ext-link-id="P46109">P46109</ext-link>) and a NCK adaptor protein (SwissProt ID <ext-link ext-link-type="sprot" ext-link-id="P16333">P16333</ext-link>). This example is given to illustrate the way of pointing out repeated elements and we consider only local <it>N</it>-maps. The most significant optimal scores are obtained for:</p>
            <p>&#8226; <it>N </it>= 5 for local <it>N</it>-maps of CRK over NCK (<it>Z</it>-value 17.29 &#8211; Figure <figr fid="F7">7a</figr>),</p>
            <p>&#8226; <it>N </it>= 6 for local <it>N</it>-maps of NCK over CRK (<it>Z</it>-value 18.91 &#8211; Figure <figr fid="F7">7b</figr>).</p>
            <p>In Figure <figr fid="F7">7</figr> we can see that the most significant optimal local <it>N</it>-map of NCK over CRK has an extra diagonal with regard to the <it>N</it>-map of CRK over NCK. Apart from this extra diagonal, these two maps share almost the same diagonals set. There are only some small changes on their boundaries, essentially because the non-overlapping constraint of Definition 1 applies either to one or the other sequence. The extra diagonal is composed of a segment of NCK (positions 226&#8211;247), which was not included in the diagonals of the reciprocal map, and a segment of CRK which is also part of another diagonal formed with the positions 35&#8211;58 of NCK. Since they are both homologous to a same segment of CRK, we have a clue that these two segments of NCK are repeated elements. Note that retrieving all the repeated common elements of two sequences needs generally to map one sequence over another and reciprocally to make sure that all the associations of segments are reported.</p>
         </sec>
         <sec>
            <st>
               <p>5.3 Transposons</p>
            </st>
            <p>We consider here DNA sequences of two transposons elements occurring in two species of <it>Drosophila </it>and studied in <abbrgrp><abbr bid="B14">14</abbr></abbrgrp>: P-element (GenBank ID <ext-link ext-link-type="gen" ext-link-id="AY116625.1">AY116625.1</ext-link>) and P-repressor (GenBank ID <ext-link ext-link-type="gen" ext-link-id="AF169142.2">AF169142.2</ext-link>). We use the BLAST substitution matrix for nucleotides <abbrgrp><abbr bid="B15">15</abbr></abbrgrp> for local <it>N</it>-maps and Identity matrix for global ones.</p>
            <p>The most significant optimal scores of <it>N</it>-maps are obtained for:</p>
            <p>&#8226; <it>N </it>= 5 for local maps both of P-element over P-repressor (<it>Z</it>-value 425.83) and of P-repressor over P-element (<it>Z</it>-value 420.24) corresponding to a same optimal 5-map (Figure <figr fid="F8">8a</figr>),</p>
            <p>&#8226; <it>N </it>= 19 for global maps of P-element over P-repressor (<it>Z</it>-value 132.75 &#8211; Figure <figr fid="F8">8b</figr>),</p>
            <p>&#8226; <it>N </it>= 24 for global maps of P-repressor over P-element (<it>Z</it>-value 119.96 &#8211; Figure <figr fid="F8">8c</figr>).</p>
            <p>The corresponding maps are represented in Figure <figr fid="F8">8</figr> in which we keep only the diagonals of the global <it>N</it>-maps with more than 60% of identity. As expected, filtering the diagonals according to their scores makes the pictures clearer and closer to the local one.</p>
            <p>Once more, many diagonals are shared between these three <it>N</it>-maps with small variations in their-boundaries. The two global maps show an extra homologous region formed by several diagonals probably too short to be taken into account in the most significant local <it>N</it>-map.</p>
            <p>In Figures <figr fid="F6">6</figr>, <figr fid="F7">7</figr>, and <figr fid="F8">8</figr> we can remark series of diagonals composed of intervals of positions which seem contiguous and occur in the same order in the two sequences. They cannot be replaced by a unique diagonal because they are separated by small gaps (too small to appear at the scale of figures). In other words, <it>N</it>-maps computing acts over these positions like a classical alignment.</p>
         </sec>
         <sec>
            <st>
               <p>5.4 Microbial genomes</p>
            </st>
            <p>This case study illustrates how the approach can be applied to comparative genomics. We compare two microbial genomes: <it>Chlamydia trachomatis </it>(GenBank ID <ext-link ext-link-type="gen" ext-link-id="AE001273">AE001273</ext-link>) and <it>Chlamydophila pneumoniae </it>(GenBank ID <ext-link ext-link-type="gen" ext-link-id="AE001363">AE001363</ext-link>) studied in <abbrgrp><abbr bid="B13">13</abbr></abbrgrp>.</p>
            <p>Each genome is represented by the sequence of its coding genes in the order they occur. Genomes of <it>Chlamydia trachomatis </it>and <it>Chlamydophila pneumoniae </it>contain respectively 895 and 1052 genes. A gene is identified with the sequence of amino acids of the corresponding protein. Thus, there are as much different symbols as the total length of the two genomes (except the unlikely case where several genes share exactly the same sequence of amino acids).</p>
            <p>We compare two sequences/genomes <it>s </it>and <it>t </it>of symbols/genes which are themselves sequences of amino acids and we need to define a substitution score <it>&#960; </it>between genes (actually this is only required between the genes of the first genome and the genes of the second one). For two sequences of amino acids <it>p</it><sub><it>a </it></sub>and <it>p</it><sub><it>b</it></sub>, we set <it>&#960;</it>[<it>p</it><sub><it>a</it></sub>, <it>p</it><sub><it>b</it></sub>] to the (highest) identity proportion of an alignment of <it>p</it><sub><it>a </it></sub>and <it>p</it><sub><it>b</it></sub>. As this substitution score is non-negative, we will consider global <it>N</it>-maps.</p>
            <p>Because of the particular type of sequences studied here, the estimations of the empirical means and of the standard deviations of the <it>Z</it>-values are computed in a slightly different way from the one described in Section 3. To estimate the significance of a <it>N</it>-map score of a genome <it>s </it>over a genome <it>t</it>, we compute over a given number of trials, the empirical mean and the standard deviation of the optimal scores obtained by mapping a random shuffle of <it>s</it>, over <it>t</it>. The empirical distributions of the optimal scores observed by shuffling the first genome depend a lot on the nature of the substitution scores between the genes of the first genome and the genes of the second one. But in non degenerated cases (when the substitution levels between genes are not all the same) we observe a behaviour close to the one described in Section 3. In this case study the most significant optimal scores of global <it>N</it>-maps are obtained for:</p>
            <p>&#8226; <it>N </it>= 94 for the global map of <it>Chlamydia trachomatis </it>over <it>Chlamydophila pneumoniae </it>(<it>Z</it>-value 289.61 &#8211; Figure <figr fid="F9">9a</figr>),</p>
            <fig id="F9">
               <title>
                  <p>Figure 9</p>
               </title>
               <caption>
                  <p>a) Dotplot representation of an optimal global 94-map of <it>Chlamydia trachomatis </it>over <it>Chlamydophila pneumoniae</it></p>
               </caption>
               <text>
                  <p>a) Dotplot representation of an optimal global 94-map of <it>Chlamydia trachomatis </it>over <it>Chlamydophila pneumoniae</it>. b) Dotplot representation of an optimal global 97-map of <it>Chlamydophila pneumoniae </it>over <it>Chlamydia trachomatis</it>. Darker is a diagonal, higher is its length-normalized score.</p>
               </text>
               <graphic file="1748-7188-2-11-9"/>
            </fig>
            <p>&#8226; <it>N </it>= 97 for the global map of <it>Chlamydophila pneumoniae </it>over <it>Chlamydia trachomatis </it>(<it>Z</it>-value 265.23 &#8211; Figure <figr fid="F9">9b</figr>).</p>
            <p>Because of the number of diagonals involved in the rearrangement, which is relatively complex and includes several inversions, we represent <it>N</it>-maps as dotplots (see Figure <figr fid="F9">9</figr>). The authors of <abbrgrp><abbr bid="B13">13</abbr></abbrgrp> use this type of representation and show similar figures.</p>
            <p>The <it>N</it>-map approach allows us to perform genomes comparison without the initial step of identification of clusters of orthologous genes which is generally a necessary (and sometimes a critical) stage before comparing genomes <abbrgrp><abbr bid="B16">16</abbr><abbr bid="B17">17</abbr></abbrgrp>. However, the <it>N</it>-map approach is different to methods such as sorting by reversals because it does not construct an evolutionary history (in the sense that it does not provide a sequence of evolutionary events transforming the genomes). It is rather a way to connect conserved segments and can be seen as an alternative to identify orthologous genes. The fact that two genes are associated in a <it>N</it>-map does not depend only on the level of homology between these genes, but also benefits from the levels of homology between their respective neighbourhoods.</p>
         </sec>
      </sec>
      <sec>
         <st>
            <p>6 Discussion and future work</p>
         </st>
         <p>Mapping sequences by parts is a simple and effective way to find out similarities between two sequences in the presence of evolutionary events that do not preserve their linear order. This first version was written in order to introduce the idea of "computational mapping of sequences" and needs some technical improvements and extensions such as dealing differently with the bounds of the parts which are mapped or distinguishing different costs for mutational events, to become more realistic from a biological point of view.</p>
         <p>In the local case, the optimal <it>N</it>-map of <it>s </it>over <it>t </it>is close to the selection of the <it>N </it>gapless alignments with higher scores. So the results obtained with local <it>N</it>-maps should be generally close to the ones obtained by methods based on local (gapped or not) alignments <abbrgrp><abbr bid="B2">2</abbr><abbr bid="B3">3</abbr><abbr bid="B6">6</abbr></abbrgrp>. The main difference stands in the non-overlapping constraint of Definition 1. From our point of view, the originality of the method actually makes sense with global <it>N</it>-maps. Strengths and weaknesses of global <it>versus </it>local <it>N</it>-maps are analogous to the alignment case. The local approach allows us to report only significant homologies. But a drawback is that the level of significance needs to be fixed <it>a priori</it>, generally by shifting the entries of the substitution matrix more or less negatively. On the other hand, with the global approach (a positive matrix), adding a same positive constant to all the entries of the substitution matrix leaves the resulting optimal <it>N</it>-maps unchanged. A first drawback is that even weak homologies are reported, but this is not a real problem since they can be easily filtered. A more serious concern is that a strong homology can be possibly diluted in a longer (but weaker) one.</p>
         <p>The method can be extended in several directions. A first natural way is to allow gaps while mapping each part of the first sequence. Basically it can be done by extending the definition of diagonal to not constrain the lengths of the two segments to be equal and by defining the score of an "extended diagonal" as the alignment score (penalizing gaps) of its two segments. The algorithms computing the maximal scores and optimal <it>N</it>-maps with extended diagonal scores (computed with linear or affine gap penalties) are essentially the same as <b>Alg_1 </b>and <b>Alg_2</b>. In particular, their orders of time and memory space complexities do not change. In fact, the current implementation of the method provides an option to align parts with a linear gap penalty. Nevertheless, we presented here the method with the gapless case because it appears conceptually clearer and does not need any parameter such as a gap penalty (this parameter is critical for the distributions of the optimal scores and they appear more confusing in the gapped case).</p>
         <p>Further in the same direction, an interesting possibility of extension is to associate different kinds of penalties for insertions/deletions, inversions and shuffling, and to compute the greatest score of a map of <it>s </it>over <it>t </it>according to a substitution matrix and these penalties. From an algorithmic point of view and with reasonable kinds of penalties, this can be done by Dynamic Programming equations analogous to the ones used in <b>Alg_1</b>. These equations could be directly applied to compute the best score and an optimal set of diagonals of a "penalized map" of <it>s </it>over <it>t </it>with complexity <it>O </it>(|<it>s</it>| &#215; |<it>t</it>|). Setting the different values of penalties is a natural way to introduce biological knowledges in the approach but this needs a strong expertise in sequence analysis. We are interested in collaborations in this direction.</p>
      </sec>
   </bdy>
   <bm>
      <ack>
         <sec>
            <st>
               <p>Acknowledgements</p>
            </st>
            <p>We thank the Centro de Modelamiento Matem&#225;tico (UMR 2071) and the CNRS which made this collaboration possible and in particular Alejandro Maass and Servet Martinez for helpful discussions. The support and hospitality of both institutions are greatly appreciated. We also thank the anonymous referees for their careful reading of the manuscript and their helpful comments.</p>
         </sec>
      </ack>
      <refgrp>
         <bibl id="B1">
            <title>
               <p>Transformation distances: a family of dissimilarity measures based on movements of segments</p>
            </title>
            <aug>
               <au>
                  <snm>Varr&#233;</snm>
                  <fnm>JS</fnm>
               </au>
               <au>
                  <snm>Delahaye</snm>
                  <fnm>JP</fnm>
               </au>
               <au>
                  <snm>Rivals</snm>
                  <fnm>E</fnm>
               </au>
            </aug>
            <source>Bioinformatics</source>
            <pubdate>1999</pubdate>
            <volume>15</volume>
            <fpage>194</fpage>
            <lpage>202</lpage>
            <xrefbib>
               <pubidlist>
                  <pubid idtype="doi">10.1093/bioinformatics/15.3.194</pubid>
                  <pubid idtype="pmpid" link="fulltext">10222406</pubid>
               </pubidlist>
            </xrefbib>
         </bibl>
         <bibl id="B2">
            <title>
               <p>Glocal alignment: finding rearrangements during alignment</p>
            </title>
            <aug>
               <au>
                  <snm>Brudno</snm>
                  <fnm>M</fnm>
               </au>
               <au>
                  <snm>Malde</snm>
                  <fnm>S</fnm>
               </au>
               <au>
                  <snm>Poliakov</snm>
                  <fnm>A</fnm>
               </au>
               <au>
                  <snm>Do</snm>
                  <fnm>C</fnm>
               </au>
               <au>
                  <snm>Couronne</snm>
                  <fnm>O</fnm>
               </au>
               <au>
                  <snm>Dubchak</snm>
                  <fnm>I</fnm>
               </au>
               <au>
                  <snm>Batzoglou</snm>
                  <fnm>S</fnm>
               </au>
            </aug>
            <source>Bioinformatics</source>
            <pubdate>2003</pubdate>
            <volume>19</volume>
            <fpage>i54</fpage>
            <lpage>i62</lpage>
            <xrefbib>
               <pubidlist>
                  <pubid idtype="doi">10.1093/bioinformatics/btg1005</pubid>
                  <pubid idtype="pmpid" link="fulltext">12855437</pubid>
               </pubidlist>
            </xrefbib>
         </bibl>
         <bibl id="B3">
            <title>
               <p>A novel method for multiple alignment of sequences with repeated and shuffled elements</p>
            </title>
            <aug>
               <au>
                  <snm>Raphael</snm>
                  <fnm>B</fnm>
               </au>
               <au>
                  <snm>Zhi</snm>
                  <fnm>D</fnm>
               </au>
               <au>
                  <snm>Tang</snm>
                  <fnm>H</fnm>
               </au>
               <au>
                  <snm>Pevzner</snm>
                  <fnm>P</fnm>
               </au>
            </aug>
            <source>Genome Res</source>
            <pubdate>2004</pubdate>
            <volume>14</volume>
            <fpage>2336</fpage>
            <lpage>2346</lpage>
            <xrefbib>
               <pubidlist>
                  <pubid idtype="pmcid">525693</pubid>
                  <pubid idtype="pmpid" link="fulltext">15520295</pubid>
                  <pubid idtype="doi">10.1101/gr.2657504</pubid>
               </pubidlist>
            </xrefbib>
         </bibl>
         <bibl id="B4">
            <title>
               <p>On the Transformation Distance Problem</p>
            </title>
            <aug>
               <au>
                  <snm>Behzadi</snm>
                  <fnm>B</fnm>
               </au>
               <au>
                  <snm>Steyaert</snm>
                  <fnm>JM</fnm>
               </au>
            </aug>
            <source>SPIRE</source>
            <pubdate>2004</pubdate>
            <fpage>310</fpage>
            <lpage>320</lpage>
         </bibl>
         <bibl id="B5">
            <title>
               <p>Comparison of Minisatellites</p>
            </title>
            <aug>
               <au>
                  <snm>B&#233;rard</snm>
                  <fnm>S</fnm>
               </au>
               <au>
                  <snm>Rivals</snm>
                  <fnm>E</fnm>
               </au>
            </aug>
            <source>Journal of Computational biology</source>
            <pubdate>2003</pubdate>
            <volume>10</volume>
            <fpage>357</fpage>
            <lpage>372</lpage>
            <xrefbib>
               <pubidlist>
                  <pubid idtype="doi">10.1089/10665270360688066</pubid>
                  <pubid idtype="pmpid" link="fulltext">12935333</pubid>
               </pubidlist>
            </xrefbib>
         </bibl>
         <bibl id="B6">
            <title>
               <p>Swaps in protein sequences</p>
            </title>
            <aug>
               <au>
                  <snm>Fliess</snm>
                  <fnm>A</fnm>
               </au>
               <au>
                  <snm>Motro</snm>
                  <fnm>B</fnm>
               </au>
               <au>
                  <snm>Unger</snm>
                  <fnm>R</fnm>
               </au>
            </aug>
            <source>Proteins</source>
            <pubdate>2002</pubdate>
            <volume>48</volume>
            <fpage>377</fpage>
            <lpage>387</lpage>
            <xrefbib>
               <pubidlist>
                  <pubid idtype="doi">10.1002/prot.10156</pubid>
                  <pubid idtype="pmpid" link="fulltext">12112704</pubid>
               </pubidlist>
            </xrefbib>
         </bibl>
         <bibl id="B7">
            <title>
               <p>Matching sequences under deletion/insertion constraint</p>
            </title>
            <aug>
               <au>
                  <snm>Sankoff</snm>
                  <fnm>D</fnm>
               </au>
            </aug>
            <source>Proc Natl Acad Sci USA</source>
            <pubdate>1972</pubdate>
            <volume>69</volume>
            <fpage>4</fpage>
            <lpage>6</lpage>
            <xrefbib>
               <pubidlist>
                  <pubid idtype="pmcid">427531</pubid>
                  <pubid idtype="pmpid">4500555</pubid>
                  <pubid idtype="doi">10.1073/pnas.69.1.4</pubid>
               </pubidlist>
            </xrefbib>
         </bibl>
         <bibl id="B8">
            <title>
               <p>Sequence alignment without gap penalties</p>
            </title>
            <aug>
               <au>
                  <snm>Roytberg</snm>
                  <fnm>M</fnm>
               </au>
            </aug>
            <source>Proceedings of the First International Conference on Bioinformatics of Genome Regulation and Structure</source>
            <publisher>Novosibirsk, Russia</publisher>
            <pubdate>1998</pubdate>
            <volume>2</volume>
            <fpage>311</fpage>
            <lpage>313</lpage>
         </bibl>
         <bibl id="B9">
            <title>
               <p>Statistical evaluation and comparison of a pairwise alignment algorithm that a priori assigns the number of gaps rather than employing gap penalties</p>
            </title>
            <aug>
               <au>
                  <snm>Nozaki</snm>
                  <fnm>Y</fnm>
               </au>
               <au>
                  <snm>Bellgard</snm>
                  <fnm>M</fnm>
               </au>
            </aug>
            <source>Bioinformatics</source>
            <pubdate>2005</pubdate>
            <volume>21</volume>
            <fpage>1421</fpage>
            <lpage>1428</lpage>
            <xrefbib>
               <pubidlist>
                  <pubid idtype="doi">10.1093/bioinformatics/bti198</pubid>
                  <pubid idtype="pmpid" link="fulltext">15591359</pubid>
               </pubidlist>
            </xrefbib>
         </bibl>
         <bibl id="B10">
            <title>
               <p>Computational mapping of sequences</p>
            </title>
            <url>http://iml.univ-mrs.fr/~didier/mapping/</url>
         </bibl>
         <bibl id="B11">
            <aug>
               <au>
                  <snm>Cormen</snm>
                  <fnm>TH</fnm>
               </au>
               <au>
                  <snm>Leiserson</snm>
                  <fnm>CE</fnm>
               </au>
               <au>
                  <snm>Rivest</snm>
                  <fnm>RL</fnm>
               </au>
               <au>
                  <snm>Stein</snm>
                  <fnm>C</fnm>
               </au>
            </aug>
            <source>Introduction to Algorithms</source>
            <publisher>MIT Press and McGraw-Hill</publisher>
            <edition>Second</edition>
            <pubdate>2001</pubdate>
         </bibl>
         <bibl id="B12">
            <title>
               <p>Method for assessing the statistical significance of molecular sequence features by using general scoring schemes</p>
            </title>
            <aug>
               <au>
                  <snm>Karlin</snm>
                  <fnm>S</fnm>
               </au>
               <au>
                  <snm>Altschul</snm>
                  <fnm>SF</fnm>
               </au>
            </aug>
            <source>Proc Natl Acad Sci USA</source>
            <pubdate>1990</pubdate>
            <volume>87</volume>
            <fpage>2264</fpage>
            <lpage>2268</lpage>
            <xrefbib>
               <pubidlist>
                  <pubid idtype="pmcid">53667</pubid>
                  <pubid idtype="pmpid" link="fulltext">2315319</pubid>
                  <pubid idtype="doi">10.1073/pnas.87.6.2264</pubid>
               </pubidlist>
            </xrefbib>
         </bibl>
         <bibl id="B13">
            <title>
               <p>Measuring genome divergence in Bacteria: a case study using Chlamydian data</p>
            </title>
            <aug>
               <au>
                  <snm>Dalevi</snm>
                  <fnm>DA</fnm>
               </au>
               <au>
                  <snm>Eriksen</snm>
                  <fnm>N</fnm>
               </au>
               <au>
                  <snm>Eriksson</snm>
                  <fnm>K</fnm>
               </au>
               <au>
                  <snm>Andersson</snm>
                  <fnm>SG</fnm>
               </au>
            </aug>
            <source>J Mol Evol</source>
            <pubdate>2002</pubdate>
            <volume>55</volume>
            <fpage>24</fpage>
            <lpage>36</lpage>
            <xrefbib>
               <pubidlist>
                  <pubid idtype="doi">10.1007/s00239-001-0087-9</pubid>
                  <pubid idtype="pmpid" link="fulltext">12165840</pubid>
               </pubidlist>
            </xrefbib>
         </bibl>
         <bibl id="B14">
            <title>
               <p>Recurrent exon shuffling between distant P-element families</p>
            </title>
            <aug>
               <au>
                  <snm>Nouaud</snm>
                  <fnm>D</fnm>
               </au>
               <au>
                  <snm>Quesneville</snm>
                  <fnm>H</fnm>
               </au>
               <au>
                  <snm>Anxolabehere</snm>
                  <fnm>D</fnm>
               </au>
            </aug>
            <source>Mol Biol Evol</source>
            <pubdate>2003</pubdate>
            <volume>20</volume>
            <fpage>190</fpage>
            <lpage>199</lpage>
            <xrefbib>
               <pubidlist>
                  <pubid idtype="doi">10.1093/molbev/msg036</pubid>
                  <pubid idtype="pmpid" link="fulltext">12598685</pubid>
               </pubidlist>
            </xrefbib>
         </bibl>
         <bibl id="B15">
            <title>
               <p>Basic local alignment search tool</p>
            </title>
            <aug>
               <au>
                  <snm>Altschul</snm>
                  <fnm>SF</fnm>
               </au>
               <au>
                  <snm>Gish</snm>
                  <fnm>W</fnm>
               </au>
               <au>
                  <snm>W</snm>
                  <fnm>M</fnm>
               </au>
               <au>
                  <snm>W</snm>
                  <fnm>ME</fnm>
               </au>
               <au>
                  <snm>Lipman</snm>
                  <fnm>DJ</fnm>
               </au>
            </aug>
            <source>J Mol Biol</source>
            <pubdate>1990</pubdate>
            <volume>215</volume>
            <fpage>403</fpage>
            <lpage>410</lpage>
            <xrefbib>
               <pubid idtype="pmpid" link="fulltext">2231712</pubid>
            </xrefbib>
         </bibl>
         <bibl id="B16">
            <aug>
               <au>
                  <snm>Sankoff</snm>
                  <fnm>D</fnm>
               </au>
               <au>
                  <snm>Nadeau</snm>
                  <fnm>J</fnm>
               </au>
            </aug>
            <source>Comparative Genomics: Empirical and Analytical Approaches to Gene Order Dynamics, Map Alignment, and the Evolution of Gene Families</source>
            <publisher>Kluwer Academic Publishers</publisher>
            <pubdate>2000</pubdate>
         </bibl>
         <bibl id="B17">
            <title>
               <p>Algorithmic Approaches for Genome Rearrangement: A Review</p>
            </title>
            <aug>
               <au>
                  <snm>Li</snm>
                  <fnm>Z</fnm>
               </au>
               <au>
                  <snm>Wang</snm>
                  <fnm>L</fnm>
               </au>
            </aug>
            <source>IEEE Transactions on Systems, Man, and Cybernetics</source>
            <pubdate>2006</pubdate>
            <volume>36</volume>
            <fpage>636</fpage>
            <lpage>645</lpage>
         </bibl>
      </refgrp>
   </bm>
</art>
