Question

This question pertains to string alignment. Give a dynamic programming algorithm (time complexity O(nm)) that counts...

This question pertains to string alignment.

Give a dynamic programming algorithm (time complexity O(nm)) that counts the number of optimal alignments given 2 sequences.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Okay so I'm providing the algorithm/code in c++ with proper comments so that you are able to understand the solution.

But before that I'd like to write where this algorithm is used. It is used in Biology, in order to find the proximity between different (2) amino-acid sequences. The algorithm used for it has seen a lot of progress in terms of space and time complexity, and now we use dynamic programming to solve it.

So, here is the algorithm/code-

MAIN FUNCTION-

FUNCTION CALL-

OUTPUT

-

TIME COMPLEXITY- O(N*M).

Add a comment
Know the answer?
Add Answer to:
This question pertains to string alignment. Give a dynamic programming algorithm (time complexity O(nm)) that counts...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT