## algorithms – reversing a function

I published this question on mathoverflow two years ago, but I did not get an answer:

Leave $$w = a_0 cdot a_1 cdots a_ {n-1}$$ be a word of $${0,1 } ^ n$$, $$| w | = n$$

Leave $$m = sum_ {i = 0} ^ {n-1} {a_i cdot 2 ^ {n-1-i}}$$ be the corresponding binary number built
of the word.
Leave $$k = left lfloor frac {n!} {2 ^ n} right rfloor cdot (m + 1)$$ , so $$1 le k le n!$$.

Calculate the permutation of Lehmer $$pi_k$$ since $$k$$ in $$n$$ numbers.
(
https://en.wikipedia.org/wiki/Lehmer_code
)

Set $$x: = pi_k cdot w = a _ { pi_k (0)} cdot a _ { pi_k (1)} cdots a _ { pi_k (n-1)}$$

So $$f (w): = x$$.

So the function permutes the digits in the word $$w$$ and the permutation is determined by $$w$$.

Suppose you randomly choose a word from $${0,1 } ^ {1000}$$ and then the function is applied. Is it practically possible to reverse the word constructed?
I mean, does anyone have an idea about how to reverse the word?

More details can be found at:

http://orgesleka.blogspot.de/2015/09/candidate-one-way-function.html

This image shows all the words of length 7 when f is applied to those words:

## Is the sum \$ f + g \$ of two unidirectional functions a unidirectional function?

Since there is a bijection of sets of $${0,1 } ^ *$$ to $$mathbb {N_0}$$, we could see unidirectional functions as functions $$f: mathbb {N_0} rightarrow mathbb {N_0}$$. My question is, I suppose $$f, g$$ are unidirectional functions, is then $$(f + g) (n): = f (n) + g (n)$$ A unidirectional function or can a counterexample be constructed? (The length of $$n$$ is $$text {floor} ( frac { log (n)} { log (2)}) =$$ the number of bits to represent $$n$$)

## Background

I have a moderate-sized script with some commands that require root permission. I do not have `sudo` in the system in question, but I have `its`.

Instead of having the user run the script with `its`, I prefer to have the call script `its` once to execute a large subset of the commands (therefore, the user is only asked for the password once, and only if they are not yet root), which are defined as a function in my script.
However, I can not execute functions defined by script with `its` without `to export`ing, which contaminates the namespace of whoever calls my script.

## Question

Is there any way to call functions defined by script, and use global variables defined by script, in calls to `its`, without interfering with the environment of who calls my script?

## complex analysis: check that there is no analytic function in \$ {| z |

I want to prove that there is no function. $$f$$ that:

It is analytic in $${| z | <2 }$$.

$$f (0) = 1, f (1) = f (-1) = 0$$

$$| f (z) | le | z | + 1$$ for all $$z$$.

It seems logical to think about using the maximum module principle in some way. However, there are two problems. I do not know that in the limit, for example, in $$| z | <1$$, the function does not get a maximum since they only give me two points. Also, I can not use $$frac {1} {f}$$ Since the inequality is on the wrong side. I do not even know that $$frac {1} {f}$$ it is analytical

Actually, I do not see how the information that is provided helps me here.

I would appreciate help

## error: function by parts to include the SawtoothWave function

I'm trying to write a function by parts that includes the SawtoothWave function. Can someone indicate how to do this, or if it is possible within mathematics?

The code by parts is here:

``````G = -1/50; (* Gradient of G *)
P = 6; (* pulse period in seconds *)

L = 3.08 / 2; (* pulse width in dimensionless units *)
tform = 1; (* time allowed for the soliton to be formed independently, for example, 100 *)

Bell[s_, x_] : = Exp[-(x/s)^2/2]

One step[x_, t_] : = -bell[1, x] Bell[10, t - 10] + A pieces[{{G SawtoothWave[{-1, 1}, x/L + t/P]}, t> tform}, 0]Encourage[Plot[Astep[x, t], {x, -10, 10}, PlotRange -> {{-10, 10}, {-0.05, 0.05}}], {t, 0, 50}, Execution of animation -> False]
``````

The error message I receive is the following:

## Beginner: How to omit blank columns in the copy and paste function?

I am incredibly new to VBA and I have inefficiently encoded a macro to save a lot of tedious effort, but I would like to make it more efficient. The code copies and pastes a range of cells into another sheet, recalculates, copies the solution, and pastes it. Then repeat this for the next column on (Row 2) and so on until Row 15. The thing is often that rows 8-14 are empty, so they spend 5 minutes recalculating for no reason, but Row 15 is always full.

I was waiting for some help to identify and skip blank rows until row 15.

I tried to search Google for other people's codes that I can apply to my problem but I have not found anything that works.

``````& # 39; Column 1
copySheet.Range ("E8: E19"). Copy
pasteSheet.Range ("H9: H20"). PasteSpecial xlPasteValues
Application.CutCopyMode = False
Application.ScreenUpdating = True
Set copySheet = Worksheets ("Sensitivity")
Set pasteSheet = Worksheets ("Essays")
Application.Calculate
pasteSheet.Range ("L90: L91"). Copy
copySheet.Range ("E33: E34"). PasteSpecial xlPasteValues
Application.CutCopyMode = False
Application.ScreenUpdating = True

& # 39; Column 2
copySheet.Range ("F8: F19"). Copy
pasteSheet.Range ("H9: H20"). PasteSpecial xlPasteValues
Application.CutCopyMode = False
Application.ScreenUpdating = True
Set copySheet = Worksheets ("Sensitivity")
Set pasteSheet = Worksheets ("Essays")
Application.Calculate
pasteSheet.Range ("L90: L91"). Copy
copySheet.Range ("F33: F34"). PasteSpecial xlPasteValues
Application.CutCopyMode = False
Application.ScreenUpdating = True

& # 39; Column 3
``````

etc

There is no real error, it is very inefficient. The sheet takes approx. 1 minute to recalculate

## Numerical theory nt. Strong uniqueness of the totient function of Euler

Leave $$f: mathbb N to mathbb C$$ Be some arithmetic function. Define $$varphi_f (n)$$ by the following formula:

$$varphi_f (n) = sum _ { substack {k leq n \ (k, n) = 1}} f (k).$$

In other words, $$varphi_f (n)$$ is the sum of $$f$$ about the totatives of $$n$$. For example, yes $$f = delta_1 (n)$$ so $$varphi_f (n) = 1$$, Yes $$f = 1$$ so $$varphi_f (n) = varphi (n) –$$ The totter function of Euler. Assume that $$f$$ It is completely multiplicative. Examination of the first values ​​of $$f$$ (until $$approximately 40$$) shows that if $$varphi_f$$ is multiplicative only if $$f = 1$$ or $$f = delta_1$$.

Obviously, the direct analysis of 40 or more cases is not the most enlightening way to prove this type of proposition. This brings us to a slightly more general question. Let's call an arithmetic function. $$g$$ eventually multiplicative if there is a multiplicative function $$G$$ such that $$g (n) = G (n)$$ for $$n$$ large enough. It is true that if $$f$$ is completely multiplicative and $$varphi_f$$ eventually it is multiplicative then or $$f = delta_1$$ or $$f = 1$$?

## php – the best way to use a large matrix in the function

If it's just a list of numbers, I'd suggest simply saving them in a text file, with a number on each line.

``````110019
111222
112233
``````

Then, when you need the file, read its contents with PHP and use `exploit()` to convert it into an array:

``````\$ file_path = plugin_dir_path (& # 39; postcodes.txt & # 39 ;, __FILE__); // Or wherever you have placed it.
\$ file_contents = file_get_contents (\$ file_path);
\$ postcodes = preg_split ("/  r  n |  n |  r /", \$ file_contents);

if (in_array (\$ postcode, \$ postcodes)) {

}
``````

That `preg_split ()` The method for dividing text based on new lines is taken from here.

## A function to find colors of normal 5 edges of cubic graphics

It would be nice if the following were available:

Definition A edge-k-normal coloring of a cubic graph $$G$$ it is an appropriate advantage-$$k$$-coloring of the graph such that for any edge. $$e in E (G)$$, $$e$$ and the adjacent edges are colored using five colors, or only three colors.

Would there be an implementation in Mathematica to find the minimum normal border?$$k$$The colors of the cubic graphics? Keep in mind that, the theory says that if a graph has a bridge, $$k$$ It may have to be 7, but if it has no bridge, it is conjectured that there are normal 5-edge colors. And of course, if $$G$$ it is class 1, then it has a normal border-3 color. For those who practice edge coloring programming, this is probably not easy. Ideally, there is a function to find the normal 5 edge colors of the graphics without cubic bridges when they exist. For more information about normal dyes, see [1].

[1] Mazzuoccolo, G., and Mkrtchyan, V., Normal edge colorations of cubic graphics, arXiv: 1804.09449v2

## How to have a negative exponential function whose asymptote is 0?

So, I need an exponential function in the form $$e ^ {- ax}$$ that's 1 in $$x = 0$$ and approaches $$0.3$$ as $$x rightarrow infty$$. I tried to do $$e ^ {- ax} + 0.3$$, but that only leads to the function from $$1.3$$ (although he approached $$0.3$$ as $$x rightarrow infty$$)

The answer is probably very simple but it seems that I can not solve it.