What is Graph (mathematics)?
[[File:London Underground Zone 2.png|thumb|Real-world example of a graph: The central part of the [[London Underground]] map.]] <ref>{{Cite journal|date=2021-05-11|title=Graph (mathematics)|url=https://simple.wikipedia.org/w/index.php?title=Graph_(mathematics)&oldid=7519018|journal=Simple English Wikipedia, the Free Encyclopedia|language=en}}</ref>In [[discrete mathematics|mathematics]], a '''graph''' is used to show how things are connected. The mathematical study on graph is called [[graph theory]]. The things being connected are called '''vertices''', and the connections among them are called '''edges'''. If vertices are connected by an edge, they are called '''adjacent'''. The '''degree''' of a vertex is the number of edges that connect to it. A graph's '''size''' <math>|E|</math>is the number of edges in total. The number of vertices, written as <math>|V|</math>, is called the '''order''' of a graph. Edges may have weights, which show the costs associated with using each edge. In a graph of cities on a map, the cost may be the distance between two cities, or the amount of time it takes to travel between the two. '''Directed graphs''' go in one direction, like water flowing through a bunch of pipes. '''Undirected graphs''' don't have a direction, like a mutual friendship. A graph where there is more than one edge between two vertices is called '''multigraph.''' One where there is at most one edge is called a '''simple graph'''. A simple graph, where every vertex is directly connected to every other is called '''complete graph'''. A '''loop''' is an edge that connects to its own vertex. Loops are only allowed in multigraphs. A [[sequence]] of edges is called a '''path'''. A path which starts and ends at the same edge is called a '''cycle'''. <gallery> File:6n-graf.svg|An undirected graph with six vertices and seven edges. File:Directed graph, cyclic.svg|A directed graph with a cycle File:Directed acyclic graph.svg|A directed graph, without a cycle File:Cyclic-graph.svg|Undirected graph, with the cycle