The quadtree encoding allows us to describe a 2N2N black and white image as a sequence of bits (0 and 1). Those sequences are to be read from left to right like this:
Consider the following 44 image (colored marks denote places where a split can occur):
This image can be described by several sequences, for example :
"0100101111101110", of length 16, which is the minimal sequence for this image.
For a positive integer N, define DN as the 2N2N image with the following coloring scheme:
What is the length of the minimal sequence describing D24 ?
These problems are part of Project Euler and are licensed under CC BY-NC-SA 2.0 UK