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
The discussion focuses on finding the inverse of the function f(x) = (4x + 3) mod 7, defined on the integer set S = {0, 1, 2, 3, 4, 5, 6}. Participants explore the challenges of creating a single inverse function versus using piecewise definitions, ultimately confirming that f^-1 can be expressed as either 2x + 1 or 2x - 6, both mod 7. There is a debate about the nature of the mod operation, with some clarifying that it is an operator rather than a function. Additionally, the conversation touches on the invertibility of the floor function and the concept of inverse functions in set theory. The participants conclude with a better understanding of the relationship between the original function and its inverse.
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 a - n Floor[\frac{n}{a}], and therefore, can't we describe the floor function as an invertible function? I know that Floor[x] = -1/2 + x + \frac{ArcTan(Cot(\pi x))}{\pi}. 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:
Question: A clock's minute hand has length 4 and its hour hand has length 3. What is the distance between the tips at the moment when it is increasing most rapidly?(Putnam Exam Question) Answer: Making assumption that both the hands moves at constant angular velocities, the answer is ## \sqrt{7} .## But don't you think this assumption is somewhat doubtful and wrong?

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
3K
  • · Replies 31 ·
2
Replies
31
Views
4K
Replies
13
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K