Journal of Prime Research in Mathematics

A greedy approach for computing longest common subsequences

Afroza Begum
Department of Computer Science and Engineering, International Islamic University
Chittagong, Chittagong, Bangladesh.

\(^{1}\)Corresponding Author: afrozactg@yahoo.com

Abstract

This paper presents an algorithm for computing Longest Common Subsequences for two sequences. Given two strings \(X\) and \(Y\) of length \(m\) and \(n\), we present a greedy algorithm, which requires \(O(n log s)\) preprocessing time, where s is distinct symbols appearing in string \(Y\) and \(O(m)\) time to determines Longest Common Subsequences.

Keywords:

Algorithms, alphabet, longest common subsequences, greedy algorithm.