Total topics: 4
The Birthday Problem:
If I am partying in a room with 25 people; what is the chance that NO two of those people will share a birthday?
Another way to phrase this: When given 25 random people, what is the chance that for every day of the year, either one or zero of those people will have a birthday on that day.
The Birthday Solution:
For simplicity's sake, we will assume that all days of the year are equally likely to have birthdays fall on them.
For simplicity's sake, we will also ignore leap years, and thus leap days.
Since each person could have a birthday on any day of the year, in total there are 365 ^ 25 possibilities.
But how many of those 365 ^ 25 possibilities will satisfy the requirement that no two people may share a birthday?
You can think of it like this: Person-A has 356 days to choose from. Person-B only has 364 days to choose from without conflicting with person-A's choice. Person-C has 363 choices, and so on and so forth.
Right now we have two numbers: 365 * 364 * 363 . . . * 343 * 342 * 341 simplifies to 365! / 340! which is the number of possibilities that work, and 365 ^ 25 is the total number of possibilities.
By using division, and then multiplying by 100, we come to a percentage: 43.18%
The Birthday Problem 2.0:
Because everybody likes me, I am partying in a room with 170 people; what is the chance that NO four people will share a birthday?
Another way to phrase this: When given 170 random people, What is the chance that for every day of the year, no more than three of those people will have a birthday on that day.
The Birthday Solution 2.0:
I was going to try to explain my program, but I am not that good at explaining things, so here is the C code.
int stopfact( int pier, int depth ) { int retval = 1; for( int i = 0; i < depth; ++i ) { retval *= pier; --pier; } return retval;}double power( double base, int exponent ) { double retval = 1.0; for( int i = 0; i < exponent; ++i ) { retval *= base; } return retval;}#include <stdio.h>#include <stdlib.h>int main() { int bucket_count = 0; double * buckets; double chance_total = 0.0; int copies; double frequency; while( scanf( "%i %lf", & copies, & frequency ) == 2 ) { buckets = realloc( buckets, sizeof( double ) * ( bucket_count + copies ) ); for( int i = 0; i < copies; ++i ) { buckets[ bucket_count ] = frequency; ++bucket_count; chance_total += frequency; } } int balls; int limit; double * chancetable; double * newtable; scanf( "?> %i %i", & balls, & limit ); chancetable = malloc( sizeof( double ) * ( balls + 1 ) ); newtable = malloc( sizeof( double ) * ( balls + 1 ) ); chancetable[ 0 ] = 1.0; for( int i = 1; i <= balls; ++i ) { chancetable[ i ] = 0.0; } for( int i = 0; i < bucket_count; ++i ) { for( int u = 0; u <= balls; ++u ) { newtable[ u ] = 0.0; } for( int u = 0; u < limit; ++u ) { for( int z = 0; z + u <= balls; ++z ) { newtable[ z + u ] += chancetable[ z ] * ( double )( stopfact( balls - z, u ) / stopfact( u, u ) ) * power( buckets[ i ] / chance_total, u ) * power( ( chance_total - buckets[ i ] ) / chance_total, ( balls - z ) - u ); } } for( int u = 0; u <= balls; ++u ) { chancetable[ u ] = newtable[ u ]; } chance_total -= buckets[ i ]; } printf( "%lf %\n", chancetable[ balls ] * 100.0 ); free( buckets ); free( chancetable ); return 0;}
To see the answer for yourself, run the program and input the following:
365 41 1?> 170 4
If you made sure to space separate, the result should be: 61.30% accounting for leap years too.
Created:
Updated:
Category:
Technology
I can no longer optimally gamble on noobsniping.
Despite what Oromagi and some say, once you're in the 1800s you gain way too little from wins vs noobs to make the risk vs reward healthy. I can no longer healthily hope to use my level of participation to carry me past a loss here and there. It's just not optimal.
I want regular clashes vs debaters nearer to 1600 than 1500. I will take you up on challenges, let me know. I'll require long Rounds, I want proper, decent clashes that let real life healthily interact with tough debates.
This is going to be beyond anything DDO ever had from any debater. I am going to be doing quality debate after quality debate, 1-week or 2-week Rounds, no mercy, no excuses proper clashing.
Created:
Updated:
Category:
DebateArt.com
Ask me to make you a profile pic here.
Describe what you want and describe your personality in your own words.
Created:
Updated:
Category:
DebateArt.com
This game may not happen, especially if low interest is shown. There will be a thematic split, it may or may not be obvious.
This is semi role-madness. Flavouring will be involved. There will be thirdparty if the cast is big enough.
Created:
Updated:
Category:
Forum games