Question: The following program is in C language: Question 2 (70%) Write the following programs for string search 2.1 A program to implement a brute force

The following program is in C language: The following program is in C language: Question 2 (70%) Write the

Question 2 (70%) Write the following programs for string search 2.1 A program to implement a brute force algorithm. (10%) 2.1 A program to implement the Horspool's algorithm. (20%) 2.3 A program to implement the Boyer-Moore algorithm. (30%) The text is in file data.5.txt, which has 44049 lines of strings. A search patterns includes the 52 upper and lower case letters only. Search is case-sensitive. When a program is executed, it reads in the text, prompts for a pattern, finds all the occurrences of the pattern in the text, and reports the total number of occurrences found. Don't remove any symbols (characters) from the text. A program is required to report the number of pattern shifts and running time for each search. 2.4 Analyze performance of your brute force ard Horspool programs. (10%) The performance parameters are the umber of pattern shifts and running time. To compare two programs, choose ten search patterns of different lengths, and search them by using the programs separately. For each pattern, calculate the ratios of the performance parameters of the two programs. Then, for all the ten patterns, calculate average ratios, and compare and analyze the performance of the two programs in terms of the ratios. Very briefly write your comparison and analysis in the readme file submitted with your programs

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!