# what is Path and how to find number of possible paths of length $r$

The word path is used in different way in different contexts. But I can't related them with each other. Like

geeksforgeeks $${}^1$$Path: It is a trail in which neither vertices nor edges are repeated i.e. if we traverse a graph such that we do not repeat a vertex and nor we repeat an edge.

here Path: A path in a graph is a subgraph of a given graph that is isomorphic to a path graph.

kenneth rosen discrete mathematics Path: Let n be a nonnegative integer and G a directed graph. A path of length n from u to v in G is a sequence of edges $$e_1,\cdots,e_n$$ of G such that $$e_1$$ is associated with $$(x_0,x_1)$$, $$e_2$$ is associated with $$(x_1,x_2)$$, and so on, with $$e_n$$ is associated with $$(x_{n-1},x_n)$$, where $$x_0=u$$ and $$x_n=v$$. When there are no multiple edges in the directed graph, this path is denoted by its vertex sequence $$x_0,x_1,x_2,\cdots,x_n$$. path of length greater than zero that begins and ends at the same vertex is called a circuit or cycle. A path or circuit is called simple if it does not contain the same edge more than once.

Question $$2$$: How many paths of length four are there from $$a$$ to $$d$$ in the simple graph $$G$$ in Figure $$8?$$ So there are exactly eight paths of length four from a to d according to their solution. But it can't possible without $$\color{red}{\text{repeated vertices}}$$. Which seem conflicted to the first definition$${}^1$$. So I really confused which definition should I follow or I have misunderstood something with these defintions. Besides provide me a list something like:

$$(1)$$ Walk can be repeated anything
$$(2)$$ Vertex can be repeated Edges not repeated in Trail
$$\vdots$$

See my answer here and Matthew Daly's comment. In this case, I would say (and many others) that the $$ij$$th entry $$a_{ij}$$ of $$A^n$$ is the number of walks of length $$a_{ij}$$ from $$v_i$$ to $$v_j$$, where $$A$$ is the adjacency matrix (More information in this stack exchange question.)
I'd recommend taking a look at Douglas West's Introduction to Graph Theory if you can, specifically sections $$1.1$$ and $$1.2$$. I believe West defines a path graph in section $$1.1$$ and implicitly uses the "isomorphic to a path graph definition" in section $$1.2$$.