How do I solve this equation
L=D+[D:4]
- L is a known integer obtained previously;
- D is an integer;
- [D:4] is the quotient part of (D/4.)
At first glance, I did not know how to solve this equation as I have never seen this type in my calculus studies. After searching online I found that this is modular arithmetic for two reasons:
- The original relation is a congruence equation (Zeller's Rule) dealing with cyclical calendar numbers and I understand that modular arithmetic deals with cyclical integers.
D/4=quotient(D/4)+remainder(D/4) and since D(mod4)=remainder(D/4) that also means we are dealing with modular arithmetic.
∴[D:4]=D/4−D(mod4)
∴L=5/4D−D(mod4)………………..(1)
how to go further with eq. (1)?
Although I read the modular arithmetic rules and practiced a little but I wasn’t sure if I was going the right path.
I tried to eliminate the D(mod4) part by multiplying it with its inverse according to the following rule:
Calculate A⋅D(mod4) for A values 0 through (4−1), the modular inverse of
(mod4) is the A value that makes A⋅D≡1(mod4) and only the numbers that share no prime factors with 4 have a modular inverse (mod4)
From this point, I can obtain an inverse (I think) but It makes no sense to me.
Can anyone help please.
No comments:
Post a Comment