Thursday, January 31, 2008

The Mathmatics of Office Pizza

Step One:
Decide who's going to eat pizza, and how much they could eat.

Step Two:
Determine sizes:

diameter = 2r
PI = 3.14
area_of_pizza = PIr^2


DiameterArea (square inches)
963.585
12113.04
15176.625
18254.34


People:

person_consumption = quantity * PIr2

Person QTY Size Square Inches
James 1 12 113.04
Kevin 1.25 12 141.3
Laurie 0.75 12 84.78
Yuxin 0.75 12 84.78
Dan 1 12 113.04
Vandana 0.5 12 56.52
Vishal 1 9 63.585
Nick 0.5 12 56.52
Robby 0.75 12 84.78
Jo 0.75 12 84.78
Sven 0.75 12 84.78

Total Consumption = 883.125, Average: 80.2



Question:
Do we get either:
3 * 18 inch + 1 * 15 inch
3 * 18 inch + 12 inch

And which one do we make (an 18 or 15 inch) a vegetarian (Vandana/Vishal require this)?



Proposed Solution:
* Feed Vandana + Vishal first and foremost of a 15 inch family pizza
* Everyone else fights tooth and nail for the remained

3 Party 763.02
1 Family 176.625
Total: 939.645


3 Party 763.02
1 Large 113.04
Total: 876.06


result = 3*18 inch + 15 inch pizza; // 939.645
leftovers = result - total_consumption; // 939.645 - 883.125 = ~56 square inches of leftover pizza.


Assuming crust and extra hungryness, we should be bang on target!

Results after lunch

No comments: