# Quantitative Interview questions and answers

#### Puzzles

does anyone have answers for #s 1,2, 4 and 5 in the original post? The OP didn't give them. I got:

1.sqrt(2),
2. 2e^(n2pi/6) where n is an integer from 0 to 5
4. 3/4
5. 1/8

#### pruse

does anyone have answers for #s 1,2, 4 and 5 in the original post? The OP didn't give them. I got:

1.sqrt(2),
2. 2e^(n2pi/6) where n is an integer from 0 to 5
4. 3/4
5. 1/8

1. correct.
2. you're missing an i (sqrt(-1)) in the exponent.
4. correct.
5. no. it's 1/4.

Note that 4 and 5 are effectively the same question.

#### Puzzles

5. no. it's 1/4.

Note that 4 and 5 are effectively the same question.
ok. i found the mistake in my work, I do get 1/4 for that one.

I actually didn't realize that 4 and 5 were the same thing. It's not obvious to me why that is, could you explain it?
edit: nvm figured it out

#### pratikpoddar

Generalized Semicircle Covering Points Problem

4. 3 points are randomly drawn on a circle. What is the probability of them being on the same semi-circle ?

A nice generalization of this problem can be found here
If (n) points are drawn randomly on a circle, the probability of them being on the same semi-circle is (\frac{n}{2^{n-1}})

#### Joy Pathak

##### Swaptionz
If person A flips 99 fair coins and obtains heads x times. Person B flips 100 fair coins and obtains heads y times. What is the probability that x < y?

#### pruse

If person A flips 99 fair coins and obtains heads x times. Person B flips 100 fair coins and obtains heads y times. What is the probability that x < y?

(\frac{1}{2})

For each sequence of tosses (S), let (S') be the sequence with heads replaced by tails and tails replaced by heads. Then there is a 1-1 correspondence

((A,B)\leftrightarrow(A',B'))

in which if one side has the property (x<y), then the other side has (x\geq y), showing that the two have equal probability.

#### iniesta

If person A flips 99 fair coins and obtains heads x times. Person B flips 100 fair coins and obtains heads y times. What is the probability that x < y?

#### pruse

sure, you can view it that way too, but the solution i gave above is more elegant • #### ThinkDifferent

This is from a phone interview with a tier 1 bank.

Let A be an n by n square matrix where n is odd. Each column and each row is a permutation of numbers from 1 to n. Prove that diagonal is a permutation of numbers from 1 to n.

• Andy Nguyen

#### ThinkDifferent

"Andy Nguyen likes this."

...you interviewed with them too, Andy? by the way, I cracked this one #### ace

"Andy Nguyen likes this."

...you interviewed with them too, Andy? by the way, I cracked this one n=3 -> 3x3 matrix

123 231 312
231 312 123
312 123 231

#### WilliamKarasz

This is from a phone interview with a tier 1 bank.

Let A be an n by n square matrix where n is odd. Each column and each row is a permutation of numbers from 1 to n. Prove that diagonal is a permutation of numbers from 1 to n.

New member here. Just wanted to throw in my 2 cents.
This is a misleading question, because the presumed true answer is actually false. Play sudoku lately?

[Edited to add a solved Sudoku puzzle]
6 9 1 5 4 7 2 3 8
3 8 4 2 6 1 9 7 5
5 7 2 3 8 9 4 1 6
8 3 6 9 7 5 1 4 2
7 1 9 6 2 4 5 8 3
2 4 5 8 1 3 6 9 7
9 6 7 1 3 2 8 5 4
4 5 8 7 9 6 3 2 1
1 2 3 4 5 8 7 6 9

#### pruse

New member here. Just wanted to throw in my 2 cents.
This is a misleading question, because the presumed true answer is actually false. Play sudoku lately?

[Edited to add a solved Sudoku puzzle]
6 9 1 5 4 7 2 3 8
3 8 4 2 6 1 9 7 5
5 7 2 3 8 9 4 1 6
8 3 6 9 7 5 1 4 2
7 1 9 6 2 4 5 8 3
2 4 5 8 1 3 6 9 7
9 6 7 1 3 2 8 5 4
4 5 8 7 9 6 3 2 1
1 2 3 4 5 8 7 6 9

I think what he's missing from the problem is that the matrix be symmetric (about the main diagonal). Then the main diagonal must indeed be a permutation of 1, ..., n.

#### ThinkDifferent

ehhh...matrix is symmetric by assumption! apologies, folks )

#### pruse

you sent 'em all on a wild goose chase

#### ThinkDifferent

well, I finally saw sudoku skills being useful in math Let's see how sudoku guy deals with the problem now #### iniesta

basically you assume that there is some duplicate in the diagonal, then come up with an algorithm to fill in the matrix, eventually you'll run into a contradiction, ie. one of the columns/rows will have duplicates

#### ThinkDifferent

could you clarify the "an algorithm to fill in the matrix" part?

#### iniesta

could you clarify the "an algorithm to fill in the matrix" part?

well, just obey the constraints for as long as possible. ie fill the first column/row, second column/row, and so on

#### ThinkDifferent

Iniesta, could you be more specific? i.e. give a precise proof.
I have a different solution, so curious to see other way.

Replies
0
Views
4K
Replies
2
Views
89K
Replies
2
Views
5K
Replies
11
Views
9K
Replies
24
Views
18K