BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


Uncategorized
Permutations of the values of N nodes
What is BEEP (BXXP)?
Family Tree maker
Alternative Ordering - ""Women and Children to the lifeboats first""
Meta-Patterns: Design Patterns Explained
XML Helper functions in Visual Basic
nodeset of child templates using document()
Converting INI files to XML
Table with more than one column
Create an N-Column Table from XML node-set
Fullxml 2
Randomization of node-sets or node-lists
Sorting the results and use the Axis
Finding the Maximum Date
TreeMaker
XMLEditor - WebClipping
RSS / RDF Newsfeed Reader
WDDX Parser
A Calendar, using the XSelerator's datetime library
Templx: x++ IDE Released!


 
 

<< System.XMLWCF, WS, SOAP >>


By Dimitre Novatchev
First Posted 01/03/2002
Times viewed 102

Combinations of k out of n numbers


Summary An XSLT implementation of an algorithm is presented for the generation of all combinations of k numbers out of n (k <= n).

From the online discussions: "Hey! If anyone can give me or direct me to a source of an algorytm to get all the combination of x numbers from y numbers without repeating numbers (I mean that if I want to get all the combination of 3 numbers from 5 the outcome will be 1,2,3 1,2,4 1,2,5 1,3,4 1,3,5 1,4,5 2,3,4 2,3,5 2,4,5 3,4,5) Thanks, Kfir." The solution is bellow. When the stylesheet is applied on any xml source, the result is: 1,2,3 1,2,4 1,2,5 1,3,4 1,3,5 1,4,5 2,3,4 2,3,5 2,4,5 3,4,5 Do enjoy, Dimitre Novatchev.

Additional information

Further additional information


Rate this article on a scale of 1 to 10 (0 votes, average 0)

Your vote :  

<< System.XMLWCF, WS, SOAP >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML