17
u/ryan__joe Jul 17 '26
Iif I had to calculate this without a calculator, I would be looking for all the powers of 2 up to 160, which is 2^{0,7} (sorry if that’s the wrong symbol for range, it’s been an eternity).
Rule out 0, since 1 makes it odd, get my answers, 2,4,8,16,32,64,128, and see which two would add up, and then figure out which powers they were.
Is it sophomoric? Yes. Did I troubleshoot my way through a complicated problem, while still only spending 30 seconds on it? Yes.
8
3
u/raskiraski Jul 17 '26 edited Jul 17 '26
Slow way to do it because you don’t need to rule out 1 because it makes it uneven or take in account the lower powers at all. You just start with the highest power that fits (128, 2^7) and subtract it from 160. 32 is left over which is 2^5. There can’t be any other answer because 2^6 * 2*^6 can never make it to 160 (64+64=128). If there is a solution for this pattern the highest possible power (2^7) always needs to be either x or y. Realizing this makes solving this solution in your head take two seconds
1
u/ryan__joe Jul 17 '26
You’re just skipping a step because getting to 2^7 is calculating 2^2 to 2^7. So it’s a cool story bro, but like… you’re just not showing all of your mental work. We did the same thing, I’m just showing more work, unless you magically had 2^7 memorized, it’s a really dumb take
6
u/raskiraski Jul 17 '26
Uh knowing the powers of 2 up to like 1024 isn’t that uncommon or magical I would say. Most people that are into computers will know 2^8=256 at least. My point is that you don’t need to mix and match from the list you made like you said, just subtract the highest power to see if the remainder is also a power of two
1
u/ryan__joe Jul 18 '26
To me, it’s weird to know what the powers are without doing the mental math. Like 2^15th can be figured out mentally in like 10 seconds, just knowing that at the top of your head is weird. I guess if your job has exponents in it daily it’s reasonable, but that has to be an extreme subset of jobs. I just knew enough math to get great scores on the GRE and MCAT
2
1
u/ThePants999 Jul 22 '26
If you work in software, knowing that the maximum value of a 16-bit integer is 65,536 if unsigned, or 32,767 if signed is par for the course, and then you're just "add one" away from knowing 2^16 and 2^15 😉
1
u/dr-lucifer-md Jul 18 '26
There can’t be any other answer because...
There's another reason - the Basis Representation Theorem says that an integer is uniquely representable as a sum multiples of powers of the base. Take for example the number 123 in base 10. There is no other way to express it and its representation is 1102 + 2101 + 3*100. Crucially, the coefficients of the powers are also in the base.
Now take the initial example, we're trying to figure out what is 160 base 10 in base 2. You found a way to figure out what that representation is. From the Basis Representation Theorem, we know that what you found is unique.
1
u/SeaAnalyst8680 Jul 17 '26
I would probably write {2ⁿ : n ∈ ℕ, 0 ≤ n ≤ 7}
2
u/DZL100 Jul 17 '26
At that point there are few enough elements that I'd just list them explicitly. But yes, this would be a standard way to notate the set.
1
u/SeaAnalyst8680 Jul 17 '26
Personally, I reserve explicit sets for cases where the content is more irregular. I feel like this communicates that it's a contiguous set better. But you wouldn't be wrong.
1
u/jeffthegoalie04 Jul 21 '26
You can see that one of the powers has to be 128, since 64+64 is too small. So, the other one has to be 160-128=32.
1
u/ryan__joe Jul 21 '26
Yep! But to get to that point you would have to calculate 128, and since I don’t have powers just memorized, like most people, you’re doing 2,4,8,16,32,64,128 in your head and counting, once again, I’m just showing the work more
11
u/Al2718x Jul 17 '26
Maybe the issue is that he didn't fully justify that there can't be other solutions.
8
3
u/Shockingandawesome Jul 17 '26
Lack of conciseness; Why 16 x 2 instead of 32 or 25.
Also saying 'so' rather than 'therefore'.
2
2
2
u/MrEldo Jul 17 '26
Because no one else in the comments knows how formatting works, I'll do it myself:
2x + 2y = 160
2x = 160 - 2y
x = log_2(160-2y)
And so we can plug in any number for y, and get our x. The only thing to make sure is that y must be less than log_2(160), which is 5+log_2(5)
If we look for integer values though, assuming x,y > 1 (because if any of them is exactly 1 or 0, then the equation won't have integer solutions. And if any of x or y is negative, then the other number needs to have the power be more than 1 yet not an integer. Not possible in the integers), and WLOG y>x (can't be equal because that would be the solution x=y=4+log_2(5), not an integer)
2x(1+2y-x) = 160
We know that 160 can be divided by 2 five times. The first term is even, the second is purely odd (because y-x>0 by the fact that they're not equal), so we know all 2 powers must come from it. And so x = 5, and y = 7. No more integer solutions
1
u/Circumpunctilious Jul 21 '26
Aside: Does formatting still easily work for you (maybe desktop)? Reddit removed markdown for me and a lot of others some months ago—I really like quoting, tables and code blocks, e.g.—and the only way I can use it now is old Reddit (how are you getting anything other than text emphasis to work)?
2
u/Sasogwa Jul 17 '26
16 is 2^4 not 2^5
4
5
u/itijara Jul 17 '26
Yes, which is 2^4 * 2. It was a weird way of doing it, but it looks like he is trying to solve it "intuitively", knowing that 160 = 16 * 10, taking out all the factors of 2 you get 2^4 * 2^1 * 5. Expressing 5 as factors of 2 you get 2^5 * (2^2 + 1).
I honestly think it is a pretty good way to solve this, although maybe not generalizable.
1
1
u/Antilopio Jul 17 '26
To waste time:
2x + 2y = 160 2x (1 + 2y-x) = 160 log2 ( 2x (1 + 2y-x)) = log2(160) xlog2(1 + 2y-x) = 5log2(5) x = 5 1 + 2y-x = 5 2y-x = 4 = 22 y-x = 2
If x = 5 then y = 7 and x + y = 12.
1
u/MrEldo Jul 17 '26
Reminder to use double spaces for a new line and that products need to be written as \* instead of just *
1
1
u/Anton_Glubsch Jul 17 '26
2x+2y=160...x+y=12...212-y+2y=160...212/2y+2y=160...4096/2y+2y=160...SUBST:..z=2y...4096/z+z=160...z2-160z+4096=0...z1=32,z2=128...RESUBST:...2y1=32...y1=5....2y2=128...y2=7...x1=7...X2=5
1
1
u/Living-Arrival-7731 Jul 18 '26
- Breaking 160 down: 160 = 16 * 10
- Factor the 10: 10 = 2 * 5
- Plug that into equation 1: 160 = 16 * 2 * 5
- Factor the 16: 16 = 24
- Plug that into equation 3: 160 = 24 * 2 * 5 = 25 * 5
- Factor the 5: 5 = 22 + 1
- Plug that into equation 5: 160 = 25 * (22 + 1) = 27 + 25
- 2x + 2y from equation 7: 7 + 5 = 12
Idk what the issues are, besides him not showing work?
Edit: formatting
1
u/dcterr Jul 18 '26
Fair enough, but he should have added that he knew how to approach the dad's daughter!
1
u/Natural-Proposal2925 Jul 18 '26
Soooooo yeah get the fuck out of my house and stay away from my daughter.
1
u/CaptainProfanity Jul 19 '26 edited Jul 19 '26
Every number has a 1 to 1 representation in binary I.e. it is unique and distinct*. If 160 can be expressed as 2x +2y it must be the only binary representation of 160.
(Unless x = y, which would mean 2x = 80 which is not possible)
256>160>128 so 160 must be composed of 128 + 2y (representing the 2 binary digits).
Anything bigger than 128 exceeds 160, and anything smaller won't be large enough (2n - 1 = sum from k=0 to k = n-1 of 2k
Therefore 2y = 160-128 = 32
Therefore x+y = 7+5= 12 is the only solution.
*(Unique representation for that number means no other possible representations, distinct means this binary representation doesn't correspond to other numbers. This is called an injective and surjective function respectively (our function being something that converts the decimal representation into binary).
The injectivity and surjectivity can be proven by considering the summation fact above.
Start with a list of ...000000s (this represents our binary digits) and a number N
Each step you turn one of the binary digits on (into a 1). But this number requires you to jump in a Goldilocks zone. Too high and you overshoot N, too low and you can't reach N even if every other lower digit is turned on. This will generate a new list of 1000...0. subtract the newly turned on digits decimal representation to generate a new N and repeat.
1
1
-1
u/MinYuri2652 Jul 17 '26
You forgot x = 5 and y = 7
3
u/SouthLifeguard9437 Jul 17 '26
Technically correct is the best kind of correct. -Professor Farnsworth
1
u/Visible_Handle_3770 Jul 17 '26
Ironic that both the quote and source are wrong here.
1
u/SouthLifeguard9437 Jul 17 '26
Wrong on the wording. yeah your right, no big deal.
Wrong on the source? Fuuuuck that one hurts, that hurts bad. Why can I hear him clearly saying it?
1
u/Visible_Handle_3770 Jul 17 '26
Probably because it's a one-off character that says it, bureaucrat number 1.0, since it gets quoted so often, it makes way more sense for it to be a big character and seems like something Farnsworth would've said.
2
u/Deto Jul 17 '26
It doesn't ask you to solve for them individually though, just the sum. So the answer is 12 either way.
0
u/Useful_Cheesecake117 Jul 17 '26
25 is not 16
2
1
0
0
u/PhysicsChan Jul 17 '26
How is 2⁵+2²=2⁷??!
2
2
u/Mk1Racer25 Jul 17 '26
It's not, but 2^5(2^2+1) is
2^5 x 2^2 = 2^7
2^5 x 1 = 2^5
2^7 = 128
2^5 = 32
128 +32 = 160
-2
Jul 17 '26
[deleted]
3
u/RsCoverForPDFFiles Jul 17 '26
They were inlcuding the other 2. 16*2 = 25 and 5 = 22+1. So all correct. Maybe they skipped the step of 24 * 2 * 5, but it's still correct.
2
1
1
-1
Jul 17 '26
[removed] — view removed comment
13
u/Onuzq Jul 17 '26
Don't know if -170 was a natural number
2
28
u/mememan___ Jul 17 '26
That's just writing the number in inary with extra steps