Hen

If a hen and a half lay an egg and a half in a day and a half, how many hens does it take to lay six eggs in six days?

Solution

If 1.5 hens lay 1.5 eggs in 1.5 days (or 36 hours) then: 1 hen lays 1 egg in 1,5 days or 4 eggs in six days thus 1.5 hens lay 6 eggs in 6 days

2026 Update: Rate Problems — “1.5 Hens” and Unit Analysis

Classic: “If 1.5 hens lay 1.5 eggs in 1.5 days, how many eggs do 6 hens lay in 6 days?” This type of problem tests proportional reasoning and catches people who just add up the numbers.

def hen_egg_problem(hens_given: float, days_given: float,
                    base_hens: float = 1.5,
                    base_eggs: float = 1.5,
                    base_days: float = 1.5) -> float:
    """
    Given: base_hens lay base_eggs in base_days.
    Find: how many eggs does hens_given lay in days_given?

    Rate per hen per day = base_eggs / (base_hens * base_days)
    Total eggs = rate * hens_given * days_given
    """
    rate = base_eggs / (base_hens * base_days)
    return rate * hens_given * days_given

# The classic problem
eggs = hen_egg_problem(hens_given=6, days_given=6)
print(f"6 hens, 6 days: {eggs} eggs")  # 24

# Verify: 1.5 hens → 1 hen in 1.5 days lays 1 egg → 1 egg / 1.5 days
# So 1 hen per day lays 1/1.5 eggs = 2/3 egg
# 6 hens * 6 days * (2/3 egg/hen/day) = 24 eggs ✓

# Common wrong answers people give:
wrong_answer_1 = 1.5 * (6 / 1.5) * (6 / 1.5)  # 24 (coincidentally right this time)
wrong_answer_2 = 6  # "same ratio: 1.5→1.5, so 6→6"

print(f"nRate per hen per day: {1.5 / (1.5 * 1.5):.4f} = 2/3")

# General rate problem solver
def rate_problem(known_a: float, known_b: float, known_result: float,
                 query_a: float, query_b: float) -> float:
    """
    If a units of A and b units of B produce result R,
    find result for query_a units of A and query_b units of B.
    (Assuming linear proportionality in both dimensions)
    """
    unit_rate = known_result / (known_a * known_b)
    return unit_rate * query_a * query_b

# Same as hen problem
print(rate_problem(1.5, 1.5, 1.5, 6, 6))  # 24

# Why people get it wrong:
# They think: ratio is 1:1 (1.5→1.5), so 6 hens for 6 days = 6 eggs
# Error: ignoring that BOTH hens AND days scale simultaneously
# Rate analysis forces you to identify the fundamental unit: eggs/hen/day

Interview insight: Rate problems test dimensional analysis. The trick is always to find the “atomic rate” — eggs per hen per day — then scale. This connects to: capacity planning (requests per server per second), throughput analysis in system design, and Little’s Law (L = λW: items in system = arrival rate × time in system). A common interviewer follow-up: “What if hens don’t lay linearly — what if there are diminishing returns?” → nonlinear optimization.

Scroll to Top