method of equal-appearing intervals