  One of fundamental results of the theory of joint/generalized spectral
radius, the Berger-Wang theorem, establishes equality between the joint and
generalized spectral radii of a set of matrices. Generalization of this theorem
on products of matrices whose factors are applied not arbitrarily but are
subjected to some constraints is connected with essential difficulties since
known proofs of the Berger-Wang theorem rely on the arbitrariness of appearance
of different matrices in the related matrix products. Recently, X. Dai proved
an analog of the Berger-Wang theorem for the case when factors in matrix
products are formed by some Markov law.
  We introduce the concepts of the joint and generalized spectral radii for
products of matrices subjected to constraints on the sliding block relative
frequencies of occurrences of different matrices, and prove an analog of the
Berger-Wang theorem for this case.
