I find that cooperative learning is more successful when used with longer, harder activities. If an activity is too easy or routine, the stronger students finish while the weaker students look on and do not become engaged in the task or gain much from it. If an activity is too short, again some students finish it quickly while the others wait or get off-task, knowing that they will find out the answer soon without having to work for it. It seems that only the most exceptional groups are able to resist the temptation of simply splitting the homework assignment four ways and working individually. As indicated earlier, in-class activities work best.
Small groups seem to work best for special projects.
The problem with doing homework in small groups is that some students coast and mainly copy what others have done. I think that when students can get together to solve mathematical problems, then they benefit from seeing how others work and think. By discussing the problems after they have been working on them, the students get immediate feedback. However, some students don't work as hard, knowing that we will discuss each problem afterwards. Also, if there is a syntax error, usually someone in the group will see it.