You are on page 1of 4

Questions

? Imagine a country where all the parents want to have a boy. Every family keeps having
children until they have a boy; then they stop. What is the proportion of boys to girls in this country?

? Use a programming language to describe a chicken. ? Look at this sequence:

Whats the next line?

Answers

? Imagine a country where all the parents want to have a boy. Every family keeps having
children until they have a boy; then they stop. What is the proportion of boys to girls in this country? Ignore multiple births, infertile couples, and couples who die before having a boy. The first thing to realize is that every family in the country has, or will have, exactly one boy when theyre done procreating. Why? Because every couple has children until they have a boy, and then they stop. Barring multiple births, a boy means one boy exactly. There are as many boys as completed families. A family can have any number of girls, though. A good way to proceed is to take an imaginary census of girl children. Invite every mother in the country to one big room and ask on the public-address system: Will everyone whose first child was a girl please raise her hand? Naturally, one-half of the women will raise a hand. With N mothers, N/2 would raise their hands, representing that many firstborn girls. Mark that on the imaginary tote board: N/2. Then ask: Will everyone whose second child was a girl please raise or keep raised her hand? Half the hands will go down, and no new hands will go up. (The mothers whose hands were down for the first question, because their first child was a boy, would not have had a second child.) This leaves N/4 hands in the air, meaning there are N/4 second-born girls. Put that on the tote board. Will everyone whose third child was a girl raise or keep raised her hand? You get the idea. Keep this up until finally there are no hands still up. The number of hands will halve with each question. This produces the familiar series (1/2 + 1/4 + 1/8 + 1/16 + 1/32 + ) N The infinite series sums to 1 (N). The number of girls equals the number of families (N) equals the number of boys (or very close to it). The requested proportion of boys to girls is therefore 1to 1. Its an even split after all.

? Use a programming language to describe a chicken.


In 1968, the French writer and prankster Nol Arnaud published a slim volume of poems in the computer language ALGOL (now obsolete, it was a precursor of C). Arnaud restricted himself to ALGOLs short dictionary of twenty-four predefined words. The poems were not valid code. Describing a chicken in ALGOL, or C++, could be an exercise in the same quixotic spirit. Interviewers usually intend for you to describe an individual chicken so that it might be distinguished from other members of its species. Pretend youre starting a social network site for poultry. The chicken named Blinky is female, friendly, and dead. They want something like that, in legal code or pseudocode. One example that would satisfy most interviewers: class Chicken { public: bool isfemale, isfriendly, isfryer, isconceptualart, isdead; }; int main() { Chicken Blinky; Blinky.isfemale true; Blinky.isfriendly true; Blinky.isfryer true; Blinky.isconceptualart true; Blinky.isdead true; }

? Look at this sequence:

Whats the next line? (Insight question.) The interviewer writes this on the whiteboard. Theres just enough pattern to drive math nerds nuts. Hint: try reading the lines out loud. This is the look-and-say sequence, described by the mathematician John Horton Conway in 1986. Except for the first line, each inventories the line above it. The third line, for instance, could be read as two one[s]. Look at the line above it. Its two 1s. The lowermost line youre given consists of three 1s, two 2s, and one 1. The following line must be

This puzzle appeared in the Google Labs Aptitude Test, a mock test distributed to college students as a recruitment promotion in the fall of 2004. HR departments usually discourage insight questions, but some interviewers cant resist. For the record, the lookand-say sequence is not just a one-shot math joke. Conway proved some original and (semi)serious results about it. Engineers will recognize the series as a form of run-length encoding. When compressing video for an episode of South Park, you dont store the color of every pixel of Kyles green hat. Instead you use run-time encoding, which basically says something like the next 452 pixels are all the same shade of green.

You might also like