An algorithm for finding minimal absent words in order
The method generates a rank graph of strings to find infinitesimal non-inclusion rank strings, addressing inefficiencies in existing methods for minimal absent words and order-preserving pattern matching, improving data compression and time-series analysis.
Patent Information
- Application Number
- KR1020230159154
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-11-16
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2043-11-16
AI Technical Summary
Existing methods are inefficient in finding the set of all minimal absent words and order-preserving pattern matching in strings, which are crucial for data compression and time-series analysis.
A method involving generating a rank graph of strings using defined functions and searching for a set of minimum non-inclusion rank strings using this graph, utilizing a string search system with a graph generation and search unit to identify infinitesimal non-inclusion rank strings.
Efficiently identifies the set of infinitesimal non-inclusion rank strings, enhancing data compression and time-series analysis by accurately finding substrings with specific rank properties.
Smart Images

Figure 112023127041947-PAT00209_ABST
Abstract
Description
Technology Field
[0001] The following description concerns a technique for searching for infinitesimal non-inclusive strings. Background Technology
[0003] Two strings and Regarding, go If it is not a substring of Is It is called an absent word. Absent word Regarding, The longest true prefix and true prefix are all If it is a substring of Is It is called a minimal absent word. Given a string X, the problem of finding the set of all minimal absent words of X is widely applied in various fields such as data compression and bioinformatics. The minimal absent word problem is, Given a string X consisting of, the problem is to find the set of all infinitesimally infinite strings in X. For example, using the directed acyclic word graph (DAWG) of X, each , An algorithm for solving the problem within a set time has been presented.
[0004] Two strings If the lengths of and y are the same, and the relative ranks of the two strings are identical y and y are said to be order-isomorphic. The order-preserving pattern matching problem is the problem of finding all substrings of T that are order-isomorphic to P, given a long string T and a short string P. This problem can be used in time-series data analysis, such as stock index analysis and melody analysis. To solve this order-preserving pattern matching problem, conventionally, the failure function of the KMP algorithm was used Using algorithms that solve in time, the Boyer-Moore-Horspool algorithm and q-grams An algorithm that solves the problem in time has been proposed. The problem to be solved
[0006] Defines the minimum non-inclusive rank strings for a string, and the set of all minimum non-inclusive rank strings for the string MAOP X You can explore. means of solving the problem
[0008] A method for searching for a minimum non-inclusion rank string performed by a string search system may include the step of generating a rank graph of strings; and the step of searching for a set of minimum non-inclusion rank strings of strings using the generated rank graph of strings.
[0009] The above generating step includes the step of defining a first function for obtaining a permutation with rank added as the last element of the permutation, and the first function is S n ×[n+1] → S n+1 It could mean...
[0010] The above generating step includes the step of defining a second function to obtain a permutation in which the first element of the permutation is deleted, and the second function is S n → S n-1 It could mean...
[0011] The above generating step includes the step of defining a third function to obtain a permutation of the first function with respect to the second function and a permutation using the values of the second function and the third function with respect to the first function that is equivalent to the permutation, and the third function is S n ×[n+1]→ [n] may mean.
[0012] The above generating step comprises, for string X, N distinct sets of natural ranks of all substrings of string X. X When that is said, the method may include the step of constructing a vertex corresponding to a permutation and a permutation corresponding to a vertex, and connecting edges generated using a first function, a second function, and a third function to the constructed vertex to generate a rank graph of strings.
[0013] The above-mentioned search step may include the step of searching for a set of all infinitesimal non-infinite rank strings of the string using the set of integer characters of the edges for the edges out of the vertices and the length of the paths connected by edges from the root vertex to the vertices in the rank graph of the generated string.
[0014] A string search system may include a graph generation unit that generates a ranking graph of strings; and a string search unit that searches for a set of strings that do not contain infinitesimal ranks using the generated ranking graph of strings. Effects of the invention
[0016] To solve the infinitesimal non-inclusive rank string problem, a rank graph of strings is defined, and the infinitesimal non-inclusive rank string can be calculated based on the defined rank graph. Brief explanation of the drawing
[0018] FIG. 1 is an example for explaining an infinitesimal non-inclusion rank string in one embodiment. FIG. 2 is a block diagram illustrating the configuration of a string search system in one embodiment. FIG. 3 is a flowchart illustrating a method for searching for an infinitesimal non-inclusion rank string in one embodiment. FIGS. 4 and FIGS. 5 are examples for explaining a ranking graph in one embodiment. FIG. 6 is an example for explaining the operation of searching for a set of infinitesimal non-inclusive strings in one embodiment. Specific details for implementing the invention
[0019] Hereinafter, embodiments will be described in detail with reference to the attached drawings.
[0021] FIG. 1 is an example for explaining an infinitesimal non-inclusion rank string in one embodiment.
[0022] To aid in understanding the explanation of the operation for searching for infinitesimal non-inclusive rank strings, we will first explain non-inclusive strings, infinitesimal non-inclusive strings, rank isomorphisms, and rank representation methods.
[0023] A set of integer characters , A set of strings composed of It is called... Regarding, Is The size of, Is It means the i-th character of. Is It refers to a substring consisting of the characters from the i-th to the j-th. where j > i is an empty string, and an empty string is defined as a substring of any string. The set of integers from 1 to n is [n], and the set of all permutations of [n] is S. n It is called. For convenience, permutations of empty strings are Defined as.
[0024] string Regarding, some string go If it is not a substring of, Is It is called an exclusion string. go It is an exclusion string of, class go If it is a substring of, Is It is called an infinitesimal non-inclusive string. For example, , Regarding, The infinitesimally infinite strings are (1, 1), (1, 2, 2, 1), (2, 1, 2, 1), (2, 2, 1, 2), and (2, 2, 2, 2), so there are a total of 5 infinitesimally infinite strings.
[0025] string The ranking of can be expressed in various ways. Each character A permutation listing the relative ranks of is called the natural rank, and It shall be denoted as 'ra'. The definition is as follows.
[0026]
[0027] The ranking of can be expressed using prefix representation. prefix expressions of is defined as follows.
[0028]
[0029] in other words, The i-th element of is at It refers to the natural order of. For example, The other side The natural expression and prefix expression of each , am.
[0030] Two strings wa y And, for all 1≤i, j≤ About If satisfied, that is, if the relative rank between the characters is the same, two characters and y are said to be rank-isomorphic. It is denoted as y. For example, two strings class Since they have the same length and the same rank (3, 1, 4, 2), they are rank-isomorphic.
[0031] Two strings of length 1 or more and Regarding, isomorphic to the rank A substring of does not exist, , isomorphic to the rank If a substring of exists, natural ranking cast It is defined as an infinitesimal non-inclusive rank string. For example, as shown in Fig. 1. , Let's say. And, as isomorphic to the rank A substring of does not exist. Therefore, silver It is a string of infinitesimal non-inclusion ranks.
[0032] The infinitesimal non-inclusion ranking string problem is a string Given, the set of all infinitesimal non-infinite rank strings of X MAOP X This is a problem of finding . As in the example above. Ramyeon, MAOP X ={(2, 1, 3), (2, 3, 1), (1, 2, 3, 4), (1, 2, 4, 3), (1, 4, 2, 3), (1, 4, 3, 2), (4, 1, 2, 3), (4, 1, 3, 2), (4, 3, 2, 1), (3, 5, 4, 1, 2), (5, 3, 1, 2, 4)}.
[0033] FIG. 2 is a block diagram illustrating the configuration of a string search system in one embodiment, and FIG. 3 is a flowchart illustrating a method for searching for a string that is not included in the minimum order in one embodiment.
[0034] The processor of the string search system (100) may include a graph generation unit (210) and a string search unit (220). These components of the processor may be representations of different functions performed by the processor according to control commands provided by program code stored in the string search system. The processor and the components of the processor may control the string search system that performs steps (310 to 320) included in the infinitesimal non-inclusion ranking string search method of FIG. 3. At this time, the processor and the components of the processor may be implemented to execute instructions according to the code of the operating system included in the memory and the code of at least one program.
[0035] The processor can load program code stored in a file of a program for a method of searching for a string of infinitesimal
[0036] In step (310), the graph generation unit (210) can generate a rank graph of a string. The graph generation unit (210) can define a first function to obtain a permutation in which a rank is added as the last element of the permutation. The graph generation unit (210) can define a second function to obtain a permutation in which the first element of the permutation is deleted. The graph generation unit (210) can define a third function to obtain a permutation in which the permutation of the first function for the second function and the permutation using the values of the second function and the third function for the first function are equivalent. For a string X, the graph generation unit (210) has N distinct sets of natural ranks of all substrings of string X. X In this case, a permutation can be constructed with a vertex corresponding to the permutation and a permutation corresponding to the vertex, and an edge generated using the first function, the second function, and the third function can be connected to the constructed vertex to create a rank graph of strings.
[0037] In step (320), the string search unit (220) can search for a set of all infinitesimal non-infinitely ranked strings of the string using a rank graph of the generated string. The string search unit (220) can search for a set of all infinitesimal non-infinitely ranked strings of the string using, for edges going out from a vertex, a set of integer characters of the edges and the length of the path connecting the edges from the root vertex to the vertex in the rank graph of the generated string.
[0038] FIGS. 4 and FIGS. 5 are examples for explaining a ranking graph in one embodiment.
[0039] The set of infinitesimal non-infinite rank strings of string X MAOP X Rank graph G to find X We will explain the operation of creating.
[0040] Definition 1. g function(g : S n ×[n+1] → S n+1 )
[0041] every , Regarding, It is as follows.
[0042]
[0043] in other words, is a permutation Rank as the last element of It refers to a permutation with added. For example, class About am.
[0044] Definition 2. f function( f : S n → S n-1 )
[0045] every Regarding, It is as follows.
[0046]
[0047] is a permutation It refers to a permutation obtained by removing the first element of. For example, Regarding, am.
[0048] Definition 3. h function(h : S n ×[n+1]→ [n])
[0049] every , , Regarding, Is It is equivalent to .
[0050] proof. , Let's say that. In other words, , It is. (1) In the case of, by g is. That is, Is It means that. Therefore, f By the definition of (2) The case of can be calculated similarly. That is, by g and, this, since It is. This is a permutation and ranking Permutations connecting cast , permutation with the first character removed cast If we say, and Without calculating the rank It means that can be obtained. For example, , When, We can calculate that the last element of is 2 using h.
[0051] For a string X, N sets of distinct natural ranks of all substrings of X X Let X be the set MAOP of infinitesimal non-inclusive strings. X is defined as follows.
[0052]
[0053] Rank graph for X is a directed graph defined as follows.
[0054] The fixed tangent set V is N X It consists of vertices that have a one-to-one correspondence with . The vertex corresponding to is as, The permutation corresponding to is It is used by writing it as .
[0055]
[0056]
[0057] Regarding, is. That is, set A u is an edge going out from u For, it means the set of integer characters of e.
[0058] d u Is From to u It refers to the length of the path connected to the fields.
[0059] Observation 1. Graph(V, E g ) is a root It is in trie.
[0060] Observation 2. Regarding, From u to E g The string formed by concatenating all integer characters of a path consisting of elements is prefix expressions of is. This is It is self-evident by the definition of and g.
[0061] G X Is Natural ranking corresponding to It does not actually store . Referring to Fig. 4, which shows the rank graph of X=(20, 50, 40, 10, 30, 60), that is, as shown in Fig. 4, the actual natural rank is not stored. Instead, A u , d u MAOP using X Calculate G X For each vertex u, there are three sets A u, , We decide to consider . is the edge going out from u Ga E g It means that it does not exist in. For example, for vertex u in Fig. 5, , , am.
[0062] Summary 1. Each element Regarding, ramen am. ramen am.
[0063] proof. , It is called. By the assumption of the problem And, am. It is called. b is What exists in (i.e., what exists on the graph) is, It means that by the definition of h is, and this It means.
[0064] thus, is. By the same logic. One can also consider this. In this case, since, am.
[0065] In the example of Fig. 5, since, For each element of Each , , am. since, , is the infinitesimal non-infinite string of X. Referring to Fig. 6, this is an example of the set of infinitesimal non-infinite strings X=(20, 50, 40, 10, 30, 60). is N X exists in, Is Ga N X Since it does not exist in, it is not an infinitesimally inclusive string. In this case, to calculate h Not the whole Since only one is needed, it can be calculated by storing it for each vertex. G X Explore all vertices u of, and the two sets described above , class You can find all infinitesimal non-inclusive strings of X using this. If is an infinitesimal non-inclusive string of X, Therefore, when the search ends for all vertices, all minimum-inclusive rank strings of X, i.e., the set MAOP X You can find it.
[0066] The device described above may be implemented as a hardware component, a software component, and / or a combination of a hardware component and a software component. For example, the device and components described in the embodiments may be implemented using one or more general-purpose or special-purpose computers, such as, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. The processing unit may execute an operating system (OS) and one or more software applications executed on said operating system. Additionally, the processing unit may access, store, manipulate, process, and generate data in response to the execution of the software. For ease of understanding, the processing unit may be described as being used as a single unit, but those skilled in the art will understand that the processing unit may include a plurality of processing elements and / or a plurality of types of processing elements. For example, the processing unit may include multiple processors or one processor and one controller. Additionally, other processing configurations, such as parallel processors, are also possible.
[0067] Software may include computer programs, code, instructions, or a combination of one or more of these, and may configure a processing unit to operate as desired or instruct the processing unit independently or collectively. Software and / or data may be embodied in any type of machine, component, physical device, virtual equipment, computer storage medium, or device so as to be interpreted by the processing unit or to provide instructions or data to the processing unit. Software may be distributed over networked computer systems and may be stored or executed in a distributed manner. Software and data may be stored on one or more computer-readable recording media.
[0068] The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, etc., either alone or in combination. The program instructions recorded on the medium may be those specifically designed and configured for the embodiment, or they may be those known and available to those skilled in the art of computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes; optical recording media such as CD-ROMs and DVDs; magneto-optical media such as floptical disks; and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, and flash memory. Examples of program instructions include machine code, such as that generated by a compiler, as well as high-level language code that can be executed by a computer using an interpreter, etc.
[0069] Although the embodiments have been described above with reference to limited examples and drawings, those skilled in the art can make various modifications and variations from the description above. For example, suitable results can be achieved even if the described techniques are performed in a different order than described, and / or the components of the described system, structure, device, circuit, etc. are combined or assembled in a form different from described, or replaced or substituted by other components or equivalents.
[0070] Therefore, other implementations, other embodiments, and equivalents to the claims also fall within the scope of the claims set forth below.
Claims
Claim 1 A method for searching for a minimally non-inclusive rank string performed by a string search system comprises: a step of generating a rank graph of a string; and a step of searching for a set of minimally non-inclusive rank strings of a string using the generated rank graph of the string, wherein the generating step comprises a step of defining a third function for obtaining a permutation in which a permutation of a first function with respect to a second function and a permutation using the values of a second function and a third function with respect to the first function are equivalent, and the third function is S n A search method for infinitesimal non-inclusive strings that includes ×[n+1]→[n]. Claim 2 In claim 1, the generating step includes the step of defining a first function for obtaining a permutation with a rank added as the last element of the permutation, and the first function is S n ×[n+1]→ S n+1 A search method for infinitesimal non-inclusion rank strings characterized by meaning. Claim 3 In claim 1, the generating step includes the step of defining a second function for obtaining a permutation in which the first element of the permutation is deleted, and the second function is S n → S n-1 A search method for infinitesimal non-inclusion rank strings characterized by meaning. Claim 4 delete Claim 5 A method for searching for a minimally non-inclusive rank string performed by a string search system comprises: a step of generating a rank graph of a string; and a step of searching for a set of minimally non-inclusive rank strings of a string using the generated rank graph of the string, wherein the generating step comprises, for a string X, a set of distinct natural ranks of all substrings of string X is N X A method for searching for a rank string that does not contain a minimum, comprising the step of constructing a vertex corresponding to a permutation and a permutation corresponding to a vertex, and connecting edges generated using a first function, a second function, and a third function to the constructed vertex to generate a rank graph of a string. Claim 6 A method for searching for a minimum non-inclusive rank string according to claim 1 or 5, wherein the searching step comprises the step of searching for a set of all minimum non-inclusive rank strings of the string using the set of integer characters of the edges for the edges going out from the vertices and the length of the path connecting the edges from the root vertex to the vertex. Claim 7 A string search system comprises: a graph generation unit for generating a rank graph of strings; and a string search unit for searching a set of infinitesimal non-infinite rank strings using the generated rank graph of strings, wherein the graph generation unit includes defining a third function for obtaining a permutation in which a permutation of a first function with respect to a second function and a permutation using the values of a second function and a third function with respect to the first function are equivalent, and the third function is S n A string search system that includes the meaning of ×[n+1]→ [n].
