Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Distribution Counting Algorithm & Boyer-Moore Algorithm PLEASE GIVE PSUEDO CODE.

ID: 3856385 • Letter: D

Question

Distribution Counting Algorithm & Boyer-Moore Algorithm

PLEASE GIVE PSUEDO CODE. DO NOT WRITE ACTUAL CODE. I NEED PSUEDO CODE EXPLANATION WRITTEN

1. (5 points) Assuming that the set of possible list values is (a, b, c, dy, sort d, c, a, c, c, a, b, b in alphabetical order by the distribution-counting algorithm. 2. (9 points) Consider the problem of searching for genes in RNA sequences using the Boyer-Moore algorithm. An RNA sequence consists of a text on the alphabet fA, C, G, U and the gene or gene scgment is the pattern. Construct the bad symbol shift table for the pattern AUCGGAU. Construct the good suffiz shift table for the pattern AUCGGAU ·Apply the Boyer-Moore algorithm to locate the above pattern in the following DNA sequence: ACGUGGGGCCCAAAAUCGGAUAACCC

Explanation / Answer

2)

Explanation : Firstly i will give the basic idea of what is boyer-moore algorithm
The Boyer - Moore algorithm is nothing but it compares the pattern with the text from right to left and then if the text symbol that is compared with the rightmost pattern symbol does not occur in the pattern at all then the pattern can be shifted by m positions behind this text symbol. in this way we can calculate the patterns

the problem for searching the genes in RNA sequences using the boyer-moore algorithm for the given pattern is calculated and given below:

i)for bad symbol shift table for the given pattern AUCGGAU is calculated below

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
The DNA sequence A C G U G G G G C C C A A A   A U C G G A U    A A C C C

bad symbol   A U C G G A U

The pattern occours at shift 14.

ii)for good symbol shift table for the given pattern AUCGGAU is calculated below

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
The DNA sequence A C G U G G G G C C C A A A   A U C G G A U    A A C C C

good symbol   A U C G G A U

The pattern occours at shift 14.

1) Assuming that the set of possible list values is {a,b,c,d}
sort d,c,a,c,c,a,b,b in alphabetical order by the distribution counting algorithm

The answer is
Sorted character array is aabbcccd by using distribution counting algorithm

Hope this helps Thank you.