Current Issue Cover
二维模式近似匹配的快速算法

桑梓勤1, 丁明跃1, 张天序1(华中理工大学图象识别与人工智能研究所图象信息处理与智能控制国家教委开放实验室,武汉 430074)

摘 要
给定一个大小为n×n的文本T和一个大小为m×m的模板P,如果文本T中存在一个m×m的子块与模板P能够逐点匹配,称为精确匹配。如果最多有k个元素不同,称为带有最多k个误差的近似匹配。对于精确匹配,本文给出了一个时间复杂性为O(n2log|∑|)的算法,∑={a1,2,…,a|∑|},是模板的字符集。对于近似匹配,快速算法分为两步:(1)预选。利用精确匹配算法找出能精确匹配的s×s(0≤s≤m)子块,得到h个候选的对准点;(2)验证。把模板对准候选点,逐点比较,以确定不相同的元素是否不超过k个。近似匹配的时间
关键词
A Fast Approach to Two-Dimensional Pattern Matching

()

Abstract
Given a text of size n×n and a pattern of size m×m, the exact-matching is to find all occurrence of the pattern in the text, while the approximate-matching is to find all the location of m×m blocks in the text that differ by at most k mismatches. We present a new approach for exact-matching, which runs in O( n 2lo g?Σ?) , Σ = { a1 , a2 , ?, a?Σ?} is the alphabet of the pattern, and for approximate-matching, inO( n2lo g?Σ?) + hm2) , which consists of two stages. The first stage is to preselect h subblocks of size s×s ( 0≤s≤m) that exactly match the pattern. And the second stage of verification compares the blocks containing these h subblocks to determine if the mismatches is no more than k.
Keywords

订阅号|日报