Do Not Write Pseudocode When Describing Your Dynamic Programs Rather Give The Bellman Equation Describe The Matrix It 1 (14.97 KiB) Viewed 19 times
Do Not Write Pseudocode When Describing Your Dynamic Programs Rather Give The Bellman Equation Describe The Matrix It 2 (33.26 KiB) Viewed 19 times
Do NOT write pseudocode when describing your dynamic programs. Rather give the Bellman Equation, describe the matrix, its axis and how to derive the desired solution from it.
2. Consider the following problem: you are provided with a two dimensional matrix, M, (dimensions, say, mx n). Each entry of the matrix is either a 1 or a 0. You are tasked with finding the total number of square sub-matrices of M with all 1s. Give an O(mn) algorithm to arrive at this total count. Furthermore, how would you count the total number of square sub-matrices of M with all Os?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!