Re: Two-dimensional pattern matching/compression
- From: neleai@xxxxxxxxx
- Date: 11 Jul 2006 04:40:17 -0700
Herbert Glarner wrote:
At least it seems to be in NP, a nondeterministic Turing machine couldYes it is NP complete.
provide the smallest area *g*
I guess it would not be a really clever approach to build hash keys with
any possible match of the supermatrix, which input matrices would check
based on their own hashes: the supermatrix' hashes grow exponential as
input is added, and since storage isn't infinite...
Still open for any input.
--
http://herbert.wikispaces.com
Proof is based at this NP-complete problem(I can't remember name,but
its rather easy prove NP by choosing tiles so collums represents tape
and each collum changes it as in step of TM)
You have set of tiles with form and you should decide if you can cover
given rectangle with them. ie with tiles
#1# #4#
2 3 3 2
#4# #1#
and rectangle 2*2 is solution
#1##4#
2 33 2
#4##1#
#4##1#
3 22 3
#1##4#
and we can easy use reduction to this problem. WLOG patern consist of
0,1,2,.(empty) We replace tiles by rectangle patterns which have at
all corners 2(so they can overlap only by edges) and at edges is
written number of aprop. tile in binary.Rest of edges are "." . In
middle is another number in binary to distinguish othervise same tiles
and othervise 0
Covered rectange is grid with 2 where you place tiles and 0 at unused
middle. We must choose tile long enought that placing one tile to
rectangle is better than all tiles outside and unused 0 will help with
this.
I would use some greedy algorithm like join two patterns which most
overlap and repeat until one pattern remains.
Hope that helps.
.
- Follow-Ups:
- Re: Two-dimensional pattern matching/compression
- From: jacko
- Re: Two-dimensional pattern matching/compression
- References:
- Two-dimensional pattern matching/compression
- From: Herbert Glarner
- Re: Two-dimensional pattern matching/compression
- From: Herbert Glarner
- Two-dimensional pattern matching/compression
- Prev by Date: Algorithm to fit rectangles with different areas inside a matrix with lowest complexity
- Next by Date: Re: Can the humanity fix the universe bug?
- Previous by thread: Re: Two-dimensional pattern matching/compression
- Next by thread: Re: Two-dimensional pattern matching/compression
- Index(es):
Relevant Pages
|