Most trace it back to Euler when he considered the problem of Seven Bridges of Konigsberg https://en.wikipedia.org/wiki/Seven_Bridges_of_K%C3%B6nigsbe...