Algorithm's problems.

leonardo_13 (1540 points)
6 14 22
asked Dec 11, 2021 in HW8
retagged Dec 12, 2021
Unfortunately, even if I thought about it for days I have no ideas about how to start, can I have any advice?
283 views

gianluca5539 (9820 points)
3 6 44
answered Dec 11, 2021 by (9,820 points)
selected Dec 13, 2021
Try, for every pattern, to generate rows that already match the requirements of the pattern, and then you can assemble these rows into matrices (see the recursion here?)
Luigi Pizza (6120 points)
11 20 65
answered Dec 11, 2021 by (6,120 points)
Probably the best strategy here is to "divide and impera". Create algorithms that work for each property, then put them together. I can't say more than this.
gabrimat (5630 points)
2 3 25
commented Dec 11, 2021 by (5,630 points)
Totally agree, you can't take such a big problem all together. Think how to solve each small step.
iacopomasi (2780 points)
13 19 41
answered Dec 11, 2021 by (2,780 points)
edited Dec 12, 2021
You can model the problem as a "Game Tree" where the state (node) is the current matrix/image that gets built and the "move" (edge) is adding something to the image so that you go into another state.

In the end, you should hit a final state in which the image is complete. In the case of a pattern, think well at the "moves" you have to do to keep your solution valid. Hope this helps.