In this paper we find and explore the correspondence between quivers, torus
knots, and combinatorics of counting paths. Our first result pertains to quiver
representation theory -- we find explicit formulae for classical generating
functions and Donaldson-Thomas invariants of an arbitrary symmetric quiver. We
then focus on quivers corresponding to (r,s) torus knots and show that their
classical generating functions, in the extremal limit and framing rs, are
generating functions of lattice paths under the line of the slope r/s.
Generating functions of such paths satisfy extremal A-polynomial equations,
which immediately follows after representing them in terms of the Duchon
grammar. Moreover, these extremal A-polynomial equations encode
Donaldson-Thomas invariants, which provides an interesting example of
algebraicity of generating functions of these invariants. We also find a
quantum generalization of these statements, i.e. a relation between motivic
quiver generating functions, quantum extremal knot invariants, and q-weighted
path counting. Finally, in the case of the unknot, we generalize this
correspondence to the full HOMFLY-PT invariants and counting of Schr\"oder
paths.Comment: 45 pages. Corrected typos in new versio