JPH0773202A - Digraph reconstituting method - Google Patents

Digraph reconstituting method

Info

Publication number
JPH0773202A
JPH0773202A JP5242157A JP24215793A JPH0773202A JP H0773202 A JPH0773202 A JP H0773202A JP 5242157 A JP5242157 A JP 5242157A JP 24215793 A JP24215793 A JP 24215793A JP H0773202 A JPH0773202 A JP H0773202A
Authority
JP
Japan
Prior art keywords
label
directed graph
divided
sub
edge
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP5242157A
Other languages
Japanese (ja)
Inventor
Shoichi Tateno
昌一 舘野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP5242157A priority Critical patent/JPH0773202A/en
Publication of JPH0773202A publication Critical patent/JPH0773202A/en
Pending legal-status Critical Current

Links

Landscapes

  • Digital Computer Display Output (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To speed up retrieval processing speed by integrating the sides having the same lavel originating from the same node into one and reconstituting a digraph composed of sub graph groups, for a converted sub-digraph group. CONSTITUTION:The number of a prescribed label division is fixed every depth from the starting node of a digraph. For a digraph to be the object of a reconstituion, a bit string composing the label 23 of each side 22 of a side set originating from a node 21 is divided by this label division number. The digraph is converted into the sub-digraph group where the side 22 in which each divided bit string is defined as the label 23 is serially connected. In this case, for the converted sub-digraph group, further, the sides 22 having the same label 23 originating from the same node 21 are integrated into one and are reconstituted into the digraph composed of sub-digraph groups. Therefore, the number of times of comparison of the label 23 of the sides 22 of the sub-digraph group can be a fewer by the number of the label 23 of the integrated sides 22.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、有向グラフ再構成方法
に関し、有向グラフにおける辺のラベルを分割したサブ
有向グラフに基づいて有向グラフを再構成し、有向グラ
フにおける辺のラベルの探索が高速に行なわれるように
した有向グラフの再構成方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a directed graph reconstructing method, and reconstructs a directed graph based on a sub-directed graph obtained by dividing edge labels in a directed graph so that edge labels in the directed graph can be searched at high speed. The present invention relates to a method for reconstructing a directed graph.

【0002】[0002]

【従来の技術】有向グラフは、これを要素として、木構
造、ネットワ−ク構造をそのままの形状で表現できるた
め、最近のデ−タ処理システムにおいては、効率よくデ
−タを表現するデ−タ構造として多く利用されるように
なっている。例えば、デ−タベ−スを構成する場合に
は、木構造のデ−タ構造でデータベーススキーマを作成
して階層的な検索処理に利用される。また、このように
構成されたデータベースにおいては、ネットワ−ク構造
の表現によって関係する関連デ−タまでもの検索が可能
になる。
2. Description of the Related Art In a directed graph, since a tree structure and a network structure can be expressed as they are by using this as an element, in a recent data processing system, data which efficiently represents the data can be expressed. It has been widely used as a structure. For example, when constructing a database, a database schema is created with a tree-structured data structure and used for hierarchical search processing. Further, in the database thus constructed, it becomes possible to retrieve even the related data related by the representation of the network structure.

【0003】ところで、有向グラフで表現されたデータ
構造のデータ群に対して、検索を行う場合、従来から一
般に用いられている有向グラフの辺のラベルの探索方法
は、有向グラフの各節から発する辺集合に対し、各辺上
のラベルの値を見て、条件に合致していれば、その辺を
辿ってその辺が指す節に移動し、条件に合致していなけ
れば、辺集合の中の次の辺を対象として条件に合致して
いるかを調べる探索方法がある。このような探索方法
で、データベースのデータ検索が行なわれる。
By the way, when searching a data group having a data structure represented by a directed graph, a search method for a label of an edge of a directed graph, which has been generally used in the past, is based on an edge set generated from each node of the directed graph. On the other hand, looking at the value of the label on each edge, if the condition is met, follow the edge to move to the node pointed to by the edge, and if the condition is not met, move to the next node in the edge set. There is a search method for checking whether or not an edge is a condition. The data search of the database is performed by such a search method.

【0004】このような探索方法によれば、例えば、こ
こでの検索対象のデータが、1つの節から発する辺集合
のi番目の要素が条件に合致する辺のラベルのデータで
あるとすると、その節の辺の探索に関しては、条件に合
致するかどうかの比較をi番目までi回繰り返すことに
なる。したがって、各々の節の辺集合について、多くの
比較処理を繰り返し行なわなければならず、有向グラフ
で表現されたデータ構造のデータベースでは、データ検
索の比較回数が膨大なものとなる。
According to such a search method, for example, if the data to be searched here is the data of the label of the edge where the i-th element of the edge set originating from one clause matches the condition, Regarding the search for the edge of the clause, the comparison of whether or not the condition is met is repeated i times up to the i-th time. Therefore, many comparison processes must be repeated for each edge set of each clause, and the number of comparisons of data search becomes enormous in a database having a data structure represented by a directed graph.

【0005】[0005]

【発明が解決しようとする課題】上述のような有向グラ
フの探索方法においては、各節での辺のラベルの探索に
より次に辿る辺を見つけて、次の節への移動を行うの
で、探索の対象となる有向グラフの各々の節の辺集合の
要素数をnとすると、有向グラフの検索では、明らかに
1つの節に対して平均(n+1)/2回の辺のラベル比
較が必要となる。
In the above-described search method for a directed graph, the edge to be searched next is found by searching the edge label in each clause, and the movement to the next clause is performed. Assuming that the number of elements in the edge set of each node of the target directed graph is n, obviously (n + 1) / 2 edge label comparisons are required for one node in the search of the directed graph.

【0006】このため、大規模な有向グラフでネットワ
−クが構成されたデータ構造の有向グラフの探索処理を
行う場合は、その多くの辺の数に応じて、比較すべき辺
のラベル数も多くなる。したがって、大規模な有向グラ
フのネットワ−クを探索する場合、多くの辺数に応じ
て、比較すべき辺数も多くなり、このような有向グラフ
で表現されているデータ構造のデータから探索を行う場
合には、多くの辺にかかる比較処理のために、そのデ−
タ処理速度に関して多大な負荷を強いられることにな
る。
For this reason, when performing a search process for a directed graph having a data structure in which a network is constructed by a large-scale directed graph, the number of labels on the edges to be compared also increases according to the number of the edges. . Therefore, when searching a network of a large-scale directed graph, the number of edges to be compared also increases according to the number of edges, and when searching from the data of the data structure represented by such a directed graph. In order to perform comparison processing on many sides,
A large load is imposed on the processing speed.

【0007】本発明は上記のような課題を解決するため
になされたものであり、本発明の目的は、有向グラフに
よりネットワ−クのデ−タ構造を表現してデータ探索を
行なう場合に、データ探索速度を高速化できる構造の有
向グラフに再構成する有向グラフ再構成方法を提供する
ことにある。
The present invention has been made to solve the above problems, and an object of the present invention is to obtain a data search when a data structure of a network is represented by a directed graph. It is an object of the present invention to provide a directed graph reconstruction method for reconstructing a directed graph having a structure capable of increasing the search speed.

【0008】[0008]

【課題を解決するための手段】上述のような目的を達成
するため、本発明の第1の特徴とする有向グラフ再構成
方法は、有向グラフの開始節からの深さごとに所定のラ
ベル分割数を定め、該ラベル分割数で、節から発する辺
集合の各辺のラベルを構成しているビット列を分割し、
分割した各々のビット列をラベルとする辺を直列に接続
したサブ有向グラフ群に変換し、変換したサブ有向グラ
フ群に対して更に同じ節から発する同じラベルを持つ辺
を1つにまとめ、サブ有向グラフ群からなる有向グラフ
に再構成することを特徴とする。
In order to achieve the above-mentioned object, a directed graph reconstruction method, which is the first feature of the present invention, provides a predetermined number of label divisions for each depth from the start node of a directed graph. Determine the number of label divisions, and divide the bit string that constitutes the label of each edge of the edge set originating from the node,
Convert the edges with the respective divided bit strings as labels into a series of connected sub-directed graphs, combine the edges of the converted sub-directed graphs that have the same label from the same clause into one, and then convert them from the sub-directed graphs It is characterized in that it is reconstructed into a directed graph.

【0009】また、本発明の第2の特徴とする有向グラ
フ再構成方法は、所定のラベル分割数で節から発する辺
集合の各辺のラベルを構成するビット列を分割し、分割
した各々のビット列をラベルとする辺を直列に接続した
サブ有向グラフ群に変換し、変換したサブ有向グラフ群
に対して更に同じ節から発する同じラベルを持つ辺を1
つにまとめて、サブ有向グラフ群を再構成し、再構成し
たサブ有向グラフ群について、辺集合における比較回数
の平均値が元の変換前の有向グラフより少ないか否かを
判定し、辺集合における比較回数の平均値が変換前の有
向グラフより少ない場合に、再構成したサブ有向グラフ
群を残し、平均値が元の有向グラフの辺集合における比
較回数の平均値より多いか等しい場合には当該サブ有向
グラフ群を破棄し、元の有向グラフを残す変換を行い、
有向グラフを再構成することを特徴とする。
The directed graph reconstruction method, which is the second feature of the present invention, divides the bit string constituting the label of each edge of the edge set originating from the node by a predetermined number of label divisions, and dividing each divided bit string. Convert the edges to be labels into sub-directed graph groups that are connected in series, and for the converted sub-directed graph groups, set 1 to the edge with the same label that originates from the same clause.
In summary, the sub-directed graph group is reconstructed, and it is determined whether or not the average value of the number of comparisons in the edge set is smaller than that of the original untransformed directed graph for the reconstructed sub-directed graph group. If the average value of is less than the directed graph before conversion, the reconstructed sub-directed graph group is retained, and if the average value is greater than or equal to the average number of comparisons in the edge set of the original directed graph, the sub-directed graph group is discarded. Then, perform the conversion that leaves the original directed graph,
It is characterized by reconstructing a directed graph.

【0010】[0010]

【作用】本発明の第1の特徴とする有向グラフ再構成方
法においては、まず、有向グラフの開始節からの深さご
とに所定のラベル分割数を定める。再構成の対象とする
有向グラフに対して、このラベル分割数により、節から
発する辺集合の各辺のラベルを構成しているビット列を
分割する。そして、分割した各々のビット列をラベルと
する辺を直列に接続したサブ有向グラフ群に変換する。
ここで、変換したサブ有向グラフ群に対して、更に同じ
節から発する同じラベルを持つ辺を1つにまとめ、サブ
有向グラフ群からなる有向グラフに再構成する。
In the directed graph reconstruction method of the first feature of the present invention, first, a predetermined number of label divisions is determined for each depth from the start node of the directed graph. With respect to the directed graph to be reconstructed, the number of label divisions divides the bit string forming the label of each side of the side set originating from the node. Then, it is converted into a sub-directed graph group in which the edges having the respective divided bit strings as labels are connected in series.
Here, with respect to the converted sub-directed graph group, edges having the same label, which are emitted from the same clause, are further combined into one and reconstructed into a directed graph including the sub-directed graph group.

【0011】これにより、再構成された有向グラフは、
その要素のサブ有向グラフ群に関して、サブ有向グラフ
群の各々の辺のラベルは、再構成前のラベルを構成して
いたビット列が分割され、その分割単位での同じビット
列のラベルがまとめられ、1つの辺のラベルとなってい
る。このため、サブ有向グラフ群の辺のラベルの比較回
数は、まとめられた辺のラベルの数だけ少なくて済む。
As a result, the reconstructed directed graph is
With respect to the sub-directed graph group of the element, the label of each edge of the sub-directed graph group is divided into bit strings that constitute the label before reconstruction, and the labels of the same bit string in the division unit are combined to form one edge. Has become the label. For this reason, the number of times the labels of the edges of the sub-directed graph group are compared can be as small as the number of labels of the edges that are collected.

【0012】また、本発明の第2の特徴とする有向グラ
フ再構成方法においては、まず、所定のラベル分割数で
節から発する辺集合の各辺のラベルを構成するビット列
を分割する。次に、分割した各々のビット列をラベルと
する辺を直列に接続したサブ有向グラフ群に変換する。
そして、変換したサブ有向グラフ群に対して、更に同じ
節から発する同じラベルを持つ辺を1つにまとめて、サ
ブ有向グラフ群を再構成する。
In the directed graph reconstructing method of the second aspect of the present invention, first, the bit string constituting the label of each side of the side set emitted from the node is divided by a predetermined number of label divisions. Next, it is converted into a sub-directed graph group in which the edges having the respective divided bit strings as labels are connected in series.
Then, for the converted sub-directed graph group, the edges having the same label, which are emitted from the same clause, are further combined into one to reconstruct the sub-directed graph group.

【0013】ここでは、更に、再構成したサブ有向グラ
フ群について、検索の際のラベル比較回数が少なく、好
ましい状態の有向グラフに再構成されているかを検証し
て、良好な状態の有向グラフに変換する。そのため、続
いて、再構成したサブ有向グラフ群について辺集合にお
ける比較回数の平均値が元の変換前の有向グラフより少
ないか否かを判定する。この判定の結果として、辺集合
における比較回数の平均値が元の変換前の有向グラフよ
り少ない場合に、再構成したサブ有向グラフ群を残す変
換を行う。また、辺集合における比較回数の平均値が元
の有向グラフの辺集合における比較回数の平均値より多
いか等しい場合には当該サブ有向グラフ群を破棄し、元
の有向グラフを残す変換を行う。
Here, the reconfigured sub-directed graph group is verified whether or not it has been reconfigured into a preferred state directed graph because the number of label comparisons at the time of retrieval is small, and conversion is performed to a favorable directed graph. Therefore, subsequently, it is determined whether or not the average value of the number of comparisons in the edge set of the reconstructed sub directed graph group is smaller than that of the original directed graph before conversion. As a result of this determination, when the average value of the number of comparisons in the edge set is smaller than the original directed graph before conversion, conversion that leaves the reconstructed sub directed graph group is performed. If the average value of the number of comparisons in the edge set is greater than or equal to the average value of the number of comparisons in the edge set of the original directed graph, the sub-directed graph group is discarded and the original directed graph is converted.

【0014】これにより、再構成された有向グラフは、
その要素のサブ有向グラフ群に関して、サブ有向グラフ
群の各々の辺のラベルは、再構成前のラベルを構成して
いたビット列が分割され、その分割単位での同じビット
列のラベルはまとめられ、1つの辺のラベルとなってい
る。このため、サブ有向グラフ群の辺のラベルの比較回
数は、まとめられた辺のラベルの数だけ少なくて済むよ
うになる。
As a result, the reconstructed directed graph is
Regarding the sub-directed graph group of the element, the label of each edge of the sub-directed graph group is divided into bit strings that compose the label before reconstruction, and the labels of the same bit string in the division unit are grouped into one edge. Has become the label. For this reason, the number of comparisons of the labels of the edges of the sub directed graph group can be reduced by the number of the labels of the collected edges.

【0015】ここでは、元のラベルのビット列を分割
し、新たなラベルとして、その分割単位で同じビット列
のラベルはまとめられるが、新たに形成したラベルで同
じものが少なく、ラベルが十分にまとめられない場合が
存在する。この場合、元の有向グラフの1つのラベル比
較に対して、そのラベル分割数だけラベルを増すので、
新たなラベルの比較回数が増える。このため、再構成し
たサブ有向グラフ群について、検索の際のラベル比較回
数が十分に少なく、最適な状態の有向グラフに再構成さ
れているかを検証して、最適な状態の有向グラフに変換
する。その場合、ラベル分割数を変えて、各々の場合で
有向グラフ再構成を行い、比較回数の判定により最適な
状態の有向グラフに再構成を行う。
Here, the bit string of the original label is divided, and as the new label, the labels of the same bit string are grouped in the unit of division, but there are few newly formed labels and the labels are grouped sufficiently. There are cases where it does not exist. In this case, since the label is increased by the number of label divisions for one label comparison of the original directed graph,
The number of new label comparisons increases. For this reason, it is verified whether the reconfigured sub-directed graph group is reconfigured into an optimal directed graph because the number of label comparisons at the time of retrieval is sufficiently small, and conversion is performed to the optimal directed graph. In that case, the number of label divisions is changed, the directed graph is reconstructed in each case, and the directed graph in the optimum state is reconstructed by the determination of the number of comparisons.

【0016】[0016]

【実施例】以下、本発明の実施例を図面を用いて具体的
に説明する。図1は、本発明の有向グラフ再構成方法の
処理の流れを説明するPAD(Problem Analysis Diagra
m)図である。この処理では、処理対象の有向グラフの各
々の節に対し、その節から発する各々の辺に対して、辺
のラベルのビット列の分割処理を行い、分割した辺のビ
ット列の新たな辺としたサブ有向グラフとして、有向グ
ラフを再構成する。
Embodiments of the present invention will be specifically described below with reference to the drawings. FIG. 1 is a PAD (Problem Analysis Diagra) for explaining the processing flow of the directed graph reconstruction method of the present invention.
m) It is a figure. In this process, for each node of the directed graph to be processed, for each edge that originates from that node, the bit string of the edge label is divided, and the sub-directed graph is created as a new edge of the bit string of the divided edge. To reconstruct the directed graph.

【0017】図1を参照して、有向グラフ再構成方法の
処理を流れを説明すると、処理を開始すると、まず、繰
り返し処理制御ブロック11において、有向グラフの全
ての節集合の各要素(節)に対して繰り返し処理を行う
制御を行い、更に、次の繰り返し処理制御ブロック12
において、対象の節から発する全ての要素(辺)に対す
る繰り返し処理の制御を行う。これにより、次の処理ブ
ロック13から処理ブロック18までの処理を、全ての
節集合の各要素(節)に対して、その各要素の節に対し
更にその節から発する全ての辺に対して、処理を順次に
実行する制御を行ない、個々の辺に対する処理を行な
う。
The flow of the process of the directed graph reconstruction method will be described with reference to FIG. 1. When the process starts, first, in the iterative process control block 11, for each element (section) of all the node sets of the directed graph. Control for performing the iterative processing is further performed, and the next iterative processing control block 12 is further performed.
In, control of iterative processing is performed for all elements (edges) emitted from the target node. As a result, the processing from the next processing block 13 to the processing block 18 is performed for each element (section) of all the node sets, for the node of each element, and for all edges originating from that node. Control is performed to sequentially execute the processing, and the processing is performed for each edge.

【0018】個々の辺に対する処理では、まず、処理ブ
ロック13において、辺のラベルを構成しているビット
列を分割し、次の処理ブロック14において、分割され
たビット列をラベルとする辺が直列に接続された構造
(辺直列のサブ有向グラフ)に再構成する。次に、処理
ブロック15において、再構成した有向グラフ(サブ有
向グラフ)の同じ節から発する同じラベルを持つ辺をひ
とつにまとめ、次に、判定処理ブロック16,処理ブロ
ック17,および処理ブロック18において、ここで再
構成したサブ有向グラフを評価する。
In the processing for each edge, first, in the processing block 13, the bit string forming the edge label is divided, and in the next processing block 14, the edges labeled with the divided bit string are connected in series. To the restructured structure (edge-series sub directed graph). Next, in processing block 15, edges having the same label that originate from the same node of the reconstructed directed graph (sub-directed graph) are combined into one, and then in determination processing block 16, processing block 17, and processing block 18, here Evaluate the sub-directed graph reconstructed in.

【0019】この有向グラフの評価の処理では、判定処
理ブロック16において、再構成した辺集合における比
較回数の平均値が元のものより少ないか否かを判定す
る。この判定の結果、辺集合における比較回数の平均値
が元のものより少ない場合は、次の処理ブロック17に
おいて、再構成した辺集合の方を残して、1つの節から
発する当該辺に対する処理を終了する。また、判定処理
ブロック16の判定において、辺集合における比較回数
の平均値が元のものより少なくない場合は、処理ブロッ
ク18において、元の辺集合の方を残し、1つの節から
発する当該辺に対する処理を終了する。
In the processing for evaluating the directed graph, the judgment processing block 16 judges whether the average value of the number of comparisons in the reconstructed edge set is smaller than the original one. If the result of this determination is that the average number of comparisons in the edge set is less than the original, then in the next processing block 17, the reconstructed edge set is left and the processing for that edge originating from one clause is performed. finish. If the average value of the number of comparisons in the edge set is not smaller than the original one in the determination of the determination processing block 16, the original edge set is left in the processing block 18, and the edge generated from one clause is processed. The process ends.

【0020】このようにして、1つの節から発する当該
辺に対する処理を終了すると、繰り返し処理制御ブロッ
ク12の制御により、辺を変えて、処理ブロック13か
ら処理ブロック18までの処理を繰り返し行い、処理対
象の節から発する全ての辺に対する処理を行う。1つの
節から発する全ての辺に対する処理を終了すると、更
に、繰り返し処理制御ブロック11の制御に戻り、節を
変えて、再び、繰り返し処理制御ブロック12から処理
ブロック18までの処理を繰り返し行い、処理対象の節
に対する処理を行う。全ての節集合の各要素(節)に対
する処理が終了すると、ここでの一連の処理を終了す
る。
In this way, when the processing for the edge generated from one node is completed, the edge is changed under the control of the iterative processing control block 12, and the processings from the processing block 13 to the processing block 18 are repeatedly performed. Performs processing for all edges originating from the target node. When the processing for all the edges originating from one node is completed, the process returns to the control of the iterative process control block 11, the node is changed, and the process from the iterative process control block 12 to the process block 18 is repeated and the process is repeated. Perform processing on the target clause. When the processing for each element (section) of all the clause sets is completed, the series of processing here is completed.

【0021】図2〜図5は、この実施例にかかる有向グ
ラフ再構成方法により、再構成する有向グラフを具体的
なデータの例に基づいて説明する図である。図2は本実
施例にかかる有向グラフの表記法を説明する図であり、
図3は辺のラベルのビット列を分割しない場合のラベル
比較を説明する図である。図4は辺のラベルのビット列
を2分割した場合のラベル比較を説明する図である。ま
た、図5は辺のラベルのビット列を4分割した場合のラ
ベル比較を説明する図である。
2 to 5 are diagrams for explaining the directed graph to be reconstructed by the directed graph reconstructing method according to this embodiment, based on specific data examples. FIG. 2 is a diagram for explaining the notation of the directed graph according to the present embodiment,
FIG. 3 is a diagram for explaining label comparison when the bit string of the side label is not divided. FIG. 4 is a diagram for explaining label comparison when a bit string of side labels is divided into two. FIG. 5 is a diagram for explaining label comparison when a bit string of side labels is divided into four.

【0022】ここでの有向グラフは、図2に示すよう
に、節21の集合および各々の節から発する辺22の集
合から構成される。各辺22には、ラベル23が設けら
れる。そのグラフ形式で表現するグラフ表記20では、
図2の上部側に示すように、節21を丸印で表記し、節
21から発する辺22を矢印で表記する。その辺の矢印
の近傍に、当該辺が有するラベル23の値を付記してい
る。
As shown in FIG. 2, the directed graph is composed of a set of nodes 21 and a set of edges 22 originating from each node. A label 23 is provided on each side 22. In the graph notation 20 expressed in the graph format,
As shown in the upper side of FIG. 2, the joint 21 is represented by a circle, and the side 22 emanating from the joint 21 is represented by an arrow. The value of the label 23 of the side is added to the vicinity of the arrow on that side.

【0023】ここでは、図が煩雑になるのを防ぐため、
図2に示す有向グラフでは、有向グラフの一部のみを示
し、同じ節を指す複数の辺が存在しない場合(木構造)
の有向グラフを表示している。しかし、同じ節を指す複
数の辺がある場合(ネットワーク構造)の有向グラフに
対しても、以下に説明する本実施例の有向グラフ再構成
方法は適用可能であることは明らかである。
Here, in order to prevent the figure from becoming complicated,
In the directed graph shown in FIG. 2, only a part of the directed graph is shown, and there are no multiple edges pointing to the same node (tree structure).
The directed graph of is displayed. However, it is obvious that the directed graph reconstruction method of the present embodiment described below can be applied to a directed graph having a plurality of edges pointing to the same node (network structure).

【0024】以下に説明する本実施例の有向グラフ再構
成方法の処理の例では、処理対象を木構造の有向グラフ
とするが、更に、このような木構造の有向グラフのグラ
フ表記20を、見やすく簡略化した表現するとするた
め、図2に下部側に示すようなテーブル形式で表現する
テーブル表記24とする。ここでのグラフ表記20とテ
ーブル表記24とは同じ内容の有向グラフを表現してい
る。すなわち、テーブル表記24では、各々の矩形ブロ
ック25が辺を表現しており、その中にラベルを表示
し、矩形ブロック25の右側の線(右辺)がここでの節
と対応する。
In the example of the process of the directed graph reconstructing method of the present embodiment described below, the processing target is a tree-structured directed graph. Further, the graph notation 20 of such a tree-structured directed graph is simplified and easy to see. In order to express this, the table notation 24 is expressed in a table format as shown in the lower side of FIG. The graph notation 20 and the table notation 24 here represent a directed graph having the same content. That is, in the table notation 24, each rectangular block 25 represents a side, and a label is displayed in the side, and the right line (right side) of the rectangular block 25 corresponds to the node here.

【0025】次に、このように表現された有向グラフの
辺のラベル比較を行う場合、本発明に従って、各辺のラ
ベルのビット列を分割しサブ有向グラフに再構成して比
較する場合と各辺のラベルのビット列を分割しないで比
較する場合とを対比して説明する。以下の説明ではテー
ブル表記で有向グラフが表現されているものとする。
Next, when comparing the labels of the edges of the directed graph expressed in this way, according to the present invention, the bit string of the label of each edge is divided and reconstructed into a sub-directed graph for comparison, and the label of each edge is compared. Will be described in comparison with the case where the bit string is compared without being divided. In the following description, it is assumed that the directed graph is expressed in table notation.

【0026】図3は辺のラベルのビット列を分割しない
場合のラベル比較を説明する図である。このテーブル表
記の有向グラフでは、ある節から発する22個の辺を示
している。22個の各辺を特定するため、ここでは、左
側に1から22の番号を付与してある。各々の辺のラベ
ルのビット列は16進数で表現し、辺の矩形ブロックの
内にA4,B0,…などと表記している。
FIG. 3 is a diagram for explaining label comparison when the bit string of the edge label is not divided. The directed graph in this table notation shows 22 edges emanating from a certain clause. In order to specify each of the 22 sides, numbers 1 to 22 are given to the left side here. The bit string of the label of each side is expressed by a hexadecimal number, and is written as A4, B0, ... In the rectangular block of the side.

【0027】各々の辺のラベルを検索対象とする場合の
比較回数は、各々の辺の矩形ブロックの右側に示してい
る。ここでの1番目の辺のラベル“A4”が検索対象と
なっている場合には、1番目の辺のラベル“A4”との
比較の一致により、検索されるので、比較回数は1回と
なるが、例えば、3番目の辺のラベル“B4”が検索対
象となっている場合は、1番目の辺のラベル“A4”と
の比較の不一致と、2番目の辺のラベル“B0”との比
較の不一致と、3番目の辺のラベル“B4”との比較の
一致とを経ることになるので、この場合の比較回数は3
回となる。
The number of comparisons when the label of each side is the search target is shown on the right side of the rectangular block of each side. If the label “A4” on the first side here is the search target, the search is performed by matching the comparison with the label “A4” on the first side, so the number of comparisons is once. However, for example, when the label “B4” on the third side is the search target, the mismatch in comparison with the label “A4” on the first side and the label “B0” on the second side Therefore, the number of comparisons in this case is 3 because the comparison does not match and the comparison with the label “B4” on the third side occurs.
Times.

【0028】このようにして、各々の辺のラベルが検索
対象となっている場合に対して、各辺のラベルの比較回
数を求めると、各々の辺の矩形ブロックの右側に示して
いるような比較回数となる。したがって、この場合の有
向グラフの1つの節から発する辺集合に対しては、その
総比較回数が253回となり、辺のラベルの平均比較回
数は、11.50(=253÷22)となる。
In this way, when the number of comparisons of the labels of each side is obtained for the case where the label of each side is the search target, it is as shown on the right side of the rectangular block of each side. It is the number of comparisons. Therefore, in this case, the total number of comparisons is 253 for the edge set that originates from one node of the directed graph, and the average number of comparisons of the edge labels is 11.50 (= 253 ÷ 22).

【0029】図3の有向グラフと同じ内容の有向グラフ
に対して、本発明による有向グラフ再構成方法を適用し
た場合のラベル比較の例を説明する。辺のラベルのビッ
ト列を2分割した場合には、図4に示すようになる。図
4において、有向グラフの各々の辺のラベルのビット列
は2分割され、分割辺1と分割辺2との新たな2つの辺
のラベルとして再構成されている。前述したように、こ
の場合に新たな辺のラベルで同じ節から発する同じもの
は1つにまとめる。
An example of label comparison when the directed graph reconstruction method according to the present invention is applied to a directed graph having the same contents as the directed graph of FIG. 3 will be described. When the bit string of the side label is divided into two, it becomes as shown in FIG. In FIG. 4, the bit string of the label of each side of the directed graph is divided into two, and is reconfigured as labels of two new sides of the divided side 1 and the divided side 2. As described above, in this case, the same labels originating from the same node in the new edge are combined into one.

【0030】すなわち、再構成前の1番目の辺のラベル
“A4”はそのビット列が2つに分割され、ラベル
“A”の分割辺1とラベル“4”の分割辺2とが(新た
な節を介して)直列に接続された構造となる。再構成前
の2番目の辺のラベル“B0”はそのビット列が2つに
分割され、ラベル“B”の分割辺1とラベル“0”の分
割辺2が(新たな節を介して)直列に接続された構造と
なる。同様に、再構成前の3番目の辺のラベル“B4”
はそのビット列が2つに分割され、ラベル“B”の分割
辺1とラベル“4”の分割辺2が(新たな節を介して)
直列に接続された構造となる。ここで、3番目の辺の分
割辺1のラベル“B”と、2番目の辺の分割辺1のラベ
ル“B”とは同じであり、また、同じ節から発している
ので、3番目の辺の分割辺1と2番目の辺の分割辺1と
は1つにまとめられる。以下、同様にして、4番目の辺
から22番目の辺までの辺を2分割して再構成を行う
と、図4に示すような有向グラフ(テーブル表記)が得
られる。
That is, the bit string of the label "A4" on the first side before reconstruction is divided into two, and the divided side 1 of the label "A" and the divided side 2 of the label "4" (new (Via nodes) connected in series. The label “B0” on the second side before reconstruction is divided into two bit strings, and the divided side 1 of the label “B” and the divided side 2 of the label “0” are serialized (via a new section). The structure is connected to. Similarly, the label “B4” on the third side before reconstruction
Divides the bit string into two, and divides edge 1 with label "B" and edge 2 with label "4" (via a new section).
The structure is such that they are connected in series. Here, the label “B” of the divided side 1 of the third side is the same as the label “B” of the divided side 1 of the second side, and the label “B” originates from the same section. The divided side 1 of the side and the divided side 1 of the second side are combined into one. In the same manner, when the sides from the fourth side to the 22nd side are divided into two and reconstructed, a directed graph (table notation) as shown in FIG. 4 is obtained.

【0031】このようにして、2分割して再構成した有
向グラフを評価するため、前述の図3で説明した場合と
同様に、各々の辺のラベルを検索対象とした場合のそれ
ぞれの比較回数を求める。各々の辺のラベルを検索対象
とした場合の比較回数は、各々の分割辺2の矩形ブロッ
クの右側に示されている。この場合の比較は辺直列法で
の比較を行う。すなわち、1番目の辺のラベル“A4”
が検索対象となっている場合、1番目の分割辺1のラベ
ル“A”との比較の一致と、1番目の分割辺2のラベル
“4”との比較の一致とにより検索されるので、その比
較回数は2回となる。2番目の辺のラベル“B0”が検
索対象となっている場合は、1番目の分割辺1のラベル
“A”との比較の不一致と、2番目の分割辺1のラベル
“B”との比較の一致と、2番目の分割辺2のラベル
“0”との比較の一致とを経ることになるので、この場
合の比較回数は3回となる。
In this way, in order to evaluate the directed graph reconstructed by dividing it into two, the number of comparisons when the labels of the respective sides are the retrieval targets is calculated, as in the case described with reference to FIG. Ask. The number of comparisons when the label of each side is the search target is shown on the right side of the rectangular block of each divided side 2. In this case, the edge series method is used for comparison. That is, the label “A4” on the first side
Is a search target, the search is performed by matching the comparison with the label “A” of the first divided edge 1 and the comparison with the label “4” of the first divided edge 2. The number of comparisons is twice. When the label “B0” on the second side is the search target, there is a mismatch in comparison with the label “A” on the first side 1 and the label “B” on the second side 1. Since the comparison matches and the comparison with the label “0” on the second divided side 2 is performed, the number of comparisons in this case is three.

【0032】また、3番目の辺のラベル“B4”が検索
対象となっている場合は、1番目の分割辺1のラベル
“A”との比較の不一致と、2番目の分割辺1のラベル
“B”との比較の一致と、2番目の分割辺2のラベル
“0”との比較の不一致と、3番目の分割辺2のラベル
“4”との比較の一致とを経ることになるので、この場
合の比較回数は4回となる。以下、同様にして、22番
目の辺のラベル“CF”が検索対象となっている場合ま
での比較回数を求める。
When the label "B4" on the third side is the search target, a mismatch in comparison with the label "A" on the first divided side 1 and the label on the second divided side 1 There is a match in comparison with “B”, a mismatch in comparison with the label “0” on the second divided side 2, and a match with comparison with label “4” on the third divided side 2. Therefore, the number of comparisons in this case is four. Thereafter, similarly, the number of comparisons is calculated until the label “CF” on the 22nd side is the search target.

【0033】このようにして、各々の辺のラベルが検索
対象となっている場合に対して、各辺のラベルの比較回
数を求めることにより、各々の分割辺2の矩形ブロック
の右側に示しているような比較回数が得られる。この場
合、図3に示す有向グラフと同じ内容の有向グラフの1
つの節から発する辺集合に対して、その総比較回数が1
84回となり、平均比較回数は、8.36(=184÷
22)となる。明らかに、辺のビット列を分割しない場
合(図3)に比較して、辺のビット列を分割した場合
(図4)の平均比較回数が減少している。このため、こ
のように、有向グラフの辺のビット列を分割して、サブ
有向グラフに再構成することにより、有向グラフでの探
索処理が高速化できる。
In this way, when the label of each side is the search target, the number of comparisons of the labels of each side is obtained, and the result is shown on the right side of the rectangular block of each divided side 2. The number of comparisons is obtained. In this case, 1 of the directed graph having the same contents as the directed graph shown in FIG.
The total number of comparisons for an edge set originating from one clause is 1
This is 84 times, and the average number of comparisons is 8.36 (= 184 ÷
22). Obviously, the average number of comparisons is reduced when the side bit string is divided (FIG. 4) compared to when the side bit string is not divided (FIG. 3). Therefore, in this way, by dividing the bit string on the side of the directed graph and reconstructing it into the sub-directed graph, the search processing in the directed graph can be speeded up.

【0034】図5は、辺のビット列を更に分割して、辺
のラベルのビット列を4分割した場合のラベル比較を説
明する図である。辺のラベルのビット列を4分割して再
構成した場合の有向グラフは、図5に示すようになる。
図5において、有向グラフの各々の辺のラベルのビット
列は4分割され、2ビットずつのラベルを有する辺の集
合からなるサブ有向グラフとして再構成される。すなわ
ち、各々の辺のラベルのビット列は、分割辺1,分割辺
2,分割辺3および分割辺4との新たな4つの辺のラベ
ルとして再構成される。前述の場合と同様に、新たな辺
のラベルで同じ節から発するもので、同じものは1つに
まとめられる。
FIG. 5 is a view for explaining label comparison when the side bit string is further divided and the side label bit string is divided into four. A directed graph when the bit string of the edge label is divided into four and reconstructed is as shown in FIG.
In FIG. 5, the bit string of the label of each edge of the directed graph is divided into four and reconstructed as a sub-directed graph composed of a set of edges each having a label of 2 bits. That is, the bit string of the label of each side is reconfigured as a label of four new sides of the divided side 1, the divided side 2, the divided side 3, and the divided side 4. As in the previous case, new edge labels originate from the same section, and the same ones are grouped together.

【0035】再構成前の1番目の辺のラベルの16進数
表記の“A4”は、そのビット列が4つに分割され、2
ビットずつのビット列の4つのラベルとなる(以下の説
明では各々のラベルの2ビットの表記を4進数で表記す
るが併せて適宜に括弧内にビット表記する)。この場
合、図5に示すように、1番目の辺のラベル“A4(1
0100100)”のビット列は、4つの分割され、ラ
ベル“2(10)”の分割辺1と、ラベル“2(1
0)”の分割辺2と、ラベル“1(01)”の分割辺3
と、ラベル“0(00)”の分割辺4とが(各々が新た
な節を介して)直列に接続された構造となる。
In the hexadecimal notation "A4" of the label of the first side before reconstruction, the bit string is divided into 4 and 2
It becomes four labels of a bit string for each bit (in the following description, the 2-bit notation of each label is expressed by a quaternary number, but also the bits are appropriately expressed in parentheses). In this case, as shown in FIG. 5, the label “A4 (1
The bit string “0100100)” is divided into four, and the divided side 1 of the label “2 (10)” and the label “2 (1
0) "divided side 2 and label" 1 (01) "divided side 3
And the divided side 4 of the label “0 (00)” are connected in series (each via a new node).

【0036】同じく、再構成前の2番目の辺のラベル
“B0(10110000)”のビット列は、4つのビ
ット列に分割され、ラベル“2(10)”の分割辺1
と、ラベル“3(11)”の分割辺2と、ラベル“0
(00)”の分割辺3と、ラベル“0(00)”の分割
辺4とが、直列に接続された構造となる。このような再
構成では、2番目の辺の分割辺1のラベル“2”と、1
番目の辺の分割辺1のラベル“2”とは同じであり、ま
た、同じ節から発しているので、2番目の辺の分割辺1
と1番目の辺の分割辺1とは、1つにまとめられる。
Similarly, the bit string with the label "B0 (1010000)" on the second side before reconstruction is divided into four bit strings, and the divided side 1 with the label "2 (10)"
And the divided side 2 of the label “3 (11)” and the label “0
The divided side 3 of (00) "and the divided side 4 of the label" 0 (00) "are connected in series. In such a reconstruction, the label of the divided side 1 of the second side "2" and 1
The label “2” of the divided side 1 of the second side is the same as that of the label “2”, and since it originates from the same section, the divided side 1 of the second side is
And the divided side 1 of the first side are combined into one.

【0037】また、再構成前の3番目の辺のラベル“B
4(10110100)”は、そのビット列が4つに分
割されて、ラベル“2(10)”の分割辺1と、ラベル
“3(11)”の分割辺2と、ラベル“1(01)”の
分割辺3と、ラベル“0(00)”の分割辺4とが、直
列に接続された構造となる。この再構成では、3番目の
辺の分割辺1のラベル“2”は1番目の辺の分割辺1の
ラベル“2”とは同じであり、また、同じ節から発して
いるので、3番目の辺の分割辺1と1番目の辺の分割辺
1とは1つにまとめられ、また、3番目の辺の分割辺2
のラベル“3”は2番目の辺の分割辺2のラベル“3”
とは同じで、共に同じ節から発しているので、3番目の
辺の分割辺2と2番目の辺の分割辺2とは1つにまとめ
られる。
Also, the label "B on the third side before reconstruction"
4 (10110100) "is obtained by dividing the bit string into four, and the divided side 1 of the label" 2 (10) ", the divided side 2 of the label" 3 (11) ", and the label" 1 (01) ". The divided side 3 and the divided side 4 of the label “0 (00)” are connected in series. In this reconstruction, the label “2” of the divided side 1 of the third side is the first side. Is the same as the label “2” of the divided side 1 of the side, and since it originates from the same section, the divided side 1 of the third side and the divided side 1 of the first side are combined into one. And the divided side 2 of the third side
Label "3" is the label "3" of the second divided edge 2
, And both originate from the same clause, so that the divided side 2 of the third side and the divided side 2 of the second side are combined into one.

【0038】このようにして、同じ節から発している同
じ内容のラベルの辺は1つにまとめられる。以下、同様
にして、4番目の辺から22番目の辺までの辺を4分割
して再構成し、同じ節から発している同じ内容のラベル
の辺は1つにまとめて、サブ有向グラフに再構成を行う
と、図5に示すような有向グラフ(テーブル表記)が得
られる。
In this way, the edges of the labels having the same contents, which originate from the same section, are put together. In the same way, the edges from the 4th edge to the 22nd edge are divided into 4 parts and reconstructed, and the edges with the same content that originate from the same clause are combined into one and re-created in the sub directed graph. When configured, a directed graph (table notation) as shown in FIG. 5 is obtained.

【0039】また、同じく、ここで4分割し再構成した
有向グラフを評価するため、前述の図3により説明した
場合と同様に、各々の辺のラベルを検索対象とした場合
のそれぞれの比較回数を求め、その平均比較回数を求め
る。各々の辺のラベルを検索対象とした場合の比較回数
は、各々の分割辺4の矩形ブロックの右側に示されてい
る。前述の場合と同様に、この場合の比較は辺直列法で
の比較を行う。すなわち、1番目の辺のラベル“A4”
が検索対象となっている場合、ビット列を辺のラベルと
する比較が辺直列法で行なわれ、1番目の分割辺1のラ
ベル“2”との比較の一致と、1番目の分割辺2のラベ
ル“2”との比較の一致と、1番目の分割辺3のラベル
“1”との比較の一致と、1番目の分割辺4のラベル
“0”との比較の一致とにより検索されるので、比較回
数は4回となる。
Similarly, in order to evaluate the reconstructed directed graph divided into four, the number of comparisons when the labels of the respective sides are the search targets is determined as in the case described with reference to FIG. Then, the average number of comparisons is calculated. The number of comparisons when the label of each side is the search target is shown on the right side of the rectangular block of each divided side 4. Similar to the case described above, the comparison in this case is performed by the edge series method. That is, the label “A4” on the first side
Is a search target, the comparison using the bit string as the edge label is performed by the edge serial method, and the comparison of the comparison with the label “2” of the first divided edge 1 and the edge of the first divided edge 2 are performed. The search is performed by the matching match with the label “2”, the matching match with the label “1” of the first divided edge 3, and the matching match with the label “0” of the first divided edge 4. Therefore, the number of comparisons is four.

【0040】2番目の辺のラベル“B0”が検索対象と
なっている場合は、1番目の分割辺1のラベル“2”と
の比較の一致と、1番目の分割辺2のラベル“2”との
比較の不一致と、2番目の分割辺2のラベル“3”との
比較の一致と、2番目の分割辺3のラベル“0”との比
較の一致と、2番目の分割辺4のラベル“0”との比較
の一致とを経ることになるので、この場合の比較回数は
5回となる。
When the label "B0" on the second side is the search target, the comparison is coincident with the label "2" on the first divided side 1 and the label "2" on the first side 2 is divided. Disagreement in comparison with "," comparison in comparison with the label "3" of the second division edge 2, comparison with comparison with the label "0" in the second division edge 3, and second division edge 4 Therefore, the number of comparisons in this case is five.

【0041】3番目の辺のラベル“B4”が検索対象と
なっている場合は、1番目の分割辺1のラベル“2”と
の比較の一致と、1番目の分割辺2のラベル“2”との
比較の不一致と、2番目の分割辺2のラベル“3”との
比較の一致と、2番目の分割辺3のラベル“0”との比
較の不一致と、3番目の分割辺3のラベル“1”との比
較の一致と、3番目の分割辺4のラベル“0”の比較の
一致とを経ることになるので、この場合の比較回数は6
回となる。以下、同様にして、辺直列法による分割され
たビット列の比較により、22番目の辺のラベル“C
F”が検索対象となっている場合までの比較回数を求め
る。
When the label "B4" on the third side is the search target, the comparison is coincident with the label "2" on the first divided side 1 and the label "2" on the first divided side 2 Disagreement in comparison with the label “3” of the second divided edge 2, mismatch in comparison with the label “0” of the second divided edge 3, and the third divided edge 3 In this case, the number of comparisons in this case is 6 since the comparison with the label “1” of “3” and the comparison of the label “0” of the third divided side 4 are performed.
Times. Thereafter, similarly, by comparing the divided bit strings by the edge serial method, the label “C” of the 22nd edge is compared.
The number of comparisons is calculated until F ″ is the search target.

【0042】上述のようにして、各々の辺のラベルが検
索対象となっている場合に対して、各辺のラベルの比較
回数を求めると、各々の分割辺4の矩形ブロックの右側
に示しているような比較回数が得られる。この場合、図
3に示す有向グラフと同じ内容の有向グラフの1つの節
から発する辺集合に対して、辺のラベルを4分割した場
合の総比較回数が162回となり、平均比較回数は、
7.36(=164÷22)となる。明らかに、辺のビ
ット列を分割しない場合(図3)に比較して、辺のビッ
ト列を分割した場合(図5)の平均比較回数が大幅に減
少している。すなわち、有向グラフに対して、このよう
な有向グラフの辺のビット列を分割して、サブ有向グラ
フに再構成することにより、有向グラフでの探索処理が
高速化できることになる。
As described above, when the number of comparisons of the labels of each side is calculated for the case where the label of each side is the search target, it is shown on the right side of the rectangular block of each divided side 4. The number of comparisons is obtained. In this case, the total number of comparisons when the edge label is divided into four is 162 times for the edge set generated from one clause of the directed graph having the same content as the directed graph shown in FIG. 3, and the average number of comparisons is
It becomes 7.36 (= 164 ÷ 22). Apparently, the average number of comparisons when the side bit string is divided (FIG. 5) is significantly reduced compared to the case where the side bit string is not divided (FIG. 3). That is, by dividing a bit string on the edge of such a directed graph into a directed graph and reconstructing it into sub-directed graphs, the search processing in the directed graph can be speeded up.

【0043】また、ここでの有向グラフの再構成方法で
は、辺のラベルのビット列を2分割した場合と、4分割
した場合とを対比して説明しているが、各々の辺のラベ
ルのビット列の分割数は、各々の辺のラベルのデータ内
容(ビット幅),同じ節から発する辺数(辺集合)など
に応じて、その最適なラベル分割数が決定されて、有向
グラフの再構成が行なわれる。その評価では、図3〜図
5により説明したように、その辺集合のラベルの比較に
おいて、辺のラベル分割数が異なる場合の各々の場合を
評価して、その平均比較回数が最小のものを選ぶことに
なる。
In the directed graph reconstructing method described here, the case where the bit string of the edge label is divided into two and the case where the bit string of the edge label is divided into four are explained. As for the number of divisions, the optimum number of label divisions is determined according to the data content (bit width) of the label of each edge, the number of edges (edge set) that originate from the same node, and the directed graph is reconstructed. . In the evaluation, as described with reference to FIGS. 3 to 5, in the comparison of the labels of the edge set, each case where the number of label divisions of the sides is different is evaluated, and the one having the smallest average comparison number is selected. I will choose.

【0044】この実施例の場合には、図5に示した4分
割した場合が、その平均比較回数が最も少ないので、こ
の4分割により再構成した有向グラフを選ぶ。1つの節
から発する辺集合に対して、このような有向グラフの再
構成を行って、その評価を行い、有向グラフの各々の節
に対する評価を行い、節集合の全体にわたってこの作業
を繰り返す。これにより、辺のラベルの探索処理が高速
化できるように再構成された有向グラフが得られる。
In the case of this embodiment, since the average number of comparisons is the smallest in the case of four divisions shown in FIG. 5, the directed graph reconstructed by the four divisions is selected. Such a directed graph is reconstructed for an edge set originating from one clause, its evaluation is performed, each clause of the directed graph is evaluated, and this work is repeated over the entire clause set. As a result, a directed graph reconstructed to speed up the edge label search process can be obtained.

【0045】以上に説明したように、本実施例の有向グ
ラフ再構成方法によれば、有向グラフの開始節から始め
て、各々の節の辺集合に対して例えば辺の数ごとに、ラ
ベルの分割数を決め、それの分割数に応じて節から発す
る辺集合の各辺のラベルを構成するビット列を分割し、
複数の分割された各ビット列をラベルとする辺が直列に
接続された構造に再構成する。更に、同じ節から発する
同じラベルを持つ辺をひとつにまとめて再構成したもの
を、元のものと置き換える。
As described above, according to the directed graph reconstruction method of this embodiment, starting from the starting node of the directed graph, the number of label divisions is set for each edge set of each node, for example, for each number of edges. Decide and divide the bit string that composes the label of each side of the set of edges emanating from the node according to the number of divisions,
The edges having the plurality of divided bit strings as labels are reconfigured into a structure in which they are connected in series. Furthermore, the original ones are reconstructed by combining the edges with the same labels that originate from the same clause into one.

【0046】また、節から発する辺集合の各辺のラベル
を構成するビット列を分割し、複数の分割された各ビッ
ト列をラベルとする辺が直列に接続した構造とし、更に
同じ節から発する同じラベルを持つ辺をひとつにまとめ
て再構成し、再構成した辺集合におけるラベル検索の比
較回数の平均値が、元のものより少ない場合には再構成
したものを残し、元のものより多いか等しい場合には元
のものを残す。これを有向グラフを構成するすべての辺
集合について、このような操作を行なう。
Also, a bit string constituting a label of each side of an edge set emitted from a node is divided into a structure in which edges having a plurality of divided bit strings as labels are connected in series, and the same label emitted from the same node. If the average of the number of comparisons of label search in the reconstructed edge set is smaller than the original one, the reconstructed edge is left and more or equal to the original one. In case you leave the original one. This operation is performed for all edge sets that make up the directed graph.

【0047】これにより、再構成された有向グラフは、
ある節の辺集合において、複数の分割されたビット列を
ラベルとする辺が直列に接続した部分を含む有向グラフ
となっており、その有向グラフの節の辺集合において、
複数の分割されたビット列をラベルとする辺が直列に接
続された部分は、元の辺集合に比べて、平均比較回数が
減少している。したがって、有向グラフ全体について見
た場合にも、平均比較回数は減少している。このため、
再構成した有向グラフによりネットワ−クのデ−タ構造
を表現して探索を行なう場合に、比較のための処理速度
が高速化した構造の有向グラフとなる。
As a result, the reconstructed directed graph is
In an edge set of a certain clause, a directed graph including a part in which edges having a plurality of divided bit strings as labels are connected in series is provided.
The average number of comparisons is reduced in a portion in which edges having a plurality of divided bit strings as labels are connected in series as compared with the original edge set. Therefore, the average number of comparisons is reduced even when looking at the entire directed graph. For this reason,
When the data structure of the network is expressed by the reconstructed directed graph to perform the search, the directed graph has a structure in which the processing speed for comparison is increased.

【0048】[0048]

【発明の効果】以上に説明したように、本発明の有向グ
ラフ再構成方法によれば、有向グラフの開始節からの深
さごとに所定のラベル分割数を定め、再構成の対象とす
る有向グラフに対して、このラベル分割数により、節か
ら発する辺集合の各辺のラベルを構成しているビット列
を分割する。そして、分割した各々のビット列をラベル
とする辺を直列に接続したサブ有向グラフ群に変換す
る。ここで、変換したサブ有向グラフ群に対して、更に
同じ節から発する同じラベルを持つ辺を1つにまとめ
て、サブ有向グラフ群からなる有向グラフに再構成す
る。
As described above, according to the directed graph reconstruction method of the present invention, a predetermined number of label divisions is set for each depth from the start node of the directed graph, and the directed graph to be reconstructed is determined. Then, the number of label divisions divides the bit string that constitutes the label of each side of the side set originating from the node. Then, it is converted into a sub-directed graph group in which the edges having the respective divided bit strings as labels are connected in series. Here, with respect to the converted sub-directed graph group, edges having the same label, which are emitted from the same clause, are further combined into one, and reconstructed into a directed graph including the sub-directed graph group.

【0049】これにより、再構成された有向グラフは、
その要素のサブ有向グラフ群に関して、サブ有向グラフ
群の各々の辺のラベルは、再構成前のラベルを構成して
いたビット列が分割され、その分割単位で同じビット列
のラベルはまとめられ1つの辺のラベルとなっている。
このため、サブ有向グラフ群の辺のラベルの比較回数
は、まとめられた辺のラベルの数だけ少なくて済む。こ
のため、再構成した有向グラフによりネットワ−クのデ
−タ構造を表現し、探索を行なう場合に、比較のための
処理速度が高速化された構造の有向グラフを実現でき
る。
As a result, the reconstructed directed graph is
Regarding the sub-directed graph group of the element, the label of each edge of the sub-directed graph group is divided into bit strings that compose the label before reconstruction, and the labels of the same bit string are grouped by the division unit to label one edge. Has become.
For this reason, the number of times the labels of the edges of the sub-directed graph group are compared can be as small as the number of labels of the edges that are collected. Therefore, when the network data structure is represented by the reconstructed directed graph and a search is performed, a directed graph having a structure in which the processing speed for comparison is increased can be realized.

【図面の簡単な説明】[Brief description of drawings]

【図1】 図1は本発明の有向グラフ再構成方法の処理
の流れを説明するPAD図、
FIG. 1 is a PAD diagram illustrating a processing flow of a directed graph reconstruction method of the present invention,

【図2】 図2は本実施例にかかる有向グラフの表記法
を説明する図、
FIG. 2 is a diagram illustrating a notation of a directed graph according to the present embodiment,

【図3】 図3は辺のラベルのビット列を分割しない場
合のラベル比較を説明する図、
FIG. 3 is a diagram for explaining label comparison when a bit string of edge labels is not divided;

【図4】 図4は図4は辺のラベルのビット列を2分割
した場合のラベル比較を説明する図、
FIG. 4 is a diagram for explaining label comparison when a bit string of edge labels is divided into two;

【図5】 図5は辺のラベルのビット列を4分割した場
合のラベル比較を説明する図である。
FIG. 5 is a diagram for explaining label comparison when a bit string of edge labels is divided into four.

【符号の説明】[Explanation of symbols]

11〜18…PADの処理ブロック、20…グラフ表
記、21…節、22…辺、23…ラベル、24…テーブ
ル表記、25…辺の矩形ブロック。
11 to 18 ... PAD processing block, 20 ... Graph notation, 21 ... Section, 22 ... Side, 23 ... Label, 24 ... Table notation, 25 ... Side rectangular block.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 有向グラフの開始節からの深さごとに所
定のラベル分割数を定め、該ラベル分割数で、節から発
する辺集合の各辺のラベルを構成しているビット列を分
割し、分割した各々のビット列をラベルとする辺を直列
に接続したサブ有向グラフ群に変換し、変換したサブ有
向グラフ群に対して更に同じ節から発する同じラベルを
持つ辺を1つにまとめ、サブ有向グラフ群からなる有向
グラフに再構成することを特徴とする有向グラフ再構成
方法。
1. A predetermined number of label divisions is determined for each depth from a start node of a directed graph, and the bit sequence that constitutes a label of each side of an edge set originating from the node is divided by the number of label divisions and divided. Converted to a sub-directed graph group in which the edges having the respective bit strings as labels are connected in series, and the converted sub-directed graph groups are merged into edges having the same label, which are emitted from the same clause, to form a sub-directed graph group. A directed graph reconstruction method characterized by reconstructing a directed graph.
【請求項2】 所定のラベル分割数で節から発する辺集
合の各辺のラベルを構成するビット列を分割し、 分割した各々のビット列をラベルとする辺を直列に接続
したサブ有向グラフ群に変換し、 変換したサブ有向グラフ群に対して更に同じ節から発す
る同じラベルを持つ辺を1つにまとめて、サブ有向グラ
フ群を再構成し、 再構成したサブ有向グラフ群について、辺集合における
比較回数の平均値が元の変換前の有向グラフより少ない
か否かを判定し、 辺集合における比較回数の平均値が変換前の有向グラフ
より少ない場合に、再構成したサブ有向グラフ群を残
し、平均値が元の有向グラフの辺集合における比較回数
の平均値より多いか等しい場合には当該サブ有向グラフ
群を破棄し、元の有向グラフを残す変換を行い、 有向グラフを再構成することを特徴とする有向グラフ再
構成方法。
2. A bit string constituting a label of each edge of an edge set emitted from a node is divided by a predetermined number of label divisions, and is converted into a sub-directed graph group in which edges each having the divided bit string as a label are connected in series. , For the transformed sub-directed graph group, the edges with the same label that originate from the same clause are combined into one, and the sub-directed graph group is reconstructed. For the reconstructed sub-directed graph group, the average value of the number of comparisons in the edge set. Is smaller than the original digraph before conversion, and if the average number of comparisons in the edge set is less than the digraph before conversion, the reconstructed sub-directed graph group is left and the average value of the original digraph is If the number of comparisons in the edge set is greater than or equal to the average value, the sub-directed graph group is discarded, the original directed graph is retained, and the directed graph is reconstructed. Digraph reconstruction method which is characterized in that.
JP5242157A 1993-09-03 1993-09-03 Digraph reconstituting method Pending JPH0773202A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5242157A JPH0773202A (en) 1993-09-03 1993-09-03 Digraph reconstituting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5242157A JPH0773202A (en) 1993-09-03 1993-09-03 Digraph reconstituting method

Publications (1)

Publication Number Publication Date
JPH0773202A true JPH0773202A (en) 1995-03-17

Family

ID=17085181

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5242157A Pending JPH0773202A (en) 1993-09-03 1993-09-03 Digraph reconstituting method

Country Status (1)

Country Link
JP (1) JPH0773202A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07210570A (en) * 1994-01-25 1995-08-11 Fuji Xerox Co Ltd Directed graph editing processor
US9612799B2 (en) 2013-12-20 2017-04-04 International Business Machines Corporation Method, device, and computer program for merge-sorting record groups having tree structure efficiently

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07210570A (en) * 1994-01-25 1995-08-11 Fuji Xerox Co Ltd Directed graph editing processor
US9612799B2 (en) 2013-12-20 2017-04-04 International Business Machines Corporation Method, device, and computer program for merge-sorting record groups having tree structure efficiently
US10228907B2 (en) 2013-12-20 2019-03-12 International Business Machines Corporation Method, device, and computer program for merge-sorting record groups having tree structure efficiently
US11023203B2 (en) 2013-12-20 2021-06-01 International Business Machines Corporation Method, device, and computer program for merge-sorting record groups having tree structure efficiently

Similar Documents

Publication Publication Date Title
Ajtai et al. An 0 (n log n) sorting network
KR100798609B1 (en) Storage medium for storing data sorting method, data sorting apparatus and data sorting program
US6741985B2 (en) Document retrieval system and search method using word set and character look-up tables
US8126911B2 (en) System and method for content-based partitioning and mining
US5842208A (en) High performance recover/build index system by unloading database files in parallel
JP2001282817A (en) Data mining method and apparatus for decision tree
JPH11212980A (en) Production of index and retrieval method
JPH02230464A (en) Encoding of signature
Lipski Jr Finding a Manhattan path and related problems
CN107015868A (en) A kind of distributed parallel construction method of General suffix tree
Tseng et al. Generating frequent patterns with the frequent pattern list
Mohan et al. A multiprocessor architecture for the (M, L)-algorithm suitable for VLSI implementation
JPH0773202A (en) Digraph reconstituting method
Navarro et al. Distributed generation of suffix arrays
Henzinger et al. Certificates and fast algorithms for biconnectivity in fully-dynamic graphs
Grossi et al. Efficient splitting and merging algorithms for order decomposable problems
Rohlf A new approach to the computation of the Jardine-Sibson Bk clusters
JPH08235033A (en) Joint arithmetic system for object-oriented data base management system
Lau Top-down Synthesis of Sorting Algorithms.
Clarke et al. Escher-a geometrical layout system for recursively defined circuits
Lee et al. A data mining approach to database compression
Boissonnat et al. Computing the union of 3-colored triangles
JPS63298523A (en) Creation method of binary tree structure dictionary using clustering method
CN109542897B (en) Method and system for binary search tree
Files A new approach to partition selection in Ashenhurst-Curtis functional decomposition