The 12 days of Christmas song is a popular exercise given to students in grades 5 or 6 to calculate how many presents in total are given during a 12-day period.This question can be solved in many ways. One very nice approach is to solve it using Pascal's triangle as follows:
The first diagonal to the left of the 1's (i.e. 1,2, 3, ...) gives the number of new gifts given on consecutive days (i.e. one partridge in a pear tree, two turtle doves, etc.).
The second diagonal to the left of the 1's (i.e. 1, 3, 6, 10, ...) gives the sum of the presents on consecutive days (i.e. 1 = 1 partridge in a pear tree, 3 = 2 turtle doves + 1 partridge in a pear tree, ...).
The third diagonal to the left of the 1's (i.e. 1, 4, 10, 20, ...) gives the sum of the presents given. For example, on day 3, 10 presents are given in total (3 French hens +(2*2 turtle doves) + (3*1 partridge in a pear tree)), and that indeed matches the third number of that diagonal. So on day 12, the 12th number of that diagonal, which is 364, represents the total number of presents received.
In conclusion, Pascal's triangle solves the problem of finding the sum of those presents, but it could become very tedious for more challenging situations. For instance, what would happen if the song was about giving presents for 120 days instead of 12? In that case, we would have to come up with a better approach for sure!
No comments:
Post a Comment