- A graph is a network of connected nodes (i.e. vertices)..
- A connection with a direction is an arc.
- A connection without a direction is an edge.
- A connection can have a weight or cost.
- A graph with directions is called a directed graph, or digraph.
- A graph with weights is called a weighted graph.
- You may want to visit every node: the travelling salesman problem.
- You may want to find the shortest or cheapest path.
You can represent a graph as a list of edges or arcs:
- 1 -> 2
- 2 -> 3
- 2 -> 4
- 3 -> 4
- 3 -> 5
- 3 -> 6
- 4 -> 1
- 4 -> 5
- 5 -> 2
You can also represent a graph as a dictionary of lists, where each key is a node, and each value is a list of connected nodes.
graph = {1: [2],
2: [3, 4],
3: [4, 5, 6],
4: [1, 5],
5: [2]}
- Glossary of graph theory terms
- Connectivity
- Coset
- Graph (abstract data type)
- Graph (discrete mathematics)
- Graph (topology)
- Graph algebra
- Graph automorphism
- Graph coloring
- Graph drawing
- Graph enumeration
- Graph equation
- Graph traversal (i.e. graph search)
- Partially ordered set
- Pathwidth
- Principle of compositionality
- Set (mathematics)
- Strongly connected component
- Transitive reduction
- Bipartite graph (i.e. bigraph)
- Cayley graph
- Conceptual graph
- Cycle graph
- Dense graph
- Directed graph (i.e. digraph)
- Existential graph
- Hypergraph
- Lattice graph
- Line graph
- Logical graph
- Mixed graph
- Multigraph
- Null graph (i.e. edgeless or empty graph)
- Path graph (i.e. linear graph)
- Perfect graph
- Planar graph
- Quantum graph
- Random graph
- Regular graph
- Schreier coset graph
- Symmetric graph
- Undirected graph
- Asymmetric graph
- Clique graph
- Cograph (i.e. complement-reducible graph)
- Complete graph
- Complete bipartite graph (i.e. biclique)
- Complete graph
- Petersen graph
- Semi-symmetric graph
- Simplex graph
- Tree
- Weighted network
- Unary operations
- 3 utilities
- 7 Bridges of Königsberg
- Art gallery
- Covering problems
- Graph sandwich
- Hamiltonian path
- Maximal flow
- Minimum spanning tree
- Route inspection
- Steiner tree
- Shortest path
- Subgraph isomorphism