A graph G consists of a set of vertices V connected by edges E. An edge e is represented as an ordered pair of vertices (u,v). Graphs can be directed or undirected. The degree of a vertex is the number of edges incident to it. A path is a sequence of adjacent vertices, while a cycle is a path where the first and last vertices are the same. Graphs can be represented using an adjacency matrix where a 1 indicates an edge and 0 no edge between two vertices.