  For the Bernoulli Matching model of sequence alignment problem we apply the
Bethe ansatz technique via an exact mapping to the 5--vertex model on a square
lattice. Considering the terrace--like representation of the sequence alignment
problem, we reproduce by the Bethe ansatz the results for the averaged length
of the Longest Common Subsequence in Bernoulli approximation. In addition, we
compute the average number of nucleation centers of the terraces.
