I still dont get how loop invariants work
from time complextiy to partial correctness.
I think i understand 40%.
Is the vassos text book a source to get that 60% of understanding??
soooo confused.....
lets read the sections word by word carefully...
its gonna be a long day..
Wednesday, November 28, 2012
Monday, November 12, 2012
Prob solving continued..
I missed test #2 becuase i was soooo sick... and still sick. Dress well people.
So continuing on the problem from last post:
Never mind the point that i made in last post about the diagonal problem..
I totally misread the question which isnt that hard to understand.
uhh................. its too hard.......
So continuing on the problem from last post:
Never mind the point that i made in last post about the diagonal problem..
I totally misread the question which isnt that hard to understand.
uhh................. its too hard.......
Monday, November 5, 2012
problem-solving episode
Firstable, I just read the instructions on SLOGs carefully and felt i wrote too much (or only) about my personal thoughts.
So im going to start a problem:
https://wwwcgi.cdf.toronto.edu/~heap/cgi-bin/Solvent/wiki.pl?Problem_Solving_Home_Page/DiagonalCount
You have a rectangular grid made 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). How many of the grid squares will the line pass through the interior of? If you are told m and n, can you calculate how many squares the diagonal will meet the interior of? Can you derive a formula?
Here's what happens for 4 rows and 6 columns:

So...............
just by looking at it, i see the pattern of 2X3 square with that grey shaded worm(?) shaped squares.
I think important thing we hav to consider here is,
for example, when m is 3, after 2nd row, no matter how much rows u add, the number of grey squares stays same. Similarly, when n is 2.
Pretty good start i guess..?
So im going to start a problem:
https://wwwcgi.cdf.toronto.edu/~heap/cgi-bin/Solvent/wiki.pl?Problem_Solving_Home_Page/DiagonalCount
You have a rectangular grid made 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). How many of the grid squares will the line pass through the interior of? If you are told m and n, can you calculate how many squares the diagonal will meet the interior of? Can you derive a formula?
Here's what happens for 4 rows and 6 columns:

So...............
just by looking at it, i see the pattern of 2X3 square with that grey shaded worm(?) shaped squares.
I think important thing we hav to consider here is,
for example, when m is 3, after 2nd row, no matter how much rows u add, the number of grey squares stays same. Similarly, when n is 2.
Pretty good start i guess..?
Subscribe to:
Posts (Atom)