<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for Codex Logica</title>
	<atom:link href="http://codexlogica.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://codexlogica.com</link>
	<description>Seldon Warned Us, Get Cracking</description>
	<lastBuildDate>Mon, 19 Jul 2010 18:25:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>Comment on Project Euler: Problem 1 Constant Time by Shirish Munshi</title>
		<link>http://codexlogica.com/2010/01/06/project-euler-problem-1-constant-time/#comment-42</link>
		<dc:creator>Shirish Munshi</dc:creator>
		<pubDate>Mon, 19 Jul 2010 18:25:56 +0000</pubDate>
		<guid isPermaLink="false">http://codexlogica.com/?p=17#comment-42</guid>
		<description>Hello Sir, 

I was going through your blog and found the problem interesting. 

An alternative solution to your constant time algorithm could be the use of sum of an arithmetic progression series. I think its pretty similar to the solution you suggested.

Finding the sum is like series of two numbers:

A (multiples of 3)= 3,6,9,12,15.........An; where n is the number of terms in the series

B (multiples of 5)= 5,10,15,20,25,30.......Bn

where Sum of a finite series= (n/2)*(2*first_term+(n-1)diff.) 

So, considering an example;

Case 1: Series A(multiples of 3 between 1-10): 3,6,9

No. of terms=3

Sum = (3/2)* [2*3+(3-1)*3]
    = 18

Case 2: Series B: 5, 10, 15, 20

No. of terms = 4

Sum = (4/2) * [2*5+(4-1)*5]
    = 2 * 25
    = 50
   
This way, the modification looks like;

limit=999
threes=sum_ap(limit,3);
fives=sum_ap(limit,5);

where 
int sum_ap(limit, n)
{ fact=limit/n;
  Sum=(fact/2)* [2*n + (fact-1)*n];
  return Sum;
}

And, the final output would be
threes+fives-fifteen

Thanks,

Shirish</description>
		<content:encoded><![CDATA[<p>Hello Sir, </p>
<p>I was going through your blog and found the problem interesting. </p>
<p>An alternative solution to your constant time algorithm could be the use of sum of an arithmetic progression series. I think its pretty similar to the solution you suggested.</p>
<p>Finding the sum is like series of two numbers:</p>
<p>A (multiples of 3)= 3,6,9,12,15&#8230;&#8230;&#8230;An; where n is the number of terms in the series</p>
<p>B (multiples of 5)= 5,10,15,20,25,30&#8230;&#8230;.Bn</p>
<p>where Sum of a finite series= (n/2)*(2*first_term+(n-1)diff.) </p>
<p>So, considering an example;</p>
<p>Case 1: Series A(multiples of 3 between 1-10): 3,6,9</p>
<p>No. of terms=3</p>
<p>Sum = (3/2)* [2*3+(3-1)*3]<br />
    = 18</p>
<p>Case 2: Series B: 5, 10, 15, 20</p>
<p>No. of terms = 4</p>
<p>Sum = (4/2) * [2*5+(4-1)*5]<br />
    = 2 * 25<br />
    = 50</p>
<p>This way, the modification looks like;</p>
<p>limit=999<br />
threes=sum_ap(limit,3);<br />
fives=sum_ap(limit,5);</p>
<p>where<br />
int sum_ap(limit, n)<br />
{ fact=limit/n;<br />
  Sum=(fact/2)* [2*n + (fact-1)*n];<br />
  return Sum;<br />
}</p>
<p>And, the final output would be<br />
threes+fives-fifteen</p>
<p>Thanks,</p>
<p>Shirish</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on I like coding. I hate shipping software. by Ava Wilson</title>
		<link>http://codexlogica.com/2010/02/23/i-like-coding-i-hate-shipping-software/#comment-41</link>
		<dc:creator>Ava Wilson</dc:creator>
		<pubDate>Wed, 28 Apr 2010 23:29:25 +0000</pubDate>
		<guid isPermaLink="false">http://codexlogica.com/?p=41#comment-41</guid>
		<description>I like coding, but I really like shipping software. Sorry, but I disagree with this post. I prefer to see my hard work go to use, and the only real way to do that is by shipping a product.

I&#039;m far more proud of a polished, well-rounded product than a piece of nice code.</description>
		<content:encoded><![CDATA[<p>I like coding, but I really like shipping software. Sorry, but I disagree with this post. I prefer to see my hard work go to use, and the only real way to do that is by shipping a product.</p>
<p>I&#8217;m far more proud of a polished, well-rounded product than a piece of nice code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on I like coding. I hate shipping software. by Su Shen</title>
		<link>http://codexlogica.com/2010/02/23/i-like-coding-i-hate-shipping-software/#comment-38</link>
		<dc:creator>Su Shen</dc:creator>
		<pubDate>Wed, 17 Mar 2010 10:09:53 +0000</pubDate>
		<guid isPermaLink="false">http://codexlogica.com/?p=41#comment-38</guid>
		<description>“Real artists ship.”</description>
		<content:encoded><![CDATA[<p>“Real artists ship.”</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on I like coding. I hate shipping software. by leonard_man</title>
		<link>http://codexlogica.com/2010/02/23/i-like-coding-i-hate-shipping-software/#comment-30</link>
		<dc:creator>leonard_man</dc:creator>
		<pubDate>Mon, 01 Mar 2010 11:57:14 +0000</pubDate>
		<guid isPermaLink="false">http://codexlogica.com/?p=41#comment-30</guid>
		<description>That&#039;s why Onan never married.... ;)</description>
		<content:encoded><![CDATA[<p>That&#8217;s why Onan never married&#8230;. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on I like coding. I hate shipping software. by Trey Stout</title>
		<link>http://codexlogica.com/2010/02/23/i-like-coding-i-hate-shipping-software/#comment-27</link>
		<dc:creator>Trey Stout</dc:creator>
		<pubDate>Fri, 26 Feb 2010 18:54:23 +0000</pubDate>
		<guid isPermaLink="false">http://codexlogica.com/?p=41#comment-27</guid>
		<description>Nah this template is a standard option for WordPress blogs. Alas, I am not much of a visual designer.</description>
		<content:encoded><![CDATA[<p>Nah this template is a standard option for WordPress blogs. Alas, I am not much of a visual designer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on I like coding. I hate shipping software. by Jay Buente</title>
		<link>http://codexlogica.com/2010/02/23/i-like-coding-i-hate-shipping-software/#comment-26</link>
		<dc:creator>Jay Buente</dc:creator>
		<pubDate>Fri, 26 Feb 2010 16:17:57 +0000</pubDate>
		<guid isPermaLink="false">http://codexlogica.com/?p=41#comment-26</guid>
		<description>Hi, possibly i&#039;m being a slightly off topic here, but I was browsing your site and it looks stimulating.  I&#039;m making a blog and trying to make it look clean, but everytime I touch it I mess something up.  Did you design the blog yourself? Could someone with little experience do it, and add updates without messing it up? Anyways, good information on here, very useful.</description>
		<content:encoded><![CDATA[<p>Hi, possibly i&#8217;m being a slightly off topic here, but I was browsing your site and it looks stimulating.  I&#8217;m making a blog and trying to make it look clean, but everytime I touch it I mess something up.  Did you design the blog yourself? Could someone with little experience do it, and add updates without messing it up? Anyways, good information on here, very useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on I like coding. I hate shipping software. by Top Posts &#8212; WordPress.com</title>
		<link>http://codexlogica.com/2010/02/23/i-like-coding-i-hate-shipping-software/#comment-24</link>
		<dc:creator>Top Posts &#8212; WordPress.com</dc:creator>
		<pubDate>Fri, 26 Feb 2010 00:07:05 +0000</pubDate>
		<guid isPermaLink="false">http://codexlogica.com/?p=41#comment-24</guid>
		<description>[...]  I like coding. I hate shipping software. It only took me 12 years to figure this out. [...]</description>
		<content:encoded><![CDATA[<p>[...]  I like coding. I hate shipping software. It only took me 12 years to figure this out. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on I like coding. I hate shipping software. by PM Hut</title>
		<link>http://codexlogica.com/2010/02/23/i-like-coding-i-hate-shipping-software/#comment-20</link>
		<dc:creator>PM Hut</dc:creator>
		<pubDate>Wed, 24 Feb 2010 17:58:41 +0000</pubDate>
		<guid isPermaLink="false">http://codexlogica.com/?p=41#comment-20</guid>
		<description>I don&#039;t think the issue is in your Project Management skills, but your immediate prioritization (which is related to motivation). It&#039;s probably much easier to motivate others than to motivate one&#039;s self, especially when it comes to your own projects (that may or may not make money).</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think the issue is in your Project Management skills, but your immediate prioritization (which is related to motivation). It&#8217;s probably much easier to motivate others than to motivate one&#8217;s self, especially when it comes to your own projects (that may or may not make money).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on I like coding. I hate shipping software. by Rahul J</title>
		<link>http://codexlogica.com/2010/02/23/i-like-coding-i-hate-shipping-software/#comment-19</link>
		<dc:creator>Rahul J</dc:creator>
		<pubDate>Wed, 24 Feb 2010 14:34:09 +0000</pubDate>
		<guid isPermaLink="false">http://codexlogica.com/?p=41#comment-19</guid>
		<description>Damn right! Damn Right!

Oh someone already said that.. programmers mind it tell ya!</description>
		<content:encoded><![CDATA[<p>Damn right! Damn Right!</p>
<p>Oh someone already said that.. programmers mind it tell ya!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on I like coding. I hate shipping software. by kl</title>
		<link>http://codexlogica.com/2010/02/23/i-like-coding-i-hate-shipping-software/#comment-18</link>
		<dc:creator>kl</dc:creator>
		<pubDate>Wed, 24 Feb 2010 09:53:20 +0000</pubDate>
		<guid isPermaLink="false">http://codexlogica.com/?p=41#comment-18</guid>
		<description>Shipping, if successful, has good side too: happy users.

I wish there were groupies too, but unfortunately programming is not that kind of business ;(</description>
		<content:encoded><![CDATA[<p>Shipping, if successful, has good side too: happy users.</p>
<p>I wish there were groupies too, but unfortunately programming is not that kind of business ;(</p>
]]></content:encoded>
	</item>
</channel>
</rss>
