Added pattern generation programs
Replaced range search on C array by intersect on D