liveBook · Manning

Node

As explained in Advanced Algorithms and Data Structures

A vertex is a node in a graph that may be connected to other vertices by edges.

A node, also called a vertex, is a distinct entity in a graph. Graphs represent nodes with vertices V and connect them using edges E, written G=(V,E). section 14.1

Model nodes according to the graph structure being represented:

  • Treat nodes as distinct entities; ordinary graphs do not support duplicate nodes. section 14.1
  • Connect nodes with directed edges whose source and destination determine travel or relationship direction. section 14.1 section 14.3.1
  • Use nodes for road intersections when converting a one-way street map into a graph for route finding. section 14.3.1

Street-map model

Represent each road intersection as a node. Add an edge from node v to node u when a one-way street permits travel from the first intersection to the second; model two-way streets with edges in both directions. section 14.3.1

G = ([v1, v2, v3, v4], [(v1,v2),(v1,v3),(v2,v4)])

Inspect a compact graph listing nodes v1 through v4 and their connecting edges. section 14.1

How Advanced Algorithms and Data Structures covers it

How deep it goes
Defines nodes through graph sets and applies them to road intersections, while deferring route-solving details.
Examples
Uses abstract vertices and road intersections connected by one-way or two-way street edges.
What you can do after
Evaluate/understand how real entities and road intersections become vertices in a graph model.
How it connects
Connects nodes with graphs, edges, directed graphs, simple graphs, multigraphs, weighted graphs, and route finding.

Also explained in

Compare how 19 books explain node →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Advanced Algorithms and Data Structures. The section links point to the parts of the book it draws on.