trail vs path in Graph Theory v/s Graphical Models

119 Views Asked by At

In my course on probabilistic graphical models, I learnt (quoting from page 36 of the book Probabilistic Graphical Models: Principles and Techniques by the same author)

  • Path: We say that X1 , . . . , Xk form a path in the graph K = (X , E) if, for every i = 1, . . . , k − 1, we have that either Xi → Xi+1 or Xi —Xi+1 . A path is directed if, for at least one i, we have Xi → Xi+1 .

  • Trail: We say that X1 , . . . , Xk form a trail in the graph K = (X , E) if, for every i = 1, . . . , k − 1, we have that Xi <-> Xi+1 . (<-> means either -> or <- or -)

However in context of Graph Theory, this question and other links on the internet seem to suggest

  • Path: Walk with no repeated vertex
  • Trail: Walk with no repeated edges

Are the two terms defined in different ways in contexts of Graphical Models and Graph Theory or am I understanding something wrong?