Baltić, V.. "Applications of the finite state automata for counting restricted permutations and variations" Yugoslav Journal of Operations Research [Online], Volume 22 Number 2 (11 October 2016)