Lesson Sets-Nodes-Edges:
Representing Complex Networks in Graph Theory

Quick Look

Grade Level: 9 (7-10)

Time Required: 45 minutes

Lesson Dependency: None

A drawing that looks at first glance like a starry night sky or an image of the universe. It is actually a graphical representation of part of the internet as of one date in 2005. Each node represents a device (such as a computer or printer) connected to the internet. Lines (called edges) connect devices that are directly linked to each other. Line length represents the communication delay between the nodes. Colors represent specific internet domain groups.
Networked systems, such as the internet, can be large and enormously complex. This poses a challenge to scientists and engineers who study such networks. Powerful mathematical concepts, such as graph theory, can be used to effectively analyze complex networks.
copyright
Copyright © The Opte Project http://commons.wikimedia.org/wiki/File:Internet_map_1024.jpg

Summary

Students learn about complex networks and how to represent them using graphs. They also learn that graph theory is a useful mathematical tool for studying complex networks in diverse applications of science and engineering, such as neural networks in the brain, biochemical reaction networks in cells, communication networks, such as the internet, and social networks. Topics covered include set theory, defining a graph, as well as defining the degree of a node and the degree distribution of a graph.

Engineering Connection

Complex networks of interacting components are at the core of many problems of scientific and engineering interest, and this realization has caused the interdisciplinary study of networks to grow rapidly during the past decade. Neural engineers represent the connectivity of neurons in the human brain using graphs, whereas, electrical engineers use graphs to understand large and complex systems, such as the internet. The software engineers at Facebook use graphs to enable us to visualize social relationships, whereas, bioengineers study how an infectious disease, like the flu, might spread over a social network. Understanding the mathematics behind graph theory can help biomedical engineers and scientists to develop better cancer treatments and electrical engineers to design faster and more reliable communication networks among electronic devices.

Learning Objectives

After this lesson, students should be able to:

  • Provide examples of complex networks and formally represent them by graphs.
  • Draw a visual representation of a graph and provide a formal description in terms of nodes and edges.
  • Identify the degree of a node in a graph and calculate the degree distribution of the graph.

Introduction/Motivation

We all live in a connected world. Many, if not all, of us have cell phones capable of sending signals to nearby cellular towers, which can be bounced all over the world to potentially reach other people with phones. Likewise, we have access to computers, which can connect to other computers all over the world using the internet. While these networked systems of interconnected components are triumphs of modern engineering, nature has been producing large and complex networks for millions of years.

Can anyone think of other examples of complex networks? (Listen to student ideas. Use bullet points below for some answers and corresponding motivating discussion.)

  • The human brain contains billions of neurons. Each neuron can transmit information to a large number (up to about 10,000) of other neurons through complex synaptic connections. Neural scientists are eager to understand how this complex network of interconnected neurons produces the vast complexity of human thoughts and consciousness.
  • Molecules inside cells of living organisms, such as proteins, interact with each other through biochemical reactions to produce other molecules that regulate and control biological function. Networks of biochemical reactions are so complex that cell biologists struggle to decipher their structures and understand their functions (see Figure 2). Diseases, such as cancer, can occur when certain biochemical reactions fail to function properly. Understanding which reactions are responsible for the onset of a disease can lead to pharmacological therapies to repair malfunctioning biochemical reactions and thus help doctors treat the disease.
  • Humans form social networks of various types: money flows through economic networks, diseases spread by infected individuals in contact with healthy individuals, information and ideas flow over friendship/acquaintance networks, such as Facebook, and beliefs and opinions are formed and modified based on conversations and discussions we have with trusted friends.
  • Electricity is transmitted through elaborate and complex power grids from generators to entire countries, cities and individual end users. Building power grid networks that are resilient to intense weather phenomena and robust to increasing electricity demands (for example, during summer months when air conditioning use is high) is of great importance. A continuous and stable supply of this important commodity enhances our standard of living and enables us to pursue our everyday activities with no major interruptions.

Network scientists and engineers spend a great deal of time studying complex networks, such as these. The size and complexity of these systems means that a network scientist or engineer cannot rely only on her intuition when she tries to design, analyze and understand their functional properties. Important mathematical concepts, such as graph theory, are used extensively by scientists and engineers to develop a common mathematical framework for modeling complex networks. Using this framework, they can effectively communicate with each other and develop techniques and software for studying the properties and design principles of complex networks using powerful computers.

Next, we introduce the concept of a graph, which is at the foundation of graph theory, and discuss how this mathematical construct is used to represent complex networks. (Continue on to present to students the content on set theory, graphs and degree distribution covered in the Background section, and the associated assessments.) Following the lesson, encourage students to conduct the fun associated activity Start Networking! where they create and analyze an example complex network by interacting with their peers in the classroom and documenting the interactions.

Lesson Background and Concepts for Teachers

A Brief Overview of Set Theory

It is necessary for students to be familiar with the mathematical concept of sets. It is not however necessary for students to understand all details of set theory. For additional information, see "Set (mathematics)" at Wikipedia.

A set is a collection of well-defined distinct objects. Mathematically, a set is represented as a list of objects contained inside curly braces, {}, and separated by commas. So, the set S = {1, 2, 3} contains the first three natural numbers, 1, 2 and 3, as its members. We say that 1 is an element of the set S, and we write this as 1 ∈ S. Any given object is either a member of a given set or it is not. For example, 4 is not an element of the set S, and we write this as 4 ∉ S. The order of the items in a set does not matter, so S = {1, 2, 3} = {3, 1, 2} = {3, 2, 1}.

The objects in a set need not be numbers. For example, students in a class can form a set C = {John, David, Anne, Debbie}. Note that the objects in a set must be distinct. If the class has two students named John, then the set should include them both by identifying them as distinct individuals. For example, C = {John Smith, John Doe, David, Anne, Debbie} is a set but C = {John, John, David, Anne, Debbie} is not.

Importantly, a set is considered an object in its own right, and thus one can create a set of sets. For example, if the history class is given by H = {John, David} and the math class is given by M = {David, Laura}, then we can also define the set of sets S = {H, M} = {{John, David}, {David, Laura}}. It is crucial that students understand this last point before moving to the topic of graphs, since the set of edges in a graph is a set of sets.

Before moving to the next topic, verify that students understand the basics of set theory by conducting Assessment 1: Sets, as described in the Assessment section.

Defining a Graph

Much confusion could arise due to the word "graph" most commonly being used in middle school mathematics to refer to a plot of a function. In graph theory, a graph has nothing to do with plotting functions. Instead, a graph is a mathematical structure that models pairwise relations between objects in a certain set. The visual representation of an example graph helps to immediately clarify this distinction. For example, consider the graph in Figure 1.

A table shows two columns titled: node, degree. Nodes 1 through 6 with corresponding degrees of: 2, 3, 2, 3, 3, 1. A line drawing shows six circles (nodes), labeled 1 through 6, and seven edges (lines connecting 6 to 4, 4 to5, 4 to 3, 5 to 2, 5 to 1, and 2 to 3). A table shows two columns titled: k, p(k); for k 0 through 4, corresponding p(k) are 0, 1/6, 1/3, ½, 0.
Figure 1. A visual representation of a graph. Labeled circles represent nodes. Lines that connect two nodes represent edges. The left table indicates the degree of each node of the graph. The right table indicates the degree distribution for the graph.
copyright
Copyright © (graph) User:AzaToth {PD} http://commons.wikimedia.org/wiki/File:6n-graf.svg

Figure 1 clearly demonstrates that in graph theory a graph is something different than the standard plot of a function. A graph is mathematically defined as the pair G = (N, E), where N is a set of nodes and E is a set of edges connecting the nodes. In Figure 1, the set of nodes is given as N = {1, 2, 3, 4, 5, 6}. It is standard to represent the nodes as labeled circles. The location of these circles in the visual representation of the graph is arbitrary; all that matters is that the edges connect the correct nodes together. An edge is defined as a set with two elements from the set N. In Figure 1, the lines between nodes represent the edges of the graph. The line between node 1 and node 2 means that {1, 2} is an edge of graph G, and we write this as {1, 2} ∈ E. We can specify the set of edges as: E = {{1,2}, {1,5}, {2,5}, {3,2}, {3,4}, {4,5}, {4,6}}, which is clearly a set of sets.

Before moving to the next topic, verify that students understand the mathematical and visual representation of graphs by conducting Assessment 2: Graphs, as described in the Assessment section.

Table shows three columns titled: network, nodes, edges. Example: biochemical, molecules, chemical reactions. Other networks are: neural, epidemiological, world wide web, trophic, power grid, collaborative, social, internet
Table 1. Example real-world complex networks, with their nodes and edges identified.

Once students complete Assessment 2, ask them to identify some examples of real-world, complex networks and represent them as graphs. Table 1 provides many examples of how graphs could be used to represent real, complex networks. For example, protein networks in cells can be represented by a graph, such as the one depicted in Figure 2, with the nodes representing proteins and the edges connecting interacting proteins.

On a dark background, myriad dots of different colors cluster mostly in one area with many fine blue lines linking to scattered outlying dots.
Figure 2. A graph helps to visualize protein-protein interactions in human cells. Each node represents a protein and each blue line between them represents an interaction.
copyright
Copyright © Keiono http://commons.wikimedia.org/wiki/File:Human_interactome.jpg

Another visual example is shown in the "internet map" image at the beginning of the lesson write-up—a graphical representation of a portion of the internet on a day in 2005. Lines are drawn between nodes, each representing connected IP addresses (for devices such as computers or printers) in the internet.

Degree of a Node and Degree Distribution of a Graph

Now that we have defined graphs, we can try to understand more about them by calculating some useful mathematical quantities. An important mathematical quantity of great interest to network scientists is the degree of a node. This is simply the number of edges that connect to the node. The left table in Figure 1 gives the degree of each node of the graph.

The degree of a node is a measure of its importance. Often, the larger the degree of the node, the more important the node seems to be. For example, Google is an important node in the World Wide Web, since a great number of web pages are connected to it at a given time (via hyperlinks). If this node were compromised (for example, by malicious hackers or computer viruses) it would interrupt the traffic on the web and be very disruptive in our lives. The disruption would be much more severe than if your Facebook profile experienced problems, since the number of people visiting a profile is miniscule compared to the number of people visiting Google. As a consequence, engineers around the world spend substantial effort to protect the integrity of the World Wide Web, and a large portion of that effort is focused on protecting important nodes, such as Google. Graph theory is a mathematical tool that can be used to identify important nodes in a complex network by computing, for example, their degrees in the graph representing the network.

Another important mathematical quantity of great interest to network scientists is the degree distribution of a graph. If we let k be a number representing the degree of a node (this number can only take integer values 0, 1, 2, etc.), then the degree distribution of a graph is a function p(k) that tells us what fraction of the nodes in the graph have degree k. For example, the right table in Figure 1 shows the degree distribution for the graph.

Interestingly, many large networks have degree distributions that are highly right-skewed, meaning that a large majority of nodes have low degree, while a small number of nodes have high degree. High degree nodes represent "hubs'' that control many properties of the network as a whole and are important points of study by network scientists and engineers.

To conclude, verify that students understand the concepts of degree of a node and degree distribution of a graph by conducting Assessment 3: Degree Distribution, as described in the Assessment section:

Lesson Closure

In this lesson, we have introduced complex networks and discussed their importance in many different science and engineering disciplines. We also discussed how to mathematically represent a complex network by a graph. A graph captures the information about which individuals (nodes) in the complex network interact with one another (determined by the edges).

We have not yet discussed how individuals interact with each another, since this usually depends on the given application. In the next lesson, we will discuss how a process propagates on a complex network as a consequence of how individuals interact with each other. As an example, we will study how a contagious disease, such as the flu, propagates on a social network of interacting students in a school.

Vocabulary/Definitions

complex network: A set of individuals (students, neurons, molecules, computers, web pages) that interact with each other in a certain fashion.

degree distribution: A function telling what fraction of the nodes in a graph has a given degree.

degree of a node: The number of edges connecting to the node.

graph: A mathematical structure that models pairwise relations between objects in a certain set. Composed of a set of vertices and a set of edges that connect the vertices. Graphs are used as visual representations of complex networks.

set: A grouping of well-defined, distinct objects.

Assessment

Assessment 1: Sets (before moving to graphs)

To test whether students understand the concept of a set, quiz them on which of the following objects are sets and which are not. Require that they explain why.

  • S = {-1, 0, 1} (Answer: This is a set.)
  • S = {345345, 4, -34.535, 0} (Answer: This is a set.)
  • S = {1, 2, 3, 4, 3, 2, 1} (Answer: This is not a set, since the objects 1, 2, 3 appear more than once and are not distinct.)
  • S = {{}, {1, 2}, {John, 2, $}} (Answer: This is a set of sets, and thus it is a set; {} is the empty set [it has no elements], {1, 2} is a set, {John, 2, $} is also a set since all objects are distinct.)

Assessment 2: Graphs (before moving to examples)

Verify that students understand the mathematical and visual representation of graphs. For a graph drawn on the classroom board, have students correctly define the set N of its nodes as well as the set E of its edges. Conversely, given a set of nodes N and a set of edges E, expect students to be able to draw the graph with labeled circles (nodes) connected by lines (edges). Refer to Figures 1 and 2 for graph examples. Next: Ask students to identify real-world, complex networks and represent them as graphs (see Table 1 examples.)

Assessment 3: Degree Distribution (at lesson end)

Draw a graph on the classroom board. Have students list the nodes and their corresponding degrees. Then, have them plot the degree distribution p(k) as a function of k, or ask them to provide its values in a table.

Subscribe

Get the inside scoop on all things TeachEngineering such as new site features, curriculum updates, video releases, and more by signing up for our newsletter!
PS: We do not share personal information or emails with anyone.

References

Degree Distribution. Last updated August 27, 2012. Wikipedia, The Free Encyclopedia. Accessed November 6, 2012. http://en.wikipedia.org/wiki/Degree_distribution

Internet Map (graphic). Last updated December 1, 2006. Wikimedia Commons. Accessed November 6, 2012. http://commons.wikimedia.org/wiki/File:Internet_map_1024.jpg

Set (Mathematics). Last updated November 3, 2012. Wikipedia, The Free Encyclopedia. Accessed November 6, 2012. http://en.wikipedia.org/wiki/Set_(mathematics)

Copyright

© 2013 by Regents of the University of Colorado; original © 2012 The Johns Hopkins University

Contributors

Garrett Jenkinson and John Goutsias, The Johns Hopkins University, Baltimore, MD; Debbie Jenkinson and Susan Frennesson, The Pine School, Stuart, FL

Supporting Program

Complex Systems Science Laboratory, Whitaker Biomedical Engineering Institute, The Johns Hopkins University

Acknowledgements

The generous support of the National Science Foundation, Directorate for Computer and Information Science and Engineering (CISE), Division of Computing and Communication Foundations (CCF), is gratefully acknowledged.

Last modified: July 1, 2019

Hands-on Activity Start Networking!

Quick Look

Grade Level: 9 (7-10)

Time Required: 45 minutes

Expendable Cost/Group: US $0.00

Group Size: 28

Activity Dependency:

Two images: In a room full of networking young people, two shake hands. A drawing shows people icons, each in a circle with lines connecting to other circles.
What can we learn about the characteristics of complex networks by analyzing graphs?
copyright
Copyright © Office of Adolescent Health, US Department of Health and Human Services, Washington State Office of the Insurance Commissioner http://www.hhs.gov/ash/oah/resources-and-publications/learning/coll-tk/index.html#chapter-2/section-2-3/ http://www.insurance.wa.gov/social/index.shtml

Summary

To get a better understanding of complex networks, students create their own, real social network example by interacting with their peers in the classroom and documenting the interactions. They represent the interaction data as a graph, calculate two mathematical quantities associated with the graph—the degree of each node and the degree distribution of the graph—and analyze how these quantities can be used to infer properties of the social network at hand.

Engineering Connection

We are all members of social networks. Many of us use social networking websites—built by software engineers—to keep in touch and up to date with the people in our social circles. Our money changes hands in exchange for goods and services, creating economic networks studied by financial engineers. Infectious diseases spread via contact networks and are studied by bioengineers and public health researchers. Information flows over our friendship and acquaintance networks, often facilitated by technologies developed by electrical and computer engineers.

Learning Objectives

After this activity, students should be able to:

  • Represent data as a graph.
  • Calculate the degree of each node of a graph as well as the degree distribution of a graph.

Materials List

Each student needs:

  • sheet of paper
  • pen or pencil

Introduction/Motivation

Social networks are prolific and important to many branches of modern science and engineering. Money changes hands in exchange for goods and services, creating our economic networks. Infectious diseases spread via contact networks. Information flows over our friendship and acquaintance networks.

Today we are going to build a real social network by collecting data on your interactions in the classroom. Then you'll represent this data as a graph and compute two mathematical quantities associated with the graph so that we can learn how these quantities can be used to infer properties of the social network at hand.

Procedure

Background

Refer to the Teacher Background section of the associated Sets-Nodes-Edges: Representing Complex Networks in Graph Theory lesson for information on graphs, degree of nodes and degree distribution of graphs.

With the Students

  1. Ask each student in the class to write his or her name at the top of a sheet of paper.
  2. Instruct the students to move around the classroom and sign each other's papers if they agree to do so. For example, John and Ann meet and agree to sign each other's sheet of paper. In this case, John's sheet of paper will have his and Ann's name written on it. Likewise, Ann's sheet of paper will have hers and John's name written on it.
  3. Allow this activity to proceed long enough for students to collect a few signatures (perhaps two to three, on average). Avoid giving too much time because you do not want every student to collect signatures from every other student—a situation that leads to non-interesting results.
  4. Ask students to return back to their seats and ask one volunteer to collect all sheets of paper.
  5. Ask one student to make a graph of the interaction data obtained from Step 3 on the classroom board. Represent each student by a node (labeled with his/her name or initials). Draw an edge between two nodes if the students represented by those nodes have exchanged signatures (see Figure 1 for an example). It is easiest to draw the graph if the nodes are placed on a large circle around the border of the board.
    A line drawing shows six circles, each with a name inside (Ann, Matt, Alex, John, Steve, Amy) and lines connecting some of the circles, but not all of them.
    Figure 1. Example graph of interaction data.
    copyright
    Copyright © 2012 Garrett Jenkinson, Johns Hopkins University

The Figure 1 graph is an example of an outcome that might be drawn on the board. In this example, six students are in the class: Ann, Matt, Alex, John, Steve and Amy. An edge is drawn between students who exchanged signatures. For example, John and Ann exchanged signatures, whereas Steve and Amy did not.

  1. Ask another student to calculate the degree of each node and the degree distribution of the resulting graph. The degree of a node is given by counting the number of edges connected to the node. Using Figure 1 example data, the results are shown in Table 1 (left). The degree distribution can be found by calculating how many nodes have a given degree and by dividing these numbers by the total number of nodes in the network. Using Figure 1 example data, the results are shown in Table 1 (right). This data can also be plotted, resulting in the Figure 2 bar graph.
  2. Conclude with a class discussion to analyze the graph. See the questions in the Assessment section.
    Two tables: The degree of each node table has two columns (node, degree) with the six student names (Ann, Matt, Alex, John, Steve, Amy) and respective degrees (1, 2, 3, 4, 1, 2). The degree distribution table has two columns (degree, probability) with the degrees 1 through 6 listed along with their respective probabilities: 0/6 = 0, 3/6 = ½, 2/6 = 1/3, 1/6, 0/6 = 0, 0/6 = 0, 0/6 =0.
    Table 1. Example calculated degree of each node and degree distribution.
    copyright
    Copyright © 2012 Garrett Jenkinson, Johns Hopkins University
    A bar graph plots degree vs. probability.
    Figure 2. Example plotting of degree distribution data.
    copyright
    Copyright © 2012 Garrett Jenkinson, Johns Hopkins University

Vocabulary/Definitions

complex network: A set of individuals (students, neurons, molecules, computers, web pages) that interact with each other in a certain fashion.

degree distribution: A function telling what fraction of the nodes in a graph has a given degree.

degree of a node: The number of edges connecting to the node.

graph: A set of vertices and a set of edges that connect the vertices. Graphs are used as visual representations of complex networks.

Assessment

Pre-Activity Assessment

Opening Questions: Before starting the activity, ask students a few questions to review what they have learned in the associated Sets-Nodes-Edges: Representing Complex Networks in Graph Theory lesson.

  • What is a social network?
  • What is a graph?
  • Can you come up with examples of systems that can be represented as graphs?
  • What is the degree of a node?
  • What is the degree distribution of a graph?

Activity Embedded Assessment

Engagement: While students are networking, monitor them and observe who is participating.

Post-Activity Assessment

Concluding Discussion: After the activity is complete, gauge student comprehension by asking them the following analysis questions about the class social network and discussing as a class:

  • Which fellow students are the most and least successful in collecting signatures? What are the degrees of the nodes associated with these two students? (Answer: Looking at the graph, student nodes with the most signatures are the ones with the most edges from them and thus the highest degree numbers. Student nodes with the fewest signatures have the fewest edges and the lowest degree numbers. High degree nodes represent "hubs'' that control many properties of the network as a whole and are important points of study by network scientists and engineers.)
  • What does the calculated degree distribution indicate about the resulting social network? (Answer: The most likely number of signatures collected by an individual is given by the mode of the distribution; that is, by the degree with the highest probability. If the distribution is narrow around the mode, then the students are more or less equally successful in collecting signatures. A wide distribution indicates that some students are not as successful as other students in collecting signatures.)
  • What happens to the graph if one student decides not to participate in the activity of collecting signatures from his/her classmates? What is the degree of the node associated with this student? (Answer: The node assigned to this student will have no edges and will not be connected to other nodes in the network. Its degree will be zero.)
  • What happens to the graph and its degree distribution if enough time is allowed so that each student can collect signatures from all other fellow students? (Answer: If every student obtains signatures from every other student, then all nodes in the network would have edges to all other nodes. In this case, the degree distribution would take only one non-zero value, assigned to the degree that equals the total number of nodes in the network. This value is one.)

Subscribe

Get the inside scoop on all things TeachEngineering such as new site features, curriculum updates, video releases, and more by signing up for our newsletter!
PS: We do not share personal information or emails with anyone.

Copyright

© 2013 by Regents of the University of Colorado; original © 2012 The Johns Hopkins University

Contributors

Garrett Jenkinson and John Goutsias, The Johns Hopkins University, Baltimore, MD; Debbie Jenkinson and Susan Frennesson, The Pine School, Stuart, FL

Supporting Program

Complex Systems Science Laboratory, Whitaker Biomedical Engineering Institute, The Johns Hopkins University

Acknowledgements

The generous support of the National Science Foundation, Directorate for Computer and Information Science and Engineering (CISE), Division of Computing and Communication Foundations (CCF), is gratefully acknowledged.

Last modified: April 15, 2024