Subgraph
A subgraph is a graph whose vertices and edges are all contained within another graph.
Specifically, the set of vertices in a subgraph is a subset of the set of vertices in another graph. The set of edges in a subgraph is also a subset of the set of edges in that same graph.
All graphs are subgraphs of themselves.
The graph \(G' = (V', E')\) is a subgraph of the graph \(G = (V, E)\) if and only if:
$$V' \subseteq V$$
$$E' \subseteq E$$
⚠ Intuitively, a subgraph of a graph is that original graph with \(0\) or more of its vertices and edges
deleted. Note that if a vertex is deleted, all the edges it participated in are also deleted, as the
definition of an edge requires both endpoints to be vertices in \(V.\)
A clique is defined as a complete subgraph. It is a subgraph of a graph such that all its vertices are connected to each other. Within the context of social networks, cliques are groups of people who all know each other.