Whadaya know, I learned something in the class |
And then there was this blog that I had to end up writing once every week. While it may not have been that enjoyable to write about math and logic all the time, I found ways to entertain myself. I also made an effort to actually write blogs because I completely understand why this is an assignment in the first place. Computer Science as a field in general requires lots and lots of interaction with other people, so you'll probably never end up working alone. Therefore communication is key between others; you need to be able to express your ideas and ask for help when you're having trouble understanding something. The almighty Heap in his magnificent glory and wisdom wants us to be better at expressing our ideas and problems to other people. And writing a blog seems like a good way to do so.
Over the semester I had dabbled here and there and looked at other people's slogs. The main thing that comes to mind this is that it is interesting to see how others view the course. Some see it as harder then I do, while others just seem to breeze through the problems that are thrown at them. But overall it is nice to see that the people who make an effort to post are human beings as well. It's good to know that I'm not in a class of robots, seeing that other people get stuck, struggle, and learn reminds me that I'm not the only one having difficulties. Specific examples include:
http://notaslug.blogspot.ca - Nice elaborative blog that explores ideas and problems that are not just contained in the class.
http://captainslog165.wordpress.com - Updates frequently and enthusiastically, seems like a cool person. The categorization of the different types of posts is a nice touch.
http://cs-tah.blogspot.ca - Nice pictures, adds a bit of personality to the blog. And holy cow there's a little pond at the bottom of the blog where you can feed fish, that is so freaking awesome.
Now that I've finished discussing the important stuff that shows what an awesome and well rounded blog this is, I guess I'll try and elaborate on a problem solving episode.
So the problem that I decided to focus on is the Products of Sums problem we talked about earlier in class this week. So first off for understanding the problem, we just need as the handout says to find the maximum product that can be formed using a list of integers that sum to n. I felt that the best way to discover any patterns was to use brute force on the whole thing and find out the largest product for the first few natural numbers. What I found was:
2 - Largest product set is (2)
3 - Largest product set is (3)
4 - Largest product set is (4) or (2, 2)
5 - Largest product set is (3, 2)
6 - Largest product set is (3, 3)7 - Largest product set is (3, 2, 2) or (3, 4)
8 - Largest product set is (3, 3, 2)
So a pattern that I see that is beginning to emerge is that the largest product sets are the ones that include 2's and 3's. It seems as though we need to reduce the sets to these two numbers. Since 3 is a bigger number it makes sense that we should try to include as many 3's as possible in the set, and finish it off with 2's. Reducing it to something like with 4's doesn't seem to work because 4 can be reduced to (2, 2). Other larger numbers don't appear to work because they are just too big and don't have enough extra numbers to multiply with when it is all reduced.
Also one must consider to eliminate any set with any number of 1's within it. This is because as anything multiplied by 1 is itself, 1 is not necessarily "productive" and should be replaced along with a 3 for (2, 2) (both pairs of values add up to 4). This can be seen in the numbers that are 1 above multiples of 3, such as 4 and 7. It seems as though the first thing one should do for these numbers is take take out a 4, then have the rest of the set consist of 3's.
So the overall idea behind finding the list of integers that adds up to n is reduce to the sums to 2's and 3's. Since the main focus is the number 3, we will consider three cases for the problem.
If 3 fully divides the number, then the largest product of the sums should entirely consist of 3's. With the number of 3's equalling how many times 3 divides into the number.
(Seen with 3 and 6, 9 also works this way as well with (3, 3, 3))
If the number is 1 above a multiple of three, then the largest product of the sums consists of a set with a 4 (or 2, 2), with the rest of the set consisting of the number of 3's that the number - 4 can divide into. (This idea can be observed in 4 and 7, 10 works as well with (2, 2, 3, 3)
If the number is 2 above a multiple of three then the largest product of the sums consists of the number of 3's that the number 2 below this one divides into, in addition to an extra two in the set. (This can be observed with 5 and 8, 11 works as well with (2, 3, 3, 3)
Since I am not very good with deriving equations out of these problems, I will not try to go any further for fear of getting stuck and writing an equation that is horribly incorrect. I am pleased with the results however, as I have actually been able to come out with a solution that considers the multiple possibilities of kind of number is being calculated, which is revolves around being a multiple of 3.