A binary sequence may give the appearance of being composed of alternating
segments with relatively high and relatively low probability of success. De
termining whether such an alternating pattern is significant is a multiple-
changepoint problem where the number of segments and their success probabil
ities are unknown, with the added constraint of segment alternation. A dyna
mic programming method for determining the optimal segmentation into a give
n number of segments is provided. Given this, a variation on the simulation
method of Venter and Steel (1996, Computational Statistics and Data Analys
is 22, 481-504) may be employed to test the null hypothesis of a homogeneou
s sequence as well as to estimate the number and location of changepoints.
A sample application, the assessment of the possibility of genetic recombin
ation in HIV sequences, is presented.