We define the best consensus motif (BCM) problem motivated by the problem of extracting motifs from nucleic acid and amino acid sequences. A type over an alphabet C is a family R of subsets of C*. A motif ;.r of type R is a string ;.r = 7~1 . ;.rn of motif components, each of which stands for an element in R. The BCM problem for R is, given a yes-no sample S = {(a('), @('I), . . . , (dm) , dm))...