Albert, Bernard and Cheryl again

Logic Level 5

Albert and Bernard know that Cheryl was born in the 1900s. Cheryl tells Albert the number of factors of the number formed by the last 2 digits of her birth year. Then, Cheryl tells Bernard the number of factors of the number obtained by adding 48 to the number formed by the last 2 digits of her birth year.

Albert tells Bernard, "I don't know her birth year."

Bernard tells Albert, "I don't know her birth year."

Albert tells Bernard, "Now I know her birth year."

When is Cheryl's birth year?

Answer in the form YYYY \text{YYYY} .

Details and Assumptions:

If Cheryl's birth year is 1836, then the number formed by the last 2 digits is 36.

Albert and Bernard are perfect at logical thinking.


The answer is 1981.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

4 solutions

Julian Poon
Jun 9, 2015

There is no problem with this question. Amazing question by the way! Did it take you long to create it?


Anyway here's the solution:

Based on the first statement, Albert tells Bernard, "I don’t know her birth year." \textbf{Albert tells Bernard, "I don't know her birth year."} , it implies that all the numbers with a unique number of factors could not be Cheryl's birth year. This excludes numbers: 64 , 1 , 36 64,1,36 , we would call this set P {P} . For the set: 64 + 48 , 1 + 48 , 36 + 48 {64+48,1+48,36+48} ,we would define it as set S {S} for the second part.


Based on the second statement, Bernard tells Albert, "I don’t know her birth year." \textbf{Bernard tells Albert, "I don't know her birth year."} , it implies that any number + 48 +48 that has a unique number of factors are out. This eliminates numbers: . This second statement also implies that any number + 48 +48 that shares a number of factors with n n other numbers, of which n 1 n-1 of these numbers are inside set S {S} . This eliminates numbers for Cheryl's birth year: 16 , 33 , 52 , 96 , 32 , 73 {16, 33, 52,96,32,73 } , we would call this set C {C}


Now, based on the third statement, Albert tells Bernard, "Now I know her birth year." \textbf{Albert tells Bernard, "Now I know her birth year."} . This implies that of the numbers possible based solely from the number Albert was given, all of the numbers except 1 1 has been eliminated. So what we have to do is to find the factors of the eliminated numbers. We do not have to find the factors of the numbers in set P {P} since these numbers have a unique number of factors. Factors of set C : 5 , 4 , 6 , 12 , 6 , 2 \text{Factors of set }{C}:\text{ }{5, 4, 6, 12, 6, 2}


Checking the factors one by one, we remain with the number 81 \boxed{81} , with 5 5 factors.


Here is the link for the number of factors from numbers 1 1 to 150 150 :

1 to 50

51 to 100

101 to 150

Yes, it took quite long to make it, however it is nothing compared to the classic "Cheryl's Birthday Problem".

Archit Boobna - 6 years ago

I first thought about perfect squares, as they have odd number of factors. So ans came 1916, wrong :-/

Then, thought about 1981, but as 81+48>100 so didn't write it in the answer box.

Then, thought about prime number as they have exactly two factors, tried 1989 and 1997 both wrong. Good question...

Anubhav Balodhi - 6 years ago

Thanks for the solution! Upvoted!

Archit Boobna - 6 years ago

And I thought this would have something to do with February 29th ...

Edit: just did the math on that, there's no solution if it's restricted to leap years.

Wonder if the author checked that.

Avi Eisenberg - 6 years ago

Log in to reply

But that won't affect the answer. BTW Great Thinking!

Archit Boobna - 6 years ago

Log in to reply

I'm curious, did you check whether restricting it to leap years results in a different answer(s)? If not, then you had justified true belief that the solution was unique, but didn't actually know ...

Avi Eisenberg - 6 years ago

Log in to reply

@Avi Eisenberg No I didn't check that at first, when I wrote the statement "Albert and Bernard know Cheryl's date and month of birth", I didn't think about it much, I just wrote it to build up a story.

Archit Boobna - 6 years ago

@Avi Eisenberg I have edited the problem to avoid confusion.

Archit Boobna - 6 years ago
Deep Shah
Jun 10, 2015

Here is my C++ code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include<stdio.h>
#include<vector>
vector<int> v1[25];
vector<int> v2[25];

int num_of_factor(int n)
{
         int count = 0;
    for(int i = 1 ; i<n;i++)
    {
        if(n%i==0)
            count++;
    }
    return count;
}

void printf1(int n)
{
    for(int i = 0;i < v1[n].size();i++)
    {
        printf("%d  ",v1[n][i]);
    }
    printf("\n");
}

void printf2(int n)
{
    for(int i = 0;i < v2[n].size();i++)
    {
        printf("%d  ",v2[n][i]);
    }
    printf("\n");
}

int main()
{
    int temp;
    scanf("%d",&temp);
    int i;
    for(i=0;i<100;i++)
    {
        int temp = num_of_factor(i);
        v1[temp].push_back(i);
    }
    for(i=0;i<100;i++)
    {
        int temp = num_of_factor((i+48)%100);
        v2[temp].push_back(i);
    }
    for(i=0;i<25;i++)
    {
        printf("%d : ",i);
        printf1(i);
    }
    for(i=0;i<25;i++)
    {
        printf("%d : ",i);
        printf2(i);
    }
}

In figure the initial are number of factor and the rest following are the number having total that number of factor.

First 1 to 25 for Albert and next 1 to 25 for Bernald and as from the code 48 is added.

Now, as per the question as soon as Bernald tell Albert that he doesn't know solution Albert comes to know the answer

So the number cheryl give to Albert have two number

As from the figure the possible is (16,81) and (48,80)

Bernald says he doesn't know the answer so so answer can be 80,48,81

Albert now knows the answer so Cheryl must have told Albert number 4.

So, Albert comes to know that answer is 81 i.e. 1981

Kp Hart
Jun 11, 2015

Only two numbers below 100 have four factors: 16 and 81 (both fourth powers) 16+48=2^6, the only number with 6 factors, so it's not 16.

Sam Thompson
Aug 25, 2015

Great question

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...