Docsity

COMP 590-90 / 790-90 Problem Set #5 - Prof. Wei Wang, Assignments of Computer Science

Toggle sidebar
bg1
COMP 590-90 / 790-90 Problem Set #5
due November 25 2008 2PM
1. Given a (long) nucleotide sequence, we want to find the number of occurrences of a
given l-mer of arbitrary length.
a. In this case, is the most appropriate data structure a hash table or a suffix tree?
Why?
b. Design an efficient algorithm to find the number of occurrences of a given l-mer,
using the data structure that you chose in part a. Again, the running time to
answer each query should be independent of the length of the nucleotide
sequence.
c. What is the time complexity to answer a query?
2. Consider the following set of points in a two dimensional space.
(2.2, 3.3), (1.6, 4.5), (6.7, 3.3), (4.7, 1.2), (8.6, 7.5), (5.3, 5.6), (7.9, 6.5), (2.5,
4.6), (5.5, 4.5), (1.1, 3.8)
a. Assume that the Euclidean distance is used. Compute by hand the distance matrix.
b. Assume that the distance between two clusters is defined as the maximal distance
of any pair of their elements. Draw the cluster tree constructed by the hierarchical
clustering algorithm in Page 345.
c. Assume that the distance between two clusters is defined as the average distance
between their elements. Draw the hierarchical cluster tree.
d. We want to run the k-means algorithm with k= 2. What would be the clustering
result if we take the first two points (i.e., (2.2, 3.3) and (1.6, 4.5)) as the initial
cluster representatives?
e. Would the result be different if we use the last two points (5.5, 4.5) and (1.1, 3.8)
as the initial cluster representatives? Explain your observation.
3. Consider the following four sequences.
Chimp GTTG
Gorilla GTCA
Human ACCA
Orang-Utan ATTA
a. Draw all possible binary tree topologies of these four sequences.
b. Assume the score matrix is as follows.
pf2

Partial preview of the text

Download COMP 590-90 / 790-90 Problem Set #5 - Prof. Wei Wang and more Assignments Computer Science in PDF only on Docsity!

COMP 590-90 / 790-90 Problem Set

due November 25 2008 2PM

  1. Given a (long) nucleotide sequence, we want to find the number of occurrences of a given l -mer of arbitrary length. a. In this case, is the most appropriate data structure a hash table or a suffix tree? Why? b. Design an efficient algorithm to find the number of occurrences of a given l -mer, using the data structure that you chose in part a. Again, the running time to answer each query should be independent of the length of the nucleotide sequence. c. What is the time complexity to answer a query?
  2. Consider the following set of points in a two dimensional space.

(2.2, 3.3), (1.6, 4.5), (6.7, 3.3), (4.7, 1.2), (8.6, 7.5), (5.3, 5.6), (7.9, 6.5), (2.5, 4.6), (5.5, 4.5), (1.1, 3.8)

a. Assume that the Euclidean distance is used. Compute by hand the distance matrix. b. Assume that the distance between two clusters is defined as the maximal distance of any pair of their elements. Draw the cluster tree constructed by the hierarchical clustering algorithm in Page 345. c. Assume that the distance between two clusters is defined as the average distance between their elements. Draw the hierarchical cluster tree. d. We want to run the k -means algorithm with k = 2. What would be the clustering result if we take the first two points (i.e., (2.2, 3.3) and (1.6, 4.5)) as the initial cluster representatives? e. Would the result be different if we use the last two points (5.5, 4.5) and (1.1, 3.8) as the initial cluster representatives? Explain your observation.

  1. Consider the following four sequences.

Chimp GTTG Gorilla GTCA Human ACCA Orang-Utan ATTA

a. Draw all possible binary tree topologies of these four sequences. b. Assume the score matrix is as follows.

A T G C

A 0 2 3 8

T 2 0 1 3

G 3 1 0 3

C 8 3 3 0

Applying Sankoff’s algorithm to each possible topology in part a to determine the weighted parsimony score. What is the minimal parsimony score? What is the most plausible topology? c. Applying the Fitch’s algorithm to these four sequences under each possible tree topology in part a. What would be the sequence generated at the root of each tree? Among them, which one has the smallest parsimony score. d. Is the result of part b unique? Please justify your answer.

  1. Consider the following distance matrix.

A B C D E F A 0 18 15 21 6 16 B 18 0 23 19 20 24 C 15 23 0 26 17 19 D 21 19 26 0 23 27 E 6 20 17 23 0 18 F 16 24 19 27 18 0

a. Is this distance matrix additive? Justify your answer. b. Apply the ADDITIVEPHYLOGENY function (Page 364). Draw the step-by-step result similar to Figure 10.14 (Page 363). c. Design an efficient algorithm for determining the value of δ at each step in 4.b. Explain your design.

  1. Program Assignment: Implement ADDITIVEPHYLOGENY and your algorithm in 4.c for determining the value of δ.

The following problem is for COMP 790-90 students. COMP 590-90 students may choose to do it for bonus credits.

  1. Problem 9.
  2. Problem 11.