Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Idea: Given 3 strings, and the length of the longest common subsequence. Input Format: The input file will be called input2.txt and be in the

Idea: Given 3 strings, and the length of the longest common subsequence. Input Format: The input file will be called input2.txt and be in the same directory as the java and class files. The file will contain 3 lines and each line will be one of the three strings. Output: A number N where the length of the longest common subsequence. This value should be calculated in polynomial time using dynamic programming. Examples: If the input was aaaaaxbbbbb bbbbbxccccc cccccxddddd then output would be 1 because the longest common substring is x. Similarly if the input was ccabacbaabad dababccaaba ccddababaaba and the output would be 8 because the longest common substring is ababaaba. Details: The program must be written in Java. The program must compile with the command javac *.java and run with the command java Project2. One common problem students have with this is placing the classes into packages. Don't do this (just use the default package). The program should be reasonably commented, indented, structured. The program should be submitted by placing all les in a directory named after you, zipping this directory and submitting via canvas (ie if the professor was submitting then all les would be placed in a directory called JohnNoga, this directory would be zipped, and uploaded in canvas). How: You must use dynamic programming and your program must run in polynomial time. The most obvious and acceptable way to solve the problem is O(n3).

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

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago