My daughter was given an intriguing math assignment. I found a solution, but I'm curious about a more elegant approach.
"A jigsaw puzzle of M by N pieces has exactly 8% of border pieces. What are M and N ?"
The pieces are arranged in a perfect rectangular grid, and there's no funny stuff with irregular shapes. Therefore, the total amount of pieces is simply $M.N$ ; whereas the pieces on each of the 4 edges can be counted as $2.(M+N)$, but that counts the four corners twice. Correcting for this, my equation becomes $2.(M+N)-4=(8\%).M.N$ which simplifies to : $$M+N-2 = \frac{M.N}{25}$$ That's where the elegance stops and my crude guesswork begins, while the assignment explicitly asks not to use trial-and-error.
Focusing on the fact that M and N need to be integers, I briefly pondered $25|M$ but I concluded that won't yield any viable solutions for $N$. So I went for the more balanced constraints $5|M\;\&\;5|N$. I decided to rewrite the variables as $M=5.m$ and $N=5.n$ to ultimately get to the equation : $$5.(m+n)-2=m.n$$ I believe that "Integer calculus" exists as a branch of mathematics, but it is entirely shrouded in mystery to me. So I resorted to brute-force, and I listed all the integer multiples of 5, minus 2, to represent the left side of the equation : $13,18,23,28,33,...$ Then I tried to factor each of these numbers into $m.n$ to make the equation work out.
As is to be expected, this could be charted as a race between a steep linear graph, and a parabole. When aiming for a nearly square jigsaw puzzle by choosing $m\approx n$, the five-fold sum at the left of the equation, starts out much larger than the product at the right. I found the parabole to be overtaking the straight line around $m+n=21$ without yielding an integer solution ; from there on, the value of the parabole becomes way too large to ever obtain any further solutions.
However, not all the factorings of my series $13,18,23,28,33,...$ have a near-square aspect ratio. When the product can be factored into more than two divisors, the aspect ratio $m/n$ can be tailored at will. By going for $m<<n$ (which a physicist might call sacrificing surface area for perimeter length), additional paraboles for $m.n$ appear on the chart, intersecting the linear graph for $5.(m+n)-2$ elsewhere. This eventually led me to an integer solution for $m$ and $n$, which I converted back to $M$ and $N$ to get to a sizeable jigsaw puzzle.
I can't imagine that this would be the approved method, so I might actually flunk my daughter's assignment. How would a real mathematician handle this task ?