dear all,
are there any built-in functions in Tcl where we can achieve nPr and nCr, i.e, permutations and combinations. if not what is the best way to do? cud any one give me some info where we can find this kind of recursive procedures.
for example, if I give 3 as input to the proc, I want to get 1,12,123,13,2,23,3 as output. that means for n I have pow(2,n)-1 combinations.
thanx a lot.
Raj.
are there any built-in functions in Tcl where we can achieve nPr and nCr, i.e, permutations and combinations. if not what is the best way to do? cud any one give me some info where we can find this kind of recursive procedures.
for example, if I give 3 as input to the proc, I want to get 1,12,123,13,2,23,3 as output. that means for n I have pow(2,n)-1 combinations.
thanx a lot.
Raj.