Longest Common Subsequence
(LCS)
Problem: Given sequences x[1.m] and
y[1.n], find a longest common
subsequence of both.
Example: x=ABCBDAB and
y=BDCABA,
BCA is a common subsequence and
BCBA and BDAB are two LCSs
1
LCS
Brute force solution
Writing a re
INTERVAL TREES
Presentation by :- Rohit
Shukla
Introduction
Interval trees store intervals of the form
[li,ri], li <= ri.
Interval trees insert and delete intervals.
Interval trees answer to the queries like
which intervals intersect or overlap.
About Int
INDIAN INSTITUTE OF INFORMATION TECHNOLOGY, ALLAHABAD
(A University)
TIME:- 10:00 A.M. to 01:00 P.M.
F.NO. IIIT-A/ODR/Circ 1180/2008
Date: 03/04/2008
END-SEMESTER EXAMINATION SCHEDULE APRIL - MAY 2008
DATE & DAY
OF
EXAM.
M.Tech. (IT)
Second Semester
B.Tec
Indian Institute of Information Technology Allahabad
Electrical Engineering (ELE-232) (Practical)
B. Tech. IInd Semester (IT & ECE)
Assignment 1
Time/Date of Announcement: 1715Hrs of 26th Feb. 2008
Time/Date of Submission: 1230Hrs of Saturday, 1st March 2
Longest Common Rigid Subsequence
Bin Ma and Kaizhong Zhang
Department of Computer Science
University of Western Ontario
Ontario, Canada.
(Rigid) Subsequence
Subsequence:
COMBINATORIALPATTERNMATCHING
CPM
Rigid Subsequence:
0123456789012345678901234567
CO
Case Injected Genetic Algorithms
Sushil J. Louis
Genetic Algorithm Systems Lab (gaslab)
University of Nevada, Reno
http:/www.cs.unr.edu/~sushil
http:/gaslab.cs.unr.edu/
sushil@cs.unr.edu
Learning from Experience: Case
Injected Genetic Algorithm Design
of
Dynamic Programming
Ananth Grama, Anshul Gupta, George
Karypis, and Vipin Kumar
To accompany the text `Introduction to Parallel Computing', Addison Wesley, 2003
Topic Overview
Overview of Serial Dynamic Programming
Serial Monadic DP Formulations
Nonserial
CASE STUDY OF
TACTICAL.COM
Prepared By.
1.Rohit Shukla IEC2007046
2.Rajeev Saxena IEC2007002
3.Amit Pandita IEC2007010
4.Yatharth Gupta IEC2007007
5.Satish Kumar IEC2007015
MISSION
Serving
the best to sailor
racing through software
technology
FINANCE AVAI
ongest Common Subsequence
Inp u t:
two s trin g s ,u a nd v
O utp u t:
a c o m m o n s ub s tring
O b je c tive :
m a xim ize le ng th o fth e s ub s trin g
Exa m p le :
c a rro t
p a rty
ongest Common Subsequence
Inp u t:
two s trin g s ,u a nd v
O utp u
Longest common subsequence
INPUT: two strings
OUTPUT: longest common subsequence
ACTGAACTCTGTGCACT
TGACTCAGCACAAAAAC
Longest common subsequence
INPUT: two strings
OUTPUT: longest common subsequence
ACTGAACTCTGTGCACT
TGACTCAGCACAAAAAC
Longest common subseq
Interval Trees
Store intervals of the form [li,ri], li <= ri.
Insert and delete intervals.
Version 1
Answer queries of the form: which intervals
intersect/overlap a given interval [l,r].
Version 2Variant
Report just 1 overlapping interval.
Definitio
Segment trees and interval trees
Lecture 5
Antoine Vigneron
antoine.vigneron@jouy.inra.fr
INRA
Lecture 5:Segment trees and interval trees p.1/37
Outline
reference
textbook chapter 10
D. Mount Lectures 13 and 24
segment trees
stabbing queries
rectangle i
Longest common subsequence
Definition 1: Given a sequence X=x1x2.xm,
another sequence Z=z1z2.zk is a subsequence of
X if there exists a strictly increasing sequence
i1i2.ik of indices of X such that for all j=1,2,.k,
we have xij=zj.
Example 1: If X=abcd
More On Dynamic programming
Algorithms
Shortest path with edge constraint:
Let G=(V, E) be a directed graph with weighted edges. Let s and v be
two vertices in V. Find a shortest path from s to u with exactly k
edges. Here k n-1 is part of the input.
Solu
CSE 780: Design and Analysis of Algorithms
Lecture 10: Dynamic programming
Longest common subsequence Elements of DP
CSE 780 Algorithms
Longest Common Subsequence
Given two sequences
X = cfw_ x1 , x2 , . Y = cfw_ y1 , y2 , .
xn ym
A subsequence Z of X