n****i 发帖数: 3 | 1 There is array of integer, A1, A2, ... AN. How to effiently find the sub
sequence A[i]+A[i+1]+...+A[j] having the larges summation?
What if we have a matrix of integers and asked to find sub-matrix having
largest summation? |
|
f**d 发帖数: 768 | 2 这是一本计算神经科学的优秀著作,全文拷贝这里(图和公式缺),有兴趣的同学可以
阅读
如需要,我可以分享PDF文件(--仅供个人学习,无商业用途)
From Computer to Brain
William W. Lytton
From Computer to Brain
Foundations of Computational Neuroscience
Springer
William W. Lytton, M.D.
Associate Professor, State University of New York, Downstato, Brooklyn, NY
Visiting Associate Professor, University of Wisconsin, Madison
Visiting Associate Professor, Polytechnic University, Brooklyn, NY
Staff Neurologist., Kings County Hospital, Brooklyn, NY
In From Computer to Brain: ... 阅读全帖 |
|
z********i 发帖数: 568 | 3 以前一个ID给了一个漂亮的解发,怎么不见了? 概述如下:
let x_{ij} be the number of pressing/clicking at position (i,j), m_{ij} be
the original input element at (i,j), n_{ij} be the final element after all
pressing/clicking.
1. x_{ij}=R_i+C_j-2x_{ij}+m_{ij}-n{ij}=R_i+C_j+m_{ij}-n{ij} mod 2.
Queistion: how to get R_i(the summation of x_{ij} at row i)and C_j(the
summation of x_{ij} at column j)?
Answer: simply sum x_{ij} for 1<=j
2. R_i=nR_i+X+summation of(m_{ij}-n_{ij}) mod 2 at row i.
where X is the summation o... 阅读全帖 |
|
l*****v 发帖数: 498 | 4 Given two arrays A & B of length l, containing non negative integers, such
that the sum of integers in A is the same as sum of integers in B.( The
numbers need not be the same in both the arrays.)
Now if you start with an index 'k' in each array and do the following
summation, SUMMATION (Ak-Bk), where Ak is the value at index k of array A,
and Bk is the value at index k of array B, where 'k' increments and wraps
back all the way to k-1, the final sum value will be zero.
Question: Find a suitable... 阅读全帖 |
|
c**i 发帖数: 6973 | 5 (1) Robert D Kaplan, The South China Sea Is the Future of Conflict; The 21st
century's defining battleground is going to be on water. Foreighn Policy,
Sept/Oct 2011.
http://www.foreignpolicy.com/articles/2011/08/15
/the_south_china_sea_is_the_future_of_conflict
Quote:
"Europe is a landscape; East Asia a seascape. Therein lies a crucial
difference between the 20th and 21st centuries. The most contested areas of
the globe in the last century lay on dry land in Europe, particularly in the
flat expa... 阅读全帖 |
|
z********i 发帖数: 568 | 6 According to equation 5, (n-1-m)X=summation of (m_{ij}-n_{ij}) mod 2 for all
1<=i<=m,1<=j<=n. 如果这个方程不满足,就无解。比如说,n-m-1是奇数,但
summation of (m_{ij}-n_{ij}) mod 2不为零,为1。
例子:(1)m=1,n=2. [1 0]。(2)m=1,n=4. [1 0 0 0], or [1 1 1 0], or [1 0 1
1], etc 。(3) m=2,n=3.
1 0 0
0 0 0
所以算法就是先解方程5,如方程无解,原问题无解。然后解方程3,如无解,原问题无
解。最后方程1肯定有解(无系数在x_{ij}前面)。 |
|
b**********y 发帖数: 326 | 7 看过网上几个律师写的版本, "In summation, Dr. Xx is an exceptionally capable
researcher who seeks employment in an area of substantial intrinsic merit".
如果我DIY,写类似的 “In summation,I am an exceptionally capable researcher
sho seek employment... substrantial intrinsic merit."
觉得有点怪。大家DIY petition的时候,comfortable用第一人称吹自己吗?移民官会
不会觉得我是抄的。。。 |
|
O******e 发帖数: 734 | 8 If you suspect a bug in the reciprocal Ewald summation, have you
verified your assumption by running a simulation with the real part
of the Ewald summation (the erfc contributions) included but the
reciprocal and correction Ewald contributions excluded and showing
that this gives conservation of the extended Hamiltonian? |
|
b******s 发帖数: 325 | 9 新手急需要帮助解释下REGRESSION COEFFICIENT.谢谢帮忙先!!!
Model:
Dependent var: Delta Y (which is the outcome change between baseline and a
follow-up measurement point)
Indepdent vars: baseline score category 1, baseline score category 2 (NOTE:
category 3 is the omitted category), plus a bunch of "state" dummies (VA, IN
, MD with MS as the ommited category) and a "treatment model" dummy (where 1
= diversion; 0, transition).
QUESTION 1:
So the constant is interpreted as "the average outcome change for population... 阅读全帖 |
|
e***b 发帖数: 53 | 10 To completely make you shut up, here is what Bob Pease explained how
bandgap works.
"The beauty of the band-gap reference is the summation of the Vbe term,
which decreases at the rate of about -2 millivolts /°C, and the (delta-Vbe
term) which grows at about + 2 millivolts /°C, to achieve an overall
Temperature Coefficient (Tempco) that is substantially zero. ALL band-gaps employ this summation of a growing and a shrinking voltage, to make a stable low-tempco voltage."
Again, there is no such th |
|
|
S*********g 发帖数: 5298 | 12 Well, try this, you will find out the answer
Sum[Sin[m*Pi/50],{m,1,n}]/.n->Infinity
Limit[Sum[Sin[m*Pi/50],{m,1,n}],n->Infinity]
The reason why the Limit function gives no anwser is
the summation result of sin is still some sin. And, the limit
for sin is kind of ambiguous stuff if you consider it separately.
/. just set the n to infinity without check the limit.
You can see that the summation is some bounded value for n->Infinity
while it should be zero, in fact.
When it is devided by n-> infini |
|
g**a 发帖数: 2129 | 13 if we only consider 2 way interactions,
m variables as the main effects in the model (1<=m<=n), then we have c(2,m)
2 way interactions. So there are c(m,n)*2^c(2,m) models. The summation from
m=1 to m=n of the above formula is the total possible models with 2 way
interactions.
if considering all possible interactions, the formula became
c(m,n)*2^(c(2,m)+c(3,m)+..+c(m,m)). The summation from m=1 to m=n for this
formula is the total models for with all possible interations. |
|
b******s 发帖数: 325 | 14 新手急需要帮助解释下REGRESSION COEFFICIENT.谢谢帮忙先!!!
Model:
Dependent var: Delta Y (which is the outcome change between baseline and a
follow-up measurement point)
Indepdent vars: baseline score category 1, baseline score category 2 (NOTE:
category 3 is the omitted category), plus a bunch of "state" dummies (VA, IN
, MD with MS as the ommited category) and a "treatment model" dummy (where 1
= diversion; 0, transition).
QUESTION 1:
So the constant is interpreted as "the average outcome change for population... 阅读全帖 |
|
c***n 发帖数: 2232 | 15 从12月19号就开始了。
Steam over Fukushima as sign of catastrophe: 89 tons of deadly radioactive
fuel could reach US in 2 days
Unexplained plumes of radioactive steam have been rising from Fukushima's
Reactor Building 3. TEPCO has confirmed the reports, adding that they were
not clear on the details of the sudden change at the reactor because of "
lethal radiation levels in that building."
Fukushima's Reactor Building 3 exploded on 13th March 2011 as a result of a
hydrogen buildup, breaching the building... 阅读全帖 |
|
g******n 发帖数: 53185 | 16 说的是中国学生跟美国学生比,要看绝大部分,不能找那些凤毛麟角,没有代表性。
我当年给EMBA当finance TA,大公司的白人manager不知道书上Summation Σ是什么意
思,我跟她说从1加到10书上地方不够大写不下 |
|
h*******k 发帖数: 975 | 17 http://www.seattletimes.com/seattle-news/gary-locke-looks-ahead
注意美国评论,除了一个喝六四血的民运分子,所有的评论 100%是负面的。
proud2Bliberal May 3, 2014
I hope that he will work to stop the outsourcing of our jobs, not encourage
more of it.
希望这个中国狗不要把我们的工作外包到中国去
Real Butter May 3, 2014
As long as he stays away from DSHS, and anything pertaining to DSHS who
harmed greatly when in office, he may as well do as he pleases.
他在DSHS做的全是伤害我们美国的事情
Calm2Chaos May 3, 2014
Welcome Back Gary! The Pacific Northwest and US is blessed... 阅读全帖 |
|
s**********a 发帖数: 1853 | 18 网上搜fibonacci sequence的求和通向公式
用fibonacci summation closed form 搜,然后再除以5^n, 求极限。
如果你6年纪的孩子已经学过了极限的话。 |
|
|
|
w****n 发帖数: 113 | 21 当s实部小于等于1时,你那个级数是发散的,所以zeta(s)的表达式不能是那样的。实
际上,从s实部大于1时zeta(s)的级数表达开始,用Euler-McLaurin summation可以把
zeta(s)写成积分形式。一步一步地分步积分,zeta函数就一个单位宽度接着一个单位
宽度地解析开拓到半平面Re(s)>0, Re(s)>-1, … Anyway, zeta(-2)并不
等于1 4 9 …
至于为啥zeta(-2n)=0,这是很容易从它满足的函数方程(就是你三楼里那公式)看出来的
。函数Xi(s)=s(s-1)pi^(-s/2)Gamma(s/2)zeta(s)关于s=1/2这个点对称,以而很容易
看出这个函数,在整个复平面上解析。因为s=0,-1,-2,-3,… 是Gamma函数的单
极点,
所以zeta(s)在对应的-2,-4,…必须等于零。而且从对称的Xi(3),Xi(5),&
hellip; 等不为零
,马上得出s=-2,-4,…必须是单零点。这些就是所谓的zeta(s)的平凡零点。 |
|
|
b*d 发帖数: 161 | 23 Palin's Failin'
By PEGGY NOONAN
What is it she stands for? After seven weeks, we don't know.
"Sometimes the leak is so bad that even a plumber can't fix it." This was
the concise summation of a cable political strategist the other day, after
the third and final presidential debate. That sounds about right, and yet
the race in its final days retains a feeling of dynamism. I think it is
going to burst open or tighten, not just mosey along. I can well imagine
hearing, the day after Election Day, |
|
l****z 发帖数: 29846 | 24 September 20, 2011
By Robert Gelinas
The decision of who will become the next president of the United States will
be made long before November of 2012. After the current president's most
recent tour de farce before a joint session of Congress, it is rapidly
becoming a foregone conclusion who it's not going to be.
The Obama-adoring New York Times concedes that their manufactured politician
may be in deep trouble as his own base begins to abandon him. Independents
have already done so. The righ... 阅读全帖 |
|
l****z 发帖数: 29846 | 25 by Rick aka Mr. Brutally Honest
It's a summation of his presidency is it not? |
|
l****z 发帖数: 29846 | 26 by wheatington
If a Republican were president, perhaps even if an American were president,
the media would have been all over the Libyan situation like ugly on a toad.
But since the Oval Office has been usurped by a person of colour and thus
is immune from personal responsibility for incompetence or malice, no one
is much interested in looking for the truth.
Obama has lied to Americans and has attempted to cover up his lie. Tricky
Dick Nixon tried that and it cost him a rich presidential lega... 阅读全帖 |
|
b********n 发帖数: 38600 | 27 Well, even if she had used a password it would have been an easy one to
crack.
Summat like "fuckbill", "fuckeurope" or "666" or whatever. |
|
t*****9 发帖数: 10416 | 28 here’s a summation of Trump’s vision.
Everything that currently exists in America and the world is a “disaster.”
Everything will be “tremendous” soon.
How will this tremendousness happen?
We’re going to be smarter and stronger.
Donald Trump speaks in tweets. |
|
b*****d 发帖数: 61690 | 29 An ex-boyfriend turned up to question her narratives in a sworn affidavit
alleging that she was demonstrably neither aerophobic nor claustrophobic—
and perhaps far from being a novice in matters of taking lie-detector tests.
Instead, he suggested that she had used her psychotherapy skills to coach
her doppelganger friend how to massage such a test—a Zelig-like best friend
who unfortunately also turned up at the hearings, and may well have hosted
Ford before the Senate circus, and also allegedly ... 阅读全帖 |
|
s******3 发帖数: 7297 | 30 It's hard to make a general summation. You need to be clear that price,
outlook or the brand, which one is your biggest concern.
Some people just want a bit of everything, which makes the problem more
complicated. |
|
b****e 发帖数: 460 | 31 You think about a cow. A cow makes milk just like a store makes money.
And the businesses of the stock market as a whole is a farm with thousands o
f cows, the milk output of the farm is approximately the summation of the mi
lk provided by each cow. The businesses of the stock market outputs money, i
t can either retain it or it will distribute it as div.
So, here, if there is no stock market at all. Businesses are still businesse
s. If there is no livestock exchange, cows will still make milk. |
|
i********r 发帖数: 12113 | 32 一个unsorted数组包含n个int值, 需要分成m段(m
中最大值最小. 能否找到mlog(n)
的算法? |
|
k***e 发帖数: 556 | 33 放什么飞机?npc也搞出来了。
In computer science, the partition problem is an NP-complete problem. The
problem is to decide whether a given multiset of integers can be partitioned
into two "halves" that have the same sum. More precisely, given a multiset
S of integers, is there a way to partition S into two subsets S1 and S2 such
that the sum of the numbers in S1 equals the sum of the numbers in S2?
如果可以多项式时间解决楼主的问题,只要m取2,看得到的subset summation是否等于
sum/2,就可以回答该set是否能够partition的query?
麻烦大侠以后能贴点靠谱的题目。 |
|
q*********u 发帖数: 280 | 34 感觉这种办法比较清爽也好懂
用基本相同的代码, 还可以用来做给出一个数组,比如{1, 2, 1, -1, -4, 10, 2, 9,
8, -6, 1}, 然后找出subarray which has a max summation among other subarrays;
Binary search is not applicable, at least not as you(above) indicated.
int * find_sum(int *v,int len, int SUM){
quickSort(v,0,len-1);
int low(0), high(len-1);
while(low < high){
if(v[low]+v[high] > SUM) high--; //high = (low+high)/2;
else if(v[low]+v[high] < SUM) low++; //low = (low+high)/2;
else {
int* newV = |
|
x*****p 发帖数: 1707 | 35 Using recursive.
Suppose an array A of integers is given to hold all golden pieces. Its index
is from 0 to N-1.
Let function f(int startIndex, int endIndex) returns the maximum money you
can get.
int f(A, int startIndex, int endIndex) {
int sum = summation from A[startIndex] to A[endIndex];
if (startIndex==endIndex) return A[startIndex];
int choice1 = sum - f(A, startIndex+1, endIndex);
int choice2 = sum - f(A, startIndex, endIndex-1);
return (choice1>choice2?choice1:choice2)... 阅读全帖 |
|
H****S 发帖数: 1359 | 36 很可惜,挂了。
1. a summation function (the potential overflow of summing a + b)
2. how to implement a garbage collector (smart pointer)
3. three eggs throw at a building with unknown height to determine at which floor the egg would be broken. Best solution and time complexity. (和扔两个蛋很像,但是完全不一样。一紧张思路就完全转不过来。要注意每次得回收egg,就挂在这上面,好像应该是每三层每三层扔。MD,讨厌brain teaser!!)
4. Garbage collector有什么不好的地方。(郁闷的地方,java一垃圾回收,速度就狂慢,一紧张这个也忘了。上来就说memory overhead)
准备了所有能见到的BB FSD 题目,一个也没对上,RP太差了,唉。
有几次还要问我OS和多线程的东西,不是BB很照顾非CS背... 阅读全帖 |
|
f*********5 发帖数: 576 | 37 consider the array as a cycle,
expect
a[k]-b[k] >=0
a[k]-b[k] + a[k+1]-b[k+1] >=0
...
a[k]-b[k] + a[k+1]-b[k+1] +...+ a[n-1]-b[n-1] >=0
a[k]-b[k] + a[k+1]-b[k+1] +...+ a[n-1]-b[n-1] +a[0]-b[0] >=0
...
a[k]-b[k] + a[k+1]-b[k+1] +...+ a[n-1]-b[n-1] +a[0]-b[0] +... a[k-
1]+b[k-1] =0
such
The
array A,
wraps
summation, |
|
m****v 发帖数: 84 | 38 1. hashmap?
2. summation equation
duplicate?
法得出缺了哪
个数字?
code,
不看GDB的trace和应用程序的log,该怎样快速诊断出可能的原因? |
|
x******g 发帖数: 41 | 39 不是,mid分段扫描是linear的
二分是说找mid的值是二分的
所以复杂度是O(NlogM) N是数组的size,M是summation
大牛们correct me if i am wrong, thanks |
|
y******n 发帖数: 47 | 40 周五面完最后一个onsite, 累的惨兮兮的, 好容易爬回家. 不管结果如何, 这段时间找
工作算是告一段落了.
下面把这段时间面试中被问到的题目整理一下, 供大家参考. 我也就不说具体是那些公
司了, 都是很典型的面试题, 到哪里都有可能会被问到.
* implement memcpy? How to improve? how to determine if a system is
32bit or 64bit?
* how is static keyword used in Java?
* a list of intervals, no overlapping and sorted, write a function to
insert an interval into the list and still keep the list sorted and no
overlapping.
* given a function on sorted dictionary to retrieve word by index,
string getWord(int i), how to i... 阅读全帖 |
|
S**I 发帖数: 15689 | 41 If all elements are integers, then the hash table size is the same as
summation of size of all buckets. If number of buckets is small and the
input array is huge, then lookup is O(1). |
|
u**r 发帖数: 663 | 42 只需要扫一遍,同时记录最小值,数组长度,summation,用等差数列求和公式验证之。
前提是出现重复的就不算sequance. |
|
i**********e 发帖数: 1145 | 43 我刚在linux上运行了,没有这方面的问题,不过我的程序是C++ 不是Java。
我测试了你的算法,返回结果都算满意,而且运行越多次,返回的结果越接近理想的 p
值。
你的算法不单简洁,而且复杂度是最优的,递归是 average 两次就返回答案。
expected # calls = 1*0.5 + 2*0.5^2 + 3*0.5^3 + ...
= Summation( k * 0.5^k ), k = 1 .. n
= 2 - (n+2)/2^n
When n = infinity,
expected # calls = 2
贴下code方便大家做测试:
#include
#include
#include
#include
using namespace std;
bool rand2() {
return (rand() % 2 == 0);
}
unsigned long long totalCalls = 0;
bool Prob2(double p, bool expected = tru... 阅读全帖 |
|
i**********e 发帖数: 1145 | 44 我刚在linux上运行了,没有这方面的问题,不过我的程序是C++ 不是Java。
我测试了你的算法,返回结果都算满意,而且运行越多次,返回的结果越接近理想的 p
值。
你的算法不单简洁,而且复杂度是最优的,递归是 average 两次就返回答案。
expected # calls = 1*0.5 + 2*0.5^2 + 3*0.5^3 + ...
= Summation( k * 0.5^k ), k = 1 .. n
= 2 - (n+2)/2^n
When n = infinity,
expected # calls = 2
贴下code方便大家做测试:
#include
#include
#include
#include
using namespace std;
bool rand2() {
return (rand() % 2 == 0);
}
unsigned long long totalCalls = 0;
bool Prob2(double p, bool expected = tru... 阅读全帖 |
|
S**I 发帖数: 15689 | 45 ☆─────────────────────────────────────☆
yuhanlin (Yuhan) 于 (Mon Aug 29 00:18:17 2011, 美东) 提到:
周五面完最后一个onsite, 累的惨兮兮的, 好容易爬回家. 不管结果如何, 这段时间找
工作算是告一段落了.
下面把这段时间面试中被问到的题目整理一下, 供大家参考. 我也就不说具体是那些公
司了, 都是很典型的面试题, 到哪里都有可能会被问到.
* implement memcpy? How to improve? how to determine if a system is
32bit or 64bit?
* how is static keyword used in Java?
* a list of intervals, no overlapping and sorted, write a function to
insert an interval into the list and still keep the list sorted and no
overlapping.... 阅读全帖 |
|
m***n 发帖数: 62 | 46 来自主题: JobHunting版 - 问道数学题 You can do repeated expectation:
let the expectation you want to be x;
fix the first person;
conditioning on the 2nd person has the same bday as the 1st person, you got
2;
conditioning on the 2nd person has a different bday as the 1st person, you
can condition on the 3rd person; if the 3rd person has the same bday as the
previous two people, you got 3;
otherwise keep going...
so x = 1/365*2+364/365*2/365*3+363/365*3/365*4+...
then x = 1/365* sum_{n = 1}^{364} n*(n+1)*(365-n+1)/365 and it is a po... 阅读全帖 |
|
r*********n 发帖数: 4553 | 47 to compute e.g. 0.5 * 1.5? |
|
r*********n 发帖数: 4553 | 48 顶一下....
要是两个integer乘法,loop用加法就行了,但是floating number怎么搞呢?面官甚至
提示:你想想人们在还没有发明计算器之前是怎么做乘法的... |
|
|
w********p 发帖数: 948 | 50 1。 先数一共两个小数点,
2。 15 *5 (用加分做 15+ 15+。。。)
3。 然后 再移位, (指小数点移位)
不让移位的话, 就加 75次 0.01
这个行吗? |
|