# Graph Theory-Based Characterization and Classification of Household Photovoltaics
## 2 Graph Theory Background  
Networks are made up of elements and the connections between them. The relationship between elements can be undirected or directed, depending on whether the communication between them is two-way or only one-way. A mixed graph \(M=(V,E,A)\) consists of a nonempty set \(V\) of elements called vertices, a set \(E\) whose elements (edges or undirected edges) are non-ordered pairs of elements of \(V\) and a set \(A\) of ordered pairs of vertices, called arcs (or directed edges). An example is shown in Figure 2.  
Figure 2: Example of a mixed graph \(M=(V,E,A)\) with vertex set \(V=\{a,b,c,d\}\), edge set \(\{ab,bc,cd\}\) and arc set \(A=\{\tilde{c}\tilde{a},\tilde{a}\tilde{d}\}\).  
From this point of view, an undirected graph (or simply graph) has all its edges undirected and a digraph (or directed graph) has all its edges directed. The term 'graph' will sometimes be used loosely to refer to undirected, directed or mixed graphs indistinctly, when it does not generate confusion.  
The GT definitions needed for the study are shown below. For more definitions and other details see [27].  
1. The number of vertices is known as the order of the graph. The number of edges and/or arcs is known as the size of the graph.
2. If \(u\) and \(v\) are vertices of graph \(G\) (\(u,v\in V(G)\)) we write \(uv\) to represent the edge \(\{u,v\}=\{v,u\}\) and we say that \(u\) is adjacent to \(v\) or vice-versa. If \(u\) and \(v\) are vertices of digraph \(D\) we write \(u\to v\) to represent the arc \((u,v)\), and we say that \(u\) is adjacent to \(v\), or \(v\) is adjacent from \(u\).
3. The underlying graph \(U\) of a digraph \(D\) is the one obtained when arcs \(u\to v\) are replaced by edges \(uv\).
4. Given a graph \(G\) and \(u\in V(G)\), the degree of \(u\) written \(d(u)\) is the number of vertices adjacent to (or from) \(u\). Given a digraph \(D\) and \(u\in V(D)\), the outdegree of \(u\) written \(d^{+}(u)\) is the number of vertices adjacent from \(u\) and the indegree of \(u\) written \(d^{-}(u)\) is the number of vertices adjacent to \(u\).
5. A graph \(H\) is a subgraph of graph \(G\) if \(V(H)\subseteq V(G)\) and \(E(H)\subseteq E(G)\). When \(V(H)=V(G)\), \(H\) is said to be a spanning subgraph of \(G\).
6. A path is a graph whose vertices can be labeled by \(v_{1},v_{2},\ldots,v_{n}\) such that its edges are \(v_{i}v_{i+1}\) for \(i\in[1,n-1]\). A directed path from \(v_{1}\) to \(v_{n}\) is a digraph whose vertices can be labelled by \(v_{1},v_{2},\ldots,v_{n}\) such that its arcs are \(v_{i}\to v_{i+1}\) for \(i\in[1,n-1]\).
7. A graph \(G\) is connected if for every given pair of vertices \(u,v\in V(G)\) there exists a subgraph \(P\), which is a path starting at \(u\) and ending at \(v\). A digraph \(D\) is strongly connected if, for every given pair of vertices \(u,v\in V(G)\), there exists a subdigraph \(P\), which is a directed path from \(u\) to \(v\). A digraph is weakly connected if its underlying graph is connected.
8. Two graphs \(G_{1}\) and \(G_{2}\) are isomorphic if there exists a bijective function \(\phi:V(G_{1})\to V(G_{2})\) such that if \(uv\in E(G_{1})\) then \(\phi(u)\phi(v)\in E(G_{2})\). Function \(\phi\) is called isomorphism from \(G_{1}\) to \(G_{2}\).