BACKGROUND
the discovery of patterns in dna, rna, and protein sequences has led to the solution of many vital biological problems.
for instance, the identification of patterns in nucleic acid sequences has resulted in the determination of open reading frames, identification of promoter elements of genes, identification of intron/exon splicing sites, identification of sh rnas, location of rna degradation signals, identification of alternative splicing sites, etc.
in protein sequences, patterns have proven to be extremely helpful in domain identification, location of protease cleavage sites, identification of signal peptides, protein interactions, determination of protein degradation elements, identification of protein trafficking elements, discovery of short functional motifs, etc.
motifs are patterns found in biological sequences that are vital for understanding many biological subjects like gene function, human disease, drug design etc.
as a result, the identification of motifs plays an important role in biological studies.
the motif search problem has been attracting many researchers.
in the literature, many versions of the motif search problem have been enumerated.
examples include simple motif search , planted motif search  - also known as -motif search, and edit-distance-based motif search  .
in this paper, we will focus on the pms problem .
the definition of planted motif search
pms is stated as follows.
it takes as input n sequences, two integers ℓ and d. for simplicity, we assume that the length of each sequence is m. the problem is to identify all strings m of length ℓ such that m occurs in each of the n sequences with at most d mismatches.
formally, string m has to satisfy the following constraint: there exists a string mi of length l in sequence i, for every i , such that the number of mismatches between m and mi is less than or equal to d. the number of mismatches between two strings of equal length is known as the hamming distance between them.
string m is called a motif.
for example, if the input sequences are gcgcgat, caggtga, and cgatgcc; ℓ = 3; and d =  <dig>  then gat and gtg are some of the -motifs.
pms is a well-studied problem and it has been shown to be np-hard.
as a result, all known exact algorithms for pms take exponential time in some of the underlying parameters in the worst case.
two kinds of algorithms have been proposed in the literature for pms: exact and approximate.
while an exact algorithm always finds all the motifs, an approximate algorithm may not always find all the motifs.
typically, approximate algorithms tend to be faster than exact algorithms.
some example approximate algorithms are due to bailey and elkan  <cit> , buhler and tompa  <cit> , lawrence et al.
<cit> , pevzner and sze  <cit> , and rocke and tompa  <cit> .
these algorithms are based on local search techniques such as gibbs sampling, expectation optimization, etc.
the winnower algorithm of  <cit>  is based on finding cliques in a graph.
some other approximate algorithms are: projection  <cit> , multiprofiler  <cit> , patternbranching  <cit> , consensus  <cit> , gibbsdna  <cit> , meme  <cit> , and profilebranching  <cit> .
although approximate algorithms are acceptable in some cases in practice, exact algorithms are preferable since they are guaranteed to report all the -motifs.
for biologists, the motifs found by an algorithm could be much more important than its run time.
as a result, we focus in this paper on efficient exact algorithms.
some exact algorithms known for pms are:  <cit> , and  <cit> .
buhler and tompa  <cit>  have employed pms algorithms to find known transcriptional regulatory elements upstream of several eukaryotic genes.
in particular, they have used orthologous sequences from different organisms upstream of four different genes: preproinsulin, dihydrofolate reductase , metallothioneins, and c-fos.
these sequences are known to contain binding sites for specific transcription factors.
the authors point out the differences between experimental data and synthetic data that pms algorithms are typically tested with.
for example, the background dna in experimental data is not random.
their algorithm successfully identified the experimentally determined transcription factor binding sites.
they have used the values of l =  <dig> and d =  <dig>  the same sites have also been found using our pms <dig> algorithm  <cit> .
the algorithm of  <cit>  is an approximation algorithm whereas pms <dig> is an exact algorithm.
buhler and tompa have also employed their algorithm to solve the ribosome binding site problem for various prokaryotes  <cit> .
this problem is even more challenging since here the number of input sequences could be in the thousands.
eskin and pevzner  <cit>  used pms algorithms to find composite regulatory patterns.
they point out that traditional pattern finding techniques  concentrate on identifying high-scoring monads.
a regulatory pattern could indeed be a combination of multiple and possibly weak monads.
they employ mitra  to locate regulatory patterns of this kind.
the algorithm is demonstrated to perform well on both synthetic and experimental data sets.
for example, they have employed the upstream regions involved in purine metabolism from three pyrococcus genomes.
they have also tested their algorithm on four sets of s.cerevisiae genes which are regulated by two transcription factors such that the transcription factor binding sites occur near each other.
price and pevzner  <cit>  have employed their patternbranching pms technique on a sample containing crp binding sites in e.coli, upstream regions of many organisms of the eukaryotic genes: preproinsulin, dhfr, metallothionein, & c-fos, and a sample of promoter regions from yeast.
they report finding numerous motifs in these sequences.
the performance of an exact algorithm is typically evaluated on random benchmark data generated as follows.
twenty input dna sequences, each of length  <dig>  are generated randomly from the alphabet Σ = {a, c, g, t}.
a motif m of length ℓ is also generated randomly and planted in each of the input sequences within a hamming distance of d to make sure that there always exists a motif in the input.
based on the values of ℓ and d, certain instances of pms have been identified to be challenging.
an instance is challenging if the expected number of the motifs that occur by random chance  is one or more.
for example, the following instances are challenging: , , , , , , , , etc.
to compare the performance of exact algorithms, the challenging instances are commonly used.
for example, the exact algorithm mitra of  <cit>  can solve the challenging instances , , and .
it takes either too much time or too much memory on the challenging instance  or any larger instances.
both the exact algorithm voting in  <cit>  and the exact algorithm risotto in  <cit>  can solve the challenging instances up to .
in most of the cases, voting runs faster than risotto.
the best up-to-date exact algorithm is pampa given in  <cit> .
pampa can solve the challenging instance  within about  <dig>  hours.
the second best exact algorithm is pmsprune  <cit>  that can solve the challenging instance  within about  <dig> hours.
in this paper we present an exact algorithm  that can solve the challenging instances  and .
pms <dig> takes about  <dig> hours on the challenging instance  and about  <dig> hours on the challenging instance .
these run times are on a single  <dig> ghz pc with 3gb of ram.
to the best of our knowledge, no other exact algorithm can solve these instances.
<dig> methods
<dig>  notations and definitions
in this section we introduce some notations and definitions that will help us describe our algorithm clearly.
definition  <dig> .
a string x = x <cit>  ... x of length ℓ is called an ℓ-mer.
definition  <dig> .
given two strings x and y of equal length, we say the hamming distance between x and y, denoted by dh.
is the number of mismatches between them,
definition  <dig> .
given a string x = x <cit>  ... x, we define the d-neighborhood of x, bd, to be {y | dh ≤ d}.
note that |bd|=∑i=0di, where Σ is the alphabet of interest.
notice that bd depends only on ℓ, d and |Σ|.
for this reason, we define n=∑i=0di.
definition  <dig> .
given two strings x = x <cit>  ... x and s = s  <cit>  ... s with ℓ <m:
<dig>  we use the notation x ∈ℓ s if x is a substring of s .
we also say that x is an ℓ-mer of s.
<dig>  we define d¯h=minr∈ℓsdh.
definition  <dig> .
given a string x = x <cit>  ... x and a set of strings s={s <dig> ...,sn}with |si| = m for i =  <dig>  ..., n and ℓ <m, we define d¯h=max1≤i≤nd¯h.
it is easy to see that x is an -motif of s if and only if d¯h≤d.
definition  <dig> .
given a set of strings s={s <dig> ...,sn}, we define mℓ,dto be the set of  motifs of s.
the goal of pms is to compute mℓ,d, given ℓ, d and s.
<dig>  pms <dig> - a fast algorithm
the idea of our algorithm is based on the following observations about mℓ,d.
observation  <dig> .
let s, s′and s″be three sets of strings such that s=s′∪s″and s′∩s″=∅.
it is easy to observe that mℓ,d=mℓ,d∩mℓ,d.
observation  <dig> .
for any string s, mℓ,d= ⋃x∈ℓsbd.
from observation  <dig>  and observation  <dig> , we can obtain the following observation.
observation  <dig> .
let s*=s\{s1}={s <dig> ...,sn}.
we have mℓ,d= ⋃x∈ℓs1bd∩mℓ,d.
observation  <dig>  tells us that mℓ,d can be computed from bd∩mℓ,d.
without loss of generality, we can assume that the size of s* is even, i.e., |s*|=n-1=2p, for some integer p. otherwise we can add a copy of sn into s*, in which case mℓ,d will remain the same.
next, we partition s* into pairs of strings s <dig> ...,sp, where sk=s2k,s2k+ <dig> for k =  <dig> ... p. from observations  <dig>  and  <dig> , we can make the following observations.
observation  <dig> .
bd∩mℓ,d= ⋂1≤k≤pbd∩mℓ,d.
observation  <dig> .
bd∩mℓ,d= ⋃y∈ℓs2k,z∈ℓs2k+1bd∩bd∩bd.
based on the above observations, we note that the process of computing mℓ,d can be reduced to computing bd = bd ∩ bd ∩ bd repeatedly.
we will discuss how to compute bd efficiently in section  <dig> .
<dig>  the pseudocode of our algorithm pms <dig> is given below.
algorithm pms5
1:  for each x ∈ℓ s <dig> do
2:     for k =  <dig> to p=n-12do
3:      q←∅.
4:      for each y ∈ℓ s2k and z ∈ℓ s2k+ <dig> do
5:         compute bd = bd ∩ bd ∩ bd.
6:         q ← q ∪ bd.
7:      end for
8:      if k =  <dig> then
9:       q' ← q.
10:      else
11:        q' ← q' ∩ q.
12:      end if
13:       if |q'| is small enough then
14:         break the for loop.
15:       end if
16:  end for
17:  for each r ∈ q' do
18:      if d¯h≤dthen
19:        output r as an  motif.
20:      end if
21:    end for
22:  end for
in the pseudo code, the process of computing bd∩mℓ,d for each k is from line  <dig> to line  <dig>  after line  <dig>  q is actually bd∩mℓ,d.
within the loop at line  <dig>  q' is bd∩mℓ,d∩⋯∩mℓ,d for each k after line  <dig>  at line  <dig>  if |q'| is less than a certain threshold, the algorithm simply exits the loop and will not try other values of k. in practice, we set the threshold to be between  <dig> and  <dig>  from line  <dig> to line  <dig>  the algorithm checks if each string r ∈ q' is actually an -motif or not.
to check if d¯h≤d for any r, we only have to use the remaining sequences .
<dig> .
<dig> analysis
pms <dig> is correct
from the observations, it is straightforward to see that pms <dig> outputs mℓ,d.
therefore, pms <dig> is correct.
the worst-case run time of pms5
theorem  <dig> .
the worst-case run time of pms <dig> is o).
recall that n=|bd|=∑i=0di.
proof.
it is easy to see that the run time of pms <dig> is dominated by the computation time of bd in line  <dig>  in section  <dig> .
<dig>  we will show that bd can be computed in o|) time.
in the extreme case in which x=y=z,|bd)|=|bd|=n.
since n is much larger than ℓ, the computation time of bd is o).
also, it is straightforward to see that the number of times bd is computed is at most n <dig>  hence, the run time of pms <dig> is o).
the expected run time of pms5
we can compute the expected run time of of pms <dig> by computing the expected value of bd.
let x, y, and z be three random ℓ-mers.
how many ℓ-mers are there that are at a distance of ≤ d from each of x, y, and z?
let u be a random ℓ-mer.
prob.=pℓ,d=∑i=0diℓ−i.
this means that prob.=pl,d <dig>  therefore, the expected number of u's such that u is at a distance of ≤ d from each of x, y, and z, e, is 4ℓpℓ,d <dig>
as a result, the expected run time of pms <dig> is onm3d4ℓpℓ,d <dig>  where pℓ,d=∑i=0diℓ−i.
d
<dig> .
<dig> computing the intersection of the d-neighborhoods
in this section, we consider the problem of computing the intersection of the d-neighborhoods bd.
given three ℓ-mers x, y, z and integer number d, we would like to list all of the ℓ-mers in bd.
in this section we offer an algorithm fullprune for this task that runs in o|) time.
fullprune is the heart of algorithm pms <dig>  the idea of fullprune is as follows.
we first represent bd as a tree td in which each node is an ℓ-mer in bd and its root is the ℓ-mer x. the depth of td is d. we will describe td in detail later.
we traverse td in a depth-first manner.
at each node t during the traversal, we output t if t is in bd ∩ bd.
we also check if there is a descendent t' of t such that t' is in bd ∩ bd.
if there is no such descendent, we prune the subtree rooted at node t. we will show that checking the existence of such a descendent can be done quickly in o time, later.
formally, td is constructed from the following rules.
rules to construct td.
<dig>  each node in td is a pair  where t = t <cit>  ... t is an ℓ-mer and p is an integer between  <dig> and ℓ such that t ... t = x ... x. we refer to a node  as ℓ-mer t if p is clear.
<dig>  let t = t <cit>  ... t and t' = t' <cit>  ... t'.
a node  is the parent of a node  if and only if
p' >p.
t' ≠ t .
t' = t for any i ≠ p'
<dig>  the root of td is .
<dig>  the depth of td is d.
clearly, each ℓ-mer in bd is uniquely associated with a node in td and vice versa.
figure  <dig> illustrates the tree t <dig> with alphabet Σ = { <dig>  1}.
it is not hard to see that td has the following properties.
properties of td.
<dig>  if a node  is a child of a node , then dh - dh = dh =  <dig>  as a result, if a node  at level h, then dh = h.
<dig>  consider two nodes  and  with t = t <cit>  ... t and t' = t' <cit>  ... t'.
then  is a descendent of  if and only if:
p' >p.
t' <cit>  ... t' = t <cit>  ... t.
dh ≤ d.
now we consider the subproblem of checking whether there is a descendent  of  such that t' is in bd ∩ bd.
solving the subproblem is very crucial for fullprune because it will help us know beforehand for sure which nodes should be explored.
the second property above is important to solve the subproblem.
let t = t <cit>  ... t, x = x <cit>  ... x,y = y <cit>  ... y and z = z <cit>  ... z. let t <dig> = t <cit>  ... t and t <dig> = t ... t. we define x <dig>  x <dig>  y <dig>  y <dig>  z <dig> and z <dig>  similarly.
notice that x <dig> = t <dig>  because of the second property t' must have the form t' = t1w, where w is an -mer.
therefore, there is a descendent  of  such that t' is in bd ∩ bd if and only if there is an -mer w satisfying the following constraints:
<dig>  dh = dh + dh ≤ d.
<dig>  dh = dh + dh ≤ d.
<dig>  dh = dh + dh ≤ d.
we will show that the constraints can be expressed by an integer linear program of ten variables.
each location i in x <dig>  y <dig> and z <dig> is one of five types.
• type  <dig> : x <dig> = y <dig> = z <dig>
• type  <dig> : x <dig> = y <dig> ≠ z <dig>
• type  <dig> : x <dig> = z <dig> ≠ y <dig>
• type  <dig> : x <dig> ≠ y <dig> = z <dig>
• type  <dig> : x <dig> ≠ y <dig>  x <dig> ≠ z <dig>  y <dig> ≠ z <dig>
let n <dig>  be the number of locations of type  <dig> .
given x <dig>  y <dig> and z <dig>  nj is determined for j =  <dig> ...  <dig>  notice that n <dig> + ··· + n <dig> = ℓ - p.
consider any -mer w = w <cit>  ... w. we define the following variables.
• let n <dig> a be the number of locations i of type  <dig> such that w = x <dig>  we should have n <dig> a ≤ n <dig>
• let n <dig> a  be the number of locations i of type  <dig> such that w = x <dig> .
we should have n <dig> a + n <dig> b ≤ n <dig>
• let n <dig> a  be the number of locations i of type  <dig> such that w = x <dig> .
we should have n <dig> a + n <dig> b ≤ n <dig>
• let n <dig> a  be the number of locations i of type  <dig> such that w = y <dig> .
we should have n <dig> a + n <dig> b ≤ n <dig>
• let n <dig> a  be the number of locations i of type  <dig> such that w = x <dig> .
we should have n <dig> a + n <dig> b + n <dig> c ≤ n <dig>
now it is straightforward to calculate dh through the variables.
the number of mismatches between x <dig> and w caused by the locations of type  <dig>  is n <dig> - n <dig> a, .
therefore, dh =  +  +  +  + .
similarly, dh =  +  +  +  + , and dh =  +  +  +  + .
so the following integer linear program  expresses the constraints.
integer linear program .
<dig>   +  +  +  +  ≤ d - dh.
<dig>   +  +  +  +  ≤ d - dh.
<dig>   +  +  +  +  ≤ d - dh.
<dig>  n <dig>  a ≤ n <dig>
<dig>  n <dig>  a + n <dig>  b ≤ n <dig>
<dig>  n <dig>  a + n <dig>  b ≤ n <dig>
<dig>  n <dig>  a + n <dig>  b ≤ n <dig>
<dig>  n <dig>  a + n <dig>  b + n <dig> c ≤ n <dig>
<dig>  all of the variables are non-negative integers.
clearly, there exists one or more w's satisfying the constraints if and only if the integer linear program has a solution.
notice that n <dig> + n <dig> + n <dig> + n <dig> + n <dig> = ℓ - p. we can rewrite the first three constraints of the integer linear program as follows.
<dig>  n <dig>  a + n <dig>  a + n <dig> a + n <dig> b + n <dig> a ≥ ℓ - p - d + dh.
<dig>  n <dig>  a + n <dig>  a + n <dig> b + n <dig> a + n <dig> b ≥ ℓ - p - d + dh.
<dig>  n <dig>  a + n <dig>  b + n <dig> a + n <dig> a + n <dig> c ≥ℓ - p - d + dh.
because the integer linear program has only ten variables, checking whether it has a solution can be done in o time.
notice that the integer linear program only depends on eight parameters n <dig>  ... n <dig>  d - dh, d - dh, and d - dh.
the first five parameters are in the range  and the other parameters are in the range .
therefore, we will store the results of all possible integer linear programs in a 8-dimensional table of size  <dig> to speedup the checking time for the integer linear programs during the traversal on the tree in fullprune.
notice that we only need to compute the table once before fullprune is executed, and reuse it as many times as needed.
the pseudocode of fullprune is given below.
algorithm fullprune
<dig>  compute dh and dh.
<dig>  compute n <dig>  n <dig>  n <dig>  n <dig> and n <dig> for each p =  <dig> .. .
<dig>  traverse the tree td in a depth-first manner.
at each node , do the following steps.
incrementally compute dh, dh, and dh from its parent.
incrementally compute dh, dh, and dh from its parent.
.
if dh ≤ d, dh ≤ d and dh ≤ d, then output t.
solve the integer linear program  with parameters n <dig>  n <dig>  n <dig>  n <dig>  n <dig>  ℓ - p - d + dh, ℓ - p - d + dh, and ℓ - p - d + dh.
if dh ≥ d and/or the ilp does not have a solution, then prune the subtree rooted at node .
otherwise, explore its children.
theorem  <dig> .
given three ℓ-mers x, y and z, fullprunecomputes bd in o|) time.
proof.
from the discussion above, fullprune outputs all of the ℓ-mers in bd.
now let us analyze its run time.
in the pseudocode of fullprune, step  <dig> and step  <dig> take o time.
we will show that step  <dig> takes at most o|) time, that will complete our proof.
since in td a node and its parent differ at exactly one location, step 3a and step 3b take at most o time.
it is easy to see that the other steps inside step  <dig>  also take o time.
therefore, fullprune spends at most o time at each node it visits.
as a result, the run time of step  <dig> is proportional to the number of the visited nodes.
we will argue that the number of visited nodes is no more than d|bd|.
consider the tree t consisting of all the nodes visited by fullprune.
obviously, td contains t. because of the property of the integer linear program, every leaf in t is an element in bd.
therefore, the number of leaves in t is at most bd.
on the other hand, in any tree the number of nodes is no more than its depth times the number of its leaves.
since td contains t, the depth of t is less than or equal to the depth of td, which is equal to d. hence, the number of nodes in t, which is equal to the number of nodes visited by fullprune, is at most d|bd|.
we conclude this section with a remark that our algorithm fullprune can be generalized as follows.
right now we use the computation of the common d-neighborhood of three ℓ-mers as the basic step.
this can be generalized so that the basic step is that of computing the common d-neighborhood of k ℓ-mers .
<dig>  extended pms <dig> for solving the q-pms problem
in this section, we consider a generalized version of the pms problem called the q-pms problem .
in the q-pms problem, we relax the constraints on the motifs.
an ℓ-mer x is a motif if there are at least q sequences si in s such that dh ≤ d. apparently, the q-pms problem becomes the pms problem if q = n. in practice, the q-pms problem is a more realistic model of motifs since these motifs usually appear in some of the given sequences, instead of appearing in all of them.
we can extend the algorithm pms <dig> to solve the q-pms problem by exploiting the heart of pms <dig>  i.e., the algorithm fullprune that computes bd.
one simple and straightforward way to extend pms <dig> for the q-pms problem is as follows.
we consider every tuple of sequences ,  <dig> ≤ i <j <k ≤ n. for each tuple , we compute bd where x, y, and z are in si, sj and sk, respectively.
for each ℓ-mer t in bd, we check whether there are at least q- <dig> sequences sp in s\{si,sj,sk} such that dh ≤ d. if t satisfies this constraint, we output t as a motif.
the psuedocode is provided below.
extended algorithm pms <dig> for q-pms
1:  for each tuple of sequences , where  <dig> ≤ i <j <k ≤ n do
2:     for each tuple  of ℓ-mers where x ∈ℓ si,y ∈ℓ sj, and z ∈ ℓ sk do
3:        compute bd using fullprune.
4:        for each t ∈ bd do
5:           if there are at least q- <dig> sequences sp∈s\{si,sj,sk} such that dh ≤ d then
6:             output t.
7:           end if
8:        end for
9:      end for
10:  end for
the two following theorems are immediate:
theorem  <dig> .
the worst run time of the above algorithm is on4m3dn.
theorem  <dig> .
the expected run time of the above algorithm is on4m3d4ℓpℓ,d <dig>  where pℓ,d=∑i=0diℓ−i
<dig>  challenging instances for q-pms
the challenging instances for q-pms have to be defined appropriately.
for every value of ℓ, we can define a corresponding challenging instance with a relevant value for d. we define the challenging instance corresponding to a given value of ℓ to be the pair  if d is the smallest value for which the expected number of -motifs that occur by random chance is at least  <dig>  in fact the same definition is used for the pms problem as well.
however, the identification of such instances is slightly different.
we could identify the challenging instances for q-pms as follows.
let s <dig>  s <dig>  ..., sn be the given input strings.
consider a random ℓ-mer w. let s be any one of the input strings and x be an ℓ-mer in s.
probability that the hamming distance between w and x is ≤ d is p=∑i=0diℓ−i.
probability that the hamming distance between w and x is >d is .
probability that the hamming distance between w and each ℓ-mer of s is >d is q' = ℓ-m+ <dig>  here we assume that the ℓ-mers of s are independent, which is clearly incorrect.
a similar assumption has been made in prior analyses  and in practice conclusions made using such analyses seem to hold nearly.
probability that s has at least one ℓ-mer x such that the hamming distance between w and x is ≤ d is q =  <dig> - q'.
if the hamming distance between w and x is ≤ d, call x as an instance of w.
probability that w has at least one instance in at least q of the n input strings is r=∑i=qnqin−i.
therefore, the expected number of motifs that occur by random chance is 4ℓr.
table  <dig> displays the expected number of random motifs corresponding to various values of ℓ and d with n =  <dig>  m =  <dig> and q =  <dig>  challenging instances are shown in bold face.
d
challenging instances of q-pms are shown in bold face.
<dig>
RESULTS
<dig>  performance of pms <dig> on the challenging instances
in this section, we show the performance of pms <dig> on the challenging instances as described in section  <dig>  we also compare the performance of pms <dig> with that of other well-known exact algorithms such as pampa  <cit> , pmsprune  <cit> , voting  <cit> , and rissoto  <cit> .
algorithms for planted motif search are typically tested on random input datasets.
any such dataset will consist of  <dig> random strings each of length  <dig> .
a random motif of length ℓ is planted at a random position in each of the strings, mutating it in exactly d places.
we test the algorithms for varying ℓ and d values.
in particular, we have employed the following challenging instances: , , , , , and .
to have a fair comparison, we have run all of the algorithms on the same machine.
the configuration of the machine is windows xp operating system, dual core pentium  <dig> ghz cpu with 3gb ram.
pms <dig> is written in c language.
pampa, pmsprune and rissoto were also written in c language.
only voting was written in c++.
all of the algorithms were compiled using microsoft visual c++  <dig>  compiler.
while comparing pms <dig> and pmsprune, we notice an interesting fact that as the challenging instance increases in size, the ratio between their run times increase exponentially.
in particular, the ratio is roughly  <dig> , and  <dig> on the challenging instances , , and , respectively.
this fact perhaps explains why pms <dig> can solve the challenging instances  and  but pmsprune cannot.
if this observation is true in general, pmsprune will probably take about  <dig> ×  <dig>  =  <dig>  hours on the instance , and  <dig> ×  <dig> =  <dig> hours on the instance .
notice that the run time of pms <dig> does not include the time for building the ilp table.
it takes  <dig>  hours and 500mb to build and store the ilp table for ℓ =  <dig> and d =  <dig>
<dig>  pms <dig> on real data: predicting transcript factor-binding sites
in this section, we discuss how to use algorithm pms <dig> to find transcript factor-binding sites in the real data provided in  <cit> .
the real data is broadly used to test many existing algorithms  <cit> ,  <cit> ,  <cit> ,  <cit> .
each dataset in the real data is comprised of dna sequences with verified transcript factor-binding sites.
the datastes are from many species including mouse, human and yeast.
we have used the algorithm pms <dig> to find transcript factor-binding sites as follows.
for any given dataset, we have run pms <dig> with ℓ =  <dig>  d =  <dig>  and obtained a set of motifs.
some of these motifs could be spurious hits.
hence, we need a scoring scheme to rank the motifs.
we have used the simple scoring function ∑1≤i≤n dh , where dh is the hamming distance between motif m and sequence si.
we take the motif with the lowest score and then predict transcription factor-binding sites based on it.
notice that we have only used one value for ℓ  because smaller values of ℓ have been tested in  <cit> .
we provide the detailed results in table  <dig>  in table  <dig>  the first column is the name of the dataset.
the dataset is from mouse  if the dataset's name starts with "mus" .
the second column is the motif with the lowest score produced by algorithm pms <dig>  the third column is the verified transcription factor-binding sites that overlap with the predicted transcription factor-binding sites at least 60% of the motif length.
we find that there are  <dig> out of  <dig> datasets in which the predicted transcription factor-binding sites are correct.
in particular, one of the verified transcription factor-binding sites in dataset hm22r contains the predicted transcript factor-binding site.
therefore, we conclude that the results in table  <dig> once again reaffirm the accuracy of the pms model.
in practice one could use pmsprune  and pms <dig>  together to identify motifs.
in this case the sensitivity will be better than using pmsprune alone .
<dig>  performance of extended pms <dig> on the q-pms challenging instances
in this section, we show the performance of extended pms <dig> on the q-pms challenging instances as described in section  <dig> .
the experiment setting is the same as that in section  <dig> .
any dataset will consist of  <dig> random strings each of length  <dig> .
we choose the parameter q =  <dig>  which requires motifs to appear in at least 50% of input sequences.
note that this choice of q corresponds to the worst case run time .
table  <dig> shows the run time of extended pms <dig> on the q-pms challenging instances.
extended pms <dig> can solve q-pms challenging instances  in  <dig>  hours and it fails to solve q-pms challenging instances .
<dig>
CONCLUSIONS
in this paper we have presented an efficient exact algorithm for the -motif search problem.
this algorithm is more efficient than any known exact algorithm for pms.
in particular, using this algorithm we can solve the challenging instances  and .
no prior exact algorithms could solve these instances.
therefore, we hope that pms <dig> will help biologists discover longer motifs in future.
our algorithm is based on some novel ideas that will be of independent interest to solve pms and other variations of the motif search problem.
one of the basic ideas we employ is that of computing the common d-neighborhood of three ℓ-mers.
this is done using an integer programming formulation.
an open problem will be to exploit this idea to further improve the performance of our algorithm.
one possible direction is to use a basic step where the d-neighborhood of k ℓ-mers is computed .
we have extended our algorithm to solve the q-pms problem as well.
challenging instances for the q-pms problem have been defined and computed.
our extended algorithm can solve the following q-pms challenging instances: , , , , and .
in comparison, the exact algorithms mitra, risotto, and voting also can only solve challenging instances up to d =  <dig> .
authors' contributions
hd and sr designed and analyzed the algorithms.
hd and vkk implemented the algorithms and carried out the empirical experiments.
hd, sr and vkk analyzed the empirical results.
hd and sr drafted the manuscript.
hd, sr and vkk read and approved this paper.

 the discovery of patterns in dna, rna, and protein sequences has led to the solution of many vital biological problems. for instance, the identification of patterns in nucleic acid sequences has resulted in the determination of open reading frames, identification of promoter elements of genes, identification of intron/exon splicing sites, identification of sh rnas, location of rna degradation signals, identification of alternative splicing sites, etc. in protein sequences, patterns have proven to be extremely helpful in domain identification, location of protease cleavage sites, identification of signal peptides, protein interactions, determination of protein degradation elements, identification of protein trafficking elements, discovery of short functional motifs, etc. motifs are patterns found in biological sequences that are vital for understanding many biological subjects like gene function, human disease, drug design etc. as a result, the identification of motifs plays an important role in biological studies. the motif search problem has been attracting many researchers. in the literature, many versions of the motif search problem have been enumerated. examples include simple motif search, planted motif search - also known as -motif search, and edit-distance-based motif search. in this paper, we will focus on the pms problem. the definition of planted motif search pms is stated as follows. it takes as input n sequences, two integers ℓ and d. for simplicity, we assume that the length of each sequence is m. the problem is to identify all strings m of length ℓ such that m occurs in each of the n sequences with at most d mismatches. formally, string m has to satisfy the following constraint: there exists a string mi of length l in sequence i, for every i, such that the number of mismatches between m and mi is less than or equal to d. the number of mismatches between two strings of equal length is known as the hamming distance between them. string m is called a motif. for example, if the input sequences are gcgcgat, caggtga, and cgatgcc; ℓ = 3; and d = then gat and gtg are some of the -motifs. pms is a well-studied problem and it has been shown to be np-hard. as a result, all known exact algorithms for pms take exponential time in some of the underlying parameters in the worst case. two kinds of algorithms have been proposed in the literature for pms: exact and approximate. while an exact algorithm always finds all the motifs, an approximate algorithm may not always find all the motifs. typically, approximate algorithms tend to be faster than exact algorithms. some example approximate algorithms are due to bailey and elkan, buhler and tompa, lawrence et al., pevzner and sze, and rocke and tompa. these algorithms are based on local search techniques such as gibbs sampling, expectation optimization, etc. the winnower algorithm of is based on finding cliques in a graph. some other approximate algorithms are: projection, multiprofiler, patternbranching, consensus, gibbsdna, meme, and profilebranching. although approximate algorithms are acceptable in some cases in practice, exact algorithms are preferable since they are guaranteed to report all the -motifs. for biologists, the motifs found by an algorithm could be much more important than its run time. as a result, we focus in this paper on efficient exact algorithms. some exact algorithms known for pms are:, and. buhler and tompa have employed pms algorithms to find known transcriptional regulatory elements upstream of several eukaryotic genes. in particular, they have used orthologous sequences from different organisms upstream of four different genes: preproinsulin, dihydrofolate reductase, metallothioneins, and c-fos. these sequences are known to contain binding sites for specific transcription factors. the authors point out the differences between experimental data and synthetic data that pms algorithms are typically tested with. for example, the background dna in experimental data is not random. their algorithm successfully identified the experimentally determined transcription factor binding sites. they have used the values of l = and d = the same sites have also been found using our pms algorithm. the algorithm of is an approximation algorithm whereas pms is an exact algorithm. buhler and tompa have also employed their algorithm to solve the ribosome binding site problem for various prokaryotes. this problem is even more challenging since here the number of input sequences could be in the thousands. eskin and pevzner used pms algorithms to find composite regulatory patterns. they point out that traditional pattern finding techniques concentrate on identifying high-scoring monads. a regulatory pattern could indeed be a combination of multiple and possibly weak monads. they employ mitra to locate regulatory patterns of this kind. the algorithm is demonstrated to perform well on both synthetic and experimental data sets. for example, they have employed the upstream regions involved in purine metabolism from three pyrococcus genomes. they have also tested their algorithm on four sets of s.cerevisiae genes which are regulated by two transcription factors such that the transcription factor binding sites occur near each other. price and pevzner have employed their patternbranching pms technique on a sample containing crp binding sites in e.coli, upstream regions of many organisms of the eukaryotic genes: preproinsulin, dhfr, metallothionein, & c-fos, and a sample of promoter regions from yeast. they report finding numerous motifs in these sequences. the performance of an exact algorithm is typically evaluated on random benchmark data generated as follows. twenty input dna sequences, each of length are generated randomly from the alphabet Σ = {a, c, g, t}. a motif m of length ℓ is also generated randomly and planted in each of the input sequences within a hamming distance of d to make sure that there always exists a motif in the input. based on the values of ℓ and d, certain instances of pms have been identified to be challenging. an instance is challenging if the expected number of the motifs that occur by random chance is one or more. for example, the following instances are challenging:,,,,,,,, etc. to compare the performance of exact algorithms, the challenging instances are commonly used. for example, the exact algorithm mitra of can solve the challenging instances,, and. it takes either too much time or too much memory on the challenging instance or any larger instances. both the exact algorithm voting in and the exact algorithm risotto in can solve the challenging instances up to. in most of the cases, voting runs faster than risotto. the best up-to-date exact algorithm is pampa given in. pampa can solve the challenging instance within about hours. the second best exact algorithm is pmsprune that can solve the challenging instance within about hours. in this paper we present an exact algorithm that can solve the challenging instances and. pms takes about hours on the challenging instance and about hours on the challenging instance. these run times are on a single ghz pc with 3gb of ram. to the best of our knowledge, no other exact algorithm can solve these instances. methods notations and definitions in this section we introduce some notations and definitions that will help us describe our algorithm clearly. definition. a string x = x... x of length ℓ is called an ℓ-mer. definition. given two strings x and y of equal length, we say the hamming distance between x and y, denoted by dh. is the number of mismatches between them, definition. given a string x = x... x, we define the d-neighborhood of x, bd, to be {y | dh ≤ d}. note that |bd|=∑i=0di, where Σ is the alphabet of interest. notice that bd depends only on ℓ, d and |Σ|. for this reason, we define n=∑i=0di. definition. given two strings x = x... x and s = s... s with ℓ <m: we use the notation x ∈ℓ s if x is a substring of s. we also say that x is an ℓ-mer of s. we define d¯h=minr∈ℓsdh. definition. given a string x = x... x and a set of strings s={s...,sn}with |si| = m for i =..., n and ℓ <m, we define d¯h=max1≤i≤nd¯h. it is easy to see that x is an -motif of s if and only if d¯h≤d. definition. given a set of strings s={s...,sn}, we define mℓ,dto be the set of motifs of s. the goal of pms is to compute mℓ,d, given ℓ, d and s. pms - a fast algorithm the idea of our algorithm is based on the following observations about mℓ,d. observation. let s, s′and s″be three sets of strings such that s=s′∪s″and s′∩s″=∅. it is easy to observe that mℓ,d=mℓ,d∩mℓ,d. observation. for any string s, mℓ,d= ⋃x∈ℓsbd. from observation and observation, we can obtain the following observation. observation. let s*=s\{s1}={s...,sn}. we have mℓ,d= ⋃x∈ℓs1bd∩mℓ,d. observation tells us that mℓ,d can be computed from bd∩mℓ,d. without loss of generality, we can assume that the size of s* is even, i.e., |s*|=n-1=2p, for some integer p. otherwise we can add a copy of sn into s*, in which case mℓ,d will remain the same. next, we partition s* into pairs of strings s...,sp, where sk=s2k,s2k+ for k =... p. from observations and, we can make the following observations. observation. bd∩mℓ,d= ⋂1≤k≤pbd∩mℓ,d. observation. bd∩mℓ,d= ⋃y∈ℓs2k,z∈ℓs2k+1bd∩bd∩bd. based on the above observations, we note that the process of computing mℓ,d can be reduced to computing bd = bd ∩ bd ∩ bd repeatedly. we will discuss how to compute bd efficiently in section. the pseudocode of our algorithm pms is given below.                                                           algorithm pms5 1:  for each x ∈ℓ s do 2:     for k = to p=n-12do 3:      q←∅. 4:      for each y ∈ℓ s2k and z ∈ℓ s2k+ do 5:         compute bd = bd ∩ bd ∩ bd. 6:         q ← q ∪ bd. 7:      end for 8:      if k = then 9:       q' ← q. 10:      else 11:        q' ← q' ∩ q. 12:      end if 13:       if |q'| is small enough then 14:         break the for loop. 15:       end if 16:  end for 17:  for each r ∈ q' do 18:      if d¯h≤dthen 19:        output r as an motif. 20:      end if 21:    end for 22:  end for in the pseudo code, the process of computing bd∩mℓ,d for each k is from line to line after line q is actually bd∩mℓ,d. within the loop at line q' is bd∩mℓ,d∩⋯∩mℓ,d for each k after line at line if |q'| is less than a certain threshold, the algorithm simply exits the loop and will not try other values of k. in practice, we set the threshold to be between and from line to line the algorithm checks if each string r ∈ q' is actually an -motif or not. to check if d¯h≤d for any r, we only have to use the remaining sequences.. analysis pms is correct from the observations, it is straightforward to see that pms outputs mℓ,d. therefore, pms is correct. the worst-case run time of pms5 theorem. the worst-case run time of pms is o). recall that n=|bd|=∑i=0di. proof. it is easy to see that the run time of pms is dominated by the computation time of bd in line in section. we will show that bd can be computed in o|) time. in the extreme case in which x=y=z,|bd)|=|bd|=n. since n is much larger than ℓ, the computation time of bd is o). also, it is straightforward to see that the number of times bd is computed is at most n hence, the run time of pms is o). the expected run time of pms5 we can compute the expected run time of of pms by computing the expected value of bd. let x, y, and z be three random ℓ-mers. how many ℓ-mers are there that are at a distance of ≤ d from each of x, y, and z? let u be a random ℓ-mer. prob.=pℓ,d=∑i=0diℓ−i. this means that prob.=pl,d therefore, the expected number of u's such that u is at a distance of ≤ d from each of x, y, and z, e, is 4ℓpℓ,d as a result, the expected run time of pms is onm3d4ℓpℓ,d where pℓ,d=∑i=0diℓ−i. d. computing the intersection of the d-neighborhoods in this section, we consider the problem of computing the intersection of the d-neighborhoods bd. given three ℓ-mers x, y, z and integer number d, we would like to list all of the ℓ-mers in bd. in this section we offer an algorithm fullprune for this task that runs in o|) time. fullprune is the heart of algorithm pms the idea of fullprune is as follows. we first represent bd as a tree td in which each node is an ℓ-mer in bd and its root is the ℓ-mer x. the depth of td is d. we will describe td in detail later. we traverse td in a depth-first manner. at each node t during the traversal, we output t if t is in bd ∩ bd. we also check if there is a descendent t' of t such that t' is in bd ∩ bd. if there is no such descendent, we prune the subtree rooted at node t. we will show that checking the existence of such a descendent can be done quickly in o time, later. formally, td is constructed from the following rules. rules to construct td. each node in td is a pair where t = t... t is an ℓ-mer and p is an integer between and ℓ such that t... t = x... x. we refer to a node as ℓ-mer t if p is clear. let t = t... t and t' = t'... t'. a node is the parent of a node if and only if p' >p. t' ≠ t. t' = t for any i ≠ p' the root of td is. the depth of td is d. clearly, each ℓ-mer in bd is uniquely associated with a node in td and vice versa. figure illustrates the tree t with alphabet Σ = { 1}. it is not hard to see that td has the following properties. properties of td. if a node is a child of a node, then dh - dh = dh = as a result, if a node at level h, then dh = h. consider two nodes and with t = t... t and t' = t'... t'. then is a descendent of if and only if: p' >p. t'... t' = t... t. dh ≤ d. now we consider the subproblem of checking whether there is a descendent of such that t' is in bd ∩ bd. solving the subproblem is very crucial for fullprune because it will help us know beforehand for sure which nodes should be explored. the second property above is important to solve the subproblem. let t = t... t, x = x... x,y = y... y and z = z... z. let t = t... t and t = t... t. we define x x y y z and z similarly. notice that x = t because of the second property t' must have the form t' = t1w, where w is an -mer. therefore, there is a descendent of such that t' is in bd ∩ bd if and only if there is an -mer w satisfying the following constraints: dh = dh + dh ≤ d. dh = dh + dh ≤ d. dh = dh + dh ≤ d. we will show that the constraints can be expressed by an integer linear program of ten variables. each location i in x y and z is one of five types. • type: x = y = z • type: x = y ≠ z • type: x = z ≠ y • type: x ≠ y = z • type: x ≠ y x ≠ z y ≠ z let n be the number of locations of type. given x y and z nj is determined for j =... notice that n + ··· + n = ℓ - p. consider any -mer w = w... w. we define the following variables. • let n a be the number of locations i of type such that w = x we should have n a ≤ n • let n a be the number of locations i of type such that w = x. we should have n a + n b ≤ n • let n a be the number of locations i of type such that w = x. we should have n a + n b ≤ n • let n a be the number of locations i of type such that w = y. we should have n a + n b ≤ n • let n a be the number of locations i of type such that w = x. we should have n a + n b + n c ≤ n now it is straightforward to calculate dh through the variables. the number of mismatches between x and w caused by the locations of type is n - n a,. therefore, dh = + + + +. similarly, dh = + + + +, and dh = + + + +. so the following integer linear program expresses the constraints. integer linear program. + + + + ≤ d - dh. + + + + ≤ d - dh. + + + + ≤ d - dh. n a ≤ n n a + n b ≤ n n a + n b ≤ n n a + n b ≤ n n a + n b + n c ≤ n all of the variables are non-negative integers. clearly, there exists one or more w's satisfying the constraints if and only if the integer linear program has a solution. notice that n + n + n + n + n = ℓ - p. we can rewrite the first three constraints of the integer linear program as follows. n a + n a + n a + n b + n a ≥ ℓ - p - d + dh. n a + n a + n b + n a + n b ≥ ℓ - p - d + dh. n a + n b + n a + n a + n c ≥ℓ - p - d + dh. because the integer linear program has only ten variables, checking whether it has a solution can be done in o time. notice that the integer linear program only depends on eight parameters n... n d - dh, d - dh, and d - dh. the first five parameters are in the range and the other parameters are in the range. therefore, we will store the results of all possible integer linear programs in a 8-dimensional table of size to speedup the checking time for the integer linear programs during the traversal on the tree in fullprune. notice that we only need to compute the table once before fullprune is executed, and reuse it as many times as needed. the pseudocode of fullprune is given below. algorithm fullprune compute dh and dh. compute n n n n and n for each p =... traverse the tree td in a depth-first manner. at each node, do the following steps. incrementally compute dh, dh, and dh from its parent. incrementally compute dh, dh, and dh from its parent.. if dh ≤ d, dh ≤ d and dh ≤ d, then output t. solve the integer linear program with parameters n n n n n ℓ - p - d + dh, ℓ - p - d + dh, and ℓ - p - d + dh. if dh ≥ d and/or the ilp does not have a solution, then prune the subtree rooted at node. otherwise, explore its children. theorem. given three ℓ-mers x, y and z, fullprunecomputes bd in o|) time. proof. from the discussion above, fullprune outputs all of the ℓ-mers in bd. now let us analyze its run time. in the pseudocode of fullprune, step and step take o time. we will show that step takes at most o|) time, that will complete our proof. since in td a node and its parent differ at exactly one location, step 3a and step 3b take at most o time. it is easy to see that the other steps inside step also take o time. therefore, fullprune spends at most o time at each node it visits. as a result, the run time of step is proportional to the number of the visited nodes. we will argue that the number of visited nodes is no more than d|bd|. consider the tree t consisting of all the nodes visited by fullprune. obviously, td contains t. because of the property of the integer linear program, every leaf in t is an element in bd. therefore, the number of leaves in t is at most bd. on the other hand, in any tree the number of nodes is no more than its depth times the number of its leaves. since td contains t, the depth of t is less than or equal to the depth of td, which is equal to d. hence, the number of nodes in t, which is equal to the number of nodes visited by fullprune, is at most d|bd|. we conclude this section with a remark that our algorithm fullprune can be generalized as follows. right now we use the computation of the common d-neighborhood of three ℓ-mers as the basic step. this can be generalized so that the basic step is that of computing the common d-neighborhood of k ℓ-mers. extended pms for solving the q-pms problem in this section, we consider a generalized version of the pms problem called the q-pms problem. in the q-pms problem, we relax the constraints on the motifs. an ℓ-mer x is a motif if there are at least q sequences si in s such that dh ≤ d. apparently, the q-pms problem becomes the pms problem if q = n. in practice, the q-pms problem is a more realistic model of motifs since these motifs usually appear in some of the given sequences, instead of appearing in all of them. we can extend the algorithm pms to solve the q-pms problem by exploiting the heart of pms i.e., the algorithm fullprune that computes bd. one simple and straightforward way to extend pms for the q-pms problem is as follows. we consider every tuple of sequences, ≤ i <j <k ≤ n. for each tuple, we compute bd where x, y, and z are in si, sj and sk, respectively. for each ℓ-mer t in bd, we check whether there are at least q- sequences sp in s\{si,sj,sk} such that dh ≤ d. if t satisfies this constraint, we output t as a motif. the psuedocode is provided below. extended algorithm pms for q-pms 1:  for each tuple of sequences, where ≤ i <j <k ≤ n do 2:     for each tuple of ℓ-mers where x ∈ℓ si,y ∈ℓ sj, and z ∈ ℓ sk do 3:        compute bd using fullprune. 4:        for each t ∈ bd do 5:           if there are at least q- sequences sp∈s\{si,sj,sk} such that dh ≤ d then 6:             output t. 7:           end if 8:        end for 9:      end for 10:  end for the two following theorems are immediate: theorem. the worst run time of the above algorithm is on4m3dn. theorem. the expected run time of the above algorithm is on4m3d4ℓpℓ,d where pℓ,d=∑i=0diℓ−i challenging instances for q-pms the challenging instances for q-pms have to be defined appropriately. for every value of ℓ, we can define a corresponding challenging instance with a relevant value for d. we define the challenging instance corresponding to a given value of ℓ to be the pair if d is the smallest value for which the expected number of -motifs that occur by random chance is at least in fact the same definition is used for the pms problem as well. however, the identification of such instances is slightly different. we could identify the challenging instances for q-pms as follows. let s s..., sn be the given input strings. consider a random ℓ-mer w. let s be any one of the input strings and x be an ℓ-mer in s. probability that the hamming distance between w and x is ≤ d is p=∑i=0diℓ−i. probability that the hamming distance between w and x is >d is. probability that the hamming distance between w and each ℓ-mer of s is >d is q' = ℓ-m+ here we assume that the ℓ-mers of s are independent, which is clearly incorrect. a similar assumption has been made in prior analyses and in practice conclusions made using such analyses seem to hold nearly. probability that s has at least one ℓ-mer x such that the hamming distance between w and x is ≤ d is q = - q'. if the hamming distance between w and x is ≤ d, call x as an instance of w. probability that w has at least one instance in at least q of the n input strings is r=∑i=qnqin−i. therefore, the expected number of motifs that occur by random chance is 4ℓr. table displays the expected number of random motifs corresponding to various values of ℓ and d with n = m = and q = challenging instances are shown in bold face. d challenging instances of q-pms are shown in bold face.  performance of pms on the challenging instances in this section, we show the performance of pms on the challenging instances as described in section we also compare the performance of pms with that of other well-known exact algorithms such as pampa, pmsprune, voting, and rissoto. algorithms for planted motif search are typically tested on random input datasets. any such dataset will consist of random strings each of length. a random motif of length ℓ is planted at a random position in each of the strings, mutating it in exactly d places. we test the algorithms for varying ℓ and d values. in particular, we have employed the following challenging instances:,,,,, and. to have a fair comparison, we have run all of the algorithms on the same machine. the configuration of the machine is windows xp operating system, dual core pentium ghz cpu with 3gb ram. pms is written in c language. pampa, pmsprune and rissoto were also written in c language. only voting was written in c++. all of the algorithms were compiled using microsoft visual c++ compiler. while comparing pms and pmsprune, we notice an interesting fact that as the challenging instance increases in size, the ratio between their run times increase exponentially. in particular, the ratio is roughly, and on the challenging instances,, and, respectively. this fact perhaps explains why pms can solve the challenging instances and but pmsprune cannot. if this observation is true in general, pmsprune will probably take about × = hours on the instance, and × = hours on the instance. notice that the run time of pms does not include the time for building the ilp table. it takes hours and 500mb to build and store the ilp table for ℓ = and d = pms on real data: predicting transcript factor-binding sites in this section, we discuss how to use algorithm pms to find transcript factor-binding sites in the real data provided in. the real data is broadly used to test many existing algorithms,,,. each dataset in the real data is comprised of dna sequences with verified transcript factor-binding sites. the datastes are from many species including mouse, human and yeast. we have used the algorithm pms to find transcript factor-binding sites as follows. for any given dataset, we have run pms with ℓ = d = and obtained a set of motifs. some of these motifs could be spurious hits. hence, we need a scoring scheme to rank the motifs. we have used the simple scoring function ∑1≤i≤n dh, where dh is the hamming distance between motif m and sequence si. we take the motif with the lowest score and then predict transcription factor-binding sites based on it. notice that we have only used one value for ℓ because smaller values of ℓ have been tested in. we provide the detailed results in table in table the first column is the name of the dataset. the dataset is from mouse if the dataset's name starts with "mus". the second column is the motif with the lowest score produced by algorithm pms the third column is the verified transcription factor-binding sites that overlap with the predicted transcription factor-binding sites at least 60% of the motif length. we find that there are out of datasets in which the predicted transcription factor-binding sites are correct. in particular, one of the verified transcription factor-binding sites in dataset hm22r contains the predicted transcript factor-binding site. therefore, we conclude that the results in table once again reaffirm the accuracy of the pms model. in practice one could use pmsprune and pms together to identify motifs. in this case the sensitivity will be better than using pmsprune alone. performance of extended pms on the q-pms challenging instances in this section, we show the performance of extended pms on the q-pms challenging instances as described in section. the experiment setting is the same as that in section. any dataset will consist of random strings each of length. we choose the parameter q = which requires motifs to appear in at least 50% of input sequences. note that this choice of q corresponds to the worst case run time. table shows the run time of extended pms on the q-pms challenging instances. extended pms can solve q-pms challenging instances in hours and it fails to solve q-pms challenging instances.  in this paper we have presented an efficient exact algorithm for the -motif search problem. this algorithm is more efficient than any known exact algorithm for pms. in particular, using this algorithm we can solve the challenging instances and. no prior exact algorithms could solve these instances. therefore, we hope that pms will help biologists discover longer motifs in future. our algorithm is based on some novel ideas that will be of independent interest to solve pms and other variations of the motif search problem. one of the basic ideas we employ is that of computing the common d-neighborhood of three ℓ-mers. this is done using an integer programming formulation. an open problem will be to exploit this idea to further improve the performance of our algorithm. one possible direction is to use a basic step where the d-neighborhood of k ℓ-mers is computed. we have extended our algorithm to solve the q-pms problem as well. challenging instances for the q-pms problem have been defined and computed. our extended algorithm can solve the following q-pms challenging instances:,,,, and. in comparison, the exact algorithms mitra, risotto, and voting also can only solve challenging instances up to d =. authors' contributions hd and sr designed and analyzed the algorithms. hd and vkk implemented the algorithms and carried out the empirical experiments. hd, sr and vkk analyzed the empirical results. hd and sr drafted the manuscript. hd, sr and vkk read and approved this paper. 
motifs are patterns found in biological sequences that are vital for understanding gene function, human disease, drug design, etc. they are helpful in finding transcriptional regulatory elements, transcription factor binding sites, and so on. in this paper, we propose a fast algorithm that can solve the well-known challenging instances of pms: and. in this paper we focus on exact algorithms only. all the known exact algorithms for pms take exponential time in some of the underlying parameters in the worst case scenario. but it does not mean that we cannot design exact algorithms for solving practical instances within a reasonable amount of time. in particular, our proposed algorithm takes about hours on the challenging instance and about hours on the challenging instance. pms can tackle the large challenging instances and. the pms problem has been well investigated and shown to be np-hard. any algorithm for pms that always finds all the -motifs on a given input set is called an exact algorithm. no prior exact algorithm could solve these instances. one of them is -motif search ). many facets of the motif search problem have been identified in the literature. the algorithm has been run on a single ghz pc with 3gb ram. we present an efficient algorithm pms that uses some novel ideas and combines them with well-known algorithm pms and pmsprune.
 motifs are patterns found in biological sequences that are vital for understanding gene function, human disease, drug design, etc. they are helpful in finding transcriptional regulatory elements, transcription factor binding sites, and so on. as a result, the problem of identifying motifs is very crucial in biology.  many facets of the motif search problem have been identified in the literature. one of them is -motif search ). the pms problem has been well investigated and shown to be np-hard. any algorithm for pms that always finds all the -motifs on a given input set is called an exact algorithm. in this paper we focus on exact algorithms only. all the known exact algorithms for pms take exponential time in some of the underlying parameters in the worst case scenario. but it does not mean that we cannot design exact algorithms for solving practical instances within a reasonable amount of time. in this paper, we propose a fast algorithm that can solve the well-known challenging instances of pms: and. no prior exact algorithm could solve these instances. in particular, our proposed algorithm takes about hours on the challenging instance and about hours on the challenging instance. the algorithm has been run on a single ghz pc with 3gb ram. the implementation of pms is freely available on the web at http://www.pms.engr.uconn.edu/downloads/pms zip.  we present an efficient algorithm pms that uses some novel ideas and combines them with well-known algorithm pms and pmsprune. pms can tackle the large challenging instances and. therefore, we hope that pms will help biologists discover longer motifs in the futures. 