<?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 for Psyche</title>
	<atom:link href="http://www.disinformatics.com/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.disinformatics.com/blog</link>
	<description>The opposite of opposite</description>
	<lastBuildDate>Sat, 18 Dec 2010 02:00:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>Comment on A Google Internship Interview Question in Scala by Farhan Mannan</title>
		<link>http://www.disinformatics.com/blog/2010/12/14/a-google-internship-interview-question-in-scala/#comment-320</link>
		<dc:creator>Farhan Mannan</dc:creator>
		<pubDate>Sat, 18 Dec 2010 02:00:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.disinformatics.com/blog/?p=670#comment-320</guid>
		<description>And there I was thinking &quot;I really need to learn Python!!&quot;</description>
		<content:encoded><![CDATA[<p>And there I was thinking &#8220;I really need to learn Python!!&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Google Internship Interview Question in Scala by Xiang Long</title>
		<link>http://www.disinformatics.com/blog/2010/12/14/a-google-internship-interview-question-in-scala/#comment-315</link>
		<dc:creator>Xiang Long</dc:creator>
		<pubDate>Thu, 16 Dec 2010 11:47:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.disinformatics.com/blog/?p=670#comment-315</guid>
		<description>Correct me if I&#039;m wrong but, I think there&#039;s a problem with that Python solution. It is not breaking out of the loop unless two numbers that sums to the target are found. It&#039;s not dealing with the fact that if no such numbers exist then the pointers will cross over. So either it will address the array out of bounds, or give an incorrect solution such as 11, 11 in the numbers [1, 2, 7, 11, 16, 17, 18] when the target is 22 because left will equal right, even though there is only one occurrence of 11.</description>
		<content:encoded><![CDATA[<p>Correct me if I&#8217;m wrong but, I think there&#8217;s a problem with that Python solution. It is not breaking out of the loop unless two numbers that sums to the target are found. It&#8217;s not dealing with the fact that if no such numbers exist then the pointers will cross over. So either it will address the array out of bounds, or give an incorrect solution such as 11, 11 in the numbers [1, 2, 7, 11, 16, 17, 18] when the target is 22 because left will equal right, even though there is only one occurrence of 11.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Google Internship Interview Question in Scala by mtrn</title>
		<link>http://www.disinformatics.com/blog/2010/12/14/a-google-internship-interview-question-in-scala/#comment-313</link>
		<dc:creator>mtrn</dc:creator>
		<pubDate>Wed, 15 Dec 2010 02:13:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.disinformatics.com/blog/?p=670#comment-313</guid>
		<description>Nice question. Here&#039;s a python version: http://gist.github.com/741526</description>
		<content:encoded><![CDATA[<p>Nice question. Here&#8217;s a python version: <a href="http://gist.github.com/741526" rel="nofollow">http://gist.github.com/741526</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Google Internship Interview Question in Scala by Xiang Long</title>
		<link>http://www.disinformatics.com/blog/2010/12/14/a-google-internship-interview-question-in-scala/#comment-312</link>
		<dc:creator>Xiang Long</dc:creator>
		<pubDate>Wed, 15 Dec 2010 01:58:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.disinformatics.com/blog/?p=670#comment-312</guid>
		<description>I think the &quot;structured approach&quot; you are referring to is analysing what specific problem the algorithm needs to solve and adapting to solve them, along with identifying and targeting the bottlenecks but trading-off performance in areas that may not be important. A lot of algorithm design is about striking a compromise between different criteria of performance (like special cases of input) with the hope that when the algorithm is used, the performance you gained will vastly outweigh the performance you traded away, or that the specific bad-behaving/unsolvable cases will infrequently/never occur. It seems that once satisfactory algorithms have been developed for a problem, it is very difficult to come up with an improved algorithm which beats everything else in every case, although often you can come up with a variation which performs better in some (more useful) cases.</description>
		<content:encoded><![CDATA[<p>I think the &#8220;structured approach&#8221; you are referring to is analysing what specific problem the algorithm needs to solve and adapting to solve them, along with identifying and targeting the bottlenecks but trading-off performance in areas that may not be important. A lot of algorithm design is about striking a compromise between different criteria of performance (like special cases of input) with the hope that when the algorithm is used, the performance you gained will vastly outweigh the performance you traded away, or that the specific bad-behaving/unsolvable cases will infrequently/never occur. It seems that once satisfactory algorithms have been developed for a problem, it is very difficult to come up with an improved algorithm which beats everything else in every case, although often you can come up with a variation which performs better in some (more useful) cases.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Google Internship Interview Question in Scala by Xiang Long</title>
		<link>http://www.disinformatics.com/blog/2010/12/14/a-google-internship-interview-question-in-scala/#comment-311</link>
		<dc:creator>Xiang Long</dc:creator>
		<pubDate>Wed, 15 Dec 2010 01:44:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.disinformatics.com/blog/?p=670#comment-311</guid>
		<description>Yes there&#039;s quite a lot of different properties and assumptions you can take advantage of on data sets which you can exploit to make algorithms faster. You can assume something about the distribution of the data, for example interpolation search performs in O(lg lgn) by guessing the input is uniformly distributed. I&#039;d imagine this would be quite useful in probabilistic algorithms as well. Minimax with ab-pruning makes the assumption that the expected player and opponent actions will always be rational, which it uses to cut away branches of the search tree. Assumptions on the expected order/frequency of operations could also lead to optimisations at least in amortised analysis, such as choosing the correct data structure to use if you expect a specific operation is going to be especially frequent (Djikstra&#039;s + Fibonacci heap is a classic example, along with splay trees + frequent access of a small subset of nodes).

There should be lots more which either I couldn&#039;t recall off-hand right now or is too advanced for me yet :)</description>
		<content:encoded><![CDATA[<p>Yes there&#8217;s quite a lot of different properties and assumptions you can take advantage of on data sets which you can exploit to make algorithms faster. You can assume something about the distribution of the data, for example interpolation search performs in O(lg lgn) by guessing the input is uniformly distributed. I&#8217;d imagine this would be quite useful in probabilistic algorithms as well. Minimax with ab-pruning makes the assumption that the expected player and opponent actions will always be rational, which it uses to cut away branches of the search tree. Assumptions on the expected order/frequency of operations could also lead to optimisations at least in amortised analysis, such as choosing the correct data structure to use if you expect a specific operation is going to be especially frequent (Djikstra&#8217;s + Fibonacci heap is a classic example, along with splay trees + frequent access of a small subset of nodes).</p>
<p>There should be lots more which either I couldn&#8217;t recall off-hand right now or is too advanced for me yet <img src='http://www.disinformatics.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Google Internship Interview Question in Scala by Farhan Mannan</title>
		<link>http://www.disinformatics.com/blog/2010/12/14/a-google-internship-interview-question-in-scala/#comment-310</link>
		<dc:creator>Farhan Mannan</dc:creator>
		<pubDate>Wed, 15 Dec 2010 01:16:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.disinformatics.com/blog/?p=670#comment-310</guid>
		<description>Thanks Xiang. 

There&#039;s sortedness (as in this case, or Graham scan), range (like the sorts you mention)...

... are there other powerful properties that are applicable to many data sets (you can sort data to make it sorted, you can partition data to make it into disjoint sets with new ranges attached - quicksort?) or am I barking up the wrong tree?

It must be an algorithm design pattern to look for preprocessing steps, or data structure considerations, that fundamentally alter asymptotic costs. There must be a more structured approach - I think that&#039;s what I&#039;m looking for.</description>
		<content:encoded><![CDATA[<p>Thanks Xiang. </p>
<p>There&#8217;s sortedness (as in this case, or Graham scan), range (like the sorts you mention)&#8230;</p>
<p>&#8230; are there other powerful properties that are applicable to many data sets (you can sort data to make it sorted, you can partition data to make it into disjoint sets with new ranges attached &#8211; quicksort?) or am I barking up the wrong tree?</p>
<p>It must be an algorithm design pattern to look for preprocessing steps, or data structure considerations, that fundamentally alter asymptotic costs. There must be a more structured approach &#8211; I think that&#8217;s what I&#8217;m looking for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Google Internship Interview Question in Scala by Xiang Long</title>
		<link>http://www.disinformatics.com/blog/2010/12/14/a-google-internship-interview-question-in-scala/#comment-309</link>
		<dc:creator>Xiang Long</dc:creator>
		<pubDate>Wed, 15 Dec 2010 01:08:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.disinformatics.com/blog/?p=670#comment-309</guid>
		<description>Sorting the data set allows you to make an assumption about the data (i.e. it&#039;s sorted) that can lead to an optimisation that is asymptotically better than if you can&#039;t make that assumption. This is the &quot;transformation&quot; you are talking about. In general an assumption about the data reduces the domain of the input into a subset which satisfies that assumption, allowing you to use a method which wouldn&#039;t work with more general data. This is quite common in algorithms. Binary search for example makes the assumption that the input is sorted and therefore never has to examine every element. Bucket sort or radix sort makes the assumption that the input is within a certain range or finite domain and sorts in linear time. Of course you are just making a trade-off that either restricts your inputs or makes the algorithm at least as complex as remodelling/sorting the data, which could actually be asymptotically more expensive than the &quot;real&quot; work.</description>
		<content:encoded><![CDATA[<p>Sorting the data set allows you to make an assumption about the data (i.e. it&#8217;s sorted) that can lead to an optimisation that is asymptotically better than if you can&#8217;t make that assumption. This is the &#8220;transformation&#8221; you are talking about. In general an assumption about the data reduces the domain of the input into a subset which satisfies that assumption, allowing you to use a method which wouldn&#8217;t work with more general data. This is quite common in algorithms. Binary search for example makes the assumption that the input is sorted and therefore never has to examine every element. Bucket sort or radix sort makes the assumption that the input is within a certain range or finite domain and sorts in linear time. Of course you are just making a trade-off that either restricts your inputs or makes the algorithm at least as complex as remodelling/sorting the data, which could actually be asymptotically more expensive than the &#8220;real&#8221; work.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

