## How to? Generating SEO audit reports through api

I’m working on revamping our company’s website. It is currently running on wordpress but we are switching to Static Site Generation and a headless cms (Strapi) and NextJS. On wordpress we use YoastSEO premium which is a great SEO tool as it gives you up-to-date recommendations on good practices. If we move over to a headless cms we’d lose this so I am wondering if there’s a service, preferably with an API, that can be used to audit our pages for SEO good practices and that would stay up-to-date with the latest SEO rules, yes I know there’s a few out there if I do a Google search but I don’t know how trustworthy they are and I don’t wanna waste time or money. Thanks in advance for your help.

## Moment generating function of Maxima $E[t \exp(\max(X,Y))]$

Let $$X,Y$$ be two standard normal random variables with correlation coefficient $$r\in[-1,1]$$.

I’m trying to compute the moment generating function of the maxima using Mathematica:

Expectation[Exp[t Max[X, r X + Sqrt[1 - r^2] Y]],             {X \[Distributed] NormalDistribution[],              Y \[Distributed] NormalDistribution[]}] 

Since the distribution of the maximum is known to follow the Skew Normal Distribution, I can easily compute the expectation myself to be

$$e^{t^2/2} (1 + \text{erf}(\sqrt{1-r}\,t/2),$$

but Mathematica seems to get bogged down.

## Is it possible to get the true generating function of a PRNG?

Since every sequence of pseudo-random numbers must be generated by deterministic means, it has to follow some underlying mathematical expression (function-like I guess). Suposse you intend to get this underlying expression in order to predict the output of the PRNG. Even if you could predict the next pseudo-random number that the expression will generate every single time for a billion iterations (say $$n$$), you could never be sure that the process will not backfire at any given moment, as a consequence of the underlying expression being defined by some piecewise function of the kind:

$$\forall x ; g(x)=\delta$$

$$g^{\prime}(x)=\left\{\begin{array}{ll}\delta & \text { if } x

Where $$\delta$$ and $$\delta’$$ are distinct mathematical expressions as a function of $$x$$ and n is an arbitrarily large threshold. I have to attempt such a feat (predicting the next random number that a PRNG will output) with machine learning tools, and this observation, although perhaps of triviality, may be of importance, at least to clear out that I will not be able to find any definite solutions to the task, only partial and working solutions.

My issue is that I lack solid or even basic knowledge of the fundamentals of mathematical proving, and I am not even sure if the above counts as a rigurous proof, or if there is a way to formally express the thought. My inquiry would be to know if I am mistaken in my assessment and, otherwise, to obtain a formal proof to include this in my work in a respectable manner. Any thoughts and remarks are welcomed.

## Marginal Probability of Generating a Tree

Fix some finite graph $$G = (V, E)$$, and some vertex $$x$$.

Suppose I generate a random sub-tree of $$G$$ of size $$N$$, containing $$x$$, as follows:

1. Let $$T_0 = \{ x \}$$.
2. For $$0 < n \leqslant N$$

i. Let $$B_n$$ be the set of $$y \in V$$ such that $$y \notin V(T_{n-1})$$, and such that $$(x, y) \in E \text{ for exactly one } x \in V(T_{n-1})$$.

ii. Form $$T_n$$ by

• Selecting some $$y_n \in B_n$$ with probability $$q_n (y_n | T_{n-1} )$$,
• Adding it to $$T_{n-1}$$, and
• Adding the edge between $$y$$ and its neighbour in $$V (T_{n-1})$$.
3. Return $$T_N$$.

Suppose also that $$q_n (y_n | T_{n-1} )$$ can be computed easily for all $$(T_{n-1}, y_n)$$. I am interested in efficiently calculating the marginal probability of generating the tree $$T_N$$, given that I began growing it at $$T_0 = \{ x \}$$, i.e.

$$P(T_N | T_0 = \{ x \}) = \sum_{y_1, \cdots, y_N} \prod_{n = 1}^N q_n (y_n | T_{n-1} ).$$

My question is essentially whether I should expect to be able to find an efficient (i.e. polynomial-time) algorithm for this, and if so, what it might be.

Some thoughts:

• Naively, the sum has exponentially-many terms, which precludes trying to evaluate the sum directly.

• On the other hand, this problem is also highly-structured (trees, recursion, etc.), which might suggest that some sort of dynamic programming approach would be feasible. I’m not sure of exactly how to approach this.

• Relatedly, I know how to calculate unbiased, non-negative estimators of $$P(T_N | T_0 = \{ x \})$$, which have reasonable variance properties, by using techniques from Sequential Monte Carlo / particle filtering. This suggests that the problem is at least possible to approximate well in a reasonable amount of time.

## Generating QR-Code for 2fa from google maps api risky?

I am currently using 2 factor authentification to tighten security for my login system. I use Google Authenticator to scan a QR Code, which generates a key which I can use to login.

What worries me with my implementation is the way I create my QR Code in php using this API:

'https://chart.googleapis.com/chart?chs='.$width.'x'.$  height.'&chld='.$level.'|0&cht=qr&chl='.$  url_containing_secret.'' 

Using the maps API seems a bit unsafe since im basically sharing my secret through http. Isnt this actually risky? Im seriously considerung create the qrcode using some library instead of an external api.

Am I too paranoid or?

## Generating trusted random numbers for a group?

Alice and Bob need to share some cryptographically-secure random numbers. Alice does not trust Bob, and Bob does not trust Alice. Clearly, if Alice generates some numbers, and hands them to Bob, Bob is skeptical that these numbers are, in fact, random, and suspects that Alice has instead generated numbers that are convenient for her.

One naive method might be for each of them to generate a random number, and to combine those numbers in some way (e.g. xor). Since they must be shared, and someone has to tell what theirs is first, we might add a hashing scheme wherein:

1) Alice and Bob each generate a random number, hash it, and send it the hash to the other (to allow for verification later, without disclosing the original number). 2) When both parties have received the hash, they then share the original number, verify it, xor their two numbers, and confirm the result of the xor with each other.

However, this has a number of problems (which I’m not sure can be fixed by any algorithm). Firstly, even if Alice’s numbers are random, if Bob’s are not, it is not clear that the resulting xor will then be random. Secondly, I’m not certain that the hashing scheme described above actually solves the “you tell first” problem.

Is this a viable solution to the “sharing random numbers in non-trust comms” problem? Are there any known solutions to this problem that might work better (faster, more secure, more random, etc)?

## What is the running time of generating all $k$ combinations of $n$ items $\binom{n}{k}$?

I was solving the following problem, just for reference (441 – Lotto). It basically requires the generation all $$k$$-combinations of $$n$$ items

void backtrack(std::vector<int>& a,                int index,                std::vector<bool>& sel,                int selections) {     if (selections == 6) { // k is always 6 for 441 - lotto         //print combination         return;     }     if (index >= a.size()) { return; } // no more elements to choose from     // two choices     // (1) select a[index]     sel[index] = true;     backtrack(a, index+1, sel, selections+1);      // (2) don't select a[index]     sel[index] = false;     backtrack(a, index+1, sel, selections);  } 

I wanted to analyze my own code. I know at the top level (level = 0), I’m making one call. At the next level (level=1) of recursion, I have two calls to backtrack. At the following level, I have $$2^2$$ calls. The last level would have $$2^n$$ subproblems. For each call, we make $$O(1)$$ work of selecting or not selecting the element. So the total time would be $$1+2+2^2+2^3+…+2^n = 2^{n+1} – 1 = O(2^{n})$$

I was thinking since we’re generating $$\binom{n}{k}$$ combinations that there might be a better algorithm with a better running time since $$\binom{n}{k}=O(n^2)$$ or maybe my algorithm is wasteful and there is a better way? or my analysis in fact is not correct? Which one is it?