<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="http://www.bytemycode.com/rssformat.xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>byteMyCode: Snippets for permutation</title>
		<link>http://www.bytemycode.com</link>
		<description>Snippets for this tag.</description>
		<pubDate>Thu, 20 Jun 2013 09:29:56 +0000</pubDate>
		<copyright>1998-2013 </copyright>
		<language>en-us</language>
		<image>
		      <link>http://www.bytemycode.com</link>
		      <url>http://www.bytemycode.com/img/rss_title.gif</url>
		      <title>byteMyCode</title>
		</image>

	<item>
	<title>Calculation number of permutations</title>
	<link>http://www.bytemycode.com/snippets/snippet/809/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/809/comments/</comments>
	<pubDate>Fri, 06 Jun 2008 18:28:42 +0000</pubDate>
	<dc:creator>Can</dc:creator>
	<category>lambda, permutation, python</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/809/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Fri. Jun. 6th, 2008  6:28 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/809/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_beginner.gif" align="middle" class="icon" alt="Beginner" /> <a href="http://www.bytemycode.com/members/member/Can/" title="Beginner">Can</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/lambda">lambda</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/permutation">permutation</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/python">python</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/809/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 2
			<p>First post here. Tried to get the most minimalistic way to calculate the amount of permutations. The typical formula is:<br /><br />n! = 1 * 2 * 3 ... * r * r + 1 * ... n<br />r! = 1 * 2 * 3 ... * r<br /><br />But since every number between 1 and r is simplified, it's just a multiplication of the (x)range between r+1 and n.<br /><br />Also as an example of lambda functions on python, and the reduce function, which takes every pair inside a list-type object and runs the function over them.</p>
		]]>
	</description>
</item>
	</channel>
</rss>