(i,j)=(i+1) *,j+1)( n-i)(n-j)
Sum of all sub,matrices problem, contribuition factor not clear
@dakshi hey contribution factor just tells us that in how many sub matrix we can have the cell i,j.
Now a submatrice will have i,j if and only if top left lies in the white part and bottom right of submatrice lies in red part (any other possibility is not possible this can be easily observed).
Now we can have to select one cell from white and one cell from red, this is simple combinatorics nC1 * mC1 kind of situation, now we just need to find how many cell are their in red area and white area. Now as each cell occupies a unit area(Integer grid) so number of cells in white area is simply the size of white area and now length of white is i+1 (index start from 0) breadth is j+1 now area is (i+1)*(j+1) this will be our “n” of above formula, simply calculate cells in red area (or m) .
Now simple substitution will give the answer
If this resolves your doubt mark it as resolved.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.