War: Collective Punishment
Technically, collective punishments - punishing a group for a crime of some of its members - is a war crime. In reality, every war is either a form of collective punishment or naked aggression. The Islamic militants who attacked the Mall in Nairobi presumably imagined they were punishing somebody for crimes against Islam that still somebody else committed. In the case of suicide attackers, their is not much satisfaction in punishing the directly guilty. The indirectly guilty are hard to find, hard to extract from their refuges, and hard to convict when you can catch them.
On the other hand, it might be pretty easy to round up a lot of Muslims, almost all of whom are perfectly innocent of the crimes in question, and murder them. This is the logic of religious war and persecution. It's brutal, it's horribly unfair, but does it work? Does it actually discourage the crimes in question?
The answer of history seems to be: sometimes. If there is a balance of forces, or a near balance of forces, mutual murder can continue until both sides are exhausted. If one side has a great preponderance of force, the minority is likely to be cowed or exterminated.
Muslims in the world today are a huge minority, but relatively weak, both because of internal divisions and collective lack of economic and military prowess. The Muslim fanatics are eager for that battle of civilizations, as they have described it, but if it were to happen, they would be utterly defeated. So far, at least, the rest of the world is held back by its own divisions and some fairly recently adopted moral standards.