0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

グラフを隣接行列で表す

Posted at

応用情報技術者平成29年秋期 午前6

ノード1~5をもつグラフを隣接行列で表したもののうち,木となるものはどれか。ここで,隣接行列のi行j列目の成分は,ノードiとノードjを結ぶエッジがある場合は1,ない場合は0とする。

image.png

ア、ノード間のエッジは"1-2","1-5","2-3","3-4","4-5"の5つです。
image.png

イ、ノード間のエッジは"1-2","1-5","2-3","2-4"の4つです。
image.png

・木構造とは
1つの根と複数の節点および節点(根を含む)同士を結ぶ辺で構成され、ループをもたないデータ構造です。

参照:
https://www.ap-siken.com/kakomon/29_aki/q6.html

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?