CSCI 124 Discrete Structures II: Existence of Multiplicative Inverse

advertisement
CSCI 124
Discrete Structures II: Existence of Multiplicative Inverse
Poorvi L. Vora
In this module, we see the relationship between the gcd and the multiplicative inverse ��� �.
Recall Definition: The greatest common divisor of two positive integers � and � is the largest integer that divides
both � and �. It is denoted ��� �� or ������ ��.
In other words,
� � ��� �� �
�
���� ���
���� ��� � ���
Definition: � and � are said to be relatively prime if ��� �� � �.
As we saw in class, we need a lemma before we can completely prove the main result, which is:
Theorem: Let � � �� for some positive integer �. ��� ��� � ������ � ��� �� � �
We first show the lemma:
Lemma: ��� �� � � � � �� � � � ���� ���� �� � �� � �
Proof:
Suppose ��� �� � �.
Consider all integers of the form �� � �� for integers � and �. That is, consider � � ���� � �� � �� �� � � ��.
Let � � �� � � �� � be the smallest positive value in �. We would like to show that � � ��� �� � �, and hence that
�� � �� � �� � � �� � �� ���� �� � �� � � � �.
Consider any arbitrary value in �, � � �� � ��.
Let � � � ��� �. That is,
� � �� � �� � �� � � �� ���� �� � �
� �� � �� �� �� � �� � �� �� ��
Notice that � � �� �� � � and � � �� �� � � and hence � � �.
However, � is the smallest positive integer in �, and � � � � �.
Hence
���
����� ��� �
����
�� � �� � � ���
��� ���
1
�� � �� � � ��
2
CSCI 124/Vora/GWU
As � is a common divisor of �and �, ����� �� � � � � � ��� ��.
��� �� � � � � � �� � �� � � � �� � ���� �� � �� � � � �
�
Now we can prove the main theorem.
Theorem: Let � � �� for some positive integer �. ��� ��� � ������ � ��� �� � �
Proof:
� Let � � �� for some positive integer �, and suppose ���� � �� such that ���� � � ��� �. Let � � ��� ��.
Then � � �� � and � � �� �. Hence:
��� � �� ��� � �� � � ����� ��
���� ��� � ��� ����� ��
��� � ����� ��
��� � �
Because � � �� � �. Hence � � �.
� Suppose ��� �� � �. Then, by the lemma, � �� � � �� ���� ���� �� � �� � �.
�� � �� � �
��� � ����� ��
�� � ��� ���� ��
���� � � ���� ��
hence ���� � �� .
Example: How many elements in ��� are invertible? What are the invertible elements?
The invertible elements are those that are relatively prime to ��. These elements are: �� �� �� �. The number of invertible elements is �.
Example: How many distinct keys for the affine cipher exist over ��� ?
There are � invertible elements, hence � values of �. There are �� values of �. Hence there is a total of �� possibilities
for the key.
Download