<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Some stuff &#187; line segment</title>
	<atom:link href="http://blog.yhuang.org/?feed=rss2&#038;tag=line-segment" rel="self" type="application/rss+xml" />
	<link>https://blog.yhuang.org</link>
	<description>here.</description>
	<lastBuildDate>Wed, 27 Aug 2025 08:50:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>red-blue cross problem</title>
		<link>https://blog.yhuang.org/?p=185</link>
		<comments>https://blog.yhuang.org/?p=185#comments</comments>
		<pubDate>Sat, 11 Apr 2009 06:10:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[collinear]]></category>
		<category><![CDATA[face]]></category>
		<category><![CDATA[finite number]]></category>
		<category><![CDATA[line segment]]></category>
		<category><![CDATA[line segments]]></category>
		<category><![CDATA[pair]]></category>
		<category><![CDATA[segment]]></category>
		<category><![CDATA[segment lengths]]></category>
		<category><![CDATA[sum]]></category>
		<category><![CDATA[supposition]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=185</guid>
		<description><![CDATA[Here is a problem described to me by fakalin. Given n red points and n blue points, no three of which are collinear, prove that there exists a pairing of red and blue points such that the line segments connecting each pair do not intersect. The solution is straightforward though it took a while to [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a problem described to me by fakalin. Given n red points and n blue points, no three of which are collinear, prove that there exists a pairing of red and blue points such that the line segments connecting each pair do not intersect.</p>
<p><span id="more-185"></span></p>
<p>The solution is straightforward though it took a while to identify after it was already staring me in the face.</p>
<p>With each pairing is associated a total length (sum of line segment lengths). Since there are a finite number of pairings, there is a minimum length pairing. We claim this pairing must be one that satisfies the problem statement.</p>
<p>Suppose it were not, then there are some 2 red and 2 blue points such that the pairs&#8217; connecting line segments cross. Then uncross the two pairs. This can be done because the points are not collinear. By uncrossing, the sum of the pairs&#8217; segment lengths strictly decreases and therefore the total length also decreases. This contradicts the supposition. Therefore the claim is true.</p>
<p>However, note that a pairing that satisfies the statement need not be minimum total length. (The minimum total length doesn&#8217;t even need to be unique.) Nevertheless, an algorithm for reaching a solution is to start with any pairing, then identify any crossed pairs and uncross them. During this process, crossed pairs count may even increase for a time, but total length always decreases strictly at each step. Therefore, the algorithm will terminate, either when a valid pairing is reached, or when the minimum total length is reached, which also gives a valid pairing.</p>
<p>An extended question is, given the valid pairing, can a non-self-intersecting red-blue alternating path connecting all the points be found? I believe the answer is yes.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=185</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
