Groups with a rational generating function for the word problem This question comes more from curiosity than a specific research problem.  Let G be a group and S a finite symmetric generating set.  By the WP(G,S) I mean the set of all words in the free monoid on S mapping to the identity of G.  
A classical result of Anissimov says that WP(G,S) is a regular language iff G is finite.  Regular languages have rational generating functions,  so I am asking:

Dooes rationality of the generating function of WP(G,S) imply G is finite?

I believe, but didn't check, that rationality doesn't depend on the choice do S. 
I guess that my motivation is when is the generating function for probability of return to the origin at step n of a random walk rational?
 A: I hope I'm also not misinterpreting the question, but it seems to me that the answer is yes. In fact the property of having a rational "walk generating function" characterizes finite graphs not only among Cayley graphs as in your question but also among the larger class of regular quasitransitive connected graphs (quasitransitive here means that the automorphism group acts with finitely many orbits). This is theorem 3.10 in "Counting Paths in Graphs" by L. Bartholdi, published in Enseign. Math. 45 (1999) 83-131. It is mentioned in the paper that the analogous question for arbitrary connected regular graphs is open.
A: Maybe I don't understand the question, but automatic groups have rational growth functions, and are frequently infinite. I believe that it is not known whether or not automaticity depends on the choice of generating set. For more info, see Cannon, Epstein, Thurston, Holt, Levy "Word processing on groups", or several papers of Jim Cannon and/or Bill Floyd.
EDIT As many have pointed out I did not, in fact, understand the question. There is a related conjecture of Sarnak, to the effect that the spectral gap of the associated operator on surface groups is algebraic (which could be strengthened to conjecture that the function you are interested is algebraic). The function is known for free groups (Harry Kesten's thesis), but, as far as I know, it is not known for too many other groups.
