Pick two points at random from the interior of a unit square, what is the expected distance between them?

时间:2022-09-07 15:13:56

My solution is as folllowing.

Pick two points at random from the interior of a unit square, what is the expected distance between them?

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&period; Random Pick with Weight

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

  3. &lbrack;LeetCode&rsqb; 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 &lbrack;转&rsqb;

    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&lpar;莫队思维题&rpar;

    题目描述 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. [ios]新手笔记-。-UIPickerView 关于伪造循环效果和延时滚动效果

    查找了网上资料,循环效果绝大部分都是增加行数来制造循环的错觉,延时滚动就是利用NSTimer间隔出发滚动事件来制造滚动效果. 代码: #import <UIKit/UIKit.h>#imp ...

  2. winform记事本初步实现

    public Form1() { InitializeComponent(); } private void 剪切TToolStripMenuItem_Click(object sender, Eve ...

  3. 按列 sort 排序 Linux 如何查看当前占用CPU或内存最多的K个进程

    用法:sort [选项]... [文件]...Write sorted concatenation of all FILE(s) to standard output. 长选项必须用的参数在使用短选项 ...

  4. Socket 广播

    1.广播端口 Socket中的广播端口是什么意思,是谁对应谁的? 这个广播端口 指定 客户端接收广播消息时要使用的端口号. 参考: 1.快速Python 原型 2.receive UDP broadc ...

  5. Asp&period;Net Mvc&colon; 浅析TempData机制(转发 作者&colon; Tristan G )

    Asp.Net Mvc: 浅析TempData机制 环境: Windows 2008, VS 2008 SP1, Asp.Net Mvc 1.0 --------------------------- ...

  6. Cracking the coding interview--Q1&period;1

    原文: Implement an algorithm to determine if a string has all unique characters. What if you can not u ...

  7. python利用utf-8编码判断中文英文字符&lpar;转&rpar;

    下面这个小工具包含了判断unicode是否是汉字.数字.英文或者其他字符,全角符号转半角符号,unicode字符串归一化等工作. #!/usr/bin/env python # -*- coding: ...

  8. 我的Python成长之路---第一天---Python基础(6)---2015年12月26日(雾霾)

    七.列表——list Python的列表是一种内置的数据类型,是由Python的基本数据类型组成的有序的集合.有点类似C语言的数组,但与数组不同的是,Python在定义列表的时候不用指定列表的容积(长 ...

  9. &lbrack;LeetCode&rsqb; Reach a Number 达到一个数字

    You are standing at position 0 on an infinite number line. There is a goal at position target. On ea ...

  10. Android6&period;0 源码修改之Settings音量调节界面增加通话音量调节

    前言 今天客户提了个需求,因为我们的设备在正常情况下无法调节通话音量,只有在打电话过程中,按物理音量加减键才能出现调节通话音量seekBar,很不方便,于是乎需求就来了.需要优化两个地方 1.在正常情 ...