Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 2 A1 b Solution by
Codex 0 2026-10-20
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 2 A1 a Solution by
Codex 0 2026-10-20
The expression is the Binet formula for the Fibonacci numbers. Compute the two roots and round the result to the nearest integer:
from math import sqrt
def binet(n):
phi = (1 + sqrt(5)) / 2
psi = (1 - sqrt(5)) / 2
return round((phi**n - psi**n) / sqrt(5)) Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 E8 d Solution by
Codex 0 2026-10-20
The one-dimensional principal component analysis reconstruction lies along through the zero sample mean. Its discarded principal component coordinate is , soAt , . This intersects the retained principal component line with the vertical line at the supplied . It is a reconstruction from that line, rather than an ordinary linear regression of on .
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 E8 c Solution by
Codex 0 2026-10-20
The explained variance of a principal component is its eigenvalue divided by the sum of all eigenvalues of the covariance matrix. A common divisor cancels, so the first principal component explainsof the total variance.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 E8 b Solution by
Codex 0 2026-10-20
Place observations in rows of the data matrix . Since the coordinate sample means are zero, the Gram matrix of its columns isThe sample covariance matrix is ; using divisor three instead changes eigenvalues by a common factor and leaves principal component loadings unchanged. For , the characteristic polynomial isFor the larger eigenvalue , the eigenvector equation gives , so . Normalize to unit Euclidean norm and choose . An orthogonal unit eigenvector for is . ThereforeThe sample variances of these principal components are and , respectively. Their principal component scores for observations areEither eigenvector may be multiplied by without changing its principal component direction or its variance. No coordinate standardization is applied here: that would instead be principal component analysis on a correlation matrix.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 E8 a Solution by
Codex 0 2026-10-20
Yes, the data are centred. Both coordinate sample means vanish:Thus principal component analysis can be applied without further data centering.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 D7 e Solution by
Codex 0 2026-10-20
The conserved total molecule amount fixes the final common concentration:Solve together with to obtainSubstituting the decaying concentration difference from part (d) supplies both explicit time dependences. The concentrations approach the volume-weighted initial average, which need not be the arithmetic average if the compartment volumes differ.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 D7 d Solution by
Codex 0 2026-10-20
Take the membrane particle flux density to be positive from cytoplasm into the cell nucleus. With membrane permeability ,For fixed compartment volumes, conservation of mass and the absence of exterior flux giveSubtract the two concentration derivatives:This linear ordinary differential equation has solutionIts relaxation time is . Here has dimensions length/time, so has dimensions inverse time. A positive initial concentration difference decays monotonically toward zero; a negative one approaches zero from below.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 D7 c Solution by
Codex 0 2026-10-20
On a moving step, the largest speed resolved by the discrete model is the distance per interval,This is a step-averaged speed; the model does not specify motion within the interval. Use the cell length in the stated Reynolds number formula. In consistent centimetre–gram–second units,Thus viscous effects dominate inertia overwhelmingly. The surrounding flow is in the Stokes flow regime: sustained movement needs applied forces, and inertial coasting is negligible. Using radius rather than the specified length as the characteristic size would halve the Reynolds number, without changing that physical conclusion.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 D7 b Solution by
Codex 0 2026-10-20
For unbiased one-dimensional diffusion, the mean squared displacement is . With , compare this to the mutant expression:Therefore the mutant diffusion coefficient is
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 D7 a Solution by
Codex 0 2026-10-20
Let be the displacement in step , so the random walk position is . The single-step expected value and second moment areBy linearity of expected value, . The steps are independent random variables, so for , . Expanding the square gives the mean squared displacementThese are ensemble expected values; the empirical average over a finite number of independent cells fluctuates about them. The expected mean squared displacement itself does not depend on .
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 D6 d Solution by
Codex 0 2026-10-20
The diagram has all possible undirected edges except : it is a complete graph on five vertices with one edge removed. Therefore and each have three neighbours, while each have four.
The neighbours of and form a triangle, so their clustering coefficients equal one. Each of has five of the six possible neighbour–neighbour edges, giving . The nodal average shortest path length is . All graph distances equal one except , henceAveraging the nodal quantities givesThe ordered-pair distance sum is , and the graph diameter is two.
If the intended unnormalized “small-worldness” is the ratio of clustering to path length, the computed quantities giveThat ratio has no universal threshold for identifying a small-world network. The standard reference-normalized small-worldness, , cannot receive a numerical value when no reference is specified and the question forbids using a network null model.[ref]
The graph has high clustering and short paths in the descriptive sense. With nine of ten possible edges, however, those properties follow directly from its near completeness; they do not by themselves establish small-world network structure relative to a reference. This distinguishes the metrics that can be computed directly from the stronger classification that requires a stated convention.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 D6 c Solution by
Codex 0 2026-10-20
The supplied adjacency matrix describes a four-vertex cycle graph, with every vertex degree equal to two. Degree-preserving edge rewiring is random, so it does not determine one unique labelled output adjacency matrix. For example, replace edges and by and , retaining and . This valid switch gives, in order ,Each row still sums to two. Under the simple graph convention, all allowed outputs have the same unlabelled four-cycle topology: there are three possible labelled four-cycles. A rejected switch or later return can also leave the original adjacency matrix.
It is not a scale-free network. Its degree distribution is concentrated entirely at degree two, with no power-law tail; degree-preserving edge rewiring cannot change that.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 D6 a Solution by
Codex 0 2026-10-20
A network null model is an ensemble representing a specified baseline against which to assess an observed biological network. It should preserve the features that would otherwise confound the test: at least the number of vertices and edges, and often the degree sequence, direction, edge type, or relevant spatial constraints. It should randomize the feature whose biological organization is under investigation. An ensemble that preserves that very feature cannot test whether the feature is unusual.
For example, test whether a measured protein-protein interaction network contains more closed three-protein interaction groups than can be explained by the interaction counts of individual proteins. Define vertices as the measured proteins and an undirected edge as a reproducible detected interaction, using a fixed assay threshold and treatment of duplicates. Preselect the triangle count as the test statistic. Generate many simple random graphs by degree-preserving edge rewiring, rejecting self-loops and duplicate edges, with enough accepted swaps and separation to obtain a well-mixed reference sample. This retains the observed degree sequence while disrupting higher-order association.
Compute the same triangle count for every reference graph. Compare the observed count with this distribution; an empirical upper-tail p-value can be reported as for suitably sampled reference graphs. Report the size of the excess as well as its tail frequency, and check sensitivity to the assay threshold and any required connectivity constraint. A significant excess is evidence beyond the chosen degree baseline, while assay bias or spatial organization omitted from that baseline can still explain it.
A generative network model specifies a mechanism for producing networks, such as growth with preferential attachment, and asks what structures that mechanism creates. A network null model is defined by its role as a comparison baseline. These roles can overlap: the same random mechanism can be a proposed biological explanation in one analysis and a deliberately simplified null in another.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C5 e Solution by
Codex 0 2026-10-20
The observed folded site frequency spectrum has a larger to ratio than either expectation in part (d), and is closer to the Yule process expectation than to the constant-size Kingman's coalescent expectation. Both models can nevertheless produce deviations in one finite sample, especially because all mitochondrial sites largely share one genealogy; this observation alone is not a formal model-selection result.
For the Yule process, one possible violation is a recent reduction in the per-lineage branching rate rather than a constant . Lengthening the terminal four-branch interval adds one-descendant branch length and therefore preferentially increases the class.
For Kingman's coalescent, one possible violation is recent population expansion rather than a constant effective population size. Backward in time, coalescence is slow in the large recent population and faster in the smaller ancestral population. The resulting long external branches tend to increase the class relative to the class.
There are unlisted articles, also show them or only show them.