Untitled

Consider the two strings X = ADBAD and Y = DABDA. We are interested in the cost of the smallest sequence alignment of X and Y and prefixes of these. The gap cost and the penalty matrix M is

A B D
A 0 3 2
B 3 0 1
D 2 1 0

Question 1 (3 points)

What is the value of the smallest sequence alignment of the two strings X and Y?

2?

Question 2 (2 points)

What is the value of the smallest sequence alignment of the strings X2 = AD and Y3 = DAB

2?

Untitled

Fenwick tree

Compute the Fenwick tree F over the following array A of numbers:

Untitled

Untitled

Untitled