week-8-9 - Graphs A graph G consists of a set of vertices V...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Graphs A graph G consists of a set of vertices V together with a set E of vertex pairs or edges . Graphs are important because any binary relation is a graph, so graphs can be used to represent essentially any relationship. What could this mean? Living Room Den Bedroom Kitchen Hallway Bath Living Den Room Hall Bed Kitchen Bath Apartment Blueprint The vertices could represent rooms in a house, and the edges could indicate which of those rooms are connected to each other. Sometimes a using a graph will be an easy simplification for a problem. What else could a Graph mean? • Vertices are cities and edges are the roads connecting them. • Edges are the components in a circuit and vertices are junctions where they connect. • Vertices are software packages and edges indicate those that can interact. • Edges are phone conversations and vertices are the households being connected.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Friendship Graphs Auntie M. Tin Man The Wicked Witch of the West Each vertex represents a person, and each edge indicates that the two people are friends. Dorothy Scarecrow Cowardly Lion Questions. .. If I’m your friend, are you my friend? A graph is said to be undirected if edge ( x , y ) always implies ( y , x ). Otherwise it is said to be directed . Am I my own friend? An edge of the form ( x , x ) is said to be a loop . If x was y ’s friend several times over, we can model this relationship using multiedges . A graph is said to be simple if it contains no loops or multiedges. How close a friend are you? A graph is said to be weighted if each edge has an associated numerical attribute. In an unweighted graph, all edges are assumed to be of equal weight. More questions. .. Am I linked by some chain of friends to someone famous? A path is a any sequence of edges that connect two vertices. A simple path never goes through any vertex more than once. The shortest path is the minimum number edges needed to connect two vertices. Is there a path connecting every two people in the world? The “six degrees of separation” theory argues that there is always a short path between any two people in the world. A graph is connected if there is there is a path between any two vertices. A directed graph is strongly connected if there is always a directed path between vertices. Any subgraph that is connected can be referred to as a connected component .
Background image of page 2
3 Still More Questions. .. Who has the most and who has the fewest friends? The degree of a vertex is the number of edges connected to it. The most popular person will have a vertex of the highest degree. Remote hermits may have degree-zero vertices. In dense graphs, most vertices have high degree. In sparse graphs, most vertices have low degree. In a regular graph , all vertices have exactly the same degree. What is the largest clique?
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 18

week-8-9 - Graphs A graph G consists of a set of vertices V...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online