Let m be a prime number and r in N. We'll define x=(x_1,...,x_r), y=(y_1,...,y_r) such that x_i ne y_i forall 1 <= i <= r.

Felix Cohen

Felix Cohen

Answered question

2022-09-04

Modular arithmetic, Discrete math.
Let m be a prime number and r N .
We'll define x = ( x 1 , . . . , x r ) y = ( y 1 , . . . , y r ) such that x i y i 1 i r
Also, let ( a 1 , . . . a r ) be a sequence of numbers such that a i Z , specifically 0 a i m 1 1 i r.
How many sequences ( a 1 , . . . a r ) exist such that ( i = 1 r a i x i ) mod m = ( j = 1 r a j y j ) mod m
I understand the concept of the question, I wrote the above equation as ( i = 1 r a i ( x i y i ) ) mod m = 0
Obviously ( x i y i ) can be anything but 0, however ( x i y i ) mod m can be 0.

Answer & Explanation

Peyton Cox

Peyton Cox

Beginner2022-09-05Added 18 answers

Step 1
If for every 1 i r we have x i y i ( mod ) m, then any values of a i ,   i = 1 , , r give a solutions, so there are mr solutions in that case.
Step 2
If not, then we may assume without loss of generality that X 1 y 1 ( mod m ). We can assign whatever values we like to a 2 , , a r and then we must take
a 1 = ( x 1 y 1 ) 1 i = 2 r a i ( x i y i ) ,
where all computations (in particular the multiplicative inverse) are performed modulo m. Thus in this case, there are m r 1 solutions.

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Discrete math

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?