# Google Technical Aptitude paper 2015

Posted on :02-02-2016

Q1. Solve this cryptic equation, realizing of course that values for M and E could be interchanged. No leading zeros are allowed.

This can be solved through systematic application of logic. For example, cannot be equal to 0, since. That would make, but, which is not possible.

Here is a slow brute-force method of solution that takes a few minutes on a relatively fast machine:

This gives the two solutions
777589 - 188106 == 589483
777589 - 188103 == 589486

Here is another solution using Mathematics Reduce command:

A faster (but slightly more obscure) piece of code is the following:
Faster still using the same approach (and requiring ~300 MB of memory):
Even faster using the same approach (that does not exclude leading zeros in the solution, but that can easily be weeded out at the end):

Here is an independent solution method that uses branch-and-prune techniques:

And the winner for overall fastest:

Q2. Write a haiku describing possible methods for predicting search traffic seasonality. MathWorlds search engine seemed slowed this May. Undergrads prepping for finals.

Q3
1
1 1
2 1
1 2 1 1
1 1 1 2 2 1

Whats the next line?

ANS: 312211.

This is the "look and say" sequence in which each term after the first describes the previous term:

one 1 (11);
two 1s (21);
one 2 and one 1 (1211);
one 1, one 2, and two 1s (111221); and so on.

See the look and say sequence entry on MathWorld for a complete write-up and the algebraic form of a fascinating related quantity known as Conveys constant.

Q4) You are in a maze of twisty little passages, all alike. There is a dusty laptop here with a weak wireless connection. There are dull, lifeless gnomes strolling around. What dost thou do?

A) Wander aimlessly, bumping into obstacles until you are eaten by a grue.
B) Use the laptop as a digging device to tunnel to the next level.
C) Play MPoRPG until the battery dies along with your hopes.
D) Use the computer to map the nodes of the maze and discover an exit path.
E) Email your resume to Google, tell the lead gnome you quit and find yourself in whole different world [sic].

Q5) Whats broken with Unix?

ANS: Their reproductive capabilities.

Q6) On your first day at Google, you discover that your cubicle mate wrote the textbook you used as a primary resource in your first year of graduate school. Do you:

A) Fawn obsequiously and ask if you can have an autograph.
B) Sit perfectly still and use only soft keystrokes to avoid disturbing her concentration
C) Leave her daily offerings of granola and English toffee from the food bins.
D) Quote your favorite formula from the textbook and explain how its now your mantra.
E) Show her how example 17b could have been solved with 34 fewer lines of code.

Q7) Which of the following expresses Googles over-arching philosophy?

A) "Im feeling lucky"
B) "Dont be evil"
C) "Oh, I already fixed that"
D) "You should never be more than 50 feet from food"
E) All of the above

Q8) How many different ways can you color an icosahedron with one of three colors on each face?

For an asymmetric 20-sided solid, there are possible 3-colorings . For a symmetric 20-sided object, the Polya enumeration theorem can be used to obtain the number of distinct colorings.

Q9) This space left intentionally blank. Please fill it with something that improves upon emptiness. For nearly 10,000 images of mathematical functions, see The Wolfram Functions Site visualization gallery.

Q10) On an infinite, two-dimensional, rectangular lattice of 1-ohm resistors, what is the resistance between two nodes that are a knights move away?

This problem is discussed in J. Csertis 1999 ar Xiv preprint . It is also discussed in The Mathematics GuideBook for Symbolics, the forthcoming fourth volume in Michael Trotts GuideBook series, the first two of which were published just last week by Springer-Verlag. The contents for all four GuideBooks, including the two not yet published, are available on the DVD distributed with the first two GuideBooks.

Q11) Its 2PM on a sunny Sunday afternoon in the Bay Area. Youre minutes from the Pacific Ocean, Red wood forest hiking trails and world class cultural attractions. What do you do?

Q12) In your opinion, what is the most beautiful math equation ever derived?

There are obviously many candidates. The following list gives ten of the authors favorites:

1. Archimedes recurrence formula : , , ,
2. Euler formula :
3. Euler-Mascheroni constant :
4. Riemann hypothesis: and implies
5. Gaussian integral :
6. Ramanujans prime product formula:
7. Zeta-regularized product :
8. Mandelbrot set recursion:
9. BBP formula:
10. Cauchy integral formula:

An excellent paper discussing the most beautiful equations in physics is Daniel Z. Freedmans " Some beautiful equations of mathematical physics." Note that the physics view on beauty in equations is less uniform than the mathematical one. To quote the not-necessarily-standard view of theoretical physicist
P.A.M. Dirac, "It is more important to have beauty in ones equations than to have them fit experiment."

Q13) Which of the following is NOT an actual interest group formed by Google employees?

B. Buffy fans
C. Cricketeers
D. Nobel winners
E. Wine club

Q14) What will be the next great improvement in search technology?

Q15) What is the optimal size of a project team, above which additional members do not contribute productivity equivalent to the percentage increase in the staff size?

A) 1
B) 3
C) 5
D) 11
E) 24

Q16) Given a triangle ABC, how would you use only a compass and straight edge to find a point P such that triangles ABP, ACP and BCP have equal perimeters?

(Assume that ABC is constructed so that a solution does exist.)

Q17) Consider a function which, for a given whole number n, returns the number of ones required when writing out all numbers between 0 and n.

For example, f(13)=6. Notice that f(1)=1. What is the next
largest n such that f(n)=n?

The following Mathematics code computes the difference between [the cumulative number of 1s in the positive integers up to n] and [the value of n itself] as n ranges from 1 to 500,000:

The solution to the problem is then the first position greater than the first at which data equals 0:
Which are the first few terms of sequence A014778 in the On-Line Encyclopedia of Integer Sequences.
Checking by hand confirms that the numbers from 1 to 199981 contain a total of 199981 1s:

Q18) What is the coolest hack you ve ever written?

While there is no "correct" answer, a nice hack for solving the first problem in the SIAM hundred dollar, Hundred - digit challenge can be achieved by converting the limit into the strongly divergent series: and then using Mathematics numerical function Sequence Limit to trivially get the correct answer (to six digits), You must tweak parameters a bit or write your own sequence limit to get all 10 digits.

Q19) Tis known in refined company, that choosing K things out of N can be done in ways as many as choosing N minus K from N: I pick K, you the remaining. This simply states the binomial coefficient identity . Find though a cooler bijection, where you show a knack uncanny, of making your choices contain all K of mine. Oh, for pedantry: let K be no more than half N. Tis more problematic to disentangle semantic meaning precise from the this paragraph of verbiage
peculiar.

Q20) What number comes next in the sequence: 10, 9, 60, 90, 70, 66,?

A) 96
B) 1000000000000000000000000000000000
0000000000000000000000000000000000
000000000000000000000000000000000
C) Either of the above
D) None of the above

This can be looked up and found to be sequence A052196 in the On-Line Encyclopedia of Integer Sequences, which gives the largest positive integer whose English name has n letters. For example, the first few terms are ten, nine, sixty, ninety, seventy, sixty-six, ninety-six, …. A more correct sequence might be ten, nine, sixty, google, seventy, sixty-six, ninety-six, googleplus. And also note, incidentally, that the correct spelling of the mathematical term " google" differs from the name of the company that

The first few can be computed using the Number Name function in Eric Weissteins MathWorld packages:

A mathematical solution could also be found by fitting a Laguange interpolating polynomial to the six known terms and extrapolating:

21. In 29 words or fewer, describe what you would strive to accomplish if you worked at Google Labs.

Register