CSCI 4490-6490 Algorithms for Computational Biology Spring 2016
Homework Assignment 1
Problems:
- Choose one of the following tasks to do:
(1) Write a simple enumeration algorithm, either recursive or iterative, that prints all 4-mers consisting of 5 letters {-, A, C, G, T}, in the order of
----, ---A, ---C, ---G, ---T,
..., TTT-, TTTA, TTTC, TTTG, TTTT
(2) Write a recursive algorithm that can search a list (array) for a key. The algorithm outputs the index of the array element that contains the key if it is found, and 0 otherwise. Code this algorithm using a programming language.
(3) Code the recursive Fibonacci algorithm using a programming language. Add some instrucmentaional statements to the code so that it records the number of times the recursive algorithm is called. Can you also try to record the number of times the algorithm is called for every specific number k=1, 2, ..., n, where n is the input parameter to the algorithm?
- Code the exhaustive search algorithm BruteForceMotifSearch for the motif finding problem given in the book (no branch-and-bound is necessary)
so that it runs correctly on computers.
-
Design a new score strategy for Score(s, DNA) that is different from the strategy given in the book.
- State your proposed strategy; it would be okay if you borrow ideas from the literature but you need to cite the references;
- Design an algorithm that can calculate the function Score(s, DNA) based on the new strategy; the algorithm has to be your own;
- Code the new algorithm for Score(s, DNA);
- Revise the program in 2 to call the newly coded score function for the motif finding problem; name this program BruteForceMotifSearch-new
-
Compare the performances between BruteForceMotifSearch and
BruteForceMotifSearch-new, including both running time and accuracy.
Requirements:
For problem 1, your algorithm can be written in pseudocode or
some programming language (if you wish to run the program and test its correctness.
For problem 2, you may use any programming language to code the algorithm. Note that no built-in functions can be used if they can substantially accomplish any function or subroutine needed by the BruteForceMotifSearch algorithm. The code program should be tested to ensure it can output results correctly. The instructor will provide some data for you to test your program. You will be required to demo your program in his office.
Problem 3 can be completed as a team work (of at most two students). You will need to submit a report on how you solve this problem and demo your program.
Sequence data samples to test your program for problem 2.
General Guidelines to Homework Submission: You need to submit a written answer to every question even for a pure programming task. Specifically,
- For a programming question, you need to report what you have done, including the algorithm used (your own or downloaded - if it is allowed), the programming language choice, your coding/debugging experience, and cases tested.
You may also need to demo your program to the instructor/TA.
But no code or data is required to be submitted.
-
For an algorithm question, you should submit the algorithm you have designed and explain some of the non-trivial ideas or solutions you created to overcome difficulties that you may have encountered.
- For a method/algorithm development + programming question, you need to report on your method, algorithm, and implementation details. The report also need to include tests conducted, observations, and performance analyses. You may also need to demo your program to the instructor/TA.
This homework is due on Tuesday February 2, 2016.