Docsity

Computational Complexity - Bioinformatics - Lecture Slides, Slides of Bioinformatics

Partial preview of the text

Download Computational Complexity - Bioinformatics - Lecture Slides and more Slides Bioinformatics in PDF only on Docsity!

Computational Complexity,

Physical Mapping III + Perl

Computational Complexity - An

Overview

  • We are primarily interested in efficient

algorithms

  • Efficient means that the running time of the

algorithm is bounded by some polynomial

function p(n)

  • The size of the problem is measured by n
    • We use big-oh notation, e.g. O(n 2 ) , in which lower order
terms are ignored
  • Thus for small problem sizes, an O(n 2 ) algorithm may
run slower than an O(n) one

NP-complete Problems

• An important subset of these problems is called NP-

complete

  • The solutions to problems in NP, once found, can be
checked in polynomial time
  • NP includes the class P as a subset
  • Any NP-complete problem can be transformed in
polynomial time to an instance of any other NP-complete
problem
  • So all NP-complete problems are equivalent under
polynomial transformation

NP-complete Problems

• So, if a polynomial time algorithm is found for

one NP-complete problem, there are

polynomial time algorithms for all NP-

complete problems

– If so, then P=NP

– Most researchers believe that P⊂NP

– The model of computation that is used in defining

NP-complete problems is the Nondeterministic

Turing Machine

NP-hard Problems

• NP-complete⊂NP-hard

• Example: does there exist a solution to the

Traveling Salesman problem is NP-hard and

NP-complete.

– Find a solution to the Traveling Salesman is NP-

hard, but not NP-complete (not decision form)

– But if we have a polynomial solution for the 2nd,

we can use it to solve the 1st (and hence all NP-

complete problems)

NP-completeness

• Initially, several hard problems were shown to

solvable in polynomial time on a nondeterministic

TM

  • Polynomial time reductions between the problems were
also shown
  • Nowadays, to show a problem is NP-complete
    • Verify the problem is in NP (solution can be verified in polynomial time)
    • Show a polynomial time reduction of any NP-complete to your problem

Algorithmic Implications

• We are trying to solve a real-life problem

– The models we use may give us many solutions,

but we want to find the one solution which

corresponds to the real ordering of the clones in

the target DNA

– Use the algorithmic results in an iterative fashion

with the experimental biologist

Algorithmic Implications

• A mapping algorithm should

– Work better with more data, assuming a constant

error rate

– Give a solution which makes it clear how it was

obtained and tell which parts of the solution are

good and which bad

– Give all candidate solutions

An algorithm for C1P

• In the first case, we don’t need to consider the

two rows together, so we separate them into

two components

– Deal with them separately

• For non-empty intersection

– Suppose there is a row that is either a subset or

has empty intersection with every row in the

component - move it out of the component

An algorithm for C1P

• To see if two rows belong to the same

component

– Build a graph G c using M

  • Each vertex of Gc will be a row from M
    • There will be an undirected edge from i to j if S (^) i ∩ S (^) j ≠ ∅ and neither of them is a subset of the other
  • So the components we want are the connected
components of Gc

Example Matrix

  • c 1 c 2 c 3 c 4 c 5 c 6 c 7 c 8 c
  • l
  • l
  • l
  • l
  • l
  • l
  • l
  • l

Example Graph

l 1 l 2

l 3

l 5

l 4

l 6 l 7

l 8

Placing Rows in a Component

• How do we place the third row?

  • In the graph, there are edges for both rows already placed.
Let’s place the third with respect to the second
  • Does it go to the right or to the left?
  • If |l 1 ∩ l 3 |<min(|l 1 ∩ l 2 |, |l 2 ∩ l 3 |) - same direction second
w.r.t. first, else opposite direction
  • In our case, we have to place in the opposite (right
direction) as shown on the next slide

Placing Rows in a Component

l 1 → … 0 0 1 1 1 0 0 0…
l 2 → … 0 1 1 1 0 0 0 0…
l 3 → … 0 0 0 1 1 1 1 0…