[Algebra] Proving equations involving modulo functions.

In summary: So, n - cd must be the remainder, a, because it is the only value left to make up the difference between n and cd. Therefore, n mod d = n - d*floor(n/d).In summary, the conversation discusses the properties of the modulo function and how it can be used to rewrite expressions. The statement being proven is that the floor of n/d is equal to (n-n mod d)/d. The conversation also discusses the intuition behind this statement and how it can be formalized using the definition of the modulo function. It is stated that the modulo function is defined as a number between 0 and d such that there exists an integer c such that n=cd+a. It is also mentioned that taking d
  • #1
ellipsis
158
24
I would like to know some general properties of the modulo (remainder) function that I can use to rewrite expressions. For example, say we wanted to prove the following by rewriting the right-hand-side:

$$ \Big{\lfloor} \frac{n}{d} \Big{\rfloor} = \frac{n - n \pmod d}{d} $$

I have no idea how to prove this statement formally. Intuitively, ##n \pmod d## is the remainder of whatever ##\big{\lfloor} \frac{n}{d} \big{\rfloor}## is, and therefore

$$ n \pmod d = n - d \Big{\lfloor} \frac{n}{d} \Big{\rfloor}$$

Which, when we insert it into the right-hand side of what I'm trying to prove, results in:

$$ \frac{n - (n - d \big{\lfloor} \frac{n}{d} \big{\rfloor})}{d} $$

Which, thankfully, boils down to:


$$ \Big{\lfloor} \frac{n}{d} \Big{\rfloor} $$

What I want to know is: How do I formalize the beginning of this proof? Is there some general property or definition of the modulo function which I can invoke to justify that step?
 
Mathematics news on Phys.org
  • #2
a = n mod d is defined as a number between 0 and d such that there exists an integer c such that n = cd+a.
When you take d*floor(n/d), you are essentially saying that floor(n/d) = c. That is, there is no integer larger than c such that cd is less than or equal to n.
 

1. What is a modulo function in algebra?

A modulo function, denoted by the symbol %, is a mathematical operation that returns the remainder when one integer is divided by another. For example, 7 % 3 would return a value of 1, because 3 goes into 7 twice with a remainder of 1.

2. How do you prove equations involving modulo functions?

To prove an equation involving modulo functions, you must show that the equation holds true for all possible values of the modulo. This can be done by substituting different values for the modulo and showing that the equation still holds true.

3. Can an equation involving modulo functions have multiple solutions?

Yes, an equation involving modulo functions can have multiple solutions. This is because the modulo function returns the remainder, which can have multiple values depending on the divisor.

4. Are there any specific rules or properties for working with modulo functions in algebra?

Yes, there are several rules and properties that apply to modulo functions in algebra. Some of these include the distributive property, associative property, and commutative property. It is important to understand these properties when working with modulo functions to simplify equations and find solutions.

5. How are modulo functions used in real-life applications?

Modulo functions are commonly used in computer programming to calculate remainders, which is useful in tasks such as determining if a number is even or odd, or in creating loops. They are also used in cryptography to generate secure encryption keys and in telecommunications to efficiently allocate channel resources.

Similar threads

Replies
1
Views
1K
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
483
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
Replies
4
Views
425
Replies
1
Views
3K
  • Special and General Relativity
Replies
1
Views
583
Replies
2
Views
1K
Back
Top