KapTeacherEli wrote:
Injuin wrote:
I got this question correct by simply putting in the values and following the schematic. Was there supposed to be any cool way of figuring out without just plugging the numbers in?
Not that I can see. Near as I can tell, this is similar to "symbol" questions on the quantitative section--simple substitution obscured by a difficult way of expressing the math.
I agree that given the particular questions that they asked about this pattern, solving it this way is probably the easiest. If they asked questions that required looping through the block diagram many times, however, I feel that pattern recognition would be very important for maximizing time efficiency.
For example, suppose that the first question asked "What is the final value of T?" In that case, iterating through the loop would be too mechanical, and I think it would be more useful to recognize the pattern and calculate the final answer that way.
So essentially, we see that with B = 35 as an initial value, the highest power of 2 contained within 35 is 5, so we know that A will be doubled 5 times, making the final value for A equivalent to 24 * 2^5 = 24*32 = 768. From there, we recognize that A is added to T for every time B takes on an odd value: starting with 35, we can quickly see that 35 is odd, 17 is odd, and 1 is odd, so T will be composed of the first, second, and last values that are taken on by A; i.e, 24, 24*2, 24*32 = 24*35 = 840.
In fact, this algorithm just implements T = A * B, which would be crucial to recognize if we were given very large numbers. I suppose a formal proof for this is probably going too far, but here's a somewhat intuitive explanation:
Suppose we have some arbitrary value for A, and B = 61. The highest power of 2 that is less than 61 is 5 (32), so we know that A will be doubled 5 times; i.e, multiplied by 32. So to get T = A*61, we need to show that T is composed of A*32 + A*(61-32 = 29). Since we know that only A*(powers of 2) are added to T, we can break down T as follows:
61 = 32 + 16 + 8 + 4 + 1 = the sum of the following powers of 2: (0, 2, 3, 4, 5). We can see this relationship by breaking down B = 61 as follows:
61 - 1 = 60 ---------------------------------- Odd
60/2 = 30 -------------- First Halving; 2^1
30/2 = 15, 15-1 = 14 ---- 2^2 ---------------- Odd
14/2 = 7, 7-1 = 6 ------- 2^3 ---------------- Odd
6/2 = 3, 3-1 = 2 -------- 2^4 ---------------- Odd
2/2 = 1 ---------------- 2^5 ---------------- Odd
* Sorry for the poor formatting *
We can see that the number is halved 5 times, corresponding to the 5 times that A is doubled. Beside each layer is marked the corresponding 'doubling' of A.
Now, we recognize that an odd number is encountered at the 2^0, 2^2, 2^3, 2^4, and 2^5 layers, meaning we would be adding A*(1 + 4 + 8 + 16 + 32) to T, equating to 61*A.
I know that was kind of long-winded but hopefully it's useful/interesting to someone. I found it pretty neat.