 The original definition above represents the special case where the direct system of compact subsets has a cofinal sequence.In infinite graph theory, an end is defined slightly differently, as an equivalence class of semi-infinite paths in the graph, or as a haven, a function mapping finite sets of vertices to connected components of their complements.However, for locally finite graphs (graphs in which each vertex has finite degree), the ends defined in this way correspond one-for-one with the ends of topological spaces defined from the graph .