CSE 2320 - Assignments - Assignment 7

Submit to Blackboard before the deadline. You will be able to revise your answers until the deadline with no penalty.


Task 1 (10 pts.)

File matrix_multiplication.c contains the implementation of a bottom-up solution for optimally ordering matrix multiplications. Modify the file, so that in addition to printing out the optimal ordering and associated cost, it also prints out the following: Save your solution into a file called matrix_multiplication.c.


Task 2 (40 pts.)

Write a program that takes in two strings as commandline arguments, computes the edit distance between those strings, and prints out both the distance and the corresponding alignment.

Additional Requirements:

These are examples of how you would invoke the program from the commandline, and what output it would produce (assuming that your executable is called edit_distance):
./edit_distance chicken ticket
edit distance: 3
c h i c k e n
t - i c k e t
x x . . . . x

./edit_distance lazy crazy
edit distance: 2
l - a z y 
c r a z y
x x . . .

./edit_distance intimidation immigration
edit distance: 5
i n t i m i d - a t i o n
i - - m m i g r a t i o n
. x x x . . x x . . . . .

Task 3 (25 pts.)

Create a C file called graph_print.c, that contains:


Task 4 (25 pts.)

Create a C file called tree_check.c, that contains a function tree_check with the following signature and specifications:


How to submit

The assignment should be submitted via Blackboard. Submit a ZIPPED directory called Firstname_Lastname.zip. No other forms of compression are accepted, contact the instructor or TA if you do not know how to produce .zip files. The zipped directory should contain the following documents:

As stated on the course syllabus, programs must be in C, and must run on omega.uta.edu.

IMPORTANT: Pay close attention to all specifications on this page, including file names and submission format. Even in cases where your answers are correct, points will be taken off liberally for non-compliance with the instructions given on this page (such as wrong file names, wrong compression format for the submitted code, and so on). The reason is that non-compliance with the instructions makes the grading process significantly (and unnecessarily) more time consuming. Contact the instructor or TA if you have any questions.


Back to the list of assignments.