Please ignore secret bonuses. Secret tests do NOT award bonus. Max hw grade is 30+2 bonus efficiency

Do you need help?

Algorithm's problems.

leonardo_13 (1540 points)
6 15 22
in HW8 by (1.5k points)
retagged by
Unfortunately, even if I thought about it for days I have no ideas about how to start, can I have any advice?
419 views
closed

3 Answers

Best answer
gianluca5539 (9820 points)
4 6 44
by (9.8k points)
selected by
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)
14 20 65
by (6.1k 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 4 25
by (5.6k points)
Totally agree, you can't take such a big problem all together. Think how to solve each small step.
iacopomasi (5230 points)
45 64 94
by (5.2k points)
edited by
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.