<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Bus number</title>
	<atom:link href="http://blog.osirra.com/2008/05/31/bus-number/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.osirra.com/2008/05/31/bus-number/</link>
	<description></description>
	<lastBuildDate>Sat, 04 Feb 2012 23:35:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Dan</title>
		<link>http://blog.osirra.com/2008/05/31/bus-number/comment-page-1/#comment-2523</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Sat, 14 Jun 2008 20:24:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.osirra.com/?p=1223#comment-2523</guid>
		<description>&lt;p&gt;Not quite what I was after, Tom.  You need to be able to interpret from the numbers the order in which they occurred.  So 57 then 72 is different from 72 then 57.&lt;/p&gt;
&lt;p&gt;Maybe convert each of the numbers to base nine then nine-separate each from the next, given that the nine would never be used.&lt;/p&gt;
&lt;p&gt;So 57 and 72 are 63 and 80 respectively.  So their unique number would be 63,980.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Not quite what I was after, Tom.  You need to be able to interpret from the numbers the order in which they occurred.  So 57 then 72 is different from 72 then 57.</p>
<p>Maybe convert each of the numbers to base nine then nine-separate each from the next, given that the nine would never be used.</p>
<p>So 57 and 72 are 63 and 80 respectively.  So their unique number would be 63,980.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tom</title>
		<link>http://blog.osirra.com/2008/05/31/bus-number/comment-page-1/#comment-2414</link>
		<dc:creator>tom</dc:creator>
		<pubDate>Tue, 03 Jun 2008 19:13:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.osirra.com/?p=1223#comment-2414</guid>
		<description>&lt;p&gt;Actually, yes, there is always an integer that is the unique representation of any n other integers, where n is greater than or equal to 1...&lt;/p&gt;
&lt;p&gt;First we need a function called nth_prime which simply describes the sequence 2,3,5,7,11...&lt;/p&gt;
&lt;p&gt;Now map each number x in your list to the xth prime ie 1-&gt;2, 2-&gt;3, 3-&gt;5 ... 8-&gt;19 ...&lt;/p&gt;
&lt;p&gt;Finally multiply the results, and by the principal of every number having a unique list of prime factors, you have a unique number.&lt;/p&gt;
&lt;p&gt;Example:&lt;br /&gt;
Encode 2,5,10 -&gt; 3,11,29 -&gt; 3*11*29=957&lt;/p&gt;
&lt;p&gt;There now exists a further capability to decide whether a given encoded list of numbers contains any given number. Can you see how?&lt;/p&gt;
&lt;p&gt;Example:&lt;br /&gt;
Does the list of numbers encoded as 957 contain the number 7? &lt;/p&gt;
&lt;p&gt;957 / nth_prime(7) = 56.29411765&lt;br /&gt;
56.29411765 is not a whole number so 7 is not in the encoded list.&lt;/p&gt;
&lt;p&gt;Note: If you need 0 and negative numbers too, then just map the sequence 0,1,-1,2,-2,3,-3... to the list of primes.&lt;/p&gt;
&lt;p&gt;Now a question for the reader:&lt;br /&gt;
Can you see how this could be used in excel to decide for example if a given list of numbers contains duplicates.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Actually, yes, there is always an integer that is the unique representation of any n other integers, where n is greater than or equal to 1&#8230;</p>
<p>First we need a function called nth_prime which simply describes the sequence 2,3,5,7,11&#8230;</p>
<p>Now map each number x in your list to the xth prime ie 1->2, 2->3, 3->5 &#8230; 8->19 &#8230;</p>
<p>Finally multiply the results, and by the principal of every number having a unique list of prime factors, you have a unique number.</p>
<p>Example:<br />
Encode 2,5,10 -> 3,11,29 -> 3*11*29=957</p>
<p>There now exists a further capability to decide whether a given encoded list of numbers contains any given number. Can you see how?</p>
<p>Example:<br />
Does the list of numbers encoded as 957 contain the number 7? </p>
<p>957 / nth_prime(7) = 56.29411765<br />
56.29411765 is not a whole number so 7 is not in the encoded list.</p>
<p>Note: If you need 0 and negative numbers too, then just map the sequence 0,1,-1,2,-2,3,-3&#8230; to the list of primes.</p>
<p>Now a question for the reader:<br />
Can you see how this could be used in excel to decide for example if a given list of numbers contains duplicates.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
