# Overview: Pattern-Matching (aka String Search) is the process of algorithmically finding copies of a pattern P...

###### Question:

Overview:

Pattern-Matching (aka String Search) is the process of algorithmically finding copies of a pattern P inside a (generally much larger) text T. The goal is to implement and compare four classical string-matching algorithms.

Input:

Your code should work for any text either inputted directly or read in from a file.

However, for testing - input file has been provided:

• The Gettysburg Address (by President Abraham Lincoln, 1863)

You should minimally search for these three patterns in each text: FREE, BRAVE, NATION.

You should convert the entire string to upper case and conduct your searches accordingly.

Methodology and Output:

1. Implement the Brute Force Algorithm

2. Implement the Knuth-Morris-Pratt Algorithm

3. For each algorithm and text/pattern combination

a)Track and tabulate the number of character-comparison operations   b)Track and tabulate the clock time for each algorithm

Input file for test:

Fourscore and seven years ago our fathers brought forth on this continent a new nation, conceived in liberty and dedicated to the proposition that all men are created equal. Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battlefield of that war. We have come to dedicate a portion of that field as a final resting-place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this. But, in a larger sense, we cannot dedicate — we cannot consecrate — we cannot hallow — this ground. The brave men, living and dead, who struggled here have consecrated it, far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us — that from these honored dead we take increased devotion to that cause for which they gave the last full measure of devotion — that we here highly resolve that these dead shall not have died in vain — that this nation shall have a new birth of freedom and that government of the people, by the people, for the people, shall not perish from the earth.

JAVA/C++ thanks.

#### Similar Solved Questions

##### Foto Company makes 6,000 units per year of a part it uses in the products it...
Foto Company makes 6,000 units per year of a part it uses in the products it manufactures. The unit product cost of this part is computed as follows: $12.10 19.70 Direct materials Direct labor Variable manufacturing overhead Fixed manufacturing overhead Unit product cost$43.50 An outside supplier h...
##### Assignment is due: Monday November 12, 2019, 11:30 PM Submit your email assignment to the course...
Assignment is due: Monday November 12, 2019, 11:30 PM Submit your email assignment to the course DROPBOX. To simulate your email response, include and complete (as should be seen in an email response), the following fields: Subject: From: Date: To: Scenario: You are the owner of an industrial printi...
The following income statements are provided for Li Company's last two years of operation: Number of units produced and sold Sales revenue Cost of goods sold Gross margin General, selling, and administrative expenses Net income Year 1 3,500 $101,500 68,000 33,500 13,000$ 20,500 Year 2 3,000 $8... 1 answer ##### Wompeuve equilibrium. 3. How the intuition of general equilibrium in a timeless economy should be adapted... wompeuve equilibrium. 3. How the intuition of general equilibrium in a timeless economy should be adapted to consider time and uncertainty? What is a contingent commodity? 4. Present an example of a contingent claim.... 1 answer ##### QUESTION 16 Dane Company's predetermined overhead rate is based on direct labor hours (DLHs), At year.... QUESTION 16 Dane Company's predetermined overhead rate is based on direct labor hours (DLHs), At year. During the year, the company incurred$200,000 in actual manufacturing overhesd predetermined overhead rate was $40.00 per DLH, how many DLHs were the costs. The Mnng r the curren yer,e O 5,500... 1 answer ##### Find the surface area and volume of a right cylinder, closed at both end 8. Find... find the surface area and volume of a right cylinder, closed at both end 8. Find the surface area and volume of a right cylinder, closed at both ends, with a base circumference of 8 in. and a height of 12 in. Find the surface area and the volume of the cylinder, Round your answer to the nearest ... 1 answer ##### I posted it earlier and they gave me the wrong answer please make sure it's correct... I posted it earlier and they gave me the wrong answer please make sure it's correct and refer to the letter like a, b, c. that's showing in the box. Thanks!! 2 Exercise 3-2 (Algo) Prepare T-Accounts [LO3-2, LO3-4) Jurvin Enterprises is a manufacturing company that had no beginning inventorie... 1 answer ##### Are there nuclear reactions going on in our bodies? Are there nuclear reactions going on in our bodies?... 1 answer ##### Your client has$102,000 invested in stock A. She would like to build a two-stock portfolio...
Your client has $102,000 invested in stock A. She would like to build a two-stock portfolio by investing another$102,000 in either stock B or C. She wants a portfolio with an expected return of at least 15.5% and as low a risk as possible, but the standard deviation must be no more than 40%. What d...
##### Suppose a plot of inverse wavelength vs frequency has slope equal to 0.388, what is the...
Suppose a plot of inverse wavelength vs frequency has slope equal to 0.388, what is the speed of sound traveling in the tube to 2 decimal places?...
##### Why is a cardiac-oriented definition of death not enough when considering organ transplantation?
Why is a cardiac-oriented definition of death not enough when considering organ transplantation?...
##### Recommendation for IKEA inventory supply chain management.
Recommendation for IKEA inventory supply chain management....
##### Suppose that a researcher is interested in estimating the population mean (Miu_X) of a population with...
Suppose that a researcher is interested in estimating the population mean (Miu_X) of a population with the sample average estimator, X_bar. The population has a population standard deviation of Sigma_X. The question that the research has is: “How large should my sample size be?” You help...