ctime-complexityblast

What is the time complexity of the given BLAST?


comp

This is the BLAST(Basic Local Alignment Search Tool) graph. How can I calculate its time complexity?


Solution

  • BLAST algorithm steps:

    The First step take time O(n), where n is the number of element in the sequence.

    The Second step is another loop on the words created in the first step ( upperbound n) so time O(n)

    The Third step assign an hit score. This could be done only letter by letter so the time complexity is O(n*m) where m is the number of letter in the query word. As upper bound we can say that the time is O(n^2)

    The fourth step is a simple cycle over the score obtained, so ever O(n).

    In conclusion the algorithm could be assimilated to O(n^2), in the case m << n, we could say O(n*m). the lower bound is O(n).