Why was I told to use a sample size of 30 when using the Mann–Whitney U test? My lecturer said I should use $n_1=n_2=30$ as sample size. I do not see any mention of sample size being a requirement for the Mann–Whitney U test on Wikipedia. I see there are other statistical tests which do require a minimum sample size of 30 in some situations. Is the sample size important for the Mann–Whitney U test?
Edit: I was asked to add more information, so here it goes: The performance of changes to an algorithm are been tested. The algorithm outputs a number which represents its performance. The first sample set will be the algorithm's performance numbers without the modifications, the second sample set will be the algorithm's performance numbers with the modifications. The size of the first sample set is $n_1$. The size of the second sample set is $n_2$. The test is used to determine if the changes to the algorithm make a difference for its performance. Random numbers play a roll in the algorithm so the performance number varies slightly between  executions.
 A: *

*the highest the N the better

*community seems to agree that N=30 is a good lower bound for most applications, but that is a soft, conventional limit, not a theoretical one

A: There are a couple of possibilities here.  It is certainly true that with more data you will have more power, but power is also a function of how big an effect you are trying to differentiate from 0, so $N = 60$ could be lousy power, great power or anything in between.  It is also true that $N = 30$ is an old rule of thumb for t-tests, so, if we were to assume your lecturer is confused, that could be the source.  Let's be charitable, though.  @cassneklff makes an insightful point (+1), but you shouldn't really need $N = 60$ for it to be possible to get p-values less than .05, so that may not be it either.  Instead, let's think more about how the Mann-Whitney test works—specifically, how it computes the p-value.  
The Mann-Whitney test doesn't really assume that your data are ordinal ratings, despite the fact that that is what many people believe.  It actually has continuous data in mind, it's just that they can have any distribution (not just the normal).  With continuous data, it is theoretically possible to compute exact p-values.  This can be computationally expensive though.  So with large $N$, the normal approximation is typically used.  In R, for example, ?wilcox.test uses the normal approximation if $N > 50$, which is noticeably close to your lecturer's rule of thumb.  With sample sizes that large, the normal approximation should be good, but with smaller sample sizes, it may not be so good.  That doesn't matter if you're going to compute the exact p-value, but the kink in the chain is that the exact p-value can't be computed if there are ties. (Ties shouldn't occur with truly continuous data, but are likely to occur with the kinds of data people often use the Mann-Whitney U-test for in practice.)  Thus, the normal approximation often is relied upon to compute the p-value, even with small sample sizes.  My guess is that this fact is what lies behind your lecturer's rule of thumb.  
So, how poorly does the normal approximation work?  It depends on your tolerance for error, I suppose.  Below, I simulate tests of a true null of two binomials (which will create lots of ties).  You can see that the test is a little conservative when $N = 20$, and that the sampling distribution of the test statistic isn't quite normal.  
set.seed(7316)                       # this makes the example exactly reproducible
w.vect = vector(length=10000)        # this will store the test statistics
p.vect = vector(length=10000)        # this will store the p-values
for(i in 1:10000){
  g1 = rbinom(10, size=10, prob=.6)  # 10 realizations each of 2 binomials w/ 
  g2 = rbinom(10, size=10, prob=.6)  # parameters: n=10, p=.6 (a true null)
  wt = wilcox.test(g1, g2)           # the Mann-Whitney U-test
  w.vect[i] = wt$statistic
  p.vect[i] = wt$p.value
};  rm(i)
summary(p.vect)
#      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
# 0.0006907 0.2683816 0.5275134 0.5221142 0.7840781 1.0000000 
mean(p.vect<.05)  # [1] 0.0406       # this should have been .05
summary(w.vect)
#    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#    6.00   41.50   50.00   50.19   59.00   92.50 
sd(w.vect)  # [1] 12.64774
xs = seq(5, 93)                      # I need this for the plot below
windows()
  hist(w.vect, breaks=88, freq=FALSE, col="lightgray",
       main="Observed density vs. true normal")
  lines(density(w.vect), lwd=2)
  lines(xs, dnorm(xs, mean=50.9, sd=12.64774), lwd=3, col="red")


A: As Mann-Whitney is a non-parametric test, it can produce just a fixed set of P-values when the sample size is too low. For example, for small samples it cannot produce P<0.05 in any case. As others said, your specific sample size appears to be the one of community standard, other values will work, but going too low will cause certain discretization problems..
A: The Mann Whitney test does not require any specific N. 
However, what your instructor is probably talking about is power; that is, with a small N, differences are not going to be statistically significant unless they are really huge. 
A: Sample size is always important. I want my students to collect data with a sample size of thousands, because that gives them good data and more power. They want a sample size of 4, because they are lazy. 30 seems like a compromise.
