Write a Perl program to determine the forward and backward probability of a sequence alignment as given by a hidden Markov model, followed by posterior probabilities. Your program should output the posterior probabilities in matrix form. For example if the input is AGA and AG your program should output the probabilites in a 3 by 2 matrix. You will have to modify the HMM recurrence to get the forward and backward recurrence. The initializations remain the same but don't forget to adjust them for the backward matrices. Your b(0,0) does not have to be equal to f(m,n) where m and n are lengths of input sequences. This would happen only of transition probabilities from begin to other states are equal (which is not in our case). Use this example to test your program: Inputs: ATG and A Forward values: i=1 j=1 M[1][1]=0.36 X[1][1]=0 Y[1][1]=0 i=1 j=2 M[1][2]=0.048 X[1][2]=0 Y[1][2]=0.072 i=1 j=3 M[1][3]=0.0192 X[1][3]=0 Y[1][3]=0.0384 Reverse values: i=0 j=2 M[0][2]=0.24 X[0][2]=0 Y[0][2]=0 i=0 j=1 M[0][1]=0.016 X[0][1]=0 Y[0][1]=0.144 i=0 j=0 M[0][0]=0.0096 X[0][0]=0 Y[0][0]=0.0672 Forward matrix is A T G A 0.36 0.12 0.0576 Backward matrix is A T G A 0.0768 0.16 0.24 Matrix p is 0.48 0.333333333333333 0.24 Use the formulat P(xi - yj) = f(i,j)b(i,j)/P(x,y) to get the posterior probability outputs. The due date is 2:30pm Nov 19th 2018. Submit your assignment by copying it into the directory /afs/cad/courses/bnfo/f18/bnfo/601/101/. For example if your ucid is abc12 then copy your Perl script into /afs/cad/courses/bnfo/f18/bnfo/601/101/abc12.