```
$toJson = array();
$arr = array_push($toJson, array(
'numero_casas' => $n,
'token' => $myToken,
'cifrado' => $criptografada,
'decifrado' => $desCriptografada,
'resumo_criptografico' => $rc
));
echo $toJson;
$exitJson = json_encode($toJson);
echo $exitJson;
$file = fopen("answer.json","w+");
fwrite($file, $exitJson);
```

# Tag: variables

## mathematical optimization – FindMinimum, where variables are integers

I want to find the minimum of a function where the variables are integers. Here is a simple example of a minimum of work (my actual function is much more complicated).

```
ClearAll(f);
f({i1_, i2_}) := N(Total(1 + Sin(#) & /@ {i1, i2}));
FindMinimum({f({i1, i2}),
0 < i1 < 11 && 10 < i2 < 21 && {i1, i2} (Element) Integers}, {{i1,
5}, {i2, 15}})
```

The result is an error message stating that integers are only allowed for linear programming.

Is there a technique to solve this kind of problem? Thank you very much

## html – Add Variables in Javascript

Hi! I have the following code:

```
$(document).ready(function(){
$('.buttonAdd').click (function(){
$(this).closest('.row').find('.inputQtd').val();
var iqtd = $(this).closest('.divAddProdutosPagamentos').find('.inputQtd');
var qtd = Number(iqtd.val());
iqtd.val(qtd+1);
var badgeCount = badgeCount + qtd+1;
$('#badgeCarrinho').text(badgeCount);
});
});
```

Basically, each time the user clicks ".buttonAdd", another one is added.

The system is a shopping cart, so there are several products in the shopping cart.

My badgeCount variable should show the total number of items in the shopping cart. So if you've added 2 rice and 2 beans, my badgeCount variable should show 4.

In Java it's easy, I'm badgeCount + = amount. The total is saved. But I can not do that in Javascript.

Could someone help me? The picture is for a better explanation:

As you can see, there are 3 items in my shopping cart, and I want my badgeCount variable to store the sum of these 3 items (in this case 6).

(The badgeControl variable is displayed in the upper right corner next to the shopping cart icon.)

## Graph Theory – Combinatorial system of equations with exponentially many equations in quadratic many variables

A particular question about graph theory (about the existence of graphs with a particular color inherited by perfect matches) can be translated into the satisfiability problem of a set of equations (formulated by Michael Engelhardt).

To let $ X_i $ be indexed by an integer $ 1 leq i leq n $, and $ x_i in {0,1, ldots, c-1 } $, We have variables $ omega_ {X_i, X_j, x_i, x_j} in mathbb {C} $ (With $ omega_ {X_j, X_i, x_j, x_i} = omega_ {X_i, X_j, x_i, x_j} $).

For a solid $ n $ and $ c $We ask if there are a number of $ omega_ {X_i, X_j, x_i, x_j} $ This solves the following equation system sentence for each value of the variable $ x_i $:

$$

sum_ {m = 1} ^ {n!} prod_ {j = 1} ^ {n / 2} omega_ {X_ {P ^ {(m)} (2j-1)}, X_ {P ^ {( m)} (2j)}, x_ {P ^ {(m)} (2j-1)}, x_ {P ^ {(m)} (2j)}} = prod_ {i = 1} ^ {n- 1} delta_ {x_i, x_ {i + 1}}

$$

Where $ P ^ {(m)} (k) $ refers to the $ k $entry in the $ m $Permutation of $ 1,2, lpoints, n $,

The only known cases are $ c = 2 $ for everyone $ n $, and $ c = 3 $ to the $ n = 4 $, A solution for $ c = 3 $ to the $ n = 4 $ is

$$ omega_ {X_1, X_2,0,0} = frac {1} {8}, omega_ {X_3, X_4,0,0} = frac {1} {8} $$

$$ omega_ {X_1, X_3,1,1} = frac {1} {8}, omega_ {X_2, X_4,1,1} = frac {1} {8} $$

$$ omega_ {X_1, X_4,2,2} = frac {1} {8}, omega_ {X_2, X_3,2,2} = frac {1} {8} $$

and everything else $ omega_ {X_i, X_j, x_i, x_j} = 0 $,

Question 1:Does this equation have other solutions than $ (n, c = 2) $ and $ (n = 4, c = 3) $?

It is likely that the answer to this question is no, because

- For the special case $ omega_ {X_i, X_j, x_i, x_j} in mathbb {R _ +} $Ilya Bogdanov has proved with graph theory methods that these are the only solutions.
- The number of equations to be fulfilled increases $ c ^ n $while the number of free variables $ omega_ {X_i, X_j, x_i, x_j} $ just grow as $ c ^ 2 frac {n (n-1)} {2} $,

Nevertheless, no answer is known for any other case.

Question 2: Have you ever seen similar or related systems of equations or problems in general?

The source of the problem lies in quantum physics.

## Common probability distributions with 5 dependent discrete variables

I'm curious if there is an equation that shows the difficulty of making a final distribution out of 5 dependent discrete variables. From the examples I found, the equations consist of two variables, and I am not sure how to formulate an equation to get 5 or more variables.

## cv.complex variables – In the Dirichlet series for $ 1 / zeta (s) $ for real $ s $ and the zeros of zeta

To the $ Re (s)> 1 $, it is well known that

$$ frac {1} { zeta (s)} = sum_ {n = 1} ^ { infty} frac { mu (n)} {n ^ s} $$ Where $ mu $ denotes the Mobius function and $ zeta $ is the Riemann zeta function. I have heard that if the series on the right has an analytical continuation REAL $ s_ {0} in (1/2, 1) $, then $ zeta (s) neq 0 $ for each $ s $ With$ Re (s) = s_0 $, But since all non-trivial zeros of the zeta function are complex, why does the analytic continuation of the mentioned series occur? *real* Values of $ s $ something to do with that *complex* Zeros?

## Theming – TWIG template file passes variables

Basically, I create a bridge status monitor. I built this within views.

There are 3 main options: Open, Closed, Restrictions (conditional logic displays them in the form).

I managed to change the template of the view block to accept the output and change it and display it in certain HTML classes.

However, I noticed that the variable {output} does not move to another viewport block branch file. Therefore, I can not execute conditional logic on the output in this view.

& # 39;

### bridge status

{% if output == "Open"%}

Bridge OPENNo restrictions exist

{% elseif output == "Restrictions"%}

Restrictions are available

{% elseif output == "Closed"%}

Bridge CLOSED

{% endif%}

{% if logged in%}

To edit

{% endif%} & # 39;

^ This is from the file that contains the output and as such works fine, but I need that variable in the other template.

I realize that I probably do not explain that very well, but let me know if you understand where I come from.

## cv.complex variables – Simultaneous unification of Bers

I tried to understand Bers famous paper "Simultaneous Uniformization". For this post I have some questions. Any kind of help is appreciated.

To let $ S $ and $ S ^ {& # 39;} $ to be two abstract Riemann surfaces and $ f: S rightarrow S ^ {& # 39;} $ a homeomorphism of limited eccentricity (it can be thought of as a quasi-conforming map, although QC maps by definition retain their orientation, but here $ f $ may also be a reversal of orientation) and such a couple $ (S, (f), S ^ {& # 39;}) $ is called a coupled pair, where $ (f) $ denotes the homotopy class of $ f $, A coupled pair means $ textit {odd} $ if $ f $ is orientation reversal and $ textit {even} $ if it is orientation-preserving. Now two coupled pairs $ (S, (f), S ^ {& # 39;}) $ and $ (S_ {1}, (f_ {1}), S ^ {& # 39;} _ {1}) $ are considered equivalent, if any $ textbf {compliant homeomorphisms} $ $ h $ and $ h ^ {& # 39;} $ so that $ h (S) = S_ {1} $. $ h ^ {& # 39;} (S ^ {& # 39;}) = S ^ {& # 39;} _ {1} $ and $ (h ^ {& # 39;} circ f circ h ^ {- 1}) = (f_ {1}) $

$ textbf {Question 1:} $ What does it mean to be a …? $ textbf {compliant homeomorphism} $ between two abstract Riemann surfaces?

Second, suppose $ m $ is a Beltrami differential on a Riemann surface $ S _ { circ} $This Beltrami differential defines a metric $ S _ { circ} $This metric in turn defines a compliant structure $ S _ { circ} $ and this leads to a new complex structure (since there is a one-to-one correspondence between complex structures down to biholomorphism and conformal structures to isometry), name the resulting Riemann surface $ S _ { circ} ^ {m} $ , That's why we have a new straight couple $ (S _ { circ} ^ {m}, (Id), S _ { circ}) $, Where $ (Id) $ is the homotopy class of the identity card and an odd coupled pair $ (S _ { circ} ^ {m}, ( iota), bar {S _ { circ}}) $, Where $ iota $ denotes the natural picture of $ S _ { circ} $ on his reflection $ bar {S _ { circ}} $,

$ bar {S _ { circ}} $ is defined by replacing each local uniformization $ xi $ on $ S _ { circ} $ by $ bar { xi} $,

$ textbf {Question 2:} $ What is the explicit description of the map $ iota $ ?

$ textbf {Question 3:} $ Accept $ (S, (f), S ^ {& # 39;}) $ is an odd paired pair. How then can one show that this pair (as defined above) corresponds to one of the forms? $ (S _ { circ} ^ {m}, ( iota), bar {S _ { circ}}) $ ? (That can be assumed $ S $ hyperbolic universal covering)

## Probability theory – approximation for the sum of random variables

I have an exact CDF ($ F_ {X_i} (x) $) and PDF ($ f_ {X_i} (x) $) of a random variable $ X_i geq 0 $ which contains special functions. I needed an approach around that $ x = 0 $I have therefore derived an approximation as

$$ F_ {X_i} (x) approximately one x log (a x) $$

$$ f_ {X_i} (x) approx-a ( log (a x) +1) $$

Where $ a> 0 $and this CDF is tight.

However, I now need the CDF from

$$ Y = sum_ {i = 1} ^ {N} X_i $$

Where $ X_i $s are i.i.d.

I tried to tie this $ left (F_ {X_i} (x) right) ^ N $ or $ left (F_ {X_i} (x / N) right) ^ N $, I found that these are too loose for little ones $ N $,

If someone has a good idea, deduce $ F_Y (y) $ more precisely with small ones $ x $, please share with me.

## Statistics – Why is this inequality of truncated random variables correct?

Given an order $ X_k $ from $ k $ independent random variables reading book says I can form "truncated" random variables, i.

$ X_k (n) = X_k cdot textbf {1} _ { { omega: | X_k ( omega) | leq n }} $

Where $ omega $ means a result from the sample space. Define $ S_n $ and $ has {S} _n $ as:

$$

S_n = X_1 + X_2 + … + X_n

$$

$$

has {S} _n = X_1 (n) + X_2 (n) + … X_n (n)

$$

So that means that $ has {S} _n $ is the sum of $ n $ truncated random variables. We also define $ m_n $ as:

$$

m_n = mathbb {E} (X_1 (n))

$$

Since the variable distributions (of $ X_k $) are the same ones we have $ m_n = mathbb {E} (X_k (n)) $ for all $ k geq 1 $,

The book reads that the following inequality is "evident" where given $ epsilon> 0 $, we have:

$$

P bigg ( big | frac {S_n} {n} – m_n big | geq epsilon bigg) leq P bigg ( big | frac { has {S} _n} {n} – m_n big | geq epsilon bigg) + P bigg ( has {S} _n neq S_n bigg)

$$

But I'm not clear at all and I got lost. How can we have the above inequality? (ie we could get some big ones $ X_k $ in the $ S_n $so that the left term is much larger than the truncated right term).