Post Reply 
Programming puzzles: processing lists!
08-16-2017, 08:10 PM
Post: #192
RE: Programming puzzles: processing lists!
In terms of going through the matches building them without duplicates I thought at the start, and then left because I still wish to make a proper hash function, the following:

we know that for 4 teams one can have
1-2 3-4
1-3 2-4
1-4 2-3

so if one has this "blocks", adding other 2 teams should bring the following :
1-2 (all the blocks between 3,4,5,6 see with 4 teams) : 3 blocks
1-3 (all the blocks between 2,4,5,6) : 3 blocks
1-4 (all the blocks between 2,3,5,6) : 3 blocks
1-5 (like above)
1-6 (...)
2-3 (...)
2-4 (...)
2-5 (...)
2-6 (...)
3-4 (...)
3-5 (...)
3-6 (...)
4-5 (...)
4-6 (...)
5-6 (...)

One can see here that likely a lot of duplicates are made (ex: 5-6 3-4 1-2), even with 3 basic blocks (that then gets expanded).

And I agree with DavidM. Whatever the implementation (even in Malebolge, no ok not in Malebolge), please share!

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Programming puzzles: processing lists! - pier4r - 08-16-2017 08:10 PM



User(s) browsing this thread: 1 Guest(s)