TutorChase logo
Login
AQA A-Level Computer Science

11.4.3 Components and terminology

Graphs are powerful structures made of nodes and edges, used to represent relationships. Understanding their components and terms is key to mastering graph theory.

Vertex (node)

A vertex, also referred to as a node, is one of the most basic elements of a graph. It represents a data point or an entity within the graph. In diagrams, vertices are often shown as circles or dots, usually labelled with letters such as A, B, or C, or numbers like 1, 2, 3.

Each vertex can store data relevant to the entity it represents. In abstract mathematical graphs, the vertex is usually just a label, but in applied computing, it might hold additional information such as usernames, coordinates, or identifiers.

Real-world examples of vertices:

  • In a transport system, each station or junction is a vertex.

  • In a social network, each person is a vertex.

  • In a web graph, each webpage is a vertex.

  • In a computer network, each device like a computer or printer is a vertex.

Understanding vertices is crucial, as they are the points that define the structure of the graph. Without vertices, there would be no endpoints for the edges, and therefore no relationships to model.

Edge (arc)

Take your grades to the next level!

UPGRADING TO PREMIUM UNLOCKS
AI Tutor
AI-powered study assistant
instant feedback and guidance
Predicted Papers
Examiner-style predicted papers
based on recent exam trends
Practice Questions
All exam practice questions
by topic for each subject
Study Notes
All detailed revision notes
written by expert teachers
Cheat Sheets
Quick revision summaries
perfect for last-minute review
Past Papers
Complete collection
of practice and past exam papers
Email
Password
Confirm Password
Already have an account?

Practice Questions

FAQ

Yes, a vertex in a graph can be connected to itself. This is known as a loop. In graph theory, a loop is a type of edge that originates and terminates at the same vertex. Loops are more commonly discussed in the context of multigraphs or pseudographs, where multiple edges and loops are allowed. In simple graphs, which do not permit multiple edges or loops, this structure is excluded. When considering the degree of a vertex in an undirected graph, a loop counts as two because it adds two incidences to the vertex. In a directed graph, the loop contributes one to the in-degree and one to the out-degree. Loops are significant in certain applications, such as state machines, where a process or condition can transition back to itself. Recognising the presence of loops is important in algorithms that detect cycles, self-dependencies, or feedback systems in computational models.

A simple graph is a graph where each pair of vertices is connected by at most one edge, and no loops are allowed. This means every edge represents a unique and non-repeating connection between two different vertices. The terminology remains straightforward: vertices are distinct, edges are single and undirected unless otherwise specified, and no vertex connects to itself. In contrast, a multigraph allows multiple edges (also called parallel edges) between the same pair of vertices. This means two nodes can be connected by more than one edge, potentially representing different relationships or routes. Additionally, loops are permitted in multigraphs, allowing a vertex to have an edge that starts and ends at itself. The terminology in a multigraph must account for these added complexities, such as distinguishing between different edge instances. Multigraphs are useful in real-world modelling where multiple types of connections exist, such as transport networks with multiple routes between the same stations.

In an undirected graph, adjacency between vertices is mutual. If vertex A is adjacent to vertex B, then B is also adjacent to A, since the edge has no direction. Adjacency here simply means there is a connection between two vertices, and either can be considered a neighbour of the other. This symmetrical relationship simplifies traversal and analysis. However, in a directed graph (or digraph), adjacency is asymmetrical. If there is an edge from vertex A to vertex B (A → B), A is adjacent to B, but B is not necessarily adjacent to A unless there is a separate edge B → A. This directional difference affects how algorithms like depth-first search or topological sort handle vertex relationships. In directed graphs, adjacency is tightly linked to edge direction, which represents dependencies, permissions, or flows. This makes adjacency checks more nuanced and context-dependent in directed systems such as web page links or task scheduling.

When a vertex is removed from a graph, all edges incident to that vertex are also removed. This operation can have significant consequences for the structure and connectivity of the graph. In a connected graph, removing a key vertex (especially one with a high degree) may lead to the graph becoming disconnected, dividing it into multiple components that no longer have paths between them. This is particularly critical when the removed vertex is a bridge or cut-vertex—a vertex whose removal increases the number of disconnected parts. In directed graphs, removing a vertex and its associated incoming and outgoing edges can disrupt reachability. Some vertices that were previously accessible via that vertex may now be unreachable. This affects algorithms that depend on full graph traversal or network-wide communication. In practical terms, removing a vertex could represent shutting down a server, deleting a user from a system, or isolating a module in a software dependency graph.

Cycles in graphs are not inherently problematic; their significance depends entirely on the context in which the graph is used. In many situations, cycles are not only acceptable but also useful and expected. For example, in a transportation network, a cycle might represent a circular bus route, allowing passengers to return to their starting point. In electrical circuit analysis, cycles represent feedback loops or interconnected paths. However, cycles can be problematic in dependency graphs, such as in software build systems or task scheduling, where a cycle implies that tasks depend on each other in a circular manner, preventing proper execution or ordering. Similarly, in database schemas or inheritance hierarchies, cycles can cause errors or ambiguities. Algorithms like cycle detection or topological sorting are designed to manage these cases. In summary, cycles are a natural feature in many graphs, but their interpretation depends on whether repetition or circularity aligns with the system's intended behaviour.

Hire a tutor

Please fill out the form and we'll find a tutor for you.

1/2
Your details
Alternatively contact us via
WhatsApp, Phone Call, or Email