Mathematical Methods for Optimal Resource Allocation in Common-Pool Resources