My solution is as folllowing.

This integration is hard to solve. I googled it, and found the result is 1/3*ln(1+sqrt(2)) + 1/15*(2+sqrt(2)) = 0.52140543..

please see the link below.

http://mathworld.wolfram.com/SquareLinePicking.html

http://www.stat.columbia.edu/~liam/teaching/4109-fall10/chapter4.pdf

Pick two points at random from the interior of a unit square, what is the expected distance between them?的更多相关文章

  1. 《Focus On 3D Terrain Programming》中一段代码的注释二

    取自<Focus On 3D Terrain Programming>中的一段: bool CTERRAIN::MakeTerrainFault( int iSize, int iIter ...

  2. LeetCode 528. Random Pick with Weight

    原题链接在这里:https://leetcode.com/problems/random-pick-with-weight/ 题目: Given an array w of positive inte ...

  3. [LeetCode] Random Point in Non-overlapping Rectangles 非重叠矩形中的随机点

    Given a list of non-overlapping axis-aligned rectangles rects, write a function pick which randomly ...

  4. python入门(四):字符串、编码、random

    1.字符串 字符串基本有两种类型,str和bytes >>> s="a" >>> type(s) <class 'str'>     ...

  5. day 5 模块导入、常用模块os shutil sys commands subprocess hashlib json pickle zipfile traceback random datetime

    os: os.getcwd() 获取当前工作目录,即当前python脚本工作的目录路径 os.chdir("dirname") 改变当前脚本工作目录:相当于shell下cd os. ...

  6. Time vs Story Points Estimation [转]

    One of the most common questions we get is whether to estimate in time or points. It seems like poin ...

  7. CodeForces 577E Points on Plane(莫队思维题)

    题目描述 On a plane are nn points ( x_{i}xi​ , y_{i}yi​ ) with integer coordinates between 00 and 10^{6} ...

  8. 算法教程(3)zz

    First off, we can use our Line-Point Distance code to test for the "BOUNDARY" case. If the ...

  9. (转)Let’s make a DQN 系列

    Let's make a DQN 系列 Let's make a DQN: Theory September 27, 2016DQN This article is part of series Le ...

随机推荐

  1. QT 让窗口(或控件)居中

    代码如下: XXX::XXX(QWidget *parent /* = 0 */) { .................. //注意,resize一定要放在这段代码的前面 resize(300, 3 ...

  2. Windows服务器Pyton辅助运维--01.自动Copy文件(文件夹)到远程服务器所在目录

    Windows服务器Pyton辅助运维 01.自动Copy文件(文件夹)到远程服务器所在目录 开发环境: u  Web服务器: Windows Server 2008 R2 SP1 IIS 7.5 u ...

  3. eclipse 解决插件失效

    昨天系统崩溃,重装系统后eclipse突然对links方式加载插件失效.用尽了网上各种解决方法,始终不行.在%eclispe_dir%/configration/org.eclipse.update/ ...

  4. grouth:全栈工程师指南

    语言学习 curl -v baidu.com 域名请求DNS服务器得到网站服务器的IP,http是80端口,https是443端口.查到ip拿到HTML,JS,CSS后就开始渲染这个页面了. 1.Pa ...

  5. 手游架构-REST架构

    REST架构风格是全新的针对Web应用的开发风格,是当今世界最成功的互联网超媒体分布式系统架构,它使得人们真正理解了Http协议本来面貌.随着 REST架构成为主流技术,一种全新的互联网网络应用开发的 ...

  6. 一、Solr综述

    什么是Solr搜索 我们经常会用到搜索功能,所以也比较熟悉,这里就简单的介绍一下搜索的原理. 当然只是介绍solr的原理,并不是搜索引擎的原理,那会更复杂. 流程图 这是一个非常简单的流程图: Use ...

  7. android View各属性详解

    一.有8个直接子类:AnalogClock, ImageView, KeyboardView, ProgressBar, SurfaceView, TextView, ViewGroup, ViewS ...

  8. Android的深度定制版阿里云os(Android的山寨)

    阿里云OS(YunOS)是阿里巴巴集团的智能手机操作系统,依托于阿里巴巴集团电子商务领域积累的经验和强大的云计算平台,基于LINUX开发. 魅族4阿里yun OS版已上市.[1] 1简介 阿 里云OS ...

  9. Python顺序与range和random

    range([start,] stop[, step]) start是开始,stop是停下,step是步长. >>> range(10) range(0, 10) >>& ...

  10. jquery之多重判断

    var appPath = getAppPath(); $(function(){ $('#addTeskDlg').window('close'); teskGrid(); }); function ...