text:
# Explanations of the Outputs¶

## Brief description of the procedure¶

BEST models the data as samples from a t-distribution, which is a distribution much like the Gaussian (normal) distribution, with an additional parameter that controls the prevalence of outliers. After assigning a prior distribution to the parameters, these distributions are updated in accordance with how well each parameter setting fits the data, resulting in the so-called posterior distribution. (The model used by this library is not exactly like the one described in (Kruschke, 2013); the Model history page gives an exact description.)

The resulting t-distributions can be plotted with the plot_data_and_prediction() function, whose output is a figure like this:

## Variables¶

A BestResults object contains posterior samples of every variable of the model – meaning . Most of the variables are plotted by plot_all(), but any variable can be plotted separately with plot_posterior(). The posterior samples of a given variable (e.g., Mean) can be extracted from a BestResults object (called best_out) as best_out.trace['Mean'].

The result of a one-group analysis (i.e., a BestResultsOne object) has samples of the following variables:

• Mean: mean of the t-distribution that models the data. Denoted as μ.
• Sigma: scale parameter of the t-distribution that models the data. Denoted as σ.
• Normality: “normality” parameter of the t-distribution. For details, see below. Denoted as ν.
• SD: standard deviation of the t-distribution. Equal to $$\sigma \sqrt{\nu / (\nu - 2)}$$. Often denoted as “sd”.
• Effect size: the difference between the mean and the given reference value, relative to the standard deviation. For each credible combination of means and standard deviations, the effect size is calculated as $$(\mu - \mathrm{ref\_val}) / \mathrm{sd}$$.

Some undocumented variables, such as Log sigma, are used only as a means to an end (in this case, to calculate Sigma).

The result of a two-group analysis (i.e., a BestResultsTwo object) has samples of the following variables:

• Group 1 mean: mean of the t-distribution that models group 1. Denoted as $$\mu_1$$.
• Group 1 sigma: $$\sigma$$ parameter of the t-distribution that models group 1. Denoted as $$\sigma_1$$.
• Group 1 SD: standard deviation of the model of group 1. Denoted as $$\mathrm{sd}_1$$.
• Group 2 mean: mean of the t-distribution that models group 2. Denoted as $$\mu_2$$.
• Group 2 sigma: $$\sigma$$ parameter of the t-distribution that models group 2. Denoted as $$\sigma_2$$.
• Group 2 SD: standard deviation of the model of group 2. Denoted as $$\mathrm{sd}_2$$.
• Normality: “normality” parameter of the t-distributions of both groups. For details, see below. Denoted as $$\nu$$.
• Difference of means: the difference of the means of the two groups. Calculated as $$\mu_1 - \mu_2$$.
• Difference of SDs: the difference of the standard deviations of the two groups. Calculated as $$\mathrm{sd}_1 - \mathrm{sd}_2$$.
• Effect size: difference of the means, relative to the average standard deviation of the groups. For each credible combination of means and standard deviations, the effect size is calculated as $$(\mu_1 - \mu_2) \,\big/\, \sqrt{(\mathrm{sd}_1^2 + \mathrm{sd}_2^2) \,/\, 2}$$.

## Normality¶

The normality parameter of Student’s t-distribution (denoted by the Greek letter nu, $$\nu$$) controls the likelihood of strong outliers: the larger this parameter, the more centered the distribution, meaning data points far from the mean are less likely. We refer to this parameter as “normality” – instead of the conventional “degrees of freedom” [1] – because a $$t_\nu(\mu, \sigma)$$ distribution approximates a $$\mathrm{Normal}(\mu, \sigma)$$ distribution increasingly better as $$\nu$$ increases. The below figure plots t-distributions with different normality parameters, with the important difference in the tails of the distributions:

The Normality plot produced by plot_all() shows credible values of the normality parameter in the t-distribution. The values are shown on a logarithmic scale, because the shape of the t-distribution changes noticeably for values of $$\nu$$ near 3 but changes relatively little for $$\nu > 30$$. If the Normality histogram shows that most of the likely values of $$\nu$$ are relatively low (below ~10), then the credible t-distributions are heavy-tailed to accommodate outliers in the data; if $$\nu$$ is large (above ~30), the distributions of the groups are nearly normal.

## Plots: mean vs. mode¶

The current implementation shows the mean of the posterior samples for distributions that are usually symmetric (such as the mean of a group), and the mode used for distributions that are usually skewed (such as the standard deviation), in accordance with the original publication (Kruschke, 2013). This behavior may change in the future.

In any case, it is advised to note the HPD interval together with the mean or the mode.

Footnotes

 [1] Whereas the “degrees of freedom” name arises from how the t-distribution is commonly used, which is not intrinsic to the distribution.


text:
# Approximating the impact of inflation

The other day someone mentioned to me a rule of thumb that he was using to estimate the number of years $n$ it would take for inflation to destroy half of the purchasing power of today’s money:
$$n = \frac{70}{p}$$
Here $p$ is the inflation in percent, e.g. if the inflation rate is $2\%$ then today’s money would buy only half of today’s goods and services in 35 years. You can also think of a saving account with an interest rate of $2\%$ that would double your money in 35 years.

It is not difficult to derive this formula. The starting point is:
$$2K = K (1 + \frac{p}{100})^n$$
This is equivalent to:
$$2 = (1 + \frac{p}{100})^n$$
Taking the log gives:
$$\log(2) = n \log(1 + \frac{p}{100})$$
The first term of the Taylor series approximation of $\log(1+x)$ for small $x$ is $x$. Hence for small $p$ I can set:
$$\log(2) \doteq n \, \frac{p}{100}$$
Next I have to estimate the value for $\log(2)$. Writing it as an integral leads to:
$$\log(2) = \int_1^2 \frac{1}{x} \,dx$$
Using Simpson’s rule I can approximate the integral with:
$$\int_1^2 \frac{1}{x} \,dx \doteq \frac{2-1}{6} (1+4\frac{2}{1+2}+\frac{1}{2} ) = \frac{25}{36} \doteq 0.7$$
Thus,
$$n \doteq \frac{70}{p}$$
Plotting the two formulas against each other reveals that the approximation works pretty well, even for inflation rates up to 10%.

### R Code

Here is the R code to reproduce the plot.
curve(70/x, from=1, to=10,       xlab=“Inflation rate p%”,       ylab=“Number of years for purchaing power to half”,       main=“Impact of inflation on purchasing power”,      col=“blue”,       type=“p”, pch=16, cex=0.5)curve(log(2)/(log(1+x/100)),       from=1, to=10, add=TRUE,       col=“red”)legend(“topright”,        legend=c(“70/p”,“log(2)/log(1+p/100)”),        bty=“n”,       col=c(“blue”, “red”),        pch=c(16,16), pt.cex=c(1,1))

format: plain


text:
# Does mentioning Product Identity-protected things in a comparison violate the OGL?

I have a homebrew setting that involves a heavily-modified cosmology. None of my planes are identical to the "standard" planes, and the re-used names are only generic ones with heavily-modified meanings. In fact, the only two with identical names are the Astral Plane and the Abyss.

I would like to publish (on a wiki, and potentially more formally) a concordance of sorts for players more familiar with other cosmologies. Basically, a table mapping my_plane to closest standard_plane(s). This would be both for mechanical purposes (any spell that says it involves the <y> standard plane instead uses the <x> custom plane) and for thematic shorthand (generally, beings who live in the <y> standard plane live in <x> custom plane instead).

Can I, without violating the OGL, actually do this by referencing the actual WotC-published, stock-5e-cosmology plane names? If that's all I do with those names is mention them (without any of the details)?Or is there another sane, understandable way of accomplishing this same task without risking an OGL violation?

From what I can tell, this would fall under nominative fair use as defined in the link:

Nominative fair use permits use of another’s trademark to refer to the trademark owner’s actual goods and services associated with the mark. Nominative fair use generally is permissible as long as (1) the product or service in question is not readily identifiable without use of the trademark, (2) only so much of the mark as is reasonably necessary to identify the product or service is used and (3) use of the mark does not suggest sponsorship or endorsement by the trademark owner.

• I am not entirely sure this is the best place for this question (although I am not going to vote for closing). While it is related to D&D (thus RPG), it is more of a... legal question? And the expertise you are looking for is not exactly the one from people that play RPGs, rather, it's legal advice. Jun 23, 2020 at 3:18
• The reason I am not voting for closing is that maybe you can get the answer from other people that publish similar content (thus being more related to RPGs) or even a random lawyer that happens to be a hardcore RPG player and will be around to answer. Anyway, the LAW.se does exist (law.stackexchange.com) and it might be useful for you. Jun 23, 2020 at 3:20
• Jun 23, 2020 at 3:23
• @HellSaint That (answers from other people who have published stuff like that) is what I'm really looking for. Or that last sentence--other ways to get around the issue and give guidance as to what custom planes relate to what "official" planes. I'd accept evidence from how other settings (which I don't own) have approached the issue. Jun 23, 2020 at 4:00
• @HellSaint I think that there are experienced experts here who have knowledge of the practicalities of publishing adventures. There are a number of people here who have indeed done exactly that. As with the law SE, this site is not a substitute for legal advice from a lawyer. Jun 23, 2020 at 4:00

I am not a lawyer, and I am certainly not your lawyer. I have worked on publications that leveraged the Open Game License, but I was in no way involved in OGL compliance, and in any event none of those publications attempted to do what you are discussing in this question. I offer this as an interested layman’s understanding, and strongly urge you to speak with a lawyer before you publish anything, particularly for sale.

Anyway, from the Open Game License, §7:

Use of Product Identity: You agree not to Use any Product Identity, including as an indication as to compatibility, except as expressly licensed in another, independent Agreement with the owner of each element of that Product Identity. You agree not to indicate compatibility or co-adaptability with any Trademark or Registered Trademark in conjunction with a work containing Open Game Content except as expressly licensed in another, independent Agreement with the owner of such Trademark or Registered Trademark.

The first sentence says that anything published under the OGL cannot “Use any Product identity,” with a capital U in “Use.” That references §1 part g,

"Use", "Used" or "Using" means to use, Distribute, copy, edit, format, modify, translate and otherwise create Derivative Material of Open Game Content.

Referring to something by name is known, as I understand things, as “nominative use,” which probably falls under the definition of “Use” meaning “to use.” (Ridiculous, I know.) I believe that “nominative use” does not fall under creating “Derivative Material,” but I’m not 100% sure of that either. Anyway, normally nominative use is a thing you can do, but the OGL is saying that you agree not to.

Thus, as I have understood things, part of the deal with the OGL is that you can use stuff you otherwise couldn’t, but there is a trade-off where you agree not to do things you otherwise could—which includes this kind of nominative use. So my understanding is that no, you cannot do this under the OGL.

• Can you comment about how the publications you've worked on dealt with such comparisons that would tread close to OGL-violation? Just leaving out such material entirely? Jun 23, 2020 at 17:42
• @BenjaminTHall Nothing I’ve worked on has come even close—we wrote new classes, feats, systems of magic, and so on, but none of those things involve anything that was Product Identity. The only reason I mention my experience at all is that I have mentioned working for publishers elsewhere on the site, so if you dug into my background in response to this answer, you might suspect I was coming from a place of greater expertise than I can claim—and the intro paragraph is, after all, a disclaimer, actively and explicitly noting expertise that I cannot claim. Jun 23, 2020 at 17:51
• Interesting. This would explain why 3rd party publications don't even use the name D&D, even though it is clearly intended for use with D&D (for example, Adventure Modules from Goodman Games say they are for use with "the 5th edition of the first fantasy role playing game"). I always wondered why they couldn't use the name. Jun 23, 2020 at 21:28


text:
• ### Popular Now

• 12
• 12
• 9
• 10
• 13

This topic is 2911 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

The game of Pig is a simple two player dice game in which the first player to reach 100 or more points wins. Players take turns. On each turn a player rolls a six-sided die. After each roll, If the player rolls a 2-6 then he can either: ROLL AGAIN or HOLD. At this point the sum of all rolls made this turn is added to the player's total score and it becomes the other player's turn. If the player rolls a 1 then the player loses his turn. He gets no new points and it becomes the opponent's turn.If a player reaches 100 or more points after holding then the player wins. Write a program that plays the game of Pig, where one player is a human and the other is the computer. Allow the human to input r' (or R') to roll again or h' (or H') to hold. The computer program should play according to the following rule: Keep rolling on the computer's turn until it has accumulated 20 or more points, then hold. Of course, if the computer wins or rolls a 1 then the turn ends immediately. Allow the human to roll first. So here is my code:
// this game is played with a six sided die, on each player's turn he may roll
// until he gets a 1 from the die, at which point, all points accumulated to
// that point are wiped, he may hold and add the accumulation to his score at
// any time.
#include<fstream>
#include<iostream>
#include<cstdlib>
#include<stdlib.h>

using namespace std;

const int score_limit = 100;

int humanTurn(int& humanTotalScore);
int computerTurn(int& computerTotalScore);

int main ()
{
bool continue_game = 1;
int humanTotalScore = 0, computerTotalScore = 0;
cout << "This is the Game of Pig." << endl;
cout << "It is your turn. " << endl << endl;

// Determine whether or not the game is over (whether or not a score of 100 has been reached)
if ((humanTotalScore < score_limit) && (computerTotalScore < score_limit))
{
continue_game = 1;
}
else
{
continue_game = 0;
}

// Play Game
do
{
humanTurn(humanTotalScore);
computerTurn(computerTotalScore);
}
while (continue_game = 1);

// Determine who won the game
if (continue_game = 0 && (humanTotalScore > computerTotalScore))
{
cout << "Congratulations! You Win!";
}
else
{
cout << "You Lose, Computer Wins .";
}

getchar();
getchar();

return 0;
}

int humanTurn(int& humanTotalScore)
{
int accumulatedScore = 0;            //score from this turn
char ans;                            //does player want to roll again or hold
int lastRoll;                        //value of dice roll
cout << "Your current score is " << humanTotalScore << "." << endl;
cout << "Would you like to roll the dice?" << endl;
cout << "R(r) to Roll, H(h) to hold your score" << endl;
cout << "Accumulation from this set of rolls is " << accumulatedScore << endl << endl;
cin >> ans;

//If player decides to roll again
while (ans == 'R' || ans == 'r')
{
lastRoll = ((rand()%6) + 1);
if (lastRoll == 1)
{
cout << "You rolled a 1. Your score is 0 and your turn is over." << endl;
break;
}
else
{
accumulatedScore += lastRoll;
cout << "You rolled a " << lastRoll << endl;
cout << "R(r) to roll Again. H(h) to hold. Current Accumulation:" << accumulatedScore << endl;
cin >> ans;
}
}

//If player decides to hold
while (ans == 'H' || ans == 'h')
{
humanTotalScore += accumulatedScore;
cout << "Your score is " << humanTotalScore << endl;
}

//If player enters a key that is not R, r, H, or h
while ( (ans != 'H') && (ans != 'h') && (ans != 'R') && (ans != 'r') ) //not sure why this is not working
{
cout << "Invalid input, please enter either R(r) or H(h)" << endl;
cin >> ans;
}

return humanTotalScore;
}

int computerTurn (int& computerTotalScore)
{
int accumulatedScore = 0;                                 //score from this turn
int lastRoll;                                             //value of dice roll

lastRoll = ((rand()%6) + 1);
if (lastRoll == 1)
{
cout << "The computer rolled a 1. It's score is 0 and your turn is over." << endl;
}
else
{
accumulatedScore += lastRoll;
cout << "The computer rolled a " << lastRoll << endl;
while (accumulatedScore < 20)
{
lastRoll = ((rand()%6) + 1);
accumulatedScore += lastRoll;
computerTotalScore += accumulatedScore;
}

while (accumulatedScore >= 20)
{
accumulatedScore += lastRoll;
cout << "Computer's score is " << computerTotalScore << endl;
cout << "It is your turn again.\n";
}
}

return computerTotalScore;
}

[Read the FAQ and learn to format your code properly for posting - Zahlman] I'm having problems with the Hold. Whenever I input h or H as the answer, it outputs a very high number repeatedly and wont stop. Can anyone tell me what i'm doing wrong?!?! [Edited by - Zahlman on April 3, 2010 10:53:26 AM]

##### Share on other sites
This loop will never terminate...

while (continue_game = 1);

##### Share on other sites
Neither will this one, if it's ever entered:
//If player decides to holdwhile (ans == 'H' || ans == 'h'){humanTotalScore += accumulatedScore;cout << "Your score is " << humanTotalScore << endl;}

Notice that `ans' doesn't change value inside the loop, so if the condition was true the first time around, it will always be true.


text:
Interactive version

# Coarse-grain a simple transition matrix

To illustrate the application of pyGPCCA we will coarse-grain a simple irreducible transition matrix $$P$$ as a toy example.

Firstly, we will import needed packages like numpy, matplotlib and of course pygpcca:

[1]:

import matplotlib.pyplot as plt
import numpy as np
import pygpcca as gp

Next, we define a simple $$12 \times 12$$ row-stochastic (meaning that the rows of $$P$$ each sum up to one) transition matrix $$P$$ and plot it:

[24]:

P = np.array(
[
# 0.   1.   2.   3.   4.   5.   6.   7.   8.   9.   10.  11.
[0.0, 0.8, 0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], #0
[0.2, 0.0, 0.6, 0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], #1
[0.6, 0.2, 0.0, 0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], #2

[0.0, 0.05, 0.05, 0.0, 0.6, 0.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], #3
[0.0, 0.0, 0.0, 0.25, 0.0, 0.25, 0.4, 0.0, 0.0, 0.1, 0.0, 0.0], #4
[0.0, 0.0, 0.0, 0.25, 0.25, 0.0, 0.1, 0.0, 0.0, 0.4, 0.0, 0.0], #5

[0.0, 0.0, 0.0, 0.0, 0.05, 0.05, 0.0, 0.7, 0.2, 0.0, 0.0, 0.0], #6
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.0, 0.8, 0.0, 0.0, 0.0], #7
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.8, 0.2, 0.0, 0.0, 0.0, 0.0], #8

[0.0, 0.0, 0.0, 0.0, 0.05, 0.05, 0.0, 0.0, 0.0, 0.0, 0.7, 0.2], #9
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.0, 0.8], #10
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.8, 0.2, 0.0], #11
],
dtype=np.float64,
)

# plot the matrix P:
fig, ax = plt.subplots()
c = ax.imshow(P)
plt.xticks(np.arange(P.shape[1]))
plt.yticks(np.arange(P.shape[0]))
plt.ylim(-0.5, P.shape[0]-0.5)
ax.set_ylim(ax.get_ylim()[::-1])
fig.colorbar(c)
plt.show()

Following this, we initialize a GPCCA object from the transition matrix $$P$$:

[3]:

gpcca = gp.GPCCA(P, z='LM', method='brandts')

GPCCA is a spectral clustering method with optimized memberships. It clusters the dominant $$m$$ Schur vectors of a transition matrix. This algorithm generates a fuzzy clustering such that the resulting membership functions are as crisp (characteristic) as possible.

The parameter z specifies which portion of the eigenvalue spectrum of $$P$$ is to be sought. The returned invariant subspace of $$P$$ will be associated with this part of the spectrum.

In case of z='LM', the eigenvalues with the largest magnitude will be sorted to the top in descending order. This way the dominant (top) eigenvalues will be located near the unit circle in the complex plane, unraveling not only stable or metastable states, but cyclic states that are associated with eigenvalues near the roots of unity as well.

In case of z='LR', the eigenvalues with the largest real part will be sorted to the top in descending order. Thus stable and metastable states near the Perron root 1 are selected.

The parameter method specifies which method will be used to determine the invariant subspace.

If method='brandts', a full Schur decomposition of $$P$$ utilizing scipy.linalg.schur is performed and afterwards the returned Schur form $$R$$ and Schur vector matrix $$Q$$ are partially sorted to gain an orthonormal basis of the subspace associated with the $$m$$ dominant eigenvalues of $$P$$. This is well tested and thus the default method, although it is also the slowest choice.

If method='krylov', an orthonormal basis of the subspace associated with the $$m$$ dominant eigenvalues of $$P$$ is calculated using the Krylov-Schur method as implemented in SLEPc. This is the fastest choice and especially suitable for very large $$P$$, but it is still experimental.

Afterwards, we can get a list of $$minChi$$ values for numbers of macrostates $$m$$ in an interval $$[2, 12]$$ of possible $$m$$ ($$m=1$$ is illegal here, since there is no point in clustering 12 microstates into one single macrostate). The $$minChi$$ values help us to determine an interval $$[m_{min}, m_{max}]$$ of nearly optimal numbers of macrostates for clustering:

[4]:

gpcca.minChi(2, 12)

[4]:

[-1.6653345369377348e-16,
-2.255418698866725e-16,
-0.9923508699724691,
-0.9972757370249341,
-0.926802576904497,
-0.2705117206956666,
-0.3360447945215935,
-0.2973036186306221,
-0.29104047575515346,
-0.42902208201892694,
-3.5809019888001215e-16]

The $$minChi$$ criterion states that cluster numbers $$m$$ (i.e. clustering into $$m$$ clusters) with a $$minChi$$ value close to zero will potentially result in a optimal (meaning especially crisp or sharp) clustering. Obviously, only $$m=3$$ qualifies as non-trivially potentially optimal, since for $$m=2$$ and $$m=12$$ always $$minChi \approx 0$$ trivially holds.

Now, we would optimize the clustering for numbers of macrostates $$m$$ in a selected interval $$[m_{min}, m_{max}]$$ of potentially optimal macrostate numbers to find the optimal number of macrostates $$n_m$$ resulting in the crispest clustering in the given interval.

Here, this interval would contain only $$m=2,3$$, since there is no benefit in clustering $$n=12$$ data points into $$m=n$$ clusters.

Having said that, we here choose the whole interval $$[2, 12]$$ of legal cluster numbers to get a better impression of the spectrum associated with $$P$$ later, when looking at the eigenvalues of $$P$$:

[5]:

gpcca.optimize({'m_min':2, 'm_max':12})

/home/breuter/g-pcca/pyGPCCA/pygpcca/_gpcca.py:999: UserWarning: Clustering into 4 clusters will split complex conjugate eigenvalues. Skipping clustering into 4 clusters.
f"Clustering into {m} clusters will split complex conjugate eigenvalues. "
/home/breuter/g-pcca/pyGPCCA/pygpcca/_gpcca.py:999: UserWarning: Clustering into 6 clusters will split complex conjugate eigenvalues. Skipping clustering into 6 clusters.
f"Clustering into {m} clusters will split complex conjugate eigenvalues. "
/home/breuter/g-pcca/pyGPCCA/pygpcca/_gpcca.py:999: UserWarning: Clustering into 9 clusters will split complex conjugate eigenvalues. Skipping clustering into 9 clusters.
f"Clustering into {m} clusters will split complex conjugate eigenvalues. "
/home/breuter/g-pcca/pyGPCCA/pygpcca/_gpcca.py:1033: UserWarning: Clustering 12 data points into 12 clusters is always perfectly crisp. Thus m=12 won't be included in the search for the optimal cluster number.
f"Clustering {n} data points into {max(m_list)} clusters is always perfectly crisp. "

[5]:

<pygpcca._gpcca.GPCCA at 0x7fe440c5f090>

The optimized GPCCA object is returned above and we can now access different properties of it.

Note: pyGPCCA warns that clustering $$P$$ into 4, 6, and 9 clusters would split complex conjugate eigenvalues and thus skips the optimization for those cluster numbers. Further, pyGPCCA warns that Clustering 12 data points into 12 clusters is always perfectly crisp, i.e. $$\xi \approx 1$$. Thus m=12 won’t be included in the search for the optimal cluster number, since it will always be selected to be optimal despite there is no benefit from clustering $$n=12$$ data points into $$m=n$$ clusters.

The crispness values $$\xi \in [0,1]$$ for numbers of macrostates $$m$$ in the selected interval $$[m_{min}, m_{max}]$$ can be accessed via:

[6]:

gpcca.crispness_values

[6]:

array([0.74151472, 0.81512805, 0.        , 0.38587154, 0.        ,
0.41628049, 0.41788963, 0.        , 0.55513151, 0.53758366,
1.        ])

The crispness $$\xi \in [0, 1]$$ quantifies the optimality of a clustering (higher is better). It characterizes how crisp (sharp) the decomposition of the state space into $$m$$ clusters is. Since $$m=4,6,9$$ were skipped, the associated crispness values are assigned to zero, because no clustering was performed.

The optimal crispness for the optimal number of macrostates $$n_m$$ in the selected interval $$[m_{min}, m_{max}]$$ can be accessed via:

[7]:

gpcca.optimal_crispness

[7]:

0.8151280474517894

The optimal number of macrostates $$n_m$$ can be accessed via:

[8]:

gpcca.n_m

[8]:

3

The optimal number of clusters or macrostates $$n_m$$ is the cluster number $$m$$ with the maximum crispness.

A vector containing the top $$m_{max}$$ eigenvalues of $$P$$ can be accessed via (here we get the full sorted spectrum of $$P$$, since we chose $$m_{max}=n$$):

[10]:

gpcca.top_eigenvalues

[10]:

array([ 1.        +0.j        ,  0.96554293+0.j        ,
0.88404279+0.j        , -0.48277146+0.48908574j,
-0.48277146-0.48908574j, -0.49366905+0.47392788j,
-0.49366905-0.47392788j,  0.58853656+0.j        ,
-0.43198962+0.39030468j, -0.43198962-0.39030468j,
-0.37126202+0.j        , -0.25      +0.j        ])

A vector containing the dominant $$n_m$$ eigenvalues of $$P$$ can be accessed via:

[11]:

gpcca.dominant_eigenvalues

[11]:

array([1.        +0.j, 0.96554293+0.j, 0.88404279+0.j])

An array $$\chi$$ containing the membership $$\chi_{ij}$$ (or probability) of each microstate $$i$$ (to be assigned) to each cluster or macrostate $$j$$ is available via:

[25]:

chi = gpcca.memberships
# plot chi:
fig, ax = plt.subplots()
c = ax.imshow(chi)
plt.xticks(np.arange(chi.shape[1]))
plt.yticks(np.arange(chi.shape[0]))
plt.ylim(-0.5, chi.shape[0]-0.5)
ax.set_ylim(ax.get_ylim()[::-1])
fig.colorbar(c)
plt.show()
# show chi matrix:
chi

[25]:

array([[1.00000000e+00, 0.00000000e+00, 8.44548736e-18],
[8.80009662e-01, 5.26338400e-02, 6.73564979e-02],
[9.12351139e-01, 3.84758290e-02, 4.91730323e-02],
[1.64953404e-01, 3.67067094e-01, 4.67979502e-01],
[6.51588802e-02, 3.35927186e-01, 5.98913934e-01],
[6.51588802e-02, 5.64708356e-01, 3.70132763e-01],
[5.02066367e-03, 3.27724659e-02, 9.62206870e-01],
[1.27462550e-16, 1.83492669e-16, 1.00000000e+00],
[1.78878958e-03, 1.11025375e-02, 9.87108673e-01],
[5.02066367e-03, 9.59750248e-01, 3.52290885e-02],
[0.00000000e+00, 1.00000000e+00, 2.42354345e-17],
[1.78878958e-03, 9.86286754e-01, 1.19244563e-02]])

The optimal coarse-grained transition matrix

$$P_c = (\chi^T D \chi)^{-1} (\chi^T D P \chi)$$

can be accessed via:

[26]:

P_c = gpcca.coarse_grained_transition_matrix
# plot P_c:
fig, ax = plt.subplots()
c = ax.imshow(P_c)
plt.xticks(np.arange(P_c.shape[1]))
plt.yticks(np.arange(P_c.shape[0]))
plt.ylim(-0.5, P_c.shape[0]-0.5)
ax.set_ylim(ax.get_ylim()[::-1])
fig.colorbar(c)
plt.show()
# show P_c matrix:
P_c

[26]:

array([[0.88647796, 0.04980224, 0.0637198 ],
[0.00243516, 0.98097945, 0.01658538],
[0.00243516, 0.01543652, 0.98212831]])

There are many more properties that can be accessed as you can see in the API documentation here, e.g.:

The input probability distribution of the microstates:

[14]:

gpcca.input_distribution

[14]:

array([0.08333333, 0.08333333, 0.08333333, 0.08333333, 0.08333333,
0.08333333, 0.08333333, 0.08333333, 0.08333333, 0.08333333,
0.08333333, 0.08333333])

The coarse grained input distribution of the macrostates:

[15]:

gpcca.coarse_grained_input_distribution

[15]:

array([0.25843757, 0.36239369, 0.37916873])

An integer vector containing the macrostate each microstate is located in (This employs an absolute crisp clustering, e.g. $$\chi_{ij} \in \{0,1\}$$, and is recommended only for visualization purposes. You cannot compute any actual quantity of the coarse-grained kinetics without employing the fuzzy memberships, e.g. $$\chi_{ij} \in [0,1]$$.):

[16]:

gpcca.macrostate_assignment

[16]:

array([0, 0, 0, 2, 2, 1, 2, 2, 2, 1, 1, 1])

A list were each element is an array that contains the indices of microstates assigned to the respective (first, second, third, …) macrostate (This employs an absolute crisp clustering, e.g. $$\chi_{ij} \in \{0,1\}$$, and is recommended only for visualization purposes. You cannot compute any actual quantity of the coarse-grained kinetics without employing the fuzzy memberships, e.g. $$\chi_{ij} \in [0,1]$$.):

[17]:

gpcca.macrostate_sets

[17]:

[array([0, 1, 2]), array([ 5,  9, 10, 11]), array([3, 4, 6, 7, 8])]

The optimized rotation matrix, which rotates the dominant Schur vectors to yield the GPCCA memberships, i.e. $$\chi = X A$$:

[18]:

gpcca.rotation_matrix

[18]:

array([[ 0.25843757,  0.36239369,  0.37916873],
[ 0.03366022, -0.36112468,  0.32746445],
[-0.39024389,  0.164552  ,  0.22569189]])

Ordered top left part of the real Schur matrix $$R$$ of $$P$$. The ordered partial real Schur matrix $$R$$ of $$P$$ fulfills $$P Q = Q R$$ with the ordered matrix of dominant Schur vectors $$Q$$:

[20]:

gpcca.schur_matrix

[20]:

array([[ 1.00000000e+00,  6.38159449e-04, -7.04970784e-02],
[ 0.00000000e+00,  9.65542930e-01,  7.02973961e-03],
[ 0.00000000e+00,  0.00000000e+00,  8.84042793e-01]])

Array $$Q$$ with the sorted Schur vectors in the columns (The constant Schur vector is in the first column):

[21]:

gpcca.schur_vectors

[21]:

array([[ 1.        ,  0.14326506, -1.88789655],
[ 1.        ,  0.13739019, -1.58092803],
[ 1.        ,  0.13889124, -1.66367359],
[ 1.        ,  0.10015109,  0.24819166],
[ 1.        ,  0.31120067,  0.52211907],
[ 1.        , -0.34824151,  0.46523933],
[ 1.        ,  1.25811096,  0.75789837],
[ 1.        ,  1.35867697,  0.77943807],
[ 1.        ,  1.32450074,  0.77190645],
[ 1.        , -1.41382332,  0.52743247],
[ 1.        , -1.52373762,  0.53081733],
[ 1.        , -1.48638447,  0.52945543]])

Stationary probability distribution $$\pi$$ of the microstates (a vector that sums to 1):

[22]:

gpcca.stationary_probability

[22]:

array([0.00356002, 0.00462803, 0.00439069, 0.01803744, 0.03463189,
0.03030291, 0.16883048, 0.14873162, 0.15275139, 0.15584352,
0.13729072, 0.14100128])

Coarse grained stationary distribution $$\pi_c = \chi^T \pi$$:

[23]:

gpcca.coarse_grained_stationary_probability

[23]:

array([0.02100054, 0.46893777, 0.51006168])


text:
# Competition of superconductivity and antiferromagnetism in ad-wave vortex lattice Academic Article

•
• Overview
•
• Research
•
• Identity
•
• The d-wave vortex lattice state is studied within the framework of Bogoliubov-de Gennes (BdG) mean field theory. We allow antiferromagnetic (AFM) order to develop self-consistently along with d-wave singlet superconducting (dSC) order in response to an external magnetic field that generates vortices. The resulting AFM order has strong peaks at the vortex centers, and changes sign, creating domain walls along lines where $\nabla \times j_s \approx 0$. The length scale for decay of this AFM order is found to be much larger than the bare d-wave coherence length, $\xi$. Coexistence of dSC and AFM order in this system is shown to induce $\pi$-triplet superconducting order. Competition between different orders is found to suppress the local density of states at the vortex center and comparison to recent experimental findings is discussed.


text:
I'm a new in measure theory and I want to understand measurable functions. A Lebesgue measurable function $f:\mathbf R\to\mathbf R$ is one such that the inverse image of any Lebesgue measurable set is also Lebesgue measurable. f+ and tn! $\endgroup$ – Arno 2 days ago PDF Measurable functions. Measurable functions: Billingsley, Section 13 Definition 2: Given two measurable spaces and , a mapÐßÑ ÐßÑHY HYww XÀ Ä E−HH Yww is called if for every , we havemeasurable XÐEÑ−Þ " Y Example 2: Consider the function given by 0À Ä Cœ0ÐBÑœBÞ‘‘ # Then if open interval , then if ,EœMœ œÐ+ß,Ñ ! Then (X,S) is a measurable space. Chapter 5. Any open or closed interval [a, b] of real numbers is Lebesgue-measurable, and its Lebesgue measure is the length b − a. I want to understand it on some simple examples. + , In probab Integration" , Addison-Wesley (1975) pp. simple F-measurable functions. In real analysis, measurable functions are used in the definition of the Lebesgue integral. Measurable Functions Let X be a nonempty set, and let S be a σ-algebra of subsets of X.

So I need an easy examples of measurable and not measurable functions. 2. So by Theorem 3.10 we can ﬁnd sequences of simple, F-measurable functions sn! As I expect measurable function is the function that maps one set to another where preimage of measurable subset is measurable.

$\endgroup$ – user39115 Apr 18 '18 at 21:17 The set of Borel measurable functions is the union of the Baire class $\alpha$ functions where $\alpha$ ranges over the countable ordinals. In mathematics and in particular measure theory, a measurable function is a function between the underlying sets of two measurable spaces that preserves the structure of the spaces: the preimage of any measurable set is measurable, analogous to the definition that a function between topological spaces is continuous if it preserves the topological structure: the preimage of each open set is open.
Thus f is measurable if and only if {x| f(x) >α} ∈ A for every α∈ R. Corollary 4.1.1. measurable if f 1(B) is a Lebesgue measurable subset of Rn for every Borel subset Bof R, and it is Borel measurable if f 1(B) is a Borel measurable subset of Rn for every Borel subset Bof R This de nition ensures that continuous functions f: Rn!R are Borel measur-able and functions that are equal a.e. Measurable Functions §1. f2, the product of two measurable functions • f1 f2 where f2 is nowhere zero In particular, −f1 is also measurable.

Am I right? A continuous function pulls back open sets to open sets, while a Note that the measurability of a function depends only on the σ-algebras; it is not necessary that any measures are dened. Measurable functions in measure theory are analogous to continuous functions in topology. 1 Measurable Functions 1.1 Measurable functions Measurable functions are functions that we can integrate with respect to measures in much the same way that continuous functions can be integrated \dx".
convergence to 0 of fg jgimplies that the set in the right handsidehasmeasure 0.

A subset E of X is said to be measurable if E ∈ S. In this chapter, we will consider functions from X to IR, … Measurable Functions §1. [Bor] E. Borel, "Leçons sur la theorie des fonctions" , Gauthier-Villars (1898) Zbl 29.0336.01 [Bou] N. Bourbaki, "Elements of mathematics. + , 2.6 Lebesgue measurable sets.


text:
# zbMATH — the first resource for mathematics

Spaces of harmonic functions. (English) Zbl 0963.31004
The paper is mainly concerned with the dimensions of certain spaces of harmonic functions on a complete Riemannian manifold $$M$$ of dimension $$n$$. It is shown that the study of harmonic functions on $$M$$ can be reduced to the study of harmonic functions on each end of $$M$$. In particular, precise dimension relations are established for various spaces associated to bounded harmonic functions and positive harmonic functions on $$M$$ and on its ends. A similar result is obtained for spaces of harmonic functions with polynomial growth. This leads, under certain hypotheses on $$M$$, to finite dimensionality results for the space of all harmonic functions on $$M$$ with polynomial growth of at most some prescribed degree.
Some existence and uniqueness results for bounded harmonic maps on $$M$$ are also proved.

##### MSC:
 31C12 Potential theory on Riemannian manifolds and other spaces 31C05 Harmonic, subharmonic, superharmonic functions on other spaces
Full Text:


text:
# std::vwprintf, std::vfwprintf, std::vswprintf

< cpp | io | c

C++
 Language Standard Library Headers Freestanding and hosted implementations Named requirements Language support library Concepts library (C++20) Diagnostics library Utilities library Strings library Containers library Iterators library Ranges library (C++20) Algorithms library Numerics library Input/output library Localizations library Regular expressions library (C++11) Atomic operations library (C++11) Thread support library (C++11) Filesystem library (C++17) Technical Specifications

Input/output library
 I/O manipulators C-style I/O Buffers basic_streambuf basic_filebuf basic_stringbuf strstreambuf(deprecated in C++98) basic_syncbuf(C++20) Streams Abstractions ios_base basic_ios basic_istream basic_ostream basic_iostream File I/O basic_ifstream basic_ofstream basic_fstream String I/O basic_istringstream basic_ostringstream basic_stringstream Array I/O istrstream(deprecated in C++98) ostrstream(deprecated in C++98) strstream(deprecated in C++98) Synchronized Output basic_osyncstream(C++20) Types streamoff streamsize fpos Error category interface iostream_category(C++11) io_errc(C++11)

C-style I/O
Functions
File access
Direct input/output
Unformatted input/output
 fgetc fgets fputc fputs getchar gets(until C++14) putchar puts ungetc
Formatted input/output
 scanffscanfsscanf vscanfvfscanfvsscanf(C++11)(C++11)(C++11) printffprintfsprintfsnprintf(C++11)
 wscanffwscanfswscanf vwscanfvfwscanfvswscanf(C++11)(C++11)(C++11) wprintffwprintfswprintf vwprintfvfwprintfvswprintf
File positioning
Error handling
Operations on files

 Defined in header  int vwprintf( const wchar_t* format, va_list vlist ); (1) int vfwprintf( std::FILE* stream, const wchar_t* format, va_list vlist ); (2) int vswprintf( const wchar_t* buffer, std::size_t buf_size,                const wchar_t* format, va_list vlist ); (3)

Loads the data from locations, defined by vlist,, converts them to wide string equivalents and writes the results to a variety of sinks.

1) Writes the results to stdout.
2) Writes the results to a file stream stream.
3) Writes the results to a wide string buffer. At most size-1 wide characters are written followed by null wide character.

### Parameters

stream - output wide stream to write to
buffer - pointer to a wide string to write to
buf_size - maximum number of wide characters to write
format - pointer to a null-terminated wide string specifying how to interpret the data.

The format string consists of ordinary wide characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format:

• introductory % character
• (optional) one or more flags that modify the behavior of the conversion:
• -: the result of the conversion is left-justified within the field (by default it is right-justified)
• +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative)
• space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present.
• # : alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined.
• 0 : for integer and floating point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present.
• (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int. If the value of the argument is negative, it results with the - flag specified and positive field width. (Note: This is the minimum width: The value is never truncated.)
• (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision.
• (optional) length modifier that specifies the size of the argument
• conversion format specifier

The following format specifiers are available:

Conversion
specifier
Explanation Argument type
length modifier hh

(C++11)

h (none) l ll

(C++11)

j

(C++11)

z

(C++11)

t

(C++11)

L
% writes literal %. The full conversion specification must be %%. N/A N/A N/A N/A N/A N/A N/A N/A N/A
c
writes a single character.

The argument is first converted to wchar_t as if by calling btowc. If the l modifier is used, the wint_t argument is first converted to wchar_t.

N/A N/A
int
wint_t
N/A N/A N/A N/A N/A
s
writes a character string

The argument must be a pointer to the initial element of a character array containing a multibyte character sequence beginning in the initial shift state, which is converted to wide character array as if by a call to mbrtowc with zero-initialized conversion state. Precision specifies the maximum number of wide characters to be written. If Precision is not specified, writes every wide characters up to and not including the first null terminator. If the l specifier is used, the argument must be a pointer to the initial element of an array of wchar_t.

N/A N/A
char*
wchar_t*
N/A N/A N/A N/A N/A
d
i
converts a signed integer into decimal representation [-]dddd.

Precision specifies the minimum number of digits to appear. The default precision is 1.
If both the converted value and the precision are 0 the conversion results in no characters.

signed char
short
int
long
long long
intmax_t
signed size_t
ptrdiff_t
N/A
o
converts a unsigned integer into octal representation oooo.

Precision specifies the minimum number of digits to appear. The default precision is 1. If both the converted value and the precision are 0 the conversion results in no characters. In the alternative implementation precision is increased if necessary, to write one leading zero. In that case if both the converted value and the precision are 0, single 0 is written.

unsigned char
unsigned short
unsigned int
unsigned long
unsigned long long
uintmax_t
size_t
unsigned version of ptrdiff_t
N/A
x
X
converts an unsigned integer into hexadecimal representation hhhh.

For the x conversion letters abcdef are used.
For the X conversion letters ABCDEF are used.
Precision specifies the minimum number of digits to appear. The default precision is 1. If both the converted value and the precision are 0 the conversion results in no characters. In the alternative implementation 0x or 0X is prefixed to results if the converted value is nonzero.

N/A
u
converts an unsigned integer into decimal representation dddd.

Precision specifies the minimum number of digits to appear. The default precision is 1. If both the converted value and the precision are 0 the conversion results in no characters.

N/A
f
F
converts floating-point number to the decimal notation in the style [-]ddd.ddd.

Precision specifies the minimum number of digits to appear after the decimal point character. The default precision is 6. In the alternative implementation decimal point character is written even if no digits follow it. For infinity and not-a-number conversion style see notes.

N/A N/A
double
double (C++11)
N/A N/A N/A N/A
long double
e
E
converts floating-point number to the decimal exponent notation.

For the e conversion style [-]d.ddde±dd is used.
For the E conversion style [-]d.dddE±dd is used.
The exponent contains at least two digits, more digits are used only if necessary. If the value is 0, the exponent is also 0. Precision specifies the minimum number of digits to appear after the decimal point character. The default precision is 6. In the alternative implementation decimal point character is written even if no digits follow it. For infinity and not-a-number conversion style see notes.

N/A N/A N/A N/A N/A N/A
a
A

(C++11)

converts floating-point number to the hexadecimal exponent notation.

For the a conversion style [-]0xh.hhhp±d is used.
For the A conversion style [-]0Xh.hhhP±d is used.
The first hexadecimal digit is not 0 if the argument is a normalized floating point value. If the value is 0, the exponent is also 0. Precision specifies the minimum number of digits to appear after the decimal point character. The default precision is sufficient for exact representation of the value. In the alternative implementation decimal point character is written even if no digits follow it. For infinity and not-a-number conversion style see notes.

N/A N/A N/A N/A N/A N/A
g
G
converts floating-point number to decimal or decimal exponent notation depending on the value and the precision.

For the g conversion style conversion with style e or f will be performed.
For the G conversion style conversion with style E or F will be performed.
Let P equal the precision if nonzero, 6 if the precision is not specified, or 1 if the precision is 0. Then, if a conversion with style E would have an exponent of X:

• if P > X ≥ −4, the conversion is with style f or F and precision P − 1 − X.
• otherwise, the conversion is with style e or E and precision P − 1.

Unless alternative representation is requested the trailing zeros are removed, also the decimal point character is removed if no fractional part is left. For infinity and not-a-number conversion style see notes.

N/A N/A N/A N/A N/A N/A
n
returns the number of characters written so far by this call to the function.

The result is written to the value pointed to by the argument. The specification may not contain any flag, field width, or precision.

signed char*
short*
int*
long*
long long*
intmax_t*
signed size_t*
ptrdiff_t*
N/A
p writes an implementation defined character sequence defining a pointer. N/A N/A void* N/A N/A N/A N/A N/A N/A

The floating point conversion functions convert infinity to inf or infinity. Which one is used is implementation defined.

Not-a-number is converted to nan or nan(char_sequence). Which one is used is implementation defined.

The conversions F, E, G, A output INF, INFINITY, NAN instead.

Even though %c expects int argument, it is safe to pass a char because of the integer promotion that takes place when a variadic function is called.

The correct conversion specifications for the fixed-width character types (int8_t, etc) are defined in the header <cinttypes> (although PRIdMAX, PRIuMAX, etc is synonymous with %jd, %ju, etc).

The memory-writing conversion specifier %n is a common target of security exploits where format strings depend on user input and is not supported by the bounds-checked printf_s family of functions.

There is a sequence point after the action of each conversion specifier; this permits storing multiple %n results in the same variable or, as an edge case, printing a string modified by an earlier %n within the same call.

If a conversion specification is invalid, the behavior is undefined.

vlist - variable argument list containing the data to print

### Return value

1,2) Number of wide characters written if successful or negative value if an error occurred.
3) Number of wide characters written (not counting the terminating null wide character) if successful or negative value if an encoding error occurred or if the number of characters to be generated was equal or greater than size.

### Notes

While narrow strings provide std::vsnprintf, which makes it possible to determine the required output buffer size, there is no equivalent for wide strings, and in order to determine the buffer size, the program may need to call std::vswprintf, check the result value, and reallocate a larger buffer, trying again until successful.


text:
# How do I design a round or square coaxial transmission line to have a specific impedance?

Certain Hex Beam antennas use a coaxial center support post to send the RF to each antenna section, which is superior, in terms of maintenance, to a post with screw terminals connected by short lengths of coax used in previous designs.

I'd like to use off the shelf stainless steel tubes and rods to accomplish this, but I have access to enough machining equipment that I can adjust some parts to give me better dimensions.

Specifically, if I'm aiming for a 1.5" square outer stainless steel tube, what dimension should the inner stainless steel conductor be to attain 50Ω impedance, assuming air as the insulator between the two? The tube has a 0.065" thick wall, so the inner dimensions are 1.37" x 1.37".

Generally, what are the equations I need to design such transmission lines with different dimensions, conducting materials, and impedance in the future?

### Executive Summary

Assuming:

Then for round coax, make the inside diameter of the outside conductor 2.302 times larger than the diameter of the inside conductor.

If the shield is square, and the inner conductor is still round, make the inside length of one side of the shield 2.134 times larger than the diameter of the inside conductor.

### Explanation, for Round Coax

A coaxial transmission line has some inductance per unit length $L$, and some capacitance per unit length $C$. The conductors also have some (very low) resistance $R$, and the dielectric has some (very low) conductance $G$. Though it's important to note that these properties are distributed throughout the entire length of the transmission line, lumping them all together we can model a transmission line as:

The characteristic impedance is then:

$$Z_0=\sqrt{\frac{R+j\omega L}{G+j\omega C}}$$

where:

• $R$ is the resistance per unit length, considering the two conductors to be in series,
• $L$ is the inductance per unit length,
• $G$ is the conductance of the dielectric per unit length,
• $C$ is the capacitance per unit length,
• $j$ is the imaginary unit, and
• $\omega$ is the angular frequency.

If we assume a good conductor and dielectric, then $R$ and $G$ are negligible1. The equation then simplifies to:

$$Z_0 \approx \sqrt{\frac{L}{C}}$$

For round coaxial transmission lines, we can calculate $C$ and $L$ as:

$$C = {2 \pi \epsilon_0 \epsilon_r \over \ln(D/d)}$$

$$L = {\mu_0 \mu_r \over 2 \pi} \ln(D/d)$$

where:

Putting these together and simplifying we get:

\begin{align} Z_0 &\approx \sqrt{\frac {{\mu_0 \mu_r \over 2 \pi} \ln(D/d)} {{2 \pi \epsilon_0 \epsilon_r \over \ln(D/d)}} } \\ &\approx \sqrt{\frac {\mu_0 \mu_r \ln(D/d)^2} {(2 \pi)^2 \epsilon_0 \epsilon_r} } \\ &\approx \sqrt{\frac {\mu_r} {\epsilon_r} } \sqrt{\frac {\mu_0} {(2 \pi)^2 \epsilon_0} } \ln(D/d) \\ &\approx \sqrt{\frac {\mu_r} {\epsilon_r} } 59.96 \ln(D/d) \\ \end{align}

For an air dielectric, $\epsilon_r$ and $\mu_r$ are so close to 1 than you can further simplify:

$$Z_0 \approx 59.96 \ln(D/d)$$

You can also see that only the ratio of the diameters of the conductors are relevant, so it doesn't matter what units of length are used, as long as they are the same.

We can solve for $D/d$, and set $Z_0 = 50 \Omega$:

\begin{align} 56.40 \ln(D/d) &\approx Z_0 \\ \ln(D/d) &\approx \frac{Z_0}{59.96} \\ D/d &\approx e^{Z_0/59.96} \\ D/d &\approx e^{50/59.96} \\ D/d &\approx 2.302 \end{align}

### Explanation, for Square Shield with a Round Center Conductor

This is a rather less common situation. Kevin Schmidt, W9CF has a full explanation. The equations are rather more complex, owing to the more complex geometry of the conductors, and are most easily solved by computer. However, a good approximation for impedances around 50Ω, with an air dielectric, is:

$$Z_0 \approx 59.96 \ln(1.079 D/d)$$

or solved for $D/d$:

$$D/d \approx {e^{Z_0/59.96} \over 1.079}$$

Where:

• $d$ is the diameter of the inner conductor, and
• $D$ is the inside length of one side of the shield.

1: this is a valid assumption for all HF frequencies, and VHF with low-loss dielectrics. At higher frequencies, skin effect and dielectric loss make $R$ and $G$ more significant, but it's likely this will manifest as an impracticably lossy line before the impedance is significantly affected.


text:
With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

Theorem 4.58

If a metric space $E$ has one of the following properties, then it has the other three:

(a) $E$ is compact.

(b) Every nested sequence of nonempty closed sets in $E$ has a nonempty intersection.

(c) Every infinite subset of $E$ has a limit point.

(d) Every sequence in $E$ has a convergent subsequence.

Proof

For the implication $\left(\text{a}\right)⇒\left(\text{b}\right)$, assume ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required


text:
# Distortion

Last updated

Distortion is the alteration of the original shape (or other characteristic) of something. In communications and electronics it means the alteration of the waveform of an information-bearing signal, such as an audio signal representing sound or a video signal representing images, in an electronic device or communication channel.

## Contents

Distortion is usually unwanted, and so engineers strive to eliminate or minimize it. In some situations, however, distortion may be desirable. For example, in FM broadcasting and noise reduction systems like the Dolby system, an audio signal is deliberately distorted in ways that emphasize aspects of the signal that are subject to electrical noise, then it is symmetrically "undistorted" after passing through a noisy communication channel, reducing the noise in the signal. Distortion is also used as a musical effect, particularly with electric guitars.

The addition of noise or other outside signals (hum, interference) is not considered distortion, though the effects of quantization distortion are sometimes included in noise. Quality measures that reflect both noise and distortion include the signal-to-noise and distortion (SINAD) ratio and total harmonic distortion plus noise (THD+N).

## Electronic signals

In telecommunication and signal processing, a noise-free system can be characterised by a transfer function, such that the output ${\displaystyle y(t)}$ can be written as a function of the input ${\displaystyle x}$ as

${\displaystyle y(t)=F(x(t))}$

When the transfer function comprises only a perfect gain constant A and perfect delay T

${\displaystyle y(t)=A\cdot x(t-T)}$

the output is undistorted. Distortion occurs when the transfer function F is more complicated than this. If F is a linear function, for instance a filter whose gain and/or delay varies with frequency, the signal suffers linear distortion. Linear distortion does not introduce new frequency components to a signal but does alter the balance of existing ones.

This diagram shows the behaviour of a signal (made up of a square wave followed by a sine wave) as it is passed through various distorting functions.

1. The first trace (in black) shows the input. It also shows the output from a non-distorting transfer function (straight line).
2. A high-pass filter (green trace) distorts the shape of a square wave by reducing its low frequency components. This is the cause of the "droop" seen on the top of the pulses. This "pulse distortion" can be very significant when a train of pulses must pass through an AC-coupled (high-pass filtered) amplifier. As the sine wave contains only one frequency, its shape is unaltered.
3. A low-pass filter (blue trace) rounds the pulses by removing the high frequency components. All systems are low pass to some extent. Note that the phase of the sine wave is different for the lowpass and the highpass cases, due to the phase distortion of the filters.
4. A slightly non-linear transfer function (purple), this one gently compresses the peaks of the sine wave, as may be typical of a tube audio amplifier. This generates small amounts of low order harmonics.
5. A hard-clipping transfer function (red) generates high order harmonics. Parts of the transfer function are flat, which indicates that all information about the input signal has been lost in this region.

The transfer function of an ideal amplifier, with perfect gain and delay, is only an approximation. The true behavior of the system is usually different. Nonlinearities in the transfer function of an active device (such as vacuum tubes, transistors, and operational amplifiers) are a common source of non-linear distortion; in passive components (such as a coaxial cable or optical fiber), linear distortion can be caused by inhomogeneities, reflections, and so on in the propagation path.

### Amplitude distortion

Amplitude distortion is distortion occurring in a system, subsystem, or device when the output amplitude is not a linear function of the input amplitude under specified conditions.

### Harmonic distortion

Harmonic distortion adds overtones that are whole number multiples of a sound wave's frequencies. [1] Nonlinearities that give rise to amplitude distortion in audio systems are most often measured in terms of the harmonics (overtones) added to a pure sinewave fed to the system. Harmonic distortion may be expressed in terms of the relative strength of individual components, in decibels, or the root mean square of all harmonic components: Total harmonic distortion (THD), as a percentage. The level at which harmonic distortion becomes audible depends on the exact nature of the distortion. Different types of distortion (like crossover distortion) are more audible than others (like soft clipping) even if the THD measurements are identical. Harmonic distortion in radio frequency applications is rarely expressed as THD.

### Frequency response distortion

Non-flat frequency response is a form of distortion that occurs when different frequencies are amplified by different amounts in a filter. For example, the non-uniform frequency response curve of AC-coupled cascade amplifier is an example of frequency distortion. In the audio case, this is mainly caused by room acoustics, poor loudspeakers and microphones, long loudspeaker cables in combination with frequency dependent loudspeaker impedance, etc.

### Phase distortion

This form of distortion mostly occurs due to electrical reactance. Here, all the components of the input signal are not amplified with the same phase shift, hence making some parts of the output signal out of phase with the rest of the output.

### Group delay distortion

Can be found only in dispersive media. In a waveguide, phase velocity varies with frequency. In a filter, group delay tends to peak near the cut-off frequency, resulting in pulse distortion. When analog long distance trunks were commonplace, for example in 12 channel carrier, group delay distortion had to be corrected in repeaters.

## Correction of distortion

As the system output is given by y(t) = F(x(t)), then if the inverse function F−1 can be found, and used intentionally to distort either the input or the output of the system, then the distortion is corrected.

An example of a similar correction is where LP/vinyl recordings or FM audio transmissions are deliberately pre-emphasised by a linear filter, the reproducing system applies an inverse filter to make the overall system undistorted.

Correction is not possible if the inverse does not exist—for instance if the transfer function has flat spots (the inverse would map multiple input points to a single output point). This produces an uncorrectable loss of information. Such a situation can occur when an amplifier is overdriven—causing clipping or slew rate distortion when, for a moment, the amplifier characteristics alone and not the input signal determine the output.

### Cancellation of even-order harmonic distortion

Many symmetrical electronic circuits reduce the magnitude of even harmonics generated by the non-linearities of the amplifier's components, by combining two signals from opposite halves of the circuit where distortion components that are roughly the same magnitude but out of phase. Examples include push-pull amplifiers and long-tailed pairs.

## Teletypewriter or modem signaling

In binary signaling such as FSK, distortion is the shifting of the significant instants of the signal pulses from their proper positions relative to the beginning of the start pulse. The magnitude of the distortion is expressed in percent of an ideal unit pulse length. This is sometimes called 'bias' distortion.

Telegraphic distortion is a similar older problem, distorting the ratio between "mark" and "space" intervals.

## Audio distortion

In this context, distortion refers to any kind of deformation of an output waveform compared to its input, usually clipping, harmonic distortion, or intermodulation distortion (mixing phenomena) caused by non-linear behavior of electronic components and power supply limitations. [2] Terms for specific types of nonlinear audio distortion include: crossover distortion, slew-Induced Distortion (SID) and transient intermodulation (TIM).

Distortion in music is often intentionally used as an effect when applied to an electric guitar signal in styles of rock music such as heavy metal and punk rock (see also overdrive and distortion synthesis). Other forms of audio distortion that may be referred to are non-flat frequency response, compression, modulation, aliasing, quantization noise, wow and flutter from analog media such as vinyl records and magnetic tape. The human ear cannot hear phase distortion, except that it may affect the stereo imaging. (See also: Audio system measurements.)

In most fields, distortion is characterized as unwanted change to a signal.

## Optics

In optics, image/optical distortion is a divergence from rectilinear projection caused by a change in magnification with increasing distance from the optical axis of an optical system.

## Map projections

In cartography, a distortion is the misrepresentation of the area or shape of a feature. The Mercator projection, for example, distorts by exaggerating the size of regions at high latitude.

## Related Research Articles

An amplifier, electronic amplifier or (informally) amp is an electronic device that can increase the power of a signal. It is a two-port electronic circuit that uses electric power from a power supply to increase the amplitude of a signal applied to its input terminals, producing a proportionally greater amplitude signal at its output. The amount of amplification provided by an amplifier is measured by its gain: the ratio of output voltage, current, or power to input. An amplifier is a circuit that has a power gain greater than one.

Amplitude distortion is distortion occurring in a system, subsystem, or device when the output amplitude is not a linear function of the input amplitude under specified conditions.

In telecommunications, a third-order intercept point (IP3) is a specific figure of merit associated with the more general third-order intermodulation (TOI) distortion, which is a measure for weakly nonlinear systems and devices, for example receivers, linear amplifiers and mixers. It is based on the idea that the device nonlinearity can be modeled using a low-order polynomial, derived by means of Taylor series expansion. The third-order intercept point relates nonlinear products caused by the third-order nonlinear term to the linearly amplified signal, in contrast to the second-order intercept point that uses second-order terms. (IP3) is the generally accepted unambiguous term for the third-order intercept point, although one occasionally sees the use of TOI for this figure-of-merit; such use is considered as incorrect by experts in the field.

The total harmonic distortion (THD) is a measurement of the harmonic distortion present in a signal and is defined as the ratio of the sum of the powers of all harmonic components to the power of the fundamental frequency. Distortion factor, a closely related term, is sometimes used as a synonym.

In electronics, a digital-to-analog converter is a system that converts a digital signal into an analog signal. An analog-to-digital converter (ADC) performs the reverse function.

A power inverter, or inverter, is a power electronic device or circuitry that changes direct current (DC) to alternating current (AC).

Nonlinear distortion is a term used to describe the phenomenon of a non-linear relationship between the "input" and "output" signals of - for example - an electronic device.

Frequency response is the quantitative measure of the output spectrum of a system or device in response to a stimulus, and is used to characterize the dynamics of the system. It is a measure of magnitude and phase of the output as a function of frequency, in comparison to the input. In simplest terms, if a sine wave is injected into a system at a given frequency, a linear system will respond at that same frequency with a certain magnitude and a certain phase angle relative to the input. Also for a linear system, doubling the amplitude of the input will double the amplitude of the output. In addition, if the system is time-invariant, then the frequency response also will not vary with time. Thus for LTI systems, the frequency response can be seen as applying the system's transfer function to a purely imaginary number argument representing the frequency of the sinusoidal excitation.

Audio system measurements are made for several purposes. Designers take measurements so that they can specify the performance of a piece of equipment. Maintenance engineers make them to ensure equipment is still working to specification, or to ensure that the cumulative defects of an audio path are within limits considered acceptable. Some aspects of measurement and specification relate only to intended usage. Audio system measurements often accommodate psychoacoustic principles to measure the system in a way that relates to human hearing.

Intermodulation (IM) or intermodulation distortion (IMD) is the amplitude modulation of signals containing two or more different frequencies, caused by nonlinearities or time variance in a system. The intermodulation between frequency components will form additional components at frequencies that are not just at harmonic frequencies of either, like harmonic distortion, but also at the sum and difference frequencies of the original frequencies and at sums and differences of multiples of those frequencies.

A voltage-controlled oscillator (VCO) is an electronic oscillator whose oscillation frequency is controlled by a voltage input. The applied input voltage determines the instantaneous oscillation frequency. Consequently, a VCO can be used for frequency modulation (FM) or phase modulation (PM) by applying a modulating signal to the control input. A VCO is also an integral part of a phase-locked loop.

Linear electronic oscillator circuits, which generate a sinusoidal output signal, are composed of an amplifier and a frequency selective element, a filter. A linear oscillator circuit which uses an RC network, a combination of resistors and capacitors, for its frequency selective part is called an RC oscillator.

A function generator is usually a piece of electronic test equipment or software used to generate different types of electrical waveforms over a wide range of frequencies. Some of the most common waveforms produced by the function generator are the sine wave, square wave, triangular wave and sawtooth shapes. These waveforms can be either repetitive or single-shot. Integrated circuits used to generate waveforms may also be described as function generator ICs.

In electronics, a frequency multiplier is an electronic circuit that generates an output signal whose output frequency is a harmonic (multiple) of its input frequency. Frequency multipliers consist of a nonlinear circuit that distorts the input signal and consequently generates harmonics of the input signal. A subsequent bandpass filter selects the desired harmonic frequency and removes the unwanted fundamental and other harmonics from the output.

In control systems theory, the describing function (DF) method, developed by Nikolay Mitrofanovich Krylov and Nikolay Bogoliubov in the 1930s, and extended by Ralph Kochenburger is an approximate procedure for analyzing certain nonlinear control problems. It is based on quasi-linearization, which is the approximation of the non-linear system under investigation by a linear time-invariant (LTI) transfer function that depends on the amplitude of the input waveform. By definition, a transfer function of a true LTI system cannot depend on the amplitude of the input function because an LTI system is linear. Thus, this dependence on amplitude generates a family of linear systems that are combined in an attempt to capture salient features of the non-linear system behavior. The describing function is one of the few widely applicable methods for designing nonlinear systems, and is very widely used as a standard mathematical tool for analyzing limit cycles in closed-loop controllers, such as industrial process controls, servomechanisms, and electronic oscillators.

Gain compression is a reduction in "differential" or "slope" gain caused by nonlinearity of the transfer function of the amplifying device. This nonlinearity may be caused by heat due to power dissipation or by overdriving the active device beyond its linear region. It is a large-signal phenomenon of circuits.

Distortion and overdrive are forms of audio signal processing used to alter the sound of amplified electric musical instruments, usually by increasing their gain, producing a "fuzzy", "growling", or "gritty" tone. Distortion is most commonly used with the electric guitar, but may also be used with other electric instruments such as bass guitar, electric piano, and Hammond organ. Guitarists playing electric blues originally obtained an overdriven sound by turning up their vacuum tube-powered guitar amplifiers to high volumes, which caused the signal to distort. While overdriven tube amps are still used to obtain overdrive, especially in genres like blues and rockabilly, a number of other ways to produce distortion have been developed since the 1960s, such as distortion effect pedals. The growling tone of a distorted electric guitar is a key part of many genres, including blues and many rock music genres, notably hard rock, punk rock, hardcore punk, acid rock, and heavy metal music, while the use of distorted bass has been essential in a genre of hip hop music and alternative hip hop known as "SoundCloud rap".

A total harmonic distortion analyzer calculates the total harmonic content of a sinewave with some distortion, expressed as total harmonic distortion (THD). A typical application is to determine the THD of an amplifier by using a very-low-distortion sinewave input and examining the output. The figure measured will include noise, and any contribution from imperfect filtering out of the fundamental frequency. Harmonic-by-harmonic measurement, without wideband noise, can be measured by a more complex wave analyser.

An Audio Analyzer is a test and measurement instrument used to objectively quantify the audio performance of electronic and electro-acoustical devices. Audio quality metrics cover a wide variety of parameters, including level, gain, noise, harmonic and intermodulation distortion, frequency response, relative phase of signals, interchannel crosstalk, and more. In addition, many manufacturers have requirements for behavior and connectivity of audio devices that require specific tests and confirmations.

Power amplifier classes are, in electronics, letter symbols applied to different power amplifier types. The class gives a broad indication of an amplifer's characteristics and performance. The classes are related to the time period that the active amplifier device is passing current, expressed as a fraction of the period of a signal waveform applied to the input. A class A amplifier is conducting through all the period of the signal; Class B only for one-half the input period, class C for much less than half the input period. A Class D amplifier operates its output device in a switching manner; the fraction of the time that the device is conducting is adjusted so a pulse width modulation output is obtained from the stage.

## References

1. Moscal, Tony (1994). Sound Check: The Basics of Sound and Sound Systems. Hal Leonard. p. 55. ISBN   9780793535590.
2. Audio Electronics by John Linsley Hood; page 162

This article incorporates  public domain material from the General Services Administration document "Federal Standard 1037C" (in support of MIL-STD-188 ).


text:
# Why don't most military transports use modern commercial engines?

Why don't most military transports use modern commercial engines?

More specifically planes like C-17, the Antonov's use older less powerful engines while modern efficient and powerful engines are available in the commercial sector.

• mainly because their missions are different (cruise and landing speed constraints, runway pavement, reliability after being shot,... are not the same) – Manu H Mar 26 '18 at 11:52
• Are you going to fund the upgrade? – KorvinStarmast Mar 26 '18 at 12:35
• Not sure about US military but to some other countries' military, acquiring commercial engines for military use, with a reliable supply of both engines and parts, is hard. E.g. if China and Russia can source modern commercial engines independently and reliably, then then they would very much like to use them on their military transports, or even bombers. – user3528438 Mar 26 '18 at 12:47
• @KorvinStarmast Upgrades of that sort tend to be self-funding... – Harper - Reinstate Monica Mar 26 '18 at 19:24

Some do; the C-17 you mention uses the Pratt & Whitney PW2000 which is also used on the Boeing 757. The USAF and USN also fly the C-40 which is the military variant of the 737 and carries the same engines.

Generally the answer is that military aircraft are built on spec for the military which is a bit different than the way the civilian market works. Civilian builders shop a design around to airlines to get some deposits then build the airframes (the notable exception being the 747 which was largely the idea of Pan-Am CEO Juan Trippe). This often causes there to be new aircraft every few years on the civilian side as Boeing needs to stay in business... On the contrary the military will put out a request for designs to meet their needs, evaluate the submissions and chose what is to be built. They can do this as often or as little as they so please (or as budget allows). If there is no active conflict or need for new tech then the military will keep flying what they have. Many military aircraft have cutting edge tech from the era they were designed in, they may however be dated by todays standards.

Much like the FAA here in the US the various military branches have their own certification programs and regulations thus upgrading and bringing in new gear may require something to be approved this can unfortunately stifle new technology being included due to high time and cost of approval. Similarly military requirements may be different, while a civilian airframe may suffice they may have takeoff length requirements or something similar that necessitate more thrust than their civilian counterpart thus variances in outfitting may occur.

• Is it relevant to bring in differing cost pressures? My (perhaps mistaken) understanding is that militaries have much less problems with regular operating budget than extraordinary budgets, such as for upgrading or new acquisitions; whereas commercial airlines are much more sensitive to operating costs, and consequently, commercial airlines are more willing to pay for fleet upgrades more regularly than militaries. Militaries have a harder time justifying new acquisitions if their expected threat/mission profiles haven't changed much, as you pointed out. – aerobot Mar 26 '18 at 15:26
• Nitpick. Is the 757 "modern"? It first flew nearly 40 years ago and has been out of production for nearly 15. – David Richerby Mar 26 '18 at 16:01
• @DavidRicherby It was reasonably modern when the C-17 was built. The C-17 first flew only 8 years after the 757 entered service. – reirab Mar 26 '18 at 16:21
• The 747 was actually based on a design for a military aircraft (it came out of Boeing's failed entry in the contest to design and build the strategic airlifter that ended up being Lockheed's C-5). – Vikki Aug 15 '19 at 22:46

Most military transports use engines that were modern when the transport was developed. 30 years later, the engines are outdated, but buying 4 new engines costs in the region of $100 million (and that's not counting the redesign and recertification) so that's rarely, if ever, done. • @DavidRicherby It's the redesign and recertification that makes it cost-prohibitive. This is even worse for a small air force with only 5 planes, as the fuel savings for the 5 frames would never come close to the up-front costs. The only way it would ever make sense for a small air force would be if a larger one had already absorbed the up-front R&D and recertification costs. – reirab Mar 26 '18 at 16:47 • @reirab But it turns out that the$100M claim is actually per-plane, as the answer has now been edited. – David Richerby Mar 26 '18 at 17:01

There are several reasons, although all of them can be reduced to a single one: they have different requirements:

• Military aircraft are most of part of their life on idle, in a hangar. We do not want to use military aircraft; we only use them when there is a conflict. That kills any economical trade-off of fuel savings for example.
• Mission of military aircraft is extremely different. No discussion about fighters as they are flying at higher Mach number (where commercial airplanes engines are not useful), concerning transport aircraft the commercial one are optimized for fuel saving that creates an expensive engine that is amortized with fuel savings along the life of the airplane and transport military airplane fly very often.
• There are requirements from military aircraft not satisfied by commercial engines, like for example, being able to land in sand or bumpy terrain. Engines from military aircraft are protected against that.

Saying that, there are some commonalities that engine manufacturers try to achieve, but that can be found at component level (i.e. having the same turbine for some stages).

• "we only use them when there is a conflict" ahem, if you would do that, then the conflict would be a bit one-sided, since your side would not know how to use those aircraft. – Federico Mar 26 '18 at 13:05
• Military planes don't just sit in hangars while there's no war on. They're used for training. A lot. – David Richerby Mar 26 '18 at 17:04
• Can confirm, I live near an air force base, they're out there almost every day. – C_Elegans Mar 26 '18 at 17:27
• @DavidRicherby: And for humanitarian missions and general heavy airlift, in the case of military transports (i.e., the ones that start with a C). – Vikki Mar 26 '18 at 18:08
• Yeah, military transports definitely don't just sit in a hangar until a conflict. However, it's true that they don't accumulate cycles and time as quickly as their civilian counterparts. Airliners are typically kept in the air as much as reasonably possible, as airliners sitting on the ground generate no revenue. – reirab Mar 26 '18 at 21:22


text:
# Promotion of a very excellent website

Recently, Cody Johnson created NoBash.com, which is a site dedicated to telling you if you are correct in wanting to give on the problem you are working on and start bashing numbers. Since this arose out of a conversation we were having about a name to give to a math web site, I thought it would be fitting to promote his site.

Ironically, of course. Because I have created a very bashy way to test for primality! See if you can come up with a bashier (slower) primality test than this.

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 import time start=time.time() factors=0 for i in range (1,n+1): for j in range (1,i+1): if i%j==0: factors=factors+1 if factors==2: print i, "is prime." if factors!=2: print i, "is not prime." factors=0 end=time.time() print "This operation took", end-start, "seconds."

Note by Trevor B.
6 years, 11 months ago

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

• Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
• Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
• Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$ ... $$ or $ ... $ to ensure proper formatting.
2 \times 3 $2 \times 3$
2^{34} $2^{34}$
a_{i-1} $a_{i-1}$
\frac{2}{3} $\frac{2}{3}$
\sqrt{2} $\sqrt{2}$
\sum_{i=1}^3 $\sum_{i=1}^3$
\sin \theta $\sin \theta$
\boxed{123} $\boxed{123}$

Sort by:

Divide the number by six and check the remainder.exception(2,3).

- 6 years, 11 months ago

Remainder has to 1 or 5 for a number to prime.

- 6 years, 11 months ago

$p\equiv \pm 1\pmod 6$ ($p\in\mathbb P$, $p>3$) is a necessary condition, but not sufficient (e.g., try $25$).

- 6 years, 11 months ago

Right.

- 6 years, 11 months ago

First, create a code that prime factorizes a number. Then, add the number $2$ to your prime array.

Now every step, you take all the primes in your prime array, multiply them, then add one. Then you prime factorize, and if there are any primes in your prime factorization (which there will be) that are not in the array, add them to the array. Repeat. Guaranteed non-efficiency.

I'm not sure that gives all the prime numbers though.

- 6 years, 11 months ago


text:
# Solving polynomial equations when you know in which number field the solutions live

Suppose I have a bunch of polynomial equations with coefficients in a number field, and suppose further that I'm guaranteed a priori that they have a solution in that number field. Can I leverage that knowledge into a technique for solving the equations more easily? The cases we care about are massively overdetermined systems of linear and quadratic equations.

-
I am curious about the origin of the equations you are interested in. Could you say a few words about it ? –  jvp Oct 25 '09 at 2:12
Over R, systems of quadratic equations (especially massively overdetermined ones) are no easier to solve than general systems of equations, by Kempe's Universality Theorem for linkages. (Tim Abbott and I have an unpublished paper on this.) I'm not sure whether the proof works rationally, though. –  Reid Barton Oct 25 '09 at 4:31
The origin of the equations is trying to construct fusion categories and subfactors by hand. The equations come from relations that we know to be satisfied. –  Noah Snyder Oct 25 '09 at 17:10

By Scott's remark, it seems that the linear terms do not suffice for determining the set S. (what is the expected cardinality of S, btw?) I know nothing about programming or complexity, but my suggestion is to try taking the 2-duple embedding. Sure, you replace P^20 by P^200 or so, but now you end up with linear equations in the variables X_ij = x_i x_j. Of course, you still have the quadratic equations in X_ij which determine the image of the 2-uple embedding, but at least now you will have 10^5 linear terms and then < 200 quadratics, even if you have a few more variables... If you are lucky, the linear space cut out in P^200 might actually be quite small.

-

Practically speaking: I would try to reduce the equations modulo several small primes (or prime powers), solve them by brute force, and then try to lift to solutions in your number field using the chinese remainder theorem. It might be helpful to combine this with solving them to high precision over the real (or complex) numbers.

-
Somewhat better? Find a local solution with invertible Jacobian, on a subset of equations maybe, and use a Newton technique to lift it high, so that LLL (p-adic) will find it in the number field. I don't think that $R$ or $C$ will help as well as p-adic for converging. What is the expected field degree, and size of the solutions? The largest I have seen with this is 8-10 variables and field degree 50-100. The work should be for finding the local solution. –  Junkie Apr 30 '10 at 8:14

I have to say that this sounds suspiciously close to Matiyasevich's proof of Hilbert's 10th problem (Yuri V. Matiyasevich, Hilbert's Tenth Problem, MIT Press, Cambridge, Massachusetts, 1993). The "yoga" of his proof is that you can have some "Godel coding" on systems of quadratic and linear forms, which shows that solving a system of such equations is hard from a logic/TCS point of view.

-

Should be able to use Groebner bases and elimination theory to do it, I think. Though in the case of linear and quadratic equations, I'm not sure how much help it will be.

-
No no, these are massively overdetermined. In typical examples, we're looking at >10^5 quadratics in 20 variables. Our experience so far with Groebner bases has been unhappy -- you can't just hand off the entire list of equations to a Groebner basis implementation and expect it to cope with modern RAM constraints. If this sounds wrong, please tell us! –  Scott Morrison Oct 25 '09 at 6:46
Ahh, if they're THAT overdetermined, I can't really offer much help to you. I don't really have anything that can handle those numbers. –  Charles Siegel Oct 25 '09 at 14:58
Generally Groebner basis algorithms are doubly exponential, never let them NEAR anything of that magnitude –  Michael Hoffman Oct 29 '09 at 14:59


text:
# Relationships between the roots of an entire function and the roots of its derivative

Hey everyone,

I would like to know if anybody could help me find references for the following.

Take a suitably well defined entire function $f(x)$ and it's derivative $\tilde{f}(x)$ to which the roots $x_n$ and $\tilde{x}_n$ are associated. The function $f(x)$ may have infinitely many roots, though naturally one needs to be more careful in this case. Let's discount these subtleties for the time being. Define

$$Z(s)=\sum_n\frac{1}{x_n^s} \hspace{8mm} \textrm{and} \hspace{8mm} \tilde{Z}(s)=\sum_n\frac{1}{\tilde{x}_n^s}.$$

One of the identities which I have proven which relates these is

$$\tilde{Z}(3)=Z(3)-\left(\frac{Z(2)}{Z(1)}\right)^3+3\left(\frac{Z(3)Z(2)}{(Z(1))^2}-\frac{Z(4)}{Z(1)}\right).$$

I also have proven other identities (some much more simple) of this form. I have searched the internet, journals and every analysis book in my University library and found nothing of the sort. Also the main applications which I would expect to find curiously also do not appear in any of the aforementioned sources.

Edit

Just to say thanks to those who replied. The question has been answered :)

-
Sorry I have just realised that I completely misnamed the thread! –  backstoreality Dec 9 '10 at 19:33
You can rename it if you edit the question. –  Ryan Reich Dec 9 '10 at 19:53
Thank you Ryan :) –  backstoreality Dec 9 '10 at 20:12

I don't know if there are any general results about these, but when $f$ is a polynomial, these must be in essence results about symmetric functions. If $f(z)=z^n+a_{n-1} z^{n-1}+\cdots+a_1z+a_0$ then $Z(1)=-a_1/a_0$, $Z(2)=Z(1)^2-2a_2/a_0$ etc. In this case your results surely specialize to polynomial identities in the $a_j$.

-
Right. The Z(s) here are the power symmetric functions, which are thoroughly studied in the literature. The \tilde{Z}(s) I am unsure about, but identities for the power symmetric functions will apply to them. –  Qiaochu Yuan Dec 9 '10 at 19:46
Hey, Yes the results do specialise to give the results which you provide. However they also cover general entire functions, providing they obey certain qualities. Do you have any idea where I might find a list of references for the above polynomial identities? It might help Thanks very much! - Joe –  backstoreality Dec 9 '10 at 19:46
@Joe: symmetric function identities are covered in Stanley's Enumerative Combinatorics (I can't remember which part at the moment), and they are also covered in Sagan's The Symmetric Group. –  Qiaochu Yuan Dec 9 '10 at 19:54
@Qiaochu: Thank you, I found a copy on google books and I will have a read through. I guessed that my identities, when applied to polynomials, would surely be known. However it's seeming less likely that the results are known when applied to general entire functions –  backstoreality Dec 9 '10 at 19:58
And also in Macdonald's Symmetric Functions and Hall Polynomials. I don't know off-hand if they have results like this though. –  Robin Chapman Dec 9 '10 at 19:59

Let $f(x) = (1 - r_1 x)...(1 - r_n x)$ be a polynomial. Then $f(x) = 1 - e_1 x^1 + e_2 x^2 \mp ...$ where the $e_i$ are the elementary symmetric functions in the $r_i$. We define also $p_k = \sum_i r_i^k$, the power symmetric functions in the $r_i$. Then Newton's identities state that

$$ke_k = \sum_{i=1}^{k} (-1)^{i-1} e_{k-i} p_i.$$

This identity is equivalent to the generating function identity

$$\frac{f'(x)}{f(x)} = \sum_{i=1}^{n} \frac{r_i}{1 - r_i x} = \sum_{k \ge 0} p_{k+1} x^k$$

which follows from taking logarithmic derivatives on both sides. Now, you want to relate the functions $p_k$ to the functions $\tilde{p}_k$, the power symmetric functions of the reciprocals of the roots of the derivative $f'(x)$. Applying Newton's identities to $f'(x) = -e_1 + 2e_2 x - 3e_3 x^2 \pm ...$ gives

$$k(k+1) \frac{e_{k+1}}{e_1} = \sum_{i=1}^k (-1)^{i-1} \frac{(k+1-i) e_{k+1-i}}{e_1} \tilde{p}_i.$$

This pair of identities should get you your results (at least formally, letting $n \to \infty$). You may or may not find it useful to write Newton's identities in the equivalent form

$$e_n = \frac{1}{n!} \sum_{\sigma \in S_n} \text{sgn}(\sigma) p_{\sigma}$$

where $p_{\sigma} = p_{\lambda_1} ... p_{\lambda_i}$, where $\sigma$ has cycle type $(\lambda_1, ... \lambda_i)$. This gives

$$\frac{(n+1) e_{n+1}}{e_1} = \frac{1}{n!} \sum_{\sigma \in S_n} \text{sgn}(\sigma) \tilde{p}_{\sigma}.$$

-
Thank you again for your reply. This method seems similar to my method and I can see why it would give the same results, at least in the finite case :) –  backstoreality Dec 9 '10 at 20:24
My method uses repeated derivatives of $\frac{f'(x)}{f(x)}$ evaluated at $x=0$ on infinite products. This is rigorous providing that the roots of the product grow at a sufficient rate for the product (in Hadamard form) to converge. –  backstoreality Dec 9 '10 at 20:29
@Joe: the passage from the finite to the infinite case should be straightforward. –  Qiaochu Yuan Dec 9 '10 at 20:33
@ Qiaochu: It is not completely straightforward as there is no assurance (that I can find) that the sum of the roots of $f'(x)$ should converge in the infinite case. In fact I only have on concrete example where I can prove that this is the case –  backstoreality Dec 9 '10 at 20:59