Computer graphics: principles and practice (2nd ed.)
Computer graphics: principles and practice (2nd ed.)
Alphabet dependence in parameterized matching
Information Processing Letters
Efficient 2-dimensional approximate matching of half-rectangular figures
Information and Computation
Efficient string matching: an aid to bibliographic search
Communications of the ACM
Journal of Algorithms
Separable attributes: a technique for solving the sub matrices character count problem
SODA '02 Proceedings of the thirteenth annual ACM-SIAM symposium on Discrete algorithms
Introduction to Algorithms
Efficient Color Histogram Indexing for Quadratic Form Distance Functions
IEEE Transactions on Pattern Analysis and Machine Intelligence
Hi-index | 0.01 |
The subsequence character count problem has as its input an array S = S[1],...,S[n] of symbols over alphabet Σ and a natural number m. Its output is: for every i, i = 1,....,n - m + 1, the number of different alphabet symbols occurring in the subsequence S[i],S[i + 1],...., S[i + m - 1]. The subsequence character count problem is a natural problem that has many uses. It can be solved in linear time for finite alphabets and in time O(n log m) for infinite alphabets. When the character count problem is generalized to two dimensions it becomes the submatrix character count problem. Its input is an n × n matrix T over alphabet Σ and a natural number m. Its output is: for every i,j, i,j = 1,...,n - m + 1, the number of different alphabet symbols occurring in the submatrix T[i + k,j + l], k = 0,...,m - 1; l = 0,...,m - 1. The straightforward one-dimensional solution slides a window along the text adding an element and deleting an element at every step. The problem with two dimensions is that at every move of the window there are m elements added and m deleted. In this paper, we present an alternate one-dimensional solution that generalizes to two dimensions. We achieve a O(n2) time solution to the submatrix character count problem over a finite alphabet and a O(n2 log m) solution over an infinite alphabet.