M can be small either because there are too few observations or because values does not change much and the total number of possible distinct values of the test statistic is in fact much smaller (eg one sample with 1s and 3s and the other with 3s and 5s). Plus, when should we discard duplicate permuted values? Sampling permutations with replacement allows by construction the presence of duplicates and these should then not be suppressed. But when duplicates arise from different permutations, what should we do?
M can be small either because there are too few observations or because values does not change much and the total number of possible distinct values of the test statistic is in fact much smaller (eg one sample with 1s and 3s and the other with 3s and 5s). Plus, when should we discard duplicate permuted values? Sampling permutations with replacement allows by construction the presence of duplicates and these should then not be suppressed. But when duplicates arise from different permutations, what should we do?