Good girls and bad boys (13)

Logic Level 3

On an island, there is this strange pattern - boys always lie while girls always tell the truth. Now you encounter six children.

  • The oldest one says, "The number of girls among us is a perfect square."

  • The second one says, "The number of girls among us is a prime number."

  • The third one says, "The number of girls among us is odd."

  • The fourth one says, "The number of girls among us is even."

  • The fifth one says, "There are exactly 3 girls among us."

  • The youngest one says, "There are exactly 3 boys among us."

Let 1 denote boys and 0 girls. In order of birth, identify the gender of each child and convert it into a number accordingly. Submit your answer as a string of 6 ones and/or zeroes. For example, if all six are boys, then your answer is 111111.


The answer is 101011.

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.

3 solutions

Noel Lo
Feb 4, 2016

Between the third and fourth child, exactly one of them is telling the truth, the other lying as the number of girls is either odd or even. This means one boy and one girl between them. Also, the two youngest children must be of the same gender since both their statements have the same truth value. Either both boys or both girls.

Suppose the two youngest are both girls. Then there are indeed three boys and three girls. The second and third child must also be girls since the number of girls is indeed prime and odd. But we end up with four girls resulting in a contradiction.

Hence the two youngest must be boys. This means the number of girls is not three. Since we know that either the third or fourth child is also a boy we have at least three boys. Since the number of boys is not three, we must have at least four boys. In other words, there are at most two girls.

Note that the number of girls is either one or two (zero is out) as either the third or fourth child is a girl. Suppose we have only one girl. Then the oldest child is a girl as one is indeed a perfect square. But we also have another girl between the third and fourth child resulting in at least a second girl. This is a contradiction.

Hence we must have exactly two girls. These two girls would be the second and fourth child as two is a prime number as well as an even number.

We have boy, girl, boy, girl, boy, boy. The answer is 101011.

I got ur catch this time as well buddy. Your logic was on only even prime number...:)

ASHWIN K - 5 years, 4 months ago

i have solved your all 13 logic about good girl and bad boys correctly..... :-)

Md Muttahirul Islam - 5 years, 4 months ago
Saya Suka
Feb 20, 2021

Perfect squares <--> Prime numbers

Odd numbers <--> Even numbers

Perfect squares and prime numbers are mutually exclusive, and so is the relationship between odd numbers and even numbers. As such, you cannot have both of each pair to have the same gender, therefore it has to be one or the other for both pairs. That is, there's a boy and a girl between the oldest and second child, and also another boy and another girl among the third and fourth child. Up until the oldest four children, the tally is 2 boys vs 2 girls, though we still don't know who is which, yet.

As for the youngest pair, one is saying 3 girls and the other claiming for 3 boys. Since these two statements are NOT contradictory, or more like they're actually complementary of each other with 3 girls + 3 boys = 6 siblings, then these youngest two must be of the same gender. Considering the tally that we had before, then with two additional kids of the same sex we could either have 4 boys vs 2 girls OR 2 boys vs 4 girls. Therefore, the youngest kids must be 2 lying, naughty boys for a final total count of 4 boys and 2 girls.

Since 2 is an even prime number (the ONLY even prime in existence), then we know that the girls must be the second and the fourth siblings.

Answer = { B, G, B, G, B, B }
= 101011

We could also do it this way :

The oldest one says, "The number of girls among us is a perfect square."
Possible number of girls = { 0, 1, 4 }

The second one says, "The number of girls among us is a prime number."
Possible number of girls = { 2, 3, 5 }

The third one says, "The number of girls among us is odd."
Possible number of girls = { 1, 3, 5 }

The fourth one says, "The number of girls among us is even."
Possible number of girls = { 0, 2, 4, 6 }

The fifth one says, "There are exactly 3 girls among us."
Possible number of girls = { 3 }

The youngest one says, "There are exactly 3 boys among us."
Possible number of girls = { 3 }

Listing the frequency of each possible numbers, we have :
n(0) = 2 [oldest & fourth]
n(1) = 2 [oldest & third]
n(2) = 2 [second & fourth]
n(3) = 4 [second, third, fifth & sixth]
n(4) = 2 [oldest & fourth]
n(5) = 2 [second & third]
n(6) = 1 [fourth]

The only number that matches its own frequency is 2, so there must be 2 girls among the siblings.

Saya Suka - 3 months, 3 weeks ago
Stephen Mellor
Dec 24, 2017

An easy way: We can try all possibilities for the number of girls, and see how many of the childrens' statements hold true for this possibility. If the 2 numbers match, that is how many girls there are.

Number of girls 0 1 2 3 4 5 6
The resulting number of girls 2 2 2 4 2 2 1

Therefore there are 2 girls, and the statements that hold true are by the 2nd and 4th children

An alternative and much longer way: The 5th and 6th children must either both be telling the truth, or both be lying. If they were both girls (truth-tellers), then their statements mean that there are 3 of each. 2 of the girls are already counted for in the 5th and 6th children. However, both child 1 and 3's statements are also correct. This counters the fact that there are 3 girls. Therefore, the 5th and 6th children are both boys.

The 3rd and 4th children cannot both be girls (as both statements can't be true), so the maximum number of girls is 3. If we assume that the 1st child is telling the truth, the only possible number of girls is 1 as it is the only perfect square less than 3. However, this 1 is already allocated to child 1, causing a contradiction as that would make the 3rd and 4th children both liars. Therefore, the 1st child is a boy.

We can see that the 3rd and 4th can't both be girls, so the maximum number of girls is 2. Therefore, if child 2 is telling the truth, there are 2 girls as 1 isn't prime. This works out, with child 3 being a boy and child 4 being a girl. If child 2 wasn't telling the truth, there would only be 1 girl, contradicting child 1's statement.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...