Question
Report : Run the following tests and experiments with your program. Use various input files of different sizes (e.g. >100MB). For each input and program,
Report: Run the following tests and experiments with your program. Use various input files of different sizes (e.g. >100MB). For each input and program, measure the run-time of the program. Then generate plots from your results answering following questions: With a fix number of input files, how does the run-time of your program change according to the changing input size? How does the run-time change according to the number of matches? How does the run-time change according to the number of input files. Explain your results and come up with conclusions.
In this project, you are supposed to implement a program which will search words provided by the user in a number of input files and will output the matching lines. The programs will be named psearch. They need to take the following command line parameters: an alphanumeric keyword, number of input files (n), input filenames, and an output filename. Number of input files will be greater than or equal to 1 . Each input file is a text file; containing a sequence of lines. All of these lines may contain one or more (alphanumeric) words. A line of an input file matched if the given keyword is found in the line as a separate word. For instance, the keyword "name" appears in "His name is Ali.", but does not appear in "He is named Ali". The output file will contain the matched lines along with the name of the input file that the match is found in, and the line number of the match in the format below: ,Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started