+0 -0

Graphs can be represented in different ways, the most common of which are:

Adjacency Matrix: is a two-dimensional matrix where each element represents the relationship between two vertices. If there is an edge between the vertices i and j, the element at the i-th row and j-th column of the matrix is set to 1, otherwise it is set to 0.

Adjacency List: is a list where each element represents a vertex and its associated edges. Each vertex is represented by a list of vertices it is connected to.

Incidence Matrix: is a two-dimensional matrix where each element represents the relationship between a vertex and an edge. If the vertex i is connected to the edge j, the element at the i-th row and j-th column of the matrix is set to 1, otherwise it is set to 0.