top of page

Ideas Portal

Hopping from one bulb to another...

x+2 = x+3

3 days ago
2 min read

one day I saw the following equation waiting to be solved :



by instinc and by normal sense, this has no solutions,

based on how addition works, starting with the same number bu adding different numbers should give you different results.







However, with a single reasonable twist, this equation has infinite solutions:


Modular Arithmetic

Curling the entire number line into a circle


here is a quick recap of basic modular arithmetic :




in other words, "a" is the remainder of "A" when divided by "p". In most of the time, in Modular Arithmetic, we will stick with a modulus "p" and let all the calculations wrap inside this circular ring of 0 to p-1

in other words :


hint : it is like walking on a clock,

where when you walk full circle it brings you back where you where.


all integers in this Ring is also called a "Cyclic Group of Zp"


let's say we want to Add 2 number in this Cyclic group



and no matter how many rounds of p, you can go back to where you where, this means "fp" and "gp" are giving you full circles, which actually can be ignored









now let's break it down into generalized equation,

rather than sticking with concrete numbers :






here the main trick is to let that annoying "d" go away, in other words, we need to let " d mod p = 0 ", in order to do that, we can have :




so this means that "x" can be any integer, as long as "d = fp".







before going back to the original question, let's look at an obvious example to know how this can work :







if we go back to the original question :





2 and 3 differs by 1, the only choice we can have is p=1, then x can be anything in mod1 . A very lousy answer, but a new way to make such equation POSSIBLE to happen.







here is a tool to help you to understand more about Modulus Arithmetic :



Comments


bottom of page