All exercises

EXERCISE 01 · GLOBAL ALIGNMENT

Alignment Lab

Arrange two DNA sequences to propose a shared evolutionary history. Every match, mismatch, and gap changes the evidence.

CURRENT CHALLENGE 1 / 5

A missing base

These sequences are closely related, but one may contain an insertion or deletion.

Sequence A
Sequence B
Build your alignment Select a row and position, then insert a gap. Arrow keys move the cursor; Space inserts and Backspace removes a gap.
Match Mismatch Gap

THE IDEA

Alignment is a hypothesis, not just a neat arrangement.

Each column proposes that two bases share a history. A gap proposes an insertion or deletion. Scoring turns those biological assumptions into numbers, while dynamic programming checks every possible global alignment efficiently.

Global
Aligns both sequences from beginning to end.
Linear gap
Charges the same penalty for every gap character.
Optimal
The highest score under the chosen rules—not a universal truth.