probability – Birthday problem with large $n, d$ values

In the Birthday problem, the formulas

$${displaystyle {begin{aligned}p(n;d)&={begin{cases}1-displaystyle prod _{k=1}^{n-1}left(1-{frac {k}{d}}right)&nleq d\1&n>dend{cases}}&approx 1-e^{-{frac {n(n-1)}{2d}}}&approx 1-left({frac {d-1}{d}}right)^{frac {n(n-1)}{2}}end{aligned}}}$$

work well for $d = 365$ and $n=23$, and gives the usual estimation that if you have 23 people in the same room, the probability to have at least two people born the same day is $geq 50 %$.

Question: what formula is available for $p(n; d)$ with more precise error terms?


Concrete application:

I’m using random 5-alphanumeric-character identifiers for an inventory of objects.

Example: V4QH7, WYJ9X, LK6H4, etc.

If I have $n = 10,000$ objects, what is the probability that at least 2 objects have the same ID?

Note: the last formula (the one after the one with exponential function above) gives Error, numeric exception: overflow in Maple when I take $d=(26+10)^5=60,466,176$ and $n=10,000$.

The formula with exp gives $p approx 3.8 %$ but since no error term is given, I don’t know if this is accurate.

sharepoint online – How to sync Birthday and Hire-date in Office 365 from local AD?

I am trying to build birthday and anniversary webpart in office 365. The issue is our local ad users are synced but the birthday and hire-date are not synced in office 365.

I was checking the issue and found that we were using Azure AD Connect and that is not supporting these columns. So I have created 2 custom attribute (birthdate & hiredate) in Azure directory. Then using directory extension attribute sync, I am mapping local ad column in azure ad.

Now I am stuck here. I don’t know how can I map these custom attribute with Office 365 columns. Can anyone provide any link how can I do these?

strings – Roast my C# birthday code

So this is a pretty simple code, I think it was?

It asks for the user’s birth day and month, and gives it back with the day a discount reminder email will be sent (the day before their birthday)

Now I tried to optimize as much as I could, possible wrong inputs and if the user’s birthday is the first of a month

Even though I’m still pretty new to coding, I still want you to criticize my code as much as I could, I would like to improve as much as I can

using System.Text.RegularExpressions;
using System.Linq;

namespace Exercice14
{
    class Program
    {
        static void Main(string() _)
        {
            // declaring some variables
            int birthDay;
            int reminderDay;
            string suffix = "th";
            string reminderSuffix = "th";
            string birthDayT;
            string birthMonth;
            string reminderMonth;
            string() months = {"January", "February", "March", "April", "May", "June", "July", "August", "September", 
                                 "October", "November", "December" };
            bool exceptionFirst = false;

            // prompts for birth month and capitalize first letter
            Console.WriteLine("Hello User!");
            Console.Write("Please enter your birth month in letters: ");
            birthMonth = Console.ReadLine();
            birthMonth = char.ToUpper(birthMonth(0)) + birthMonth.Substring(1);


            // check if birth month contains only letters
            while(Regex.IsMatch(birthMonth, @"^(a-zA-Z)+$") == false)
            {
                Console.WriteLine("Birth month should only contain letters!");
                Console.Write("Please enter your birth month in letters: ");
                birthMonth = Console.ReadLine();
                birthMonth = char.ToUpper(birthMonth(0)) + birthMonth.Substring(1);
            }

            // check if month is right
            while (months.Contains(birthMonth) == false)
            {
                Console.WriteLine("Invalid month?! Please enter a valid english month");
                Console.Write("Please enter your birth month: ");
                birthMonth = Console.ReadLine();
                birthMonth = char.ToUpper(birthMonth(0)) + birthMonth.Substring(1);
            }

            // prompts for birth day
            Console.Write("Please enter your birth day in numbers: ");
            birthDayT = Console.ReadLine();

            // check for valid day 
            while (int.TryParse(birthDayT, out int _) == false)
            {
                Console.WriteLine("Invalid argument! Please enter day in numerals");
                Console.Write("Please enter your birth day in numbers: ");
                birthDayT = Console.ReadLine();
            }

            // check for valid day number
            while (int.Parse(birthDayT) < 1 || int.Parse(birthDayT) > 31)
            {
                Console.WriteLine("Invalid date! Please enter a day between 1 and 31");
                Console.Write("Please enter birth day in numbers: ");
                birthDayT = Console.ReadLine();
            }

            // assign birth day to variable once tested
            birthDay = int.Parse(birthDayT);

            // set reminder day and month
            reminderDay = birthDay - 1;
            reminderMonth = birthMonth;

            // check which suffix to use for days AND calculate reminder day and month if exception
            if (birthDay == 1) //exception
            {
                exceptionFirst = true;
                suffix = "st";
                reminderMonth = months(Array.IndexOf(months, birthMonth) - 1);
            }
            if (birthDay == 2)
            {
                suffix = "nd";
                reminderSuffix = "st";
                reminderDay = 1;
            }
            if (birthDay == 3)
            {
                suffix = "th";
                reminderSuffix = "nd";
            }
            if (birthDay > 3)
            {
                suffix = "th";
                reminderSuffix = "th";
            }

            // print values
            Console.WriteLine();
            Console.WriteLine("Yer birthday is on the " + birthDay + suffix + " of " + birthMonth );

            if (exceptionFirst == true)
            {
                Console.WriteLine("A reminder email for your birthday discount " +
                    "nwill be sent on the last day of " + reminderMonth);
            }
            else
            {
                Console.WriteLine("A reminder email for your birthday discount " +
                    "nwill be sent on the " + reminderDay + reminderSuffix + " of " + reminderMonth);
            }

        }
    }
}

Montage display (name && birthday …) with emu8086

I need someone to help me with emu8086

Q1: Write a program that includes:
1- Ask for your name
2- Ask about your birthday
3- Enter your phone number
4- Ask for your address
The program then displays this information about you as follows:
Name Date of birth Telephone number Address
——– ———— —————— ———–

Q2: You have the following string:

"Aaabjhjhjkhaaaboioewiujdasdaaabkjlaabaopioioaaabaaaaaab"
Write a program that determines how often the pattern "aaab" appears in the string.
Display the specified string at (5,10).
Display the pattern you are looking for under (6,10).
Time of the pattern Appearance of the pattern at (7.10)