Discrete math structures and functions