Docsity

Function, Algorithms and Lisp Reading and Practice - Assignment | MEBI 531, Assignments of Biology

Toggle sidebar
bg1
MEDED 531 Assignment 1: due Monday October 7
Corrected version 10/1
1 Functions
This may seem simple to some, but it is just to orient you to a way of thinking about programming.
1.1 Functional composition
This is a totally hypothetical medical math problem. Let’s assume that the measles virus grows
exponentially, i.e., the number of virus particles in a compromised host increases with some power
of the time from the initial infection. Let’s also assume that the number of spots that appear
on the person’s skin is proportional to the square root of the number of virus particles. Using
parameters for the proportionality constants, express these two facts as formulas, and then write
the composition of them, the number of spots as a function of time.
For extra credit, some medical person can provide a more realistic function, and suggest other
variables and their functional form.
1.2 The algebra of bioterrorism
Another unrealistic problem, the intent of which is to recollect how to translate descriptions of
problems into algebraic relations and then to solve the relations.
A certain number of doses of smallpox vaccine and tetanus vaccine have been delivered. The
group to be vaccinated consists of adults and children. The children will get both vaccines, while
the adults will only get the smallpox vaccine. The smallpox vaccination consists of two doses (an
initial and a booster), while the tetanus consists of four. The total number of people is 687,400 and
the total number of vaccine doses is 2,324,400. How many adults and how many children are in
the group?
This is likely to occur again, with different total population and different total number of vac-
cine doses. Parametrize your solution and derive a formula for the number of adults and the number
of children, in terms of the total number of people and the total number of vaccine doses.
Again extra credit to the medical people who can restate this in a more realistic way.
1.3 The central dogma of molecular biology
The great discovery of modern molecular biology is the “genetic code”, by which each of the 20
amino acids that make up proteins is represented in the genome by a group of nucleotide pairs.
Having four nucleotides to choose from (guanine, adenine, cytosine and thymine), how many
nucleotides are needed to uniquely code for each amino acid?
1
pf3

Partial preview of the text

Download Function, Algorithms and Lisp Reading and Practice - Assignment | MEBI 531 and more Assignments Biology in PDF only on Docsity!

MEDED 531 Assignment 1: due Monday October 7

Corrected version 10/

1 Functions

This may seem simple to some, but it is just to orient you to a way of thinking about programming.

1.1 Functional composition

This is a totally hypothetical medical math problem. Let’s assume that the measles virus grows exponentially, i.e., the number of virus particles in a compromised host increases with some power of the time from the initial infection. Let’s also assume that the number of spots that appear on the person’s skin is proportional to the square root of the number of virus particles. Using parameters for the proportionality constants, express these two facts as formulas, and then write the composition of them, the number of spots as a function of time.

For extra credit, some medical person can provide a more realistic function, and suggest other variables and their functional form.

1.2 The algebra of bioterrorism

Another unrealistic problem, the intent of which is to recollect how to translate descriptions of problems into algebraic relations and then to solve the relations.

A certain number of doses of smallpox vaccine and tetanus vaccine have been delivered. The group to be vaccinated consists of adults and children. The children will get both vaccines, while the adults will only get the smallpox vaccine. The smallpox vaccination consists of two doses (an initial and a booster), while the tetanus consists of four. The total number of people is 687,400 and the total number of vaccine doses is 2,324,400. How many adults and how many children are in the group?

This is likely to occur again, with different total population and different total number of vac- cine doses. Parametrize your solution and derive a formula for the number of adults and the number of children, in terms of the total number of people and the total number of vaccine doses.

Again extra credit to the medical people who can restate this in a more realistic way.

1.3 The central dogma of molecular biology

The great discovery of modern molecular biology is the “genetic code”, by which each of the 20 amino acids that make up proteins is represented in the genome by a group of nucleotide pairs. Having four nucleotides to choose from (guanine, adenine, cytosine and thymine), how many nucleotides are needed to uniquely code for each amino acid?

Look up the actual coding scheme, and write a function definition that will take a codon (a nucleotide sequence like AGC) as input and give the amino acid as output.

The actual genetic code has some redundancy – several nucleotide sequences code for the same amino acid. Does this still allow a function definition?

1.4 Does anything go?

Do the functions defined below represent the same function, i.e., are they equivalent? Why or why not? Do you need more information, and if so, what?

1.5 Does it go both ways?

Is there a function that is the inverse of the trigonometric function

? If so, what is it, and if not, why not?

2 Algorithms

An algorithm is a procedure for computing the value of a function (or, alternately, for transforming some inputs into some results). A sorting algorithm takes a list of items that can be compared, and produces from them a new list with the items in order.

  1. Write an algorithm for sorting a list of names. The comparision is simply the usual rule for alphabetical order according to the English language and Latin alphabet. If required, your algorithm can make copies - it should result in a list that has the same information as the first list but in alphabetic. Test your algorithm on a small list, made up perhaps with 3 by 5 cards, or perhaps a handful of business cards.
  2. Is your algorithm guaranteed to terminate, regardless of how big the list is? Why or why not?
  3. How does the number of steps to complete the sorting vary with the number of items to sort (for your algorithm)? Explain your reasoning to determine this.
  4. Counting one unit of space for each item in the list, does your algorithm require more tem- porary space as the number of items increases? If so, how does it vary with the number of items? Explain.