Questions tagged [longest-common-substring]
The longest-common-substring tag has no summary.
23 questions
0 votes
1 answer
233 views
Can I speed up this multi-LCSS (Longest Common Substring) algorithm?
I'm creating a plagiarism detection algorithm in Python, which scores how much of document A has been plagiarised in document B, and returns all the copied sections in B that were plagiarised from A. ...
0 votes
0 answers
42 views
Flowgarithm for common child program for a beginner (without pointers)
I'm a first year BCA student. Can you help me with flowgarithm of the common child problem (LCS) without pointers
0 votes
0 answers
69 views
Could Radix Sort be used to tackle LCS algorithm?
Could one use the Radix Sort to find the Longest Common Subsequence problem? I am new to algorithms and was wondering if the string was converted to a list and then one was able to apply Radix Sort ...
0 votes
0 answers
73 views
Disjoint $k$ Increasing Subsequences
Given a permutation $P$ and an integer $k$, we need to devise an algorithm which finds the $k$ disjoint increasing subsequences (say $L_1,L_2\ldots, L_k$) such that the sum total of their lengths (say ...
2 votes
1 answer
176 views
Efficiently find longest common substring for all substring pairs of S and T
I am trying to find the Gesalt similarity of a string $S$ and all substrings of $T$ using Gestalt Pattern Matching (Ratcliff Obershelp Algorithm) This algorithm requires me to find the matches of S ...
1 vote
0 answers
53 views
Has anyone seen the following string classifier discussed?
The closes related question I have found for this is Find string patterns preferably in regex for string streams, but it has no answer and is also a little less constrained as my idea. Given a set of ...
0 votes
0 answers
185 views
How to find the LCP of string pairs in a set
I have a set of $k$ strings of $n$ length each. I need an algorithmic strategy that finds the LCP (Longest Common Prefix) of each set's string pair. In addition, I need time complexity $O(k*n+a)$, ...
1 vote
0 answers
139 views
Longest palindrome after swapping operation
I know that Manacher's algorithm can be used to find the longest palindromic substring of a string in linear time. But I want to find the longest palindromic substring after swapping any two indices ...
3 votes
0 answers
233 views
Intellij string search and highlight algorithm
I'm searching for an alogrithm that takes two strings, a query and a string that is to be searched for the query. The algorithm should result in a 'found' when the string contains the characters of ...
1 vote
1 answer
210 views
Longest Common subsequence theorem in CLRS
In CLRS in the dynamic programming chapter, there is a theorem about the longest common subsequence prefix that states the following: Theorem Let the $X=(x_1,x_2,\dots,x_m)$ and $Y=(y_1,y_2,\dots,...
1 vote
1 answer
823 views
Can I find all the common subsequences between 2 sequences by using dynamic programming?
I need to know if there's a dynamic programming algorithm that returns all common subsequences between 2 sequences not just the longest one. Thank you.
8 votes
2 answers
12k views
Longest common substring in linear time
We know that the longest common substring of two strings can be found in $\mathcal O(N^2)$ time complexity. Can a solution be found in only linear time?
1 vote
1 answer
96 views
Longest common sequence matrix giving wrong answer
I am trying to find longest common sequence for these two strings SHINCHAN NOHARAAA The common sequence is NHA of length 3 ...
1 vote
1 answer
289 views
Get count of longest zigzag sub-sequences
I know how to get longest zigzag sub-sequence and length of it. There are several methods available for that. But some times there are many sub-sequences available which have same length. How to ...
1 vote
1 answer
208 views
Longest common subsequence with at most one swap
Is there a good algorithm for calculating the longest common subsequence where we consider two sequences identical if they can be transformed to one another with at most 1 swapping of subsequences (i....