Thanks for the clarifications, Dungeness! And Slindur, I think my logic in that post was just right. Please explain why you think otherwise
OKk, Phoenix, so now we agree for the two "easy" situations; 2 and 3 port routes. For 4 port routes I have to divide the problem into four different segments.
Segment 1: All ports trade different goods. This gives 21 options for first port, 18 for second, 15 for third and 12 for the last port. I have to keep in mind that I should count ABCD, BCDA, CDAB and DABC (same route, different starting port) as the same, so I need to divide by 4. I get 21*18*15*12/4 = 17010 options.
Segment 2: All ports are different. Port 1 and 3 trade same goods, but 2 and 4 trade different goods. OK, first port can be any of the 21. Second port has 18 options. The third port has only two options, though, as it has to trade the same goods as the first port, yet is not the same port as the first. The forth port has 15 possibilities. But what should I divide with? Let's call the ports A1, B, A2, C. Not that I have not, nor need I, count B, A2, C, A1, since I assume that I start with one of the ports trading similar goods. However I DO count A2, C, A1, B, which IS the same as A1, B, A2, C. I therefore need to divide by 2, and get 21*18*2*15/2 = 5670 options.
Segment 3: All ports are different. Port 1 and 3 trade the same goods, and ports 2 and 4 trade the same goods. Again, the first port can be any of the 21 ports. The second one can be any of the 18 trading a different goods. However, both port 3 and 4 now only have two options. Let's call the ports A1, B1, A2, B2. Now, I need to divide by 4, since I also count B1, A2, B2, A1 - A2, B2, A1, A2 and B2, A1, B1, B2. So I get 21*18*2*2/4 = 378.
Segment 4: Here, port 1 and 3 is the exact same port. Port 2 and 4 are different ports (otherwise they are really 2 port routes), but it doesn't matter if they trade the same good or not - but both trade a different port from port 1. Port 1 can be any of the 21, port 2 can be any of the 18 trading another good, port 3 is the same as port 1, and port 4 can be any of the 17 ports left trading a different good than port 1. Let's call my ports A, B, A, C. This is quite similar to segment 2; I need to divide by 2 only. Thus, this segment has 21*18*1*17/2 = 3213 options.
This gives a total of 17010+5670+378+3213 = 26271 total options for 4 ports.
Adding the 189 options for 2 ports and 1890 options for 3 ports, we get a total of 28350 possible, unique trade routes.