# Category Archives: algorithms

## Counting coins

This afternoon, Matt Locke tweeted the following problem from his nine-year-old daughter’s maths homework:

Posted in algorithms, Mathematics | 14 Comments

## Revisiting “On editing text”

This document is an incomplete draft. About two years ago I wrote about a category-theoretic treatment of collaborative text editing. That post is unique in the history of Bosker Blog in having been cited – twice so far that I know … Continue reading

Posted in algorithms, category theory, Mathematics | 3 Comments

## The bicycle lock problem

Don’t lock your bicycle with a combination lock. Someone will steal it: I learnt this the hard way. It’s quite easy to open a combination lock by feel, without knowing the combination. Try it: with a bit of practice, you … Continue reading

Posted in algorithms, Mathematics | 4 Comments

## Beyond Bézier curves

There is a new feature of Pages and Keynote, not mentioned in any of Apple’s publicity nor in any press coverage I’ve seen, that is really very interesting. Perhaps it will even one day prove to have been revolutionary, in … Continue reading

Posted in algorithms, Mathematics | Tagged , , | 23 Comments

## “Venn diagram” partitioning

Paddy3118 wrote about partitioning elements in the same way a Venn diagram does. So, if we have sets A, B and C, the partitions are

Posted in algorithms, chatter | 1 Comment

## On editing text

Editing text is the opposite of handling exceptions; or, to put it another way, editing text is like exception handling but backwards in time. I realise this is an unexpected claim, so I hope you will permit me to explain. … Continue reading

Posted in algorithms, category theory | 17 Comments

## Something I don’t understand about homomorphic encryption

Added later: In retrospect, now I know a little more about cryptography, I can see that my confusion here is caused entirely by the fact that I didn’t know the meaning of the technical term “semantic security”. Ever since Craig … Continue reading

Posted in algorithms, chatter | 6 Comments

## Computing Fibonacci numbers using Binet’s formula

A few months ago I wrote something about algorithms for computing Fibonacci numbers, which was discussed in some of the nerdier corners of the internet (and even, curiously, made it into print). Several people suggested that Binet’s closed-form formula for … Continue reading

Posted in algorithms, Fibonacci numbers, Mathematics | Tagged | 9 Comments

## What’s all this about mazes? A statement of intent.

I’m trying something that I think is going to be fun and interesting – and, who knows, maybe even useful. I want to write a program that allows “random access” to all possible mazes, and does it quickly enough to … Continue reading

Posted in algorithms, mazes | 5 Comments

## The worst algorithm in the world?

You know the Fibonacci numbers: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, … Each number is the sum of the previous two. Let’s say the zeroth Fibonacci number is zero, so: And let’s say you … Continue reading

Posted in algorithms, Fibonacci numbers, Mathematics | Tagged | 72 Comments