Unit 38Dissecting Graphs

Mathematically speaking, a graph is a set of nodes connected with edges. There are different kinds of edges, nodes, and graphs, and they are connected and interpreted in different ways. So, before we start dissecting graphs, let’s start with some important definitions.

Graph Elements, Types, and Density

If at least one graph edge is directed (say, it connects node A to node B but not the other way around), the graph itself is directed and is called a digraph. If there are parallel edges in a graph (that is, node A may be connected to node B by more than one edge), the graph is called a multigraph. The edge from node A to itself is called a loop. A graph without loops and parallel edges is called a simple graph.

Weights ...

Get Data Science Essentials in Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.