How many possible trade routes contest. 15M gold prize!

General chit-chat about anything in-game here.
In-game trade offers should be published here
Roleplaying is recommended (Write like as if your character is speaking)

Re: How many possible trade routes contest. 15M gold prize!

Postby PhoenixKnight » Mon Apr 18, 2016 3:44 pm

Haron,

you are right, I messed up on the initial vector.

2p routes=189
3p routes=3591
4p routes=6426
Total= 10206
Phoenix Knight
Dragon of the desert and the two seas
User avatar
PhoenixKnight
 
Posts: 1318
Joined: Sat Feb 09, 2013 9:27 pm

Re: How many possible trade routes contest. 15M gold prize!

Postby Haron » Mon Apr 18, 2016 4:22 pm

Phoenix: Now we get the same result for the 2p routes. The 4p routes are a bit tricky, but I'm pretty sure your 3p number is off.

The first port can be any of the 21. The next port has to produce somthing different, so only 18 options. The 3rd port can NEITHER produce the same as the first OR the second port (since the fleet will sail from port 3 to port 1), giving the third port 15 options. However, since it doesn't matter which port you start in, that is to say, ABC=BCA=CAB, we must divide by 3 (by 6 if "reverse" trade routes are excepted, but I won't do that). So, for 3 ports, the answer has to be:

21*18*15/3=1890.

The real trouble comes first with the 4p routes. I think I got it right in my previous post, but I'll have to double check that one. I'm confident in my result for 2 and 3 port routes, though.
The T'zak Ryn offers Naval Combat Solutions for the Quality Conscious Customer
User avatar
Haron
Forum Rambler
 
Posts: 1926
Joined: Tue Mar 29, 2016 10:04 am

Re: How many possible trade routes contest. 15M gold prize!

Postby PhoenixKnight » Mon Apr 18, 2016 5:03 pm

Haron, I revised my script for those repetitions.
2P =189
3p=1890
4p=2835 but that is only for [abac] combinations and not for abcd

total= 4914

ab =ba
abc=cba=bac
abac=caba=acab=baca
Phoenix Knight
Dragon of the desert and the two seas
User avatar
PhoenixKnight
 
Posts: 1318
Joined: Sat Feb 09, 2013 9:27 pm

Re: How many possible trade routes contest. 15M gold prize!

Postby Captain dungeness » Mon Apr 18, 2016 5:08 pm

Great discussion, it is apparent I need to clarify just a few things.

Haron is right:1-2-3 is NOT EQUAL TO 3-2-1 because port prices are different for each trade good.
This also means 1-2-3-4 is NOT EQUAL TO 4-3-2-1. But 1-2 = 2-1 because there are only 2 ports.

1-2-1-3 is a unique route from 1-2 and 1-3 but it's the same route at 1-3-1-2 and 3-1-2-1 etc. There is no logical trap intended.

I mean to say MEANINGFUL UNIQUE routes: Grapefruit is right: Kanoni-Aiora is not a valid route since they won't buy eachother's produced goods. So once you start at the first port you have 18 ports to choose from.

Gold bars are excluded from these calculations :)

Everyone can change their estimate as many times as they want, I will just use the last number you posted.

I'm updating my first post to reflect this clarification

-Captain D
User avatar
Captain dungeness
 
Posts: 626
Joined: Mon Feb 28, 2011 3:43 am

Re: How many possible trade routes contest. 15M gold prize!

Postby Slindur » Mon Apr 18, 2016 6:15 pm

Haron wrote:Guluere:

With two ports, the first can be any of the 21 ports, and the 2nd any of the 20 others. However, now you get both A-B and B-A, so you must divide by 2.
With 3 ports, the first port can be any of the 21 ports, the next port can be any of the 20 others, and the third can be any of the remaining 19. Sure, you now get A-B-C, B-C-A and C-A-B, so you must divide by 3 (phoenixknight divided by 6, which is correct only if ALL permutations are identical, which is not true). This give a higher number (even if you divide by 6), since multiplying with 19 outweights the higher chance of duplicates. Even more so with 4 ports (and there you get additional trouble, since you can have A-B-A-C alternatives in addition to those handled with "combination without permutation", which is even wrong here, as some permutations are allowed).



Haron,

You are missing something in your logic here. While I am not going to expound upon it now, there is a fundamental error in your math here. There was a fundamental flaw in my math too, as I calculated based on there being 5 ports that you could go between and not 4. So I need to redo my math now...

Slindur
User avatar
Slindur
 
Posts: 244
Joined: Thu Sep 19, 2013 10:15 pm

Re: How many possible trade routes contest. 15M gold prize!

Postby Slindur » Mon Apr 18, 2016 7:30 pm

Ok, my answer is 30618. While "meaningful" new trade routes can be debated, I am saying that there are 30618 routes. “Meaningful” here is determined by being able to move resources from port to port in a way that resources are not being repeated. Time is not taken into consideration in meaningfulness as distinct trade routes are the main criteria for meaningfulness.

My rationale is this:

- There are 21 ports, 3 ports with each of 7 resources. Therefore, pick any port, and there are 18 options of ports with a different resource to choose from for the other port, as there are 6 other resources to choose from, each with 3 ports/resource.
- You can have 2 port, 3 port, or 4 port trade routes. Since they can each produce meaningful routes, they need to all be considered separately.

2 PORT TRADE ROUTES:
You can stop here with 2 ports and make a meaningful trade route. The combination calculation would be 21*18, but since 1-2 and 2-1 are included in combinations, the number would have to be halved, as each route would be listed twice. Therefore, you can have 189 meaningful 2 port trade routes (21*18/2 is the calculation for 2 ports).
3 PORT TRADE ROUTES:
- If you choose to create a 3 port trade route, then you still have 21 ports to start from, 18 choices for a second port, and then there are 15 choices for the third port in the trade route to make a new meaningful route. The rationale for this is that you need a third resource, or it would not be a meaningful trade route (if you choose the 3rd port with the same resource as 1st port, it would carry wood, for instance, from one wood port (3rd port) to another wood port (1st port) making this not a meaningful option). Also, the combination equation would be 21*18*15, but there are repeated patterns. With 3 port routes, each meaningful route is repeated 3 times (1-2-3, 2-3-1, and 3-1-2 are all the same); therefore, the calculation for meaningful 3 port trade routes is 21*18*15/3 with 1890 routes.
4 PORT TRADE ROUTES:
If you choose to create a 4 port trade route, the logic gets more complicated, as there are different scenarios.
- Scenario 1, NO REPEAT PORTS: you can choose any port (21 choices), go to any port with a different resource (18 options), go to any port with a different resource than port 2 but the first port (18-1= 17 options), and go to any port with a different resource than port 3 except port 1 or 2 (18-1-1= 16 options). The combination calculation would be 21*18*17*16. You may ask if this is meaningful or not. While you make say a (1) wood resource port to (2) tools resource port to (3) wood resource port to (4) tools resource port is not meaningful/different from a 2 port route of (1) wood resource port to (2) tools resource port is not new/meaningful, as you may want to do this to not lower the price of the goods at the 2 selected ports, as this would slow down the decline of resources in those ports for the large traders (like Kart who has over 1,000 ships). It wouldn't matter to me with my fleets, but it is a possible combination and could be meaningful. Now for repeated patterns… each meaningful pattern has 4 routes in those combinations (1-2-3-4, 2-3-4-1, 3-4-1-2, 4-1-2-3). Therefore, this scenario has 25704 meaningful options (21*18*17*16/4). (If this is not deemed to be meaningful, then I request the right to revise this and still be considered to have first shot at the prize.)
- Scenario 2, REPEAT FIRST PORT as 2nd port: this is not a meaningful or new route. This effectively makes this 4 port route a 3 port route, as the repeat of 1 port in a row is redundant and will not trade items at same cost (or might lose money if you buy at a higher price than you are selling back to the port). Regardless, 0 new meaningful routes.
- Scenario 3, REPEAT FIRST PORT as 3rd port: you can choose any port (21 choices), go to any port with a different resource (18 options), go back to the first port (1 option), and go to any port with a third resource (15 options). So the calculation for possible routes is 21*18*1*15. Repeated routes: here there are 2 copies of meaningful sequences (1-2-1-3 is not different from 1-3-1-2). Therefore the calculation for distinct routes is 21*18*1*15/2 making 2835 routes in this scenario. Because of the rules of port selection here, this does not duplicate with any 2 or 3 port route. Bonus for new players: This type of route is meaningful for anyone trying to stockpile resources in one port.
- Scenario 4, REPEAT FIRST PORT as 4th port: This is not different from a 3 port route, and therefore, there are no new trade routes here, as Aiora-Tortuga-Tzogos is not different from Aiora-Tortuga-Tzogos-Aiora. 0 new routes.
- Scenario 5: REPEAT SECOND PORT as 3rd port: This is not different from a 3 port route either and is not meaningful. 0 new routes.
- Scenario 6: REPEAT SECOND PORT as 4th port: This scenario is also already covered in the repeat first port as 3rd port scenario. (1-2-1-3 is not different from 2-1-3-1.) 0 new routes.
- Scenario 7: REPEAT THIRD PORT as 4th port: This scenario effectively makes it a 3 port trade route, and is not new. 0 new routes.
- No other scenarios: You cannot repeat the 4th port with any other port and be different from the above scenarios. Also, you cannot repeat any port 3 times (1-2-1-1 for example), as it would make this 4 port route a 2 port route, and repeating the same port 4 times is not a trade route.

Slindur
User avatar
Slindur
 
Posts: 244
Joined: Thu Sep 19, 2013 10:15 pm

Re: How many possible trade routes contest. 15M gold prize!

Postby Haron » Mon Apr 18, 2016 7:40 pm

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.
The T'zak Ryn offers Naval Combat Solutions for the Quality Conscious Customer
User avatar
Haron
Forum Rambler
 
Posts: 1926
Joined: Tue Mar 29, 2016 10:04 am

Re: How many possible trade routes contest. 15M gold prize!

Postby Haron » Mon Apr 18, 2016 7:42 pm

Which, fortunately, is the same I got in my last post where I calculated the total :-)
The T'zak Ryn offers Naval Combat Solutions for the Quality Conscious Customer
User avatar
Haron
Forum Rambler
 
Posts: 1926
Joined: Tue Mar 29, 2016 10:04 am

Re: How many possible trade routes contest. 15M gold prize!

Postby PhoenixKnight » Mon Apr 18, 2016 7:52 pm

I haven't done my math for 4 p yet. but my logic is A and B, B and C , C and D, D and A need to sell different product and then remove the repetitions.
Looking at my math progression, I think I may end at the same values.
I will post when I am done.
Phoenix Knight
Dragon of the desert and the two seas
User avatar
PhoenixKnight
 
Posts: 1318
Joined: Sat Feb 09, 2013 9:27 pm

Re: How many possible trade routes contest. 15M gold prize!

Postby Captain dungeness » Mon Apr 18, 2016 9:13 pm

Nice post Slindur and Haron.
I agree with 1 assumption but not another:

I agree that 3-port routes: 21 options, then 18 options then 15 options (because going to the same resource as the first port would be 'invalid'.
But for 4-port routes there are: 21 options, then 18, then 18, then 15 (an example is Goroum-Hannes-Goroum-Pania 1-2-1-3) the last port can't be the same resource as the first or third port's resource but the 3rd port can be the same as the first resource.
User avatar
Captain dungeness
 
Posts: 626
Joined: Mon Feb 28, 2011 3:43 am

PreviousNext

Return to Tavern

cron