Single elimination

Navyguy

Registered User.
Local time
Yesterday, 21:19
Joined
Jan 21, 2004
Messages
194
Hi Everybody

Not sure where I should have posted this question, so General works...

From a few earlier posts of mine you will have noticed that I am trying to put together a competition DB for our kids club. I would like to try to have it figure out the Bye System for single elimination play. Below is an explanation of how the byes are determined that I copied from a sports website which explains it much better then I can.

"...single elimination tournaments are based on powers of 2. That is, when the tournament size is a power of 2 (2, 4, 8, 16, 32, 64, 128, 256, ...) there will be NO first round byes. A "bye" game in a single elimination tournament only occurs in the first round, and byes are generally awarded to the highest seeded teams. Teams who receive a first round "bye" will play their first game in the second round. Byes are determined by taking the number of teams in the tournament (n) and subtracting the number from the NEXT HIGHEST power of 2. For example, in a single elimination tournament with 14 teams, you would take the next highest power of 2 (16) and subtract 14 from it:

16-14 = 2

Therefore, there will be 2 byes in the first round for your single elimination tournament with 14 teams."

What I have for table fields (along with others) would be CompetitorName and EventNumber. The event number is based on age and skill level that would be a qry itself and stored in a separate table from the tombstone information of the competitor.

What I am looking for is some direction on how to implement this. Would this be done using a query? Secondly, how could it be displayed in a report so that it followed the typical flow chart layout that I am sure most of you are familiar with?


Thanks as always!!!
 
NavyGuy,

Good to see you again. I only know the NCAA hoops
tourney. They work in brackets of 16-teams each.
There's not really much data to it really.

If I was doing this, I'd keep it simple and just
insert the records for each round in VBA. The
code should be simple, Traverse last round by game
number, select pairs of records and assign them
their number for the next game.

The hard part is the first round. In the example
below columns 5 and 6 show the seedings. The pairs
(1,16), (8,9), (5,12) etc. are to be assigned games
in that order. And in subsequent rounds, that
relative order must be preserved.


Code:
tblBrackets:
BracketID
BracketName
1,East
2, West

tblGames:
BracketID
RoundNumber
GameID
GameNumber
HomeTeamID
AwayTeamID
WinnerID


These are all East bracket games (West, they'd be 2s)
| The games are all round 1
| | Autonumber
| | | Game Number, need to preserve vertical seeding !!!!!!
| | | | Home Team
| | | | | Visitor
| | | | | |  Winners advance (1,9 below)
| | | | | |  |                |         Semifinals             Winner
V V V V V V  V                V         V                           V
1,1,1,1,1,16,1      1,2,9,1,1,9,1     1,3,13,1,1,5,1   1,4,15,1,1,2,1
1,1,2,2,8,9,9
1,1,3,3,5,12,5      1,2,10,2,5,13,5   1,3,14,2,6,2,2
1,1,4,4,4,13,13
1,1,5,5,6,11,6      1,2,11,3,6,3,6
1,1,6,6,3,14,3
1,1,7,7,7,10,7      1,2,12,4,7,2,2
1,1,8,8,2,15,2
                    (To generate the next round, traverse the previous round
                     by GAME NUMBER, selecting two records at a time, and
                     assign the next game number sequentially.  This preserves
                     the way teams should be paired.)

tblTeams:
TeamID
TeamName
SeedPosition - For first round scheduling

tblRoster:
RosterID
TeamID
Position

Just some thoughts, hope some of it helps.

Oh! For the bye(s), Just make a team called bye, give them the bottom
seed(s) and let them lose. They're gone after round 1 and don't really
do much at all.

Wayne
 
Howdy Wayne

Hope all is well with you…

I took some time to check out the NCAA Hoops DB on the web and also a debating DB that was also available, but I am not sure if they have what I am looking for. I need to take a closer look.

I know the previous post mentions seeding, but I don’t think that this is really necessary at the level of competition I am working with, except if this DB ever gets off the ground and we invite some other guest(s) club over, the seeding may take the form of making sure that two kids from the same club don’t compete against each other in the first round at least.

Really what I think that all I am looking at doing is (using the example in the previous post) wanting to enter the competitor’s names, say 14 for a particular event; when a button is pressed to process the report (through a qry I think) Access determines that it needs the 16-14=2 formula and formats the report to display 12 people plus 2 byes in the first round and then rest in the second round. Of course this sounds easy enough…and of course the math itself is easy enough, but it seems a little difficult to get access to make the decision on what “powers of 2” it needs after querying the DB for the number of competitors for a particular event in the Tbl. If the total of competitors is 8 then there would be no byes, but if it was 57 competitors Access would select 64-57=7 and then format the report with 7 byes in the first round etc.

Hopefully this is a bit clearer. I will try to decipher what you have posted Wayne and will get back with some more questions.
 

Users who are viewing this thread

Back
Top Bottom