Chapter 7 : Graphs and Trees Flashcards
What is the application of Graphs?
- Social Networks
- Communications Networks
- Information Networks
- Transportation Networks
What are the Graphs mean in this chapter?
- A particular class of discreate structures that is useful for representing relations and has a convenient webby-looking graphical representation
List out the 2 types of graphs
- Undirected Graphs
- Directed Graphs
Fill in the blank and describe G = ( _ , _ )
- V
- E
- Description
V, a nonempty set of vertices ( nodes )
E , a set of edges
G = ( V , E )
V = { V1, V2 }
E = { { V1, V2} , {V2, V1} }
What does Undirected Graph have?
- Simple Graph
- Multigraph
- Pseudograph
What is the definition of Simple Graph?
- Each edge connects 2 different vertices and where no 2 edges connect the same pair of vertices is called a simple graph
A → B → C
- Simple graph has not loop and no multiple edges
What edges that Multigraph have than Simple graphs?
- Multiple edges connecting the same vertices
A → B
A ← B
What edges that Pseudograph have to be called as Pseudographs? ( 2 )
- Include loops
- Multiple Edges ( Optional ) → Like multigraph
⋂
A
When the graph is Simple Directed Graph?
- When a directed graph has no loops and no multiple directed edges ( multiedges )
- Multiedges
A → B
A → B
2 Line going to the same direction
When the graph is Directed Multigraph?
- Graphs that may have multiples directed edges from a vertex to a second vertex to model networks
- Graphs that have multieges
What does Vertices represented in?
- dot .
- It is also called as Nodes
What does Edges represented in?
- line
______
Use both Vertices and Edges to create a graph
What is Adjacent?
- A vertex connected to another vertex1 — 2
|
3
Node 1 and 2 are adjacent because they are connected
Node 2 and 3 are not adjacent because they are not connected by edge
It’s about a direct connection
Adjacent nodes are “next to” each other
What is Incident?
- A vertex connected to an edge1 — 2 (edge ‘e1’)
| (edge ‘e2’)
3
Edge e1 is incident to 1 and 2
Edge e2 is incident to 1 and 3
Node 1 is incident to e1 and e2
Node 3 is incident to e2
*It’s about an edge “touching” or being connected to a node at its end**
An incident edge “ends at” a node
What is a degree?
- Number of Edges incident with the Vertices
- Denoted by deg(v) where v is a vertex
Calculate degree below:
1. A → B
→ C
→ D
2. ⋂ ( Loop )
A
- deg(A) = 3
- deg(A) = 2
What is degree 0 called?
- Isolation
What is in-degree? And list out the terminology
- Arrows going in
- deg ⁻(V)
What is out-degree? And list out the terminology
- Arrows going out
- deg ⁺(V)
Why does the loop at a vertex contributes 2 in degree?
- Because a loop has both in-degree and out-degree
Undirected
- Degree
Directed
- In-Degree
- Out-Degree
What does Handshaking Theorem calculates in Undirected Graph?
- Calculate the total number of degree in a Undirected Graph
- In Directed Graph, the method calculate different things
How many edges are there in a graph with 10 vertices each of degree six
10 x 6 = 2e
60 = 2e
e = 30
Total Degree = 10 x 6 since each vertices has 6 degree ( 6 + 6 + 6 + … + 6 = 60 )
How many edges are there in a graph with 5 vertices each of degree 3?
5 x 3 = 2e
15 = 2e
e = 7.5
∴ Graph doesn’t exist
Draw a simple undirected graph whose degree sequence is
1. ( 1 , 1 , 2 , 2 , 4 )
2 ———— 2
\ /
\ /
\ /
1——4——-1
1 + 2 + 2 + 1 + 4 = 2e
10 = 2e
e = 5
Draw the most number of edges first ( 4 in this question ), then extend it