由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Science版 - Re: HELP! a algorithm problem!
相关主题
Re: 谁给俺讲讲Gauss-Chebyshev quadrature formulaRe: 一个问题
Re: 请教积分,急!Re: 第一宇宙速度是多少?
Re: Symbol function/eigenvalueRe: EM signals travel along outer side of a wire
Re: 一个np-complete的证明求救Re: repost: Integration Help!
Re: a math problemRe: 数学作业
矩阵趣题Re: help: the approximation of n!
Re: who can try this problem?Re: 积分请教
Re: 计算分子运动的速度Re: 修正结果 --问howell
相关话题的讨论汇总
话题: log话题: algorithm话题: sqrt话题: time话题: problem
进入Science版参与讨论
1 (共1页)
d*z
发帖数: 150
1

the len of r and s are no more than 2n
so
First we can get x+y=r-s+1 in O(n)
The time to get u=(x+y)(x+y)-4r is O(nlog(n)).
and the time to find x-y=sqrt(u) should be O(
n*log(n)log(n)log(log(n)) ).
so I think the time is O( n*log(n)*log(n)*log(log(n)) ).
Of course it is less than O(n*n). That's in polynomial time.
But in the fact, the comment algorithm to multiply and divid
is both O(n*n).
As to the sqrt(), we can use
x(n)=(x(n-1)*x(n-1)+a)/(2*x(n-1))
to found the sqrt(a), we only need to iter
1 (共1页)
进入Science版参与讨论
相关主题
Re: 修正结果 --问howellRe: a math problem
Re: 大吓帮忙看一下...矩阵趣题
Re: Ask2:Re: who can try this problem?
Re: 猜数问题Re: 计算分子运动的速度
Re: 谁给俺讲讲Gauss-Chebyshev quadrature formulaRe: 一个问题
Re: 请教积分,急!Re: 第一宇宙速度是多少?
Re: Symbol function/eigenvalueRe: EM signals travel along outer side of a wire
Re: 一个np-complete的证明求救Re: repost: Integration Help!
相关话题的讨论汇总
话题: log话题: algorithm话题: sqrt话题: time话题: problem