maths.freeCombinatorics & Graph Theory › 12. Graph Theory › Graph Basics

Graph Basics

Identify parts of a graph.

Parts of a Graph

In a graph, the objects are represented with dots and their connections are represented with lines like those in . displays a simple graph labeled G and a multigraph labeled H. The dots are called vertices; an individual dot is a vertex, which is one object of a set of objects, some of which may be connected. We often label vertices with letters. For example, Graph G has vertices a, b, c, and d, and Multigraph H has vertices, e, f, g, and h. Each line segment or connection joining two vertices is referred to as an edge. H is considered a multigraph because it has a double edge between f and h, and a double edge between h and g. Another reason H is called a multigraph is that it has a loop connecting vertex e to itself; a loop is an edge that joins a vertex to itself. Loops and double edges are not allowed in a simple graph.

To sum up, a simple graph is a collection of vertices and any edges that may connect them, such that every edge connects two vertices with no loops and no two vertices are joined by more than one edge. A multigraph is a graph in which there may be loops or pairs of vertices that are joined by more than one edge. In this chapter, most of our work will be with simple graphs, which we will call graphs for convenience.

It is not necessary for the edges in a graph to be straight. In fact, you can draw an edge any way you want. In graph theory, the focus is on which vertices are connected, not how the connections are drawn (see ). In a graph, each edge can be named by the two letters of the associated vertices. The four edges in Graph X in are ab, ac, ad, and ae. The order of the letters is not important when you name the edge of a graph. For example, ab refers to the same edge as ba.

Identifying Edges and Vertices

Try it.

Name all the vertices and edges of graph F in .

Solution

The vertices are v, w, x, y, and z. The edges are vw, vx, wx, wz, xy, and xz.

Identifying Vertices That Are Not Adjacent

Try it.

Name all the pairs of vertices of graph F in that are not adjacent.

Solution

The pairs of vertices that are not adjacent in graph F are v and y, v and z, w and y, and y and z.

Condensed — the full section is in OpenStax Contemporary Mathematics.

Analyzing Geographical Maps with Graphs

When graphs are used to model and analyze real-world applications, the number of edges that meet at a particular vertex is important. For example, a graph may represent the direct flight connections for a particular airport as in . Representing the connections with a graph rather than a map shifts the focus away from the relative positions and toward which airports are connected. In , the vertices are the airports, and the edges are the direct flight paths. The number of flight connections between a particular airport and other South Florida airports is the number of edges meeting at a particular vertex. For example, Key West has direct flights to three of the five airports on the graph. In graph theory terms, we would say that vertex FYW has degree 3. The degree of a vertex is the number of edges that connect to that vertex.

Determining the Degree of a Vertex

Try it.

Determine the degree of each vertex of Graph J in . If graph J represents direct flights between a set of airports, do any of the airports have direct flights to two or more of the other cities on the graph?

Solution

For each vertex, count the number of edges that meet at that vertex. This value is the degree of the vertex. In , the dashed edges indicate the edges that meet at the marked vertex.

Vertex a has degree 3, vertex b has degree 1, vertices c and d each have degree 2, and vertex e has degree 0. Airports a, c, and d have direct flights to two or more of the other airports.

Graphs are also used to analyze regional boundaries. The states of Utah, Colorado, Arizona, and New Mexico all meet at a single point known as the “Four Corners,” which is shown in the map in .

In , each vertex represents one of these states, and each edge represents a shared border. States like Utah and New Mexico that meet at only a single point are not considered to have a shared border. By representing this map as a graph, where the connections are shared borders, we shift our perspective from physical attributes such as shape, size and distance, toward the existence of the relationship of having a shared boundary.

Graphing the Midwestern States

Try it.

A map of the Midwest is given in . Create a graph of the region in which each vertex represents a state and each edge represents a shared border.

Solution

Step 1: For each state, draw and label a vertex as in .

Step 2: Draw edges between any two states that share a common land border as in .

The graph is given in .

Graphs of Social Interactions

Geographical maps are just one of many real-world scenarios which graphs can depict. Any scenario in which objects are connected to each other can be represented with a graph, and the connections don’t have to be physical. Just think about all the connections you have to people around the world through social media! Who is in your network of Twitter followers? Whose Snapchat network are you connected to?

Graphing Chloe’s

Try it.

Roblox is an online gaming platform. Chloe is interested to know how many people in her network of Roblox friends are also friends with each other so she polls them. Explain how a graph or multigraph might be drawn to model this scenario by identifying the objects that could be represented by vertices and the connections that could be represented by edges. Indicate whether a graph or a multigraph would be a better model.

Solution

The objects that are represented with vertices are Roblox friends. A Roblox friendship between two friends will be represented as an edge between a pair of vertices. There will be no double edges because it is not possible for two friends to be linked twice in Roblox; they are either friends or they are not. Also, a player cannot be a friend to themself, so there is no need for a loop. Since there are no double edges or loops, this is best represented as a graph.

Key Concepts

  • Graphs and multigraphs represent objects as vertices and the relationships between the objects as edges.
  • The degree of a vertex is the number of edges that meet it and the degree can be zero.
  • An edge must have a vertex at each end.
  • Multigraphs may contain loops and double edges, but simple graphs may not.

Practice (5)

Try each one on paper first. Reveal the answer to check; verified ones can be opened in the solver for every step.

  1. Name all the vertices and edges of graph F in .

    Odkrij odgovor

    The vertices are v, w, x, y, and z. The edges are vw, vx, wx, wz, xy, and xz.

  2. Name all the pairs of vertices of graph F in that are not adjacent.

    Odkrij odgovor

    The pairs of vertices that are not adjacent in graph F are v and y, v and z, w and y, and y and z.

  3. Determine the degree of each vertex of Graph J in . If graph J represents direct flights between a set of airports, do any of the airports have direct flights to two or more of the other cities on the graph?

    Odkrij odgovor

    For each vertex, count the number of edges that meet at that vertex. This value is the degree of the vertex. In , the dashed edges indicate the edges that meet at the marked vertex.

    Vertex a has degree 3, vertex b has degree 1, vertices c and d each have degree 2, and vertex e has degree 0. Airports a, c, and d have direct flights to two or more of the other airports.

  4. A map of the Midwest is given in . Create a graph of the region in which each vertex represents a state and each edge represents a shared border.

    Odkrij odgovor

    Step 1: For each state, draw and label a vertex as in .

    Step 2: Draw edges between any two states that share a common land border as in .

    The graph is given in .

  5. Roblox is an online gaming platform. Chloe is interested to know how many people in her network of Roblox friends are also friends with each other so she polls them. Explain how a graph or multigraph might be drawn to model this scenario by identifying the objects that could be represented by vertices and the connections that could be represented by edges. Indicate whether a graph or a multigraph would be a better model.

    Odkrij odgovor

    The objects that are represented with vertices are Roblox friends. A Roblox friendship between two friends will be represented as an edge between a pair of vertices. There will be no double edges because it is not possible for two friends to be linked twice in Roblox; they are either friends or they are not. Also, a player cannot be a friend to themself, so there is no need for a loop. Since there are no double edges or loops, this is best represented as a graph.

Symbols used here

n!
factorial
n × (n−1) × … × 1; the number of orderings of n things. 0! = 1.
\binom{n}{k}
binomial coefficient, "n choose k"
Number of k-element subsets of n things: n!/(k!(n−k)!).
\sum_{k=1}^{n} a_k
summation
Add a_k for k = 1 up to n.
\prod_{k=1}^{n} a_k
product
Multiply a_k for k = 1 up to n.
\emptyset,\ |A|
empty set, cardinality
The set with no elements; the number of elements of A.

How to: Graph Basics

  1. Identify parts of a graph.
  2. Model applications of graph basics.
  3. vertex
  4. edge
  5. loop
  6. graph (simple graph)
  7. multigraph
  8. adjacent (neighboring)

Questions people ask

Permutation or combination?

Ask whether order matters. A lock code is a permutation (order matters); a hand of cards is a combination (it does not).

What is a graph in this sense?

Dots (vertices) joined by lines (edges) — not a plot. Road maps, social networks and molecules are graphs; questions like "is there a route" and "how few colours" are graph theory.

Poskusi sam.

Parts of this page are adapted from OpenStax Contemporary Mathematics (CC BY-NC-SA 4.0). Condensed and re-explained here; errors are ours.

Več v Combinatorics & Graph Theory