hw1 - 20.181.hw1 file:/Users/endy/Desktop/hw1.html...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
20.181.hw1 file:///Users/endy/Desktop/hw1.html Biological Computation 20.181 Homework 1 Review of Recursion. In class we looked at a recursive definition for the factorial function f(n) = n! = n*(n-1)*(n-2)*. ..*1. Write a recrusive function that takes three numbers -- k,first,second -- as input, and returns a list including the first k terms of the Fibonacci series, using the recursive definition F(n+1) = F(n) + F(n-1), and the initial conditions F(1) = first and F(2) = second. Your solution should be of the following form: def fib(k,first,second): #return fibonacci series up to k terms #insert code here Introduction to phylogenies. Consider the following five sequences: 1. AAGGCCCACTA 2. GATGTCCGATA 3. AAGGCCCACTT 4. AATGGCCCCTA 5. GATGTCCGATA Compute all pairwise distances between these sequences in terms of number of mismatched base pairs (hint: sequences 1 and 2 have 5 mismatches, so their distance is 5). The UPGMA algorithm (which stands for unweighted pair group method using arithmetic averages) is
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/11/2011 for the course BIO 20.010j taught by Professor Lindagriffith during the Spring '06 term at MIT.

Page1 / 2

hw1 - 20.181.hw1 file:/Users/endy/Desktop/hw1.html...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online