minimal fractional representations of integers mod m
play

Minimal Fractional Representations of Integers mod M David Greve - PowerPoint PPT Presentation

Minimal Fractional Representations of Integers mod M David Greve ACL2 Workshop May, 2020 Integers mod M Whole numbers 0 .. M-1 Integers mod 17: Signed Representations Negative numbers: (- x) The number added to x to make zero


  1. Minimal Fractional Representations of Integers mod M David Greve ACL2 Workshop May, 2020

  2. Integers mod M ● Whole numbers 0 .. M-1 ● Integers mod 17:

  3. Signed Representations ● Negative numbers: (- x) – The number added to x to make zero (0) (mod M) – The number added to 7 to make zero (0) (mod 17) 7 + 10 == 0 % 17 ● 10 == -7 ● 7 == -10 ● Is there a “best” signed representation for each number?

  4. Signed Representations ● Negative numbers: (- x) – The number added to x to make zero (0) (mod M) – The number added to 7 to make zero (0) (mod 17) 7 + 10 == 0 % 17 ● 10 == -7 ● 7 == -10 ● Is there a “best” signed representation for each number?

  5. Reciprocals ● Reciprocals: (1/x) – The number multiplied by x to make one (1) (mod M)? – The number multiplied by 7 to make one (1) (mod 17)? 7 * 5 = 1 % 17 ● 5 = 1/7 ● 7 = 1/5 ● – Not every x has a reciprocal mod M

  6. Fractional Representations ● Fractional Representation (x ~= N/D) mod M – x * D == N % M – Fractional Representations for 7 mod 17: Is there a “best” fractional representation for each number?

  7. Farey Sequences F2 = N2/D2 N1 + N2 F3 = F1 = N1/D1 D1 + D2 “Neighbors” N2*D1 – N1*D2 = 1

  8. Fractional Representations ● Fractional Representation (x ~= N/D) mod M – x * D == N % M – Fractional Representations for 7 mod 17: Is there a “best” fractional representation for each number?

  9. Fractional Representations ● Fractional Representation (x ~= N/D) mod M – x * D == N % M – Fractional Representations for 7 mod 17: Is there a “best” fractional representation for each number?

  10. Fractional Representations ● Fractional Representation (x ~= N/D) mod M – x * D == N % M – Fractional Representations for 7 mod 17: Is there a “best” fractional representation for each number?

  11. Fractional Representations ● Fractional Representation (x ~= N/D) mod M – x * D == N % M – Fractional Representations for 7 mod 17: Is there a “best” fractional representation for each number?

  12. Minimal Fractional Representation ● A Fractional Representation is “minimal” if : – No smaller denominator results in a smaller numerator Sadly: Not sufficiently general ●

  13. Minimal Fractions Pair N X ~= (N < 0) K P X ~= M

  14. Minimal Fractions Pair N X ~= (N < 0) K P X ~= M No smaller denominator results in a numerator whose magnitude is smaller than the sum of the two numerator magnitudes

  15. Step Minimal Fractions Pair P N + P N X ~= X ~= X ~= K + M M K

  16. Step Minimal Fractions Pair P N + P N X ~= X ~= X ~= K + M M K

  17. Step Minimal Fractions Pair P N + P N X ~= X ~= X ~= K + M M K

  18. Minimal Coefficient Bound 2/20/2020 6:30 pm 2/20/2020 9:30 pm

  19. Minimal Fractions mod 17 - smallest maximum coefficient - smallest denominator

  20. Also a Floor Wax .. ● Computes Modular Inverses/GCDs .. – Generates Same “coefficients” as Euclidean Algorithm If you use “division” instead of ”repeated subtraction” ● – Like “Extended GCD” All computations are in “M” ●

  21. .. and A Dessert Topping! ● Performs Modular “Long Division” – Traditionally “Division” means multiply by reciprocal

  22. Conclusion ● Algorithm for finding minimal fractional representations – Also performs long division! ● Verified sqrt(M) bound on numerator/denominator ● Culmination of Several Years of .. Contemplation

Recommend


More recommend