Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Let 4 variables a,b,c,d be non-negative integers in the domain [0,255] when they are multiplied by 255. That is to say, they are fractions in the domain [0,1] of a denominator 255 with non-negative integer numerators in the domain [0,255]. Examples of valid values are 1/255, 2/255, 3/255, etc.
- The variables are related in one equation. I want to prove that there are no solutions to this equation, by which I mean there are no valid values for the 4 variables that will satisfy the equation.
- ac+(1-a)bd 1
- ---------- = -
- a +(1-a)b 2
- Now I'm going to redefine a,b,c,d to be non-negative integers in the domain [0,255]. The equation will still hold if I add the denominator 255 to the variables.
- a c a b d
- --- --- + ( 1 - --- ) --- ---
- 255 255 255 255 255 1
- --------------------------------- = -
- a a b 2
- --- + ( 1 - --- ) ---
- 255 255 255
- ac (255-a)bd
- ----- + ---------
- 255^2 255^3 1
- ---------------------- = -
- a (255-a)b 2
- --- + --------
- 255 255^2
- 255ac + (255-a)bd
- -----------------
- 255^3 1
- --------------------- = -
- 255a + (255-a)b 2
- ----------------
- 255^2
- 255ac + (255-a)bd 255^2 1
- ----------------- --------------- = -
- 255^3 255a + (255-a)b 2
- 255ac + (255-a)bd 1
- ---------------------- = -
- 255(255a + (255-a)b) 2
- _____________________________
- | |
- | 255 ac + (255-a)bd 1 |
- | --------------------- = - |
- | 255^2a + 255(255-a)b 2 |
- |___________________________|
- a,b,c,d are non-negative integers in the domain [0,255]. Is it possible to prove that there are no solutions to this equation?
- One way to determine this is to test all (255^4=4228250625) possible combinations, however I'm looking for a more compelling proof.
- Both the numerator and denominator will each evaluate to a non-negative integer value. That being said, a part of the set of possible evaluated fractions will look like this:
- 1 2 3 4 5 6 7 8 9 10
- - , - , - , - , -- , -- , -- , -- , -- , -- ...
- 2 4 6 8 10 12 14 16 18 20
- The denominator must evaluate to an even number.
- Here are some of the rules of parity (even or odd) arithmetic:
- Addition/subtraction:
- Even Odd
- __________
- Even |Even Odd
- Odd |Odd Even
- Multiplication:
- Even Odd
- __________
- Even |Even Even
- Odd |Even Odd
- The denominator has only two variables a and b that I need to worry about. Let's consider the possible cases of parity and see which combinations result in an even number.
- 255^2a + 255(255-a)b
- (Odd)a + (Odd)((Odd)-a)b
- a: Even; b: Even
- (Odd)(Even) + (Odd)((Odd)-(Even))(Even)
- (Even) + (Odd)(Odd)(Even)
- (Even) + (Odd)(Even)
- (Even) + (Even)
- (Even)
- a: Odd; b: Even
- (Odd)(Odd) + (Odd)((Odd)-(Odd))(Even)
- (Odd) + (Odd)(Even)(Even)
- (Odd) + (Even)(Even)
- (Odd) + (Even)
- (Odd)
- a: Even; b: Odd
- (Odd)(Even) + (Odd)((Odd)-(Even))(Odd)
- (Even) + (Odd)(Odd)(Odd)
- (Even) + (Odd)(Odd)
- (Even) + (Odd)
- (Odd)
- a: Odd; b: Odd
- (Odd)(Odd) + (Odd)((Odd)-(Odd))(Odd)
- (Odd) + (Odd)(Even)(Odd)
- (Odd) + (Even)(Odd)
- (Odd) + (Even)
- (Odd)
- Therefore, the denominator is only even with both a and b are even. Let's see the parity of the numerator with a and b both being even.
- 255ac + (255-a)bd
- (Odd)(Even)c + ((Odd)-(Even))(Even)d
- (Even)c + (Odd)(Even)d
- (Even)c + (Even)d
- (Even) + (Even)
- (Even)
- Therefore, the numerator must be an even number as well, reducing the set of possible evaluated fractions to those with even numerators:
- 2 4 6 8 10
- - , - , -- , -- , -- ...
- 4 8 12 16 20
Add Comment
Please, Sign In to add comment