Active Contamination Detection in Water-Distribution Systems