configs function

Construct configurations of discrete variables