Something I did not know
-
thibodeaux
- Posts: 8121
- Joined: Thu May 20, 2004 7:32 pm
In general, n isn't a power of 2, people cheat the value to make it so using bye weeks or wildcard teams.thibodeaux wrote:If you have a single-elimination tournament with N (where N is any finite, positive non-zero integer) teams, how many total games will there be?
I knew the answer for values of N that are powers of 2, but I didn't know the general answer. It's just not something that I ever thought about.
Diogenes of Sinope: "It is not that I am mad, it is only that my head is different from yours."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
-
thibodeaux
- Posts: 8121
- Joined: Thu May 20, 2004 7:32 pm
It's not a cheat. It's just a fact.Malcolm wrote:In general, n isn't a power of 2, people cheat the value to make it so using bye weeks or wildcard teams.thibodeaux wrote:If you have a single-elimination tournament with N (where N is any finite, positive non-zero integer) teams, how many total games will there be?
I knew the answer for values of N that are powers of 2, but I didn't know the general answer. It's just not something that I ever thought about.
It's not me, it's someone else.
-
thibodeaux
- Posts: 8121
- Joined: Thu May 20, 2004 7:32 pm
Yep. If you have N teams, then you need N-1 games.Malcolm wrote:Did you find/derive the general answer? I'm slightly curious.thibodeaux wrote:Yeah, but it doesn't matter; you can do it without a power of 2.
You can confirm this by thinking of a tournament bracket as a binary tree. You have N leaf nodes (the teams). The games are the internal nodes. Consult wikipedia for the relationship between these two entities.
-
thibodeaux
- Posts: 8121
- Joined: Thu May 20, 2004 7:32 pm
The reason I mention this is that on Monday, and then again today, I interviewed a database-engineer who did not know the answer, not even for powers of 2.
Today's guy actually did try to work through for 64 teams, and he wrote down and added up the powers of 2 from 1 to 32. While he was adding, I said to him, "you know, in binary that's all ones." Didn't help him.
Today's guy actually did try to work through for 64 teams, and he wrote down and added up the powers of 2 from 1 to 32. While he was adding, I said to him, "you know, in binary that's all ones." Didn't help him.
One of our contractors is getting let go because his SQL skills suck balls. Granted, he wasn't hired for that, he kind of got screwed into a bad position. But, come on, SQL is fucking rocket science. Dude didn't know what the "bit" data type was.
I'm not looking forward to hiring any new members for our team because our hiring process is shyte. Management seems to have solved this problem just by letting manpower dwindle and refusing to hire anyone new.
Edited By Malcolm on 1290644863
I'm not looking forward to hiring any new members for our team because our hiring process is shyte. Management seems to have solved this problem just by letting manpower dwindle and refusing to hire anyone new.
Edited By Malcolm on 1290644863
Diogenes of Sinope: "It is not that I am mad, it is only that my head is different from yours."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
-
thibodeaux
- Posts: 8121
- Joined: Thu May 20, 2004 7:32 pm