bioinformatics algorithm - exhaustive search