<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:evnet="http://www.mscommunities.com/rssmodule/"><channel><title>Entries tagged with puzzles - Channel 8</title><atom:link rel="self" type="application/rss+xml" href="http://channel8.msdn.com/tags/puzzles/feed/zune/default.aspx" /><image><url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/Channel8/images/feedimage.png</url><title>Entries tagged with puzzles - Channel 8</title><link>http://channel8.msdn.com/Tags/puzzles/</link></image><description>puzzles</description><link>http://channel8.msdn.com/Tags/puzzles/</link><language>en-us</language><pubDate>Sat, 05 Jan 2008 18:28:42 GMT</pubDate><lastBuildDate>Sat, 05 Jan 2008 18:28:42 GMT</lastBuildDate><generator>EvNet (EvNet, Version=1.0.3229.2473, Culture=neutral, PublicKeyToken=null)</generator><item><title>Puzzle series: Addition of Four Primes</title><description>&lt;img src="http://channel8.msdn.com/Link/527e0084-d34a-436b-a5bf-0e15620321d8/" border="0" /&gt;Ok, after a vacation week I am back, this is my first post of 2008 and also my first post with the new look&amp;amp;feel of the website. I wish all of you a Happy New Year and also hope you like the new website design...&lt;br /&gt;&lt;br /&gt;Let's continue on our series about&amp;nbsp;Algorithms and Math puzzles. I want to propose you to take a look at &lt;a href="http://en.wikipedia.org/wiki/Prime_numbers" target="_blank"&gt;prime numbers&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;There are some conjectures that state properties of these numbers. One of those conjectures is the &lt;a href="http://en.wikipedia.org/wiki/Waring%27s_problem" target="_blank"&gt;Waring's prime number conjecture&lt;/a&gt;, it states that every odd integer is either prime or the sum of three primes.&lt;br /&gt;&lt;br /&gt;Probably, the most famous conjecture about prime numbers is the &lt;a href="http://en.wikipedia.org/wiki/Goldbach%27s_conjecture" target="_blank"&gt;Goldbach's Conjecture&lt;/a&gt;, and claims that every even integer is the sum of two primes.&lt;br /&gt;&lt;br /&gt;Both problems have been studied for over 200 years...&lt;br /&gt;&lt;br /&gt;In this problem, you have a little different task: &lt;em&gt;&lt;strong&gt;You have to find a way to express a given integer as the sum of four primes (exactly four).&lt;br /&gt;&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;Consider an input of an integer (n&amp;lt;10000000), you should return a list with the four prime numbers. If it is impossible to represent that, you can give as output any illogical result (i.e: -1 -1 -1 -1)&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Input&lt;/strong&gt;: 24&lt;br /&gt;&lt;strong&gt;Output&lt;/strong&gt;: 3 11 3 7&lt;br /&gt;&lt;br /&gt;As you can see, you can repeat prime numbers as factors for a given input, and it does not matter if the list of factors is ordered or not. &lt;br /&gt;&lt;br /&gt;What kind of algorithm would you implement? Is it efficient? Remember: Most powerful weapons of human's mind are Mathematics and Logic ;-)&lt;br /&gt;&lt;br /&gt;Enjoy and comment, good luck folks! :-)&lt;img src="http://channel8.msdn.com/1002/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel8.msdn.com/Posts/Puzzle-series-Summation-of-Four-Primes/</comments><link>http://channel8.msdn.com/Posts/Puzzle-series-Summation-of-Four-Primes/</link><pubDate>Sat, 05 Jan 2008 15:28:00 GMT</pubDate><guid isPermaLink="false">http://channel8.msdn.com/Posts/Puzzle-series-Summation-of-Four-Primes/</guid><evnet:views>3725</evnet:views><evnet:viewtrackingurl>http://channel8.msdn.com/1002/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Ok, after a vacation week I am back, this is my first post of 2008 and also my first post with the new look&amp;amp;feel of the website. I wish all of you a Happy New Year and also hope you like the new website design...&lt;br /&gt;&lt;br /&gt;Let's continue on our series about algorithms and Math puzzles. I want to propose you to take a look at prime numbers. &lt;br /&gt;</evnet:previewtext><media:thumbnail url="http://channel8.msdn.com/Link/58d48b79-186b-49da-9699-f34e07a4a632/" height="240" width="320" /><media:thumbnail url="http://channel8.msdn.com/Link/527e0084-d34a-436b-a5bf-0e15620321d8/" height="64" width="85" /><dc:creator>Miguel</dc:creator><slash:comments>14</slash:comments><wfw:commentRss>http://channel8.msdn.com/Posts/Puzzle-series-Summation-of-Four-Primes/RSS/</wfw:commentRss><trackback:ping>http://channel8.msdn.com/1002/Trackback.aspx</trackback:ping><category>Algorithm</category><category>Maths</category><category>puzzles</category></item><item><title>Switching our Christmas tree bulbs</title><description>&lt;img src="http://channel8.msdn.com/Link/79ddab6d-95b8-466a-9a58-d13d7114dc23/" border="0" /&gt;&lt;p&gt;Hi there,&lt;br /&gt;&lt;br /&gt;I want to propose you a kind of algorithm/mathematics problem, mixed with some fun related with this Christmas period... :-)&lt;br /&gt;&lt;br /&gt;Imagine&amp;nbsp;that you have a big Christmas tree with&amp;nbsp;365&amp;nbsp;light bulbs, each one with a switch, tagged with correlative numbers from 1 to 365. During December 25th on 2006,&amp;nbsp;you looked at&amp;nbsp;the tree&amp;nbsp;and saw all lights OFF, so&amp;nbsp;you decided to switch them but in a particular way. &lt;br /&gt;&lt;br /&gt;Each day of the year (assuming 365 days)&amp;nbsp;you would change the state of each switch just one time, according to a certain rule. The rule is that &lt;em&gt;during the day “n” I will only switch those bulbs tagged with a number multiple of this “n” value.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Giving you an example to clarify this criteria: &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1&lt;sup&gt;st&lt;/sup&gt; day: All bulbs multiple of 1. So, all bulbs. (the tree was beautiful that night,&amp;nbsp;completely lightened)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2&lt;sup&gt;nd&lt;/sup&gt; day: All bulbs multiple of 2. So… #2, #4, #6, #8… (notice that this day all bulbs multiple of 2 were switched off)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;3&lt;sup&gt;rd&lt;/sup&gt; day: All bulbs multiple of 3. So… #3, #6, #9…&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Last day: All bulbs multiple of 365. So… only the #365.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;Assuming that anything strange happens and nobody except you&amp;nbsp;touches the switchs, which bulbs will be ON today? How would you determine it?&lt;br /&gt;&lt;br /&gt;Merry Christmas from the whole Channel 8 Team :-)&lt;br /&gt;&lt;img src="http://channel8.msdn.com/808/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel8.msdn.com/Posts/Switching-our-Christmas-tree-bulbs/</comments><link>http://channel8.msdn.com/Posts/Switching-our-Christmas-tree-bulbs/</link><pubDate>Wed, 26 Dec 2007 00:55:00 GMT</pubDate><guid isPermaLink="false">http://channel8.msdn.com/Posts/Switching-our-Christmas-tree-bulbs/</guid><evnet:views>2170</evnet:views><evnet:viewtrackingurl>http://channel8.msdn.com/808/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Hi there,&lt;br /&gt;&lt;br /&gt;I want to propose you a kind of algorithm/mathematics problem, mixed with some fun related with this Christmas period... &lt;img src='/emoticons/C9/emotion-1.gif' alt='Smiley' /&gt;</evnet:previewtext><media:thumbnail url="http://channel8.msdn.com/Link/ead3f3ec-a1de-4cea-bf73-cd239d10ebdc/" height="240" width="320" /><media:thumbnail url="http://channel8.msdn.com/Link/79ddab6d-95b8-466a-9a58-d13d7114dc23/" height="64" width="85" /><dc:creator>Miguel</dc:creator><slash:comments>12</slash:comments><wfw:commentRss>http://channel8.msdn.com/Posts/Switching-our-Christmas-tree-bulbs/RSS/</wfw:commentRss><trackback:ping>http://channel8.msdn.com/808/Trackback.aspx</trackback:ping><category>Algorithm</category><category>puzzles</category></item></channel></rss>