Reading week is finally here! Before that, I was spending a lot of time on Assignment 1, the recursion tower of hanoi problem.
We were given an equation to determine the minimum number of moves for moving N number of cheeses from one stool to another. The equation was really hard to solve since there are more than one variable. We also need to determine what the optimal value for 'i' is for different N values. I wasn't able to find a way to come up with the optimal 'i' value when the assignment is due, however I was able to finish the rest of the assignment.
My solution for the four stools method was able to significantly decrease the number of moves required in comparison to that of the three stools method. My insight was that as long as all four stools were utilized, the number of moves required should decrease. Therefore, I set "i" as (n // 2). The result was as expected and the number of moves required was drastically decreased. However, I realized that it is not the optimal solution and I'm looking forward to hear how my colleagues was able to solve it.
Overall, it was a great learning experience for me, especially from working through the problems alone.
Monday, February 17, 2014
Saturday, February 8, 2014
CSC148 - Weekly Summary 2/8
Another week of computer science has gone by... here comes one more post to summarize the week!
In the lectures, we continued to learn more about recursions with the professor asking us to trace different recursions to increase our understanding. I noticed my improvements in the understanding of recursion with every exercise and lab that I had done.
In class, the professor also talked about the assignment that is due the coming week.
Although I clearly understand how the towers of hanoi recursion work in class, but I'm having trouble understanding what the assignment wants us to do. There are a lot of files with a vague instruction of the objects that we need to include under each class. I'll be utilizing Piazza more and see if I can get better at designing a program without clear cut instructions.
Hopefully I can get everything figured out before the due date!
In the lectures, we continued to learn more about recursions with the professor asking us to trace different recursions to increase our understanding. I noticed my improvements in the understanding of recursion with every exercise and lab that I had done.
In class, the professor also talked about the assignment that is due the coming week.
Although I clearly understand how the towers of hanoi recursion work in class, but I'm having trouble understanding what the assignment wants us to do. There are a lot of files with a vague instruction of the objects that we need to include under each class. I'll be utilizing Piazza more and see if I can get better at designing a program without clear cut instructions.
Hopefully I can get everything figured out before the due date!
Subscribe to:
Posts (Atom)