Thursday, November 15, 2018

solve modular arithmetic equation

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:





  1. 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.

  2. 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/4D(mod4)



    L=5/4DD(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 AD(mod4) for A values 0 through (41), the modular inverse of
(mod4) is the A value that makes AD1(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

analysis - Injection, making bijection

I have injection f:AB and I want to get bijection. Can I just resting codomain to f(A)? I know that every function i...