Enumeration of balanced finite group valued functions on directed graphs
  A group valued function on a graph is called balanced if the product of its values along any cycle is equal to the identity element of the group. We compute the number of balanced functions from edges and vertices of a directed graph to a finite group. 
Yonah Cherniavsky, Avraham Goldstein, Vadim E. Levit, Robert Shwartz
math.CO