Police in northwest Pakistan say a suicide bomber has struck near a market , killing at least 18 people and wounding more than 30 .