Re: Two-dimensional pattern matching/compression
- From: Herbert Glarner <herbert.glarner@xxxxxxxxxx>
- Date: Wed, 12 Jul 2006 11:52:42 +0200
jacko wrote:
all given prime number identifier
start with smallest
join to all of increasing size (if possible and give composite id
number)
Is there a qualitative reason for proceding from the smallest pattern to the largest instead of the other way round? My intuition does suggest, that eliminating the largest patterns first (by merging into the hypermatrix) leads to less comparisons for the later smaller patterns: the "hypermatrix" already is a compressed representation in either case, but initially it is small and thus there is not much to check. As it grows, I certainly would be thankful for smaller patterns reducing the overall number of comparisons.
However, the efficiency question still remains, as with n patterns I need to compare n(n-1)/2 patterns, and comparing two two-dimensional patterns isn't quite effective, as both Boyer-Moore and KPM seem to be a large overhead. If I understand your approach correctly, you suggest to compare "all-with-all" prior any actual merging. In this case I would tend to hash a sequenced array's possible windows to avoid multiple comparisions of the same patterns over and over again. However, then there is the issue of storage. A single exemplary 10*10 matrix produces 2000 possibly matching subarrays involving edges, not counting the inner "edge free" submatrices. Assuming 10000 patterns, we already get 20m possible matches.
> delete the smallest when all joins tried with bigger
> loop with next smallest until generated composite of all (id)
"Deletion" sounds fine to me, only that the hypermatrix has grown due to merging operation. All remaining patterns then still are existent, and the hashes still are valid for them. But the hypermatrix' hashes are pretty much obsolete now, as the linearization has changed, so it will require a new hashing process with more submatrices than before.
As you can see: I'm still trying to find a way to reduce this enormous comparison overhead. *g*
Thanks for your input, though
//Herbert
--
http://herbert.wikispaces.com
.
- Follow-Ups:
- Re: Two-dimensional pattern matching/compression
- From: jacko
- Re: Two-dimensional pattern matching/compression
- From: Paul E. Black
- Re: Two-dimensional pattern matching/compression
- References:
- Re: Two-dimensional pattern matching/compression
- From: Herbert Glarner
- Two-dimensional pattern matching/compression
- From: Herbert Glarner
- Re: Two-dimensional pattern matching/compression
- From: neleai
- Re: Two-dimensional pattern matching/compression
- From: jacko
- Re: Two-dimensional pattern matching/compression
- Prev by Date: Re: Boolean Query Algorithm
- Next by Date: Re: Algorithm to fit rectangles with different areas inside a matrix with lowest complexity
- Previous by thread: Re: Two-dimensional pattern matching/compression
- Next by thread: Re: Two-dimensional pattern matching/compression
- Index(es):
Relevant Pages
|