[Solved] CSCI203 Lab6 KarpRabin String Search

$25

File Name: CSCI203_Lab6_KarpRabin_String_Search.zip
File Size: 339.12 KB

SKU: [Solved] CSCI203 Lab6– Karp‐Rabin String Search Category: Tag:
5/5 - (1 vote)

For this exercise, you are to implement the KarpRabin string search algorithm.As usual, your program will prompt for the name of an input file and the read and process the data contained in this file.

The file contains two sequences of characters.

The first is the target sequence, T, the second is the search sequence S.

Read both sequences into character arrays and find all occurrences of sequence S in sequence T using the KarpRabin algorithm.

For each matched sequence, print the location of the first matched character in T.

For example, if the test data looked like this:

ACGTACGTACCAGTA

AC

The output should be:

0 4 8

Notes:

  1. The sequence T is no longer than 5000 characters
  2. The sequence S is no longer than 10 characters
  3. The alphabet used in both sequences consists of the letters A, C, G and T, the DNA base sequences.
  4. Choose an appropriate modulus, m, for the hash function.
  5. Try to make your hash computation as efficient as possible.

As usual, do not use classes or STL.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CSCI203 Lab6 KarpRabin String Search
$25