Skip to article frontmatterSkip to article content

Graph

We have already briefly introduced the concept of graphs in the context of Atomistic Structure. In this section, we will delve deeper into the mathematical representation of graphs and their significance in materials science.

What is a Graph?

A graph is a mathematical structure consisting of nodes (or vertices) and edges (or links) that connect pairs of nodes. Graphs can be directed or undirected, weighted or unweighted, and can represent various types of relationships between entities.

A graph GG is mathematically defined as a pair (V,E)(V, E), where:

Characteristics

Adjacency Matrix

While various data structures exist for storing graphs (like adjacency lists or incidence matrices), a common and conceptually important representation is the adjacency matrix. For a graph with N=VN = |\mathcal{V}| nodes, the adjacency matrix AA is an N×NN \times N square matrix where the entry AijA_{ij} indicates the connection between node ii and node jj.

For an undirected graph, the adjacency matrix is symmetric (Aij=AjiA_{ij} = A_{ji}). For a directed graph, it may not be.

Example: Consider a simple undirected, unweighted graph with 4 nodes {1, 2, 3, 4} and edges {(1, 2), (1, 3), (2, 3), (3, 4)}. Its adjacency matrix AA would be:

A=(0110101011010010)A = \begin{pmatrix} 0 & 1 & 1 & 0 \\ 1 & 0 & 1 & 0 \\ 1 & 1 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{pmatrix}

Here, A12=1A_{12} = 1 because there’s an edge between node 1 and node 2, while A14=0A_{14} = 0 because there’s no direct edge between node 1 and node 4.

Features

Features are essential components of graphs, providing additional information about nodes and edges.

Examples of Graphs

Graphs are ubiquitous in various fields, including computer science, social networks, biology, and materials science. Here are some examples of graphs:

Molecular Graphs

The graph representation is exceptionally well-suited for materials. We can naturally model a material structure (like a molecule or a crystal) as a graph where: