Leave it to UCLA's Science and Food organization to ascertain, using science and math, what it takes to build the perfect gingerbread house. The organization cheerfully posits that "you don't have to be an engineer or an architect" to build the perfect gingerbread house. We beg to differ.
1. The cookie walls and roof: "Gingerbread should be sturdy and demonstrate elasticity, which is the measure of its ability to resist deformation. Because the gingerbread walls will be under stress from the roof, there needs to be sufficient resistance to avoid cracking or total collapse."
2. In the icing department, egg whites are key: "Stiffer peaks are better for gingerbread icing, and more coagulated proteins can contribute to a stronger paste."
3. Consider gravity when constructing your gingerbread house: "To avoid collapse, it is best to spread out the forces over many surfaces. For example, a wider structure with a flatter rooftop will be sturdier than a narrow house with a sloping roof." Here's a geometric diagram explaining the forces at play.
4. Finally, buckling can be a real problem. So use math:
5. If all else fails, consult Martha Stewart.