• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Quantitative Interview questions and answers

A refresher first! The (XOR) operation acts on 0 and 1 as follows: 0(XOR)0=0, 0(XOR)1=1, 1(XOR)0=1, 1(XOR)1=0. We also let (XOR) operate on numbers expressed in binary notation on their digits one at a time. This is called bitwise operation. Here are a few examples: 111(XOR)101=10, 10011(XOR)11001=1010, 1011(XOR)1011=0.

Now, solve the following systems of equations. Here M and N are binary numbers. Solutions may not be unique.

#1

M(XOR)N=101
(11*M)(XOR)(11*N)=11111



#2

M(XOR)N=110
(M*M)(XOR)(N*N)=10110

To make this problem even more interesting :wall,
the second system does not have a solution either.
I apologize for feeling "binary": I invite the original proposer to prove that
(M*M)(XOR)(N*N) always ends with two 0's, given M(XOR)N=110.
 
Its a simple, but a nice one:
(\sum_{k=0}^{90}{sin^2(k)}=?)

k is in degrees and not radians...

double angle formula, then pair up each cos(2k) with cos(180 - 2k) to make lots of zeroes,
you get 90*91/4, unless i messed up the algebra...
 
double angle formula, then pair up each cos(2k) with cos(180 - 2k) to make lots of zeroes,
you get 90*91/4, unless i messed up the algebra...
This is not the answer, and there is much simpler approach.
If you want, I can give a little hint.
 
Use (sin^2x=1-cos^2x) and match up the pairs, to get 91/2. Rados' solution is correct, he just messed up the algebra.
 
Use (sin^2x=1-cos^2x) and match up the pairs, to get 91/2. Rados' solution is correct, he just messed up the algebra.
Yes, thats the answer...I didn't say that is solutions isn't correct, I just said that there is simpler approach, which is the one that you showed.
 
To make this problem even more interesting :wall,
I invite the original proposer to prove that
(M*M)(XOR)(N*N) always ends with two 0's, given M(XOR)N=110.
While not the original poster, I'm avoiding proper work ....

(All arithmetic is mod 2.)
Let x:=(XOR), write M =... a3 a2 a1, N = ... b3 b2 b1.

M x N = 110 implies a1 + b1 = 0 (*)

M*M has as last digit a1*a1 and second last digit A = 2*a1*a2 = 0. (Just multiply)
N*N has as last digit b1*b1 and second last digit B = 2*b1*b2 = 0.

Hence M*M x N*N has last digit a1^2 + b^1^2 = a1 + b1 = 0, by (*). The second last digit is zero too since A + B = 0 + 0.
 
Let h=(1/2), RAD(z)=z^(1/2) and f(n)=2^n for each natural number n.

For which real values of x does the following equality hold?

sin(x)=RAD{h-h*cot(f(1)*x)*(RAD{h-h*cot(f(2)*x)*RAD{h-h*cot(f(3)*x)*RAD{h-h*cot(f(4)*x)*RAD{...
I think this has solutions:

(sin(x)=sqrt(.5 -.5cot(2x)*A_1)\\sin^2(x) = .5-.5cot(2x)*A_1\\1-2sin^2(x) = cot(2x)*A_1\\cos(2x) = cot(2x)*A_1 \\A_1 = sin(2x) )
One can continue to get (A_n = sin(2^n x)), and by induction you can show its true for all n.

So (sin(x) = sqrt(.5-.5cot(2x)*sin(2x)) => sin^2(x) = .5-.5cos(2x)) which is an identity.

So the above euqation is an identity for any x for which is holds. Just working over ([0,2\pi)), we need to exclude ((\pi,2\pi)) since (sin(x)) is negative there and identity can't hold.

Our next two restrictions are we can't divide by zero, and any radicand has to be positive.

Hence,
(sin(2^n x) != 0 => 2^n x != 0), or (\pi => x != 0), or (\pi/2^n.)
Also (.5 - .5cot(2^nx)*A_n > 0 => .5 - .5cos(2^n x) > 0 => cos(2^n x) < 1), which is true for all x.

So it seems this is an identity on ((0,\pi)-{\pi/2^n) for any (n > 0)

PS: Anyone know how to get rid of those annoying breaks?
 
I think this has solutions:

(sin(x)=sqrt(.5 -.5cot(2x)*A_1)\\sin^2(x) = .5-.5cot(2x)*A_1\\1-2sin^2(x) = cot(2x)*A_1\\cos(2x) = cot(2x)*A_1\\A_1 = sin(2x) )


Anyone know how to get rid of those annoying breaks?

Yes, you shouldnt use enter at the end of the line, just use \\
 
Your reasoning is incorrect! There is absolutely NO LOGICAL explanation why M has to be a 3-digit number.

I am so sorry, I always worked with numbers that have same long. If one of them is smaller than other, always added 0 in front of the smaller number to have a better calculation.
I mean, if M=010 and N = 1 then take N=001 to calculate M(XOR)N. Also, M(XOR)N = 11 but I calculate it as 011. This habbit comes from MATLAB habbit. When one tries to bitxor M and N, their dimensions must agree. If not, just put 0 until their dimensions agree. To understand me better, please try to XOR 110 and 10 in MATLAB.
 
There is a painting on the wall in a hospital waiting
room. The unusual thing about the painting is the way it's hung. They
hammered two nails (instead of one) into the wall. They wound
the picture wire around these nails in such a way that the painting would
fall if either nail were pulled out. How did they do it?
Here's my artist's impression of the answer. I spent all of two seconds putting the picture together, (in paint nevertheless). Please excuse the (un)sophistication ;)
 

Attachments

  • untitled.JPG
    untitled.JPG
    4.1 KB · Views: 55
Here's my artist's impression of the answer. I spent all of two seconds putting the picture together, (in paint nevertheless). Please excuse the (un)sophistication ;)

It looks somewhat vulgar, but I might have a dirty mind.
 
I wonder what Freud would say about my picture? And what would he say of your response?
 
After taking this out for 7 terms, the answer comes out to be 1.757885646

After taking this out for 17 terms, the answer comes out to be 1.757932757

After taking this out for 30 terms, the answer is still the same as above.

Both of these are greater than the square root of 3.

So I'll just hedge my bets at 1.757932757.

Odds are, this is supposed to be expressed in some distinctly elegant form.

I do not know what that is.
 
You have 15 bags. How many marbles do you need so that you can have a different number of marbles in each bag?
 
105. 0 in the first, 1 in the second, and so on, until you get 14 in the last.

The sum of said amount of marbles is equal to 1+2+3+...+14=14*15/2=7*15=105.
 
You have 15 bags. How many marbles do you need so that you can have a different number of marbles in each bag?

If bags are allowed to be placed inside of other bags, then I believe it is 14 marbles.

If not, then I believe the answer should be 105 marbles.
 
yeah, "bag into bag" was what I was thinking about.
Regards!
 
Compute RAD{1+RAD{2+RAD{3+RAD{4+RAD{5+....}}}...}.
There is no closed form for this sequence. Where did you find the question? Anyone with an answer has (dis)proved a good theorem.
 
Back
Top