Friday 5 April 2013

Last but not the least...

   Today is the last day of classes and I am going to certainly miss this course. Although, in the beginning I had a lot of complains about the timing of the course and the weather and blah blah blah, but now I am finally glad that at the end of the day, I have a positive feeling about this class. Due to this class, I got to spend some time with my friend, without whom the journey experienced in this class would have been incomplete. We got to learn about the history of computers and DrRacket, a programming language that was absolutely alien to me in the beginning.However, now I am familiar with the programming environment and able to make and understand program codes. Also, one thing I really like about DrRacket is it's syntax. Compared to other programming languages, it is simple and concise. I also enjoyed Professor Heap's teaching style. I am looking forward to taking some computer science courses in my future years of study. I just submitted the last project of this class. This project was a little easier compared to project 1, or maybe that's because we started early this time. We still have the exam left. I hope it is not too hard, and that we have enough time to complete the paper, unlike the term tests. Good Luck to y'all for your exams, study well

Thursday 4 April 2013

Mathematical problem: Penny Piles


Reading thoroughly through the problems posted by professor Heap, the first one, "Penny Piles" drew my attention. The problem states that there are 64 pennies in the left drawer and 0 in the right one, and requires us to arrange the pennies in a way that one of the drawer ends up with 48 pennies. We are given the left and right operations. In both cases, if there are even number of pennies, half of those can be transferred to the other drawer(left, if in right or right, if in left), but this step will be omitted for odd number of pennies.

Understanding the problem 
  • Two drawers, the left one has 64 pennies and the right one has 0
  • Need to find a way in which one of the two drawers possess 48 pennies
  • Have to use left and right operations given(listed above)


Devise a plan
  • To begin with, one of the drawers should have even number of pennies
  • Use a visual representation to enhance the understanding of the problem. 
Carry out the plan
  •  The left drawer has 64 pennies, hence, we can proceed with the left operation by transferring half of the 64 pennies into the right drawer. 

  • Now, both drawers have 32 pennies, and we can repeat that operation. 

  • This results in the left one having 16 pennies and right 48, our desired amount of pennies. 
  • If you create a binary tree it will continue till there are odd numbers in both the drawers using both operations 
Looking back at the process: 
  • If we continue the tree from the last flow-chart displayed, it will be a tedious, lengthy chart until all the outputs in the left and right drawers are odd-till further proceedings become impossible. 
  • From the three hints provided, the tree is an easier and visual process that helps to see the solution instantly. Working backwards is also an essential method. 

  • Also, according to hint 2, we would get 24 after splitting 48-we would have 24 in left and 50 in right.We will get 12 when we split 24-where the left drawer would have 12 and the right would have 52. 
  • 64 is an ideal number, as it is the smallest even number with 7 divisors. Additionally, if we begin from the same initial position, we can arrange things in such a way that we can get any desired amount of pennies in a drawer in the range of [0,64], having 29 and 9 as they're only exception.
  • We can also start off from a different initial number in the left drawer, though, it can neither be a zero nor an odd number. 
  • Although, complexities may arise if it initially started with a different number, various mathematical and logical techniques can be used to solve the problem, just like discussed and illustrated above. 




Saturday 30 March 2013

Working on Project II ...

Project two is due next friday. I have been procrastinating a lot to look at the project, as something or the other turns up and feels like a priority at that moment of time. Since, I finally finished all my labs, quizzes and assignments for this term, this project is the only thing I have left to do. I have just read the handout and looked at the program codes. They are quite interesting and challenging at the same time. I am currently focusing on the first program, contrast.rkt. Hopefully, it doesn't take me as long as ecosystem. I will blog soon to update my progress on the project, till then good luck on your projects. 

Friday 22 March 2013

Wikipedia III

It's blogging time of the week again. This week as a whole was GOOD. I just submitted the wikipedia part three on MarkUs. I had to change some of my articles as a user already edited them, before I had time to do so. Also, one of them was semi-protected so I could not edit it. In the beginning, it was very boring, though after I finished edited my first article, it got very stimulating. One of my articles was very time consuming. It took me two hours to edit it. The plot section of the page was very lengthy with bunch of grammatical errors, inappropriate word choice, incorrect punctuation and awkward phrasing. Additionally, most of the sentences in the plot were not capitalized. I still feel that the page can be improved and hence I did not remove the copyediting banner from the page. I have added it to my watch-list, and will resume working on it later when I have some time in hand. Overall, I really enjoyed working on this assignment. It was innovative in the sense that rather than just covering the content concerned with the course, we got to explore the wikipedia community, which we all visit at some point of time in the day.

We also got back our tests on thursday, along with the project and wikipedia two marks. I am satisfied with my test mark, though I feel I should and could have done better on the last question. The project 1 mark was disappointing. I guess it is the ecosystem program that screwed up our mark. I am glad that we at least got part-marks for the check-expects and completion of the definitions. I hope to do better in the next project. 

Friday 15 March 2013

TERM TEST 2!!

   Finally, weekend has knocked my door. If I think about it, the week was not that terrifying as I imagined it to be after all. I wish the tests were right after the reading week so that whatever I read during the reading week would have remained fresh in my head. This class's test did not bother me that much because we kept refreshing ourselves every week with the content either through the quiz or the previous assignment. Most of the stuff we learned so far was quite helpful while doing the project due last friday. However, I could not hand in a more complete and accurate version of one of the two programs, I am glad that at least I  know how to do it NOW. In my opinion, the test was moderate. I found the second question somewhat confusing, and therefore ended up wasting a lot of time on it, other than that it wasn't that bad. I can't say much unless I know how I did on the test. Unlike last time, the aid sheet was very helpful this time. Last time I made notes and ended up not using it. However, this time I referred to it numerous times. I am glad the work I put into writing up the aid sheet was at least worth the time . The wikipedia assignment part III is due next friday. I am waiting for the TA to post the evaluation/ comments on MarkUs, so that I can begin working on the third part. I don't want to keep it till the last minute this time. 

Friday 8 March 2013

PROJECT 1!!

  Hello, I am late for my blog today, but I have been trying to figure out ecosystem.rkt for the project due today. Although, the the ball.rkt gave me numerous confusions and problems, I was successfully able to finish it with the desired output. However, I have been banging my head on the program code for ecosystem from a long time and it does not seem to work. I am not sure what to do with just five hours left in hand. I added the check-expectes, fixed the ones which were initially in the code, and it prompts saying that the nine tests have passed. I also fixed the definitions, but there is no stimulation in the images of the fox and mouse. Being in life sciences, I do understand the concept of the Lotka-voltera/ predator-prey model, but I believe it is the last few statements that is screwing me up. If I am not wrong, the output is supposed to result in different scaling of the images over time as the population of each species increase or decrease. Due to a bio midterm, I could not devote much time towards this project. I wish I had more time in hand. I do wish we get part marks for the remainder of the program, just incase I do not end up fixing this program. I tried to copy-paste the check-expect expression from piazza , just like it was instructed to check the accuracy, though it prompted an error. Well, I am not going to give up. I am going to get back to the program and see what I can do in the remaining of the time left. 

Friday 1 March 2013

Quiz & Wikipedia Part II

      Today, the wikipedia assignment part two is due. After the completion of the plan, I realized that one of my choosen articles is semi-protected, implying that I have to edit minimum of ten articles to be eligible to copyedit the desired article. Now, that is quite disappointing. I was really looking forward towards editing that article. However, I cannot waste my time editing ten things to be able to edit a single project. Perhaps, I will just choose another article and include that in my plan, as that seems like the only option available. I found today's quiz kind of hard. It was not extremely difficult, at the same time during the quiz, I was confused whether this is the answer I am expected to write or I am missing something. Well, I guess I will find out once the solutions for today's quiz get posted. I better get back to fixing my plan and submit it before I forget it.