Simple Graphs:
← Older revision | Revision as of 12:30, 4 June 2011 | ||
(2 intermediate revisions by one user not shown) | |||
Line 1,466: | Line 1,466: | ||
| colspan="3" |<center>no-loops, no multi-edges, no directions</center> | | colspan="3" |<center>no-loops, no multi-edges, no directions</center> | ||
|} | |} | ||
+ | |||
+ | {{ExerciseRobox|title=Exercise: Simple Graphs}} | ||
+ | Give the definition of a simple graph | ||
+ | {| class='collapsible collapsed' style='border: none;' | ||
+ | | '''Answer:''' | ||
+ | ! colspan="2" | | ||
+ | |- | ||
+ | | colspan="2" | All of them – everything is done by consensus. | ||
+ | | | ||
+ | |} | ||
+ | Which of the following graphs are simple graphs? | ||
+ | |||
+ | |||
+ | {| class='collapsible collapsed' style='border: none;' | ||
+ | | '''Answer:''' | ||
+ | ! colspan="2" | | ||
+ | |- | ||
+ | | colspan="2" | All of them – everything is done by consensus. | ||
+ | | | ||
+ | |} | ||
+ | {{Robox/Close}} | ||
===How to store graphs on computers=== | ===How to store graphs on computers=== | ||
Line 1,855: | Line 1,876: | ||
| | | | ||
|} | |} | ||
- | |||
- | |||
Draw a graph for the following Adjacency Matrix: | Draw a graph for the following Adjacency Matrix: | ||
- | + | {| class='wikitable' | |
- | {| class='collapsible collapsed' style='border: none;' | ||
- | | '''Answer:''' | ||
- | ! colspan="2" | | ||
|- | |- | ||
- | | colspan="2" | All of them – everything is done by consensus. | + | ! !! A !! B !! D !! F !! N |
- | | | + | |- |
+ | | A || 0 || 0 || 1 || 1 || 0 | ||
+ | |- | ||
+ | | B || 0 || 0 || 0 || 1 || 1 | ||
+ | |- | ||
+ | | D || 0 || 0 || 1 || 0 || 1 | ||
+ | |- | ||
+ | | F || 1 || 0 || 1 || 0 || 0 | ||
+ | |- | ||
+ | | N || 0 || 0 || 1 || 0 || 0 | ||
|} | |} | ||
- | |||
- | Draw a graph for the following Adjacency Matrix | ||
- | |||
{| class='collapsible collapsed' style='border: none;' | {| class='collapsible collapsed' style='border: none;' | ||
| '''Answer:''' | | '''Answer:''' | ||
! colspan="2" | | ! colspan="2" | | ||
|- | |- | ||
- | | colspan='2' | All of them – everything is done by consensus. | + | | colspan='2' | [[File:CPT-Graphs-directed-unweighted-ex1.svg|175px]] |
| | | | ||
|} | |} | ||
Draw a graph for the following Adjacency Matrix | Draw a graph for the following Adjacency Matrix | ||
- | + | {| class='wikitable' | |
+ | |- | ||
+ | ! !! A !! B !! D !! F !! N | ||
+ | |- | ||
+ | | A || ∞ || 14 || ∞ || ∞ || ∞ | ||
+ | |- | ||
+ | | B || ∞ || ∞ || 23 || 13 || ∞ | ||
+ | |- | ||
+ | | D || 5 || ∞ || ∞ || ∞ || ∞ | ||
+ | |- | ||
+ | | F || 43 || ∞ || ∞ || ∞ || 33 | ||
+ | |- | ||
+ | | N || ∞ || 22 || ∞ || 11 || ∞ | ||
+ | |} | ||
{| class='collapsible collapsed' style='border: none;' | {| class='collapsible collapsed' style='border: none;' | ||
| '''Answer:''' | | '''Answer:''' | ||
! colspan="2" | | ! colspan="2" | | ||
|- | |- | ||
- | | colspan='2' | All of them – everything is done by consensus. | + | | colspan='2' | [[File:CPT-Graphs-directed-weighted-ex2.svg|175px]] |
| | | | ||
|} | |} |
No comments:
Post a Comment