// Data Structure for the n-ary tree
struct node
{
int data;
node * child[m];
bool lockFlag; // Indicates if a node is locked or not
node *parent; //Holds the immediate parent of the node
int LockCount; //Holds how many nodes arrested this node
};
// Takes logm(N) in the worst
Hi Pete,
I think you are not permuting the elements. But rather you are looking
for combinations with repetition for a set of elements. The number of such
combinations would be n+r-1Cr where n is the number of the elements and r is
the number of elements we have to choose. So a combinatorial
we have many machines connected to each other. However, administering these
machines is a great hassle. That is because a machine can be administered
only by a machine connected directly to it (a machine that is an
administrator can administrator itself). So, the system administrators have