Longest Common Subsequence (LCS)

Slides:



Advertisements
Similar presentations
MEMS Thermal & Fluid Control Lab. 國立台灣大學機械工程系微機械熱流控制實驗室 Department of Mechanical Engineering National Taiwan University, Taipei, Taiwan Department of Mechanical.
Advertisements

Feature Selection for Pattern Recognition J.-S. Roger Jang ( 張智星 ) CSIE Dept., National Taiwan University ( 台灣大學 資訊工程系 )
Internal Rate of Return 內部報酬率 張智星 (Roge Jang) 台大資工系 多媒體檢索實驗室.
An Introduction to Channel Routing
Dynamic Programming Nithya Tarek. Dynamic Programming Dynamic programming solves problems by combining the solutions to sub problems. Paradigms: Divide.
國立台灣大學 資訊工程學系 Chapter 9: Virtual Memory. 資工系網媒所 NEWS 實驗室 Objectives To describe the benefits of a virtual memory system To explain the concepts of demand.
Bayesian Networks Bucket Elimination Algorithm 主講人:虞台文 大同大學資工所 智慧型多媒體研究室.
國立台灣大學 資訊工程學系 Chapter 4: Threads. 資工系網媒所 NEWS 實驗室 Objectives To introduce the notion of a thread — a fundamental unit of CPU utilization that forms the.
Pitch Tracking (音高追蹤) Jyh-Shing Roger Jang (張智星) MIR Lab (多媒體資訊檢索實驗室)
Kaggle: Whale Challenge
Optimization Problems 虞台文 大同大學資工所 智慧型多媒體研究室. Content Introduction Definitions Local and Global Optima Convex Sets and Functions Convex Programming Problems.
主講人:虞台文 大同大學資工所 智慧型多媒體研究室
Experiments with MATLAB Experiments with MATLAB Google PageRank Roger Jang ( 張智星 ) CSIE Dept, National Taiwan University, Taiwan
Dynamic Programming Lets begin by looking at the Fibonacci sequence.
1 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,
Data Structures Lecture 10 Fang Yu Department of Management Information Systems National Chengchi University Fall 2010.
Sequence Alignment Bioinformatics. Sequence Comparison Problem: Given two sequences S & T, are S and T similar? Need to establish some notion of similarity.
張 燕 光 資訊工程學系 Dept. of Computer Science & Information Engineering,
A new predictive search area approach for fast block motion estimation Kuo-Liang Chung ( 鍾國亮 ) Lung-Chun Chang ( 張隆君 ) 國立台灣科技大學資訊工程系暨研究所 IEEE TRANSACTIONS.
© 2004 Goodrich, Tamassia Dynamic Programming1. © 2004 Goodrich, Tamassia Dynamic Programming2 Matrix Chain-Products (not in book) Dynamic Programming.
Analysis of Algorithms
Dynamic Programming Introduction to Algorithms Dynamic Programming CSE 680 Prof. Roger Crawfis.
國立台灣大學 資訊工程學系 薛智文 98 Spring Symbol Table (textbook ch#2.7 and 6.5 )
Introduction For some compiler, the intermediate code is a pseudo code of a virtual machine. Interpreter of the virtual machine is invoked to execute the.
Digital Linear Filters 張智星 (Roger Jang) 多媒體資訊檢索實驗室 清華大學 資訊工程系.
智慧型系統實驗室 iLab 南台資訊工程 1 Evaluation for the Test Quality of Dynamic Question Generation by Particle Swarm Optimization for Adaptive Testing Department of.
資訊工程系智慧型系統實驗室 iLab 南台科技大學 1 A Static Hand Gesture Recognition Algorithm Using K- Mean Based Radial Basis Function Neural Network 作者 :Dipak Kumar Ghosh,
Dynamic Programming 張智星 (Roger Jang) 多媒體資訊檢索實驗室 台灣大學 資訊工程系.
Lecture 1: A Formal Model of Computation 虞台文 大同大學資工所 智慧型多媒體研究室.
Intelligent Space 國立台灣大學資訊工程研究所 智慧型空間實驗室 Service Behavior Consistency in the OSGi Platform Authors Y.Qin, H.Hao,L.Jun, G.Jidong and L.Jian Proceedings.
國立台灣大學 資訊工程學系 薛智文 98 Spring Compiler TH 234, DTH 103.
A Study on the Exponential Decay for the Bearing Defect Diagnosis 沈毓泰 南台科技大學 機械系 教授.
The LSAM Proxy Cache - a Multicast Distributed Virtual Cache Joe Touch USC / Information Sciences Institute 元智大學 資訊工程研究所 系統實驗室 陳桂慧
哼唱檢索用於嵌入式系統 張智星 多媒體資訊檢索實驗室 台灣大學 資訊工程系.
Intelligent Space 國立台灣大學資訊工程研究所 智慧型空間實驗室 Brainstorming Principles Reporter Chun-Feng Liao Sep 12,2005 Source D.Bellin and S.S.Simone, ”Brainstorming: A.
Hopfield Neural Networks for Optimization 虞台文 大同大學資工所 智慧型多媒體研究室.
DTW for Speech Recognition J.-S. Roger Jang ( 張智星 ) MIR Lab ( 多媒體資訊檢索實驗室 ) CS, Tsing Hua Univ. ( 清華大學.
Lecture 2: Limiting Models of Instruction Obeying Machine 虞台文 大同大學資工所 智慧型多媒體研究室.
N96770 微奈米統計力學 1 上課時間 : 上課地點 : 國立成功大學工程科學系越生講堂 (41X01 教室 ) 參考資料 微奈米統計力學 Supplement on Quantum Statistical Mechanics.
CSC 213 Lecture 19: Dynamic Programming and LCS. Subsequences (§ ) A subsequence of a string x 0 x 1 x 2 …x n-1 is a string of the form x i 1 x.
資訊工程系智慧型系統實驗室 iLab 南台科技大學 1 A new social and momentum component adaptive PSO algorithm for image segmentation Expert Systems with Applications 38 (2011)
國立台灣大學 資訊工程學系 Chapter 7: Deadlocks. 資工系網媒所 NEWS 實驗室 Chapter Objectives To develop a description of deadlocks, which prevent sets of concurrent processes.
Performance Indices for Binary Classification 張智星 (Roger Jang) 多媒體資訊檢索實驗室 台灣大學 資訊工程系.
Beat Tracking (節拍追蹤) 張智星 (Roger Jang)
Distance/Similarity Functions for Pattern Recognition J.-S. Roger Jang ( 張智星 ) CS Dept., Tsing Hua Univ., Taiwan
Notes Over 4.2 Finding the Product of Two Matrices Find the product. If it is not defined, state the reason. To multiply matrices, the number of columns.
EM Algorithm 主講人:虞台文 大同大學資工所 智慧型多媒體研究室. Contents Introduction Example  Missing Data Example  Mixed Attributes Example  Mixture Main Body Mixture Model.
Improving the WWW: Caching or Multicast? Pablo RodriguezErnst W. BiersackKeith W. Ross Institut EURECOM 2229, route des Cretes. BP , Sophia Antipolis.
Linear Classifiers (LC) J.-S. Roger Jang ( 張智星 ) MIR Lab, CSIE Dept. National Taiwan University.
Dr Nazir A. Zafar Advanced Algorithms Analysis and Design Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar.
Dynamic Programming Typically applied to optimization problems
DP for Optimum Strategies in Games
張智星 (Roger Jang) 台大資工系 多媒體檢索實驗室
Discrete Fourier Transform (DFT)
Merge Sort 5/28/2018 9:55 AM Dynamic Programming Dynamic Programming.
莊 永 裕 國立台灣大學 資訊工程學系 通訊與多媒體實驗室
Lecture 5 Dynamic Programming
Lecture 5 Dynamic Programming
The Longest Common Subsequence Problem
Dynamic Programming 1/15/2019 8:22 PM Dynamic Programming.
Dynamic Programming-- Longest Common Subsequence
Introduction to Algorithms: Dynamic Programming
Longest Common Subsequence
Matrix Chain Product 張智星 (Roger Jang)
Dynamic Programming 動態規劃
Hopfield Neural Networks for Optimization
Lecture 5 Dynamic Programming
Longest Common Subsequence
Duration & Pitch Modification via WSOLA
Edit Distance 張智星 (Roger Jang)
Presentation transcript:

Longest Common Subsequence (LCS) 張智星 (Roger Jang) jang@mirlab.org http://mirlab.org/jang 多媒體資訊檢索實驗室 台灣大學 資訊工程系

Longest Common Subsequence Given a string, we can delete some elements to form a subsequence: s1=uvwxyz  s2=uwyz (after deleting v and x) s2 is a subsequence of s1. Longest common subsequence (LCS) The similarity of two string can be define as the length of the LCS between them. Example: abcdefg and xzackdfwgh have acdfg as a longest common subsequence For word suggestion!

Brute-Force Approach to LCS A brute-force solution Enumerate all subsequences of X Test which ones are also subsequences of Y Pick the longest one. Analysis: If X is of length n, then it has 2n subsequences This is an exponential-time algorithm!

DP for LCS: 3-step Formula Quiz!

DP for LCS: Table Filling (1/2) Note that all DP problems can be visualized as path finding…

DP for LCS: Table Filling (2/2) Observations LCS=‘properi’ or ‘propert’ (which is obtained by keeping multiple back-tracking paths) A match occurs when the node has a 45-degree back-tracking path

DP for LCS: Quiz for Table Filling Hints Create a (m+1)*(n+1) matrix for table filling Fill row 0 and column 0 with 0 first to establish the base cases of boundary conditions Fill all the other elements in a layer-by-layer manner.

Quiz Solution To create this plot Download Machine Learning Toolbox Run lcs('about', 'aeiopu', 1) under MATLAB