# Software Companies Placement Papers With Answers- -Free Download

##

**
**

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

WWWDOT - GOOGLE = DOTCOM

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 Mathematica's 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:

2. Write a haiku describing possible methods for predicting search
traffic seasonality.

MathWorld's search engine

seemed slowed this May. Undergrads

prepping for finals.

**
**

3. 1

1 1

2 1

1 2 1 1

1 1 1 2 2 1

What's the next line?

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 1's (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
Conway's constant.

4. 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].

In general, make a state diagram . However, this method would not work
in certain pathological cases such as, say, a fractal maze. For an
example of this and commentary, see Ed Pegg's column about state
diagrams and mazes .

5. What's broken with Unix?

Their reproductive capabilities.

How would you fix it?

6. 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 it's
now your mantra.

E) Show her how example 17b could have been solved with 34 fewer lines
of code.

7. Which of the following expresses Google's over-arching philosophy?

A) "I'm feeling lucky"

B) "Don't be evil"

C) "Oh, I already fixed that"

D) "You should never be more than 50 feet from food"

E) All of the above

8. 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. Here is a concise
Mathematica implementation:

What colors would you choose?

9. 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 .

10. On an infinite, two-dimensional, rectangular lattice of 1-ohm
resistors, what is the resistance between two nodes that are a knight's
move away?

This problem is discussed in J. Cserti's 1999 arXiv preprint . It is
also discussed in The Mathematica GuideBook for Symbolics, the
forthcoming fourth volume in Michael Trott's 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.

11. It's 2PM on a sunny Sunday afternoon in the Bay Area. You're
minutes from the Pacific Ocean, redwood forest hiking trails and world
class cultural attractions. What do you do?

12. 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. Ramanujan's 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. Freedman's " 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 one's equations than to have
them fit experiment."

13. Which of the following is NOT an actual interest group formed by
Google employees?

A. Women's basketball

B. Buffy fans

C. Cricketeers

D. Nobel winners

E. Wine club

14. What will be the next great improvement in search technology?

Semantic searching of mathematical formulas. .html for work currently
underway at Wolfram Research that will be made available in the near
future.

**
**

15. 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

16. 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.)

This is the isoperimetric point , which is at the center of the larger
Soddy circle. It is related to Apollonius' problem . The three tangent
circles are easy to construct: The circle around has diameter , which
gives the other two circles. A summary of compass and straightedge
constructions for the outer Soddy circle can be found in " Apollonius'
Problem: A Study of Solutions and Their Connections" by David Gisch and
Jason M. Ribando.

17. 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 Mathematica 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:

18. 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 Mathematica's numerical function SequenceLimit 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.

19. '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.

20. 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, googol, seventy,
sixty-six, ninety-six, googolplex. And also note, incidentally, that
the correct spelling of the mathematical term " googol" differs from
the name of the company that made up this aptitude test.
**

The first few can be computed using the NumberName function in Eric
Weisstein's MathWorld packages:

A mathematical solution could also be found by fitting a Lagrange
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.

** **

**
1) Given four matrices
**

P = 20×10

Q = 10×5

R = 5×10

S = 10×10

Find minimum no. of multiplication required for PxQxRxS?

a) 4000

b) 2500

c) 3000

d) None Of These

2) Two n-size arays are given . n1 in decreasing order and n2 in
increasing order. If c1 is time complexity for n1 using quicksort and
c2 is time complexity for n2 using quicksort. Then
**?**
**
**

a) c1 > c2

b) c1 < c2

c) c1 = c2

d) None of these

3) If there is a N sorted array then what is time complexity of finding
2 no.s having sum less than 1000.

a) O(1)

b) O(n^2)

c) O(n)

d) O(logn)

4) There are some process . In which of the scheduling algo CPU
utilization is minimum. If I/O burst time is 90ms and CPU burst time is
10ms.(question is very long to remember)

5)int func(int x, int *y, int **z)

{

int p, q;

x += 2;

p = *y++;

q = **z++;

q = **z++; //Not a repeated line.

}

void main()

{

int a = 5, *b, **c;

b = &a;

c = &b;

printf(
**?**
**%d**
**?**
**
,a);
**

}

**
**

6) Find the least significant digit of 2^3*google where google=10^100.

a) 2

b) 4

c) 6

d) 8

7) Let w(n) and A(n) denote respectively, the worst case and average
case running time of an algorithm executed on an input of size n. which
of the following is ALWAYS TRUE?

a) A(n) = Omega(W(n))

b) A(n) = Theta(W(n))

c) A(n) = O(W(n))

d) A(n) = o(W(n))

8) Consider a complete undirected graph with vertex set {0, 1, 2, 3,
4}. Entry Wij in the matrix W below is the weight of the edge {i, j}.

0 1 8 1 4

1 0 12 4 9

W = 8 12 0 7 3

1 4 7 0 2

4 9 3 2 0

**
**

What is the minimum possible weight of a spanning tree T in this graph
such that vertex 0 is a leaf node in the tree T?

a) 7

b) 8

c) 9

d) 10

9) In the graph given in question 8, what is the minimum possible
weight of a path P from vertex 1 to vertex 2 in this graph such that P
contains at most 3 edges?

a) 7

b) 8

c) 9

d) 10

10) A hash table of length 10 uses open addressing with hash function
h(k)=k mod 10, and linear probing. After inserting 6 values into an
empty hash table, the table is as shown below.

|0| |

|1| |

|2| 42|

|3| 23|

|4| 34|

|5| 52|

|6| 46|

|7| 33|

|8| |

|9| |

Which one of the following choices gives a possible order in which the
key values could have been inserted in the table?

a) 46, 42, 34, 52, 23, 33

b) 34, 42, 23, 52, 33, 46

c) 46, 34, 42, 23, 52, 33

d) 42, 46, 33, 23, 34, 52

11) How many different insertion sequences of the key values using the
same hash function of question 10 and linear probing will result in the
hash table shown above?

a) 10

b) 20

c) 30

d) 40

12) The recurrence relation capturing the optimal time of the Tower of
Hanoi problem with n discs is

a) T(n) = 2T(n
**?**
**
2) + 2
**

b) T(n) = 2T(n
**?**
**
1) + n
**

c) T(n) = 2T(n/2) + 1

d) T(n) = 2T(n
**?**
**
1) + 1
**

13) Given three semaphores, S0, S1 and S2 initialized as S0=1, S1=0,
S2=0 and processes P0, P1 and P2.

P0 : while(true)

P0, P1 and P2.

P0 : while(true)

{

wait(S0);

printf(
**?**
** 0 **
**?**
**
);
**

Release(S1);

Release(S2);

}

P1: while(true)

{

Wait(S1);

Release(S2);

}

P2: while(true)

{

Wait(S2);

Release(S0);

}

Find out how many times the process P0 executes printf statement.

a) At least twice

b) Exactly once

c) Exactly twice

d) Exactly thrice

14) Given the following program construct

{

if ( a == b ) { S1; exit(); }

else if ( c==d ) { S2; }

else { S3; exit(); }

S4;

}

Given 4 test cases, find out which one among the following covers all
the 4 statements

T1: a, b, c and d are same.

T2: a, b, c and d are all distinct.

T3: a == b and c != d.

T4: a != b and c==d.

a) T1, T2 & T3;

b) T1, T4.

c) T2, T4.

d) T1, T2 & T4.

15) Which of the following statements are true?

I. Shortest remaining time first scheduling may cause starvation

II. Preemptive scheduling may cause starvation

III. Round robin is better than FCFS in terms of response time

a) I only

b) I and III only

c) II and III only

d) I, II and III

16) Sequences of logical pages access :

1 2 3 2 4 1 3 2 4 1

Implemented Optimal,LRU,FIFO Page replacement techniques.

Then no. of page faults in :

a) Optimal < LRU < FIFO

b) Optimal < FIFO < LRU

c) Optimal = FIFO

d) None

17) Find the no. of page faults for Optimal Page replacement technique
in the given sequence of question no. 16.

a) 5

b) 6

c) 7

d) 8

18) Given a simple graph of 6 nodes (note- it
**?**
**
s a simple graph) then tell which of the following is a set of valid
graph degrees.
**

a) 4,4,1,1,1,1

b) 4,4,2,1,1,1

c) 4,4,2,2,1,1

d) None

19)

gcd(n,m)

{

if (n%m == 0)

return n;

n = n%m;

return gcd ( m, n);

}

What is the complexity of calculating gcd(n, m) in worst case?

a) O(lgn)

b) O(lgm)

c) O(lg(lgn))

d) O(lg(lgm))

20)

void f(char * x)

{

x++;

*x = 'a';

}

int main()

{

char * str = "hello";

f(str);

cout << str;

system("pause");

return 0;

}

a) hello

b) hallo

c) allo

d) empty string

** **

** **

## Source: Contents are provided by Technicalsymposium Google Group Members.

Disclaimer: All the above contents are provided by technicalsymposium.com Google Group members.

Further, this content is not intended to be used for commercial purpose. Technicalsymposium.com is not liable/responsible for any copyright issues.