## About Gift Optimizer

A tremendous amount of work has been devoted to this project. The challenge was to build a calculator that would not only mathematically perform the optimization the correct way, but also accomplish it and return the results in the shortest time possible.

Simple optimizations typically use fractional numbers. They often have smooth objective functions. Essentially you can think of it as the mathematical equivalent of a hill. You keep going up until you reach the top, at which point you have reached the maximum. Our problem is that you can't have half a gift. So this smooth, continuous experience doesn't really exist. You can only be allocated a whole gift. Hence, many optimizers will perform the optimization using the fractional approach, and then they adjust the results by rounding up and/or down the solution at the end, in order to ensure that whole gifts are allocated appropriately. Whilst it makes the math simpler, this process typically yields incorrect and erroneous results.

We do perform the optimization the right way. Gift Optimizer knows that you deserve the best and because of this we insist on giving it to you. Gift Optimizer only deals with whole gifts, not fractions, making the behind the scenes calculations much more complex, but accurate.

Math is not the only challenge. Due to the number of possible permutations, finding that one, or a handful of optimal solutions, that satisfy all of the constraints amongst the quadrillions of distinct arrangements, within a limited amount of time can be tricky. Hence from a computational standpoint, the code must itself be optimized to perform at the maximum speed in order to find your solution. Sure, given enough time and CPU we could theoritically find any solution. However, life is full of constraints and therefore we must make the best and most effective use of the resources at hand.

We hope you enjoy using Gift Optimizer as much as we enjoyed making it!