added computeNMChannels helper function 

to compute the diferent channels to be processed independently in the N&M algorithm.