Posts Tagged ‘Add new tag’

How to get the biggest slice of pizza

Sunday, April 26th, 2009

It’s always a battle trying to eat enough pizza when it’s being shared between friends. It’s believed, in fact, to be the cause of the Crimean war.

But is there an optimal strategy to make sure you get the most pizza you can?

To date I have always followed a “take the biggest piece that’s left” strategy, but ruminating on this has led me to the following conclusion: taking the biggest piece still on the plate isn’t necessarily the best way to maximize the amount of pizza you eat.

Suppose a pizza, P, is sliced into n Slices, s1, …,  sn, ordered such that their areas a1, …, an form a decreasing sequence.  Also assume that the time taken to eat a slice is proportional to its area, i.e. tn = can. Further assume that everyone eats at the same speed and that there is a set polite interval – T – between one person taking a slice and the next person taking theirs.

We will concentrate on the smallest remaining slice and the largest.

Assume you take slice k (the largest remaining). Then the person who took a slice before you (presumably the largest available slice, if they play the traditional pizza game) has time tk + T = cak + T to finish his slice in order to guarantee he finishes before you, and therefore get to pick a bigger slice than you next time. The time it takes them to eat their slice is tk-1 = cak-1. So for him to get a bigger next slice than you:

cak-1 <cak + T
ak-1 -ak < T/c

However, if you take the smallest slice available instead of the largest this changes to

ak-1 -an < T/c

which, if the difference in size between slices is great,  is considerably less likely. Therefore you would be considerably more likely to get to choose before your predecessor next time, and thus securing a bigger slice should you show wish. Now you would have eaten slice an and picked another slice before he’s finished his first.

This strategy won’t always pay off though, and it’s difficult to judge when it would be effective. For instance, say there are very few slices available; If all slices are taken before you finish slice an then you lose out but, on the other hand, if you are the only person quick enough to finish their first slice in time to grab the one remaining slice after the first round, then you win.

It may be worth trying to write a computer model of.

Toolbarize incompatible with wordpress 2.7

Monday, March 23rd, 2009

I’ve just spent a  little time adding some useful sounding plug-ins (initially prompted by wanting an effective backlinking plug-in), one of which was the Wordpress Automatic Upgrade plug-in. So, with that installed I finally got around to upgrading wordpress and, to both my delight and dismay, wordpress has changed its admin screens layout since the last version I had (2.3 I think). It’s a much better design, but it does break toolbarize. In fact, it renders it unneccessary as the layout is much more user friendly and screen-space efficient, with scrolling not being no nearly so disruptive to the postying process.

However, it has inspired me to write a plug-in which makes perfect use of screen space by hiding things I very rarely use… or putting them in the footer. I could even make it so users can customise which screen elements are hidden.