오차를 허용하는 근사문자열매칭문제는 정보검색, 컴퓨터보안, 분자생물학 등 다양한 분야에서 연구되고 있다. 근사문자열매칭 알고리즘은 두 문자열의 오차를 측정하기 위해 해밍거리, 편집거리, 가중편집거리 등의 거리함수를 이용한다. 알파벳 Σ의 문자들로 구성된 길이가 m, n인 두 문자열 X, Y가 주어졌을 때, 두 문자열 X와 Y의 편집거리는 한 문자열을 다른 문자열로 변환하는데 필요한 최소 편집연산의 수이다. 이때 편집연산은 삽입, 삭제, 교체 연산으로 구성된다. 두 문자열의 편집거리는 동적프로그래밍을 이용하여 O(mn) 시간에 계산할 수 있다. 또한 전처리되는 문자열의 길이가 t일 때, 4-러시안의 룩업테이블을 이용해서도 O(mn/t) 시간에 계산할 수 있다. 한편, 4-러시안의 룩업테이블은 O((3|Σ|)^{2t}t^2) 시간과 O((3|Σ|)^{2t}t) 공간에 생성할 수 있다. 본 학위 논문에서는 편집거리계산을 위해 사용공간을 개선한 4-러시안의 룩업테이블의 생성 방법을 제시한다. 즉, 전처리되는 문자열들을 인코딩하여 룩업테이블을 축소함으로써 O(3^{2t}(2t)!t^2) 시간과 O(3^{2t}(2t)!t) 공간에 룩업테이블을 생성한다. 실험 결과, |Σ| = 26, t = 4일 때 원래의 4-러시안의 룩업테이블보다 룩업테이블의 공간을 약 1/5,172,030로 줄인다. 또한 편집거리를 병렬적으로 계산하는 4-러시안 알고리즘을 제시한다. 이 병렬알고리즘은 O(3^{2t}(2t)!t)개의 스레드를 이용하여 O(t) 시간에 룩업테이블을 생성하고, 충분한 수의 스레드를 이용하여 O(m + n) 시간에 두 문자열의 편집거리를 계산한다. 근사적으로 반복되는 문자열에 대한 연구는 데이터압축, 분자생물학, 컴퓨터지원음악분석 등 다양한 분야와 관련이 있다. 근사적으로 반복되는 문자열로 근사주기, 근사커버, 근사시드, 근사종렬중복 등이 있다. 본 학위 논문에서는 정수로 구성된 문자열에서 근사적으로 반복되는 문자열을 찾기 위해 δ-근사주기와 γ-근사주기의 개념을 새롭게 제시한다. 정수 문자로 구성된 길이가 n인 문자열 T가 주어졌을 때, T의 최소 δ-근사주기와 최소 γ-근사주기를 찾는 문제를 각각 정의하고, 각 문제를 O(n^2) 시간에 해결하는 순차알고리즘과 O(n^2)개의 스레드를 이용하여 O(n) 시간에 해결하는 병렬알고리즘을 제시한다. 또한 무관문자(자기 자신뿐만 아니라 모든 문자와 일치하는 문자)를 포함한 T에 대해 최소 δ-근사주기와 최소 γ-근사주기를 찾는 문제를 정의하고, 각 문제를 해결하는 O(n^2)-시간 알고리즘을 제시한다.
The problems of approximate string matching that allows errors have been studied in various fields such as information retrieval, computer security, molecular biology. Algorithms for approximate string matching make use of distance functions to measure the amounts of errors between two strings such as the Hamming distance, the edit distance, and weighted edit distances. Given two strings X of length m and Y of length n over an alphabet Σ, the edit distance between two strings X and Y is the minimum number of edit operations needed to convert X into Y. At this time, edit operations consist of insertions, deletions, changes. We can compute the edit distance between two strings using dynamic programming in O(mn) time. We can also compute it in O(mn/t) time with the help of the Four-Russians’ lookup table where t is the length of strings used for the preprocess. On the other hand, the Four-Russians’ lookup table can be constructed in O((3|Σ|)^{2t}t^2) time using O((3|Σ|)^{2t}t) space. In this thesis, we present space-efficient Four-Russians’ lookup table construction algorithms that can be used to compute the edit distance. It requires O(3^{2t}(2t)!t) space and is constructed in O(3^{2t}(2t)!t^2) time. The time and space complexity were achieved by compacting the lookup table using a clever encoding of the preprocessed strings. Experimental results show that the space requirement of the lookup table is reduced to approximately 1/5,172,030 of its original size when |Σ| = 26 and t = 4. Furthermore, we present efficient parallel algorithms for edit distance computation using the Four-Russians’ lookup table. For lookup table construction, it runs in O(t) time using O(3^{2t}(2t)!t) threads. For computation of the edit distance between X and Y, it runs in O(m + n) time with enough number of threads. The study of approximately repetitive strings is related to diverse fields such as data compression, molecular biology, and computer-assisted music analysis. Approximate periods, approximate covers, approximate seeds, and approximate tandem repeats are well-known approximately repetitive strings. In this thesis, we introduce the notion of δ-approximate periods and γ-approximate periods as new approximate periods of strings over an integer alphabet. Given a string T of length n over an integer alphabet, we define two problems of finding a minimum δ-approximate period and a minimum γ-approximate period of T. For each problem, we present a sequential algorithm that runs in O(n^2) time and a parallel algorithm that runs in O(n) time using O(n^2) threads, respectively. Given a string T of length n over an integer alphabet including a don’t care symbol (a symbol matching every symbol, including itself), we also define two problems of finding a minimum δ-approximate period and a minimum γ-approximate period of T and present algorithms to solve the problems in O(n^2) time, respectively.
초록 iAbstract iii제 1 장 서론 11.1 문자열매칭 11.2 근사문자열매칭 31.3 반복적인 문자열 81.4 근사적으로 반복되는 문자열 121.5 논문의 구성 16제 2 장 관련 연구 202.1 문자열 202.2 D 테이블 212.2.1 편집거리 212.2.2 k-오차문자열매칭 232.2.3 최장공통부분서열 252.3 편집거리계산을 위한 4-러시안 알고리즘 272.4 문자열의 근사주기 30제 3 장 편집거리계산을 위한 공간효율적인 4-러시안의 룩업테이블 333.1 알고리즘 333.1.1 전처리단계: 공간효율적인 4-러시안의 룩업테이블 생성 333.1.2 계산단계: 편집거리계산 353.2 병렬알고리즘 383.2.1 전처리단계: 공간효율적인 4-러시안의 룩업테이블 병렬 생성 393.2.2 계산단계: 편집거리계산을 위한 병렬알고리즘 393.3 실험 결과 413.3.1 실험 1: 룩업테이블의 크기 비교 433.3.2 실험 2: 4-러시안 알고리즘의 수행시간 비교 433.3.3 실험 3: D 테이블을 이용한 알고리즘과 개선된 4-러시안 알고리즘의 수행시간 비교 453.4 공간효율적인 4-러시안의 룩업테이블의 응용 473.4.1 k-오차문자열매칭 알고리즘 473.4.2 최장공통부분서열 알고리즘 48제 4 장 정수문자열의 δ-근사주기와 γ-근사주기 524.1 문제 정의 524.2 알고리즘 544.2.1 문제 1: 최소 δ-근사주기 찾기 544.2.2 문제 2: 최소 γ-근사주기 찾기 584.3 병렬알고리즘 624.3.1 문제 1을 위한 병렬알고리즘 624.3.2 문제 2를 위한 병렬알고리즘 634.4 실험 결과 644.4.1 실험 1: 순차알고리즘과 병렬알고리즘의 성능 비교 654.4.2 실험 2: 토너먼트 방법 활용 674.4.3 실험 3: 스레드의 수에 따른 병렬알고리즘의 성능 비교 674.5 무관문자를 포함한 정수문자열의 δ-근사주기와 γ-근사주기 694.5.1 문제 3: 무관문자를 고려한 최소 δ-근사주기 찾기 704.5.2 문제 4: 무관문자를 고려한 최소 γ-근사주기 찾기 70제 5 장 결론 75참고문헌 76