Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 7 pages
Summary

Summary Full Notes - Chapter 19 - Computational Thinking and Problem-Solving - CIE Computer Science

Document preview thumbnail
Preview 2 out of 7 pages

Full notes for Chapter 19: Computational Thinking and Problem-Solving of the CIE A-Level Computer Science course (9618). Notes are written fully according to the specification and all past paper mark schemes.

Content preview

​19. Computational Thinking and Problem-Solving​

​1. Graphs​

​Graphs:​
​●​ ​Abstract data structures representing complex​
​relationships between the items of data​
​●​ ​Made a set of vertices or nodes (the circles with​
​the items of data) connected by edges (the lines)​
​●​ ​Edges may be weighted (where each edge has a​
​weight/value associated with it), indicating a​
​cost of traversal​
​●​ ​In an undirected graph, all edges are bidirectional (can travel in both directions); in a directed​
​graph or digraph, all edges are one-way​

​Graphs can be implemented using one of two ways:​
​●​ ​Adjacency matrix​
​●​ ​Adjacency list​

​Adjacency matrix:​
​●​ ​Each row and column represents a node​
​●​ ​The item at [row, column] indicates a connection​
​○​ ​In an unweighted graph, this can be a 1​
​○​ ​For a weighted graph, the entries represent the weights​
​●​ ​In an undirected graph, the matrix will be symmetric​
​●​ ​A matrix is essentially the same as a two-dimensional array when coding​




​→​


​→​

, ​Adjacency list:​
​●​ ​An adjacency list is an alternative way of representing a graph​
​●​ ​A list of nodes is created, and each node points to a list of adjacent nodes​
​●​ ​This can be implemented using a dictionary​
​○​ ​For weighted graphs, a dictionary of dictionaries can be used, with each key in the​
​dictionary being the node, and the value being a dictionary of adjacent nodes and edge​
​weights​

graph = {​

‘A’:[‘C’]​

‘B’:[‘C’, ‘D’]​

‘C’:[‘D’, ‘E’, ‘F’]​

‘D’:[‘A’, ‘F’]​

‘E’:[]​

‘F’:[]​

}​





​There are two ways of traversing a graph:​
​●​ ​Depth-first - go as far as you can down a path before backtracking and going down the next path​
​●​ ​Breadth-first - explore all the neighbours of the current vertex, then the neighbours of each of​
​those vertices and so on​

​Applications of graphs:​
​●​ ​AI - Artificial Neural Networks​
​●​ ​Routing packets over the Internet​
​●​ ​Maps/GPS, with nodes as locations and edges as routes​

Document information

Study Level
Subject
Uploaded on
July 9, 2026
Number of pages
7
Written in
2025/2026
Type
Summary
$9.09

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
0
Followers
0
Items
21
Last sold
-




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions