グラフ g で辺の数が最大の独立辺集合を求める.
FindIndependentEdgeSet[{vw,…}]
規則 vw を使ってグラフ g を指定する.
FindIndependentEdgeSet
グラフ g で辺の数が最大の独立辺集合を求める.
FindIndependentEdgeSet[{vw,…}]
規則 vw を使ってグラフ g を指定する.
詳細とオプション
- 独立辺集合はマッチングとも呼ばれる.
- 独立辺集合とは決して同じ頂点に接続しない辺集合のことである.
- FindIndependentEdgeSetは辺のリストを返す.
- FindIndependentEdgeSetは,無向グラフ,有向グラフ,重み付きグラフ,多重グラフに使うことができる.
例題
すべて開く すべて閉じる例 (1)
スコープ (6)
FindIndependentEdgeSetは無向グラフに使うことができる:
FindIndependentEdgeSet[[image]]FindIndependentEdgeSet[[image]]FindIndependentEdgeSet[[image]]FindIndependentEdgeSet[[image]]FindIndependentEdgeSet[{1 -> 3, 2 -> 1, 3 -> 6, 4 -> 6, 1 -> 5, 5 -> 4, 6 -> 1}]FindIndependentEdgeSetは大きいグラフに使うことができる:
g = GridGraph[{10, 10, 10, 10}];FindIndependentEdgeSet[g]//Length//Timingアプリケーション (3)
会社にはいくつもの仕事がある.各社員に適した仕事がある.どの社員も1度に1つの仕事しかできない:
edges = Table[Subscript[P, i]Subscript[J, j], {i, 1, 6}, {j, Union[RandomInteger[{1, 5}, 2]]}]//Flattencoords = Join[Table[Subscript[P, i] -> {0, i - 3}, {i, 6}], Table[Subscript[J, j] -> {3, j - 2.5}, {j, 5}]];Graph[edges, VertexShapeFunction -> "Name", VertexCoordinates -> coords]FindIndependentEdgeSet[%]ある女性の集団があると仮定する.それぞれの女性に好みの男性の部分集団がある.好みに合うマッチングだけを使った場合の最大マッチングを求める:
edges = Table[Subscript[W, i]Subscript[M, j], {i, 1, 4}, {j, Union[RandomInteger[{1, 4}, 2]]}]//Flattencoords = Join[Table[Subscript[W, i] -> {0, i - 1}, {i, 4}], Table[Subscript[M, j] -> {2, j - 1}, {j, 4}]];Graph[edges, VertexShapeFunction -> "Name", VertexCoordinates -> coords]FindIndependentEdgeSet[%]美術史学科で6つのコースが開設される.教授数は8人で,誰もがある特定のコースなら教えても構わないと言っている.どの教授も自分が興味を持つコースだけを教える最大マッチングを求める:
edges = Table[Subscript[C, i]Subscript[P, j], {i, 1, 7}, {j, Union[RandomInteger[{1, 8}, 3]]}]//Flatten;coor = Join[Table[Subscript[C, i] -> {0, i - 0.5}, {i, 7}], Table[Subscript[P, j] -> {4, j - 1}, {j, 8}]];Graph[edges, VertexShapeFunction -> "Name", VertexCoordinates -> coor]FindIndependentEdgeSet[%]特性と関係 (3)
辺集合が独立辺集合かどうかIndependentEdgeSetQを使って調べる:
PetersenGraph[5, 2]IndependentEdgeSetQ[%, FindIndependentEdgeSet[%]]g = CompleteGraph[{2, 3}]Length[FindVertexCover[g]] == Length[FindIndependentEdgeSet[g]]孤立した頂点のないグラフの場合,独立辺集合のサイズと辺被覆のサイズの和は頂点数に等しい:
g = PetersenGraph[5, 2]Length[FindEdgeCover[g]] + Length[FindIndependentEdgeSet[g]] == VertexCount[g]関連するガイド
-
▪
- グラフの被覆と独立集合 ▪
- グラフ上の計算
テキスト
Wolfram Research (2010), FindIndependentEdgeSet, Wolfram言語関数, https://reference.wolfram.com/language/ref/FindIndependentEdgeSet.html (2015年に更新).
CMS
Wolfram Language. 2010. "FindIndependentEdgeSet." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/FindIndependentEdgeSet.html.
APA
Wolfram Language. (2010). FindIndependentEdgeSet. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindIndependentEdgeSet.html
BibTeX
@misc{reference.wolfram_2026_findindependentedgeset, author="Wolfram Research", title="{FindIndependentEdgeSet}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/FindIndependentEdgeSet.html}", note=[Accessed: 11-November-2026]}
BibLaTeX
@online{reference.wolfram_2026_findindependentedgeset, organization={Wolfram Research}, title={FindIndependentEdgeSet}, year={2015}, url={https://reference.wolfram.com/language/ref/FindIndependentEdgeSet.html}, note=[Accessed: 11-November-2026]}