Questions tagged [inverse]

In mathematics, a function y=f(x) tells us how to map input x to output y. Inverting a function (or an operator) is attempting to find a function f¯¹ that maps y to x, such that x=f¯¹(f(x)).

In mathematics, a function y = f(x) tells us how to map input x to output y. Inverting a function (or an operator) is attempting to find a function f -1 that maps y to x, such that x = f -1( f(x) ).

It is not always possible to find the inverse map, and sometimes it does not even exist.

One of the most common inverse problems is inverting an n × n matrix: only square matrices A with det(A) ≠ 0 have an inverse matrix A-1. See .

474 questions
4
votes
1 answer

Inverting permutations witn sympy

What function in sympy.combinatorics.permutations can return inverse permutation of a given permutation? Searches in Google don't give results. I can write this function, but if such has already been implemented in sympy, it will be…
User9123
  • 45
  • 3
4
votes
3 answers

How to inverse the contents of NSArray in Objective-C?

How do i inverse the contents of NSArray in Objective-C? Assume that i have an array which holds these data NSArray arrayObj = [[NSArray alloc]init]; arrayObj atindex 0 holds this: "1972" arrayObj atindex 1 holds this: "2005" arrayObj atindex 2…
suse
  • 10,503
  • 23
  • 79
  • 113
4
votes
1 answer

Deviant grep behavior for Inverse matching

I have a file containing identifiers (one per line) that I wish to run through an unspecified analysis. The analysis will, if everything runs perfectly, output another list with the same identifiers (not necessarily in the same order). However, it…
EKarl
  • 149
  • 1
  • 11
4
votes
1 answer

NTRU Pseudo-code for computing Polynomial Inverses

I was wondering if anyone could tell me how to implement line 45 of the following pseudo-code. Require: the polynomial to invert a(x), N, and q. 1: k = 0 2: b = 1 3: c = 0 4: f = a 5: g = 0 {Steps 5-7 set g(x) = x^N - 1.} 6: g[0] = -1 7: g[N] = 1 8:…
Mohammad Sepahvand
  • 17,364
  • 22
  • 81
  • 122
4
votes
1 answer

How to Create an Inverse Transformation Matrix

I'm working on an OpenGL project in Java, and it has come to point where I'd like to create the transformation matrices in my own code, so i can use them to do world-to-screen point transformations, and vice versa. I've created a Matrix class with…
jpfx1342
  • 868
  • 8
  • 14
4
votes
1 answer

Complex FFT then Inverse FFT MATLAB

I am using the FFT function in Matlab in an attempt to analyze the output of a Travelling Wave Laser Model. The of the model is in the time domain in the form (real, imaginary), with the idea being to apply the FFT to the complex output, to obtain…
KRS-fun
  • 696
  • 3
  • 9
  • 20
3
votes
6 answers

Java modular inverse

I'm doing some error correction in Java and to cut a long story short; Under mod 11: -4 mod 11 = 7 This I've confirmed by using Google's calculator and a couple of online modulo calculators, but I cannot for the life of me figure out how to do it…
Tony
  • 3,587
  • 8
  • 44
  • 77
3
votes
1 answer

Inverting a function using sympy and evaluating the inverted function gives me a wrong answer

I am trying to invert a function and evaluate the inverted function. Basically, I have the equation: y = 1 / f * ln(1+c*x) / x where c and f are numerical constants. In python, I have the following code to find x as a function of y and evaluate x…
ellipse314
  • 47
  • 3
3
votes
2 answers

Blending two functions, where one is inverse

Let me first explain the idea. The actual math question is below the screenshots. For musical purpose I am building a groove algorithm where event positions are translated by a mathematical function F(X). The positions are normalized inside the…
3
votes
3 answers

Pytorch: a similar process to reverse pooling and replicate padding?

I have a tensor A that has shape (batch_size, width, height). Assume that it has these values: A = torch.tensor([[[0, 1], [1, 0]]]) I am also given a number K that is a positive integer. Let K=2 in this case. I want to do a…
Minh-Long Luu
  • 2,393
  • 1
  • 17
  • 39
3
votes
0 answers

Determine the number of different substrings in a string in c++ and using hashing

int count_unique_substrings(string const& s) { int n = s.size(); const int p = 31; const int m = 1e9 + 9; vector p_pow(n); p_pow[0] = 1; for (int i = 1; i < n; i++) p_pow[i] = (p_pow[i-1] * p) % m; …
3
votes
2 answers

How to do an inverse orderNorm transformation (bestNormalize package) from a GAMLSS object?

My y variable (n=30,000) is distributed with very heavy tails (both positive and negative), for which the fitDist GAMLSS function selects the ST4 family. I tried to assess a GAMLSS-based regression with an explanatory variable x (pb smoothing), but…
denis
  • 199
  • 1
  • 8
3
votes
3 answers

How to calculate inverse modular exponentation in c?

I want to take modular inverse(k≥1) of integer and then multiply the result to another integer, as explain in following expression: result=((x^(-k)))*y mod z How can i implement this expression, where k≥1?
AR.5
  • 101
  • 6
3
votes
1 answer

Matplotlib: How to get the inverse function of a colormap?

In matplotlib colormaps are functions that map numbers between 0 and 1 to a 4-tuple that represents the R, G, B and A components of a color. If I have such a colormap, say plt.cm.jet, is there a way to get the inverse of that function, that is a…
Fränki
  • 69
  • 3
3
votes
4 answers

Using diff to find the portions of many files that are the same? (bizzaro-diff, or inverse-diff)

Bizzaro-Diff!!! Is there a away to do a bizzaro/inverse-diff that only displays the portions of a group of files that are the same? (I.E. way more than three files) Odd question, I know...but I'm converting someone's ancient static pages to…
leeand00
  • 25,510
  • 39
  • 140
  • 297