Unweighted graph
An unweighted graph is a graph whose edges have no assigned numerical weights.
Classic Computer Science Problems in Swift: Essential techniques for practicing programmers
An unweighted graph is a graph whose edges do not have numerical costs or distances.
- How it is used
- Represents bidirectional networks and supports shortest-path questions based on edge count.
- How deep it goes
- Defines edges and adjacency-list storage, implements Swift types, and applies BFS without treating weighted costs.
- Examples
- Uses a Hyperloop-style city network and computes the Boston-to-Miami route through Detroit and Washington.
- What you can do after
- Build it from scratch in Swift and find fewest-edge routes with breadth-first search.
Graph Algorithms for Data Science
An unweighted graph is a graph in which all relationships have the same strength or traversal cost and no relationship weight distinguishes them.
- How it is used
- Uses equal-cost relationships to model and analyze network structure without distinguishing connection strength.
- How deep it goes
- Defines equal relationship cost, contrasts numeric weights, and applies the distinction to a directed follower network.
- Examples
- Uses a Twitter follower network with User nodes and directed FOLLOWS relationships lacking strength attributes.
- What you can do after
- Apply it via Cypher and Neo4j Graph Data Science algorithms to characterize connectedness, density, communities, and centrality.
Read how Graph Algorithms for Data Science explains unweighted graph →
Graph Neural Networks in Action
An unweighted graph is a graph in which all edges have equal importance or weight.
- How it is used
- Represents graphs whose edges all have equal importance, including the sensor network used to set up a spatiotemporal graph problem.
- How deep it goes
- Defines unweighted edges through binary adjacency-matrix entries and contrasts them with weighted edges, without detailing implementation.
- Examples
- Uses a sensor network with 31 positions and a simple binary adjacency matrix as examples.
- What you can do after
- Evaluate whether graph connections are represented as equal-weight binary entries or differentiated edge values.
Read how Graph Neural Networks in Action explains unweighted graph →
Related concepts
- weighted graphcontrasts with · A weighted graph is a graph whose edges have associated values representing quantities such as cost, distance, strength, or frequency.
- graphkind of · A graph is a mathematical structure consisting of vertices connected by edges that represent relationships or connections.
- adjacency matrixuses · An adjacency matrix is a square matrix whose rows and columns represent graph vertices and whose entries indicate edges or encode edge weights between vertex pairs.
- breadth-first searchused by · Breadth-first search is a graph or tree traversal algorithm that explores nodes in nondecreasing order of their distance from a starting node.
- unweighted edgehas part · A graph edge that represents a connection without an associated weight.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


