JP7377493B2 - ZSDD construction device, ZSDD construction method and program - Google Patents

ZSDD construction device, ZSDD construction method and program Download PDF

Info

Publication number
JP7377493B2
JP7377493B2 JP2020074831A JP2020074831A JP7377493B2 JP 7377493 B2 JP7377493 B2 JP 7377493B2 JP 2020074831 A JP2020074831 A JP 2020074831A JP 2020074831 A JP2020074831 A JP 2020074831A JP 7377493 B2 JP7377493 B2 JP 7377493B2
Authority
JP
Japan
Prior art keywords
zsdd
node
vtree
construction
decision
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.)
Active
Application number
JP2020074831A
Other languages
Japanese (ja)
Other versions
JP2021174061A (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.)
Kyoto University
Nippon Telegraph and Telephone Corp
Original Assignee
Kyoto University
Nippon Telegraph and Telephone Corp
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 Kyoto University, Nippon Telegraph and Telephone Corp filed Critical Kyoto University
Priority to JP2020074831A priority Critical patent/JP7377493B2/en
Publication of JP2021174061A publication Critical patent/JP2021174061A/en
Application granted granted Critical
Publication of JP7377493B2 publication Critical patent/JP7377493B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

本発明は、ZSDD構築装置、ZSDD構築方法及びプログラムに関する。 The present invention relates to a ZSDD construction device, a ZSDD construction method, and a program.

集合Sが与えられたとき、Sの部分集合を要素とするような集合は集合族と呼ばれる。様々な問題は、集合族を対象とした計算問題に帰着して解くことができる。例えば、ノードの集合をV、ノードの対からなるエッジの集合をEとしたグラフG=(V,E)が与えられたとき、グラフGのマッチングとは、Eの部分集合のうち、他のエッジとノードを共有しないエッジで構成される部分集合のことである。そのため、マッチングの集合は、Eを台集合とした集合族で表現することが可能である。マッチングのうち、エッジ数が最大のマッチングを選択する問題は最大マッチング問題と呼ばれ、多くの応用問題が最大マッチング問題に帰着して解かれている。最大マッチング問題は、グラフGの全てのマッチングの集合が集合族として表現されていれば、この集合族の中から、要素数が最大の集合を選択する問題として解くことができる。 When a set S is given, a set whose elements are subsets of S is called a set family. Various problems can be solved by reducing them to computational problems targeting set families. For example, given a graph G = (V, E) where V is a set of nodes and E is a set of edges consisting of pairs of nodes, matching of graph G means A subset consisting of edges that do not share nodes with edges. Therefore, the matching set can be expressed as a set family with E as a platform set. Among matching, the problem of selecting the matching with the largest number of edges is called the maximum matching problem, and many applied problems have been solved by reducing the problem to the maximum matching problem. The maximum matching problem can be solved as a problem of selecting the set with the maximum number of elements from the set family if all matching sets of the graph G are expressed as a set family.

ところで、集合族を対象とした計算は、多くの場合、集合族の大きさに比例した時間を要する。このため、集合族の大きさが膨大になると、その計算に多くの時間を要し、効率的な処理が困難となる。例えば、前述のマッチングの個数は最悪でエッジの総数|E|の指数倍となる可能性があるため、マッチングの集合を明示的に求めて、それに対して処理を行うことは非効率的である。 By the way, calculations targeting a set family often require time proportional to the size of the set family. For this reason, when the size of a set family becomes enormous, it takes a lot of time to calculate it, making efficient processing difficult. For example, in the worst case, the number of matchings mentioned above may be an exponential multiple of the total number of edges |E|, so it is inefficient to explicitly find a set of matchings and perform processing on it. .

このような点に鑑みて、集合族を計算に適したデータ構造に変換して保持することによって、集合族を対象とした各種演算を高速に実行するアプローチが存在する。このようなアプローチの1つとして、ZSDD(Zero-suppressed Sentential Decision Diagram)を用いて集合族を表現する方法が挙げられる(非特許文献1)。ZSDDは集合族を有向非巡回グラフ(DAG:Directed acyclic graph)として表現し、集合族を対象とした様々な演算をZSDDのエッジ数に比例する時間で実行可能なデータ構造である。 In view of these points, there is an approach to perform various operations on set families at high speed by converting set families into data structures suitable for calculation and storing them. One such approach is a method of expressing a set family using a ZSDD (Zero-suppressed Sentential Decision Diagram) (Non-Patent Document 1). ZSDD is a data structure that expresses a set family as a directed acyclic graph (DAG) and allows various operations on the set family to be executed in a time proportional to the number of edges of ZSDD.

ZSDDを用いて計算を行う場合、集合族を表現するZSDDを効率的に構築することが重要となる。これに対して、(1)グラフのマッチングの集合を表す集合族(つまり、エッジの集合の部分集合のうち、他のエッジとノードを共有しないエッジで構成される部分集合をその要素とする集合族)、(2)台集合の部分集合のうち、要素数がKの部分集合からなる集合族、のいずれかの集合族を表現するZSDDを効率的に構築する方法が知られている(特許文献1)。 When performing calculations using ZSDD, it is important to efficiently construct ZSDD that represents a set family. On the other hand, (1) a set family representing a set of matchings in a graph (i.e., a set whose elements are a subset of edges that do not share nodes with other edges, out of a subset of a set of edges; There is a known method for efficiently constructing a ZSDD that represents either a set family (family) or (2) a set family consisting of a subset of K elements among subsets of the platform set (patent). Reference 1).

特開2018-041161号公報Japanese Patent Application Publication No. 2018-041161

Masaaki Nishino, Norihito Yasuda, Shin-ichi Minato and Masaaki Nagata, "Zero-suppressed Sentential Decision Diagrams", In Proceedings of the 30th AAAI Conference on Artificial Intelligence, pp 1058-1066, 2016.Masaaki Nishino, Norihito Yasuda, Shin-ichi Minato and Masaaki Nagata, "Zero-suppressed Sentential Decision Diagrams", In Proceedings of the 30th AAAI Conference on Artificial Intelligence, pp 1058-1066, 2016.

しかしながら、上記の特許文献1では、上記の(1)又は(2)の2種類の集合族以外の集合族を表現するZSDDは構築することができなかった。一方で、グラフのノードに対する次数制約を満たすエッジの集合の集合族を対象とした計算問題も多く存在する。このため、このような集合族を表現するZSDDを効率的に構築する方法が求められている。 However, in Patent Document 1 mentioned above, it was not possible to construct a ZSDD expressing a set family other than the two types of set groups (1) or (2) above. On the other hand, there are many computational problems that target families of sets of edges that satisfy degree constraints on nodes in a graph. Therefore, there is a need for a method for efficiently constructing a ZSDD that represents such a set family.

本発明の一実施形態は、上記の点に鑑みてなされたもので、グラフのノードに対する次数制約を満たすエッジの集合の集合族を表現するZSDDを効率的に構築することを目的とする。 One embodiment of the present invention has been made in view of the above points, and aims to efficiently construct a ZSDD that expresses a set family of sets of edges that satisfy degree constraints on nodes of a graph.

上記目的を達成するため、一実施形態に係るZSDD構築装置は、ノードの集合Vとエッジの集合Eとで構成されるグラフGと、前記ノードを端点とするエッジ数に関する制約を表す次数制約とを入力する入力部と、前記グラフGと前記次数制約と前記グラフGに対応するvtreeとに基づいて、前記集合Eの部分集合であって、かつ、前記次数制約を満たすエッジの部分集合で構成される集合族を表すZSDDを構築する構築部と、を有することを特徴とする。 In order to achieve the above object, a ZSDD construction device according to an embodiment includes a graph G composed of a set V of nodes and a set E of edges, and a degree constraint expressing a constraint regarding the number of edges with the nodes as end points. an input unit for inputting , a subset of the set E, and a subset of edges that satisfy the degree constraint based on the graph G, the degree constraint, and the vtree corresponding to the graph G. and a construction unit that constructs a ZSDD representing a set family.

グラフのノードに対する次数制約を満たすエッジの集合の集合族を表現するZSDDを効率的に構築することができる。 It is possible to efficiently construct a ZSDD that represents a set family of sets of edges that satisfy degree constraints on the nodes of a graph.

vtreeの一例を示す図である。FIG. 2 is a diagram showing an example of a vtree. ZSDDの一例を示す図である。It is a figure showing an example of ZSDD. ZSDDの計算機上での表現の一例を示す図である。It is a figure which shows an example of the representation on the computer of ZSDD. 本実施形態に係るZSDD構築装置の機能構成の一例を示す図である。FIG. 1 is a diagram showing an example of a functional configuration of a ZSDD construction device according to the present embodiment. 本実施形態に係るZSDD構築装置のハードウェア構成の一例を示す図である。It is a diagram showing an example of the hardware configuration of the ZSDD construction device according to the present embodiment. 本実施形態に係るZSDD構築装置が実行する処理の一例を示すフローチャートである。It is a flowchart which shows an example of the process performed by the ZSDD construction apparatus based on this embodiment. 本実施形態に係るZSDD構築処理の一例を示すフローチャートである。It is a flowchart which shows an example of ZSDD construction processing concerning this embodiment. 本実施形態に係るconstruct(v, Z)の処理の一例を示すフローチャートである。12 is a flowchart illustrating an example of construct(v, Z) processing according to the present embodiment. 本実施形態に係るterminal(v, m)の処理の一例を示すフローチャートである。12 is a flowchart illustrating an example of terminal (v, m) processing according to the present embodiment. 本実施形態に係るdecomp(v, z)の処理の一例を示すフローチャートである。12 is a flowchart illustrating an example of decomp(v, z) processing according to the present embodiment.

以下、本発明の一実施形態について説明する。本実施形態では、グラフのノードに対する次数制約を満たすエッジの集合の集合族を表現するZSDDを効率的に構築することが可能なZSDD構築装置10について説明する。 An embodiment of the present invention will be described below. In this embodiment, a ZSDD construction device 10 that can efficiently construct a ZSDD that expresses a set family of sets of edges that satisfy degree constraints on nodes of a graph will be described.

<準備>
まず、本実施形態で用いる記号や概念、用語等について説明する。
<Preparation>
First, symbols, concepts, terms, etc. used in this embodiment will be explained.

Vをノードの集合、Eをエッジの集合として、G=(V,E)をグラフとする。エッジe∈Eはノードのペアu,v∈Vによってe=(u,v)と表される。また、グラフの頂点v∈Vに対して、vを端点として含むようなエッジの数をvの次数と呼ぶ。 Let G=(V, E) be a graph, where V is a set of nodes and E is a set of edges. An edge e∈E is represented by a pair of nodes u, v∈V as e=(u,v). Further, for a vertex v∈V of a graph, the number of edges that include v as an end point is called the degree of v.

集合族とは、ある台集合Z={A,B,C,・・・}に対して、その部分集合S⊆Zを要素とする集合のことである。例えば、Z={A,B,C,D}とすると、{{A,B},{B},{B,C},{C,D}}はZを台集合とする集合族(の1つ)である。また、φは空集合、2はZのべき集合(つまり、台集合Zの全ての部分集合から構成される集合族)、|Z|はZの要素数を表すものとする。なお、以降では、台集合の要素(例えば、Z={A,B,C,D}である場合のA,B,C及びD)をアイテムと表す。 A set family is a set whose elements are a subset S⊆Z of a certain platform set Z={A, B, C, . . . }. For example, if Z = {A, B, C, D}, then {{A, B}, {B}, {B, C}, {C, D}} is the set family (of 1). Further, φ is an empty set, 2Z is a power set of Z (that is, a set family consisting of all subsets of the platform set Z), and |Z| represents the number of elements of Z. Note that, hereinafter, the elements of the platform set (for example, A, B, C, and D when Z={A, B, C, D}) are referred to as items.

集合族に対する演算をいくつか定義する。f,gを集合族する。このとき、集合族に対する二項演算 Define some operations on set families. Let f and g be a set family. In this case, the binary operation on the set family

Figure 0007377493000001
をそれぞれ以下で定義する。
Figure 0007377493000001
are defined below.

Figure 0007377493000002
次に、ZSDDについて説明する。ZSDDは集合族を再帰的な(X,Y)-分割によって分割し、その分割の様子をDAGとして表現したものになる。集合X,Yが台集合Zの分割、すなわち、X∪Y=ZかつX∩Y=φを満たすとすると、Zを台集合とする集合族f(Z)の(X,Y)-分割は、
Figure 0007377493000002
Next, ZSDD will be explained. ZSDD divides a set group by recursive (X, Y)-division, and the division is expressed as a DAG. If the sets X and Y are a partition of the platform set Z, that is, X∪Y=Z and X∩Y=φ, then the (X, Y)-division of the set family f(Z) with Z as the platform set is ,

Figure 0007377493000003
と表される。ここで、各i=1,・・・,nに対して、p(X)はXを台集合とする集合族、s(Y)はYを台集合とする集合族である。
Figure 0007377493000003
It is expressed as Here, for each i=1, . . . , n, p i (X) is a set family whose platform set is X, and s i (Y) is a set family whose platform set is Y.

このとき、(X,Y)-分割では、全てのi,j(ただし、1≦i<j≦n)に対して、 At this time, in (X, Y)-division, for all i, j (however, 1≦i<j≦n),

Figure 0007377493000004
を満たすものとする。
Figure 0007377493000004
The following shall be satisfied.

例えば、Z={A,B,C,D}、X={A,B}、Y={C,D}である場合、集合族{{A,B},{B},{B,C},{C,D}}の(X,Y)-分割は、 For example, if Z = {A, B, C, D}, X = {A, B}, Y = {C, D}, then the set family {{A, B}, {B}, {B, C The (X, Y)-division of }, {C, D}} is

Figure 0007377493000005
となる。なお、以降では、(X,Y)-分割を{(p,s),・・・,(p,s)}とも表す。また、pをプライム、sをサブと呼ぶ。
Figure 0007377493000005
becomes. Note that hereinafter, (X, Y)-division is also expressed as {(p 1 , s 1 ), . . . , (p n , s n )}. Further, p i is called a prime, and s i is called a sub.

(X,Y)-分割は、集合族に対して再帰的に行うことができる。すなわち、例えば、上記の(X,Y)-分割におけるp={{A,B}}は、更に(B,A)-分割によって{({{B}},{{A}}),({φ},φ)}と分割することができる。 The (X,Y)-partition can be performed recursively on the set family. That is, for example, p 1 = {{A, B}} in the above (X, Y)-division becomes {({{B}}, {{A}}), ({φ}, φ)}.

続いて、vtreeを導入する。vtreeは台集合に含まれる各アイテムに対応するノードを葉とするような完全二分木のことである。vtreeの一例を図1に示す。図1では、4つのアイテムA,B,C,Dに対するvtreeの一例を示している。図1に示すvtreeは、ノードvが根ノード、ノードv,v,v及びvが葉ノード、ノードv及びvは根でも葉でもないノードである。なお、葉ノードでないノードを中間ノードともいう。 Next, install vtree. A vtree is a complete binary tree whose leaves are nodes corresponding to each item included in the table set. An example of a vtree is shown in FIG. FIG. 1 shows an example of a vtree for four items A, B, C, and D. In the vtree shown in FIG. 1, node v 3 is a root node, nodes v 0 , v 2 , v 4 and v 6 are leaf nodes, and nodes v 1 and v 5 are nodes that are neither roots nor leaves. Note that nodes that are not leaf nodes are also referred to as intermediate nodes.

vtreeの中間ノードvは、当該中間ノードvを根とする部分木の葉ノードからなる変数の集合の分割を表現している。すなわち、中間ノードvを根とする部分木の葉ノードに対応するアイテムの集合を、vの左側の子ノードを根とする部分木の葉ノードに対応するアイテムの集合と、vの右側の子ノードを根とする部分木の葉ノードに対応するアイテムの集合とに分割する。なお、ノードvの左側の子ノードをv、右側の子ノードをvとも表す。 An intermediate node v of a vtree represents a division of a set of variables made up of leaf nodes of a subtree whose root is the intermediate node v. In other words, the set of items corresponding to the leaf nodes of the subtree whose root is the intermediate node v, the set of items corresponding to the leaf nodes of the subtree whose root is the left child node of v, and the set of items corresponding to the leaf nodes of the subtree whose root is the right child node of v. and a set of items corresponding to the leaf nodes of the subtree. Note that the left child node of node v is also expressed as v k and the right child node as v r .

例えば、図1に示すvtreeは、根ノードvは{A,B}と{C,D}への分割に対応し、根ノードvの左側の子ノードvは{B}と{A}への分割に対応する。同様に、根ノードvの左側の子ノードvは{D}と{C}への分割に対応する。以降では、vtreeのノードのうち、左側の子ノードが葉ノードであるようなノードを決定vtreeノードと呼ぶ。また、決定vteeノードでないノードを分割vtreeノードと呼ぶ。図1に示す例では、ノードv及びvが決定vtreeノードである。 For example, in the vtree shown in FIG. 1, the root node v 3 corresponds to the division into {A, B} and {C, D}, and the left child node v 1 of the root node v 3 corresponds to the division into {B} and {A }. Similarly, the left child node v 5 of the root node v 3 corresponds to the division into {D} and {C}. Hereinafter, among the nodes of a vtree, a node whose left child node is a leaf node will be referred to as a determined vtree node. Further, a node that is not a determined vtee node is called a split vtree node. In the example shown in FIG. 1, nodes v 1 and v 5 are the decision vtree nodes.

ZSDDは、あるvtreeが与えられたときに、そのvtreeに基づいて集合族を再帰的に分割することによってDAGとして表現することができる。αをZSDD、αが表す集合族を〈α〉とすると、ZSDDは、以下のように再帰的に定義される。 ZSDD can be expressed as a DAG by recursively partitioning a set family based on a given vtree. Let α be ZSDD, and let the set family represented by α be <α>, then ZSDD is recursively defined as follows.

Figure 0007377493000006
ここで、⊥及びεを定数ZSDDと呼び、X及び±XをリテラルZSDDと呼ぶ。また、定数ZSDDとリテラルZSDDとをあわせて終端ZSDDと呼ぶ。一方、ある(X,Y)-分割に対応するZSDDは分解ZSDDと呼ぶ。
Figure 0007377493000006
Here, ⊥ and ε are called constant ZSDD, and X and ±X are called literal ZSDD. Further, the constant ZSDD and the literal ZSDD are collectively referred to as a terminal ZSDD. On the other hand, a ZSDD corresponding to a certain (X, Y)-division is called a decomposition ZSDD.

一例として、集合族{{A,B},{B},{B,C},{C,D}}を表すZSDDを図2に示す。図2中の丸で表されているノードは、そのノードを根とするDAGが表現する分解ZSDDを表している。このようなノードを決定ZSDDノードと呼ぶ。決定ZSDDノードを表す丸の中の数字は、vtreeのノードのうち、この決定ZSDDノードに対応するノードを表している。例えば、図2に示すZSDDにおいて、丸の中に数字「3」が記載された決定ZSDDノードは、図1に示すvtreeのノードvに対応していることを表している。同様に、丸の中に数字「1」が記載された決定ZSDDノードは、図1に示すvtreeのノードvに対応していることを表し、丸の中に数字「5」が記載された決定ZSDDノードは、図1に示すvtreeのノードvに対応していることを表している。なお、ZSDDには、同一の数字が丸の中に記載された複数の決定ZSDDノードが存在してもよい。 As an example, FIG. 2 shows a ZSDD representing the set family {{A, B}, {B}, {B, C}, {C, D}}. A node represented by a circle in FIG. 2 represents a decomposition ZSDD expressed by a DAG whose root is that node. Such a node is called a decision ZSDD node. The number in the circle representing the determined ZSDD node represents the node corresponding to this determined ZSDD node among the nodes of the vtree. For example, in the ZSDD shown in FIG. 2, the determined ZSDD node with the number "3" written in a circle indicates that it corresponds to node v3 of the vtree shown in FIG. Similarly, the decision ZSDD node with the number "1" written in the circle corresponds to node v1 of the vtree shown in Figure 1, and the number "5" written in the circle means that it corresponds to node v1 of the vtree shown in Figure 1. The determined ZSDD node corresponds to node v5 of the vtree shown in FIG. 1. Note that in the ZSDD, there may be a plurality of determined ZSDD nodes in which the same number is written in a circle.

また、決定ZSDDノードを親ノードとするノードの対は要素ノード対と呼ばれ、図2中では四角の対で表されている。この要素ノード対は、(X,Y)-分割{(p,s),・・・,(p,s)}におけるあるプライムとサブのペア(p,s)を表している。要素ノード対のうち、左側の四角がプライムを、右側の四角がサブを表している。プライム及びサブのそれぞれは「終端ZSDD」又は「他の分解ZSDDへのポインタ」を表し、終端ZSDDを表す場合は四角中に該当の終端ZSDDを表す記号が記載されており、他の分解ZSDDへのポインタを表す場合は他の分割ZSDDにおける該当の決定ZSDDノードへの矢印が記載されている。これにより、決定ZSDDノードと、その子ノードである要素ノード対の集合とである(X,Y)-分割が表現される。すなわち、決定ZSDDノードの子ノードとなっている各要素ノード対のそれぞれがプライムとサブのペアに対応している。なお、ZSDDでは、サブが⊥となるようなペアは省略する。したがって、ZSDD中に、 Further, a pair of nodes having the determined ZSDD node as a parent node is called an element node pair, and is represented by a pair of squares in FIG. 2. This element node pair represents a certain prime-sub pair (p i , s i ) in the (X, Y)-partition {(p 1 , s 1 ), ..., ( p n , s n )}. ing. Among the element node pairs, the square on the left side represents the prime, and the square on the right side represents the sub. Each of the prime and sub represents a "terminal ZSDD" or a "pointer to another decomposition ZSDD", and when representing a terminal ZSDD, a symbol representing the corresponding terminal ZSDD is written in a square, and a pointer to another decomposition ZSDD is indicated. When representing a pointer, an arrow pointing to the corresponding determined ZSDD node in another divided ZSDD is indicated. As a result, an (X, Y)-division is expressed, which is a determined ZSDD node and a set of element node pairs that are its child nodes. That is, each element node pair that is a child node of the decision ZSDD node corresponds to a prime-sub pair. Note that in ZSDD, pairs whose sub is ⊥ are omitted. Therefore, during ZSDD,

Figure 0007377493000007
に対応するような決定ZSDDノードが存在する場合(つまり、上記の3つのいずれかを表す要素ノード群を子ノードとして持つ決定ZSDDノードが存在する場合)、最初の2つはαに、残り1つは⊥に置き換える。
Figure 0007377493000007
If there exists a decision ZSDD node that corresponds to Replace one with ⊥.

ここで、ZSDDは計算機上では配列を用いて実現することができる。例えば、図2に示すZSDDを計算機上で実現した場合を図3に示す。図3では、vtreeのノードvに対応する決定ZSDDノードは要素数3の配列で実現されており、vtreeのノードvに対応する決定ZSDDノードとvtreeのノードvに対応する決定ZSDDノードはそれぞれ要素数1の配列で実現されている。このとき、配列の各要素には、当該配列に対応する決定ZSDDノードの子ノードである要素ノード対がそれぞれ格納される。言い換えれば、1つの要素には、1つの要素ノード対が表すプライムとサブのペアが格納される。このとき、プライム又はサブが終端ZSDDを表す場合はその終端ZSDDを表す記号(X,⊥,ε等)が格納され、そうでない場合(つまり、他の分解ZSDDへのポインタを表す場合)は他の決定ZSDDノードへの計算機上でのアドレスを保持する。図3に示す例では、vtreeのノードを示すIDと、このIDに対応する決定ZSDDノードのインデックスとのペアで表されている。例えば、図3における「1:1」は、vtreeのノードvに対応する決定ZSDDノードのうち、インデックス「1」の決定ZSDDノードを実現する配列のアドレスを表す。同様に、例えば、「5:1」は、vtreeのノードvに対応する決定ZSDDノードのうち、インデックス「1」の決定ZSDDノードを実現する配列のアドレスを表す。なお、決定ZSDDノードのインデックスが必要な理由は、上述したように、vtreeの1つのノードに対して複数の決定ZSDDノードが対応することがあるためである。 Here, ZSDD can be realized on a computer using an array. For example, FIG. 3 shows a case in which the ZSDD shown in FIG. 2 is implemented on a computer. In FIG. 3, the decision ZSDD node corresponding to the node v 3 of the vtree is realized as an array of 3 elements, and the decision ZSDD node corresponding to the node v 1 of the vtree and the decision ZSDD node corresponding to the node v 5 of the vtree are realized as an array with 3 elements. are each realized as an array with one element. At this time, each element of the array stores a pair of element nodes that are child nodes of the determined ZSDD node corresponding to the array. In other words, one element stores a prime-sub pair represented by one element node pair. At this time, if the prime or sub represents the terminal ZSDD, a symbol (X, ⊥, ε, etc.) representing the terminal ZSDD is stored, and if not (that is, if it represents a pointer to another decomposition ZSDD), another symbol is stored. Determination of ZSDD holds the address on the computer to the node. In the example shown in FIG. 3, it is represented by a pair of an ID indicating a vtree node and an index of the determined ZSDD node corresponding to this ID. For example, "1:1" in FIG. 3 represents the address of an array that implements the determined ZSDD node with index "1" among the determined ZSDD nodes corresponding to node v 1 of the vtree. Similarly, for example, "5:1" represents the address of an array that implements the determined ZSDD node with index "1" among the determined ZSDD nodes corresponding to node v5 of the vtree. Note that the reason why the index of the determined ZSDD node is necessary is that, as described above, a plurality of determined ZSDD nodes may correspond to one node of a vtree.

<次数制約を満たすエッジの集合の集合族>
エッジの集合S⊆Eが与えられたときに、ノードv∈Vを端点として含むエッジe∈Sの数をdeg(S,v)と定義する。本実施形態では、各頂点v∈Vに対して0以上の整数を割り当てることで次数制約を表現する。頂点vに割り当てられた整数をδ*(v)とすれば、次数制約を満たすエッジの集合S⊆Eとは、全てのv∈Vに対してdeg(S,v)=δ*(v)を満たすようなSのことである。以降では、このようなSの集合を表す集合族を表現するZSDDを構築するZSDD構築装置10について説明する。
<Set family of sets of edges that satisfy degree constraints>
When a set of edges S⊆E is given, the number of edges e∈S that include node v∈V as an end point is defined as deg(S, v). In this embodiment, the degree constraint is expressed by assigning an integer greater than or equal to 0 to each vertex v∈V. If the integer assigned to vertex v is δ * (v), then the set of edges S⊆E that satisfies the degree constraint is deg(S, v) = δ * (v) for all v∈V It is an S that satisfies the following. Hereinafter, a ZSDD construction device 10 that constructs a ZSDD expressing a set family representing such a set of S will be described.

<機能構成>
本実施形態に係るZSDD構築装置10の機能構成について、図4を参照しながら説明する。図4は、本実施形態に係るZSDD構築装置10の機能構成の一例を示す図である。
<Functional configuration>
The functional configuration of the ZSDD construction device 10 according to this embodiment will be described with reference to FIG. 4. FIG. 4 is a diagram showing an example of the functional configuration of the ZSDD construction device 10 according to this embodiment.

図4に示すように、本実施形態に係るZSDD構築装置10は、入力部101と、vtree獲得部102と、ZSDD構築部103と、出力部104とを有する。 As shown in FIG. 4, the ZSDD construction device 10 according to this embodiment includes an input section 101, a vtree acquisition section 102, a ZSDD construction section 103, and an output section 104.

入力部101は、グラフG=(V,E)と次数制約δ*(v)とを入力として受け付ける。なお、入力部101は、予め設定された任意の入力元からグラフG及び次数制約δ*(v)を入力すればよい。このような入力元としては、例えば、後述するメモリ装置206、後述する記録媒体203a、通信ネットワークを介して接続される他の装置又はシステム等が挙げられる。 The input unit 101 receives the graph G=(V,E) and the degree constraint δ * (v) as input. Note that the input unit 101 may input the graph G and the degree constraint δ * (v) from any preset input source. Examples of such input sources include a memory device 206, which will be described later, a recording medium 203a, which will be described later, and other devices or systems connected via a communication network.

vtree獲得部102は、ZSDD構築の際に用いるvtreeを獲得する。なお、vtree獲得部102は、通信ネットワークを介して接続される他の装置又はシステムからvtreeを入力してもよいし、後述する記録媒体203a等からvtreeを入力してもよいし、グラフGからvteeを計算してもよい。 The vtree acquisition unit 102 acquires a vtree to be used when constructing the ZSDD. Note that the vtree acquisition unit 102 may input a vtree from another device or system connected via a communication network, may input a vtree from a recording medium 203a described later, or may input a vtree from a graph G. vtee may be calculated.

ZSDD構築部103は、次数制約を満たすエッジの集合の集合族を表すZSDDを構築する。 The ZSDD construction unit 103 constructs a ZSDD representing a set family of sets of edges that satisfy the degree constraint.

出力部104は、ZSDD構築部103により構築されたZSDDを出力する。なお、出力部104は、予め設定された任意の出力先にZSDDを出力すればよい。このような出力先としては、例えば、後述するメモリ装置206、後述する記録媒体203a、通信ネットワークを介して接続される他の装置又はシステム等が挙げられる。 The output unit 104 outputs the ZSDD constructed by the ZSDD construction unit 103. Note that the output unit 104 may output the ZSDD to any preset output destination. Examples of such output destinations include a memory device 206 (described later), a recording medium 203a (described later), and other devices or systems connected via a communication network.

<ハードウェア構成>
次に、本実施形態に係るZSDD構築装置10のハードウェア構成について、図5を参照しながら説明する。図5は、本実施形態に係るZSDD構築装置10のハードウェア構成の一例を示す図である。
<Hardware configuration>
Next, the hardware configuration of the ZSDD construction device 10 according to this embodiment will be described with reference to FIG. 5. FIG. 5 is a diagram showing an example of the hardware configuration of the ZSDD construction device 10 according to this embodiment.

図5に示すように、本実施形態に係るZSDD構築装置10は一般的なコンピュータ又はコンピュータシステムで実現され、入力装置201と、表示装置202と、外部I/F203と、通信I/F204と、プロセッサ205と、メモリ装置206とを有する。これらの各ハードウェアは、それぞれがバス207を介して通信可能に接続されている。 As shown in FIG. 5, the ZSDD construction device 10 according to this embodiment is realized by a general computer or computer system, and includes an input device 201, a display device 202, an external I/F 203, a communication I/F 204, It has a processor 205 and a memory device 206. Each of these pieces of hardware is communicably connected via a bus 207.

入力装置201は、例えば、キーボードやマウス、タッチパネル等である。表示装置202は、例えば、ディスプレイ等である。なお、ZSDD構築装置10は、入力装置201及び表示装置202のうちの少なくとも一方を有していなくてもよい。 The input device 201 is, for example, a keyboard, a mouse, a touch panel, or the like. The display device 202 is, for example, a display. Note that the ZSDD construction device 10 does not need to have at least one of the input device 201 and the display device 202.

外部I/F203は、外部装置とのインタフェースである。外部装置には、記録媒体203a等がある。ZSDD構築装置10は、外部I/F203を介して、記録媒体203aの読み取りや書き込み等を行うことができる。記録媒体203aには、ZSDD構築装置10が有する各機能部(入力部101、vtree獲得部102、ZSDD構築部103及び出力部104)を実現する1以上のプログラムが格納されていてもよい。 External I/F 203 is an interface with an external device. The external device includes a recording medium 203a and the like. The ZSDD construction device 10 can read from and write to the recording medium 203a via the external I/F 203. The recording medium 203a may store one or more programs that implement each functional unit (input unit 101, vtree acquisition unit 102, ZSDD construction unit 103, and output unit 104) included in the ZSDD construction device 10.

なお、記録媒体203aには、例えば、CD(Compact Disc)、DVD(Digital Versatile Disk)、SDメモリカード(Secure Digital memory card)、USB(Universal Serial Bus)メモリカード等がある。 Note that the recording medium 203a includes, for example, a CD (Compact Disc), a DVD (Digital Versatile Disk), an SD memory card (Secure Digital memory card), a USB (Universal Serial Bus) memory card, and the like.

通信I/F204は、ZSDD構築装置10を通信ネットワークに接続するためのインタフェースである。なお、ZSDD構築装置10が有する各機能部を実現する1以上のプログラムは、通信I/F204を介して、所定のサーバ装置等から取得(ダウンロード)されてもよい。 Communication I/F 204 is an interface for connecting ZSDD construction device 10 to a communication network. Note that one or more programs that implement each functional unit included in the ZSDD construction device 10 may be acquired (downloaded) from a predetermined server device or the like via the communication I/F 204.

プロセッサ205は、例えば、CPU(Central Processing Unit)やGPU(Graphics Processing Unit)等の各種演算装置である。ZSDD構築装置10が有する各機能部は、例えば、メモリ装置206に格納されている1以上のプログラムがプロセッサ205に実行させる処理により実現される。 The processor 205 is, for example, various arithmetic devices such as a CPU (Central Processing Unit) or a GPU (Graphics Processing Unit). Each functional unit included in the ZSDD construction device 10 is realized, for example, by processing that is executed by the processor 205 by one or more programs stored in the memory device 206.

メモリ装置206は、例えば、HDD(Hard Disk Drive)やSSD(Solid State Drive)、RAM(Random Access Memory)、ROM(Read Only Memory)、フラッシュメモリ等の各種記憶装置である。 The memory device 206 is, for example, various storage devices such as a HDD (Hard Disk Drive), an SSD (Solid State Drive), a RAM (Random Access Memory), a ROM (Read Only Memory), and a flash memory.

本実施形態に係るZSDD構築装置10は、図5に示すハードウェア構成を有することにより、後述する各種処理を実現することができる。なお、図5に示すハードウェア構成は一例であって、ZSDD構築装置10は、他のハードウェア構成を有していてもよい。例えば、ZSDD構築装置10は、複数のプロセッサ205を有していてもよいし、複数のメモリ装置206を有していてもよい。 The ZSDD construction device 10 according to the present embodiment has the hardware configuration shown in FIG. 5, so that it can implement various processes described below. Note that the hardware configuration shown in FIG. 5 is an example, and the ZSDD construction device 10 may have other hardware configurations. For example, the ZSDD construction device 10 may have multiple processors 205 or multiple memory devices 206.

<処理の詳細>
次に、本実施形態に係るZSDD構築装置10によって次数制約を満たすエッジの集合の集合族を表すZSDDを構築する処理について、図6を参照しながら説明する。図6は、本実施形態に係るZSDD構築装置10が実行する処理の一例を示すフローチャートである。
<Processing details>
Next, a process of constructing a ZSDD representing a set family of a set of edges satisfying a degree constraint using the ZSDD construction apparatus 10 according to the present embodiment will be described with reference to FIG. FIG. 6 is a flowchart showing an example of a process executed by the ZSDD construction device 10 according to the present embodiment.

入力部101は、グラフG=(V,E)と次数制約δ*(v)とを入力として受け付ける(ステップS101)。 The input unit 101 receives the graph G=(V,E) and the degree constraint δ * (v) as input (step S101).

次に、vtree獲得部102は、上記のステップS101で入力されたグラフGのvtreeを獲得する(ステップS102)。なお、上述したように、vtree獲得部102は、通信ネットワークを介して接続される他の装置又はシステムからvtreeを入力してもよいし、記録媒体203a等からvtreeを入力してもよい、グラフGからvteeを計算してもよい。グラフGからvtreeを計算する場合、例えば、上記の特許文献1に記載されている方法によりグラフGからvtreeを計算(構築)すればよい。 Next, the vtree acquisition unit 102 acquires the vtree of the graph G input in step S101 above (step S102). Note that, as described above, the vtree acquisition unit 102 may input a vtree from another device or system connected via a communication network, may input a vtree from the recording medium 203a, etc. Vtee may be calculated from G. When calculating a vtree from the graph G, the vtree may be calculated (constructed) from the graph G using the method described in Patent Document 1 mentioned above, for example.

次に、ZSDD構築部103は、上記のステップS101で入力されたグラフG及び次数制約δ*(v)と、上記のステップS102で獲得されたvtreeとを用いて、次数制約を満たすエッジの集合の集合族を表すZSDD Zを構築する(ステップS103)。なお、本ステップ(ZSDD構築処理)の詳細については後述する。 Next, the ZSDD construction unit 103 uses the graph G and degree constraint δ * (v) input in step S101 above, and the vtree acquired in step S102 above to create a set of edges that satisfy the degree constraint. A ZSDD Z representing the set family of is constructed (step S103). Note that details of this step (ZSDD construction processing) will be described later.

そして、出力部104は、上記のステップS103で構築されたZSDD Zを出力する(ステップS104)。 Then, the output unit 104 outputs the ZSDD Z constructed in step S103 above (step S104).

≪ZSDD構築処理≫
次に、上記のステップS103のZSDD構築処理の詳細について、図7を参照しながら説明する。図7は、本実施形態に係るZSDD構築処理の一例を示すフローチャートである。なお、ZSDD構築処理は、上記のステップS102において、グラフGとvtreeの根ノードvと次数制約δ*(v)とを引数とする所定の関数が呼び出されることで実行が開始される。
≪ZSDD construction process≫
Next, details of the ZSDD construction process in step S103 above will be explained with reference to FIG. FIG. 7 is a flowchart illustrating an example of ZSDD construction processing according to this embodiment. Note that the ZSDD construction process is started in step S102 above by calling a predetermined function that uses the graph G, the root node v of the vtree, and the degree constraint δ * (v) as arguments.

ZSDD構築部103は、グラフGとvtreeの根ノードvと次数制約δ*(v)とを入力として受け付ける(ステップS201)。 The ZSDD construction unit 103 receives the graph G, the root node v of the vtree, and the degree constraint δ * (v) as input (step S201).

次に、ZSDD構築部103は、配列Z[v]にrootState()の出力値を格納する(ステップS202)。ここで、Z[v]は、vtreeのノードvに対応する決定ZSDDノードとそのラベルとの組を格納する配列である。ラベルとは等価な決定ZSDDノードが存在しないかどうかを検査するための識別情報である。構築するZSDDの種類に応じてラベルは異なるが、次数制約を満たすエッジの集合の集合族を表すZSDDの場合は、ラベルとして|V|次元の整数値を格納した配列を用いる(つまり、ラベルは、|V|次元のベクトルで表される。)。この配列をδ()と表し、vtreeのノードuに対応する整数値(つまり、配列δ()の要素のうち、ノードuに対応する要素)をδ(u)で表す。また、rootState()は、ZSDDの根となる決定ZSDDノードのラベルとしてδ*を設定した上で、この決定ZSDDノードとラベルδ*との組を返す関数である。なお、δ*は、全てのu∈Vの次数制約δ*(u)を要素とする|V|次元の配列(ベクトル)又は当該配列と等価な関数である。また、ZSDDの根となる決定ZSDDノードは、例えば、上記の特許文献1に記載されているgetRoot()等と同様の処理により決定すればよい。ZSDDの根となる決定ZSDDノードは、vtreeの根ノードに対応するノードとなる。 Next, the ZSDD construction unit 103 stores the output value of rootState() in the array Z[v] (step S202). Here, Z[v] is an array that stores a set of a determined ZSDD node corresponding to node v of the vtree and its label. The label is identification information for checking whether an equivalent decision ZSDD node exists. Labels differ depending on the type of ZSDD being constructed, but in the case of a ZSDD that represents a set family of edges that satisfy the degree constraint, an array that stores integer values of the |V| dimension is used as the label (in other words, the label is , |V|-dimensional vector). This array is expressed as δ(), and the integer value corresponding to node u of the vtree (that is, the element corresponding to node u among the elements of array δ()) is expressed as δ(u). RootState() is a function that sets δ * as the label of the determined ZSDD node that is the root of the ZSDD, and then returns a pair of the determined ZSDD node and label δ * . Note that δ * is a |V|-dimensional array (vector) whose elements are the order constraints δ * (u) for all u∈V, or a function equivalent to the array. Further, the determined ZSDD node that becomes the root of the ZSDD may be determined by, for example, the same process as getRoot() described in Patent Document 1 mentioned above. The determined ZSDD node that becomes the root of the ZSDD is the node that corresponds to the root node of the vtree.

次に、ZSDD構築部103は、construct(v, Z)を呼ぶ(ステップS203)。construct(v, Z)は、vtreeのノードv以下のノードに対応する決定ZSDDノードを根ノードとするZSDDを再帰的に構築する関数である。なお、construct(v, Z)の詳細については後述する。 Next, the ZSDD construction unit 103 calls construct(v, Z) (step S203). construct(v, Z) is a function that recursively constructs a ZSDD whose root node is the determined ZSDD node corresponding to nodes below node v of vtree. Note that the details of construct(v, Z) will be described later.

次に、ZSDD構築部103は、Zをreduce(Z)に更新する(ステップS204)。reduce(Z)は、Zを構成するZSDD決定ノードのうち冗長なものを削除して、ZSDDの大きさを削減する関数である。reduce(Z)の詳細については、例えば、上記の特許文献1を参照されたい。 Next, the ZSDD construction unit 103 updates Z to reduce (Z) (step S204). reduce(Z) is a function that reduces the size of ZSDD by deleting redundant ones among the ZSDD decision nodes that constitute Z. For details of reduce (Z), please refer to the above-mentioned Patent Document 1, for example.

そして、ZSDD構築部103は、ZSDD Zを呼び出し元に出力する(ステップS205)。 Then, the ZSDD construction unit 103 outputs ZSDD Z to the caller (step S205).

≪construct(v, Z)≫
次に、construct(v, Z)が呼び出された場合の処理の詳細について、図8を参照しながら説明する。図8は、本実施形態に係るconstruct(v, Z)の処理の一例を示すフローチャートである。
≪construct(v, Z)≫
Next, details of the process when construct(v, Z) is called will be explained with reference to FIG. FIG. 8 is a flowchart illustrating an example of construct(v, Z) processing according to this embodiment.

ZSDD構築部103は、Z[v]に格納されている各決定ZSDDノードzの各々に対して、ステップS311~ステップS314の処理を繰り返し実行する(ステップS301)。ステップS311では、ZSDD構築部103は、配列elemsをφに初期化する。ステップS312では、ZSDD構築部103は、decomp(v, z)の実行結果として得られたラベルの組(m,m)の各々に対して、ステップS321~ステップS322の処理を繰り返し実行する。ここで、decomp(v, z)は、決定ZSDDノードzのラベルm(z)に基づいて、その子ノードとなるプライム及びサブそれぞれのラベルの組(m,m)のリストを返す関数である。なお、decomp(v, z)の詳細については後述する。 The ZSDD construction unit 103 repeatedly executes the processes of steps S311 to S314 for each determined ZSDD node z stored in Z[v] (step S301). In step S311, the ZSDD construction unit 103 initializes the array elems to φ. In step S312, the ZSDD construction unit 103 repeatedly executes the processes of steps S321 and S322 for each label set (m k , m r ) obtained as a result of executing decomp(v, z). . Here, decomp(v, z) is a function that returns a list of label pairs (m k , m r ) for each prime and sub node, based on the label m(z) of the determined ZSDD node z. be. Note that details of decomp(v, z) will be described later.

ステップS321では、ZSDD構築部103は、m及びmのそれぞれを用いて、ステップS331~ステップS333の処理を実行する。すなわち、ZSDD構築部103は、mを用いてステップS331~ステップS333の処理を実行すると共に、mを用いてステップS331~ステップS333の処理を実行する。以降では、k又はrのいずれか一方を〇で表し、mはm又はmのいずれか一方を表すものとする。 In step S321, the ZSDD construction unit 103 executes the processes of steps S331 to S333 using each of m k and m r . That is, the ZSDD construction unit 103 uses m k to execute the processes of steps S331 to S333, and uses m r to execute the processes of steps S331 to S333. Hereinafter, either k or r will be represented by 0, and m 0 will represent either m k or m r .

ステップS331では、ZSDD構築部103は、vtreeのノードvのうち、mに対応するノードvを選択し、選択したvがvtreeの葉ノードであるか否かを判定する。mに対応するノードvは、mがmである場合はvであり、mがmである場合はvである。 In step S331, the ZSDD construction unit 103 selects the node v 0 corresponding to m 0 from among the nodes v of the vtree, and determines whether the selected v 0 is a leaf node of the vtree. The node v corresponding to m is v k when m is m k , and is v r when m is m r .

上記のステップS331でvがvtreeの葉ノードであると判定された場合(ステップS331でYES)、ZSDD構築部103は、terminal(v, m)の実行結果として得られたノード(終端ZSDD)をzに代入する(ステップS332)。zは、mがmである場合はzであり、mがmである場合はzである。また、terminal(v, m)は、ノードvがvtreeの葉ノードであった場合に、ラベルmに対応する終端ZSDDを求める関数である。なお、terminal(v, m)の詳細については後述する。 If it is determined in the above step S331 that v is a leaf node of the vtree (YES in step S331) , the ZSDD construction unit 103 creates a node (terminal ZSDD) is substituted into z〇 (step S332). z is z k when m is m k , and z r when m is m r . Further, terminal(v , m ) is a function that calculates the terminal ZSDD corresponding to the label m when the node v is a leaf node of the vtree. Note that details of terminal(v , m ) will be described later.

一方で、上記のステップS331でvがvtreeの葉ノードでないと判定された場合(ステップS331でNO)、ZSDD構築部103は、unique(v, m)の実行結果として得られたノードをzに代入する(ステップS333)。unique(v, m)は、ノードvに対応する決定ZSDDノードでラベルmを持つものがすでにZ[v]中に存在するか否かを判定し、存在する場合はその決定ZSDDノードを出力し、存在しない場合は新たにラベルmを持つ決定ZSDDノードを作成してZ[v]に格納した上でその決定ZSDDノードを出力する関数である。 On the other hand, if it is determined in the above step S331 that v is not a leaf node of the vtree (NO in step S331), the ZSDD construction unit 103 uses the node obtained as the execution result of unique(v , m ) is assigned to z〇 (step S333). unique(v , m ) determines whether a decision ZSDD node with label m corresponding to node v already exists in Z[v ], and if so, the decision This is a function that outputs a ZSDD node, and if it does not exist, creates a new decision ZSDD node with a label m , stores it in Z[v ], and then outputs the decision ZSDD node.

ステップS322では、ZSDD構築部103は、上記のステップS321の繰り返しで得られたz及びzのペアをelemsに追加する。 In step S322, the ZSDD construction unit 103 adds the pair of z k and z r obtained by repeating step S321 above to elems.

ステップS313では、ZSDD構築部103は、上記のステップS312の繰り返しで得られたelemsを、決定ZSDDノードzの子ノードとして設定する。 In step S313, the ZSDD construction unit 103 sets the elems obtained by repeating step S312 above as child nodes of the determined ZSDD node z.

ステップS314では、ZSDD構築部103は、v及びvのそれぞれを用いて、ステップS341~ステップS342の処理を実行する。すなわち、ZSDD構築部103は、vを用いてステップS341~ステップS342の処理を実行すると共に、vを用いてステップS341~ステップS342の処理を実行する。なお、以降では、上記と同様に、vはv又はvのいずれか一方を表すものとする。 In step S314, the ZSDD construction unit 103 executes the processes of steps S341 to S342 using each of v k and v r . That is, the ZSDD construction unit 103 uses v k to execute steps S341 to S342, and uses v r to execute steps S341 to S342. Note that hereinafter, similarly to the above, v 0 represents either v k or v r .

ステップS341では、ZSDD構築部103は、vがvtreeの中間ノード(つまり、葉ノード以外のノード)であるか否かを判定する。そして、ステップS341でvがvtreeの中間ノードである判定された場合(ステップS341でYES)、ZSDD構築部103は、再帰的にconstruct(v, Z)を呼ぶ(ステップS342)。これにより、再帰的にZSDDが構築される。 In step S341, the ZSDD construction unit 103 determines whether v is an intermediate node of the vtree (that is, a node other than a leaf node). If it is determined in step S341 that v 0 is an intermediate node of the vtree (YES in step S341), the ZSDD construction unit 103 recursively calls construct(v 0 , Z) (step S342). As a result, ZSDD is recursively constructed.

≪terminal(v, m)≫
次に、terminal(v, m)が呼び出された場合の処理の詳細について、図9を参照しながら説明する。図9は、本実施形態に係るterminal(v, m)の処理の一例を示すフローチャートである。
≪terminal(v, m)≫
Next, details of the process when terminal(v, m) is called will be explained with reference to FIG. FIG. 9 is a flowchart illustrating an example of terminal (v, m) processing according to this embodiment.

ZSDD構築部103は、配列δ()に対してmを設定する(ステップS401)。すなわち、ZSDD構築部103は、配列δ()の各要素に対して、ラベルmの各要素をそれぞれ設定する。なお、δ()は配列であるが、vtreeの各ノードに対して整数値を返す関数とみなすことができる(つまり、この場合、当該配列と当該関数とは等価である。)。 The ZSDD construction unit 103 sets m to the array δ() (step S401). That is, the ZSDD construction unit 103 sets each element of the label m for each element of the array δ(). Although δ() is an array, it can be regarded as a function that returns an integer value for each node of the vtree (that is, in this case, the array and the function are equivalent).

次に、ZSDD構築部103は、δ(u)=δ(u)=0であるか否かを判定する(ステップS402)。ここで、u及びuは、vtreeのノードvに対応するエッジeの両端点のノードである。 Next, the ZSDD construction unit 103 determines whether δ(u 1 )=δ(u 2 )=0 (step S402). Here, u 1 and u 2 are nodes at both end points of edge e corresponding to node v of vtree.

上記のステップS402でδ(u)=δ(u)=0であると判定された場合(ステップS402でYES)、ZSDD構築部103は、終端ZSDDとしてεを呼び出し元に出力する(ステップS403)。 If it is determined in step S402 that δ(u 1 )=δ(u 2 )=0 (YES in step S402), the ZSDD construction unit 103 outputs ε to the caller as the terminal ZSDD (step S403).

一方で、上記のステップS402でδ(u)=δ(u)=0でないと判定された場合(ステップS302でNO)、ZSDD構築部103は、δ(u)=δ(u)=1であるか否かを判定する(ステップS404)。 On the other hand, if it is determined in step S402 that δ(u 1 )=δ(u 2 )=0 (NO in step S302), the ZSDD construction unit 103 calculates δ(u 1 )=δ(u 2 )=1 (step S404).

上記のステップS404でδ(u)=δ(u)=1であると判定された場合、ZSDD構築部103は、終端ZSDDとしてL(v)を呼び出し元に出力する(ステップS405)。L(v)は、vtreeノードvに対応するエッジeを表す。 If it is determined in step S404 that δ(u 1 )=δ(u 2 )=1, the ZSDD construction unit 103 outputs L(v) to the caller as the terminal ZSDD (step S405). L(v) represents edge e corresponding to vtree node v.

一方で、上記のステップS404でδ(u)=δ(u)=1であると判定されなかった場合、ZSDD構築部103は、終端ZSDDとして⊥を呼び出し元に出力する(ステップS406)。 On the other hand, if it is not determined in step S404 that δ(u 1 )=δ(u 2 )=1, the ZSDD construction unit 103 outputs ⊥ to the caller as the terminal ZSDD (step S406). .

≪decomp(v, z)≫
次に、decomp(v, z)が呼び出された場合の処理の詳細について、図10を参照しながら説明する。図10は、本実施形態に係るdecomp(v, z)の処理の一例を示すフローチャートである。
≪decomp(v, z)≫
Next, details of the process when decomp(v, z) is called will be explained with reference to FIG. FIG. 10 is a flowchart illustrating an example of decomp(v, z) processing according to this embodiment.

ZSDD構築部103は、配列labelPairsをφに初期化する(ステップS501)。次に、ZSDD構築部103は、配列δ()に対してm(z)を設定する(ステップS502)。なお、上述したように、m(z)は、決定ZSDDノードzのラベルである。 The ZSDD construction unit 103 initializes the array labelPairs to φ (step S501). Next, the ZSDD construction unit 103 sets m(z) for the array δ() (step S502). Note that, as described above, m(z) is the label of the determined ZSDD node z.

次に、ZSDD構築部103は、enumBoundedArray(δ, v)の実行結果として得られたδの各々に対して、ステップS511~ステップS512の処理を繰り返し実行する(ステップS503)。enumBoundedArray(δ, v)は、ラベルδを持つ決定ZSDDノードの子ノードのうち、vtreeのノードv(つまり、ノードvの左側の子ノード)に対応するノードが取りうるラベルδを全て列挙する関数である。具体的には、u∈V(v)∩(v)であるようなuに対しては0≦δ(u)≦δ(u)とし、 Next, the ZSDD construction unit 103 repeatedly executes the processes of steps S511 to S512 for each of δ k obtained as a result of executing enumBoundedArray(δ, v) (step S503). enumBoundedArray(δ, v) enumerates all labels δ k that can be taken by the node corresponding to node v k of vtree (that is, the left child node of node v) among the child nodes of the decision ZSDD node with label δ. This is a function that does Specifically, for u such that u∈V(v k )∩(v r ), 0≦δ k (u)≦δ(u),

Figure 0007377493000008
であるようなuに対してはδ(u)=δ(u)とし、
Figure 0007377493000008
For u such that δ k (u)=δ(u),

Figure 0007377493000009
であるようなuに対してはδ(u)=0として、δ(u)を要素とするラベルδを順に列挙する。ここで、V(v)は、vを根ノードとする部分vtree(つまり、vtreeの部分木)の葉ノードに対応するエッジの端点となる全てのノードの集合を表す。
Figure 0007377493000009
For u such that δ k (u)=0, labels δ k having δ k (u) as an element are sequentially listed. Here, V(v) represents a set of all nodes that are end points of edges corresponding to leaf nodes of a partial vtree (that is, a partial tree of the vtree) with v as the root node.

ステップS511では、ZSDD構築部103は、calcSubArray(δ, δ, v)の実行結果をδとする。calcSubArray(δ, δ, v)は、各u∈Vに対してδ(u)=δ(u)-δ(u)を計算する関数である。したがって、δは、calcSubArray(δ, δ, v)の実行結果として得られた各δ(u)の要素とするベクトルである。 In step S511, the ZSDD construction unit 103 sets the execution result of calcSubArray(δ, δ k , v) to δ r . calcSubArray(δ, δ k , v) is a function that calculates δ r (u)=δ(u)−δ k (u) for each u∈V. Therefore, δ r is a vector to be used as an element of each δ r (u) obtained as a result of executing calcSubArray(δ, δ k , v).

ステップS512では、ZSDD構築部103は、ラベルの組(δ,δ)をlabelPairsに追加する。 In step S512, the ZSDD construction unit 103 adds the label pair (δ k , δ r ) to labelPairs.

そして、ステップS504では、ZSDD構築部103は、labelPairsを呼び出し元に出力する。これにより、ラベルの組のリストが呼び出し元に出力される
<まとめ>
以上のように、本実施形態に係るZSDD構築装置10は、次数制約を満たすエッジの集合の集合族を表現するZSDDを効率的に構築することができる。したがって、本実施形態に係るZSDD構築装置10を用いることで、集合族演算のための索引として用いることができるZSDDを効率的に得ることができるため、ZSDD構築に関するボトルネックが解消される。また、本実施形態に係るZSDD構築装置10は、次数制約を満たすエッジの集合の集合族を表現するZSDDを構築することができるため、ZSDDを用いた処理の適用範囲の拡大に寄与することができる。
Then, in step S504, the ZSDD construction unit 103 outputs labelPairs to the caller. This will output a list of label pairs to the caller <Summary>
As described above, the ZSDD construction device 10 according to the present embodiment can efficiently construct a ZSDD that expresses a set family of sets of edges that satisfy a degree constraint. Therefore, by using the ZSDD construction device 10 according to the present embodiment, it is possible to efficiently obtain a ZSDD that can be used as an index for set family operations, thereby eliminating bottlenecks related to ZSDD construction. Furthermore, the ZSDD construction device 10 according to the present embodiment can construct a ZSDD that expresses a set family of edges that satisfy a degree constraint, and therefore can contribute to expanding the scope of application of processing using ZSDD. can.

本発明は、具体的に開示された上記の実施形態に限定されるものではなく、特許請求の範囲から逸脱することなく、種々の変形や変更、既知の技術との組み合わせ等が可能である。 The present invention is not limited to the above-described specifically disclosed embodiments, and various modifications and changes, combinations with known techniques, etc. are possible without departing from the scope of the claims.

10 ZSDD構築装置
101 入力部
102 vtree獲得部
103 ZSDD構築部
104 出力部
201 入力装置
202 表示装置
203 外部I/F
203a 記録媒体
204 通信I/F
205 プロセッサ
206 メモリ装置
207 バス
10 ZSDD construction device 101 Input section 102 vtree acquisition section 103 ZSDD construction section 104 Output section 201 Input device 202 Display device 203 External I/F
203a Recording medium 204 Communication I/F
205 processor 206 memory device 207 bus

Claims (6)

ノードの集合Vとエッジの集合Eとで構成されるグラフGと、前記ノードを端点とするエッジ数に関する制約を表す次数制約とを入力する入力部と、
前記グラフGと前記次数制約と前記グラフGに対応するvtreeとに基づいて、前記集合Eの部分集合であって、かつ、前記次数制約を満たすエッジの部分集合で構成される集合族を表すZSDDを構築する構築部と、
を有することを特徴とするZSDD構築装置。
an input unit for inputting a graph G composed of a set V of nodes and a set E of edges, and a degree constraint representing a constraint regarding the number of edges with the node as an end point;
Based on the graph G, the degree constraint, and the vtree corresponding to the graph G, ZSDD represents a set family that is a subset of the set E and is composed of a subset of edges that satisfy the degree constraint. a construction section that constructs the
A ZSDD construction device comprising:
前記構築部は、
前記ZSDDの根ノードとして、前記vtreeの根ノードに対応するノードを設定すると共に、前記ZSDDの根ノードに対して、前記グラフの各ノードの次数制約を要素とするベクトルをラベルとして設定し、
前記ZSDDの根ノードを決定ノードと設定した上で、前記vtreeのノードを表すvtreeのうち、前記決定ノードに対応するvtreeノードの子ノードが葉ノードとなるまで、前記決定ノードに対して前記ZSDDの子ノードを設定すると共に前記ZSDDの子ノードを決定ノードとすることを繰り返すことで、前記ZSDDを構築する、ことを特徴とする請求項1に記載のZSDD構築装置。
The construction section is
A node corresponding to the root node of the vtree is set as the root node of the ZSDD, and a vector whose elements are degree constraints of each node of the graph G is set as a label for the root node of the ZSDD,
After setting the root node of the ZSDD as a decision node, the ZSDD is applied to the decision node until a child node of the vtree node corresponding to the decision node among the vtrees representing the nodes of the vtree becomes a leaf node. 2. The ZSDD construction device according to claim 1, wherein the ZSDD is constructed by repeatedly setting a child node of the ZSDD and setting the child node of the ZSDD as a decision node.
前記ZSDDの子ノードには、前記決定ノードの左側の子ノードを表すプライムと、前記決定ノードの右側の子ノードを表すサブとが含まれ、
前記構築部は、
前記プライムが取りうるラベルと前記サブが取りうるラベルとの組のリストを用いて、前記決定ノードに対して設定される、前記ZSDDの子ノードを生成する、ことを特徴とする請求項2に記載のZSDD構築装置。
The child nodes of the ZSDD include a prime representing a left child node of the decision node and a sub representing a right child node of the decision node,
The construction section is
3. A child node of the ZSDD to be set for the decision node is generated using a list of pairs of labels that can be taken by the prime and labels that can be taken by the sub. The ZSDD construction device described.
前記構築部は、
前記決定ノードに対応するvtreeノードの子ノードが葉ノードとなった場合は、前記葉ノードと前記プライム又は前記サブが取りうるラベルとを用いて、前記ZSDDの終端ノートを、前記ZSDDの子ノードとして設定し、
前記決定ノードに対応するvtreeノードの子ノードが葉ノードでない場合は、前記vtreeノードの子ノードと前記プライム又は前記サブが取りうるラベルとを用いて、前記vtreeノードの子ノードに対応する決定ノードであって、かつ、前記プライム又は前記サブが取りうるラベルを持つ決定ノードを、前記ZSDDの子ノードとして設定する、ことを特徴とする請求項3に記載のZSDD構築装置。
The construction section is
When the child node of the vtree node corresponding to the decision node becomes a leaf node, the terminal note of the ZSDD is changed to the child node of the ZSDD using the leaf node and the label that the prime or the sub can take. Set as,
If the child node of the vtree node corresponding to the decision node is not a leaf node, use the child node of the vtree node and the label that the prime or the sub can take to create the decision node corresponding to the child node of the vtree node. 4. The ZSDD construction device according to claim 3, wherein a decision node having a label that can be taken by the prime or the sub is set as a child node of the ZSDD.
ノードの集合Vとエッジの集合Eとで構成されるグラフGと、前記ノードを端点とするエッジ数に関する制約を表す次数制約とを入力する入力手順と、
前記グラフGと前記次数制約と前記グラフGに対応するvtreeとに基づいて、前記集合Eの部分集合であって、かつ、前記次数制約を満たすエッジの部分集合で構成される集合族を表すZSDDを構築する構築手順と、
をコンピュータが実行することを特徴とするZSDD構築方法。
an input procedure for inputting a graph G composed of a set V of nodes and a set E of edges, and a degree constraint representing a constraint regarding the number of edges with the node as an end point;
Based on the graph G, the degree constraint, and the vtree corresponding to the graph G, ZSDD represents a set family that is a subset of the set E and is composed of a subset of edges that satisfy the degree constraint. The construction steps to build the
A ZSDD construction method characterized in that a computer executes the following.
コンピュータを、請求項1乃至4の何れか一項に記載のZSDD構築装置として機能させるためのプログラム。 A program for causing a computer to function as the ZSDD construction device according to any one of claims 1 to 4.
JP2020074831A 2020-04-20 2020-04-20 ZSDD construction device, ZSDD construction method and program Active JP7377493B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020074831A JP7377493B2 (en) 2020-04-20 2020-04-20 ZSDD construction device, ZSDD construction method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020074831A JP7377493B2 (en) 2020-04-20 2020-04-20 ZSDD construction device, ZSDD construction method and program

Publications (2)

Publication Number Publication Date
JP2021174061A JP2021174061A (en) 2021-11-01
JP7377493B2 true JP7377493B2 (en) 2023-11-10

Family

ID=78281798

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020074831A Active JP7377493B2 (en) 2020-04-20 2020-04-20 ZSDD construction device, ZSDD construction method and program

Country Status (1)

Country Link
JP (1) JP7377493B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017111622A (en) 2015-12-16 2017-06-22 日本電信電話株式会社 Calculation executing device, method, and program
JP2018041161A (en) 2016-09-05 2018-03-15 日本電信電話株式会社 Zsdd construction device, method, and program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017111622A (en) 2015-12-16 2017-06-22 日本電信電話株式会社 Calculation executing device, method, and program
JP2018041161A (en) 2016-09-05 2018-03-15 日本電信電話株式会社 Zsdd construction device, method, and program

Also Published As

Publication number Publication date
JP2021174061A (en) 2021-11-01

Similar Documents

Publication Publication Date Title
EP3029614B1 (en) Parallel development and deployment for machine learning models
Stenz et al. Exploring tree-like and non-tree-like patterns using genome sequences: an example using the inbreeding plant species Arabidopsis thaliana (L.) Heynh
US9251156B2 (en) Information processing devices, method, and recording medium with regard to a distributed file system
JP2015064876A (en) Computer-implemented method for designing industrial product modeled with binary tree
Eizenga et al. Efficient dynamic variation graphs
CN111914378B (en) Single-amplitude quantum computing simulation method and device
Iverson et al. Evaluation of connected-component labeling algorithms for distributed-memory systems
ANe et al. Missing the forest for the trees: Phylogenetic compression and its implications for inferring complex evolutionary histories
CN111915011A (en) Single-amplitude quantum computation simulation method
Ferdous et al. Solving the minimum common string partition problem with the help of ants
JP6500896B2 (en) Attribute enumeration system, attribute enumeration method and attribute enumeration program
KR102227912B1 (en) Optimized data condenser and method
JP7377493B2 (en) ZSDD construction device, ZSDD construction method and program
EP3196780A1 (en) Information processing device, information processing method, and computer-readable storage medium
Büchler et al. An improved encoding of genetic variation in a Burrows–Wheeler transform
KR101700108B1 (en) Method and Apparatus for Network Clustering
Singh et al. Cuckoo search optimization for job shop scheduling problem
Molloy et al. FastMulRFS: Statistically consistent polynomial time species tree estimation under gene duplication
Das et al. Large-scale parallel genome assembler over cloud computing environment
JP7494945B2 (en) Strict Coverage Calculation Method, Strict Coverage Calculation Device, and Program
JP2018041161A (en) Zsdd construction device, method, and program
JP6709740B2 (en) Strictly spread calculation device, method, and program
Benachour et al. Fast parallel algorithms for finding elementary circuits of a directed graph: a GPU-based approach
JP5736336B2 (en) Matrix vector product computing device, matrix vector product computing method, and matrix vector product computing program
Kelk et al. Finding a most parsimonious or likely tree in a network with respect to an alignment

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7426

Effective date: 20200423

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20200423

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220802

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230718

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230719

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230915

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: 20231010

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20231020

R150 Certificate of patent or registration of utility model

Ref document number: 7377493

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150