Abstract
Let G be a compact, connected, semisimple Lie group. It is known that for a closed compact connected orientable surface Σ the order of the group H 2 (Σ, π 1 (G)) is equal to the number of connected components of the space Hom(π 1 (Σ),G)/G which can also be identified with the moduli space of gauge equivalence classes of flat G-bundles over Σ. If G is any compact connected Lie group, 1 implies that the number of connected components of the space Hom(π 1 (Σ), G)/G is equal to the order of the the group π 1 (G ss ) where G ss is the maximal semisimple subgroup of G. For a closed compact connected nonorientable surface, we show that the number of connected components of the space Hom(π 1 (Σ),G)/G is equal to the order of the group π 1 (G)/2π 1 (G) for any compact connected Lie group G.