[go: up one dir, main page]

JP5340232B2 - Graph diameter monitoring apparatus, method and program - Google Patents

Graph diameter monitoring apparatus, method and program Download PDF

Info

Publication number
JP5340232B2
JP5340232B2 JP2010165143A JP2010165143A JP5340232B2 JP 5340232 B2 JP5340232 B2 JP 5340232B2 JP 2010165143 A JP2010165143 A JP 2010165143A JP 2010165143 A JP2010165143 A JP 2010165143A JP 5340232 B2 JP5340232 B2 JP 5340232B2
Authority
JP
Japan
Prior art keywords
node
diameter
distance
nodes
graph
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.)
Expired - Fee Related
Application number
JP2010165143A
Other languages
Japanese (ja)
Other versions
JP2012027654A (en
Inventor
靖宏 藤原
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.)
Nippon Telegraph and Telephone Corp
NTT Inc
Original Assignee
Nippon Telegraph and Telephone Corp
NTT Inc
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 Nippon Telegraph and Telephone Corp, NTT Inc filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2010165143A priority Critical patent/JP5340232B2/en
Publication of JP2012027654A publication Critical patent/JP2012027654A/en
Application granted granted Critical
Publication of JP5340232B2 publication Critical patent/JP5340232B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Description

本発明は、グラフの直径のモニタリング装置及び方法及びプログラムに係り、特に、時々刻々と増大するグラフの直径をモニタリングするためのグラフの直径のモニタリング装置及び方法及びプログラムに関する。   The present invention relates to a graph diameter monitoring apparatus, method, and program, and more particularly, to a graph diameter monitoring apparatus, method, and program for monitoring an ever-increasing graph diameter.

グラフは実世界に存在するものとそれらの関係をノードとエッジという形で表現するデータ構造である。その直感的な表現方法によりグラフは数学やコンピュータ科学の分野において広く使われている。   A graph is a data structure that expresses what exists in the real world and their relationship in the form of nodes and edges. Due to its intuitive expression method, graphs are widely used in the fields of mathematics and computer science.

グラフにおけるノード間の距離はグラフ理論の中で基本的な特徴量の一つである。グラフの直径とは、ノード間の距離に基づいた特徴量であり、グラフを解析する上で非常に重要である。しかし、従来のグラフ理論が対象としてきたグラフは静的であり、ノード及びエッジの数は変わらないという前提があった。   The distance between nodes in a graph is one of the basic features in graph theory. The diameter of the graph is a feature amount based on the distance between the nodes, and is very important in analyzing the graph. However, the graph targeted by the conventional graph theory is static, and there is a premise that the number of nodes and edges does not change.

近年、時間と共にノード数が時々刻々と増大し、結果的にノード数が数十万以上になるグラフデータを扱うことが必要となってきた。これは巨大なデータベースとインターネットを用いる環境が整ってきた結果である。そして、近年の研究により時々刻々とノードの数を増やしながら成長し続けるグラフデータの特徴が明らかになりつつある(例えば、非特許文献1参照)。そのため時々刻々と成長し、結果的に非常に大きなサイズになるグラフを効率的に処理する需要が高まりつつある。   In recent years, it has become necessary to handle graph data in which the number of nodes increases with time, resulting in hundreds of thousands or more of nodes. This is the result of an environment that uses a huge database and the Internet. In recent years, the characteristics of graph data that continues to grow while increasing the number of nodes from moment to moment are becoming clear (see, for example, Non-Patent Document 1). Therefore, there is an increasing demand for efficient processing of graphs that grow from moment to moment and eventually become very large in size.

本発明では、時々刻々と成長し続けるグラフの中から直径を検出し続ける問題を扱う。   The present invention deals with the problem of continuously detecting the diameter from a graph that continues to grow from moment to moment.

本明細書が対象とする問題の応用例としてP2P(ポイントツーポイント)ネットワークがあげられる。   A P2P (point-to-point) network can be cited as an application example of the problem targeted by this specification.

近年、Gnutella(登録商標)、   In recent years, Gnutella (registered trademark),

Figure 0005340232
OceanStore(登録商標)などP2Pサービスに対する注目が集まっている。P2Pは中心にサーバを置くのではなくネットワークを介して計算リソースを共有するところに大きな特徴がある(例えば、非特許文献2参照)。
Figure 0005340232
Attention has been focused on P2P services such as OceanStore (registered trademark). P2P has a major feature in that it does not place a server at the center but shares computing resources via a network (for example, see Non-Patent Document 2).

P2Pを用いたアプリケーションの中でもインターネットを用いたコンテンツ配信は多くの研究者から注目される最も重要なもののひとつである。例えば、Kazaaとその亜種のネットワークは急激に成長していて、450万人以上のユーザが7ペタバイト以上のコンテンツを共有していることが知られている(例えば、非特許文献3参照)。これらアプリケーションにおいて各コンピュータはデータを互いに転送し合いコンテンツ配信を行っている。   Among the applications using P2P, content distribution using the Internet is one of the most important ones attracting attention from many researchers. For example, Kazaa and its variants are growing rapidly, and it is known that 4.5 million or more users share 7 petabytes or more of content (for example, see Non-Patent Document 3). In these applications, each computer transfers data to each other and distributes content.

各コンピュータが直接通信するコンピュータの数は、ネットワークで用いられるプロトコルによって制限される。ネットワークを設計するとき最も重要な問題として、各コンピュータが直接通信するコンピュータの数を何台とするかというものがある(例えば、非特許文献4参照)。この問題は2つの理由から重要である。1つ目の理由としてネットワークに接続するコンピュータの数は膨大であり直接通信するコンピュータの数は非常に大きくなりうることがあげられる。また、コンピュータ間のデータ転送はオーバヘッドであるため、効率的な配信のためには転送の数を減らすことが必要である。   The number of computers with which each computer communicates directly is limited by the protocol used in the network. The most important problem when designing a network is how many computers each computer communicates directly with (see, for example, Non-Patent Document 4). This issue is important for two reasons. The first reason is that the number of computers connected to the network is enormous, and the number of computers that communicate directly can be very large. In addition, since data transfer between computers is overhead, it is necessary to reduce the number of transfers for efficient distribution.

ネットワークにおける直径は効率的なコンテンツ配信のための重要な指標である。それは直径がネットワークにおけるコンピュータ間の最大の転送回数と対応しているからである(例えば、非特許文献5参照)。直径が大きくなったときにのみ各コンピュータが直接通信するコンピュータを増やすことによって効率的なコンテンツ配信が可能になる。   Diameter in the network is an important indicator for efficient content distribution. This is because the diameter corresponds to the maximum number of transfers between computers in the network (see, for example, Non-Patent Document 5). Efficient content distribution becomes possible by increasing the number of computers with which each computer communicates directly only when the diameter increases.

上記以外にネットワークの頑健性の向上も重要なアプリケーションとしてあげられる。Koppulaらは動的に変化するグラフの直径をプロットすることにより、どのようにエッジを張り替えればネットワークの頑健性を向上できるかを示した(例えば、非特許文献6参照)。   In addition to the above, improving network robustness is another important application. Koppula et al. Showed how the edge of the network can be improved by plotting the diameter of a dynamically changing graph (see, for example, Non-Patent Document 6).

Newman, The Structure and Function of Complex Networks, SIREV: SIAM Review, 2003Newman, The Structure and Function of Complex Networks, SIREV: SIAM Review, 2003 Stephanos Androutsellis-Theotokis and Diomidis Spinellis, A survey of peer-to-peer content distribution technologies, ACM comput. Surv., 2004.Stephanos Androutsellis-Theotokis and Diomidis Spinellis, A survey of peer-to-peer content distribution technologies, ACM comput. Surv., 2004. Mayank Bawa, Brian F. Cooper, Arturo Crespo, Neil Daswani, Prasanna Ganesan, Hector Garcia-Molina, Sepandar D. Kamvar, Sergio Marti, Mario T. Schlosser, Qi Sun, Patrick Venograd and Beverly Yang, Peer-to-peer research at Stanford, SIGMOD Record, 2003.Mayank Bawa, Brian F. Cooper, Arturo Crespo, Neil Daswani, Prasanna Ganesan, Hector Garcia-Molina, Sepandar D. Kamvar, Sergio Marti, Mario T. Schlosser, Qi Sun, Patrick Venograd and Beverly Yang, Peer-to-peer research at Stanford, SIGMOD Record, 2003. Sylvia Ratnasamy, Ion Stoica and Scott Shenker, Routing Algorithms for DHTs: Some Open Questions, IPTPS, 2003.Sylvia Ratnasamy, Ion Stoica and Scott Shenker, Routing Algorithms for DHTs: Some Open Questions, IPTPS, 2003. AAbhishek Kumar, Shashidhar Merugu, Jun Xu and Xingxing Yu. Ulysses: A Robust, Low-Diameter, Low-Latency Peer-to-Peer Network, ICNP, 2003.AAbhishek Kumar, Shashidhar Merugu, Jun Xu and Xingxing Yu.Ulysses: A Robust, Low-Diameter, Low-Latency Peer-to-Peer Network, ICNP, 2003. Hema Swetha Koppula, Kumar Puspesh and Nily Ganguly, Study and Improvement of Robustness of Overlay Networks, HiPC, 2007.Hema Swetha Koppula, Kumar Puspesh and Nily Ganguly, Study and Improvement of Robustness of Overlay Networks, HiPC, 2007.

従来は、O(n2+nm)の計算時間(nとmはそれぞれノードとエッジ数)が必要であり、大規模なグラフの解析には実用的ではなかった。 Conventionally, calculation time of O (n 2 + nm) (n and m are the number of nodes and edges, respectively) is required, which is not practical for analyzing large-scale graphs.

本発明は、上記の点に鑑みなされたもので、グラフにおける直径を、従来より高速に求めることができ、また、元のグラフが時々刻々と成長しても効率的にグラフの近似を計算することが可能なグラフの直径のモニタリング装置及び方法及びプログラムを提供することを目的とする。   The present invention has been made in view of the above points, and the diameter in the graph can be obtained at a higher speed than before, and the approximation of the graph is efficiently calculated even if the original graph grows momentarily. It is an object of the present invention to provide a graph diameter monitoring apparatus, method, and program capable of being used.

上記の課題を解決するために、本発明(請求項1)は、実世界に存在するものの関係をノードとエッジで表現するデータ構造を有するグラフの直径をモニタリングするためのグラフの直径のモニタリング装置であって、
時刻毎に変化するノードを受信するデータ受信手段と、
受信したノード(追加ノード)及び、ノード間の距離が直径となる1時刻前の2つのノードの組である解ノードのペアと該ノード間の最大距離である直径を格納した記憶手段と、
ノード間の距離を計算する距離計算手段と、
前記記憶手段に格納されているノードからその他のノードまでの最大距離を前記距離計算手段により求め、直径になり得ないノードを枝刈りする枝刈り手段と、
前記記憶手段の直径となるノードのペアを、前記データ受信手段により追加されたノードからの距離に基づいて更新する更新手段と、を有する。
In order to solve the above problems, the present invention (Claim 1) is a graph diameter monitoring device for monitoring the diameter of a graph having a data structure that expresses the relationship of what exists in the real world with nodes and edges. Because
Data receiving means for receiving nodes that change at each time;
A storage unit storing a received node (additional node), a pair of solution nodes, which is a set of two nodes one hour before the distance between the nodes becomes a diameter, and a diameter that is the maximum distance between the nodes;
A distance calculating means for calculating a distance between nodes;
A pruning means for obtaining a maximum distance from the node stored in the storage means to another node by the distance calculation means, and pruning a node that cannot be a diameter;
Updating means for updating a pair of nodes having a diameter of the storage means based on a distance from the node added by the data receiving means.

また、本発明(請求項2)は、前記枝刈り手段において、
前記記憶手段に格納された前記追加ノード及び1時刻前の解ノードから最も次数の高いノードである参照ノードを選択し、前記距離計算手段を用いて、前記記憶手段の1時刻前の解ノードのペアから候補距離を計算し、該参照ノードの周辺ノードに対してその他のノードまでの距離の最大値を推定し、該最大値が該候補距離より小さければ該ノードを探索対象から除外する手段を含む。
Further, the present invention (Claim 2) provides the pruning means,
A reference node that is the highest-order node is selected from the additional node stored in the storage unit and the solution node one time ago, and the distance calculation unit is used to determine the solution node one time before the storage unit. Means for calculating a candidate distance from the pair, estimating a maximum value of a distance to other nodes with respect to a peripheral node of the reference node, and excluding the node from a search target if the maximum value is smaller than the candidate distance Including.

また、本発明(請求項3)は、前記更新手段において、
前記データ受信手段により追加されたノードにより直径が大きくなる、または、小さくなる、変化しない、のいずれかに応じて、前記記憶手段の前記解ノードのペアと直径を更新する手段を含む。
Further, according to the present invention (Claim 3), in the updating means,
Means for updating the pair of solution nodes and the diameter of the storage means in response to whether the diameter is increased, decreased or not changed by the node added by the data receiving means.

また、本発明(請求項4)は、前記更新手段において、
前記最大距離が前記憶手段に格納されている1時刻前の直径よりも大きければ、該直径を該最大距離とし、該記憶手段の解ノードペアを更新し、該最大距離が1時刻前の直径と同じ長さのノードのペアがあれば、該追加ノードからの距離を用いて該記憶手段の解ノードのペアを更新し、1時刻前の直径と同じ距離のペアがなければ、前記距離計算手段により直径を求める手段、を含む。
Moreover, this invention (Claim 4) is the update means,
If the maximum distance is larger than the diameter one hour before stored in the previous storage means, the diameter is set as the maximum distance, the solution node pair of the storage means is updated, and the maximum distance is calculated as If there is a pair of nodes having the same length, the pair of solution nodes in the storage means is updated using the distance from the additional node, and if there is no pair having the same distance as the diameter one time ago, the distance calculating means Means for determining the diameter.

また、本発明(請求項5)は、実世界に存在するものの関係をノードとエッジで表現するデータ構造を有するグラフの直径をモニタリングするためのグラフの直径のモニタリング方法であって、
受信されたノード及びノード間の距離が直径となる1時刻前の2つのノードの組である解ノードのペアと該ノード間の最大距離である直径を格納した記憶手段と、データ受信手段、ノード間の距離を求める距離計算手段、枝刈り手段、更新手段を有する装置において、
前記データ受信手段が、時刻毎に変化するノードを受信するデータ受信ステップと、
前記枝刈り手段が、前記記憶手段に格納されているノードからその他のノードまでの最大距離を前記距離計算手段により求め、直径になり得ないノードを枝刈りする枝刈りステップと、
前記更新手段が、前記記憶手段の直径となるノードのペアを、前記データ受信手段により追加されたノードからの距離に基づいて更新する更新ステップと、を行う。
The present invention (Claim 5) is a graph diameter monitoring method for monitoring the diameter of a graph having a data structure that expresses the relationship of what exists in the real world with nodes and edges,
A storage means storing a received node and a pair of solution nodes, which is a set of two nodes one hour before the distance between the nodes becomes a diameter, a diameter that is the maximum distance between the nodes, a data receiving means, and a node In a device having a distance calculation means for obtaining a distance between, a pruning means, an updating means,
A data receiving step in which the data receiving means receives a node that changes at each time; and
The pruning means obtains the maximum distance from the node stored in the storage means to other nodes by the distance calculation means, and prunes a node that cannot be a diameter;
The updating unit performs an updating step of updating a pair of nodes having a diameter of the storage unit based on a distance from the node added by the data receiving unit.

また、本発明(請求項6)は、前記枝刈りステップにおいて、
前記記憶手段に格納された前記追加ノード及び1時刻前の解ノードから最も次数の高いノードである参照ノードを選択し、前記距離計算手段を用いて、前記記憶手段の1時刻前の解ノードのペアから候補距離を計算し、該参照ノードの周辺ノードに対してその他のノードまでの距離の最大値を推定し、該最大値が該候補距離より小さければ該ノードを探索対象から除外する。
Further, the present invention (Claim 6) provides the pruning step,
A reference node that is the highest-order node is selected from the additional node stored in the storage unit and the solution node one time ago, and the distance calculation unit is used to determine the solution node one time before the storage unit. The candidate distance is calculated from the pair, the maximum value of the distance to the other nodes with respect to the peripheral node of the reference node is estimated, and if the maximum value is smaller than the candidate distance, the node is excluded from the search target.

また、本発明(請求項7)は、前記更新ステップにおいて、
前記データ受信ステップにより追加されたノードにより直径が大きくなる、または、小さくなる、変化しない、のいずれかに応じて、前記記憶手段の前記解ノードのペアと直径を更新する法。
Further, according to the present invention (Claim 7), in the updating step,
A method of updating the pair of solution nodes and the diameter of the storage means according to whether the diameter is increased, decreased, or not changed by the node added by the data receiving step.

また、本発明(請求項8)は、前記更新ステップにおいて、
前記最大距離が前記憶手段に格納されている1時刻前の直径よりも大きければ、該直径を該最大距離とし、該記憶手段の解ノードペアを更新し、該最大距離が1時刻前の直径と同じ長さのノードのペアがあれば、該追加ノードからの距離を用いて該記憶手段の解ノードのペアを更新し、1時刻前の直径と同じ距離のペアがなければ、前記距離計算手段により直径を求める。
Further, according to the present invention (Claim 8), in the updating step,
If the maximum distance is larger than the diameter one hour before stored in the previous storage means, the diameter is set as the maximum distance, the solution node pair of the storage means is updated, and the maximum distance is calculated as If there is a pair of nodes having the same length, the pair of solution nodes in the storage means is updated using the distance from the additional node, and if there is no pair having the same distance as the diameter one time ago, the distance calculating means Obtain the diameter.

また、本発明(請求項9)は、請求項1乃至4のいずれか1項に記載のグラフの直径モニタリング装置を構成する各手段としてコンピュータを機能させるためのプログラムである。   Moreover, this invention (Claim 9) is a program for functioning a computer as each means which comprises the diameter monitoring apparatus of the graph of any one of Claim 1 thru | or 4.

上記のように、従来の技術は大規模なグラフの解析には実用的ではなかったが、本発明によれば、大幅に高速に直径を求めることができる。グラフの近似は元のグラフが時々刻々と成長しても効率的に計算することができる。   As described above, the conventional technique is not practical for analyzing a large-scale graph, but according to the present invention, the diameter can be obtained at a significantly high speed. The graph approximation can be calculated efficiently even if the original graph grows from moment to moment.

また、本発明によれば、近似よって解になり得ないノードを枝刈りするが、得られる解は正確である。   Further, according to the present invention, nodes that cannot be solved by approximation are pruned, but the obtained solution is accurate.

また、本発明によれば、自動的に必要となるパラメータを決定するため、ユーザはパラメータ調整する必要がない。   In addition, according to the present invention, since the necessary parameter is automatically determined, the user does not need to adjust the parameter.

本発明の一実施の形態におけるモニタリング装置の構成図である。It is a block diagram of the monitoring apparatus in one embodiment of this invention. 本発明の一実施の形態における参照ノードの枝刈りのアルゴリズムである。3 is an algorithm for pruning a reference node according to an embodiment of the present invention. グラフの直径の変化である。It is a change in the diameter of the graph. 本発明の一実施の形態における逐次的更新のアルゴリズムである。It is an algorithm of the sequential update in one embodiment of this invention.

以下図面と共に、本発明の実施の形態を説明する。   Embodiments of the present invention will be described below with reference to the drawings.

本実施の形態では、以下の問題を対象とする。   In the present embodiment, the following problems are targeted.

<問題>
グラフにおける直径を求める:
Given:時刻tにおける重みなし無向グラフG[t] = (V,E):
Find: G[t]における直径の値とそれを与えるノードのペア:
なお、ここで、VとEはそれぞれノードとエッジの集合とする。この問題は重みなし無向グラフを対象とするが、本発明は重みありグラフに対しても有向グラフに対しても適用することができる。
<Problem>
Find the diameter in the graph:
Given: Unweighted undirected graph G [t] at time t = (V, E):
Find: G [t] diameter value and the node pair that gives it:
Here, V and E are a set of nodes and edges, respectively. Although this problem is directed to unweighted undirected graphs, the present invention can be applied to both weighted and directed graphs.

また、本発明はノードの追加のみでなく、エッジの追加に対してもノード/エッジの削除に対しても適用することができる。   The present invention can be applied not only to the addition of nodes but also to the addition of edges and the deletion of nodes / edges.

図1は、本発明の一実施の形態におけるモニタリング装置の構成を示す。   FIG. 1 shows a configuration of a monitoring apparatus according to an embodiment of the present invention.

同図に示すモニタリング装置は、データ受信部10、距離計算部20、データ記憶部30、検出部40から構成される。   The monitoring apparatus shown in FIG. 1 includes a data receiving unit 10, a distance calculating unit 20, a data storage unit 30, and a detecting unit 40.

データ受信部10は、時刻毎に変化するノードを受信し、距離計算部20及びデータ記憶部30に転送する。距離計算部20は、ノード間の距離を計算する。データ記憶部30は、データ受信部10から入力された追加ノード、及び、グラフ(ノード間の最大距離である直径)と1時刻前の解ノードのペアを格納する。検出部40は、参照ノードの選択、及びグラフにおいて直径を計算する。   The data receiving unit 10 receives a node that changes at each time and transfers it to the distance calculation unit 20 and the data storage unit 30. The distance calculation unit 20 calculates a distance between nodes. The data storage unit 30 stores an additional node input from the data receiving unit 10 and a pair of a graph (a diameter that is the maximum distance between the nodes) and a solution node one hour before. The detection unit 40 selects a reference node and calculates a diameter in the graph.

まず、本明細書で用いる記号を定義し、必要となる背景知識を説明する。   First, symbols used in this specification are defined and necessary background knowledge is explained.

実世界のネットワークはグラフG = (V,E)として表現することができる。ここで、Vはノードの集合とし、Eはエッジの集合とする。また、nとmはそれぞれノードとエッジの数とする。すなわち、n=|V|であり、m=|E|である。   Real-world networks can be expressed as graph G = (V, E). Here, V is a set of nodes, and E is a set of edges. N and m are the numbers of nodes and edges, respectively. That is, n = | V | and m = | E |.

「ノードuからノードvまでのパス」とは、ノードuから始まりノードvで終わるエッジの並びである。パスの中に含まれるノードが最も少ないものは「最短パス」と呼ばれる。ノードuとノードvの距離は最短パスに含まれるエッジ数の合計であり、
エッジ数の合計=d(u,v)
と定義される。定義からノードu∈Vに対してd(u,u)=0であり、ノードu,v∈Vに対して、d(u,v)=d(v,u)となる。
The “path from the node u to the node v” is a sequence of edges starting from the node u and ending at the node v. The path with the fewest nodes is called the “shortest path”. The distance between node u and node v is the total number of edges included in the shortest path,
Total number of edges = d (u, v)
Is defined. From the definition, d (u, u) = 0 for the node u∈V, and d (u, v) = d (v, u) for the node u, v∈V.

グラフの直径は以下のようにノード間の最大の距離として定義される。   The diameter of the graph is defined as the maximum distance between nodes as follows:

[定義1](直径)
グラフG = (V,E)において、ノード間の最大の距離をmax(d(u,v)|u,v∈V)としたとき、直径Dは以下のように定義される。
[Definition 1] (Diameter)
In the graph G = (V, E), when the maximum distance between nodes is max (d (u, v) | u, vεV), the diameter D is defined as follows.

D=max(d(u,v)|u,v∈V) (1)
本発明は、グラフの直径のみでなく、直径となるノードのペアの集合Dも計算する。Dは定式的に以下のように定義される。
D = max (d (u, v) | u, v∈V) (1)
The present invention calculates not only the diameter of the graph, but also the set D of pairs of nodes that will be the diameter. D is defined as follows:

[定義2](解ノードのペア)
ノード間の距離が直径となるノードのペアDは以下のように定義される。
[Definition 2] (pair of solution nodes)
A pair D of nodes whose diameter is a distance between nodes is defined as follows.

D={(u,v)|d(u,v)=D} (2)
正確にグラフの直径を計算するには、従来は幅優先探索が用いられていた。幅優先探索は、グラフの探索において広く使われている手法である。幅優先探索はグラフG = (V,E)が与えられたときに始点ノードuから到達可能な周辺のノードを辿りながら徐々に距離を計算していく。ノードuの中心性を計算するために既存の手法では、幅優先探索を用いてノードuからその他全てのノードまでの距離を計算し、距離の合計を計算する。
D = {(u, v) | d (u, v) = D} (2)
Conventionally, breadth-first search has been used to accurately calculate the diameter of the graph. Breadth-first search is a technique widely used in graph search. In the breadth-first search, when a graph G = (V, E) is given, the distance is gradually calculated while following the surrounding nodes that can be reached from the starting node u. In the existing method for calculating the centrality of the node u, the distance from the node u to all other nodes is calculated using a breadth-first search, and the sum of the distances is calculated.

幅優先探索を用いて直径を計算するためにはO(n2+nm)の計算量が必要となる。これは全てのn個のノードに対してO(n+m)の計算量が必要になる幅優先探索を行うからである。そのためグラフが大規模になるとこの処理には莫大な計算量が必要となる。また、時々刻々と成長するグラフに対してはグラフが成長するためにこの処理を繰り返すこととなるために、幅優先探索により直径をノードから求めるのは現実的ではない。 In order to calculate the diameter using the breadth-first search, a calculation amount of O (n 2 + nm) is required. This is because a breadth-first search that requires a calculation amount of O (n + m) for all n nodes is performed. Therefore, when the graph becomes large, this processing requires a huge amount of calculation. Further, since this process is repeated for a graph that grows from moment to moment, because the graph grows, it is not realistic to obtain the diameter from the node by the breadth-first search.

これに対し、本発明は、検出部40において、「参照ノードによる枝刈り」と、「逐次的更新」を行う。   In contrast, according to the present invention, the detection unit 40 performs “pruning by reference nodes” and “sequential update”.

(A)参照ノードによる枝刈り:
この手法は、検出部40において、高い計算時間を減らすために直径になりえないノードを高速に枝刈りするものである。
(A) Pruning by reference node:
In this method, the detection unit 40 prunes a node that cannot be a diameter at high speed in order to reduce high calculation time.

従来手法では、n個のノード全てから幅優先探索を行うため非常に高い計算コストになる。   In the conventional method, since the breadth-first search is performed from all n nodes, the calculation cost is very high.

本発明では、全てのノードから距離を計算する代わりに、枝刈りされていないノードの中で最も次数の高いノード(以下、「参照ノード」と記す)を選択し、当該参照ノードからのみ距離を計算するというシンプルなものである。   In the present invention, instead of calculating the distance from all the nodes, the node of the highest degree (hereinafter referred to as “reference node”) is selected from the nodes that are not pruned, and the distance from only the reference node is selected. It is as simple as calculating.

検出部40は、一つ一つ参照ノードを選択し、参照ノードからその他の枝刈り対象のノード間の距離に基づいて、その周辺のノードが解ノードのペアとなり得るかを推定する。すなわち、参照ノードによってその周辺のノードの枝刈りを行う。それぞれの周辺のノードに対して推定はO(1)の計算時間で行うことができる。そのため参照ノードの個数をk(k≪n)としたとき、O(kn + km)の計算時間で直径を求めることができる。   The detection unit 40 selects reference nodes one by one, and estimates whether surrounding nodes can be a pair of solution nodes based on the distance between the reference node and other nodes to be pruned. That is, pruning of the surrounding nodes is performed by the reference node. The estimation for each neighboring node can be performed in the calculation time of O (1). Therefore, when the number of reference nodes is k (k << n), the diameter can be obtained with a calculation time of O (kn + km).

この手法は、2つの利点を有する。1つは、参照ノードからの距離が近い周辺のノードを推定値によって枝刈りするが、正確に直径を求められることがあげられる。すなわち、この手法は少ない計算時間で解になり得ないノードを安全に枝刈りできる。また、参照ノードの個数kは自動的に決定される。一般的にアルゴリズムのパラメータはその性能に大きく影響するためその決定は煩雑であるが、本発明は、パラメータを自動的に決定するためユーザに対してパラメータの決定を求めない。   This approach has two advantages. One is that a nearby node that is close to the reference node is pruned by an estimated value, but the diameter can be accurately obtained. In other words, this method can safely prun a node that cannot be solved in a short calculation time. Further, the number k of reference nodes is automatically determined. In general, algorithm parameters greatly affect the performance of the algorithm, and the determination thereof is complicated. However, the present invention automatically determines the parameters and does not require the user to determine the parameters.

(B)逐次的更新:
当該逐次的更新とは、時々刻々と成長するグラフにノードが追加された後、直径は大きくなるか、縮むか、変化しない、のいずれかである。ノードが追加された後に、直径を効率的に更新する処理であり、検出部40で行われる。
(B) Sequential update:
The sequential update is one in which the diameter increases, shrinks, or does not change after nodes are added to the graph that grows from moment to moment. This is a process for efficiently updating the diameter after the node is added, and is performed by the detection unit 40.

参照ノードによる枝刈りによって高速に直径を求めることができるが、グラフが成長する場合はその度に参照ノードによる再計算が必要になる。本手法は、グラフが成長する度に参照ノードによる枝刈りを避けるためのものである。後に述べるように、もし直径がノードの追加によって縮まなければ、直径は追加されたノードからの距離だけで更新することができる。   Although the diameter can be obtained at high speed by pruning with the reference node, recalculation with the reference node is required each time the graph grows. This method is to avoid pruning by the reference node every time the graph grows. As will be discussed later, if the diameter does not shrink with the addition of a node, the diameter can be updated only with the distance from the added node.

この手法は特に時々刻々と成長するグラフに対して有効である。それは追加されるノードは元々存在するノードに比べて少ないため、追加の前後で大きくグラフは変化しないためである。   This method is especially effective for graphs that grow from moment to moment. This is because the number of added nodes is smaller than that of the existing nodes, and the graph does not change greatly before and after the addition.

上記の(A)の参照ノードによる枝刈りと(B)の逐次的更新について、以下に説明する。   The pruning by the reference node (A) and the sequential update (B) will be described below.

まず、上記の(A)の手法を詳細に説明する。   First, the method (A) will be described in detail.

上記の(A)の手法は、参照ノードを選択し、直径になり得ないノードを枝刈り(探索対象から除外)するものである。   In the method (A), a reference node is selected, and a node that cannot be a diameter is pruned (excluded from the search target).

参照ノードによる枝刈りは以下のように行う。   Pruning by the reference node is performed as follows.

(1)距離計算部20は、参照ノードからその他のノードまでの距離が長くなることが期待される候補距離を計算し、検出部40に出力する。   (1) The distance calculation unit 20 calculates a candidate distance that is expected to increase the distance from the reference node to another node, and outputs the candidate distance to the detection unit 40.

(2)検出部40は、その他のノードまでの距離が短くなることが期待される参照ノードを選択する。   (2) The detection unit 40 selects a reference node that is expected to have a shorter distance to other nodes.

(3)検出部40は、データ記憶部30に格納されている参照ノードの周辺ノードに対して、その他のノードまでの距離の最大値を推定する。   (3) The detection unit 40 estimates the maximum value of the distance to other nodes with respect to the peripheral nodes of the reference node stored in the data storage unit 30.

(4)検出部40は、推定された最大値が候補距離より小さければそのノードを枝刈りする。   (4) If the estimated maximum value is smaller than the candidate distance, the detection unit 40 prunes the node.

ここでは、まずノードに対して最大の距離を推定する方法について述べ、その推定値が最大の距離の上限値となることを示す。そして、検出部40において参照ノードを選択する方法と距離計算部20において候補距離を求める方法について述べる。   Here, a method for estimating the maximum distance with respect to the node will be described first, and it will be shown that the estimated value becomes the upper limit value of the maximum distance. A method for selecting a reference node in the detection unit 40 and a method for obtaining a candidate distance in the distance calculation unit 20 will be described.

定式的に、グラフのある1つのノードuからデータ記憶部30内に格納されている他のノードまでの距離の最大値を以下のように定義する。   Formally, the maximum value of the distance from one node u in the graph to another node stored in the data storage unit 30 is defined as follows.

[定義3](最大距離)
グラフGにおいてその他のノードまでの距離の最大値dmax(u)、を以下のように定義する。
[Definition 3] (Maximum distance)
The maximum value d max (u) of the distance to other nodes in the graph G is defined as follows.

dmax(u) = max(d(u,v)|v∈V) (3)
最大距離の推定値は以下のように定義する。
d max (u) = max (d (u, v) | v∈V) (3)
The estimated maximum distance is defined as follows:

[定義4](推定値)
グラフGのvノードに対して参照ノードをurとしたとき、最大距離の推定値
[Definition 4] (estimated value)
When the reference node with respect to v nodes of the graph G has a u r, estimate the maximum distance

Figure 0005340232
を以下のように定義する。
Figure 0005340232
Is defined as follows.

Figure 0005340232
推定値は以下に述べるように、距離の最大値の上限値となる性質がある。
Figure 0005340232
As described below, the estimated value has a property of being an upper limit value of the maximum distance value.

[補助定理1](上限値)
グラフGの全てのノードに対して以下の性質が成り立つ。
[Lemma 1] (Upper limit)
The following properties hold for all nodes in graph G.

Figure 0005340232
証明)
ノードvからの距離がdmax (v)であるノードをwとすると以下の式が成り立つ。
Figure 0005340232
Proof)
When a node whose distance from the node v is d max (v) is w, the following equation is established.

Figure 0005340232
よって成り立つ。
Figure 0005340232
Therefore it holds.

本発明は後述するように、距離計算部20は、この性質を用いて正確な直径を求めることができる。   As will be described later, the distance calculation unit 20 can obtain an accurate diameter using this property.

もし、推定値が候補距離より短ければ、そのノードを枝刈りする。上記の定義4に見られるように、推定値はO(1)の計算時間で求めることができるため、効率的に直径を計算することができる。   If the estimated value is shorter than the candidate distance, the node is pruned. As can be seen from definition 4 above, the estimated value can be calculated by the calculation time of O (1), and thus the diameter can be calculated efficiently.

もし、参照ノードの最大距離が長く、また、候補距離が短ければ効率的に枝刈りすることができない。そのため、効果的に枝刈りを行うためには参照ノードと候補距離の選択が重要である。本発明では、データ記憶部30内の全てのノードのうち直径になる可能性のある枝刈りされていないノードの中で最も次数の高いノードを参照ノードとして選択する。これはそのようなノードの最大距離が小さいことが期待されるからである。   If the maximum distance of the reference node is long and the candidate distance is short, the pruning cannot be efficiently performed. Therefore, the selection of the reference node and the candidate distance is important for effective pruning. In the present invention, the node with the highest degree is selected as the reference node among the unpruned nodes that may be the diameter among all the nodes in the data storage unit 30. This is because the maximum distance of such nodes is expected to be small.

また、本発明では1時刻前の解ノードのペアから候補距離を計算する。これはノードが追加されてもグラフはほとんど変化しないため、これらのノードのペアは長い距離となることが期待されるからである。   In the present invention, a candidate distance is calculated from a pair of solution nodes one hour before. This is because the pair of nodes is expected to be a long distance because the graph hardly changes even when nodes are added.

図2のアルゴリズム1に、参照ノードによる枝刈りの手法を示す。   Algorithm 1 in FIG. 2 shows a pruning technique using reference nodes.

ここで、ノードuの次数をdeg(u)とする。アルゴリズム1では、
1)データ記憶部30のまず1時刻前の解のペアを用いて候補距離を計算する(1行目)。
Here, the degree of the node u is deg (u). In algorithm 1,
1) First, the candidate distance is calculated using the solution pair one hour before in the data storage unit 30 (first line).

2)そして次数に基づいて参照ノードを求める(5行目)。   2) Then, a reference node is obtained based on the degree (line 5).

3)もし参照ノードの最大距離が候補距離以上であれば、解ノードのペアを更新する(7〜13行目)。   3) If the maximum distance of the reference node is greater than or equal to the candidate distance, the solution node pair is updated (lines 7-13).

4)アルゴリズムは候補距離の枝刈りのために用いる。すなわち、もしあるノードにおける推定値が候補距離より小さければ、そのノードを枝刈りする(15行目)。   4) The algorithm is used for pruning candidate distances. That is, if the estimated value at a certain node is smaller than the candidate distance, the node is pruned (line 15).

これらの処理は全てのノードが処理されるまで繰り返される。このアルゴリズムにおいて参照ノードの数は自動的に決定される。   These processes are repeated until all nodes are processed. In this algorithm, the number of reference nodes is automatically determined.

次に、上記(B)の逐次的更新の手法について説明する。   Next, the sequential updating method (B) will be described.

当該手法は、検出部40において、直径を高速に検出するために解ノードのペアを逐次的に更新するものである。参照ノードによる枝刈りをグラフが成長する度に行う必要がなくなるため、より効率的な検出が可能になる。   In this method, the detection unit 40 sequentially updates solution node pairs in order to detect the diameter at high speed. Since there is no need to perform pruning by the reference node every time the graph grows, more efficient detection is possible.

まず、グラフが成長した後のノード間の距離の性質について述べる。そして、直径の(1)大きくなる、(2)縮む、(3)変化しない、必要充分条件を明らかにする。   First, the nature of the distance between nodes after the graph has grown is described. Then, the necessary and sufficient conditions of (1) increase in diameter, (2) shrink, (3) no change are clarified.

ここでは、1時刻毎にデータ記憶部30にノードuaが新たに加わるとする。 Here, it is assumed that a node u a is newly added to the data storage unit 30 every hour.

まず、ノードが追加された後は追加前に存在するノード間の距離は増えることが無いことを示す。   First, after a node is added, it shows that the distance between the nodes which exist before adding does not increase.

[補助定理2](ノード追加後のノード間の距離)
時刻tにおけるノード間の距離は時刻t−1におけるグラフGt-1におけるノード間の距離より長くなることはない。
[Lemma 2] (Distance between nodes after node addition)
The distance between nodes at time t is not longer than the distance between nodes at graph G t-1 at time t-1.

証明)もし時刻tにおけるノードuとvの最短パスが追加ノードを通るとすると、時刻t−1においてそれに対応するパスは存在しない。すなわち、時刻t−1における最短パスは追加ノードによって短くなる。そうでなければ時刻tにおいて追加ノードを通らないノードuとvの最短パスが存在する。すなわち、時刻t−1においても同じパスが存在する。結果ノードuとvの距離はノードの追加によって長くなることはない。   (Proof) If the shortest paths of nodes u and v at time t pass through the additional node, there is no corresponding path at time t-1. That is, the shortest path at time t−1 is shortened by the additional node. Otherwise, there is a shortest path between nodes u and v that does not pass through the additional node at time t. That is, the same path exists at time t-1. As a result, the distance between nodes u and v is not increased by the addition of nodes.

ノードが追加された後直径は変化するが、上記の性質を用いてグラフの直径が変化する条件を明らかにする。グラフの直径が変化する例を図3に示す。図3において、元から存在するノードは白い丸、新たに追加したノードは灰色の丸として表現する。   Although the diameter changes after the node is added, the above property is used to clarify the condition that the diameter of the graph changes. An example in which the diameter of the graph changes is shown in FIG. In FIG. 3, the original existing node is expressed as a white circle, and the newly added node is expressed as a gray circle.

まず、グラフが大きくなる条件を述べる。   First, conditions for increasing the graph will be described.

グラフが大きくなる必要充分条件は、追加したノードの最大距離が1時刻前の直径よりも大きいことである。   A necessary and sufficient condition for the graph to be large is that the maximum distance of the added node is larger than the diameter one hour before.

[補助定理3](直径が大きくなる必要十分条件)
グラフの直径が大きくなる必要十分条件は以下のとおりである。
[Auxiliary Theorem 3] (Necessary and sufficient condition for increasing diameter)
Necessary and sufficient conditions for increasing the diameter of the graph are as follows.

d max (ua )> Dt-1 (7)
証明)もし、Dt > Dt-1であれば補助定理2より元から存在する全てのノードの最大距離はD t-1より長くなることはないため、ノードuaの最大距離が直径となる。また、もし、dmax (ua) > Dt-1であれば明らかにdmax (ua) = Dtであり、Dt > Dt-1が成り立つ。
d max (u a )> D t-1 (7)
(Proof) If D t > D t−1 , the maximum distance of all existing nodes cannot be longer than D t−1 by Lemma 2, so the maximum distance of node u a is Become. Also, if d max (u a )> D t−1 , obviously d max (u a ) = D t and D t > D t−1 holds.

グラフの直径が縮むことの必要十分条件は、追加ノードの最大距離が1時刻前の直径より短くかつノードの追加によって1時刻前の全ての解ノードのペアの距離が短くなることである。   The necessary and sufficient condition for the diameter of the graph to shrink is that the maximum distance of the additional node is shorter than the diameter one hour before, and the addition of the node shortens the distances of all solution node pairs one hour before.

[補助定理4](直径が縮む必要十分条件)
グラフの直径が縮むことの必要十分条件は以下のとおりである。
[Auxiliary Theorem 4] (Necessary and sufficient condition for diameter reduction)
Necessary and sufficient conditions for reducing the diameter of the graph are as follows.

Figure 0005340232
証明)もし、Dt < Dt-1であれば、定義2よりdmax (ua)< Dt-1でありかつ1時刻前の全ての解ノードのペアの距離がDt-1より短くなる。またもし式(1)と式(2)が成り立つのであれば定義2と補助定理2よりグラフの直径は時刻tで短くなる。
Figure 0005340232
Proof) If D t <D t-1 , then d max (u a ) <D t-1 from definition 2 and the distances of all solution node pairs one hour before are from D t-1 Shorter. If Equations (1) and (2) hold, the diameter of the graph becomes shorter at time t from Definition 2 and Lemma 2.

グラフの直径が変化しないことの必要十分条件は追加ノードの最大距離が1時刻前の直径と同じまたはノードの追加によって距離が縮まない1時刻前の解ノードのペアが存在することである。   A necessary and sufficient condition that the diameter of the graph does not change is that there is a pair of solution nodes one hour before that the maximum distance of the additional node is the same as the diameter one hour before or the distance is not reduced by adding a node.

[補助定理5](直径が変化しない必要十分条件)
グラフの直径が変化しないことの必要十分条件は以下のとおりである。
[Auxiliary Theorem 5] (Necessary and sufficient condition that the diameter does not change)
The necessary and sufficient conditions for the diameter of the graph not to change are as follows.

Figure 0005340232
証明)補助定理3と4より明らか。
Figure 0005340232
Proof) It is clear from Lemma 3 and 4.

逐次的に解ノードのペアを更新することにより効率的に直径を検出できる。まず、1時刻前の解ノードのペアの距離が短くなるのかの確認は追加ノードからの距離を用いて可能であることを示し、逐次的更新を用いた本発明の詳細について述べる。   The diameter can be detected efficiently by sequentially updating the solution node pairs. First, it is shown that confirmation of whether the distance of the pair of solution nodes one hour before becomes shorter using the distance from the additional node, and details of the present invention using sequential update will be described.

解ノードのペアを更新するため、本発明では、最短パスにおける以下の性質(例えば、文献「Ulrik Brandes, A Faster Algorithm for Betweenness Centrality, Journal of Mathematical Sociology, 2001」を用いる。   In order to update the pair of solution nodes, the present invention uses the following properties in the shortest path (for example, “Ulrik Brandes, A Faster Algorithm for Betweenness Centrality, Journal of Mathematical Sociology, 2001”).

[補助定理6](Bellman criterion)
ノードuがノードvとwの最短パス上にあることの必要十分条件は以下のとおりである。
[Auxiliary Theorem 6] (Bellman criterion)
The necessary and sufficient condition that the node u is on the shortest path between the nodes v and w is as follows.

d(u,v) + d(u,w) = d(v,w) (10)
定理6を用いてノードの追加によって1時刻前の解ノードのペアの距離が短くなるのかの確認ができる。
d (u, v) + d (u, w) = d (v, w) (10)
Theorem 6 can be used to confirm whether adding a node shortens the distance between solution node pairs one hour before.

[補助定理7](距離の確認)
時々刻々と成長するグラフにおいてノードuaが1時刻前の解ノードのペア(v,w)の距離を縮めることの必要十分条件は以下のとおりである。
[Auxiliary Theorem 7] (Confirmation of distance)
Necessary and sufficient conditions for the node ua to shorten the distance of the solution node pair (v, w) one hour before in the graph that grows momentarily are as follows.

d(v,ua) + d(w,ua) < Dt-1 (11)
証明)もし、ノードuaが距離を縮めるのであればノードuaはノードvとwの最短パス上にある。そのため補助定理6より
Dt-1 > d(v,w)=d(ua,v) + d(ua,w)
が成り立つ。
d (v, u a ) + d (w, u a ) <D t-1 (11)
Proof) If the node u a long as it reduce the distance node u a is the shortest path on the node v and w. Therefore, from Lemma 6
D t-1 > d (v, w) = d (u a , v) + d (u a , w)
Holds.

また、もし、
d(v,ua) + (d(w,ua) < Dt-1
であれば、追加ノードua
Dt-1 > d(ua,v) + d(uaw) ≧ d(v,w)
が成り立つため距離を縮める。
Also, if
d (v, u a ) + (d (w, u a ) <D t-1
Then the additional node u a
D t-1 > d (u a , v) + d (u a w) ≥ d (v, w)
Since this holds, reduce the distance.

定理7より、もしグラフの直径が大きくなるか変わらない場合は解ノードのペアを追加ノードの距離から逐次的に更新することができる。すなわち、検出部40は、もし追加ノードが直径となるのであれば追加ノードからの距離を用いて解ノードのペアを更新する。また、もし追加ノードが1時間前の解ノードのペアの距離を縮めるのであれば、そのことを補助定理7を用いて効率的に求める。また、もし1時刻前の直径と同じ長さのノードのペアがなければ距離計算部20において参照ノードによる枝刈りを用いて直径を求める。   According to Theorem 7, if the diameter of the graph increases or does not change, the solution node pairs can be updated sequentially from the distance of the additional nodes. That is, if the additional node has a diameter, the detection unit 40 updates the solution node pair using the distance from the additional node. Also, if the additional node shortens the distance of the pair of solution nodes one hour ago, this is efficiently obtained using the lemma 7. If there is no pair of nodes having the same length as the diameter one hour before, the distance calculation unit 20 obtains the diameter using pruning by the reference node.

図4に、逐次的更新のアルゴリズムを示す。   FIG. 4 shows a sequential update algorithm.

(1)まず、追加したノードの最大距離を求める(1行目)。   (1) First, the maximum distance of the added node is obtained (first line).

(2)もしその最大距離が、データ記憶部30に格納されている1時刻前の直径より大きければそれが新しい直径になるため(補助定理3)、直径と解ノードのペアを初期化してデータ記憶部30に書き込む(3〜5行目)。   (2) If the maximum distance is larger than the diameter of the previous time stored in the data storage unit 30, it becomes the new diameter (Lemma Theorem 3). Write to the storage unit 30 (3rd to 5th lines).

(3)もし、求めた最大距離が1時刻前の直径と同じかまたは1時刻前の直径と同じ長さのノードのペアがあればノードが追加されても直径は変わらない(補助定理5)。そのため、当該手法では、追加ノードからの距離を用いて解ノードのペアを更新し、データ記憶部30に書き込む。   (3) If there is a pair of nodes whose maximum distance is the same as the diameter one hour ago or the same length as the diameter one hour ago, the diameter will not change even if a node is added (Lemma Theorem 5) . Therefore, in this method, the solution node pair is updated using the distance from the additional node, and is written in the data storage unit 30.

(4)また、もし1時刻前の直径と同じ距離のノードのペアがなければ直径は縮むため(補助定理4)、距離計算部20にて、前述の図2のアルゴリズム1によって直径を求める(15〜17行目)。   (4) Also, if there is no pair of nodes with the same distance as the diameter one hour before, the diameter shrinks (Auxiliary Theorem 4), and the distance is calculated by the algorithm 1 of FIG. 15th to 17th lines).

ノードの数を増やしながらグラフは成長していくが、簡単のため時刻t=1においてノードは一つあるとする。そのため時刻t=1において、Dt-1=0でありDt-1≠0である。 The graph grows while increasing the number of nodes, but it is assumed that there is one node at time t = 1 for simplicity. Therefore, at time t = 1, D t−1 = 0 and D t−1 ≠ 0.

今まで一つのノードが追加されることを前提に議論を進めてきたが、本発明は複数のノードが追加されても対応することができる。また、もしエッジが追加されたらそのエッジに接続されたノードが追加されたものとして処理を行う。また、ノード/エッジが削除された場合は図2のアルゴリズム1によって直径を求める。   The discussion has been made on the assumption that one node is added so far, but the present invention can cope with the case where a plurality of nodes are added. If an edge is added, processing is performed assuming that a node connected to the edge is added. When the node / edge is deleted, the diameter is obtained by the algorithm 1 in FIG.

次に、本発明が正確に直径を検出できることと、その計算量を示す。   Next, the fact that the present invention can accurately detect the diameter and the amount of calculation will be shown.

なお、参照ノードの数kとする。   Note that the number of reference nodes is k.

[1] 直径検出の正確さ
まず、本発明により正確に直径を検出できることを示す。
[1] Accuracy of diameter detection First, it will be shown that the present invention can accurately detect the diameter.

[補助定理8](正確な検出)
本発明は正確に直径を検出できる。
[Lemma Theorem 8] (accurate detection)
The present invention can accurately detect the diameter.

証明)時刻t(≧1)で本発明が正確な検出を行うことができることを数学的帰納法を用いて証明する。   Proof) It is proved by mathematical induction that the present invention can perform accurate detection at time t (≧ 1).

まず、時刻t=1で正確な検出を行えることを示す。時刻t=1で正確な検出を行えることを示す。時刻t=1において、本発明はD=0でD=(u,u)であることを
(1)Dt-1=0でDt-1≠0であり、
(2)dmax (u)=0であるため求めることができる(図4のアルゴリズム2の8〜12行目参照)。
First, it is shown that accurate detection can be performed at time t = 1. It shows that accurate detection can be performed at time t = 1. At time t = 1, the present invention indicates that D 1 = 0 and D 1 = (u 1 , u 1 ) (1) D t−1 = 0 and D t−1 ≠ 0,
(2) Since d max (u 1 ) = 0, it can be obtained (see the 8th to 12th lines of algorithm 2 in FIG. 4).

また、時刻t=kにおいて正確な検出が行えるとした場合、時刻t=k+1でも正確な検出が行えることを示す。もし時刻t=k+1で直径が縮まなければ補助定理7を用いて、本発明は正確な検出を行うことができる。また、もしそうでなければ本発明は参照ノードによる枝刈りにより直径を求める。ここで推定値が候補距離より小さければノードが枝刈りされるが、推定値は上限値になる性質がある(補助定理1)。そのため、直径となるノードが枝刈りされることはあり得ない。よって成り立つ。   In addition, when accurate detection can be performed at time t = k, it indicates that accurate detection can also be performed at time t = k + 1. If the diameter does not shrink at time t = k + 1, the present invention can perform accurate detection using Lemma 7. Otherwise, the present invention determines the diameter by pruning with a reference node. Here, if the estimated value is smaller than the candidate distance, the node is pruned, but the estimated value has an upper limit value (Auxiliary Theorem 1). For this reason, a node having a diameter cannot be pruned. Therefore it holds.

[2]計算量
ここではまず従来手法の計算量について述べてから、本発明の計算量について述べる。
[2] Calculation Volume Here, the calculation volume of the conventional method is described first, and then the calculation volume of the present invention is described.

[補助定理9](従来手法)
従来手法で直径を求めるにはO(n+m)のメモリ量とO(n2+nm)の計算時間が必要である。
[Auxiliary Theorem 9] (conventional method)
In order to obtain the diameter by the conventional method, a memory amount of O (n + m) and a calculation time of O (n 2 + nm) are required.

証明)従来手法では隣接リスト表現でグラフを保持するためO(n+m)のメモリ量が必要である。また、n個の全てのノードから距離をそれぞれO(n+m)の計算時間が必要である。   Proof) The conventional method requires a memory amount of O (n + m) in order to maintain the graph in the neighbor list representation. In addition, a calculation time of O (n + m) is required for each of the distances from all n nodes.

[補助定理10](本発明のメモリ量)
本発明は、O(n+m)のメモリ量が必要である。
[Auxiliary Theorem 10] (memory capacity of the present invention)
The present invention requires a memory amount of O (n + m).

証明)本発明はグラフを保持するメモリ量と解ノードのペアを保持するメモリ量が必要であるが、解ノードのペアの数はノード/エッジ数に比例して非常に小さい。そのため、本発明は、O(n+m)のメモリ量が必要である。   Proof) The present invention requires a memory amount for holding a graph and a memory amount for holding a pair of solution nodes, but the number of solution node pairs is very small in proportion to the number of nodes / edges. Therefore, the present invention requires a memory amount of O (n + m).

[補助定理11](本発明の計算時間)
本発明においては直径が縮まない場合O(n+m)の計算時間が必要であり、直径が縮む場合O(kn+km)の計算時間が必要である。
[Auxiliary Theorem 11] (Calculation time of the present invention)
In the present invention, a calculation time of O (n + m) is necessary when the diameter does not shrink, and a calculation time of O (kn + km) is necessary when the diameter shrinks.

証明)本発明はまず追加されたノードから距離を計算し、直径が縮むかの確認を行う。このために必要な計算時間はO(n+m)である。もし直径が縮む場合、本発明は参照ノードによる枝刈りによって直径を求めるがこの場合の計算時間はO(km+km)である。   Proof) The present invention first calculates the distance from the added node and checks whether the diameter is reduced. The calculation time required for this is O (n + m). If the diameter shrinks, the present invention finds the diameter by pruning with a reference node, but the computation time in this case is O (km + km).

なお、本発明は、図1に示すモニタリング装置の構成要素の動作をプログラムとして構築し、モニタリング装置として利用されるコンピュータにインストールして実行させる、または、ネットワークを介して流通させることが可能である。   In the present invention, the operation of the components of the monitoring apparatus shown in FIG. 1 can be constructed as a program, installed in a computer used as the monitoring apparatus and executed, or distributed via a network. .

また、構築されたプログラムをハードディスクやフレキシブルディスク、CD−ROM等の可搬記憶媒体に格納し、コンピュータにインストールする、または、配布することが可能である。   Further, the constructed program can be stored in a portable storage medium such as a hard disk, a flexible disk, or a CD-ROM, and can be installed or distributed in a computer.

なお、本発明は、上記の実施の形態に限定されることなく、特許請求の範囲内において種々変更・応用が可能である。   The present invention is not limited to the above-described embodiment, and various modifications and applications can be made within the scope of the claims.

10 データ受信部
20 距離計算部
30 データ記憶部
40 検出部
DESCRIPTION OF SYMBOLS 10 Data receiving part 20 Distance calculation part 30 Data storage part 40 Detection part

Claims (9)

実世界に存在するものの関係をノードとエッジで表現するデータ構造を有するグラフの直径をモニタリングするためのグラフの直径のモニタリング装置であって、
時刻毎に変化するノードを受信するデータ受信手段と、
受信したノード(追加ノード)及び、ノード間の距離が直径となる1時刻前の2つのノードの組である解ノードのペアと該ノード間の最大距離である直径を格納した記憶手段と、
ノード間の距離を計算する距離計算手段と、
前記記憶手段に格納されているノードからその他のノードまでの最大距離を前記距離計算手段により求め、直径になり得ないノードを枝刈りする枝刈り手段と、
前記記憶手段の直径となるノードのペアを、前記データ受信手段により追加されたノードからの距離に基づいて更新する更新手段と、
を有することを特徴とするグラフの直径のモニタリング装置。
A graph diameter monitoring device for monitoring the diameter of a graph having a data structure that expresses the relationship of what exists in the real world with nodes and edges,
Data receiving means for receiving nodes that change at each time;
A storage unit storing a received node (additional node), a pair of solution nodes, which is a set of two nodes one hour before the distance between the nodes becomes a diameter, and a diameter that is the maximum distance between the nodes;
A distance calculating means for calculating a distance between nodes;
A pruning means for obtaining a maximum distance from the node stored in the storage means to another node by the distance calculation means, and pruning a node that cannot be a diameter;
Updating means for updating a pair of nodes as a diameter of the storage means based on a distance from the node added by the data receiving means;
An apparatus for monitoring the diameter of a graph, comprising:
前記枝刈り手段は、
前記記憶手段に格納された前記追加ノード及び1時刻前の解ノードから最も次数の高いノードである参照ノードを選択し、前記距離計算手段を用いて、前記記憶手段の1時刻前の解ノードのペアから候補距離を計算し、該参照ノードの周辺ノードに対してその他のノードまでの距離の最大値を推定し、該最大値が該候補距離より小さければ該ノードを探索対象から除外する手段を含む
請求項1記載のグラフの直径のモニタリング装置。
The pruning means includes
A reference node that is the highest-order node is selected from the additional node stored in the storage unit and the solution node one time ago, and the distance calculation unit is used to determine the solution node one time before the storage unit. Means for calculating a candidate distance from the pair, estimating a maximum value of a distance to other nodes with respect to a peripheral node of the reference node, and excluding the node from a search target if the maximum value is smaller than the candidate distance The graph diameter monitoring device of claim 1, comprising:
前記更新手段は、
前記データ受信手段により追加されたノードにより直径が大きくなる、または、小さくなる、変化しない、のいずれかに応じて、前記記憶手段の前記解ノードのペアと直径を更新する手段を含む
請求項1記載のグラフの直径のモニタリング装置。
The updating means includes
2. A means for updating the pair of solution nodes and the diameter of the storage means according to whether the diameter is increased, decreased or not changed by the node added by the data receiving means. Monitoring device for the diameter of the described graph.
前記更新手段は、
前記最大距離が前記憶手段に格納されている1時刻前の直径よりも大きければ、該直径を該最大距離とし、該記憶手段の解ノードペアを更新し、該最大距離が1時刻前の直径と同じ長さのノードのペアがあれば、該追加ノードからの距離を用いて該記憶手段の解ノードのペアを更新し、1時刻前の直径と同じ距離のペアがなければ、前記距離計算手段により直径を求める手段、
を含む請求項1記載のグラフの直径モニタリング装置。
The updating means includes
If the maximum distance is larger than the diameter one hour before stored in the previous storage means, the diameter is set as the maximum distance, the solution node pair of the storage means is updated, and the maximum distance is calculated as If there is a pair of nodes having the same length, the pair of solution nodes in the storage means is updated using the distance from the additional node, and if there is no pair having the same distance as the diameter one time ago, the distance calculating means Means for determining the diameter by
The graph diameter monitoring device of claim 1, comprising:
実世界に存在するものの関係をノードとエッジで表現するデータ構造を有するグラフの直径をモニタリングするためのグラフの直径のモニタリング方法であって、
受信されたノード及びノード間の距離が直径となる1時刻前の2つのノードの組である解ノードのペアと該ノード間の最大距離である直径を格納した記憶手段と、データ受信手段、ノード間の距離を求める距離計算手段、枝刈り手段、更新手段を有する装置において、
前記データ受信手段が、時刻毎に変化するノードを受信するデータ受信ステップと、
前記枝刈り手段が、前記記憶手段に格納されているノードからその他のノードまでの最大距離を前記距離計算手段により求め、直径になり得ないノードを枝刈りする枝刈りステップと、
前記更新手段が、前記記憶手段の直径となるノードのペアを、前記データ受信手段により追加されたノードからの距離に基づいて更新する更新ステップと、
を行うことを特徴とするグラフの直径のモニタリング方法。
A method for monitoring the diameter of a graph for monitoring the diameter of a graph having a data structure that expresses the relationship of what exists in the real world with nodes and edges,
A storage means storing a received node and a pair of solution nodes, which is a set of two nodes one hour before the distance between the nodes becomes a diameter, a diameter that is the maximum distance between the nodes, a data receiving means, and a node In a device having a distance calculation means for obtaining a distance between, a pruning means, an updating means,
A data receiving step in which the data receiving means receives a node that changes at each time; and
The pruning means obtains the maximum distance from the node stored in the storage means to other nodes by the distance calculation means, and prunes a node that cannot be a diameter;
An update step in which the update means updates a pair of nodes that is the diameter of the storage means based on the distance from the node added by the data reception means;
A method for monitoring the diameter of a graph, characterized by:
前記枝刈りステップにおいて、
前記記憶手段に格納された前記追加ノード及び1時刻前の解ノードから最も次数の高いノードである参照ノードを選択し、前記距離計算手段を用いて、前記記憶手段の1時刻前の解ノードのペアから候補距離を計算し、該参照ノードの周辺ノードに対してその他のノードまでの距離の最大値を推定し、該最大値が該候補距離より小さければ該ノードを探索対象から除外する
請求項5記載のグラフの直径のモニタリング方法。
In the pruning step,
A reference node that is the highest-order node is selected from the additional node stored in the storage unit and the solution node one time ago, and the distance calculation unit is used to determine the solution node one time before the storage unit. A candidate distance is calculated from the pair, a maximum value of a distance to other nodes with respect to a peripheral node of the reference node is estimated, and if the maximum value is smaller than the candidate distance, the node is excluded from search targets. 5. The method for monitoring the diameter of the graph according to 5.
前記更新ステップにおいて、
前記データ受信ステップにより追加されたノードにより直径が大きくなる、または、小さくなる、変化しない、のいずれかに応じて、前記記憶手段の前記解ノードのペアと直径を更新する
請求項5記載のグラフの直径のモニタリング方法。
In the updating step,
6. The graph according to claim 5, wherein the pair of solution nodes and the diameter of the storage means are updated according to whether the diameter is increased, decreased, or not changed by the node added by the data receiving step. Diameter monitoring method.
前記更新ステップにおいて、
前記最大距離が前記憶手段に格納されている1時刻前の直径よりも大きければ、該直径を該最大距離とし、該記憶手段の解ノードペアを更新し、該最大距離が1時刻前の直径と同じ長さのノードのペアがあれば、該追加ノードからの距離を用いて該記憶手段の解ノードのペアを更新し、1時刻前の直径と同じ距離のペアがなければ、前記距離計算手段により直径を求める、
請求項5記載のグラフの直径モニタリング方法。
In the updating step,
If the maximum distance is larger than the diameter one hour before stored in the previous storage means, the diameter is set as the maximum distance, the solution node pair of the storage means is updated, and the maximum distance is calculated as If there is a pair of nodes having the same length, the pair of solution nodes in the storage means is updated using the distance from the additional node, and if there is no pair having the same distance as the diameter one time ago, the distance calculating means Find the diameter by
6. The diameter monitoring method for a graph according to claim 5.
請求項1乃至4のいずれか1項に記載のグラフの直径モニタリング装置を構成する各手段としてコンピュータを機能させるためのプログラム。   The program for functioning a computer as each means which comprises the diameter monitoring apparatus of the graph of any one of Claims 1 thru | or 4.
JP2010165143A 2010-07-22 2010-07-22 Graph diameter monitoring apparatus, method and program Expired - Fee Related JP5340232B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010165143A JP5340232B2 (en) 2010-07-22 2010-07-22 Graph diameter monitoring apparatus, method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010165143A JP5340232B2 (en) 2010-07-22 2010-07-22 Graph diameter monitoring apparatus, method and program

Publications (2)

Publication Number Publication Date
JP2012027654A JP2012027654A (en) 2012-02-09
JP5340232B2 true JP5340232B2 (en) 2013-11-13

Family

ID=45780520

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010165143A Expired - Fee Related JP5340232B2 (en) 2010-07-22 2010-07-22 Graph diameter monitoring apparatus, method and program

Country Status (1)

Country Link
JP (1) JP5340232B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10479907B2 (en) 2014-07-30 2019-11-19 Dow Global Technologies Llc Vinyl acetate binders in an above-critical PVC coatings composition

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001094606A (en) * 1999-09-27 2001-04-06 Ntt Communications Kk Route calculation method and route control system
EP2259493B1 (en) * 2000-07-31 2012-01-25 The Boeing Company Distributed game system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10479907B2 (en) 2014-07-30 2019-11-19 Dow Global Technologies Llc Vinyl acetate binders in an above-critical PVC coatings composition

Also Published As

Publication number Publication date
JP2012027654A (en) 2012-02-09

Similar Documents

Publication Publication Date Title
WO2019200714A1 (en) Server connection method, computer readable storage medium, terminal device, and apparatus
KR20230031889A (en) Anomaly detection in network topology
CN108959370A (en) The community discovery method and device of entity similarity in a kind of knowledge based map
Li et al. Evolutionary community discovery in dynamic social networks via resistance distance
Kim et al. Influence maximization based on reachability sketches in dynamic graphs
CN117592550B (en) Black box attack method and device for graphic neural network model
JP7111025B2 (en) Estimation device, estimation method and program
CN115412328A (en) Attack path tracing and attack source detection method based on machine learning
WO2024124640A1 (en) Node analysis method and apparatus based on threat analysis graph
JP5340232B2 (en) Graph diameter monitoring apparatus, method and program
CN108366048B (en) Network intrusion detection method based on unsupervised learning
Vasconcelos et al. A data sample algorithm applied to wireless sensor network with disruptive connections
CN111865690B (en) Opportunistic network link prediction method based on network structure and time sequence
Meng et al. Using the complementary nature of node joining and leaving to handle churn problem in P2P networks
CN115315711A (en) Machine learning device, method for generating learning model, and program
Liu et al. An effective simulated annealing for influence maximization problem of online social networks
CN114666144B (en) Information source quality detection method, device, equipment and storage medium
CN115935027B (en) Data processing method of target object topological graph and training method of graph classification model
CN118075136A (en) Network space point group map synthesis method and system based on comprehensive centrality measurement
CN115567289B (en) Malicious domain name detection method and system based on federal graph model under encryption DNS protocol
Stai et al. Hyperbolic embedding for efficient computation of path centralities and adaptive routing in large-scale complex commodity networks
CN115174141A (en) Intrusion detection and link dynamic visualization method based on graph and link flow analysis
CN109952742A (en) Graph structure processing method, system, network device and storage medium
Nikbazm et al. Agent-based resource discovery in cloud computing using bloom filters
Wang et al. Sampling node pairs over large graphs

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121005

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130724

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130730

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130806

R150 Certificate of patent or registration of utility model

Ref document number: 5340232

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees