概率问题
人工智能编程吧
全部回复
仅看楼主
level 6
liyuning 楼主

一个点,可上下左右移动,每次移动距离一样,问经过2n次移动后该点仍在原处的概率是多少
2011年09月28日 15点09分 1
level 8
好像刚回答过啊。。
假设这个概率是P,那在前后左右四个方向上移动,概率就是P平方,三维6个方向就是P的三次方。我想知道的是,如果在平面上按米字型八个方向随机等距离移动,答案又是多少?
2011年09月28日 15点09分 2
level 1
这个是什么意思哦。
假设这个概率为p 那向四个方向移动的就是p^2那么。现在向四方移动的概率是1/4 则p为1/2
所以回到原点的概率为1/2。不会吧。这个怎么可能。
2011年09月29日 02点09分 3
level 8
[汗]我果然迷糊了,N足够大时, P才接近 P4(N/2) * P2(N/2)
2011年09月29日 02点09分 4
level 8
N 足够大时,P4(N)才接近 P2(N/2) * P2(N/2) (P4表示4个方向,P2表示两方向)
2011年09月29日 02点09分 5
level 1
算了一下,发现是不相等的,如果n知道是可以算得出来看
-- t-sql代码
create table tx(x int,y int ,id int);insert into tx select 0,1,1 union all --上select 1,0,2 union all --右 select 0,-1,3 union all --下select -1,0,4; --左
create table t(id int identity(1,1),x int ,y int,pid int);
-- 1.初始insert into t select 0,1,null union all select 1,0,null union all select 0,-1,nullunion all select -1,0,null
-- 2.其它
declare @i int=1;declare @n int=3; --declare @num1 int=0;declare @num2 int=4;declare @t table(id int);
while @i<2*@nbegininsert into t select u.x+v.x,u.y+v.y,v.id from t u cross join tx vwhere u.id between @num1 and @num2;select @num1=min(id),@num2=MAX(id) from t where id>@num2;set @i=@i+1;endselect * from t order by pid --查看所有情况
-- 清理truncate table t;
-- 计算概率select SUM(case when x=0 and y=0 then 1 else 0 end)*1.0/COUNT(1) from t -- 当n=1时 也就是走2步-- 0.200000000000-- 当n=2时 也就是走4步的时候-- 0.117647058823-- 当n=3时 也就是走6步的情况-- 0.080586080586
2011年09月29日 04点09分 7
level 1
当n=1时 也就是走2步 0.200000000000
当n=2时 也就是走4步的时候 0.117647058823
当n=3时 也就是走6步的情况0.080586080586
上面格式有点乱。
2011年09月29日 04点09分 8
level 1
坐等骚炮大神出结果
2011年09月29日 14点09分 9
level 8
总之,左右和上下两家分开的各种步数的概率,再乘以两家分别在原点的概率。把他们加起来。(奇数+奇数是是死翘的)
2011年09月29日 14点09分 12
level 8
米字估计也可以这么干。先分两个大十字,然后再 与两个十字的概率乘起来。
关键还是要化简。
2011年09月29日 14点09分 13
1