Running time analyses of all the methods

Assignment Help Data Structure & Algorithms
Reference no: EM13149932

In this assignment, you will implement the compact representation of the compressed suffix trie ADT for DNA analyses.

A template of the compressed suffix trie class is shown as follows:

public class CompressedSuffixTrie
{
/** You need to define your data structures for the compressed trie */

/** Constructor */

public CompressedSuffixTrie( String f ) // Create a compressed suffix trie from file f
{ }

/** Method for finding the first occurrence of a pattern s in the DNA sequence */

public static int findString( String s )
{ }

/** Method for finding the longest common subsequence of two DNA sequences stored
in two text files f1 and f2 */

public static float similarityAnalyser(String f1, String f2)
{ }
}

The data structures for the compressed suffix trie are not given in the above template. You need to define them yourself. You may introduce any helper methods to facilitate the implementation of these two methods.

The constructor creates a compact representation of the compressed suffix trie from an input text file f that stores a DNA sequence. All the characters of the DNA sequence are A, C, G and T. The findString(s) method has only one parameter: a pattern s. If s appears in the DNA sequence, findString(s) will return the starting index of the first occurrence of s in the DNA sequence. Otherwise, it will return -1. For example, if the DNA sequence is AAACAACTTCGTAAGTATA, then findString("CAACT") will return 3 and findString("GAAG") will return -1. Note that the index of the first character of the DNA sequence is 0.

Warning: If your findString(s) method is slower than O(|s|) (|s| is the length of s), you will get 0 mark for it.

The method similarityAnalyser(String f1, String f2) returns the similarity of two DNA sequences stored in the text files f1 and f2. The similarity of two DNA sequences S1 and S2 is equal to |lcs(S1,S2)|/max{|S1|,|S2|}, where |lcs(S1,S2)|, |S1| and |S2| are the lengths of a longest common subsequence of S1 and S2, S1 and S2, respectively. For simplicity, you may assume that each file contains at most 1000 DNA characters. When your program reads a DNA sequence from a file, it needs to ignore all non-DNA characters such as the newline character. Notice that this method does not need to use any compressed suffix trie. The running time of your method similarityAnalyser(f1, f2) is required to be at most O(mn) , where m and n are the sizes of f1 and f2, respectively. Any method with a higher time complexity will be given 0 mark.

You need to give the running time analyses of all the methods in terms of the Big O notation. Include your running time analyses in the source file of the CompressedSuffixTrie class and comment out them.

Reference no: EM13149932

Questions Cloud

Define friendship : There are several ways to define friendship. Everybody probably define friendship in many other ways. For example, friendship can be mean trustworthy, loyal, honesty, reliable and many more. Some people might define friendship as just a ditching frie..
Stockholders equity section of the balance-sheet : Prepare the stockholders' equity section of the balance sheet at December 31, 2007.
Contemporary view of sex : Im trying to find two aspects of the 1960's that have influenced the contemporary view of sex. I need two of them, since its just a three page essay.
How do media contribute to the enlightmen of individuals : "How do media contribute to the enlightmen of individuals? THESIS STATEMENT:Internet considerably contributes to the enlightment of individuals in terms of academic and liberal education.
Running time analyses of all the methods : You need to give the running time analyses of all the methods in terms of the Big O notation. Include your running time analyses in the source file of the CompressedSuffixTrie class and comment out them.
How do media contribute to deterioration of moral values : I am trying to prepare an outline, My subject is" How do media contribute to the deterioration of moral values?" THESIS STATEMENT
Research the risk factors and pathophysiology of cancer : Cancer kills more than 500,000 Americans each year according to the American Cancer Society. Research the risk factors and the pathophysiology of a cancer topic of your choice. Write your findings in your own words in a two page,
Research and persuasive paper on music piracy : I'm writing a research/persuasive paper on music piracy and my stand is that I think downloading music online should be allowed. I need to turn in a thesis statement next week and I'm not sure what a thesis statement would be like, whether it include..
Achilles relationship : Why is Achilles relationship to both the gos and his surrounding warrior society so unusual? What realizations does he arrive at during his period of withdrawal from the war?

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Create an asp.net project with visual studio

Design an ASP.NET assignment with Visual Studio that contains two aspx forms. The 1st form uses the Login control to a login page. Users should not be able to view second form unless they have entered a correct username and password.

  Algorithm to produce a list of customers

Draw an algorithm to produce a list of customers from the Glad Rags Clothing Company's customer master file.

  Create algorithm to calculate union of two input sets-array

Create algorithm to calculate union of two input sets given as arrays, both of size O(n). The output must be array of distinct elements that form union of the sets.

  Creating a database with a table

Design a database with a table called tblStudents and use Visual Studio.NET 2005 to create an ASP.NET project with four aspx forms. Use Master Pages to show a school name.

  Analyzing network problem

Assume you are the Systems Analyst at a producing corporation in Seattle, WA. A Systems Analyst in your company's New York office sends you a trace file to examine.

  Question about trigger

What are triggers used for, and why are they important in database systems? Give an example of a situation where a trigger would be appropriate.

  Creating an access database

PLUS is a corporation that makes all types of visual aids for judicial proceedings. Customers are usually private law firms, although the District Attorney's office has occasionally contracted for its services.

  Question about arrays, vector and stl

Suppose if x denotes the mean of a sequence of numbers x1, x2,.....xn, variance is the average of the squares of the deviations of numbers from the mean.

  Portfolio planning using optimization

Set this problem up as a linear programming model in Excel, and use Solver to determine how the $10 million should be invested. What is the overall return (in dollars terms)

  Algorithm to compute-report grade-point average for class

Compute and report grade-point average for class. Determine the sum of the grades; count number of students; compute average. Determine its algorithm?

  Algorithm to divide sixteen digit value by six digit integer

Divide 16 digit value N by six digit integer D obtaining quotient Q and remainder (or sign of the remainder) R by division algorithms.

  Algorithm to produce schedule for least completion time

What is the best order for sending people out, if one wants whole competition to be over as early as possible? More precisely, provide efficient algorithm which produces schedule whose completion time is as small as possible.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd