Search Members Help

» Welcome Guest
[ Log In :: Register ]

 

[ Track This Topic :: Email This Topic :: Print this topic ]

reply to topic new topic new poll
Topic: Something I did not know< Next Oldest | Next Newest >
 Post Number: 1
thibodeaux Search for posts by this member.
RAG
Avatar



Group: Privateers
Posts: 6494
Joined: May 2004
PostIcon Posted on: Nov. 22 2010,16:58  Skip to the next post in this topic. Ignore posts   QUOTE

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.
Offline
Top of Page Profile Contact Info 
 Post Number: 2
TheCatt Search for posts by this member.
Top 2%
Avatar



Group: Super Administrators
Posts: 22951
Joined: May 2004
PostIcon Posted on: Nov. 22 2010,18:03 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

It's like magic.

--------------
It's not me, it's someone else.
Offline
Top of Page Profile Contact Info 
 Post Number: 3
thibodeaux Search for posts by this member.
RAG
Avatar



Group: Privateers
Posts: 6494
Joined: May 2004
PostIcon Posted on: Nov. 22 2010,18:04 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

Yeah.
Offline
Top of Page Profile Contact Info 
 Post Number: 4
Malcolm Search for posts by this member.
I disagree.
Avatar



Group: Privateers
Posts: 27168
Joined: May 2004
PostIcon Posted on: Nov. 22 2010,22:15 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE


(thibodeaux @ Nov. 22 2010,18:58)
QUOTE
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.

In general, n isn't a power of 2, people cheat the value to make it so using bye weeks or wildcard teams.

--------------
Diogenes of Sinope:

"It is not that I am mad, it is only that my head is different from yours."

"Other dogs bite only their enemies, whereas I bite also my friends in order to save them."

Arnold Judas Rimmer, BSC, SSC:

"Better dead than smeg."
Offline
Top of Page Profile Contact Info 
 Post Number: 5
thibodeaux Search for posts by this member.
RAG
Avatar



Group: Privateers
Posts: 6494
Joined: May 2004
PostIcon Posted on: Nov. 23 2010,04:51 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

Yeah, but it doesn't matter; you can do it without a power of 2.
Offline
Top of Page Profile Contact Info 
 Post Number: 6
TheCatt Search for posts by this member.
Top 2%
Avatar



Group: Super Administrators
Posts: 22951
Joined: May 2004
PostIcon Posted on: Nov. 23 2010,06:28 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE


(Malcolm @ Nov. 23 2010,01:15)
QUOTE

(thibodeaux @ Nov. 22 2010,18:58)
QUOTE
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.

In general, n isn't a power of 2, people cheat the value to make it so using bye weeks or wildcard teams.

It's not a cheat.  It's just a fact.

--------------
It's not me, it's someone else.
Offline
Top of Page Profile Contact Info 
 Post Number: 7
Malcolm Search for posts by this member.
I disagree.
Avatar



Group: Privateers
Posts: 27168
Joined: May 2004
PostIcon Posted on: Nov. 23 2010,07:47 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE


(thibodeaux @ Nov. 23 2010,06:51)
QUOTE
Yeah, but it doesn't matter; you can do it without a power of 2.

Did you find/derive the general answer?  I'm slightly curious.

--------------
Diogenes of Sinope:

"It is not that I am mad, it is only that my head is different from yours."

"Other dogs bite only their enemies, whereas I bite also my friends in order to save them."

Arnold Judas Rimmer, BSC, SSC:

"Better dead than smeg."
Offline
Top of Page Profile Contact Info 
 Post Number: 8
TheCatt Search for posts by this member.
Top 2%
Avatar



Group: Super Administrators
Posts: 22951
Joined: May 2004
PostIcon Posted on: Nov. 23 2010,07:57 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

Ummm...

--------------
It's not me, it's someone else.
Offline
Top of Page Profile Contact Info 
 Post Number: 9
thibodeaux Search for posts by this member.
RAG
Avatar



Group: Privateers
Posts: 6494
Joined: May 2004
PostIcon Posted on: Nov. 23 2010,08:17 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE


(Malcolm @ Nov. 23 2010,10:47)
QUOTE

(thibodeaux @ Nov. 23 2010,06:51)
QUOTE
Yeah, but it doesn't matter; you can do it without a power of 2.

Did you find/derive the general answer?  I'm slightly curious.

Yep.  If you have N teams, then you need N-1 games.

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.
Offline
Top of Page Profile Contact Info 
 Post Number: 10
thibodeaux Search for posts by this member.
RAG
Avatar



Group: Privateers
Posts: 6494
Joined: May 2004
PostIcon Posted on: Nov. 24 2010,16:01 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

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.
Offline
Top of Page Profile Contact Info 
 Post Number: 11
Malcolm Search for posts by this member.
I disagree.
Avatar



Group: Privateers
Posts: 27168
Joined: May 2004
PostIcon Posted on: Nov. 24 2010,16:26 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

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 Nov. 24 2010,16:27

--------------
Diogenes of Sinope:

"It is not that I am mad, it is only that my head is different from yours."

"Other dogs bite only their enemies, whereas I bite also my friends in order to save them."

Arnold Judas Rimmer, BSC, SSC:

"Better dead than smeg."
Offline
Top of Page Profile Contact Info 
 Post Number: 12
thibodeaux Search for posts by this member.
RAG
Avatar



Group: Privateers
Posts: 6494
Joined: May 2004
PostIcon Posted on: Nov. 24 2010,16:41 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE


(Malcolm @ Nov. 24 2010,19:26)
QUOTE
Management seems to have solved this problem just by letting manpower dwindle and refusing to hire anyone new.

Sometimes you're actually better off that way.  Everybody's busy, but at least you know they're competent (I mean, assuming it's the competent ones who are left).
Offline
Top of Page Profile Contact Info 
 Post Number: 13
Malcolm Search for posts by this member.
I disagree.
Avatar



Group: Privateers
Posts: 27168
Joined: May 2004
PostIcon Posted on: Nov. 24 2010,17:11 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

It's going to be a loooooooooooooooooong while before the real problem idiots are removed.

--------------
Diogenes of Sinope:

"It is not that I am mad, it is only that my head is different from yours."

"Other dogs bite only their enemies, whereas I bite also my friends in order to save them."

Arnold Judas Rimmer, BSC, SSC:

"Better dead than smeg."
Offline
Top of Page Profile Contact Info 
 Post Number: 14
TheCatt Search for posts by this member.
Top 2%
Avatar



Group: Super Administrators
Posts: 22951
Joined: May 2004
PostIcon Posted on: Nov. 24 2010,18:13 Skip to the previous post in this topic.  Ignore posts   QUOTE

The other day, I was talking with one of my fellow DB people at work, and asked him what he thought datalength(13) was in t-sql... He said "2"

Maybe he uses 3 bits to a byte.


--------------
It's not me, it's someone else.
Offline
Top of Page Profile Contact Info 
13 replies since Nov. 22 2010,16:58 < Next Oldest | Next Newest >

[ Track This Topic :: Email This Topic :: Print this topic ]


 
reply to topic new topic new poll

» Quick Reply Something I did not know
iB Code Buttons
You are posting as:

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code