You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more
Just spotted a puzzle on Facebook, similar to countless others and tagged with the obligatory "MOST PEOPLE WILL GET THIS WRONG!!" share-bait. It's basically a grid of squares posing the question "how many squares?" (This one was actually made from potato waffles, but that's not important right now).
Working these things out is trivial (if you ignore the fact that they're usually trick questions with multiple answers; this one probably has people arguing about the definition of 'square' as waffles aren't produced using a set square). Count the individual squares, then the 2x2 squares, 3x3 and so on right out to the final square(s) which uses the outside border of the grid.
So, using a chessboard as an example, you've got 8x8 individual squares, 64 of them. 7x7=49 two-by-two squares, and so on, till you hit 1x1=1. The waffle puzzle was a 6x4 grid, so the final iteration was 3x1. Add 'em all up, that's your answer.
My question is, is there a shortcut way of doing this mathematically? Can (x.y)+(x-1.y-1)+(x-2.y-2)+(x-3.y-3)... be distilled into a friendlier formula that doesn't require iterating through until either x or y = 1? I've a feeling it's a differentiation / integration problem, but it's half a lifetime ago since I did A'level maths and I didn't understand it then.
Cheers.
There'll be a formula for it. I had to do the same thing with triangles and had a term for each way of creating triangles. Not very elegant, but I'm pretty sure it's a standard problem with a well known solution.
Fourth post on this thread:
http://www.freemathhelp.com/forum/threads/59905-formula-for-number-of-squares-in-n-by-n-grid
Fourth post on this thread:
Ta. Not quite the same though - that assumes a square grid. (And yes, I should've just Googled this, but thought it was interesting enough to talk about.)
And yes, I should've just Googled this, but thought it was interesting enough to talk about.)
If you ever need proof of your Asperger's then just point at this post 🙂