由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Quant版 - the brainteaser...
相关主题
Interest Rate Group Strategy analyst 电话面试都会面些什么问题呢?[合集] 面试题目请教
谁讲讲representation theoremspherical random walk (转载)
红宝书里那个以色列伞兵机器人的题目如何做啊?请教大牛们一个薪水问题
请问有谁参加 Constellation energy Third Round interview?MATLAB 入门问题一个
[合集] 现在街上的面试已经有点走火入魔了请教大家一道面试题
发现了一个literature里面谁都没发现的效应问一道题目 包子酬谢!
free back test tool in python - for quant algos (转载)问一道题。
[合集] 问个probability问题a correlation puzzle between 2 geometric random variables
相关话题的讨论汇总
话题: mod话题: row话题: left话题: 11
进入Quant版参与讨论
1 (共1页)
d*********1
发帖数: 25
1
has anybody come cross the following brainteaser?
sell X unit product:
2nd row , 1 left
3rd row , 1 left
.
.
.
10th row, 1 left
11th row, 0 left,
what is X?
r*******s
发帖数: 303
2
what are you talking about?
J**********g
发帖数: 213
3
I think what he means is that
we have x units for arrangement, if there are 2 units per row, then is one
unit left, 3 units per row, one unit left, 10 units per row, one unit left,
but 11 units per row, nothing left.
It's obvious x=121 works, but I don't think the answer is unique: we are
looking or an positive interger such that:
1=x mod 2
1=x mod 3
1=x mod 10
and 11 is a factor of x.
11 does not work, and 121 works, and we can keep testing. it's a solution if
and only if 11 divides x and 30 di
d*j
发帖数: 13780
4
最小公倍数, 呵呵

,

【在 J**********g 的大作中提到】
: I think what he means is that
: we have x units for arrangement, if there are 2 units per row, then is one
: unit left, 3 units per row, one unit left, 10 units per row, one unit left,
: but 11 units per row, nothing left.
: It's obvious x=121 works, but I don't think the answer is unique: we are
: looking or an positive interger such that:
: 1=x mod 2
: 1=x mod 3
: 1=x mod 10
: and 11 is a factor of x.

k*******d
发帖数: 1340
5
if the problem is to find x s.t.
1=x mod 2
1=x mod 3
1=x mod 10
x=121 works, x = 61 also works. in fact , all x satisfying x = 1 mod 60
works...
It is Chinese Remainder Theorem.
J**********g
发帖数: 213
6
NO, 61 is not an answer since 11 does not divide 61...
Also it'd be a solution if and only if x=0 mod 11 and x=1 mod 30 instead of x=1 mod 60.

【在 k*******d 的大作中提到】
: if the problem is to find x s.t.
: 1=x mod 2
: 1=x mod 3
: 1=x mod 10
: x=121 works, x = 61 also works. in fact , all x satisfying x = 1 mod 60
: works...
: It is Chinese Remainder Theorem.

p*****k
发帖数: 318
7
note 11 and 60 are co-prime, so the general solution is:
X = 121 (mod 660), or 660*m+121, where m is a non-negative integer.
but i think OP actually meant X modulo all numbers from 2 to 10
results 1, i.e., X=1(mod 2520) and X=0(mod 11).
again 11 and 2520 are coprime. by Euclidean algorithm,
the general solution is: X = 25201 (mod 27720)
k*******d
发帖数: 1340
8
Yes, you are right. Sorry I missed the last condition (x = 0 mod 11).
The general way to solve this problem is still CRT and Euclidean algo. But
how do you run Euclidean algo quickly during the interview?

【在 p*****k 的大作中提到】
: note 11 and 60 are co-prime, so the general solution is:
: X = 121 (mod 660), or 660*m+121, where m is a non-negative integer.
: but i think OP actually meant X modulo all numbers from 2 to 10
: results 1, i.e., X=1(mod 2520) and X=0(mod 11).
: again 11 and 2520 are coprime. by Euclidean algorithm,
: the general solution is: X = 25201 (mod 27720)

1 (共1页)
进入Quant版参与讨论
相关主题
a correlation puzzle between 2 geometric random variables[合集] 现在街上的面试已经有点走火入魔了
【Brain Teaser】one interview question发现了一个literature里面谁都没发现的效应
入手了Henry Labordere的书free back test tool in python - for quant algos (转载)
分享几道面试题目[合集] 问个probability问题
Interest Rate Group Strategy analyst 电话面试都会面些什么问题呢?[合集] 面试题目请教
谁讲讲representation theoremspherical random walk (转载)
红宝书里那个以色列伞兵机器人的题目如何做啊?请教大牛们一个薪水问题
请问有谁参加 Constellation energy Third Round interview?MATLAB 入门问题一个
相关话题的讨论汇总
话题: mod话题: row话题: left话题: 11