Title: A characterization of commutative group algebras and measure algebras