## Saturday, August 1, 2009

### Solutions to "Dividing a plane"

See the original puzzle

Every time you draw a line, it "splits" all of the regions which it goes through. Every time a region is split, it increases the number of regions by exactly one. Therefore, to maximize the number of regions, you want to have the line go through as many different regions as possible.

For example, here is a picture of the fourth line being drawn.
The fourth line (in color) crosses four regions. This is the best you can do, because there are only three other lines, and it can only cross each one once. Every time it crosses a line, it goes from one region to another. If it crosses three lines, then it crosses four regions. If it splits four regions, then the total number of regions increases by four.

In general, whenever you add the Nth line, the number of regions increases by N. When there are zero lines, we start out with a single region. Therefore, the maximum number of regions is equal to 1 + (1+2+3+...+N). If we simplify this equation,* we get 1+N*(N+1)/2.

The circles are more or less the same idea. Whenever you draw a circle, it splits every region it crosses into two. For example, here is a picture of the third circle being drawn:
The third circle splits at most four regions. This is the best it can do because there are only two other circles, and each circle can only be crossed twice. Just like with the lines, each time the circle crosses a line, it goes from one region to another. So if the circle crosses four lines, then it goes through four different regions, splitting each of them into two.

In general, whenever you add the Nth circle, it can crosses 2*(N-1) lines. Therefore, it goes through 2*(N-1) different regions. Note that there is an exception to this rule, when N=1, and it crosses zero lines. Even if the circle crosses zero lines, it still goes through one region, splitting it. The maximum number of regions which can be created by N circles is therefore 2+(2+4+6+...2*(N-1)). This simplifies to 2+N*(N-1). Note that because of the exception mentioned earlier, this equation fails for N=0, when there is only one region.

The ellipses are the same idea yet again. Except now, each pair of ellipses can cross themselves at most four times, rather than two. So the maximum regions which can be created by N ellipses is 2+(4+8+12+...4*(N-1)). This simplifies to 2+2*N*(N-1). Note that this equation also fails for N=0.

Also see the reader comments for other ways to think of the problem.

*If you are wondering how I simplified the equation, consider the sum (1+2+3+...+N).
Let x = 1+2+3+...+N
2x = (1+2+3+...+N) + (N+(N-1)+(N-2)+...+1)
2x = (1+N) + (2+N-1) + (3+N-2) + ... + (N+1)
2x = (N+1)*N
x = N*(N+1)/2
{"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8339656591415405, "perplexity": 468.811356950751}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2013-20/segments/1368699856050/warc/CC-MAIN-20130516102416-00095-ip-10-60-113-184.ec2.internal.warc.gz"}