Is There a Formula for the Inverse of the Mod Function?

  • Thread starter Thread starter alec_tronn
  • Start date Start date
  • Tags Tags
    Function Inverse
Click For Summary

Homework Help Overview

The problem involves finding a formula for the inverse of a function defined on a subset of integers using the modulus operation. The function is given as f(x) = (4x + 3) mod 7, and the original poster expresses uncertainty about creating a single inverse function for all values.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss the nature of the mod function and whether it can be treated as a function. There are attempts to calculate specific values of the function and its inverse, with some participants suggesting alternative representations of the inverse. Questions arise about the use of the floor function in relation to the mod function and its invertibility.

Discussion Status

The discussion is ongoing, with participants providing calculations and interpretations of the function and its inverse. Some guidance has been offered regarding the equivalence of different forms of the inverse function, and there is an exploration of the implications of using the mod operator in the context of the problem.

Contextual Notes

There are mentions of confusion regarding terminology, specifically the distinction between "mod function" and "mod operator." Additionally, the original poster expresses uncertainty about the completeness of their proposed solution and the implications of including mod notation in their final expression.

alec_tronn
Messages
29
Reaction score
0

Homework Statement


Let S be the subset of the integers {0, 1, 2, 3, 4, 5, 6}, and let f be the function from S to S defined by f(x) = (4x+3) mod 7. Find a formula for f<superscript>-1 (the inverse of f, I don't know how to type that).


Homework Equations


I know that the mod function is defined by floor function (a - n floor(n\a). But I'm still unable to create an inverse function with one inverse function for all values. I made a piecewise function that works for those values, but I feel like there should be a better method. Does anybody know an inverse rule for either floor or modulus?


The Attempt at a Solution


f(x) = {2x+1, 0 <= x <= 2}
{2x-6, 3 <= x <= 6}
 
Physics news on Phys.org
The 'mod' function? There is no such thing.

mod is not a function.

Just do it as for any other function:

y=4x+3, hence x= (y-3)/4, so what is division by 4 in mod 7 arithmetic?
 
The first thing you should do is calculate the actual values of f:
f(0)= 4(0)+ 3= 3. f(1)= 4(1)+ 3= 7= 0 mod 7. f(2)= 4(2)+ 3= 11= 4 mod 7.
f(3)= 4(3)+ 3= 15= 1 mod y. f(4)= 4(4)+ 3= 19= 5 mod 7. f(5)= 4(5)+ 3= 23= 2 mod 7. f(6)= 4(6)+ 3= 27= 6 mod 7

So you want f-1(0)= 1, f-1(1)= 3, f-1(2)= 5, f-1(3)= 0, f-1(4)= 2, f-1(5)= 4, f-1(6)= 6.

Yes, that's exactly what your function gives. Good work! That is, by the way, a single "function" and I have no problem with it. However, you might remember that -6 is 1 in mod 7. Since the first formula was given "mod 7" why not do the same with this:
f-1(x)= 2x+ 1 (mod 7) or f-1(x)= 2x- 6 (mod 7)
They are exactly the same.
 
matt grime said:
The 'mod' function? There is no such thing.

mod is not a function.

My apologies... mod "operator" (or modulo operator); I was just asking if there was an inverse operator that I could use so I could switch the x and y variables and solve for x instead of switching the values around and making an entirely new function.


HallsofIvy said:
Yes, that's exactly what your function gives. Good work! That is, by the way, a single "function" and I have no problem with it. However, you might remember that -6 is 1 in mod 7. Since the first formula was given "mod 7" why not do the same with this:
f-1(x)= 2x+ 1 (mod 7) or f-1(x)= 2x- 6 (mod 7)
They are exactly the same.

Thanks a lot! I'm not sure that putting the (mod 7)'s in there like that truly give any more information, although I see how it looks more related to the beginning function, and I see how your solution and mine are equivalent. I'm not sure what I'll end up submitting. Thanks again.
 
I was wondering, though, since (a)mod(n) can be written in terms of the floor function, thus [tex]a - n Floor[\frac{n}{a}],[/tex] and therefore, can't we describe the floor function as an invertible function? I know that [tex]Floor[x] = -1/2 + x + \frac{ArcTan(Cot(\pi x))}{\pi}[/tex]. Thus, can't we inverse this formula? Furthermore, there is another idea that works on any function, but deals with sets. In general, given a function f: A → B and a subset S of B, then f-1(S) = {x ∈ A | f(x) ∈ S}. In the case of the floor function, if n is an integer, then floor-1({n}) = [n, n + 1). Note that these are sets, not numbers.

Please let me know as I am saying these things right off of the top of my head.
 
Last edited:

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 31 ·
2
Replies
31
Views
5K
Replies
13
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K