This blog is a problem-solving blog. In this blog, I will record my steps in solving a mathematics problem. I choose a question from Prof. Danny Heap, and I will try to do it as simple as possible.
The problem I will solve is called "diagonals". You have a rectangular grid mad up of m rows and n columns (the symbols n and m represent positive whole numbers). Draw a line from the upper left to the lower right corner (the diagonal). Who many of the grid squares will the line pass through the int interior of? If you are told m and n, can you calculate how many squares the diagonal will meet? Can you derive a formula? Can you justify your formula.
What about a rectangular parallelepiped that is m rows by n columns by o layers?
When we have a question, no matter whether it is Maths or Computer Science, do not be panic ! I found that when doing Project2 too many people are worried and they will not get any help!
If we just read these words, it is hard to imaging the graph. Hence, why not draw a graph and try to get some hint from the graph?
m=1 n=1 Black=1 White=0 Blick= cut White= not cut(line not go through)
m=2 n=2 B=2 W=2
m=3 n=3 B=3 W=6
m=4 n=4 B=4 W=12
so
m=a n=a B=a W=a^2 - a
This is the easy case
However, if m NOT = n
m=>n the line <=45 tilt. Line will cut 1 square each row and there are m rows. So B=m W=mn-m
m<n we have to separate the situation.
m<n<2m Line will cut 2 square each row and there are m rows. So B=2m W=mn-2m
2m<n<3m Line will cut 3 square each row and there are m rows. So B=3m W=mn-3m
.........
am<n<(a+1)m Line will cut (a+1) square each row and there are m rows. So B=(a+1)m W=mn-(a+1)m
I think this is the answer. However, this may seem not like a Maths equation. However you can apply it to specific problems.
The final is coming. I am really worried about the final. I found that every professor is full of energy. Do you know the secret of that? I am sleepy everyday and I am always tired.
Thank you very much for this course! This is the best course I have ever taken in U of T! The Professor is the best and the TAs are the best as well! I am very happy to meet with yours. I am a little sad that this semester is so short that I will say Bye to everyone. However, life is going on and I will remember everything in this Perfect course. All you guys make our worlds wonderful! Thank you very much!
Thanking you in advance,
Hope you can follow my Blog further,
Sincerely yours,
Wang Guanning