<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 algorithm - Channel 8</title><atom:link rel="self" type="application/rss+xml" href="http://channel8.msdn.com/tags/algorithm/feed/zune/default.aspx" /><image><url>http://mschnlnine.vo.llnwd.net/d1//App_Themes/Channel8/images/feedimage.png</url><title>Entries tagged with algorithm - Channel 8</title><link>http://channel8.msdn.com/Tags/Algorithm/</link></image><description>algorithm</description><link>http://channel8.msdn.com/Tags/Algorithm/</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.3121.26304, 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="true">http://channel8.msdn.com/Posts/Puzzle-series-Summation-of-Four-Primes/</guid><evnet:views>2234</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="true">http://channel8.msdn.com/Posts/Switching-our-Christmas-tree-bulbs/</guid><evnet:views>2057</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><item><title>Fascinating algorithm to resize pictures</title><description>&lt;img src="http://channel8.msdn.com/Link/6f3c5240-5eeb-40ed-9898-8fbdd02c202e/" border="0" /&gt;&lt;p&gt;
				&lt;a href="http://www.faculty.idc.ac.il/arik/" target="_blank"&gt;Dr. Ariel Shamir&lt;/a&gt; from &lt;a href="http://www.idc.ac.il/cs" target="_blank"&gt;Efi Arazi School of Computer Science&lt;/a&gt; is one of the co-inventors of a clever algorithm to resize images. Usually if you have an image that is to big in size you crop or resize it. Now if you resize it, important information might get lost because some pieces in the picture are getting to tiny that you&amp;nbsp;can't&amp;nbsp;see them anymore (they might even get at a sub pixel level where they are merged with other pixels). On the other hand if you crop the image, parts are missing completely. That could also include important information! Another problem would be&amp;nbsp;two hot spots in an image: you would need to crop and merge the two pieces somehow, which isn't always an easy task.&lt;/p&gt;
&lt;p&gt;Now the people around Dr. Shamir invented a way to resize pictures without losing important details. They have&amp;nbsp;&lt;a href="http://www.youtube.com/watch?v=qadw0BRKeMk" target="_blank"&gt;published&amp;nbsp;a video&lt;/a&gt; on how their algorithm works. The paper describing the whole algorithm and ideas is found &lt;a href="http://www.faculty.idc.ac.il/arik/imret.pdf" target="_blank"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A&amp;nbsp;few days ago Dr. Shamir has been hired by Adobe. Wouldn't it&amp;nbsp;be very cool if&amp;nbsp;we would&amp;nbsp;get the algorithm as&amp;nbsp;a feature in one of the next Photoshop versions?&lt;/p&gt;&lt;img src="http://channel8.msdn.com/205/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel8.msdn.com/Posts/Fascinating-algorithm-to-resize-pictures/</comments><link>http://channel8.msdn.com/Posts/Fascinating-algorithm-to-resize-pictures/</link><pubDate>Wed, 29 Aug 2007 15:37:00 GMT</pubDate><guid isPermaLink="true">http://channel8.msdn.com/Posts/Fascinating-algorithm-to-resize-pictures/</guid><evnet:views>3721</evnet:views><evnet:viewtrackingurl>http://channel8.msdn.com/205/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>	Dr. Ariel Shamir from Efi Arazi School of Computer Science is one of the co-inventors of a clever algorithm to resize images. Usually if you have an image that is to big in size you crop or resize it. Now if you resize it, important information might get lost because some pieces in the picture are&amp;#8230;</evnet:previewtext><media:thumbnail url="http://channel8.msdn.com/Link/0c1ada08-df8c-4017-8d11-3a0a32bb92f7/" height="240" width="320" /><media:thumbnail url="http://channel8.msdn.com/Link/6f3c5240-5eeb-40ed-9898-8fbdd02c202e/" height="64" width="85" /><dc:creator>littleguru</dc:creator><slash:comments>4</slash:comments><wfw:commentRss>http://channel8.msdn.com/Posts/Fascinating-algorithm-to-resize-pictures/RSS/</wfw:commentRss><trackback:ping>http://channel8.msdn.com/205/Trackback.aspx</trackback:ping><category>Algorithm</category><category>Pictures</category></item></channel></rss>