Latest recipes tagged "permutation"http://code.activestate.com/recipes/tags/permutation/new/2016-06-11T08:42:41-07:00ActiveState Code RecipesPermutations by recursive Heap's method (Batch) 2016-06-11T08:42:41-07:00Antoni Gualhttp://code.activestate.com/recipes/users/4182514/http://code.activestate.com/recipes/580678-permutations-by-recursive-heaps-method/ <p style="color: grey"> Batch recipe 580678 by <a href="/recipes/users/4182514/">Antoni Gual</a> (<a href="/recipes/tags/permutation/">permutation</a>, <a href="/recipes/tags/recursion/">recursion</a>). </p> <p>Setlocal / endlocal allow for recursion in batch. Values can be passed by value and by reference, the later can return a value to the caller.</p> Permutation and combination using recursive generator (Python) 2011-10-04T05:44:19-07:00Shao-chuan Wanghttp://code.activestate.com/recipes/users/4168519/http://code.activestate.com/recipes/577890-permutation-and-combination-using-recursive-genera/ <p style="color: grey"> Python recipe 577890 by <a href="/recipes/users/4168519/">Shao-chuan Wang</a> (<a href="/recipes/tags/combinatorics/">combinatorics</a>, <a href="/recipes/tags/generators/">generators</a>, <a href="/recipes/tags/permutation/">permutation</a>, <a href="/recipes/tags/recursion/">recursion</a>). Revision 2. </p> <p>This recipes demonstrates how to use recursive generator to implement permutation and combination.</p> get all possible combinations of characters given a string (Python) 2011-08-15T04:15:42-07:00Yanghttp://code.activestate.com/recipes/users/4178968/http://code.activestate.com/recipes/577842-get-all-possible-combinations-of-characters-given-/ <p style="color: grey"> Python recipe 577842 by <a href="/recipes/users/4178968/">Yang</a> (<a href="/recipes/tags/algorithms/">algorithms</a>, <a href="/recipes/tags/permutation/">permutation</a>, <a href="/recipes/tags/string/">string</a>). </p> <p>This will give a result that is more than a permutation, but all possible combinations. An example is when input is 'abc', the output would be: a,ab,abc,ac,acb,b,ba,bac,bc,bca,c,ca,cab,cb,cba</p>