Formally, a vertex cover V ′ {\displaystyle V'} of an undirected graph G = ( V , E ) {\displaystyle G=(V,E)} is a subset of V {\displaystyle V} such that u v ∈ E ⇒ u ∈ V ′ ∨ v ∈ V ′ {\displaystyle uv\in E\Rightarrow u\in V'\lor v\in V'} , that is to say it is a set of vertices V ′ {\displaystyle V'} where every edge has at least one endpoint in the vertex cover V ′ {\displaystyle V'} . Such a set is said to cover the edges of G {\displaystyle G} . The following figure shows two examples of vertex covers, with some vertex cover V ′ {\displaystyle V'} marked in red.