/*------------------------------------------------------------- Copyright (C) 2000 Peter Clote, Sebastian Will All Rights Reserved. written by Peter Clote modified by Sebastian Will Permission to use, copy, modify, and distribute this software and its documentation for NON-COMMERCIAL purposes and without fee is hereby granted provided that this copyright notice appears in all copies. THE AUTHOR AND PUBLISHER MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. THE AUTHORS AND PUBLISHER SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. -------------------------------------------------------------*/ /* histoneMutation.c Solution to exercise 1 in chapter 2 Exercise: It is estimated that the nucleotide substitution rate lambda per site per year for nuclear DNA of higher primates is 1.3 x 10^{-9}. Histone H4 consists of 105 amino acids, hence 315 nucleotides. Assuming that nucleotide substitutions occur uniformly across the 315 sites of histone H4, what is the least number of nucleotide substitutions, where with probability at least 0.5 a substitution has occurred at the same site? Using lambda, estimate the amount of time which has elapsed for this to occur. */ #include main() { int n=0; double x=1.0; double years; while (x >= 0.5) { x *= (double) (315-n)/315; n++; printf("x:%f ",x); printf("n:%d ",n); printf("years:%e\n",(n/1.3)*1e9); } /* for n is the probability less than 0.5, hence take n-1 */ n--; years = (n/1.3)*1e9; /* years = n/lambda, where lambda=1.3*10^-9 */ // note the use of exponential notation 1e9 instead of // 1000000000 to denote one billion printf("n:%d\n",n); printf("years:%e\n",years); } /*------------------------------------- Answer n:21 years:1.615385e+10 Since this is about 15 billion years, and it is believed that the earth has existed for 5 billion years, and life, beginning with cyanobacteria (blue-green algae) only for about 2 or 3 billion years, it is unlikely that there has been a mutation twice in the same position of histone. --------------------------------------*/