TITLE: Probability problem about birthdays
QUESTION [3 upvotes]: Problem:

I have 610 friends. Each one of them will invite me to his birthday party, and I will accept every invitation. What is the probability that I will be attending at least one birthday party on every day of the year?

My attempt has been to try counting how many ways in which there could be at least one day where there are no birthday celebrations, and subtract the resulting probability from 1, but of course I end up having to use the inclusion-exclusion principle, and with these numbers it becomes unwieldy. Hopefully someone can kindly show me a nicer way of tackling this.

REPLY [0 votes]: Here I gave a simulation solution which is based on Monte Carlo sampling. You can set up the number of sampling experiments, but the result is alway 0 since the probability of this kind of event is pretty low. 
The C++ code is as below:
#include <iostream>
#include <map>
#include <vector>
#include <math.h>
#include <stdlib.h>     /* srand, rand */
using namespace std;

int main(int argc, char **argv) 
{
  std::cout << "Hello, world!" << std::endl;
  int friendNum=610;
  int ROICaseNum=0;
  int experimentNum=100;
  double prob = 1.0/365.0;

  for (int i=0;i<experimentNum;i++)
  {
    std::vector<bool> yesVec;
    for (int n=1;n<=365;n++)
    {
        int yes_sum=0;
        for (int j=0;j<friendNum;j++)
        {
            if (((double) rand() / (RAND_MAX))<prob)
            {
                yes_sum = yes_sum+1;
            }
        }
        if (yes_sum>=1)
        {
            yesVec.push_back(true);
        }
        else
        {
            yesVec.push_back(false);
        }
    }
    bool yes_ROICase=true;
    for (int k=0;k<yesVec.size();k++)
    {
        yes_ROICase = yes_ROICase&&yesVec[k];
    }
    if (yes_ROICase==true)
    {
        ROICaseNum = ROICaseNum+1;
    }
    cout<<"size of yesVec is "<<yesVec.size()<<endl;

  }
  cout<<"probability is="<<((double)(ROICaseNum/experimentNum))<<endl;
  return 0;
}
{"set_name": "stack_exchange", "score": 3, "question_id": 2060694}