<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://tools.usyvl.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Static-Hashed-Tournament_Scheduling_Algorithm</id>
	<title>Static-Hashed-Tournament Scheduling Algorithm - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://tools.usyvl.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Static-Hashed-Tournament_Scheduling_Algorithm"/>
	<link rel="alternate" type="text/html" href="https://tools.usyvl.org/wiki/index.php?title=Static-Hashed-Tournament_Scheduling_Algorithm&amp;action=history"/>
	<updated>2026-05-14T12:51:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://tools.usyvl.org/wiki/index.php?title=Static-Hashed-Tournament_Scheduling_Algorithm&amp;diff=89&amp;oldid=prev</id>
		<title>Aaron: 1 revision imported: Hopefully full import</title>
		<link rel="alternate" type="text/html" href="https://tools.usyvl.org/wiki/index.php?title=Static-Hashed-Tournament_Scheduling_Algorithm&amp;diff=89&amp;oldid=prev"/>
		<updated>2023-06-21T00:25:40Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported: Hopefully full import&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:25, 21 June 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Aaron</name></author>
	</entry>
	<entry>
		<id>https://tools.usyvl.org/wiki/index.php?title=Static-Hashed-Tournament_Scheduling_Algorithm&amp;diff=88&amp;oldid=prev</id>
		<title>Aaron: /* Introduction */</title>
		<link rel="alternate" type="text/html" href="https://tools.usyvl.org/wiki/index.php?title=Static-Hashed-Tournament_Scheduling_Algorithm&amp;diff=88&amp;oldid=prev"/>
		<updated>2012-08-18T14:33:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Introduction&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:scheduling]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
So the idea here is to come up with a way to id a particular configuration/combination of teams from different sites (and possibly # of courts) and &lt;br /&gt;
the store several solutions.&lt;br /&gt;
&lt;br /&gt;
Our previous organization has focused on mixing up the teams from the various sites to try to spread them out over a semi-fixed pool layout.&lt;br /&gt;
If instead we take a more structured approach of ordering the teams by the number of teams from each site, we can come at this more systematically and &lt;br /&gt;
maybe only solve the problem one time for each case (possibly a couple more to allow tournament repeats where we try to avoid repeating matches held &lt;br /&gt;
in the previous tournament.&lt;br /&gt;
&lt;br /&gt;
Implementation of this idea is described at [[Pool_Layout_DB]]&lt;br /&gt;
&lt;br /&gt;
===Team ordering within pool by site association===&lt;br /&gt;
For this to work, we would need to have a specific way of ordering the teams (by site association) within the pool.  The most obvious choice is to take&lt;br /&gt;
the site with the most kids, drop them in first.&lt;br /&gt;
&lt;br /&gt;
So if we look at the total number of teams we can imagine that we could break that down into ordered sets.&lt;br /&gt;
&lt;br /&gt;
So for a 4 team pool only the following combination of teams/site are available.&lt;br /&gt;
&lt;br /&gt;
 4       Only 1 site in this pool (ie: other sites may not have kids in this age division)&lt;br /&gt;
 31      2 different sites, 3 from one, 1 from the other&lt;br /&gt;
 22      2 different sites, 2 teams from each&lt;br /&gt;
 211     3 different sites&lt;br /&gt;
 1111    4 different sites, 1 team from each sites&lt;br /&gt;
&lt;br /&gt;
So the approach here is to find 1-3 solution sets for each of these possibilities, instead of finding all possible match combos to check against.&lt;br /&gt;
This approach will not be more efficient for smaller pools, but will yield HUGE efficiencies on the larger pools where the combinatorics of solution sets&lt;br /&gt;
blows up into crazy large numbers.&lt;br /&gt;
&lt;br /&gt;
===Number of courts===&lt;br /&gt;
The other variable here is the number of courts to use.  The default is typically int(floor(#teams/2)), but there are cases where its desirable or necessary to have &lt;br /&gt;
fewer than that number of courts.  One examples would be a celebrity visit, having additional teams with byes would provide more photo ops.  Another example would be&lt;br /&gt;
a field that does not have the capacity for the full number of courts required to minimize byes.&lt;br /&gt;
&lt;br /&gt;
===Number of games===&lt;br /&gt;
The remaining variable is the number of games.  This is not quite as important because the really critical component is assigning the matches for each game.&lt;br /&gt;
When adding games, we want to avoid (or at least minimize) repeated games and collisions.  The way to handle this is to maybe just provide a couple additional&lt;br /&gt;
games slots in the stored template.&lt;br /&gt;
&lt;br /&gt;
===Number of Sites===&lt;br /&gt;
Theoretically, this number of sites involved in a tournament can be large, but it is typically not more than 4.&lt;br /&gt;
We could easily focus on template building up to that number and provide error messages or prompts if we &lt;br /&gt;
exceeed that number.  Notice that if we can eliminate extra template work even starting in the case of a 5 team &lt;br /&gt;
pool.  This is represented by the number of digits in the combination.&lt;br /&gt;
&lt;br /&gt;
===Possible site count breakdowns for larger pools===&lt;br /&gt;
A couple things here.  Have put a * after possibilities that indicate 6 or more teams in a pool.  Even 5 is pretty unlikely at this point.&lt;br /&gt;
Another shortcut I took is that I dont include possibilities where we have more than 10 teams from a single site in the pool. &lt;br /&gt;
This is primarily because it breaks my simple notation here, but the reality is that its unlikely that those cases will crop up.&lt;br /&gt;
&lt;br /&gt;
====5 teams in a pool, site count possibilities, in largest to smallest order====&lt;br /&gt;
 5&lt;br /&gt;
 41&lt;br /&gt;
 32&lt;br /&gt;
 311&lt;br /&gt;
 221&lt;br /&gt;
 2111&lt;br /&gt;
 11111  # 5 sites with one team each in pool, probably dont need to cover...&lt;br /&gt;
&lt;br /&gt;
====6 teams in a pool, site count possibilities, in largest to smallest order====&lt;br /&gt;
 6&lt;br /&gt;
 51&lt;br /&gt;
 42&lt;br /&gt;
 411&lt;br /&gt;
 33&lt;br /&gt;
 321&lt;br /&gt;
 3111&lt;br /&gt;
 222&lt;br /&gt;
 2211&lt;br /&gt;
 21111&lt;br /&gt;
 111111*&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====7 teams in a pool, site count possibilities, in largest to smallest order====&lt;br /&gt;
 7&lt;br /&gt;
 61&lt;br /&gt;
 52&lt;br /&gt;
 511&lt;br /&gt;
 43&lt;br /&gt;
 421&lt;br /&gt;
 4111&lt;br /&gt;
 331&lt;br /&gt;
 322&lt;br /&gt;
 3211&lt;br /&gt;
 31111&lt;br /&gt;
 2221&lt;br /&gt;
 22111&lt;br /&gt;
 211111*&lt;br /&gt;
 1111111*&lt;br /&gt;
&lt;br /&gt;
====8 teams in a pool, site count possibilities, in largest to smallest order====&lt;br /&gt;
 8 &lt;br /&gt;
 71&lt;br /&gt;
 62&lt;br /&gt;
 611&lt;br /&gt;
 53&lt;br /&gt;
 521&lt;br /&gt;
 5111&lt;br /&gt;
 44&lt;br /&gt;
 431&lt;br /&gt;
 422&lt;br /&gt;
 4211&lt;br /&gt;
 41111&lt;br /&gt;
 332&lt;br /&gt;
 3311&lt;br /&gt;
 3221&lt;br /&gt;
 32111&lt;br /&gt;
 311111*&lt;br /&gt;
 2111111*&lt;br /&gt;
 1111111*&lt;br /&gt;
&lt;br /&gt;
====9 teams in a pool, site count possibilities, in largest to smallest order====&lt;br /&gt;
 9 &lt;br /&gt;
 81&lt;br /&gt;
 72,711&lt;br /&gt;
 63,621,6111&lt;br /&gt;
 54,531,522,5211,51111&lt;br /&gt;
 441,432,4311,4221,42111,411111*&lt;br /&gt;
 333,3321,33111,3222,32211,321111*,3111111*&lt;br /&gt;
&lt;br /&gt;
====10 teams in a pool, site count possibilities, in largest to smallest order====&lt;br /&gt;
 10 &lt;br /&gt;
 91&lt;br /&gt;
 82,811&lt;br /&gt;
 73,721,7111&lt;br /&gt;
 64,631,622,6211,61111&lt;br /&gt;
 55,541,532,5311,5221,52111,511111*&lt;br /&gt;
 442,4411,433,4321,43111,4222,42211,421111*,4111111*&lt;br /&gt;
 3331,3322,33211,331111*,32221,322111*,3211111*,31111111*&lt;br /&gt;
 22222,222211*,2221111*,22111111*,211111111*&lt;br /&gt;
 &lt;br /&gt;
====11 teams in a pool, site count possibilities, in largest to smallest order====&lt;br /&gt;
 92,911&lt;br /&gt;
 83,821,8111&lt;br /&gt;
 74,731,722,7211,71111&lt;br /&gt;
 65,641,632,6311,6221,62111,611111*&lt;br /&gt;
 551,542, 5411,533,5321,53111,5222,52211,521111*,5111111*&lt;br /&gt;
 443,4421,44111,4331,4322,43211,431111,42221,422111*,4211111*,41111111*&lt;br /&gt;
 32222,322211*,3221111*,32111111*,311111111*,222221*&lt;br /&gt;
&lt;br /&gt;
====12 teams in a pool, site count possibilities, in largest to smallest order====&lt;br /&gt;
 93,921,9111&lt;br /&gt;
 84,831,822,8211,81111&lt;br /&gt;
 75,741,732,7311,72111,711111*&lt;br /&gt;
 66,651,642,6411,633,6321,63111,621111*&lt;br /&gt;
 552,5511,543,5421,54111,5331,53211,531111*,52221,5221111*&lt;br /&gt;
 444,4431,4422,44211,441111*,4332,43311,432111*,42222,422211*&lt;br /&gt;
 3333,33321,333111*,33222,332211*,322221*&lt;br /&gt;
 222222*&lt;br /&gt;
&lt;br /&gt;
==Algorithm==&lt;br /&gt;
Want to come up with an algorithm to generate the combinations above.  Want to highlight combinations that:&lt;br /&gt;
*Are unable to have any complete solutions resolved (site with largest number of teams has more teams than all others combined)...&lt;br /&gt;
*Combinations that have 5 (or 6) or more separate entities (would represent having more than 5 (or 6) sites at a tournament).&lt;br /&gt;
&lt;br /&gt;
Coded up the basic algorithm in a class recCombSumClass.php and implemented a script to test the thing at recCombSum.php.&lt;br /&gt;
Should make that a form and then start working on solutions.  Using the existing algorithms from the tournament stuff.&lt;br /&gt;
&lt;br /&gt;
==Applying the algorithm==&lt;br /&gt;
So much of the above is just figuring out what solution sets we need.  But that doesn&amp;#039;t get us a solution set.&lt;br /&gt;
&lt;br /&gt;
Some of the above will be automatically solvable.  But others will have to be done manually.&lt;br /&gt;
&lt;br /&gt;
Another problem we have is how to deal with repeated tournaments.  We need to have a way to provide multiple solution sets&lt;br /&gt;
anywhere we think we might have a complete repeat of a tournament.&lt;br /&gt;
&lt;br /&gt;
Have coded up the recursive combinations for the site/team combinations.  Will output the above tables in a more&lt;br /&gt;
useful fashion.&lt;br /&gt;
&lt;br /&gt;
So the general idea is to get solution sets for as many of these as we can.  Automatically for the ones we can.&lt;br /&gt;
Manually solve for others.  Maybe just enter the solution sets in a db for later lookups.&lt;br /&gt;
&lt;br /&gt;
When we look at doing large pools, we can see if we have a solution set, if so grab it.  If not, skip it and do it the old way.&lt;br /&gt;
&lt;br /&gt;
==Pros/Cons==&lt;br /&gt;
The current algorithm depends on mixing the teams differently for each repeated tournament.  This makes the whole tournament placement&lt;br /&gt;
much more complicated than it needs to be.    This method would put teams into pools much more consistently and simply. &lt;br /&gt;
&lt;br /&gt;
The new method would allow us to key one or more solution sets to a pool layout and then apply a fixed solution set.&lt;br /&gt;
&lt;br /&gt;
The team mixing could possibly done just be reordering the teams within each site on repeated tournaments.  Possibly just be shifting/rotating the list.&lt;br /&gt;
&lt;br /&gt;
==References/Related==&lt;br /&gt;
*http://www7a.biglobe.ne.jp/~sumnumberplace/31642733/&lt;br /&gt;
*http://www.codeguru.com/cpp/cpp/algorithms/combinations/article.php/c15409/Dynamic-Programming-Combination-Sum-Problem.htm&lt;br /&gt;
*http://stackoverflow.com/questions/4632322/finding-all-possible-combinations-of-numbers-to-reach-a-given-sum&lt;br /&gt;
*http://blogs.msdn.com/b/hilliao/archive/2010/06/28/count-the-number-of-combinations-that-add-to-a-given-sum-in-an-int-array.aspx&lt;/div&gt;</summary>
		<author><name>Aaron</name></author>
	</entry>
</feed>