PathGraphQ
PathGraphQ[g] yields True if the graph g is a path and False otherwise.
Examples
PathGraphQ[PathGraph[{1, 2, 3, 4}]]
(* True *)PathGraphQ[CycleGraph[4]]
(* False *)Please visit the official Wolfram Language Reference for more details.
PathGraphQ[g] yields True if the graph g is a path and False otherwise.
PathGraphQ[PathGraph[{1, 2, 3, 4}]]
(* True *)PathGraphQ[CycleGraph[4]]
(* False *)Please visit the official Wolfram Language Reference for more details.