Tuesday, October 29, 2013

Assignment 2 reflection

So, having finished up assignment two around thursday last week, I think its about time to write up a reflection onto this blog. Overall, I think assignment two was valuable as it enhanced my way of thinking about how to represent simple patterns or sequences in a way that is unambiguous to a machine that knows nothing about human conventions.

In combination with the reading this week, Assignment 2 really taught me how to think of statements such as pattern matching or mathematical formulas in terms of trees. More specifically, it is often ambiguous the order one must preform operations such as the binary comparisons of assignment 2 or the binary operators of simple arithmetic when the statements are written down in our standard form. From the statement, 2+3*5, the order of operations is not contained in the statement. So we need to learn separately the order of operations, and this is why schools teach us bedmas. However, consider the following binary tree:

Sum( 2, Product(3,5) )

The order in which these operations come is unambiguous. Binary trees are a powerful and natural tool to make an implicit order of binary operations explicit, and trees in general allow representation of both hierarchy and data.

No comments:

Post a Comment