ArticleslgStudy

computer science

Pairwise Algorithm

Pairwise Algorithm is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Pairwise Algorithm rather than just read about it. In short: A Pairwise Algorithm is an algorithmic technique with its origins in Dynamic programming. Pairwise algorithms have several uses including comparing a protein profile (a residue scoring matrix for one or more aligned sequences) against the three translation frames of a DNA strand, allowing frameshifting.

Pairwise Algorithm — main illustration
Pairwise Algorithm — illustration

Key takeaways

  • Pairwise Algorithm belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Pairwise Algorithm to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Pairwise Algorithm from memory before moving on to harder problems.

Reference excerpt

A Pairwise Algorithm is an algorithmic technique with its origins in Dynamic programming. Pairwise algorithms have several uses including comparing a protein profile (a residue scoring matrix for one or more aligned sequences) against the three translation frames of a DNA strand, allowing frameshifting. The most remarkable feature of PairWise as compared to other Protein-DNA alignment tools is that PairWise allows frameshifting during alignment.

History One of the earliest applications of PairWise to problems in bioinformatics was by Ewan Birney. Frameshifting refers to the phenomena where in one DNA strands, there are more than one translation frame. For normal Protein-DNA alignment tools, they first choose one of three frames to translate the DNA into a protein sequence, and then compare it with the given protein. Such alignment is based on the assumption that the DNA translation frame is not interrupted for the whole DNA strand. However, this is not generally true. The PairWise algorithm is a variant of the Smith–Waterman algorithm best local alignment algorithm. These algorithms all belong to the class known as minimal string edit algorithms. The main differences between PairWise and other alignment algorithm is that, besides normal penalties such as Gap Opening Penalty (GOP), Gap Extension Penalty (GEP) and Match, PairWise introduced two new penalties called Frame Opening Penalty (FOP) and Frame Extension Penalty (FEP), which will be incurred when a frameshift is accepted and extended respectively.

Illustration Figure 1 illustrates the alignment result when one protein sequence and one DNA sequence was aligned using normal protein-DNA alignment algorithm. The frame used was frame 1 for the DNA sequence. As shown in the picture, there was a gap of 2 amino acids (6 nucleic acids) in the alignment, which results the total low score of -2.

Figure 2 illustrates the aligned result using PairWise. Using the same DNA and protein sequence, and with the penalties modified as below. The arrow is pointing to the position where frameshifting took place. At that nucleotide (G), translation frame was shifted from frame one to frame two (dotted line). This change resulted a much better alignment which has a score of 9.

References

Illustrations

Pairwise Algorithm illustration

Worked examples

Example 1 — a first encounter with Pairwise Algorithm

Start with the simplest possible case. Write down what Pairwise Algorithm claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Pairwise Algorithm before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Pairwise Algorithm ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Pairwise Algorithm

In research
Pairwise Algorithm appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Pairwise Algorithm in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Pairwise Algorithm is common in secondary-school and first-year university syllabi. It links to neighbouring topics Bioinformatics algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Pairwise Algorithm outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Pairwise Algorithm in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Pairwise Algorithm means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Pairwise Algorithm out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Pairwise Algorithm in simple terms?

A Pairwise Algorithm is an algorithmic technique with its origins in Dynamic programming. Pairwise algorithms have several uses including comparing a protein profile (a residue scoring matrix for one or more aligned sequences) against the three translation frames of a DNA strand, allowing frameshif…

Why does Pairwise Algorithm matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Pairwise Algorithm?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Pairwise Algorithm.

Tags

  • Bioinformatics algorithms

Keep exploring