由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Science版 - Re: 一个问题请教各位大虾们.
相关主题
Re: 赠送ID -- 建议第一步一道amazon题
Re: [转载] Re: 关键在于您怎样看待Bayes理论。Re: 一道interviewExposed上一道string permutation的题
IQ测试这两道leetcode题有更好的答案吗?
Re: Ask: Re: Ask:Given a string, find all its permutations without any repetition?
Re: 请教一个联合分布的问题Re: 请问大牛们leetcode上的Permutations II (转载)
paper helpMS Onsite
关于排列组合的题目的算法问一个题
Non-recursive permutationamazon onsite 面经
相关话题的讨论汇总
话题: correct话题: 265话题: 720话题: consider
进入Science版参与讨论
1 (共1页)
y**t
发帖数: 50
1
Consider permutations on 6 letters.It's the
probability that a permutation without fixed points.
You can calcualte it inductively.assume it's f(n)
f(2)=1,f(3)=2,f(4)=9,f(5)=44,f(6)=265
so I think it's 265/6!=53/144
d****b
发帖数: 24
2
fix the envelope.
Then for the letters, total permutations are 6!.
at least one is correct c(6,1)*5!
at lease two is correct c(6,2)*4!
at least three is correct c(6,3)*3!
at lease four is correct c(6,4)*2!
at least five is correct c(6,5)*1!
all six is correct c(6,6)*0!
By Bayes' formula
Therefore, the solution is
{c(6,0)*6!-c(6,1)*5!+c(6,2)*4!-c(6,3)*3!+c(6,4)*2!-c(6,5)*1!+c(6,6)*0!}/6!
={720-720+360-120+30-6+1}/720
=265/720
1 (共1页)
进入Science版参与讨论
相关主题
amazon onsite 面经Re: 请教一个联合分布的问题
问一个题目paper help
一个容易记忆的permutation算法关于排列组合的题目的算法
抽空简单说一下昨天的Google Phone InterviewNon-recursive permutation
Re: 赠送ID -- 建议第一步一道amazon题
Re: [转载] Re: 关键在于您怎样看待Bayes理论。Re: 一道interviewExposed上一道string permutation的题
IQ测试这两道leetcode题有更好的答案吗?
Re: Ask: Re: Ask:Given a string, find all its permutations without any repetition?
相关话题的讨论汇总
话题: correct话题: 265话题: 720话题: consider