Queen's Pedigree

A queen bee has two parents: one male and one female.
A male bee has just one parent, a queen bee.

If we go back just one generation, a queen bee has two ancestors.
If we go back two generations, this rises to three ancestors in that generation.

How many ancestors does a queen bee have going back 20 generations (again, only in that generation)?


The answer is 17711.

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.

6 solutions

Marta Reece
Aug 8, 2017

If Q n Q_n is the number of female ancestors, queens, going back n n generations and M n M_n is the number of male ancestors going back n n generations, then

Q n = Q n 1 + M n 1 Q_n=Q_{n-1}+M_{n-1}

M n = Q n 1 M_n=Q_{n-1}

Substituting from second equation into the first, we get

Q n = Q n 1 + Q n 2 Q_n=Q_{n-1}+Q_{n-2}

So we see that the number of female ancestors forms a Fibonacci sequence.

To get the total number of ancestors, we only need to add the males

T n = Q n + M n = Q n + Q n 1 = Q n + 1 T_n=Q_n+M_n=Q_n+Q_{n-1}=Q_{n+1}

The total will come to the next number in Fibonacci sequence after the one for females alone.

Doing back one generation, we have 2 2 ancestors, that is F 3 F_3 , the third Fibonacci number. Q n = F n + 2 Q_n=F_{n+2}

So going back 20 20 generations, the number of ancestors will be F 22 = 17711 F_{22}=\boxed{17711} .

Moderator note:

As mentioned by Mark Hennings, Fibonacci's original formulation of the problem was with rabbits. However, it assumes, unrealistically, that each birth is of two rabbits (one male, one female).

With bee family trees, on the other hand, the numbers are true-to-life. Colonies have a female (called the queen); females are produced by the queen mating with a male (so have a pair of parents), whereas males are produced by the queen's unfertilized eggs (so only have one parent).

Most female bees are worker bees, but some become queens and are able to form new hives.

It is interesting to note that Fibonacci first discussed his sequence in 1202 using rabbits, not bees. At each generation, each adult pair of rabbits gives birth to a juvenile pair, and each juvenile pair grows up to become adult. Rabbits never die. Replacing queen bees by adult pairs and male bees by juvenile pairs, and reversing the time arrow, so that ancestors become members of subsequent generations, we retrieve Fibonacci's original problem.

Mark Hennings - 3 years, 9 months ago

I am confused and probably exhibiting some ignorance here. But, this is about understanding and learning, so who cares. The question asked for the number of ancestors 'in that generation'. Not the total number of ancestors.

In gen 1, the queen has 2 ancestors, a male and a queen. Total = 2 (m + q) In gen 2, that male has a single ancestor and the queen has 2, a male and a queen. Total = 3 (2m = q) In gen 3, those males each have a single ancestor and the queen has 2. Total = 4 (3m + q) In gen x, the males of the previous generation each have a single ancestor and the queen has 2. Total = x + 1 (xm + q). So in gen 20, the 19 males of the previous generation each have a single ancestor and the queen has 2. Total = 21 (20 males and a queen)

What have I missed here?

A Former Brilliant Member - 3 years, 9 months ago

Log in to reply

In generation 2, you are saying that the single male has a male ancestor - it is a queen. In generation 2 there are 2 queens and one male (3 in total) and so there are (2+1)=3 queens and 2 males in generation 3, and so on.

Mark Hennings - 3 years, 9 months ago

Log in to reply

The correct answer is not a Fibonacci sequence. There are a total of 20 male ancestors and 1 queen. That makes 21 ancestors in that generation. Don't complicate things just to try to feel smart.

Darron Arnold - 3 years, 9 months ago

Thank you. I knew I got mixed up somewhere along the line!

A Former Brilliant Member - 3 years, 9 months ago

This assumes, of course, that all the bees in question are different bees, which, if bees are anything like humans, is highly unlikely. If we calculate the number of ancestors of a human Alice today, we don't have to go back too many generations before reaching a number that exceeds the number of humans that were alive at that time.

Bill Cressey - 3 years, 9 months ago

Log in to reply

Damn you autocorrect. "alive" not "Alice"

Bill Cressey - 3 years, 9 months ago

But nothing about the problem assumes that each individual ancestor only appears in one generation. For example multiple worker bees in a generation could have all come from the same queen, or they could have come from separate queens. There is no way to solve this in general. At best, we can say that the number of ancestors will be at most 17711

Clark Cox - 3 years, 9 months ago

Log in to reply

Individual worker bees do not have descendants, as they do not produce offspring, so they do play any role at all in the chain of generations, other then by supporting the procreating adults with nourishment etc.

Marta Reece - 3 years, 9 months ago

In any given bee colony, isn't there only 1 Queen?

Ron Sandford - 3 years, 9 months ago
Brian Stamper
Aug 21, 2017

Did this as an exercise in writing recursion in R:

beeparents <- function(female, male, gen) {
  if(gen == 0) {
    return(female + male)
  } else {
    female_parents <- female + male
    male_parents <- female
    beeparents(female_parents, male_parents, gen - 1)
  }
}

> beeparents(1, 0, 20)
[1] 17711
Arjen Vreugdenhil
Aug 20, 2017

If you know Fibonacci numbers, it is not difficult to see that we are dealing with them here. However, I give a more elementary approach that shows an efficient way to calculate the actual number.

If a generation has q q queens and m m males, then the previous generation has { q 1 = q + m m 1 = q \begin{cases} q_1 = q + m \\ m_1 = q \end{cases} Applying this equation to itself, two generations back has { q 2 = q 1 + m 1 = 2 q + m m 2 = q 1 = q + m \begin{cases} q_2 = q_1 + m_1 = 2q + m \\ m_2 = q_1 = q + m \end{cases} Applying this to itself, four generations back gives { q 4 = 2 q 2 + m 2 = 5 q + 3 m m 4 = q 2 + m 2 = 3 q + 2 m \begin{cases} q_4 = 2q_2 + m_2 = 5q + 3m \\ m_4 = q_2 + m_2 = 3q + 2m \end{cases} Also, five generations back we have { q 5 = q 4 + m 4 = 8 q + 5 m m 5 = q 4 = 5 q + 3 m \begin{cases} q_5 = q_4 + m_4 = 8q + 5m \\ m_5 = q_4 = 5q + 3m \end{cases} For ten generations we get { q 10 = 8 q 5 + 5 m 5 = 89 q + 55 m m 10 = 5 q 5 + 3 m 5 = 55 q + 34 m \begin{cases} q_{10} = 8q_5 + 5m_5 = 89q + 55m \\ m_{10} = 5q_5 + 3m_5 = 55q + 34m \end{cases} Finally, for twenty generations we get { q 20 = 89 q 10 + 55 m 10 = 10946 q + 6765 m m 20 = 55 q 10 + 34 m 10 = 6765 q + 4181 m \begin{cases} q_{20} = 89q_{10} + 55m_{10} = 10946q + 6765m \\ m_{20} = 55q_{10} + 34m_{10} = 6765q + 4181m \end{cases}

Thus twenty generations back, starting from one queen bee ( q = 1 , m = 0 q = 1, m = 0 ), we have q 20 + m 20 = ( 10946 + 6765 ) 1 + ( 6765 + 4181 ) 0 = 17711 q_{20} + m_{20} = (10946 + 6765)\cdot 1 + (6765 + 4181)\cdot 0 = \boxed{17711} ancestors.

Should this be 17,711?

Burt Macklin FBI - 3 years, 9 months ago
Mark Christian
Aug 22, 2017

I used the transformation matrix (2x2) [0,1,1,1] taken to power 20, multiplied by most recent generation of 1 queen [0,1]. The transformation takes the number of females in any generation and makes that the number of males in the previous generation. The number of females in the previous generation is the sum of males and females in the following generation. This method gives you not only the total number in a given generation, but also numbers by sex.

Kunal Gupta
Aug 22, 2017

A simple Python Snippet:

1
2
3
4
5
6
def F(male,female,N,ct):
  if ct==N:
    return male+2*female
  return F(female,male+female,N,ct+1)

print F(0,1,20,1)

 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
# -*- coding: utf-8 -*-
"""
Created on Wed Nov 29 23:15:21 2017

@author: Michael Fitzgerald
"""

# https://brilliant.org/weekly-problems/2017-08-21/intermediate/?p=3

# A queen bee has two parents: one male and one female. 
# A male bee has just one parent, a queen bee.
# If we go back just one generation, a queen bee has two ancestors. 
# If we go back two generations, this rises to three ancestors in that generation.

# How many ancestors does a queen bee have going back 20 generations (again, only in that generation)?

start_bee = 'Q'  # enter 'M or 'Q' to start

bees = [1]
how_many_generations = 20

if start_bee == 'Q':  # start with female
    bees.append(2)    
else: # male
    bees.append(1)

for i in range(len(bees), how_many_generations+1):
    x = bees[i-2] + bees[i-1]
    bees.append(x)

print ','.join(str(x) for x in bees)

if start_bee == 'M':
    print '\nA male bee has %d ancestors going back %d generations' \
    %(bees[how_many_generations], how_many_generations)
else:
    print '\nA queen bee has %d ancestors going back %d generations' \
    %(bees[how_many_generations], how_many_generations)    

1
2
3
1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711

A queen bee has 17711 ancestors going back 20 generations

Michael Fitzgerald - 3 years, 6 months ago

iteratively..... crude compared to recursively

Michael Fitzgerald - 3 years, 6 months ago

If there is 3 ancestors in 2nd gen, and 2 in 1st gen then there will be 5 ancestors in 3rd gen. If we follow that, the number of ancestors in n-th gen is: N(n) = N(n-1)+N(n-2), where n=3..20. If we follow the sequence step by step we got N(20)=17711.

Dear Challenge Masters, if this problem is for week from 21-27Aug, how it is possible to have first response dated Aug 8th? This is interesting problem too ;)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...