Subgraph in Graph Theory: The Fundamentals

A subgraph is a little replica of a larger graph. Selecting some points (vertices) from the larger graph and connecting them with lines (edges) creates it. The crucial feature is that it retains the basic shape and connections of the original graph, although with fewer dots and lines. In graph theory, subgraphs are useful for studying parts of a larger network or system. Are you ready to discover the potential of this concept in network analysis? Let's get started and discover their great insights!

Definition Icon

14-minute read

Context: discrete mathematics, graph theory

Subgraph Definition

A subgraph H of a graph G is another graph formed from a subset of the vertices and edges of G if all endpoints of the edges of H are in the vertex set of H. In other words, it is a subset of the larger original graph.

Construction

When certain vertices or edges are removed from the original graph, a subgraph is formed.

subgraph vs. supergraph example
Figure 1. Deleting some vertices or edges (b) from the supergraph (a) leaves a subgraph (c).

Mathematical Notation

Let's use G to represent the original graph and H to represent the subgraph. Here's the notation:

  • Vertex set of subgraph H: V(H) is the set of vertices in subgraph H. It's a subset of the vertices in the original graph G, so you can write it as: V(H) ⊆ V(G)
  • Edge set of subgraph H: E(H) is the set of edges in subgraph H. It's also a subset of the edges in the original graph G, so you can write it as: E(H) ⊆ E(G)
  • Formal definition of subgraph H: Combining the above two definitions, you can define the subgraph H as: H = (V(H), E(H))

For example, if you want to describe that subgraph H is made up of vertices A, B, C and edges (A, B), (B, C) from the graph G, you can do it as follows:

H = ({A, B, C}, {(A, B), (B, C)})

Formal Definition

Let G = (V, E) be a graph with a vertex set V and an edge set E.

A graph H = (V', E') is considered a subgraph of a graph G if and only if:

  1. V' is a subset of V, which means every vertex in H is also in G.
  2. E' is a subset of E, which means every edge in H is also in G.
  3. For any edge e in E', its endpoints (vertices) are also in V'. In other words, if an edge is part of H, then the vertices it connects must also be part of H.

Synonyms

In some cases, the subgraph is interchangeable with a synonym. Here are a couple such examples:

  • Subset graph: This term emphasises that a subgraph is a subset of the vertices and edges of the original graph.
  • Partial graph: This term refers to a section of a larger graph.
  • Graph segment: This highlights the fact that a subgraph is a segment of the original graph.
  • Component: A subgraph can be referred to as a component in various cases, particularly when addressing related components.
  • Independent set: An independent set is a subset of vertices where no two vertices are adjacent (no edges connect them). Subgraphs can also be considered independent sets.

Opposites

Opposites reflect different ways that these graphs relate to a subgraph, such as by including or excluding elements or by sharing or separating vertices and edges.

  • Supergraph: A supergraph, or superset graph, is the opposite concept of a subgraph in graph theory. This graph contains all the vertices and edges of another graph.
  • Complement graph: This is a graph that contains all the same vertices as the original graph but includes edges that were not in the original graph and excludes edges that were in the original graph. It is like the subgraph in that it contains edges that were not present in the subgraph.
  • Disjoint graph: If two graphs have no vertices or edges in common, they are disconnected. A subgraph, on the other hand, shares vertices with the original graph.
  • Superimposed graph: This term refers to a situation in which two or more graphs are merged so that their vertices and edges overlap or share common elements. This is the opposite of a subgraph, which shows a piece of a single graph.
  • Union of graphs: When two or more graphs are combined by taking the union of their vertex and edge sets, you get a supergraph of the individual graphs. This is the opposite of considering a subgraph, in which you focus on a subset of a single graph.

Generalised as

  • Supergraph: A supergraph is a graph that includes the original graph as a subgraph as well as extra elements. In other words, it is a larger graph that has all the original graph's vertices and edges.
  • Graph minor: A series of edge contractions and vertex deletions can create a graph minor from the original graph. It covers a broader concept.
subgraph example
Figure 2. A subgraph and a non-subgraph from the supergraph.

Specialised into

To specialise a term implies to narrow its definition or give a specific domain or application in which it is employed.

The reason to narrow the definition of a subgraph is to emphasise specific elements or relationships within the graph structure. Here are several examples:

  • Induced subgraph: An induced subgraph is one that is formed by taking a subset of vertices and including all the edges that connect those vertices. Induced subgraphs are used to investigate particular patterns or relationships within the main graph.
  • Common subgraph: A common subgraph of two or more graphs is one that appears in all of them. It can be used to discover similarities or common structures across all graphs.
  • Maximal subgraph: A maximum subgraph is one that cannot be expanded farther from the original graph by adding more vertices or edges without violating certain properties. It focuses on maximally preserving certain graph properties.
  • Connected subgraph: A connected subgraph is one in which every pair of vertices in the subgraph has a path connecting them. It draws attention to the concept of connectivity inside a subset of the graph.
  • Pattern subgraph: A pattern subgraph is a graph that represents a certain recurrent structure or motif. It focuses on identifying and analysing recurrent patterns.
  • Cliques and clique subgraphs: Vertex subsets form cliques, where every pair of vertices is connected by an edge. Clique subgraphs are subgraphs that are fully made up of cliques. This limits the definition to structures that are highly connected.
  • Proper subgraph: Proper subgraph: A proper subgraph is one that is not the same as the primary graph. In other words, it is a subset of vertices and edges that create a smaller graph than the original.

Real-World Applications

Subgraphs have numerous real-world applications across diverse domains, for example:

  • Social networks: detect communities and measure influence.
  • Biology: reveal protein interactions and gene networks.
  • Transportation: analyse traffic flow and optimise routes.
  • Communication networks: improve data routing and reliability.
  • Epidemiology: model disease spread in contact networks.
  • Academia: identify influential research papers and authors.
  • Recommendation systems: personalise content and product recommendations.
  • Fraud detection: uncover fraudulent activities in financial networks.
  • Web link analysis: determine search engine rankings.
  • Graph databases: optimise query performance.
  • Neuroscience: study brain connectivity and functional networks.
  • Energy grids: optimise smart grid distribution.
  • Urban planning: aids in designing efficient transportation systems.
  • Supply chain management: optimise logistics and distribution.
  • Privacy preservation: protect user data on social networks.

Subgraphs provide useful insights and optimisations in complicated networked systems, making them a useful tool in a wide range of practical applications.

Properties

A subgraph in graph theory has various intriguing properties that change based on itself and the original graph's individual traits. Here are some capabilities and factors to keep in mind when working with it:

  • Vertex subset: A subgraph is always defined as a subset of the parent graph's vertices. This means that all its vertices are also vertices in the parent graph.
  • Edge subset: Similarly, a subgraph is defined as a subset of the parent graph's edges. This means that all subgraph edges are also parent graph edges.
  • Connectivity: Some connectivity properties of the parent graph may be inherited by a subgraph. If the parent graph is connected, the subgraph may be connected as well if it contains a subset of vertices that maintain connectivity.
  • Size: A subgraph is often less than or equal to the parent graph in size. It might have fewer vertices and edges.
  • Isomorphism: Graph isomorphism is the process of comparing two graphs to see if they are structurally identical. Isomorphic substructures can be identified by comparing subgraphs to the original graph.
  • Spanning subgraph: This is one that contains all the vertices of the original graph but has fewer edges. It is used to cover all the vertices of a graph.
  • Edge deletion and vertex deletion: Subgraphs are formed by removing edges or vertices from the parent graph. Different types of subgraphs with diverse features may develop depending on what is removed.
  • Connected components: In the context of connected graphs, a subgraph can be a connected component of the parent graph, which is a maximal-connected subgraph.
  • Planarity: Planarity behaviours can be inherited by subgraphs from the parent graph. A subgraph of a planar graph is also planar.
  • Degree sequences: The degree sequence of a subgraph is a list of the degrees of its vertices. It may have its own distinct degree sequence or be a subset of the degree sequence of the parent graph.
  • Maximum and minimum subgraph: A maximal subgraph is one that has the most vertices (or edges) while still satisfying specific conditions. A minimum subgraph, on the other hand, is the smallest subgraph that meets certain constraints. These concepts are frequently employed in optimisation and graph problems.
  • Maximum common subgraph: This concept refers to determining the greatest subgraph shared by two or more graphs. It is concerned with determining the largest shared structure among several graphs.
  • Spanning trees: Spanning trees are subgraphs that contain all the vertices of the original graph while having as few edges as possible to maintain connection. Subgraphs and spanning trees are compared in terms of covering the vertices of a graph with the fewest edges.
  • Patterns and motifs: Subgraphs are frequently compared to patterns, motifs, or interesting structures inside a graph. Identifying and analysing repeated structures within the larger graph is required for these comparisons.
  • Network modules: Subgraphs are compared to network modules in network analysis, which represent groupings of nodes with similar roles or behaviours. Both notions are concerned with the discovery of relevant substructures inside networks.

Advantages

Subgraphs in graph theory have several advantages, including the ability to simplify complex networks, focus analysis on specific structures or patterns, aid in community detection and pattern recognition, enable graph compression, optimise database queries, preserve privacy, improve scalability, and customise analyses.

Disadvantages

Subgraphs offer disadvantages in some instances, such as the loss of global information, computational complexity, data loss in compression, biased sampling, connection issues, challenges in establishing subgraphs, and privacy preservation complexities. Furthermore, subgraph analysis may not be appropriate for small graphs and may result in an overemphasis on local structures. To interpret the data and ensure they correspond with the study's objectives and network characteristics, careful consideration is required.

Despite these disadvantages, subgraphs continue to be a useful tool for simplifying and analysing complex graph structures in a variety of applications.

Examples of Usage

Subgraphs are vital in graph theory because they allow for the analysis of smaller, more manageable pieces of a larger graph, which can be valuable for comprehending the graph's many aspects and relationships. They are used in a variety of applications, some of which are outlined below:

  • Community detection: Subgraphs are used in community detection to locate communities or clusters of nodes inside a network. These communities are made up of nodes that are more connected to one another than they are to nodes outside the group. The analysis of these subgraphs aids in the discovery of social groupings, functional modules in biological networks, and other community structures.
  • Pattern recognition: Subgraphs can help find repeating patterns or motifs in networks. Researchers seek out specific subgraph structures that appear frequently in the network, suggesting underlying structural and functional relationships.
  • Network simplification: Subgraphs provide a method for simplifying the investigation of huge and complicated networks. Researchers can concentrate on specific subgraph components of interest, lowering overall network complexity while maintaining important structures.
  • Structural analysis: Subgraphs are used by researchers to investigate the structural aspects of networks, such as the presence of small-world structures, hubs, and bridges. Subgraphs allow for a more focused exploration of specific traits.
  • Anomaly detection: Subgraphs can be used to detect anomalous or unexpected patterns in a network. Analysts can detect abnormalities, potential security breaches, or odd behaviour in various applications by comparing them to a baseline or expected pattern.
  • Community interaction: Subgraphs can show how different communities or subnetworks interact with one another. Analysing the connections between subgraphs reveals network dynamics, collaborations, and information flow.
  • Centrality analysis: Subgraphs are used to investigate the importance of individual nodes or groups of nodes within a network. Researchers can better comprehend the importance and influence of critical nodes in the wider network by isolating subgraphs around them.
  • Query optimisation: Subgraphs are used to optimise searches in database systems and graph databases. The database may look for specific subgraphs that fit query patterns, which improves query performance and data retrieval.
  • Visualisation: Subgraphs can be visualised, providing for clearer and more targeted depictions of specific network components or behaviours. They are used by visual technologies to build meaningful network visualisations.
  • Machine learning features: Subgraph-based features and representations are used in machine learning to produce predictions or classifications based on graph data. Subgraphs are used by graph neural networks (GNNs) to handle tasks such as node categorisation and link prediction.
  • Network resilience: Subgraphs are analysed to determine network resilience to failures or assaults. Analysts can build more robust networks by researching how they break down or remain intact under different scenarios.

Conclusion

In graph theory, subgraphs are essential for reducing complex networks, identifying patterns, and extracting usable information. They are useful in a variety of domains, including network research, databases, privacy protection, and machine learning. Subgraphs, in a nutshell, enable us to make sense of complex graphs and extract useful insights.