I was thinking about a statement which came up in yesterday's contest where the value of abs(a^x-b^x) was to be minimized. For x less than or equal to r. I was thinking about this problem on these lines:
Let p= abs(a^x-b^x), then p = a^x-b^x or, p = b^x-a^x now if we take xor of statement one with a p^a = x-(a^b^x) ..(1) and if we take xor of 2nd statement with b p^b = x-(a^b^x) ..(2) We know that both statements are same, so p^a=p^b ..(3) Is this analogy correct? If yes, how can we find z for which the statement 3 would be true. Any help would be great, Thank you!








If the range of $$$x$$$ starts with 0 , then the answer is 0 and the value of $$$|a^x-b^x|=0 : a,b \neq 0$$$
If it starts with 1 , then the answer is $$$|a-b|=\max(a,b)-\min(a,b)$$$
and so on ....
Because it can be shown that as long as we increase the power the difference increases
Try graph the problem for different $$$(a,b,x)$$$
Its not a^x(x in power of a) it is xor of a and x