一般间隙及一次性条件的严格模式匹配

柴欣,贾晓菲,武优西,江贺,吴信东. 一般间隙及一次性条件的严格模式匹配. 软件学报,  2015, 26(5):1096−1112.   (PDF) (Source codes)

摘  要:     具有间隙约束的模式匹配是序列模式挖掘的关键问题之一.一次性条件约束是要求序列中每个位置的字符最多只能使用一次,在序列模式挖掘中采用一次性条件约束更加合理.但目前间隙约束多为非负间隙,非负间隙对字符串中每个字符的出现顺序具有严格的约束,一定程度上限定了匹配的灵活性.为此本文提出了一般间隙及一次性条件的严格模式匹配问题,之后理论证明了该问题的计算复杂性为NP-Hard问题,为了对该问题进行有效求解,本文在网树结构上构建了动态更新结点信息的启发式求解算法(Dynamically Changing Node Property, DCNP),该算法动态地更新各个结点的树根路径数、叶子路径数和树根-叶子路径数等,进而每次可以获得一个较优的出现.之后迭代这一过程.为了有效地提高DCNP算法速度,避免动态更新大量的结点信息,我们提出了Checking机制,使得DCNP算法仅在可能产生内部重复出现的时候才进行动态更新.理论分析了DCNP算法的时间复杂度和空间复杂度.大量实验结果验证了DCNP算法的具有良好的求解性能.

 

Strict Pattern Matching with General Gaps and One-off Condition

Abstract:     Pattern matching with gap constraints is one of the key issues of sequential pattern mining. One-off condition which is always used in sequential pattern mining tasks means that the character of each position in the sequence can be used at most once for pattern matching. Recently, most researches focus on pattern matching with non-negative gaps, but the rule of non-negative gaps implies the character’s order in the sequence may limit the flexibility of matching. For these reasons, we propose the strict pattern matching with general gaps and one-off condition and show that this problem is NP-Hard. To handle this issue, we propose a heuristic algorithm, named Dynamically Changing Node Property (DCNP), based on Nettree which dynamically updates the properties of each node such as the numbers of root paths, leaf paths and root-leaf paths, thus we can get a better occurrence. Then we iterate the above process. To improve the speed of DCNP effectively and avoid dynamically updating information of nodes on a large scale, a checking mechanism is proposed which means that DCNP will update information of nodes only when the occurrence may have repetition. We also theoretically analyze the space and time complexities of DCNP. Experimental results show that DCNP has better performance than other competitive algorithms.

 

 

源程序

序列串与模式串

感谢刘同学的提示,做出如下勘误:

1、原文1108页表3中P8和P9应该为:

P8=g[-1,9]t[-1,9]a[-1,9]g[-1,9]t[-1,9]a[-1,9]g[-1,9]t[-1,9]a;
P9=g[-1,7]t[-1,7]a[-1,7]g[-1,7]t[-1,7]a[-1,7]g

2、原文1109页表5中DCNP算法在P9-S1实例上结果为138.