Problem 54020. Circle Division
A circle can be divided into 2 sections, by placing 2 points in arbitrary locations along its circumference and drawing a straight line between them. By adding more points and drawing a straight line from each point to every other point, the circle can be divided into more sections. For example, 3 points would divide the circle into 4 sections and 4 points into 8 sections.
Given a positive integer, n, representing the number of arbitrarily placed points on the circumference of a circle, return d, i and s, the number of straight lines, the number of intersections and the number of sections into which the circle is divided, respectively.
The only restriction on the positions of the points is that they must be placed such that no 3 lines can share a single intersection.
n will always be greater than 3.
Example:
n = 4;
d = 6
i = 1
s = 8
Example:
n = 5;
d = 10
i = 5
s = 16
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers8
Suggested Problems
-
It dseon't mettar waht oedrr the lrettes in a wrod are.
2075 Solvers
-
Find the largest value in the 3D matrix
1656 Solvers
-
Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
2032 Solvers
-
Sum the real and imaginary parts of a complex number
143 Solvers
-
Combined Ages 1 - Symmetric, n = 3
314 Solvers
More from this Author45
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!