4 ms·
That problem is actually very easy to solve. If you number the cells in binary, patterns fall out enough that it's easy to convert back and forth from the orig
by powera 11y ago
That problem is actually very easy to solve. If you number the cells in binary, patterns fall out enough that it's easy to convert back and forth from the original numbering to the final numbering.
If he wants to just work it out by hand, well, maybe he doesn't understand math as well as he thinks. If you want to use math to "build hammers", it help to know what a nail is first.
- coldtea 11y agoThat's not what the article is about.
- powera 11y agoWhat is it about? (other than the statement "there are no rules in math" which I think is so outrageously wrong I can't even argue against it here)
- gus_massa 11y agoI agree. I actually like this problem. I didn't solve it yet, but I guess that your idea to use binary base will be very useful. I'll give this problem to my daughter.
- Chinjut 11y agoIndeed, what we discover is this: Suppose we are interested in the function f(N) such that a cell which originally has N squares to its left ends up with f(N) squares under it. To calculate f(N), write N out in binary with K + 1 bits [where the tape has 2^K squares], including a leading zero. Reverse this bitstring [exchanging most- and least-significant bits, etc.]. Finally, if the result has a leading one rather than a leading zero [i.e., if N was odd], flip all the bits [turning ones into zeros and vice versa]; otherwise, leave them be. This yields the binary description of f(N) [with K + 1 bits, including a leading zero]. In the given example, N is 941; i.e., 01110101101, using ten + 1 binary bits. Reversing this, we get 10110101110. Finally, since this has a leading one, we flip all the bits to get 01001010001. This the binary description of 593, which is the answer. (More generally, suppose at some point in the process, the tape has been folded to a width of 2^K * W squares and height of H squares, and we are interested in where the W-width, H-height block with N such blocks to its left ends up once we've gone through K more foldings to bring the tape width down to W and tape height up to 2^K * H. This block will end up with f(N) such blocks below it; if N is even, the block will be in the same orientation as currently, while if N is odd, it will be reversed 180 degrees from its current orientation (with its current top-left square becoming its bottom-right square, etc.))