CS481/CS583: Bioinformatics Algorithms
Can Alkan
EA509
calkan@cs.bilkent.edu.tr
http://www.cs.bilkent.edu.tr/~calkan/teaching/cs481/
CS481/CS583
CS481/CS583: Resources
CS481/CS583
Planned Lecture Cancellations
The following lectures are most likely to be canceled due to conference travels.
CS481/CS583
CS481/CS583 and other courses
CS481/CS583: Assumptions
Bioinformatics Algorithms
CS 481/CS583
Bioinformatics: Applications
Why would you learn these algorithms?
Genomics and healthcare
Stark et al., AJHG 2019
Tracking pathogens
http://www.nextstrain.org
(VERY) BRIEF INTRODUCTION TO COMPLEXITY
Tractable vs intractable
NP-hard
NP-Complete
That means: if you could solve any NPC problem in polynomial time, then you can solve all of them in polynomial time
Decision problems: outputs “yes” or “no”
NP-intermediate
P vs. NP
P vs. NP vs. NPC vs. NP-hard
Examples
Historical reference
ALGORITHM DESIGN TECHNIQUES
Sample problem: Change
Algorithm design techniques
Algorithm design techniques
Algorithm design techniques
DP example: Rocks game
DP algorithm for Player 1
DP algorithm for Player 1
Initialize; obvious win for Player 1 for 1,0; 0,1 and 1,1
pile2
pile1
DP algorithm for Player 1
Player 1 cannot win for 2,0 and 0,2
pile2
pile1
DP algorithm for Player 1
Player 1 can win for 2,1 if he picks one from pile2
Player 1 can win for 1,2 if he picks one from pile1
pile2
pile1
DP algorithm for Player 1
Player 1 cannot win for 2,2
Any move causes his opponent to go to W state
pile2
pile1
DP “moves”
When you are at position (i,j)
Go to:
Pick from pile 1:
Pick from pile 2:
Pick from both piles 1 and 2:
(i-1, j)
(i, j-1)
(i-1, j-1)
DP final table
Also keep track of the choices you need to make to achieve W
and L states: traceback table
Player 1 LOSES the game
Note on dynamic programming
Dynamic programming methods solve smaller subproblems first to solve the bigger problem.
INDUCTION
Therefore, when computing the solution:
DO NOT EVER START FROM THE SINK!
SOURCE -> SINK: computing the answer
SINK -> SOURCE: backtracking after the answer is calculated
Other algorithm design techniques