Registry Synced

Chatty reference · computationalthinking week 8

75 words
1 min read
2026-08-16

16. CT Week 8 — Adjacency Matrix & Edge-Labelled Graphs

This is where representation becomes important.

Adjacency matrix

For a graph with nn vertices:
A∈Rn×nA\in\mathbb{R}^{n\times n}
or, for a simple unweighted graph, commonly:
Aij∈{0,1}A_{ij}\in\{0,1\}
depending on whether an edge exists.

Edge-labelled graph

Edges carry additional information:
u→labelvu\xrightarrow{\text{label}}v
The label could represent:
  • weight
  • distance
  • cost
  • type
  • relationship
The important CT skill:
Same underlying problem, different representation.

Document outline

Keep your place and jump directly to a heading.

Table of contents

No note selected

Open a chapter to see its outline, backlinks, and sources here.