Implementation of two different strategies for calculation of search length.