SlideShare une entreprise Scribd logo
1  sur  101
Télécharger pour lire hors ligne
Greedy Algorithms
and
Genome Rearrangements
Outline
1. Transforming Cabbage into Turnip
2. Genome Rearrangements
3. Sorting By Reversals
4. Pancake Flipping Problem
5. Greedy Algorithm for Sorting by Reversals
6. Approximation Algorithms
7. Breakpoints: a Different Face of Greed
8. Breakpoint Graphs
Motivating Example: Turnip vs. Cabbage
• Although cabbages and turnips share a recent common
ancestor, they look and taste differently.
Motivating Example: Turnip vs. Cabbage
• In the 1980s Jeffrey Palmer studied evolution of plant
organelles by comparing mitochondrial genomes of cabbage
and turnip.
• He found 99% similarity between genes.
• These surprisingly similar gene sequences differed in gene
order.
• This study helped pave the way to analyzing genome
rearrangements in molecular evolution.
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
Motivating Example: Turnip vs. Cabbage
• Gene order comparison:
• Evolution is manifested as the divergence in gene order and
orientation caused by these inversions of segments of genes
Before
After
Another Example: Mice and Humans
• The X chromosomes of mice and humans give another example.
• What are the similarity blocks and how do we find them?
• What is the ordering of the blocks?
• What is the evolutionary scenario for transforming one genome
into the other?
Unknown ancestor
~ 75 million years ago
Mouse X chromosome
Human X chromosome
History of Chromosome X
Rat Consortium, Nature, 2004
Reversals: Example
5’ ATGCCTGTACTA 3’
3’ TACGGACATGAT 5’
5’ ATGTACAGGCTA 3’
3’ TACATGTCCGAT 5’
Break
and
Invert
Reversals
• Blocks represent conserved genes.
1 32
4
10
5
6
8
9
7
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Reversals
• Blocks represent conserved genes.
• A reversal introduces two breakpoints, represented by
1 32
4
10
5
6
8
9
7
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
1, 2, 3, 8, 7, 6, 5, 4, 9, 10
1 32
4
10
5
6
8
9
7
Reversals
• Blocks represent conserved genes.
• A reversal introduces two breakpoints, represented by
• As a result of the reversal, the gene ordering has changed to 1, 2,
3, 8, 7, 6, 5, 4, 9, 10.
Additional Genome Rearrangements
• Besides reversals, we also have:
1. Fusion and fission of chromosomes
Additional Genome Rearrangements
• Besides reversals, we also have:
1. Fusion and fission of chromosomes
2. Translocations
Rearrangements: Mathematical Representation
Reversal
1 2 3 4 5 6 1 2 5 4 3 6
Translocation
1 2 3
4 5 6
1 2 6
4 5 3
1 2 3 4
5 6
1 2 3 4 5 6
Fusion
Fission
Each number represents a conserved region; +/- represents orientation.
Mice vs. Humans Revisited
• Humans and mice have
similar genomes, but their
genes are ordered differently.
• ~ 245 rearrangements
• Reversals
• Fusions
• Fissions
• Translocations
Mice vs. Humans Revisited
• Waardenburg’s syndrome is characterized by pigmentary
dysphasia.
• A gene implicated in the disease was linked to human
chromosome 2 but it was not clear where exactly it is located
on chromosome 2.
Mice vs. Humans Revisited
• A breed of mice (with splotch gene) had similar symptoms
caused by the same type of gene as in humans.
• Scientists succeeded in identifying location of gene responsible
for disorder in mice; this gives clues to where the gene is
located in humans.
Mice vs. Humans Revisited
• To locate where the
corresponding gene is
in humans, we have to
analyze the relative
architecture of human
and mouse genomes.
Additional Application: Cancer
• Normal cells will have a certain makeup of chromosomes, as
revealed by “chromosome painting.”
Additional Application: Cancer
• Rearrangements may disrupt genes and alter gene regulation.
• Example: translocation in leukemia yields “Philadelphia”
chromosome:
• There are thousands of individual rearrangements known for
different tumors.
promoter c-ab1 oncogene
BCR genepromoterpromoter ABL gene
BCR genepromoter
Chr 9
Chr 22
Additional Application: Cancer
• MCF7 is the human breast cancer cell line.
• Cytogenetic analysis (low-resolution) suggests a complex
architecture with many translocations.
• What is the detailed architecture of MCF7 tumor genome?
• What sequence of rearrangements produced MCF7?
Reversals: A Formal Motivation
• A sequence of n genes is represented by a permutation p,
where a permutation is an ordering of the integers 1 to n:
p= p1------ pi-1 pipi+1 ------pj-1 pjpj+1 -----pn
p1------ pi-1pjpj-1 ------pi+1 pipj+1 -----pn
 Reversal r (i, j) reverses (flips) the elements from i to j in p
r(i,j)
Note: we don’t consider the orientation (sign) of genes here
Reversals: Example
p = 1 2 3 4 5 6 7 8
r(3,5)
1 2 5 4 3 6 7 8
Reversals: Example
p = 1 2 3 4 5 6 7 8
r(3,5)
1 2 5 4 3 6 7 8
r(5,6)
1 2 5 4 6 3 7 8
Reversal Distance Problem
• Goal: Given two permutations, find the shortest series of
reversals that transforms one into another
• Input: Permutations p and s
• Output: A series of reversals r1,…rt transforming p into s,
such that t is minimized
• The minimal such t is called the reversal distance between p
and s and is often written as d(p, s).
Sorting By Reversals Problem
• We will often simply assume that one of the permutations
being considered is fixed as the most natural permutation, the
identity I = (1 2 3 … n); we now restate the problem.
• Sorting By Reversals Problem: Given a permutation, find a
shortest series of reversals that transforms it into the identity.
• Input: Permutation p
• Output: A series of reversals r1,… rt transforming p into the
identity permutation such that t is minimum. We call the
minimum such t the “reversal distance” of p, denoted d(p)
• Say we are given p = (2 4 3 5 8 7 6 1)
• We can sort p in four steps as follows:
Step 0: p = (2 4 3 5 8 7 6 1)
Step 1: (2 3 4 5 8 7 6 1)
Step 2: (5 4 3 2 8 7 6 1)
Step 3: (5 4 3 2 1 6 7 8)
Step 4: (1 2 3 4 5 6 7 8)
• But can we sort p in three steps? Two? How can we know?
Sorting by Reversals: Example
Pancake Flipping Problem
• We take a short detour to discuss a
slightly more specific problem, which
first arose as a mathematics problem in
the 1970s.
• A chef is sloppy; he prepares an
unordered stack of pancakes of different
sizes.
• The waiter wants to quickly rearrange
them (so that the smallest winds up on
top, down to the largest at the bottom).
• He does it by flipping over several from
the top of the stack.
Pancake Flipping Problem
• Goal: Given a stack of n pancakes, what is the minimum
number of flips needed to rearrange them into the perfect
stack?
• Input: Stack of n pancakes
• Output: A minimal sequence of flips transforming the stack
into the perfect stack.
• We should note, however, that this isn’t very mathematical…
Pancake Flipping Problem
• Let’s label the smallest pancake by 1, the biggest by n, etc.; a
stack of pancakes can then be represented by a permutation.
• We can view a flip of the stack as a special reversal (called a
“prefix reversal”) which must involve the first element.
• With this mathematical framework, we will restate the pancake
flipping problem as the “Sorting by Prefix Reversals
Problem.”
Sorting by Prefix Reversals
• Sorting by Prefix Reversals Problem: Given a permutation p,
find the shortest sequence of prefix reversals transforming p
into the identity permutation.
• Input: Permutation p
• Output: A series of prefix reversals r1,… rt transforming p
into the identity permutation and such that t is minimized.
Pancake Flipping Problem: Greedy Algorithm
• Greedy approach: at most 2 prefix reversals at most to place
the biggest pancake on the bottom, at most 2 prefix reversals
to place the second-biggest pancake in the second position
from the bottom…
• This results in an algorithm which requires 2n – 3 prefix
reversals.
Pancake Flipping Problem
• Bill Gates (!) and Christos
Papadimitriou showed in the mid-
1970s that this problem can
actually be solved by at most
5/3 (n + 1) prefix reversals.
• Current bounds (2009): The
maximum number of flips required
to sort any stack of n pancake is
between (15/14) n and (18/11) n
Christos Papadimitrou and Bill
Gates flip pancakes
Note: This means that our greedy method is “close” to optimal
Sorting By Reversals: A Greedy Algorithm
• We now return to sorting by reversals.
• If the first three elements in permutation p = 1 2 3 6 4 5 are
already in order, it does not make any sense to break them.
• The length of the already sorted prefix of p is denoted
prefix(p)
• In our example above, prefix(p) = 3
• This results in an idea for a greedy algorithm: increase
prefix(p) at every step.
• Doing so, p can be sorted in two steps:
1 2 3 6 4 5
1 2 3 4 6 5
1 2 3 4 5 6
• The number of steps needed to sort a permutation of length
n is at most (n – 1).
Greedy Algorithm: Example
Note: Why is it n – 1 and not n? Think about the final step…
Greedy Algorithm: Pseudocode
SimpleReversalSort(p)
1 for i 1 to n – 1
2 j  position of element i in p (i.e., pj = i)
3 if j ≠i
4 p p * r (i, j)
5 output p
6 if p is the identity permutation
7 return
SimpleReversalSort: Analysis
• SimpleReversalSort does not guarantee the smallest number of
reversals and takes five steps on p = 6 1 2 3 4 5 :
• Step 0: 6 1 2 3 4 5
• Step 1: 1 6 2 3 4 5
• Step 2: 1 2 6 3 4 5
• Step 3: 1 2 3 6 4 5
• Step 4: 1 2 3 4 6 5
• Step 5: 1 2 3 4 5 6
• But p can be sorted in two steps:
• Step 0: 6 1 2 3 4 5
• Step 1: 5 4 3 2 1 6
• Step 2: 1 2 3 4 5 6
Approximation Algorithms
• The previous slide has shown that SimpleReversalSort is not
optimal for sorting by reversals.
• Often when we cannot find an optimal algorithm, we will use
approximation algorithms instead, which find good
approximate solutions rather than optimal ones.
• Define the approximation ratio of an algorithm A on input p as:
A(p) / OPT(p)
where
A(p) = solution produced by algorithm A
OPT(p) = optimal solution of the problem
Approximation Ratio/Performance Guarantee
• The approximation ratio (performance guarantee) of a
minimization algorithm A is the maximum approximation ratio
of all inputs of size n.
• Formally, for a minimization algorithm A, the approximation
ratio of A is as follows:
max|p| = n A(p) / OPT(p)
• Big Question: What is the best approximation ratio we can
find for sorting by reversals?
Note: What is the approximation ratio for our greedy algorithm for pancake flipping?
Adjacencies and Breakpoints
• Let p = p1p2p3…pn-1pn be a permutation. A pair of elements pi
and pi + 1 is called an adjacency if
pi+1 = pi +1
The remaining pairs are called breakpoints.
• Example:
p = 1 9 3 4 7 8 2 6 5
• (3, 4), (7, 8) and (6,5) are adjacent pairs
• (1,9), (9,3), (4,7), (8,2) and (2,5) are breakpoints.
Extending Permutations
• We put two elements p0=0 and pn + 1=n+1 at the ends of p.
• Example:
• Note that after extension, both a new breakpoint (5, 10) and a
new adjacency (0, 1) have been created.
Extending with 0 and 10
p = 1 9 3 4 7 8 2 6 5
p = 0 1 9 3 4 7 8 2 6 5 10
p = 2 3 1 4 6 5
0 2 3 1 4 6 5 7 b(p) = 5
0 1 3 2 4 6 5 7 b(p) = 4
0 1 2 3 4 6 5 7 b(p) = 2
0 1 2 3 4 5 6 7 b(p) = 0
Sorting by Reversals = Breakpoint Elimination
• Define b(p) to be the number of breakpoints in the extension
of p.
• Note that sorting by reversals appears to correspond to
removal of breakpoints.
• Example:
Sorting by Reversals = Breakpoint Elimination
• How many breakpoints can each reversal eliminate?
p = 2 3 1 4 6 5
0 2 3 1 4 6 5 7 b(p) = 5
0 1 3 2 4 6 5 7 b(p) = 4
0 1 2 3 4 6 5 7 b(p) = 2
0 1 2 3 4 5 6 7 b(p) = 0
Sorting by Reversals = Breakpoint Elimination
• How many breakpoints can each reversal eliminate?
• Each reversal eliminates at most 2 breakpoints.
p = 2 3 1 4 6 5
0 2 3 1 4 6 5 7 b(p) = 5
0 1 3 2 4 6 5 7 b(p) = 4
0 1 2 3 4 6 5 7 b(p) = 2
0 1 2 3 4 5 6 7 b(p) = 0
Sorting by Reversals = Breakpoint Elimination
• How many breakpoints can each reversal eliminate?
• Each reversal eliminates at most 2 breakpoints.
• This implies:
• d(p) ≥ b(p) / 2
• We will use this idea to create a new greedy algorithm.
p = 2 3 1 4 6 5
0 2 3 1 4 6 5 7 b(p) = 5
0 1 3 2 4 6 5 7 b(p) = 4
0 1 2 3 4 6 5 7 b(p) = 2
0 1 2 3 4 5 6 7 b(p) = 0
A Better Greedy Algorithm
BreakPointReversalSort(π)
1 while b (π) > 0
2 Among all possible reversals, choose reversal r
minimizing b (π•ρ)
3 π  π•ρ(i, j)
4 output π
5 return
A Better Greedy Algorithm
• Problem: this algorithm may never terminate.
BreakPointReversalSort(π)
1 while b (π) > 0
2 Among all possible reversals, choose reversal r
minimizing b (π•ρ)
3 π  π•ρ(i, j)
4 output π
5 return
Strips
• Strip: an interval between two consecutive breakpoints in a
permutation.
• Decreasing strip: a strip of elements in decreasing order
(e.g. 6 5 4 and 3 2 ).
• Increasing strip: a strip of elements in increasing order
(e.g. 6 7 8 9)
0 1 9 4 3 7 8 2 5 6 10
• A single-element strip can be declared either increasing or
decreasing. We will choose to declare them as decreasing with
exception of the strips 0 and n + 1.
Reducing the Number of Breakpoints
• Theorem 1: If a permutation π contains at least one
decreasing strip, then there exists a reversal ρ which
decreases the number of breakpoints (i.e. b(π•ρ) < b(π) ).
• We will use this result to help adapt our algorithm to one
which is guaranteed to terminate.
Idea for New Algorithm
• For p = 1 4 6 5 7 8 3 2
0 1 4 6 5 7 8 3 2 9 b(p) = 5
• Choose decreasing strip with the smallest element k in p
( k = 2 in this case)
Idea for New Algorithm
• For p = 1 4 6 5 7 8 3 2
0 1 4 6 5 7 8 3 2 9 b(p) = 5
• Choose decreasing strip with the smallest element k in p
( k = 2 in this case)
• Find k – 1 in p
Idea for New Algorithm
• For p = 1 4 6 5 7 8 3 2
0 1 4 6 5 7 8 3 2 9 b(p) = 5
• Choose decreasing strip with the smallest element k in p
( k = 2 in this case)
• Find k – 1 in p
• Reverse the segment between k – 1 and k:
0 1 4 6 5 7 8 3 2 9 b(p) = 5
0 1 2 3 8 7 5 6 4 9 b(p) = 4
• For p = 1 4 6 5 7 8 3 2
0 1 4 6 5 7 8 3 2 9 b(p) = 5
• Choose decreasing strip with the smallest element k in p
( k = 2 in this case)
• Find k – 1 in p
• Reverse the segment between k – 1 and k:
0 1 4 6 5 7 8 3 2 9 b(p) = 5
0 1 2 3 8 7 5 6 4 9 b(p) = 4
• This gives us a way of decreasing the number of
breakpoints, but what if there are no decreasing strips?
Idea for New Algorithm
The Case of No Decreasing Strips
• If there is no decreasing strip, there may be no reversal that
reduces the number of breakpoints (i.e. b(π•ρ) ≥ b(π) for any
reversal ρ).
• By reversing an increasing strip ( # of breakpoints stay
unchanged ), we will create a decreasing strip at the next step.
Then the number of breakpoints will be reduced in the
following step (by Theorem 1).
• Example:
π = 0 1 2 | 5 6 7 | 3 4 | 8 b(π) = 3
π• ρ(6,7) = 0 1 2 | 5 6 7 | 4 3 | 8 b(π) = 3
• ρ(6,7) creates a decreasing strip thus guaranteeing that the next
step will decrease the # of breakpoints.
ImprovedBreakpointReversalSort
ImprovedBreakpointReversalSort(p)
1 whileb (π) > 0
2 if π has a decreasing strip
3 Among all possible reversals, choose
reversal ρ that minimizes b (π•ρ)
4 else
5 Choose a reversal r that flips an increasing
strip in π
6 π π•ρ
7 outputπ
8 return
Performance Guarantee
• ImprovedBreakPointReversalSort is an approximation
algorithm with a performance guarantee of at most 4.
• It eliminates at least one breakpoint in every two steps; at
most 2b(p) steps.
• Approximation ratio: 2b(p) / d(p)
• Optimal algorithm eliminates at most 2 breakpoints in every
step: d(p) b(p) / 2
• Performance guarantee:
• ( 2b(p) / d(p) ) ≤ [ 2b(p) / (b(p) / 2) ] = 4
Signed Permutations
• Up to this point, all permutations to sort were unsigned.
• But genes have directions… so we should consider signed
permutations.
5’ 3’
p = 1 -2 - 3 4 -5
SIGNED Reversals
• Blocks represent conserved genes.
1 32
4
10
5
6
8
9
7
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
SIGNED Reversals
• Blocks represent conserved genes.
• A reversal introduces two breakpoints, represented by
1 32
4
10
5
6
8
9
7
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
1, 2, 3, -8, -7, -6, -5, -4, 9, 10
1 32
4
10
5
6
8
9
7
SIGNED Reversals
• Blocks represent conserved genes.
• A reversal introduces two breakpoints, represented by
• As a result of the reversal, the gene ordering has changed to 1, 2,
3, -8, -7, -6, -5, -4, 9, 10.
GRIMM Web Server
• Real genome architectures are represented by signed
permutations.
• Efficient algorithms to sort signed permutations have been
developed.
• GRIMM web server computes the reversal distances between
signed permutations.
http://www-cse.ucsd.edu/groups/bioinformatics/GRIMM
GRIMM Web Server
Additional Application: Breakpoint Graphs
1) Represent the elements of the permutation π = 2 3 1 4 6 5 as
vertices in a graph (ordered along a line).
2) Connect vertices in order given by π with solid edges.
3) Connect vertices in order given by 1 2 3 4 5 6 with dotted edges.
4) Superimpose solid and dotted paths.
0 2 3 1 4 6 5 7
Additional Application: Breakpoint Graphs
0 2 3 1 4 6 5 7
0 1 2 3 4 5 6 7
• If we line up the dotted path (instead of the solid path) on a
horizontal line, then we would get the following graph.
• Although they look different, these graphs are the same.
Additional Application: Breakpoint Graphs
0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7
• How does a reversal change the breakpoint graph?
• The dotted paths stay the same for both graphs.
• However, the red (solid) edges are replaced with blue ones.
Before: 0 2 3 1 4 6 5 7
After: 0 2 3 5 6 4 1 7
Additional Application: Breakpoint Graphs
0 1 2 3 4 5 6 7
• A reversal removes 2 edges (red) and replaces them with 2
new edges (blue).
Additional Application: Breakpoint Graphs
Case 1:
Both edges belong to the same cycle
• Remove the center black edges and replace them with new black edges
(there are two ways to replace them)
• (a) After this replacement, there now exists 2 cycles instead of 1 cycle
c(πρ) – c(π) = 1
This is called a proper reversal
since there’s a cycle increase
after the reversal.
• (b) Or after this replacement, there still exists 1 cycle
c(πρ) – c(π) = 0
Therefore, after the reversal
c(πρ) – c(π) = 0 or 1
Additional Application: Breakpoint Graphs
Case 2:
The edges belong to different cycles
• Remove the center black edges and replace them with new black edges
• After the replacement, there now exists 1 cycle instead of 2 cycles
c(πρ) – c(π) = -1
Therefore, for every
permutation π and reversal ρ,
c(πρ) – c(π) ≤ 1
Additional Application: Breakpoint Graphs
• Since the identity permutation of size n contains the maximum cycle
decomposition of n+1, c(identity) = n+1
• c(identity) – c(π) equals the number of cycles that need to be “added”
to c(π) while transforming π into the identity
• Based on the previous theorem, at best after each reversal, the cycle
decomposition could increased by one, then:
d(π) = c(identity) – c(π) = n+1 – c(π)
• Yet, not every reversal can increase the cycle decomposition
Therefore, d(π) ≥ n+1 – c(π)
From Signed to Unsigned Permutations
• Recall that genes are directed fragments of DNA and we represent a genome
by a signed permutation
• If genes are in the same position but there orientations are different, they do
not have the equivalent gene order
• For example, these two permutations have the same order, but each gene’s
orientation is the reverse; therefore, they are not equivalent gene sequences
1 2 3 4 5
-1 2 -3 -4 -5
From Signed to Unsigned Permutations
• Begin by constructing a normal signed breakpoint graph
• Redefine each vertex x with the following rules:
 If vertex x is positive, replace vertex x with vertex 2x-1 and vertex 2x
 If vertex x is negative, replace vertex x with vertex 2x and vertex 2x-1
 The extension vertices x = 0 and x = n+1 are kept as they were before
0 3a 3b 5a 5b 8a 8b 6a 6b 4a 4b 7a 7b 9a 9b 2a 2b 1a 1b 10a 10b 11a 11b 23
0 5 6 10 9 15 16 12 11 7 8 14 13 17 18 3 4 1 2 19 20 22 21 23
+3 -5 +8 -6 +4 -7 +9 +2 +1 +10 -11
From Signed to Unsigned Permutations
0 5 6 10 9 15 16 12 11 7 8 14 13 17 18 3 4 1 2 19 20 22 21 23
• Construct the breakpoint graph as usual
• Notice the alternating cycles in the graph between every other vertex pair
• Since these cycles came from the same signed vertex, we will not be
performing any reversal on both pairs at the same time; therefore, these
cycles can be removed from the graph
Interleaving Edges
0 5 6 10 9 15 16 12 11 7 8 14 13 17 18 3 4 1 2 19 20 22 21 23
• Interleaving edges are grey edges that cross each other
These 2 grey edges interleave
Example: Edges (0,1) and (18, 19) are interleaving
• Cycles are interleaving if they have an interleaving edge
Interleaving Graphs
• An Interleaving Graph is defined on the set of cycles in the Breakpoint graph
and are connected by edges where cycles are interleaved
0 5 6 10 9 15 16 12 11 7 8 14 13 17 18 3 4 1 2 19 20 22 21 23
A
B
C
E
F
0 5 6 10 9 15 16 12 11 7 8 14 13 17 18 3 4 1 2 19 20 22 21 23
A
B
C
E
F
D
DB
C
A E F
Interleaving Graphs
AB
C
D E F
• Oriented cycles are cycles that have the following form
F
C
• Unoriented cycles are cycles that have the following form
• Mark them on the interleave graph
E
• In our example, A, B, D, E are unoriented cycles while C, F are oriented
cycles
Hurdles
• Remove the oriented components from the interleaving graph
AB
C
D E F
• The following is the breakpoint graph with these oriented components
removed
• Hurdles are connected components that do not contain any other connected
components within them
A
B D
E
Hurdle
Reversal Distance with Hurdles
• Hurdles are obstacles in the genome rearrangement problem
• They cause a higher number of required reversals for a permutation to
transform into the identity permutation
• Taking into account of hurdles, the following formula gives a tighter
bound on reversal distance:
d(π) ≥ n+1 – c(π) + h(π)
• Let h(π) be the number of hurdles in permutation π

Contenu connexe

Similaire à Ch05 rearrangements

Geneticschapter2part2 140126121602-phpapp02
Geneticschapter2part2 140126121602-phpapp02Geneticschapter2part2 140126121602-phpapp02
Geneticschapter2part2 140126121602-phpapp02
Cleophas Rwemera
 
03_UninformedSearch.pdf
03_UninformedSearch.pdf03_UninformedSearch.pdf
03_UninformedSearch.pdf
kaxeca4096
 

Similaire à Ch05 rearrangements (20)

Genetics chapter 2 part 2
Genetics chapter 2 part 2Genetics chapter 2 part 2
Genetics chapter 2 part 2
 
Evolutionary Computing - Genetic Algorithms - An Introduction
Evolutionary Computing - Genetic Algorithms - An IntroductionEvolutionary Computing - Genetic Algorithms - An Introduction
Evolutionary Computing - Genetic Algorithms - An Introduction
 
Geneticschapter2part2 140126121602-phpapp02
Geneticschapter2part2 140126121602-phpapp02Geneticschapter2part2 140126121602-phpapp02
Geneticschapter2part2 140126121602-phpapp02
 
2.2 analyzing and manipulating dna
2.2 analyzing and manipulating dna2.2 analyzing and manipulating dna
2.2 analyzing and manipulating dna
 
Polymerase Chain Reaction,RT-PCR and FISH
Polymerase Chain Reaction,RT-PCR and FISHPolymerase Chain Reaction,RT-PCR and FISH
Polymerase Chain Reaction,RT-PCR and FISH
 
Lecture 14 2013.ppt
Lecture 14 2013.pptLecture 14 2013.ppt
Lecture 14 2013.ppt
 
Genome rearrangment
Genome rearrangmentGenome rearrangment
Genome rearrangment
 
Permutation and combination
Permutation and combinationPermutation and combination
Permutation and combination
 
PCR.ppt
PCR.pptPCR.ppt
PCR.ppt
 
Evolutionary algorithms
Evolutionary algorithmsEvolutionary algorithms
Evolutionary algorithms
 
EVOLUTION BEFORE DERWIN
EVOLUTION BEFORE DERWINEVOLUTION BEFORE DERWIN
EVOLUTION BEFORE DERWIN
 
ch11_lecture_ppt REVISED.ppt
ch11_lecture_ppt REVISED.pptch11_lecture_ppt REVISED.ppt
ch11_lecture_ppt REVISED.ppt
 
Ff meeting 25nov03
Ff meeting 25nov03Ff meeting 25nov03
Ff meeting 25nov03
 
Population genetics
Population geneticsPopulation genetics
Population genetics
 
PCR
PCRPCR
PCR
 
SVP 2012 Talk: Time-Scaling Trees in the Fossil Record
SVP 2012 Talk: Time-Scaling Trees in the Fossil RecordSVP 2012 Talk: Time-Scaling Trees in the Fossil Record
SVP 2012 Talk: Time-Scaling Trees in the Fossil Record
 
Biol102 chp16-pp-spr10-100417081028-phpapp02
Biol102 chp16-pp-spr10-100417081028-phpapp02Biol102 chp16-pp-spr10-100417081028-phpapp02
Biol102 chp16-pp-spr10-100417081028-phpapp02
 
Biol102 chp16-pp-spr10-100417081028-phpapp02
Biol102 chp16-pp-spr10-100417081028-phpapp02Biol102 chp16-pp-spr10-100417081028-phpapp02
Biol102 chp16-pp-spr10-100417081028-phpapp02
 
Genomic inference of the evolution of life history traits
Genomic inference of the evolution of life history traitsGenomic inference of the evolution of life history traits
Genomic inference of the evolution of life history traits
 
03_UninformedSearch.pdf
03_UninformedSearch.pdf03_UninformedSearch.pdf
03_UninformedSearch.pdf
 

Plus de BioinformaticsInstitute

Биоинформатический анализ данных полноэкзомного секвенирования: анализ качес...
 Биоинформатический анализ данных полноэкзомного секвенирования: анализ качес... Биоинформатический анализ данных полноэкзомного секвенирования: анализ качес...
Биоинформатический анализ данных полноэкзомного секвенирования: анализ качес...
BioinformaticsInstitute
 
Knime &amp; bioinformatics
Knime &amp; bioinformaticsKnime &amp; bioinformatics
Knime &amp; bioinformatics
BioinformaticsInstitute
 
"Зачем биологам суперкомпьютеры", Александр Предеус
"Зачем биологам суперкомпьютеры", Александр Предеус"Зачем биологам суперкомпьютеры", Александр Предеус
"Зачем биологам суперкомпьютеры", Александр Предеус
BioinformaticsInstitute
 
Плюрипотентность 101
Плюрипотентность 101Плюрипотентность 101
Плюрипотентность 101
BioinformaticsInstitute
 
Секвенирование как инструмент исследования сложных фенотипов человека: от ген...
Секвенирование как инструмент исследования сложных фенотипов человека: от ген...Секвенирование как инструмент исследования сложных фенотипов человека: от ген...
Секвенирование как инструмент исследования сложных фенотипов человека: от ген...
BioinformaticsInstitute
 

Plus de BioinformaticsInstitute (20)

Graph genome
Graph genome Graph genome
Graph genome
 
Nanopores sequencing
Nanopores sequencingNanopores sequencing
Nanopores sequencing
 
A superglue for string comparison
A superglue for string comparisonA superglue for string comparison
A superglue for string comparison
 
Comparative Genomics and de Bruijn graphs
Comparative Genomics and de Bruijn graphsComparative Genomics and de Bruijn graphs
Comparative Genomics and de Bruijn graphs
 
Биоинформатический анализ данных полноэкзомного секвенирования: анализ качес...
 Биоинформатический анализ данных полноэкзомного секвенирования: анализ качес... Биоинформатический анализ данных полноэкзомного секвенирования: анализ качес...
Биоинформатический анализ данных полноэкзомного секвенирования: анализ качес...
 
Вперед в прошлое. Методы генетической диагностики древней днк
Вперед в прошлое. Методы генетической диагностики древней днкВперед в прошлое. Методы генетической диагностики древней днк
Вперед в прошлое. Методы генетической диагностики древней днк
 
Knime &amp; bioinformatics
Knime &amp; bioinformaticsKnime &amp; bioinformatics
Knime &amp; bioinformatics
 
"Зачем биологам суперкомпьютеры", Александр Предеус
"Зачем биологам суперкомпьютеры", Александр Предеус"Зачем биологам суперкомпьютеры", Александр Предеус
"Зачем биологам суперкомпьютеры", Александр Предеус
 
Иммунотерапия раковых опухолей: взгляд со стороны системной биологии. Максим ...
Иммунотерапия раковых опухолей: взгляд со стороны системной биологии. Максим ...Иммунотерапия раковых опухолей: взгляд со стороны системной биологии. Максим ...
Иммунотерапия раковых опухолей: взгляд со стороны системной биологии. Максим ...
 
Рак 101 (Мария Шутова, ИоГЕН РАН)
Рак 101 (Мария Шутова, ИоГЕН РАН)Рак 101 (Мария Шутова, ИоГЕН РАН)
Рак 101 (Мария Шутова, ИоГЕН РАН)
 
Плюрипотентность 101
Плюрипотентность 101Плюрипотентность 101
Плюрипотентность 101
 
Секвенирование как инструмент исследования сложных фенотипов человека: от ген...
Секвенирование как инструмент исследования сложных фенотипов человека: от ген...Секвенирование как инструмент исследования сложных фенотипов человека: от ген...
Секвенирование как инструмент исследования сложных фенотипов человека: от ген...
 
Инвестиции в биоинформатику и биотех (Андрей Афанасьев)
Инвестиции в биоинформатику и биотех (Андрей Афанасьев)Инвестиции в биоинформатику и биотех (Андрей Афанасьев)
Инвестиции в биоинформатику и биотех (Андрей Афанасьев)
 
Biodb 2011-everything
Biodb 2011-everythingBiodb 2011-everything
Biodb 2011-everything
 
Biodb 2011-05
Biodb 2011-05Biodb 2011-05
Biodb 2011-05
 
Biodb 2011-04
Biodb 2011-04Biodb 2011-04
Biodb 2011-04
 
Biodb 2011-03
Biodb 2011-03Biodb 2011-03
Biodb 2011-03
 
Biodb 2011-01
Biodb 2011-01Biodb 2011-01
Biodb 2011-01
 
Biodb 2011-02
Biodb 2011-02Biodb 2011-02
Biodb 2011-02
 
Ngs 3 1
Ngs 3 1Ngs 3 1
Ngs 3 1
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Dernier (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Ch05 rearrangements

  • 2. Outline 1. Transforming Cabbage into Turnip 2. Genome Rearrangements 3. Sorting By Reversals 4. Pancake Flipping Problem 5. Greedy Algorithm for Sorting by Reversals 6. Approximation Algorithms 7. Breakpoints: a Different Face of Greed 8. Breakpoint Graphs
  • 3. Motivating Example: Turnip vs. Cabbage • Although cabbages and turnips share a recent common ancestor, they look and taste differently.
  • 4. Motivating Example: Turnip vs. Cabbage • In the 1980s Jeffrey Palmer studied evolution of plant organelles by comparing mitochondrial genomes of cabbage and turnip. • He found 99% similarity between genes. • These surprisingly similar gene sequences differed in gene order. • This study helped pave the way to analyzing genome rearrangements in molecular evolution.
  • 5. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 6. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 7. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 8. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 9. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 10. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 11. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 12. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 13. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 14. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 15. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 16. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 17. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 18. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 19. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 20. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 21. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 22. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 23. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 24. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 25. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 26. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 27. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 28. Motivating Example: Turnip vs. Cabbage • Gene order comparison:
  • 29. Motivating Example: Turnip vs. Cabbage • Gene order comparison: • Evolution is manifested as the divergence in gene order and orientation caused by these inversions of segments of genes Before After
  • 30. Another Example: Mice and Humans • The X chromosomes of mice and humans give another example. • What are the similarity blocks and how do we find them? • What is the ordering of the blocks? • What is the evolutionary scenario for transforming one genome into the other? Unknown ancestor ~ 75 million years ago Mouse X chromosome Human X chromosome
  • 31. History of Chromosome X Rat Consortium, Nature, 2004
  • 32. Reversals: Example 5’ ATGCCTGTACTA 3’ 3’ TACGGACATGAT 5’ 5’ ATGTACAGGCTA 3’ 3’ TACATGTCCGAT 5’ Break and Invert
  • 33. Reversals • Blocks represent conserved genes. 1 32 4 10 5 6 8 9 7 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
  • 34. Reversals • Blocks represent conserved genes. • A reversal introduces two breakpoints, represented by 1 32 4 10 5 6 8 9 7 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
  • 35. 1, 2, 3, 8, 7, 6, 5, 4, 9, 10 1 32 4 10 5 6 8 9 7 Reversals • Blocks represent conserved genes. • A reversal introduces two breakpoints, represented by • As a result of the reversal, the gene ordering has changed to 1, 2, 3, 8, 7, 6, 5, 4, 9, 10.
  • 36. Additional Genome Rearrangements • Besides reversals, we also have: 1. Fusion and fission of chromosomes
  • 37. Additional Genome Rearrangements • Besides reversals, we also have: 1. Fusion and fission of chromosomes 2. Translocations
  • 38. Rearrangements: Mathematical Representation Reversal 1 2 3 4 5 6 1 2 5 4 3 6 Translocation 1 2 3 4 5 6 1 2 6 4 5 3 1 2 3 4 5 6 1 2 3 4 5 6 Fusion Fission Each number represents a conserved region; +/- represents orientation.
  • 39. Mice vs. Humans Revisited • Humans and mice have similar genomes, but their genes are ordered differently. • ~ 245 rearrangements • Reversals • Fusions • Fissions • Translocations
  • 40. Mice vs. Humans Revisited • Waardenburg’s syndrome is characterized by pigmentary dysphasia. • A gene implicated in the disease was linked to human chromosome 2 but it was not clear where exactly it is located on chromosome 2.
  • 41. Mice vs. Humans Revisited • A breed of mice (with splotch gene) had similar symptoms caused by the same type of gene as in humans. • Scientists succeeded in identifying location of gene responsible for disorder in mice; this gives clues to where the gene is located in humans.
  • 42. Mice vs. Humans Revisited • To locate where the corresponding gene is in humans, we have to analyze the relative architecture of human and mouse genomes.
  • 43. Additional Application: Cancer • Normal cells will have a certain makeup of chromosomes, as revealed by “chromosome painting.”
  • 44. Additional Application: Cancer • Rearrangements may disrupt genes and alter gene regulation. • Example: translocation in leukemia yields “Philadelphia” chromosome: • There are thousands of individual rearrangements known for different tumors. promoter c-ab1 oncogene BCR genepromoterpromoter ABL gene BCR genepromoter Chr 9 Chr 22
  • 45. Additional Application: Cancer • MCF7 is the human breast cancer cell line. • Cytogenetic analysis (low-resolution) suggests a complex architecture with many translocations. • What is the detailed architecture of MCF7 tumor genome? • What sequence of rearrangements produced MCF7?
  • 46. Reversals: A Formal Motivation • A sequence of n genes is represented by a permutation p, where a permutation is an ordering of the integers 1 to n: p= p1------ pi-1 pipi+1 ------pj-1 pjpj+1 -----pn p1------ pi-1pjpj-1 ------pi+1 pipj+1 -----pn  Reversal r (i, j) reverses (flips) the elements from i to j in p r(i,j) Note: we don’t consider the orientation (sign) of genes here
  • 47. Reversals: Example p = 1 2 3 4 5 6 7 8 r(3,5) 1 2 5 4 3 6 7 8
  • 48. Reversals: Example p = 1 2 3 4 5 6 7 8 r(3,5) 1 2 5 4 3 6 7 8 r(5,6) 1 2 5 4 6 3 7 8
  • 49. Reversal Distance Problem • Goal: Given two permutations, find the shortest series of reversals that transforms one into another • Input: Permutations p and s • Output: A series of reversals r1,…rt transforming p into s, such that t is minimized • The minimal such t is called the reversal distance between p and s and is often written as d(p, s).
  • 50. Sorting By Reversals Problem • We will often simply assume that one of the permutations being considered is fixed as the most natural permutation, the identity I = (1 2 3 … n); we now restate the problem. • Sorting By Reversals Problem: Given a permutation, find a shortest series of reversals that transforms it into the identity. • Input: Permutation p • Output: A series of reversals r1,… rt transforming p into the identity permutation such that t is minimum. We call the minimum such t the “reversal distance” of p, denoted d(p)
  • 51. • Say we are given p = (2 4 3 5 8 7 6 1) • We can sort p in four steps as follows: Step 0: p = (2 4 3 5 8 7 6 1) Step 1: (2 3 4 5 8 7 6 1) Step 2: (5 4 3 2 8 7 6 1) Step 3: (5 4 3 2 1 6 7 8) Step 4: (1 2 3 4 5 6 7 8) • But can we sort p in three steps? Two? How can we know? Sorting by Reversals: Example
  • 52. Pancake Flipping Problem • We take a short detour to discuss a slightly more specific problem, which first arose as a mathematics problem in the 1970s. • A chef is sloppy; he prepares an unordered stack of pancakes of different sizes. • The waiter wants to quickly rearrange them (so that the smallest winds up on top, down to the largest at the bottom). • He does it by flipping over several from the top of the stack.
  • 53. Pancake Flipping Problem • Goal: Given a stack of n pancakes, what is the minimum number of flips needed to rearrange them into the perfect stack? • Input: Stack of n pancakes • Output: A minimal sequence of flips transforming the stack into the perfect stack. • We should note, however, that this isn’t very mathematical…
  • 54. Pancake Flipping Problem • Let’s label the smallest pancake by 1, the biggest by n, etc.; a stack of pancakes can then be represented by a permutation. • We can view a flip of the stack as a special reversal (called a “prefix reversal”) which must involve the first element. • With this mathematical framework, we will restate the pancake flipping problem as the “Sorting by Prefix Reversals Problem.”
  • 55. Sorting by Prefix Reversals • Sorting by Prefix Reversals Problem: Given a permutation p, find the shortest sequence of prefix reversals transforming p into the identity permutation. • Input: Permutation p • Output: A series of prefix reversals r1,… rt transforming p into the identity permutation and such that t is minimized.
  • 56. Pancake Flipping Problem: Greedy Algorithm • Greedy approach: at most 2 prefix reversals at most to place the biggest pancake on the bottom, at most 2 prefix reversals to place the second-biggest pancake in the second position from the bottom… • This results in an algorithm which requires 2n – 3 prefix reversals.
  • 57. Pancake Flipping Problem • Bill Gates (!) and Christos Papadimitriou showed in the mid- 1970s that this problem can actually be solved by at most 5/3 (n + 1) prefix reversals. • Current bounds (2009): The maximum number of flips required to sort any stack of n pancake is between (15/14) n and (18/11) n Christos Papadimitrou and Bill Gates flip pancakes Note: This means that our greedy method is “close” to optimal
  • 58. Sorting By Reversals: A Greedy Algorithm • We now return to sorting by reversals. • If the first three elements in permutation p = 1 2 3 6 4 5 are already in order, it does not make any sense to break them. • The length of the already sorted prefix of p is denoted prefix(p) • In our example above, prefix(p) = 3 • This results in an idea for a greedy algorithm: increase prefix(p) at every step.
  • 59. • Doing so, p can be sorted in two steps: 1 2 3 6 4 5 1 2 3 4 6 5 1 2 3 4 5 6 • The number of steps needed to sort a permutation of length n is at most (n – 1). Greedy Algorithm: Example Note: Why is it n – 1 and not n? Think about the final step…
  • 60. Greedy Algorithm: Pseudocode SimpleReversalSort(p) 1 for i 1 to n – 1 2 j  position of element i in p (i.e., pj = i) 3 if j ≠i 4 p p * r (i, j) 5 output p 6 if p is the identity permutation 7 return
  • 61. SimpleReversalSort: Analysis • SimpleReversalSort does not guarantee the smallest number of reversals and takes five steps on p = 6 1 2 3 4 5 : • Step 0: 6 1 2 3 4 5 • Step 1: 1 6 2 3 4 5 • Step 2: 1 2 6 3 4 5 • Step 3: 1 2 3 6 4 5 • Step 4: 1 2 3 4 6 5 • Step 5: 1 2 3 4 5 6 • But p can be sorted in two steps: • Step 0: 6 1 2 3 4 5 • Step 1: 5 4 3 2 1 6 • Step 2: 1 2 3 4 5 6
  • 62. Approximation Algorithms • The previous slide has shown that SimpleReversalSort is not optimal for sorting by reversals. • Often when we cannot find an optimal algorithm, we will use approximation algorithms instead, which find good approximate solutions rather than optimal ones. • Define the approximation ratio of an algorithm A on input p as: A(p) / OPT(p) where A(p) = solution produced by algorithm A OPT(p) = optimal solution of the problem
  • 63. Approximation Ratio/Performance Guarantee • The approximation ratio (performance guarantee) of a minimization algorithm A is the maximum approximation ratio of all inputs of size n. • Formally, for a minimization algorithm A, the approximation ratio of A is as follows: max|p| = n A(p) / OPT(p) • Big Question: What is the best approximation ratio we can find for sorting by reversals? Note: What is the approximation ratio for our greedy algorithm for pancake flipping?
  • 64. Adjacencies and Breakpoints • Let p = p1p2p3…pn-1pn be a permutation. A pair of elements pi and pi + 1 is called an adjacency if pi+1 = pi +1 The remaining pairs are called breakpoints. • Example: p = 1 9 3 4 7 8 2 6 5 • (3, 4), (7, 8) and (6,5) are adjacent pairs • (1,9), (9,3), (4,7), (8,2) and (2,5) are breakpoints.
  • 65. Extending Permutations • We put two elements p0=0 and pn + 1=n+1 at the ends of p. • Example: • Note that after extension, both a new breakpoint (5, 10) and a new adjacency (0, 1) have been created. Extending with 0 and 10 p = 1 9 3 4 7 8 2 6 5 p = 0 1 9 3 4 7 8 2 6 5 10
  • 66. p = 2 3 1 4 6 5 0 2 3 1 4 6 5 7 b(p) = 5 0 1 3 2 4 6 5 7 b(p) = 4 0 1 2 3 4 6 5 7 b(p) = 2 0 1 2 3 4 5 6 7 b(p) = 0 Sorting by Reversals = Breakpoint Elimination • Define b(p) to be the number of breakpoints in the extension of p. • Note that sorting by reversals appears to correspond to removal of breakpoints. • Example:
  • 67. Sorting by Reversals = Breakpoint Elimination • How many breakpoints can each reversal eliminate? p = 2 3 1 4 6 5 0 2 3 1 4 6 5 7 b(p) = 5 0 1 3 2 4 6 5 7 b(p) = 4 0 1 2 3 4 6 5 7 b(p) = 2 0 1 2 3 4 5 6 7 b(p) = 0
  • 68. Sorting by Reversals = Breakpoint Elimination • How many breakpoints can each reversal eliminate? • Each reversal eliminates at most 2 breakpoints. p = 2 3 1 4 6 5 0 2 3 1 4 6 5 7 b(p) = 5 0 1 3 2 4 6 5 7 b(p) = 4 0 1 2 3 4 6 5 7 b(p) = 2 0 1 2 3 4 5 6 7 b(p) = 0
  • 69. Sorting by Reversals = Breakpoint Elimination • How many breakpoints can each reversal eliminate? • Each reversal eliminates at most 2 breakpoints. • This implies: • d(p) ≥ b(p) / 2 • We will use this idea to create a new greedy algorithm. p = 2 3 1 4 6 5 0 2 3 1 4 6 5 7 b(p) = 5 0 1 3 2 4 6 5 7 b(p) = 4 0 1 2 3 4 6 5 7 b(p) = 2 0 1 2 3 4 5 6 7 b(p) = 0
  • 70. A Better Greedy Algorithm BreakPointReversalSort(π) 1 while b (π) > 0 2 Among all possible reversals, choose reversal r minimizing b (π•ρ) 3 π  π•ρ(i, j) 4 output π 5 return
  • 71. A Better Greedy Algorithm • Problem: this algorithm may never terminate. BreakPointReversalSort(π) 1 while b (π) > 0 2 Among all possible reversals, choose reversal r minimizing b (π•ρ) 3 π  π•ρ(i, j) 4 output π 5 return
  • 72. Strips • Strip: an interval between two consecutive breakpoints in a permutation. • Decreasing strip: a strip of elements in decreasing order (e.g. 6 5 4 and 3 2 ). • Increasing strip: a strip of elements in increasing order (e.g. 6 7 8 9) 0 1 9 4 3 7 8 2 5 6 10 • A single-element strip can be declared either increasing or decreasing. We will choose to declare them as decreasing with exception of the strips 0 and n + 1.
  • 73. Reducing the Number of Breakpoints • Theorem 1: If a permutation π contains at least one decreasing strip, then there exists a reversal ρ which decreases the number of breakpoints (i.e. b(π•ρ) < b(π) ). • We will use this result to help adapt our algorithm to one which is guaranteed to terminate.
  • 74. Idea for New Algorithm • For p = 1 4 6 5 7 8 3 2 0 1 4 6 5 7 8 3 2 9 b(p) = 5 • Choose decreasing strip with the smallest element k in p ( k = 2 in this case)
  • 75. Idea for New Algorithm • For p = 1 4 6 5 7 8 3 2 0 1 4 6 5 7 8 3 2 9 b(p) = 5 • Choose decreasing strip with the smallest element k in p ( k = 2 in this case) • Find k – 1 in p
  • 76. Idea for New Algorithm • For p = 1 4 6 5 7 8 3 2 0 1 4 6 5 7 8 3 2 9 b(p) = 5 • Choose decreasing strip with the smallest element k in p ( k = 2 in this case) • Find k – 1 in p • Reverse the segment between k – 1 and k: 0 1 4 6 5 7 8 3 2 9 b(p) = 5 0 1 2 3 8 7 5 6 4 9 b(p) = 4
  • 77. • For p = 1 4 6 5 7 8 3 2 0 1 4 6 5 7 8 3 2 9 b(p) = 5 • Choose decreasing strip with the smallest element k in p ( k = 2 in this case) • Find k – 1 in p • Reverse the segment between k – 1 and k: 0 1 4 6 5 7 8 3 2 9 b(p) = 5 0 1 2 3 8 7 5 6 4 9 b(p) = 4 • This gives us a way of decreasing the number of breakpoints, but what if there are no decreasing strips? Idea for New Algorithm
  • 78. The Case of No Decreasing Strips • If there is no decreasing strip, there may be no reversal that reduces the number of breakpoints (i.e. b(π•ρ) ≥ b(π) for any reversal ρ). • By reversing an increasing strip ( # of breakpoints stay unchanged ), we will create a decreasing strip at the next step. Then the number of breakpoints will be reduced in the following step (by Theorem 1). • Example: π = 0 1 2 | 5 6 7 | 3 4 | 8 b(π) = 3 π• ρ(6,7) = 0 1 2 | 5 6 7 | 4 3 | 8 b(π) = 3 • ρ(6,7) creates a decreasing strip thus guaranteeing that the next step will decrease the # of breakpoints.
  • 79. ImprovedBreakpointReversalSort ImprovedBreakpointReversalSort(p) 1 whileb (π) > 0 2 if π has a decreasing strip 3 Among all possible reversals, choose reversal ρ that minimizes b (π•ρ) 4 else 5 Choose a reversal r that flips an increasing strip in π 6 π π•ρ 7 outputπ 8 return
  • 80. Performance Guarantee • ImprovedBreakPointReversalSort is an approximation algorithm with a performance guarantee of at most 4. • It eliminates at least one breakpoint in every two steps; at most 2b(p) steps. • Approximation ratio: 2b(p) / d(p) • Optimal algorithm eliminates at most 2 breakpoints in every step: d(p) b(p) / 2 • Performance guarantee: • ( 2b(p) / d(p) ) ≤ [ 2b(p) / (b(p) / 2) ] = 4
  • 81. Signed Permutations • Up to this point, all permutations to sort were unsigned. • But genes have directions… so we should consider signed permutations. 5’ 3’ p = 1 -2 - 3 4 -5
  • 82. SIGNED Reversals • Blocks represent conserved genes. 1 32 4 10 5 6 8 9 7 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
  • 83. SIGNED Reversals • Blocks represent conserved genes. • A reversal introduces two breakpoints, represented by 1 32 4 10 5 6 8 9 7 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
  • 84. 1, 2, 3, -8, -7, -6, -5, -4, 9, 10 1 32 4 10 5 6 8 9 7 SIGNED Reversals • Blocks represent conserved genes. • A reversal introduces two breakpoints, represented by • As a result of the reversal, the gene ordering has changed to 1, 2, 3, -8, -7, -6, -5, -4, 9, 10.
  • 85. GRIMM Web Server • Real genome architectures are represented by signed permutations. • Efficient algorithms to sort signed permutations have been developed. • GRIMM web server computes the reversal distances between signed permutations.
  • 87. Additional Application: Breakpoint Graphs 1) Represent the elements of the permutation π = 2 3 1 4 6 5 as vertices in a graph (ordered along a line). 2) Connect vertices in order given by π with solid edges. 3) Connect vertices in order given by 1 2 3 4 5 6 with dotted edges. 4) Superimpose solid and dotted paths. 0 2 3 1 4 6 5 7
  • 88. Additional Application: Breakpoint Graphs 0 2 3 1 4 6 5 7 0 1 2 3 4 5 6 7 • If we line up the dotted path (instead of the solid path) on a horizontal line, then we would get the following graph. • Although they look different, these graphs are the same.
  • 89. Additional Application: Breakpoint Graphs 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 • How does a reversal change the breakpoint graph? • The dotted paths stay the same for both graphs. • However, the red (solid) edges are replaced with blue ones. Before: 0 2 3 1 4 6 5 7 After: 0 2 3 5 6 4 1 7
  • 90. Additional Application: Breakpoint Graphs 0 1 2 3 4 5 6 7 • A reversal removes 2 edges (red) and replaces them with 2 new edges (blue).
  • 91. Additional Application: Breakpoint Graphs Case 1: Both edges belong to the same cycle • Remove the center black edges and replace them with new black edges (there are two ways to replace them) • (a) After this replacement, there now exists 2 cycles instead of 1 cycle c(πρ) – c(π) = 1 This is called a proper reversal since there’s a cycle increase after the reversal. • (b) Or after this replacement, there still exists 1 cycle c(πρ) – c(π) = 0 Therefore, after the reversal c(πρ) – c(π) = 0 or 1
  • 92. Additional Application: Breakpoint Graphs Case 2: The edges belong to different cycles • Remove the center black edges and replace them with new black edges • After the replacement, there now exists 1 cycle instead of 2 cycles c(πρ) – c(π) = -1 Therefore, for every permutation π and reversal ρ, c(πρ) – c(π) ≤ 1
  • 93. Additional Application: Breakpoint Graphs • Since the identity permutation of size n contains the maximum cycle decomposition of n+1, c(identity) = n+1 • c(identity) – c(π) equals the number of cycles that need to be “added” to c(π) while transforming π into the identity • Based on the previous theorem, at best after each reversal, the cycle decomposition could increased by one, then: d(π) = c(identity) – c(π) = n+1 – c(π) • Yet, not every reversal can increase the cycle decomposition Therefore, d(π) ≥ n+1 – c(π)
  • 94. From Signed to Unsigned Permutations • Recall that genes are directed fragments of DNA and we represent a genome by a signed permutation • If genes are in the same position but there orientations are different, they do not have the equivalent gene order • For example, these two permutations have the same order, but each gene’s orientation is the reverse; therefore, they are not equivalent gene sequences 1 2 3 4 5 -1 2 -3 -4 -5
  • 95. From Signed to Unsigned Permutations • Begin by constructing a normal signed breakpoint graph • Redefine each vertex x with the following rules:  If vertex x is positive, replace vertex x with vertex 2x-1 and vertex 2x  If vertex x is negative, replace vertex x with vertex 2x and vertex 2x-1  The extension vertices x = 0 and x = n+1 are kept as they were before 0 3a 3b 5a 5b 8a 8b 6a 6b 4a 4b 7a 7b 9a 9b 2a 2b 1a 1b 10a 10b 11a 11b 23 0 5 6 10 9 15 16 12 11 7 8 14 13 17 18 3 4 1 2 19 20 22 21 23 +3 -5 +8 -6 +4 -7 +9 +2 +1 +10 -11
  • 96. From Signed to Unsigned Permutations 0 5 6 10 9 15 16 12 11 7 8 14 13 17 18 3 4 1 2 19 20 22 21 23 • Construct the breakpoint graph as usual • Notice the alternating cycles in the graph between every other vertex pair • Since these cycles came from the same signed vertex, we will not be performing any reversal on both pairs at the same time; therefore, these cycles can be removed from the graph
  • 97. Interleaving Edges 0 5 6 10 9 15 16 12 11 7 8 14 13 17 18 3 4 1 2 19 20 22 21 23 • Interleaving edges are grey edges that cross each other These 2 grey edges interleave Example: Edges (0,1) and (18, 19) are interleaving • Cycles are interleaving if they have an interleaving edge
  • 98. Interleaving Graphs • An Interleaving Graph is defined on the set of cycles in the Breakpoint graph and are connected by edges where cycles are interleaved 0 5 6 10 9 15 16 12 11 7 8 14 13 17 18 3 4 1 2 19 20 22 21 23 A B C E F 0 5 6 10 9 15 16 12 11 7 8 14 13 17 18 3 4 1 2 19 20 22 21 23 A B C E F D DB C A E F
  • 99. Interleaving Graphs AB C D E F • Oriented cycles are cycles that have the following form F C • Unoriented cycles are cycles that have the following form • Mark them on the interleave graph E • In our example, A, B, D, E are unoriented cycles while C, F are oriented cycles
  • 100. Hurdles • Remove the oriented components from the interleaving graph AB C D E F • The following is the breakpoint graph with these oriented components removed • Hurdles are connected components that do not contain any other connected components within them A B D E Hurdle
  • 101. Reversal Distance with Hurdles • Hurdles are obstacles in the genome rearrangement problem • They cause a higher number of required reversals for a permutation to transform into the identity permutation • Taking into account of hurdles, the following formula gives a tighter bound on reversal distance: d(π) ≥ n+1 – c(π) + h(π) • Let h(π) be the number of hurdles in permutation π