The Islamic State group claimed responsibility on Saturday for a knife attack in the western German city of Solingen that killed three people.