Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write your code in file called edit_distance.c. Use the bottom-up (iterative) method to compute the edit distance (or matching cost) between 2 strings. Requirements: 1.

Write your code in file called edit_distance.c.

Use the bottom-up (iterative) method to compute the edit distance (or matching cost) between 2 strings. Requirements:

1. in main write a loop that repeatedly reads 2 strings (from the user) and prints the distance matrix, the distance between the strings and, if part b) is implemented, the string alignment. The loop should stop when the pair -1 -1 is given as the strings. It will be able to use data from a file, by redirecting the program input. Do not explicitly read from a file. 2.The table showing the cost must show the numbers aligned exactly as shown in the sample run: 3 spaces for number display in each cell and horizontal lines for the table . (You can work on the table display before you implement the edit distance (you can print 0 in every cell).)

3.The strings can be at most 100 characters long.

4.You can structure your code however you want: use helper functions, structs,...

5.No partial credit will be given for this problem.

6.Use the iterative (bottom-up) method. You can organize and have any signature you want for your functions.

We will test your code by running it and redirecting input as shown in the sample run below. Below are some sample runs. Here is the sample run that uses file data1.txt:

gcc -o ed edit_distance.c ./ed

image text in transcribed

gcc -o ed edit_distance.c ./ed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions

Question

=+ How well do you think you could do your job?

Answered: 1 week ago