Discrete mathematics with applications