How can mathematical induction be used to prove a modular arithmetic problem?

  • Thread starter Bipolarity
  • Start date
  • Tags
    Arithmetic
In summary, the conversation discusses proving a statement in modular arithmetic using a set of natural numbers and two additional numbers m and p. The statement involves taking the remainder after dividing by m when adding all the numbers in the set together. The suggested method for proving the statement is mathematical induction.
  • #1
Bipolarity
776
2
I'm trying to prove something in modular arithmetic that I came upon across my studies in comp sci. Consider a set of natural numbers [itex] {n_{1},n_{2},n_{3},...n_{k}} [/itex]

Consider two more natural numbers [itex]m[/itex] and [itex]p[/itex] such that

[tex] (\sum^{k}_{i=1}n_{i} ) \ mod \ m = p [/tex]

Now prove that

[itex]((((n_{1} \ mod \ m + n_{2}) \ mod \ m + n_{3}) \ mod \ m + n_{4}) \ mod \ m + ... + n_{k}) \ mod \ m = p [/itex]

All help would be appreciated.

BiP
 
Mathematics news on Phys.org
  • #2
Hey bipolarity.

I'm just unsure about what the modulus term is. For example is it (a mod (m + n2)) or is it a mod m + n2 etc.
 
  • #3
chiro said:
I'm just unsure about what the modulus term is. For example is it (a mod (m + n2)) or is it a mod m + n2 etc.
I think he means:

[itex]mod_m( ... (mod_m( mod_m(n_{1}) + n_{2})) ... + n_{k})[/itex]
 
  • #4
Sorry! Thanks rcgldr for clarifying what I meant.
I meant the divisor in the modulus operator is always 'm'.

So basically you are adding the next number, then taking the remainder after dividing by m. Then again you are adding the next number, then taking the remainder after dividing by m. You do this until you run out of numbers, at which point you finally take the remainder after dividing by m. The final answer should be 'p'. But I'm trying to prove it.

BiP
 
  • #5
Bipolarity said:
Sorry! Thanks rcgldr for clarifying what I meant.
I meant the divisor in the modulus operator is always 'm'.

So basically you are adding the next number, then taking the remainder after dividing by m. Then again you are adding the next number, then taking the remainder after dividing by m. You do this until you run out of numbers, at which point you finally take the remainder after dividing by m. The final answer should be 'p'. But I'm trying to prove it.

BiP

Thanks Bipolarity.

This looks like a good candidate for mathematical induction. The first case is trivial because n1 MOD m and n1 MOD m are the same so proven for n = 1.

I think I know how you could do it but I'll ask you for your thoughts and any work that you have for solving the problem in your own terms (we encourage that highly here on PF).
 

1. What is modular arithmetic?

Modular arithmetic is a mathematical system that deals with integers and their remainders when divided by a fixed number. It is often used to solve problems involving periodic or cyclic patterns.

2. How is modular arithmetic used in cryptography?

Modular arithmetic is used in cryptography to encrypt and decrypt messages. It allows for the creation of a secret key that can be used to encode and decode messages, making it difficult for unauthorized users to access the information.

3. Can modular arithmetic be used with negative numbers?

Yes, modular arithmetic can be used with negative numbers. In this case, the remainder is always a positive number. For example, -5 mod 3 would be equivalent to 1 mod 3.

4. What is the difference between modular arithmetic and regular arithmetic?

The main difference between modular arithmetic and regular arithmetic is the use of a fixed number, known as the modulus. In regular arithmetic, there is no restriction on the numbers being used, whereas in modular arithmetic, the numbers are always kept within the range of the modulus.

5. How is modular arithmetic used in computer programming?

Modular arithmetic is used in computer programming for tasks such as generating random numbers, calculating hash codes, and checking for errors in data transmission. It is also used in algorithms for tasks like finding the shortest path between two points.

Similar threads

Replies
11
Views
488
Replies
4
Views
946
  • Quantum Physics
Replies
9
Views
793
  • General Math
Replies
12
Views
4K
Replies
1
Views
1K
Replies
4
Views
2K
Replies
1
Views
2K
  • General Math
Replies
4
Views
1K
Replies
4
Views
2K
Back
Top