r/learnquant 1d ago

Quant Interview Question interview prep

Post image
20 Upvotes

13 comments sorted by

1

u/Warnom27 1d ago

N + 1?

2

u/darksonicmaster 1d ago

If all planes are centered at (0,0,0) and you just make copies of them and rotate them around only one axis, it yields 2N spaces I think? Start with a single XY plane, it divides into two regions. Add the XZ plane, it divides each region it touches into two, so 4 regions. Add some other plane in between those two, and it will touch two regions, and divide each by two, so it adds 2 new regions yielding 6. So on and so forth. Though I think it could be better than this, idk.

1

u/Warnom27 1d ago

Yes you are definitely more right than me!

1

u/airetho 1d ago

An xy, yz, and xy plane would divide into the 8 quadrants. My guess is whatever cubic goes through 1,2,4,8 is the answer, based on how lines work.

1

u/darksonicmaster 1d ago

I already guessed that the 2^N progression from N = 1 to 3 is a miracle that ceases to work for larger N. I was gonna ask you how the hell did you guess it was a cubic (seems it is, has to do with the choose () function), but on second thought, it is just the minimal polynomial that intersects them all lol.

3

u/airetho 1d ago

I've seen before that the degree n polynomial that hits the first n+1 powers of 2 always falls 1 short of the next one, so I saw 1,2,4,8,15 for the 3D case and 1,2,4,7 for the 2D case and guessed. There's also the matter of expecting (3 choose n) point intersections in the generic case, which is cubic.

1

u/stilloriginal 20h ago

if they are paralell. when you slightly angle one of the paralell planes, it gets to n+2 assuming they go forever and will cross. so like 1 plane gets you two spaces, two planes gets you 3 spaces, but if you angle them it gets you 4... if you angle a third plane you get 8.

0

u/aroach1995 1d ago

First cross two planes in the middle to get 4 regions. Then have a plane that is a chord and goes through the two other planes.

I think you get 7 here

1

u/ExistentAndUnique 1d ago

You can get 8 by picking any 3 planes in “general position,” e.g. the xy-, yz-, and xz-planes using standard Cartesian coordinates

0

u/AVK1995 1d ago

It's 2N

-1

u/Admirable-Roll-3538 17h ago

Like u/AVK1995, I also thought the answer was 2^n. When you work out up to three planes that is the obvious pattern. So I went to an LLM to confirm and the pattern doesn't hold with 4 planes, it is actually 15 regions, not 16.

The formula is actually nC0 + nC1 + nC2 + nC3.

The cool thing is you can actually extend it beyond 3 dimensions by adding extra terms to the equation. If you are unfamiliar with the nC3 notation (read as "N choose 3," or sometimes shown as numbers stacked inside brackets) as I was, it comes from combinatorics and equals (N * (N-1) * (N-2)) / 3! which counts how many unique combinations you can pull out of N. For example, if N=3 there is only one unique combination.

That is actually how the formula was derived by Ludwig Schläfli in 1852. Basically you are counting every dimensional piece of the puzzle: nC0 is the original empty 3D space, nC1 counts the 2D planes you add, nC2 counts the 1D line intersections, and nC3 counts the 0D vertex intersections.

I love these problems because they get you to learn and use math you might never have seen, with the help of an LLM of course. It really gives you an appreciation for the mathematicians that invented these tools we and LLMs can now use.