LINES IN THE PLANE

问题描述:

用 n 条直线切割平面空间,求切割出的空间的最大数目。

解决方案:

当我们用 n 条直线去切割时,与前面的 n-1 条直线最多有 n-1 个不同的交点,那么最多新增 n 个空间。假定 n 条直线切割的空间最多为 Ln ,则有公式: Ln <= Ln-1 + n 
并且当直线间的切割原则是任何两条直线间不平行,且任意三条直线不相交于一个交点时,可易得下面公式: Ln = Ln-1 + n 
再由 L0 = 1, L1 = 2 且 Ln = Ln-1 +n,有

Ln=n∗(n−1)/2+1

代码:

时间: 2024-12-24 17:37:15

LINES IN THE PLANE的相关文章

【具体数学 读书笔记】1.2 Lines in the Plane

本节介绍平面划分问题,即n条直线最多把一个平面划分为几个区域(region). 问题描述: "What is the maximum number Ln of regions defined by n lines in the plane?" 这个问题最初由瑞士数学家Jacob Steiner在1826年解决. 延续上一节的解题步骤,即首先关注小规模数据,观察出结果,然后猜测一个递推式并从理论上证明,最后由递推式导出"closed form"(通项式).下面具体整理

[POJ 1269]Intersecting Lines

Intersecting Lines Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 16311   Accepted: 7040 Description We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three

POJ1269 Intersecting Lines[线段相交 交点]

Intersecting Lines Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 15145   Accepted: 6640 Description We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three

【POJ】Intersecting Lines(计算几何)

http://poj.org/problem?id=1269 我会说这种水题我手推公式+码代码用了1.5h? 还好新的一年里1A了---- #include <cstdio> #include <cstring> #include <cmath> #include <string> #include <iostream> #include <algorithm> #include <queue> #include <

POJ1269_Intersecting Lines(几何/叉积判断直线位置关系)

解题报告 题目传送门 题意: 判断直线的位置关系(平行,重合,相交) 思路: 两直线可以用叉积来判断位置关系. AB直线和CD直线 平行的话端点C和端点D会在直线AB的同一侧. 重合的话在直线AB上. 剩下就是相交. 求两直线交点可以用面积比和边长比来求. 看下面的图就知道了,推导就比较容易了 #include <iostream> #include <cstring> #include <cstdio> #define eps 1e-6 #define zero(x)

Intersecting Lines(wa wa wa)

Intersecting Lines Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 12844   Accepted: 5703 Description We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three

poj 1269 Intersecting Lines (计算几何)

Intersecting Lines Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 12863   Accepted: 5712 Description We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three

poj 1269 Intersecting Lines(判断两直线关系,并求交点坐标)

Intersecting Lines Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 12421   Accepted: 5548 Description We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three

poj 1269 Intersecting Lines(判相交交点与平行)

http://poj.org/problem?id=1269 Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 10379   Accepted: 4651 Description We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in