使用分数的模算术 [英] Modular arithmetic using fractions

查看:55
本文介绍了使用分数的模算术的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用整数乘法和分数 mod 10 的方法遇到了这个密码学问题.

I'm stuck on this cryptography problem using multiplication of a whole number and a fraction mod 10.

这是等式:

7 * (4/11) mod 10 =?

我知道我应该将其转换为整数,因为 mod 运算符不适用于分数,但我无法弄清楚这一点.显然,

I know I am supposed to convert this to an integer since the mod operator does not work with fractions, but I cannot figure this one out. Obviously,

7 * (4/11) = 28/11,

但我无法得到分数的 mod 10.教师想要准确的答案,而不是小数.任何帮助将不胜感激!

but I cannot get the mod 10 of a fraction. The instructor wants the exact answer, not a decimal. Any help would be greatly appreciated!

推荐答案

8

8 确实是正确答案.

8

8 is the correct answer indeed.

7*4/11 mod 10 表示我们正在查看 7*4*x mod 10 其中 x 是 11 modulo 10 的模倒数,这意味着11*x mod 10 = 1.这对于 x=1 (11*1 mod 10 = 1)

7*4/11 mod 10 means we're looking at 7*4*x mod 10 where x is the modular inverse of 11 modulo 10, which means that 11*x mod 10 = 1. This is true for x=1 (11*1 mod 10 = 1)

所以 7*4*x mod 10 变成 7*4*1 mod 1028 mod 10 = 8

这篇关于使用分数的模算术的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆