Movember: Day 23
After repeatedly hitting 40°C over the last week or so, today we have rain and temperatures around the 20 mark.
I maintain that Australia doesn’t have spring and autumn anymore. Summer and winter just dither into each other.
No commentsMovember: Day 22
Given all the talk of doing something goatee-like after Movember, I went on the market for a new razor. (I’ve pretty much always used disposables.)
Damn.
I was vaguely aware of the proliferation of razors boasting prowess in different realms you didn’t even know were relevant to shaving, but the extent of it hadn’t really struck home to me until I actually had to choose one. I ended up going with the Schick Quattro Titanium; partly because it has an “edging blade” which could be handy if we go the goatee route (and why have n blades when you can have n+1), but mostly, if I’m honest, because it was shiny. Also it looked less plastic-bulk-y than the others.
The first time I used it was borderline terrifying. This isn’t your “safety” razor. This is your “any part of your face that isn’t perfectly convex better have a bloody good reason” razor. I ended up looking like I’d been beaten by someone intent on getting an even coat of bruising around my neck… although I didn’t actually cut myself more than average. Whether all of this leads to a better shave is something I’ll have to determine once the novelty of the shiny not-quite-so-much-plastic-ness wears off.
No commentsThe birthday paradox, as applied to finding a matching pair of socks
Surely I’m not the first person to look at it this way. “Paradox” and “socks” even rhyme.
No commentsMovember: Day 21
Who’s reading this?
Who are you people who come here every day to look at the changes in my facial hair?
[checks site stats]
[looks up own IP address]
Ah. Never mind.
No commentsMovember: Day 20
I’ve started giving some consideration to what to do with my face after Movember. The easy answer is to grow back the full beard… but I’ve had that for years, and it feels like this was a good excuse to do something different.
At the moment I’m thinking maybe a goatee. That means it can roughly keep its current shape, but without quite so much bleeding from the chin.
No commentsMovember: Day 19
Ugh. The temperature has reached the mid-thirties for most of this week, and looks like it’ll easily do it again today.
At least the air conditioning in the office is working. That’s unusual at the best of times, but this would be a really bad day for it to give up.
Also, my current relative lack of facial hair turns out to be a good thing in hot weather. Who’da thunk it? Maybe the timing of Movember isn’t a complete coincidence, at least in the southern hemisphere.
No commentsMovember: Day 18
Okay, yesterday – this is important everyone – yesterday at work I actually did, in real life, the Frodo-flipping-the-ring-in-the-air-and-catching-it-on-one-finger thing.
With witnesses.
And then, after a few tries, I did it again. Which actually (according to DMM at least) makes it less of an achievement – if I’d done it once it would be a billion-to-one fluke; doing it twice shows that it’s easy.
Also, I spun it flat (around the y axis) instead of end-over-end (around the x axis). That may have had something to do with why it was… you know, possible at all.
No commentsMovember: Day 17
I’ve reached the conclusion that nobody can tell if your facial hair is asymmetrical. There are very few times during the course of normal social interaction that you stare at someone dead-on and don’t move your head for long enough for them to compare the sides of your face, and they stare back at you long enough to notice.
Maybe if you were gazing lovingly at someone over a romantic dinner, maybe, they might get a chance to weigh up your facial hair.
That’s probably the main reason that fancy restaurants have dim lighting.
No commentsTournaments as sorting algorithms
From a discussion in our Magic group…
You can think of a tournament as a sorting algorithm for ordering the players by skill, where each match is a comparison.
There are a couple of differences:
- Many tournaments only determine a partial ordering – for example, if it’s only looking for a winner.
- Comparisons between two players aren’t guaranteed to be consistent. One player could beat another in one match and lose to the same player in another match; or you could have a scissors-paper-rock type of cycle between three or more players.
For current purposes, we can ignore the first difference and only talk about tournaments where the goal is to rank all the players.
The second point is more interesting. A sorting algorithm assumes that there’s a complete order over the elements, which there isn’t in this case. We could either make it somehow resilient to noise, or find some way to break cycles, all of which is complicated. Or we could let the algorithm do whatever comparisons it does, and if it happens to be inconsistent with previous results then hopefully it’ll be resilient to it somehow. (In the worst case, a dumb-ass algorithm like a naive bubble sort might not terminate.)
Or – and this is why I’ve been thinking about it since this afternoon – we could only make comparisons for which we can’t already infer an answer.
This has some advantages. It means that we can never reach a contradiction where one player beat another but ended up ranked lower than them. It puts a natural limit on the length of the tournament, because the more matches you play, the more potential match-ups become redundant, until there are none left. It might mean that a player can get an unusually low ranking from a bad match-up early on, but that will tend to happen in a scissors-paper-rock sort of situation where no ranking is going to be consistent anyway, so one solution will be as good as any.
So, some solutions that came to mind…
A quicksort tournament would start by choosing one person as the pivot. Everyone plays a match against that person. Then the other players split off into two pools – those who beat the person, and those who didn’t. (Let’s assume there are no draws.) Each of those pools chooses another pivot and repeats until everyone is either a pivot or in a pool by themselves.
There’s an obvious downside to this in, for example, Friday night Magic – the first pivot has to play at least two matches (if those two players either both win or both lose) before anyone else can do anything. Another downside is that there’s a lot of variation in how many matches each person plays – the first pivot plays n-1 matches, but someone else could potentially only play one match (if they’re the only one who beats or is beaten by the first pivot).
(Actually this isn’t necessarily a bad thing for our Magic tournaments – the conversation started with someone pointing out that we have different amounts of free time to play with – but it would be nice the variation wasn’t too big. It would be even nicer if you could direct the extra matches towards people with more time to play.)
A merge sort tournament would avoid some of the first problem – players would pair off at the start of the night, and bottlenecks only start happening at the end of the first round. It still has the varying number of matches problem though. So our ideal sorting algorithm for a tournament would:
- be able to do lots of comparisons in parallel,
- do about the same number of comparisons on each element, and
- not compare elements if it could infer their order.
The first and third constraints are tricky once it gets going – you can’t have multiple matches running in parallel that could potentially give contradictory results. One approach for small numbers of players might be to brute-force it – keep a directed graph of players and schedule matches for which (a) there currently isn’t a path in either direction and (b) there won’t be a path in either direction for any of combination of outcomes of the games currently running. I actually started coding this when I got home, but was quickly distracted by something less confusing.
I gotta break out my Knuth vol. 2…
No comments









