Ada surveyed twenty-four girls in her year at school, and some boys, to find out whether they liked geometry, number theory or algebra best. Fifteen people preferred algebra, whereas eight people preferred geometry. Of these eight, half were female.

Which is larger and by how much: the number of boys who preferred algebra or the number of girls who preferred number theory?

Let the number of boys who preferred algebra be x.

Since there were a total of 15 people who preferred algebra, the number of girls who preferred algebra is 15 - x.
Since half of the 8 people who preferred geometry were girls, the number of girls who preferred geometry is 8 / 2 = <<8/2=4>>4.
The total number of boys surveyed is equal to 24 - (15 - x) - 8 - 4 = x + 3.
The total number of boys who preferred algebra is x, so the number of boys who preferred number theory is x + 3 - x = 3.
Since there was no mention of boys who preferred number theory, it means there were 3 girls who preferred number theory.
Therefore, the number of girls who preferred number theory is larger by 3 - 0 = 3.
The answer is 3. Answer: \boxed{3}.