Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Approximation Algorithms_Mehedi

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Approximation Algorithms

An Approximation Algorithm for Sorting by Reversals and


Transpositions

What is the Approximation algorithm?


Approximation algorithms are designed to solve problems not solvable in
polynomial time for approximate solutions. These problems are known as
NP-complete problems. These problems are significantly effective in
solving real-world problems, therefore, it becomes important to solve them
using a different approach.

NP-complete problems can still be solved in three cases:

1. the input could be so small that the execution time is reduced


2. some problems can still be classified into problems that can be solved
in polynomial time
3. use approximation algorithms to find near-optima solutions for
the problems.

Performance Ratios
The main idea behind calculating the performance ratio of an
approximation algorithm also called an approximation ratio, is to find how
close the approximate solution is to the optimal solution.

The approximate ratio is represented using ρ(n) where n is the input size of
the algorithm, C is the near-optimal solution obtained by the algorithm, and
C* is the optimal solution for the problem. The algorithm has an approximate
ratio of ρ(n) if and only if −

max{C/C∗,C∗/C}≤ρ(n)
The algorithm is then called a ρ(n)-approximation algorithm.

Example:

Advantages:

Disadvantages:
Genome rearrangements:

Genome rearrangements are mutations that change the gene content of a


genome or the arrangement of the genes on a genome.

combinatorial problem:

A combinatorial problem consists in, given a finite collection of objects and a set
of constraints, finding an object of the collection that satisfies all constraints (and
possibly that optimizes some objective function).

Reversal, which inverts the order and the orientation of the genes inside
a segment of the genome.

Transposition, that moves a segment of the genome to another position.

(4 – 2/k)-approximation algorithm for sorting by reversals and


transpositions.
Proving an upper bound means you have proven that the algorithm will
use no more than some limit on a resource.
Proving a lower bound means you have proven that the algorithm will use no
less than some limit on a resource.
"Resource" in this context could be time, memory, bandwidth, or something
else.
Sorting by Reversals and Transpositions

Let,

π = [π0 π1 π2 ... πn πn+1] ; n+2 distinct elements

Adjacent

if, |πi −πi+1| = 1

Breakpoints

Two elements πi and πi+1 of π for all 0 ≤ i ≤ n are called adjacent if |πi
−πi+1| = 1. Otherwise there is said to be a breakpoint between the two
elements. We denote the total number of breakpoints in π by b(π).

Cycle Decomposition Graph

The cycle decomposition graph G(π) is an undirected multigraph whose


n+2 vertices are πi for 0 ≤ i ≤ n+1. G(π) has 2(n+1) edges and they are of
two types: gray and black. For each 0 ≤ i ≤ n, the vertices πi and πi+1 are
joined by a black edge.For 0≤i,j≤n+1, there is a gray edge between πi and
πj iff πi = πj + 1.
A graph in which multiple edges may connect the same pair of vertices is
called a multigraph.

Cycle Decomposition Graph

A cycle C is semi-oriented if there exist two black edges such that


along the boundary of C one is traversed left to right and the
other one is traversed right to left

You might also like