A mathematical model for group structures