Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C5 d Solution by
Codex 0 2026-10-20
Under the stated topology probabilities, and . Averaging the branch lengths from part (b), the expected length producing the folded class isThe factor in type A includes both the one-descendant and three-descendant root branches. The expected length producing the class isWith a common mutation rate per unit branch length, it cancels from the ratio of expected counts in this folded site frequency spectrum:For the Yule process,For Kingman's coalescent,These are ratios of ensemble expected mutation counts, not the expected value of the random ratio in one tree. The stipulated topology weights apply to both processes, and their waiting-time rates depend only on the current number of branches.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C5 b Solution by
Codex 0 2026-10-20
Count the number of descendant leaves on each branch during each phylogenetic epoch. From the tips backward, both topologies have branch-size lists during , then during . During , type A has and type B has .
Let be the total length of branches carrying descendant leaves. Adding the relevant phylogenetic epoch durations givesFor example, type A has one external branch and one three-descendant branch throughout , while type B has two two-descendant branches. In either case the total expected branch length is , a useful accounting check. The stem above the common root is excluded because mutations there would be shared by all four samples.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C5 a Solution by
Codex 0 2026-10-20
A phylogenetic epoch is a time interval between successive branching events during which the number of ancestral branches is constant. Read backward from the four sampled leaves: there are four branches until the first merger, then three until the next, then two until their common root. Write the random durations as , with expected values .
The original solution diagram below places time horizontally and labels each branch by its number of descendant leaves. Type A is the pectinate topology; type B is the balanced topology. The coloured time strips identify the three phylogenetic epochs; their drawn widths are schematic, not estimated times.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C4 h Solution by
Codex 0 2026-10-20
The gain comes from avoiding a full dynamic programming table for every target. BLAST searches for short, sufficiently high-scoring word matches between query and database, then extends promising seeds. Modern versions reserve expensive gapped refinement for candidates passing earlier filters. FASTA sequence search similarly starts from short word matches, collects promising runs along alignment diagonals, and refines or joins selected regions. Word lookup and database indexing make candidate discovery inexpensive compared with considering every pair of positions.[ref]
Basic local alignment search tool by Stephen F. Altschul and others. pp. 403–406, word matches and hit extension
[ref]Improved tools for biological sequence comparison by William R. Pearson and David J. Lipman. pp. 2444–2446, FASTA search stages
These are heuristic algorithms: a good local sequence alignment can be missed if it has no acceptable seed, contains many interruptions, or is filtered before extension. Longer words and higher seed-score thresholds usually speed the search but reduce sensitivity; shorter words and looser thresholds recover weaker similarities at greater cost. Repetitive or compositionally biased regions can create many uninformative hits and erode both speed and specificity. No guarantee remains of finding the optimal sequence alignment for the chosen scoring scheme.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C4 g Solution by
Codex 0 2026-10-20
Use local sequence alignment, such as the Smith-Waterman algorithm, to compare the globin fragment with the matching region of each full-length target. A global sequence alignment would penalize long target flanks absent from the fragment. For a linear gap penalty the dynamic programming recurrence includes a restart option:Initialize boundary entries to zero, start traceback at the largest entry anywhere, and stop at zero. If the entire query is known to be valid and must be retained, fitting sequence alignment is a suitable refinement: align the whole fragment while leaving target flanks unpenalized.
First check the sequence alphabet: the prompt calls the targets “genes”. If the FASTA format file contains DNA rather than protein, translate the relevant coding sequences into amino acids before a protein-to-protein sequence alignment. If coding frames are unknown, search translated frames. A file in FASTA format specifies storage syntax, not whether the contents are nucleotides or residues.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C4 f Solution by
Codex 0 2026-10-20
Use global sequence alignment, for example the Needleman-Wunsch algorithm with an appropriate substitution matrix and gap penalty. The two full-length globin proteins are related by orthology and are from closely related species, so the expected correspondence extends across both complete sequences. Unmatched ends should normally contribute to the score rather than being discarded.
With a linear gap penalty of magnitude , the dynamic programming entry is the best score for the first and residues. It satisfieswith , , and traceback from . An affine gap penalty uses separate match and gap states.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C4 e Solution by
Codex 0 2026-10-20
An affine gap penalty charges a larger opening cost than extension cost, reflecting that a single insertion or deletion event can span several residues. For a gap of length , explicitly chooseThe supplied sequence alignment has two gap runs, of lengths one and two. Its residue–residue score remains , so this choice givesMore generally, this affine gap penalty convention gives . There is no unique numerical rescore until opening and extension costs are chosen. A concave length-dependent gap penalty can make very long gaps progressively cheaper per added residue; distinct terminal gap penalties can accommodate incomplete sequence ends. Each choice encodes a different assumption about insertions, deletions or sequence completeness.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C4 d Solution by
Codex 0 2026-10-20
Read the ten residue–residue columns from the BLOSUM62 substitution matrix. In their order in the supplied sequence alignment, their contributions areThere are three gap positions, each incurring the stated linear gap penalty of four, including the leading gap. Therefore the alignment score is .
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C4 c Solution by
Codex 0 2026-10-20
The number specifies the sequence-identity threshold used when clustering related sequences before deriving a BLOSUM substitution matrix. At 62%, sufficiently similar sequences are grouped and their within-cluster comparisons are excluded. Lowering the threshold merges more sequences, emphasizing comparisons across greater divergence.
Consequently BLOSUM80 is suited to closer relatives, BLOSUM45 to more divergent sequences, and BLOSUM62 is intermediate. The numbers do not specify a required identity of the query and target, nor a number of evolutionary time steps.[ref]
Amino acid substitution matrices from protein blocks by Steven Henikoff and Jorja G. Henikoff. pp. 10916–10917, clustering levels and performance across divergence
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C4 b Solution by
Codex 0 2026-10-20
A diagonal substitution matrix score measures enrichment over a background match, rather than simply rewarding an identical letter. tryptophan residues are comparatively rare, so a W–W match has a small chance background frequency . Its observed conservation produces a much larger ratio than the corresponding ratio for the more common leucine. The BLOSUM62 diagonal therefore awards W–W more than L–L. Both the background frequency and the observed pair frequency matter; rarity alone does not determine a diagonal score.[ref]
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C4 a Solution by
Codex 0 2026-10-20
A BLOSUM substitution matrix is estimated from conserved, ungapped blocks of related protein sequences. Closely related sequences are clustered to reduce overrepresentation, and aligned amino acid pairs from different clusters are counted. Let be their normalized observed pair frequency, and the frequency expected from independent draws at the background amino acid frequencies. With unordered pairs, and for .
For BLOSUM62, scores are rounded half-bit logarithms of these odds:A positive entry means that the aligned pair occurs more often in related sequences than the independent-background model predicts; a negative entry means less often. Adding these scores accumulates evidence across aligned positions. A score is neither a percentage identity nor a direct substitution probability.[ref]
The statistics of sequence similarity scores by National Center for Biotechnology Information. The choice of substitution scores; The PAM and BLOSUM amino acid substitution matrices
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 B3 c Solution by
Codex 0 2026-10-20
Using the paper's named weights , takeThe least-squares normal equations for weighted least squares becomeMultiplying by four gives and . Their determinant is , givingThus, to two significant digits, , with the slope measured in expression units per hour.
There is a wording convention to make explicit. Because the stated objective squares , the choice above gives the final two squared residuals one-quarter of the influence of the others. If “half as much” instead means half the coefficient of each squared residual, use . Then the least-squares normal equations aregiving and . Stating which quantity is halved resolves the ambiguity.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 B3 b Solution by
Codex 0 2026-10-20
Apply the least-squares normal equations to the transformed matrix and vector:or equivalentlyHere . A unique minimizing vector exists when the weighted design matrix has full column rank; the equations themselves remain valid without that assumption.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 B3 a Solution by
Codex 0 2026-10-20
Choose the diagonal matrix . Multiplying a vector by scales its th component by . ThereforeThe Euclidean norm objective for ordinary linear least squares on is exactly the weighted least squares objective, so the sets of minimizing vectors coincide. Zero weights simply discard the corresponding residuals.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 B2 f Solution by
Codex 0 2026-10-20
The Jacobian matrix at the extinction fixed point iswith characteristic polynomialUnder , , whereas as . Hence its positive eigenvalueis greater than one. Its eigenvector can be taken with both components positive: choose . Thus there are biologically admissible positive perturbations that grow. The extinction fixed point is unstable by linear stability analysis for a discrete dynamical system.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 B2 e Solution by
Codex 0 2026-10-20
At a nonzero fixed point of the nonlinear stage-structured population model, the adult balance gives . Substitute into the juvenile equation and cancel :ThusBoth coordinates are positive precisely when .
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 B2 d Solution by
Codex 0 2026-10-20
Eliminate the juvenile variable from the stage-structured population model. Since ,The characteristic polynomial of this linear recurrence isso . The initial conditions give and , hence and . ThereforeThe alternating term records the initial imbalance between life stages; the growing term dominates eventually.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 B2 c Solution by
Codex 0 2026-10-20
This is a stage-structured population model with a census once per maturation interval. Only adults present at census contribute to the juvenile cohort at census ; each contributes new juveniles on average. Thus is an effective fecundity, including any survival of offspring needed to reach the next census. Juveniles present at do not contribute a separate birth term during this interval.
The term consists of juveniles that survive and mature into adults by the next census, so is their survival-to-maturity fraction. The term consists of surviving adults; is the adult mortality fraction per interval. All surviving juveniles leave the juvenile compartment in one step, adults remain adults, and there is no immigration or density dependence. The reproduction term is applied to adults counted at the start of the interval, rather than only to those surviving to its end.
There are unlisted articles, also show them or only show them.
