Prehistory
I've recently started learning graph theory in my institute (as a part of discrete mathematics course). During a lecture the professor had given a definition for a local degree of a vertex which was:
A number of edges incident to the vertex
And told us that loops contribute 1 to the degree of a vertex. There was also a theorem defined during a lecture (some kind of handshaking lemma?):
If graph G is an undirected finite graph without loops, then the number of vertices with odd local degree is even. Shortly: $|V_o|$ is even.
But as I had studied graph theory myself before, I knew that loops contribute 2 to the degree of a vertex (even some sources, listed below, confirm this statement). So I asked him, why can't we just fix up that a loop contributes 2 to the degree, and remove the condition (without loops) from the theorem. He answered me that if we define a degree of a vertex as a number of edges incident to the vertex then the fact that a loop contributes 2 to the degree of a vertex is not a part of the formal mathematical definition, so loops contribute 1 to the degree of a vertex.
Questions
- Is there a difference between definitions of local degree of a vertex and a degree of a vertex?
- Can a side-note that loops are counted twice in the degree of a vertex be the part of the formal mathematical definition of a graph vertex?
- If it can't, is there such definition, where loops are counted twice?
- Are loops counted twice just for a simplification of some theorems?
- Does this depend from a context?
Sources
Sources, which do confirm that "a loop is considered to contribute 2 to the degree of a vertex":
- Wikipedia : Degree (graph theory)
- Graph Theory With Applications (J. A. Bondy and U. S. R. Mury), page 10
- An answer to the similar question on math.stackexchange
Sources, which say nothing about a loop in the definition of a degree of a vertex: