text:
# Why does being “bonded” decrease atomic size?

I have a furiously overwhelming question-

Why is the atomic size of noble gases larger than the atomic size of the previous halogen when atomic sizes decrease across a group?

I did search it on the net and asked my teacher but everyone says that because noble gases are usually not bonded.

But:

Why does being "bonded" decrease atomic size?

Also we are talking about the atomic sizes of isolated elements?

• What data are you using? According to this Wikipedia article the calculated atomic radius is smaller for a noble gas than it is for the preceding halogen, just as you would expect. – ron Jan 18 '17 at 18:42
• sorry I mean the "previoius halogen", I edited the question. :) – MartianCactus Jan 19 '17 at 7:43

The first thing you should realize is that there are various definitions of the size of the atom. One distinguishes for example the covalent radius, the Van der Waals radius and the ionic radius. The covalent radius is based on the binding of atoms into molecules and on the resulting bond length. The van der Waals radius is half the minimum distance between two atoms that not form a covalent bond and the ionic radius is derived from crystal structures of ions in salts. The covalent radius cannot be determined for noble gasses as they do not bind under normal conditions. The Van der Waals radius however can be determined and since the noble gasses are not very polarizable, the Van der Waals radius does increase with respect to the preceding halogen. You'll find more in the wikipedia article as mentioned by ron.

• I dont really understand what the van der walls force is...why would you take the half of the distance between 2 non bonded elements? – MartianCactus Jan 19 '17 at 7:58
• van der Waals forces are actually attractive forces due to dispersion of electron clouds, but they do not play a role in this discussion. The point here is one of the assumptions of the van der Waals gas equation: atoms occupy space and two of them can't occupy the same volume at the same time; so if you model them as perfect spheres, the closest they can get is actually just twice the radius of that sphere. If both atoms are of the same element, this radius is the van der Waals radius for this element. – Felipe S. S. Schneider Jan 19 '17 at 22:56

As Paul has pointed out, there are many different ways of defining atomic radii. ron has also pointed out that the trend goes in the opposite direction from what you said. For instance, according to Ptable,

|Calculated radii |
|  |r(pm)|  |r(pm)|
|H | 53  |He| 31  |
|F | 42  |Ne| 38  |
|Cl| 79  |Ar| 71  |
|Br| 94  |Kr| 88  |

I have added hydrogen here as the natural "halogen" for helium. Empirical and covalent also follow the same trend as above. But the van der Waals radii, as shown below, do not,

|    vdW radii    |
|  |r(pm)|  |r(pm)|
|H | 120 |He| 140 |
|F | 147 |Ne| 154 |
|Cl| 175 |Ar| 188 |
|Br| 185 |Kr| 202 |

I am assuming this is the data set you've mentioned. The reason for the disagreement is that electron clouds may relax or contract depending on their chemical environments and so do atomic radii. Thus, what this shows is that:

1. H, F, Cl and Br are larger than He, Ne, Ar and Kr when bonded.
2. H, F, Cl and Br are smaller than He, Ne, Ar and Kr when not bonded;

The reason for the above is the following:

Atomic size gradually decreases from left to right across a period of elements. This is because, within a period or family of elements, all electrons are added to the same shell. However, at the same time, protons are being added to the nucleus, making it more positively charged. The effect of increasing proton number is greater than that of the increasing electron number; therefore, there is a greater nuclear attraction. This means that the nucleus attracts the electrons more strongly, pulling the atom's shell closer to the nucleus. The valence electrons are held closer towards the nucleus of the atom. As a result, the atomic radius decreases.

What is being described is also called shielding effect.

2. For van der Waals radii (source),

[While] van der Waals radius is used to define half of the distance between the closest approach of two non-bonded atoms of a given element.

[...]

[Based on the ideal gas law above], van der Waals equation takes the molecular size and the molecular force into account. As a result, the attractive force (a/V2) is added into the pressure part. Likewise, the volume is subtracted by the molecular volume (b), which is determined by the van der Waals radius.

Here the shielding effect is much less important. van der Waals radii are actually used to express how much volume each atom occupies on its own. It is a minimum interatomic contact distance, less than that the atoms are somehow bonded. And here the most important effect is plain electrostatic repulsion between atoms.

Thus it seems reasonable to me that it is harder to put two Kr atoms close together than two Br atoms, simply because Kr has more electrons and the electrostatic repulsion will be stronger between them.

• and what do you mean by "those atoms"? If you mean He, Ne, Ar and K then thats my question. Why are they smaller when those atoms are not bonded? – MartianCactus Jan 19 '17 at 7:46
• I edited the original post to clarify it. – Felipe S. S. Schneider Jan 19 '17 at 11:45


text:
# Lindelöf's Lemma/Lemma/Lemma

## Lemma

Let $R$ be a set of real intervals with rational numbers as endpoints.

Let every interval in $R$ be of the same type of which there are four: $\openint \ldots \ldots$, $\closedint \ldots \ldots$, $\hointr \ldots \ldots$, and $\hointl \ldots \ldots$.

Then $R$ is countable.

## Proof

### Lemma 2

Let $S$ be countable set.

Let $T$ be a set.

Let $T$ be in one-to-one correspondence with $S$.

Then $T$ is countable.

$\Box$

The endpoint of an interval in $R$ is characterized by a rational number as every interval in $R$ is of the same type.

Therefore, the set consisting of the left hand endpoints of every interval in $R$ is countable.

Also, the set consisting of the right hand endpoints of every interval in $R$ is countable.

Therefore, the cartesian product of the sets consisting of the respectively left hand and right hand endpoints of every interval in $R$ is countable.

A subset of this cartesian product is in one-to-one correspondence with $R$.

$R$ is countable by Lemma 2 as $R$ is in one-to-one correspondence with a countable set.

$\blacksquare$

format: plain


text:
Browse Questions

# Essential amino acids are

$\begin{array}{1 1}(a)\;\alpha\text{ amino acids which are needed for health and growth of human being and are synthesised by human body}\\(b)\;\alpha\text{ amino acids which are needed for health and growth of human being but are not synthesised by human body} \\(c)\;\alpha\text{ amino acids which are needed for health and growth of human being but are not synthesised by human body}\\(d)\;\alpha\text{ amino acids which are needed for health and growth of human being and are synthesised by human body}\end{array}$

$\alpha$ amino acids which are needed for health and growth of human being but are not synthesised by human body. For example valine, leucine, phenylalanine.
Hence (b) is the correct answer.


text:
# Spike Train Mutual Information

Would be nice to compute the mutual information between multi-neuronal spike trains in Spiking Neural Networks. Perhaps we can learn some low-level spike representation, and relate this somehow to Information Bottleneck in Deep Neural Networks.


text:
# Nonconservative gradients (not an oxymoron)

1. Jul 15, 2009

### okkvlt

fx,fy=-y,x
curl(fx,fy)=2

its counterclockwise so the gradient is pointing ccw.
the gradient is the direction of max increase, so
then the surface z=f[x,y] whose gradient is -y,x is a spiral/screw whose z position goes up forever as x and y are traced out counterclockwise

so, a nonconservative field IS a gradient of a surface.
why was i lied to?

2. Jul 15, 2009

### Office_Shredder

Staff Emeritus
I think you're going to need to write this out clearer. How can the curl of a vector be a number? How can the gradient of a three variable equation be a two dimensional vector?

Last edited: Jul 15, 2009
3. Jul 16, 2009

### BobbyBear

Hello there! Okay, lets take it step by step and yes, please do be a little clearer so we can understand exactly what you're saying. I think what you're saying is that you're trying to find the surface whose gradient at each point is (-y,x,0)? How did you make these out to be spirals?

So let's see, you've got the vector field:

$$\vec{V} = (-y, x, 0)$$

Ye? And you've calculated its curl, which is:

$$Curl \vec{V} = (0,0,2)$$

so the field is 'rotating' counterclockwise viewed from above (the positive z axis). The curl of your vector field is constant in all of space, and non-zero. Because it is non-zero means that your vector field $$\vec{V} = (-y, x, 0)$$ cannot be a gradient, in other words, there is no scalar field whose gradient is $$\vec{V}$$. That is, there are no surfaces whose gradient at each point is (-y, x, 0). But! this does not mean that there are no surfaces which are orthogonal at each point to $$\vec{V}$$. In fact, in your case, these surfaces DO exist, because the vector field $$\vec{V}$$ is normal to its curl.

4. Jul 16, 2009

### BobbyBear

Just to help visualize, here is the curl of your vector field V, as viewed from above:

http://img31.imageshack.us/img31/4605/curl.gif [Broken]

Last edited by a moderator: May 4, 2017


text:
# Wykaz publikacji wybranego autora

## Łukasz Mik, dr inż.

Wydział Informatyki, Elektroniki i Telekomunikacji
WIEiT-ke, Katedra Elektroniki

 Identyfikatory Autora Informacje o Autorze w systemach zewnętrznych ORCID: 0000-0003-2712-6861 ResearcherID: brak Scopus: 36634742500 OPI Nauka Polska

Zakres roczników od wszystkie lata...202220212020201920182017201620152014201320122011201020092008200720062005200420032002200120001999<1999 wszystko...referatyartykuły

Liczba pozycji spełniających powyższe kryteria selekcji: 44, z ogólnej liczby 46 publikacji Autora

 wydruk: sortowanie:

1
• A readout circuit dedicated for the detection of chemiluminescence using a silicon photomultiplier
2
• Challenges in QCD matter physics - the scientific programme of the Compressed Baryonic Matter experiment at FAIR
3
• Compensation of the temperature fluctuations in the silicon photomultiplier measurement system
4
• Digital library created to facilitate design of SOI detectors in Lapis Semiconductor 0.2 $\mu$m SOI technology
5
• Erratum to: Measurements of $\pi^{−}production$ in $^{7}Be + ^9{Be}$ collisions at beam momenta from 19A to 150A GeV/c in the NA61/SHINE experiment at the CERN SPS
6
• Feasibility studies of conserved charge fluctuations in Au-Au collisions with CBM
7
• Fluorescence detection in microfluidics systems
8
• Front-end electronics with fast signal shaper for Silicon Photomultipliers
9
• Fully differential Charge to Time Converter and fast shaper readout circuit with gain compensation for SiPM
10
• Gain compensation technique by bias correction in arrays of Silicon Photomultipliers using fully differential fast shaper
11
• Hidden strangeness shines in NA61/SHINE
12
• $K*(892)^{0}$ meson production in inelastic p+p interactions at 158 GeV/c beam momentum measured by NA61/SHINE at the CERN SPS
13
• Low intensity fluorescence light measurements using silicon photomultiplier with dedicated front-end ASIC
14
• Measurement of meson resonance production in $\pi^−$+C interactions at SPS energies
15
• Measurement of $\phi$ meson production in \emph{p + p} interactions at 40, 80 and 158 GeV/c with the NA61/SHINE spectrometer at the CERN SPS
16
• Measurement of the production cross section of 31 GeV/$c$ protons on carbon via beam attenuation in a 90-cm-long target
17
• Measurements of hadron production in $\pi^{+} + C$ and $\pi^{+} + Be$ interactions at 60 GeV/c
18
• Measurements of $\pi^{-}$ production in $^{7}Be + ^{9}Be$ collisions at beam momenta from 19A to 150A GeV/c in the NA61/SHINE experiment at the CERN SPS
19
• Measurements of $\pi^{\pm}$, $K^{\pm}$ and proton double differential yields from the surface of the T2K replica target for incoming 31 GeV/$c$ protons with the NA61/SHINE spectrometer at the CERN SPS
20
• Measurements of $\pi^{\pm}, K^{\pm}, p$ and $\bar{p}$ spectra in $^{7}Be+^{9}Be$ collisions at beam momenta from 19A to 150A GeV/c with the NA61/SHINE spectrometer at the CERN SPS
21
• Measurements of $\pi^\pm$, $K^\pm$, p and $\tilde{p}$ spectra in proton-proton interactions at 20, 31, 40, 80 and 158 GeV/c with the NA61/SHINE spectrometer at the CERN SPS
22
• Measurements of production and inelastic cross sections for p + C, p + Be, and p + Al at 60 GeV/$c$ and p + C and p + Be at 120 GeV/$c$
23
• Measurements of total production cross sections for $\pi^++C$, $\pi^++Al$, $K^++C$, and $K^++Al$ at 60 GeV/c and $\pi^++C$ and $\pi^++Al$ at 31 GeV/c
24
• Measurements of $\Xi (1530)^{0}$ and $\bar{\Xi} (1530)^{0}$ production in proton-proton interactions at $\sqrt{s_{NN}}$ = 17.3 GeV in the NA61/SHINE experiment
25
• Measurements of $\Xi^{-}$ and $\bar{\Xi}^+$ production in proton-proton interactions at $\sqrt{S}_{NN} = 17.3 GeV$ in the NA61/SHINE experiment


text:
# System of $N$ bosons

What precaution needs to be observed in writing down an expression for the total number of bosons $N$ valid at low temperatures?

• You mean in second quantization? – Giuseppe Mar 30 '18 at 11:23

For a gas of $N$ bosons, the chemical potential $\mu_b$ is negative at high temperatures. As the temperature decreases towards a critical temperature $T_c$, $|\mu_b|$ also decreases until it reaches zero, and then remains stuck at zero for lower temperatures. The average number of bosons in the ground state is: $$N_0=\frac{1}{\exp\Big(\frac{|\mu_b|}{k_B T}\Big)-1}$$ Since the argument of the exponential is very small as $T\rightarrow T_c^+$ because $|\mu_b|\rightarrow 0$, you can taylor expand the exponential to first order to get: $$N_0=\frac{k_B T}{|\mu_b|}$$
In the case of $T\rightarrow T_c^-$, since the expression for $N_0$ would diverge, it is convenient to find an expression for the number of bosons which is not in the ground state, where $\mu_b=0$. $$N-N_0=\int_0^{\infty}\frac{g(\epsilon)d\epsilon}{\exp\Big(\frac{\epsilon}{k_B T}\Big)-1}$$ where $g(\epsilon)$ is the density of energy states. This was a specific example for the Bose-Einstein condensation, where you can see that the ground state is populated by a macroscopic number of particles. It is the most relevant example when considering a gas of bosons at low temperatures.


text:
# Structured Settlement Vs. Lump Sum Settlement

• June 2nd 2005, 03:21 PM
Law Man
Structured Settlement Vs. Lump Sum Settlement
Here is the question: There is a person who has worked with asbestos for a large construction company and has contracted Pleural Mesothelioma. The person is entitled to a large settlement from this company but how could that person decide which of the following two options is better? What is the information needed in order to make a sound decision:

1. One lump sum settlement.
2. A structured Settlement.

Under a structured settlement, an injury victim doesn't receive compensation for his or her injuries in one lump sum. Rather, he will receive a stream of tax-free payments tailored to meet future medical expenses and basic living needs.

Let us say that one lump sum settlement is 'S' and that the structured settlement payments are 'P' once a year. If the person is likely to live for 'X' amount of years. What would the equation be to determine which choice is more financially sound?

Thanks for any help.
• June 5th 2005, 04:33 PM
hpe
There isn't enough information to answer this question. What is also needed is the interest rate (e.g. a money market rate that the person in question could collect if the lump sum were put into a bank account) for the x years that the person is is expected to live. Let's assume that the interest rate is i (in fractions of 1, so 5% means i=0.05), fixed , and that the person will die in year x after the agreement goes into force, also fixed. Also assume that the structured settlement payments are made at the beginning of each year. The structured settlement is favorable if
$
P \frac{1-(1-i)^x}{i} > S
$

Of course the assumptions of constant interest rate and fixed life expectancy are unrealistic. Actuarial models exist that allow a company selling term insurance to compare the two (this is after all almost the same thing!), but an individual has a different viewpoint, since he is not interested in coming out ahead on average for a large number of life insurance policies, but rather in coming out ahead with large probability.
• June 5th 2005, 04:47 PM
Law Man
Pleural Mesothelioma Structured Settlement Calculation
Thank you. This is a great help to try and run some scenarios.


text:
Refitting PyMC3 models with ArviZ (and xarray)#

ArviZ is backend agnostic and therefore does not sample directly. In order to take advantage of algorithms that require refitting models several times, ArviZ uses SamplingWrappers to convert the API of the sampling backend to a common set of functions. Hence, functions like Leave Future Out Cross Validation can be used in ArviZ independently of the sampling backend used.

Below there is an example of SamplingWrapper usage for PyMC3.

Before starting, it is important to note that PyMC3 cannot modify the shapes of the input data using the same compiled model. Thus, each refitting will require a recompilation of the model.

import arviz as az
import pymc3 as pm
import numpy as np
import matplotlib.pyplot as plt
import scipy.stats as stats
import xarray as xr

For the example, we will use a linear regression model.

np.random.seed(26)

xdata = np.linspace(0, 50, 100)
b0, b1, sigma = -2, 1, 3
ydata = np.random.normal(loc=b1 * xdata + b0, scale=sigma)

plt.plot(xdata, ydata);

Now we will write the PyMC3 model, keeping in mind the following two points:

1. Data must be modifiable (both x and y).

2. The model must be recompiled in order to be refitted with the modified data. We, therefore, have to create a function that recompiles the model when it’s called. Luckily for us, compilation in PyMC3 is generally quite fast.

def compile_linreg_model(xdata, ydata):
with pm.Model() as model:
x = pm.Data("x", xdata)
b0 = pm.Normal("b0", 0, 10)
b1 = pm.Normal("b1", 0, 10)
sigma_e = pm.HalfNormal("sigma_e", 10)

y = pm.Normal("y", b0 + b1 * x, sigma_e, observed=ydata)
return model

sample_kwargs = {"draws": 500, "tune": 500, "chains": 4}
with compile_linreg_model(xdata, ydata) as linreg_model:
trace = pm.sample(**sample_kwargs)

Auto-assigning NUTS sampler...
Multiprocess sampling (4 chains in 4 jobs)
NUTS: [sigma_e, b1, b0]

100.00% [4000/4000 00:02<00:00 Sampling 4 chains, 0 divergences]
Sampling 4 chains for 500 tune and 500 draw iterations (2_000 + 2_000 draws total) took 3 seconds.
The acceptance probability does not match the target. It is 0.917825834816141, but should be close to 0.8. Try to increase the number of tuning steps.
The acceptance probability does not match the target. It is 0.8850799498280131, but should be close to 0.8. Try to increase the number of tuning steps.
The acceptance probability does not match the target. It is 0.8818306765045102, but should be close to 0.8. Try to increase the number of tuning steps.

We have defined a dictionary sample_kwargs that will be passed to the SamplingWrapper in order to make sure that all refits use the same sampler parameters.

We follow the same pattern with az.from_pymc3.

Note, however, how coords are not set. This is done to prevent errors due to coordinates and values shapes being incompatible during refits. Otherwise we’d have to handle subsetting of the coordinate values even though the refits are never used outside the refitting functions such as reloo().

We also exclude the model because the model, like the trace, is different for every refit. This may seem counterintuitive or even plain wrong, but we have to remember that the pm.Model object contains information like the observed data.

dims = {"y": ["time"], "x": ["time"]}
idata_kwargs = {
"dims": dims,
"log_likelihood": False,
}
idata = az.from_pymc3(trace, model=linreg_model, **idata_kwargs)

idata

arviz.InferenceData
• <xarray.Dataset>
Dimensions:  (chain: 4, draw: 500)
Coordinates:
* chain    (chain) int64 0 1 2 3
* draw     (draw) int64 0 1 2 3 4 5 6 7 8 ... 492 493 494 495 496 497 498 499
Data variables:
b0       (chain, draw) float64 -2.545 -2.677 -2.088 ... -3.023 -2.545 -2.89
b1       (chain, draw) float64 1.016 1.02 0.9981 1.022 ... 1.034 1.023 1.012
sigma_e  (chain, draw) float64 2.772 2.993 2.867 2.833 ... 2.8 2.838 3.039
Attributes:
created_at:                 2020-10-06T00:56:59.863225
arviz_version:              0.10.0
inference_library:          pymc3
inference_library_version:  3.9.3
sampling_time:              3.375001907348633
tuning_steps:               500

• <xarray.Dataset>
Dimensions:             (chain: 4, draw: 500)
Coordinates:
* chain               (chain) int64 0 1 2 3
* draw                (draw) int64 0 1 2 3 4 5 6 ... 494 495 496 497 498 499
Data variables:
step_size_bar       (chain, draw) float64 0.4844 0.4844 ... 0.5218 0.5218
step_size           (chain, draw) float64 0.6579 0.6579 ... 0.5572 0.5572
energy_error        (chain, draw) float64 0.1089 -0.01555 ... -0.1793 1.522
process_time_diff   (chain, draw) float64 0.0005479 0.001 ... 0.001683
max_energy_error    (chain, draw) float64 0.1089 -0.1235 ... -0.1793 2.335
perf_counter_start  (chain, draw) float64 3.84e+04 3.84e+04 ... 3.84e+04
depth               (chain, draw) int64 2 3 4 4 4 4 3 3 ... 3 3 3 2 3 3 3 3
diverging           (chain, draw) bool False False False ... False False
perf_counter_diff   (chain, draw) float64 0.0005474 0.0009994 ... 0.001682
energy              (chain, draw) float64 256.5 256.4 256.8 ... 257.8 260.0
mean_tree_accept    (chain, draw) float64 0.935 1.0 0.9774 ... 0.9993 0.4627
lp                  (chain, draw) float64 -256.3 -256.3 ... -255.9 -258.6
tree_size           (chain, draw) float64 3.0 7.0 15.0 11.0 ... 7.0 7.0 7.0
Attributes:
created_at:                 2020-10-06T00:56:59.868643
arviz_version:              0.10.0
inference_library:          pymc3
inference_library_version:  3.9.3
sampling_time:              3.375001907348633
tuning_steps:               500

• <xarray.Dataset>
Dimensions:  (time: 100)
Coordinates:
* time     (time) int64 0 1 2 3 4 5 6 7 8 9 ... 90 91 92 93 94 95 96 97 98 99
Data variables:
y        (time) float64 -1.412 -7.319 1.151 1.502 ... 48.49 48.52 46.03
Attributes:
created_at:                 2020-10-06T00:56:59.872278
arviz_version:              0.10.0
inference_library:          pymc3
inference_library_version:  3.9.3

• <xarray.Dataset>
Dimensions:  (time: 100)
Coordinates:
* time     (time) int64 0 1 2 3 4 5 6 7 8 9 ... 90 91 92 93 94 95 96 97 98 99
Data variables:
x        (time) float64 0.0 0.5051 1.01 1.515 ... 48.48 48.99 49.49 50.0
Attributes:
created_at:                 2020-10-06T00:56:59.872872
arviz_version:              0.10.0
inference_library:          pymc3
inference_library_version:  3.9.3

We are now missing the log_likelihood group due to setting log_likelihood=False in idata_kwargs. We are doing this to ease the job of the sampling wrapper. Instead of going out of our way to get PyMC3 to calculate the pointwise log likelihood values for each refit and for the excluded observation at every refit, we will compromise and manually write a function to calculate the pointwise log likelihood.

Even though it is not ideal to lose part of the straight out of the box capabilities of PyMC3, this should generally not be a problem. In fact, other PPLs such as Stan always require writing the pointwise log likelihood values manually (either within the Stan code or in Python). Moreover, computing the pointwise log likelihood in Python using xarray will be more efficient in computational terms than the automatic extraction from PyMC3.

It could even be written to be compatible with Dask. Thus it will work even in cases where the large number of observations makes it impossible to store pointwise log likelihood values (with shape n_samples * n_observations) in memory.

def calculate_log_lik(x, y, b0, b1, sigma_e):
mu = b0 + b1 * x
return stats.norm(mu, sigma_e).logpdf(y)

This function should work for any shape of the input arrays as long as their shapes are compatible and can broadcast. There is no need to loop over each draw in order to calculate the pointwise log likelihood using scalars.

Therefore, we can use xr.apply_ufunc to handle the broadasting and preserve the dimension names:

log_lik = xr.apply_ufunc(
calculate_log_lik,
idata.constant_data["x"],
idata.observed_data["y"],
idata.posterior["b0"],
idata.posterior["b1"],
idata.posterior["sigma_e"],
)

The first argument is the function, followed by as many positional arguments as needed by the function, 5 in our case. As this case does not have many different dimensions nor combinations of these, we do not need to use any extra kwargs passed to xr.apply_ufunc.

We are now passing the arguments to calculate_log_lik initially as xarray.DataArrays. What is happening here behind the scenes is that xr.apply_ufunc is broadcasting and aligning the dimensions of all the DataArrays involved and afterwards passing Numpy arrays to calculate_log_lik. Everything works automagically.

Now let’s see what happens if we were to pass the arrays directly to calculate_log_lik instead:

calculate_log_lik(
idata.constant_data["x"].values,
idata.observed_data["y"].values,
idata.posterior["b0"].values,
idata.posterior["b1"].values,
idata.posterior["sigma_e"].values
)

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-10-fc2d553bde92> in <module>
----> 1 calculate_log_lik(
2     idata.constant_data["x"].values,
3     idata.observed_data["y"].values,
4     idata.posterior["b0"].values,
5     idata.posterior["b1"].values,

<ipython-input-8-e6777d985e1f> in calculate_log_lik(x, y, b0, b1, sigma_e)
1 def calculate_log_lik(x, y, b0, b1, sigma_e):
----> 2     mu = b0 + b1 * x
3     return stats.norm(mu, sigma_e).logpdf(y)

ValueError: operands could not be broadcast together with shapes (4,500) (100,)

If you are still curious about the magic of xarray and xr.apply_ufunc, you can also try to modify the dims used to generate the InferenceData a couple cells before:

dims = {"y": ["time"], "x": ["time"]}

What happens to the result if you use a different name for the dimension of x?

idata

arviz.InferenceData
• <xarray.Dataset>
Dimensions:  (chain: 4, draw: 500)
Coordinates:
* chain    (chain) int64 0 1 2 3
* draw     (draw) int64 0 1 2 3 4 5 6 7 8 ... 492 493 494 495 496 497 498 499
Data variables:
b0       (chain, draw) float64 -2.545 -2.677 -2.088 ... -3.023 -2.545 -2.89
b1       (chain, draw) float64 1.016 1.02 0.9981 1.022 ... 1.034 1.023 1.012
sigma_e  (chain, draw) float64 2.772 2.993 2.867 2.833 ... 2.8 2.838 3.039
Attributes:
created_at:                 2020-10-06T00:56:59.863225
arviz_version:              0.10.0
inference_library:          pymc3
inference_library_version:  3.9.3
sampling_time:              3.375001907348633
tuning_steps:               500

• <xarray.Dataset>
Dimensions:             (chain: 4, draw: 500)
Coordinates:
* chain               (chain) int64 0 1 2 3
* draw                (draw) int64 0 1 2 3 4 5 6 ... 494 495 496 497 498 499
Data variables:
step_size_bar       (chain, draw) float64 0.4844 0.4844 ... 0.5218 0.5218
step_size           (chain, draw) float64 0.6579 0.6579 ... 0.5572 0.5572
energy_error        (chain, draw) float64 0.1089 -0.01555 ... -0.1793 1.522
process_time_diff   (chain, draw) float64 0.0005479 0.001 ... 0.001683
max_energy_error    (chain, draw) float64 0.1089 -0.1235 ... -0.1793 2.335
perf_counter_start  (chain, draw) float64 3.84e+04 3.84e+04 ... 3.84e+04
depth               (chain, draw) int64 2 3 4 4 4 4 3 3 ... 3 3 3 2 3 3 3 3
diverging           (chain, draw) bool False False False ... False False
perf_counter_diff   (chain, draw) float64 0.0005474 0.0009994 ... 0.001682
energy              (chain, draw) float64 256.5 256.4 256.8 ... 257.8 260.0
mean_tree_accept    (chain, draw) float64 0.935 1.0 0.9774 ... 0.9993 0.4627
lp                  (chain, draw) float64 -256.3 -256.3 ... -255.9 -258.6
tree_size           (chain, draw) float64 3.0 7.0 15.0 11.0 ... 7.0 7.0 7.0
Attributes:
created_at:                 2020-10-06T00:56:59.868643
arviz_version:              0.10.0
inference_library:          pymc3
inference_library_version:  3.9.3
sampling_time:              3.375001907348633
tuning_steps:               500

• <xarray.Dataset>
Dimensions:  (time: 100)
Coordinates:
* time     (time) int64 0 1 2 3 4 5 6 7 8 9 ... 90 91 92 93 94 95 96 97 98 99
Data variables:
y        (time) float64 -1.412 -7.319 1.151 1.502 ... 48.49 48.52 46.03
Attributes:
created_at:                 2020-10-06T00:56:59.872278
arviz_version:              0.10.0
inference_library:          pymc3
inference_library_version:  3.9.3

• <xarray.Dataset>
Dimensions:  (time: 100)
Coordinates:
* time     (time) int64 0 1 2 3 4 5 6 7 8 9 ... 90 91 92 93 94 95 96 97 98 99
Data variables:
x        (time) float64 0.0 0.5051 1.01 1.515 ... 48.48 48.99 49.49 50.0
Attributes:
created_at:                 2020-10-06T00:56:59.872872
arviz_version:              0.10.0
inference_library:          pymc3
inference_library_version:  3.9.3

• <xarray.Dataset>
Dimensions:  (chain: 4, draw: 500, time: 100)
Coordinates:
* time     (time) int64 0 1 2 3 4 5 6 7 8 9 ... 90 91 92 93 94 95 96 97 98 99
* chain    (chain) int64 0 1 2 3
* draw     (draw) int64 0 1 2 3 4 5 6 7 8 ... 492 493 494 495 496 497 498 499
Data variables:
x        (time, chain, draw) float64 -2.022 -2.105 -2.0 ... -2.368 -2.183

We will create a subclass of az.SamplingWrapper.

class PyMC3LinRegWrapper(az.SamplingWrapper):
def sample(self, modified_observed_data):
with self.model(*modified_observed_data) as linreg_model:
idata = pm.sample(
**self.sample_kwargs,
return_inferencedata=True,
idata_kwargs=self.idata_kwargs
)
return idata

def get_inference_data(self, idata):
return idata

def sel_observations(self, idx):
xdata = self.idata_orig.constant_data["x"]
ydata = self.idata_orig.observed_data["y"]
data__i = [ary[~mask] for ary in (xdata, ydata)]
data_ex = [ary[mask] for ary in (xdata, ydata)]
return data__i, data_ex

loo_orig = az.loo(idata, pointwise=True)
loo_orig

Computed from 2000 by 100 log-likelihood matrix

Estimate       SE
elpd_loo  -250.78     7.13
p_loo        2.96        -
------

Pareto k diagnostic values:
Count   Pct.
(-Inf, 0.5]   (good)      100  100.0%
(0.5, 0.7]   (ok)          0    0.0%
(1, Inf)   (very bad)    0    0.0%

In this case, the Leave-One-Out Cross Validation (LOO-CV) approximation using Pareto Smoothed Importance Sampling (PSIS) works for all observations, so we will use modify loo_orig in order to make az.reloo believe that PSIS failed for some observations. This will also serve as a validation of our wrapper, as the PSIS LOO-CV already returned the correct value.

loo_orig.pareto_k[[13, 42, 56, 73]] = np.array([0.8, 1.2, 2.6, 0.9])

We initialize our sampling wrapper. Let’s stop and analyze each of the arguments.

We’d generally use model to pass a model object of some kind, already compiled and reexecutable, however, as we saw before, we need to recompile the model every time we use it to pass the model generating function instead. Close enough.

We then use the log_lik_fun and posterior_vars argument to tell the wrapper how to call xr.apply_ufunc. log_lik_fun is the function to be called, which is then called with the following positional arguments:

log_lik_fun(*data_ex, *[idata__i.posterior[var_name] for var_name in posterior_vars]

where data_ex is the second element returned by sel_observations and idata__i is the InferenceData object result of get_inference_data which contains the fit on the subsetted data. We have generated data_ex to be a tuple of DataArrays so it plays nicely with this call signature.

We use idata_orig as a starting point, and mostly as a source of observed and constant data which is then subsetted in sel_observations.

Finally, sample_kwargs and idata_kwargs are used to make sure all refits and corresponding InferenceData are generated with the same properties.

pymc3_wrapper = PyMC3LinRegWrapper(
model=compile_linreg_model,
log_lik_fun=calculate_log_lik,
posterior_vars=("b0", "b1", "sigma_e"),
idata_orig=idata,
sample_kwargs=sample_kwargs,
idata_kwargs=idata_kwargs,
)

And eventually, we can use this wrapper to call az.reloo, and compare the results with the PSIS LOO-CV results.

loo_relooed = az.reloo(pymc3_wrapper, loo_orig=loo_orig)

/home/oriol/miniconda3/envs/arviz/lib/python3.8/site-packages/arviz/stats/stats_refitting.py:99: UserWarning: reloo is an experimental and untested feature
warnings.warn("reloo is an experimental and untested feature", UserWarning)
arviz.stats.stats_refitting - INFO - Refitting model excluding observation 13
Auto-assigning NUTS sampler...
Multiprocess sampling (4 chains in 4 jobs)
NUTS: [sigma_e, b1, b0]

100.00% [4000/4000 00:01<00:00 Sampling 4 chains, 0 divergences]
Sampling 4 chains for 500 tune and 500 draw iterations (2_000 + 2_000 draws total) took 2 seconds.
The acceptance probability does not match the target. It is 0.9084390959319811, but should be close to 0.8. Try to increase the number of tuning steps.
The acceptance probability does not match the target. It is 0.8833232031335186, but should be close to 0.8. Try to increase the number of tuning steps.
arviz.stats.stats_refitting - INFO - Refitting model excluding observation 42
Auto-assigning NUTS sampler...
Multiprocess sampling (4 chains in 4 jobs)
NUTS: [sigma_e, b1, b0]

100.00% [4000/4000 00:01<00:00 Sampling 4 chains, 0 divergences]
Sampling 4 chains for 500 tune and 500 draw iterations (2_000 + 2_000 draws total) took 2 seconds.
The acceptance probability does not match the target. It is 0.8788024509211416, but should be close to 0.8. Try to increase the number of tuning steps.
The acceptance probability does not match the target. It is 0.900598064671754, but should be close to 0.8. Try to increase the number of tuning steps.
arviz.stats.stats_refitting - INFO - Refitting model excluding observation 56
Auto-assigning NUTS sampler...
Multiprocess sampling (4 chains in 4 jobs)
NUTS: [sigma_e, b1, b0]

100.00% [4000/4000 00:01<00:00 Sampling 4 chains, 0 divergences]
Sampling 4 chains for 500 tune and 500 draw iterations (2_000 + 2_000 draws total) took 2 seconds.
The acceptance probability does not match the target. It is 0.8949149672236311, but should be close to 0.8. Try to increase the number of tuning steps.
arviz.stats.stats_refitting - INFO - Refitting model excluding observation 73
Auto-assigning NUTS sampler...
Multiprocess sampling (4 chains in 4 jobs)
NUTS: [sigma_e, b1, b0]

100.00% [4000/4000 00:02<00:00 Sampling 4 chains, 0 divergences]
Sampling 4 chains for 500 tune and 500 draw iterations (2_000 + 2_000 draws total) took 2 seconds.
The acceptance probability does not match the target. It is 0.8797995668769552, but should be close to 0.8. Try to increase the number of tuning steps.
The acceptance probability does not match the target. It is 0.882380854441132, but should be close to 0.8. Try to increase the number of tuning steps.
The acceptance probability does not match the target. It is 0.8936869082173754, but should be close to 0.8. Try to increase the number of tuning steps.

loo_relooed

Computed from 2000 by 100 log-likelihood matrix

Estimate       SE
elpd_loo  -250.77     7.13
p_loo        2.95        -
------

Pareto k diagnostic values:
Count   Pct.
(-Inf, 0.5]   (good)      100  100.0%
(0.5, 0.7]   (ok)          0    0.0%
(1, Inf)   (very bad)    0    0.0%

loo_orig

Computed from 2000 by 100 log-likelihood matrix

Estimate       SE
elpd_loo  -250.78     7.13
p_loo        2.96        -
------

Pareto k diagnostic values:
Count   Pct.
(-Inf, 0.5]   (good)       96   96.0%
(0.5, 0.7]   (ok)          0    0.0%


text:
SERVING THE QUANTITATIVE FINANCE COMMUNITY

• 1
• 2

MCarreira
Posts: 1724
Joined: July 14th, 2002, 3:00 am

### FX Volatility smile in delta space vs. excercise price space

breeden-litzenberger.pdfColumn L can be calculated as the butterfly price divided by h^2.So, in fact, to calculate the derivative you need to divide by $G$17^2.But, to convert it to a pdf, you need to consider which interval you are using.Think that the 2nd derivative at a particular point is the same whether you used 0.01 or 0.001.In order to calculate the integral/sum of the pdf, you'll need to multiply each value you calculated by the size of the range that this value represents (pdf values are not calculated for a point, they are calculated for a dK range).So multiplying each value by 0.01 (size of range) and then adding you'll have 1 as expected.

struggler
Topic Author
Posts: 18
Joined: March 4th, 2008, 11:42 pm

### FX Volatility smile in delta space vs. excercise price space

I did multiply by the size of range (0.01) in column M but the total was 0.958 cell M118. why is that the case and how to adjust to get a total of 1
Attachments
Smile10.zip

MCarreira
Posts: 1724
Joined: July 14th, 2002, 3:00 am

### FX Volatility smile in delta space vs. excercise price space

With a simple example: S=1, r=q=0, vol=20%, t=1, step 0.01, range 0.99 delta to 0.01 (strikes from 0.64 to 1.62) I get 0.98 even with smaller steps and wider ranges.Even with delta the numerical delta is not equal to the bs delta.I would consider it a discretization error and consider the goal of the whole exercise achieved.

bouncer
Posts: 27
Joined: October 20th, 2002, 12:45 am

### FX Volatility smile in delta space vs. excercise price space

I think that you get less than one partly because you do not have enough strikes, especially on the downside. Look, the value approximation for the density function on the downside goes down to .23 (that is your lowest value on the left of your density function estimate). On the upside, you have 15 or so strikes which yield a value lower than that. Effectively, you have chopped off part of the left wing of the density function. Hence, the area will be less than on. By the way, in your excel sheet I added up the values in column L and multiplied the sum by .01 (G17). That gives .85 as opposed to .95 when you multiply each value (as you do in col M and then add up). Isn't rounding error amazing...


text:
# Integral over a curve in the sphere

Fix $r\in(0,2)$, and consider arbitrary points $\mathbf{x},\mathbf{q}\in\mathbf{S}^2\subseteq\mathbf{R}^{3}$ such that $q_z > 1-r$ and $x_z > 1-r$. Consider the path $\gamma:[0,2\pi)\to\mathbf{S}^2$ given by $$\gamma(t)=(R\cos(t),R\sin(t),1-r),$$ where $R=\sqrt{r(2-r)}$. I want to compute $$\int_{\gamma([0,2\pi])}\frac{\ln(1-\mathbf{y}\cdot\mathbf{q})}{1-\mathbf{x}\cdot\mathbf{y}}~d\ell(\mathbf{y}).$$ I've been having a lot of trouble actually working this out by hand, and I'm not sure if there are any clever techniques that I could use to evaluate the above expression. I came across this integral when working out a representation formula for a solution to some sort of Dirichlet problem, and it would be very nice to have a closed form expression of the above.

If there isn't any nice closed form solution for such an expression, any ideas on numerical techniques for computing the above integral quickly would be also appreciated.

• $x$ and $q$ are essentially two parameters. Have you tried to use the definition of line integral? – Matheman Jun 21 '17 at 21:41
• I understand that $x$ and $q$ are just two parameters. I also did use the definition of the line integral to expand it out as a definite integral from $0$ to $2\pi$, and that's where I've actually been having trouble evaluating the integral. – yousuf soliman Jun 22 '17 at 12:19


text:
# Statistical properties of periodic points for infinitely renormalizable unimodal maps

## 抄録

For an infinitely renormalizable negative Schwarzian unimodal map f with a non-flat critical point, we analyze statistical properties of periodic points as their periods tend to infinity. Since the standard sequence of probability measures constructed from periodic points weighted with Birkhoff sums of a given potential does not always converge to an equilibrium state, we consider another sequence of probability measures obtained by averaging over certain time windows. For a weight φ which is a continuous function or a geometric potential −β log|f′|, we obtain level-2 large deviation bounds. From the upper bound, we deduce that weighted periodic points asymptotically distribute with respect to equilibrium states for the potential φ. It follows that periodic points asymptotically distribute with respect to measures of maximal entropy, and periodic points weighted with their Lyapunov exponents asymptotically distribute with respect to the post-critical measure supported on the attracting Cantor set. In the case the pressure of φ is non-positive, we obtain the level-2 large deviation principle.

本文言語 English 6399-6421 23 Nonlinearity 35 12 https://doi.org/10.1088/1361-6544/ac9a96 Published - 2022 12月 1

## ASJC Scopus subject areas

• 統計物理学および非線形物理学
• 数理物理学
• 物理学および天文学（全般）
• 応用数学

## フィンガープリント

「Statistical properties of periodic points for infinitely renormalizable unimodal maps」の研究トピックを掘り下げます。これらがまとまってユニークなフィンガープリントを構成します。


text:
9 Linear Momentum and Collisions

# 9.1 Linear Momentum

### Learning Objectives

By the end of this section, you will be able to:

• Explain what momentum is, physically
• Calculate the momentum of a moving object

Our study of kinetic energy showed that a complete understanding of an object’s motion must include both its mass and its velocity ($K=(1\text{/}2)m{v}^{2}$). However, as powerful as this concept is, it does not include any information about the direction of the moving object’s velocity vector. We’ll now define a physical quantity that includes direction.

Like kinetic energy, this quantity includes both mass and velocity; like kinetic energy, it is a way of characterizing the “quantity of motion” of an object. It is given the name momentum (from the Latin word movimentum, meaning “movement”), and it is represented by the symbol p.

#### Momentum

The momentum p of an object is the product of its mass and its velocity:

$\mathbf{\overset{\to }{p}}=m\mathbf{\overset{\to }{v}}.$

As shown in Figure, momentum is a vector quantity (since velocity is). This is one of the things that makes momentum useful and not a duplication of kinetic energy. It is perhaps most useful when determining whether an object’s motion is difficult to change (Figure) or easy to change (Figure).

Unlike kinetic energy, momentum depends equally on an object’s mass and velocity. For example, as you will learn when you study thermodynamics, the average speed of an air molecule at room temperature is approximately 500 m/s, with an average molecular mass of $6\times {10}^{-25}\,\text{kg}$; its momentum is thus

${p}_{\text{molecule}}=(6\times {10}^{-25}\,\text{kg})(500\,\frac{\text{m}}{\text{s}})=3\times {10}^{-22}\,\frac{\text{kg}\cdot \text{m}}{\text{s}}.$

For comparison, a typical automobile might have a speed of only 15 m/s, but a mass of 1400 kg, giving it a momentum of

${p}_{\text{car}}=(1400\,\text{kg})(15\,\frac{\text{m}}{\text{s}})=21,000\,\frac{\text{kg}\cdot \text{m}}{\text{s}}.$

These momenta are different by 27 orders of magnitude, or a factor of a billion billion billion!

### Summary

• The motion of an object depends on its mass as well as its velocity. Momentum is a concept that describes this. It is a useful and powerful concept, both computationally and theoretically. The SI unit for momentum is kg$\cdot$ m/s.

### Conceptual Questions

An object that has a small mass and an object that has a large mass have the same momentum. Which object has the largest kinetic energy?

Show Solution

Since $K={p}^{2}\text{/}2m$, then if the momentum is fixed, the object with smaller mass has more kinetic energy.

An object that has a small mass and an object that has a large mass have the same kinetic energy. Which mass has the largest momentum?

### Problems

An elephant and a hunter are having a confrontation.

1. Calculate the momentum of the 2000.0-kg elephant charging the hunter at a speed of 7.50 m/s.
2. Calculate the ratio of the elephant’s momentum to the momentum of a 0.0400-kg tranquilizer dart fired at a speed of 600 m/s.
3. What is the momentum of the 90.0-kg hunter running at 7.40 m/s after missing the elephant?

A skater of mass 40 kg is carrying a box of mass 5 kg. The skater has a speed of 5 m/s with respect to the floor and is gliding without any friction on a smooth surface.

1. Find the momentum of the box with respect to the floor.
2. Find the momentum of the box with respect to the floor after she puts the box down on the frictionless skating surface.
3. Show Solution

a. magnitude: $25\,\text{kg}\cdot \text{m/s;}$ b. same as a.

A car of mass 2000 kg is moving with a constant velocity of 10 m/s due east. What is the momentum of the car?

The mass of Earth is $5.97\times {10}^{24}\,\text{kg}$ and its orbital radius is an average of $1.50\times {10}^{11}\,\text{m}$. Calculate the magnitude of its average linear momentum.

Show Solution

$1.78\times {10}^{29}\,\text{kg}\cdot \text{m/s}$

If a rainstorm drops 1 cm of rain over an area of 10 km2 in the period of 1 hour, what is the momentum of the rain that falls in one second? Assume the terminal velocity of a raindrop is 10 m/s.

What is the average momentum of an avalanche that moves a 40-cm-thick layer of snow over an area of 100 m by 500 m over a distance of 1 km down a hill in 5.5 s? Assume a density of 350 kg/m3 for the snow.

Show Solution

$1.3\times {10}^{9}\,\text{kg}\cdot \text{m/s}$

What is the average momentum of a 70.0-kg sprinter who runs the 100-m dash in 9.65 s?

### Glossary

momentum
measure of the quantity of motion that an object has; it takes into account both how fast the object is moving, and its mass; specifically, it is the product of mass and velocity; it is a vector quantity


text:
# KE in reletivity? Strange integration

1. Mar 14, 2005

### binarybob0001

I'm reading through a modern physics text (on my own) and it did some very strange manipulation when deriving the relativistic form of the kinetic energy equation. It starts off deriving relativistic force which I understand. Basically, the implicit derivative of (d/dt)(ymv). Y is gamma and is equal to the Lorentz ratio 1/sqr(1-v^2/c^2). (I do not know how to write the notation.) Work or kinetic energy(if no work goes to potential energy) is equal to the integral from 0 to s of Fds (Must know how to write notation of this site.) With substitution we get the integral from 0 to s of (d/dt)(ymv)ds. This is where the book does some strange things. The author claims that the integral for 0 to s of (d/dt)(ymv)ds is equal to the integral from 0 to mv of v*d(ymv), and once y is substituted in, the integral is equal to the integral from 0 to v of
v*d(mv/sqr(1-v^2/c^2)). He has changed the bounds of his integration twice in a way that I do not understand! Does anyone know how he changed the bounds accordingly as he substituted variables in? I fallowed the rest of his work. He does integration by parts simplifying things greatly.

2. Mar 15, 2005

### zeronem

Here you got Relativistic Force which equals the Change in Momentum with respect to time. Where Relativistic momentum is

$$mv\gamma \equiv \frac{mv}{\sqrt{1 - v^2/c^2}}$$

We thus take the Derivative of Relativistic momentum to get relativistic force, whereas we then apply the integral of relativistic force from x to 0. Where $$x = vdt$$

$${\int_{0}^{x}} \frac{d(p)}{dt}dx}$$

= $$\frac{d(p)}{dt}{\int_{0}^{x}}dx}$$ (1)

= $$Fx$$ (2)

= $$Fvdt$$ (3)

= $$\frac{d(p)}{dt}vdt$$ (4)

= $$vd(p)$$ (5)

= $$vd[mv\gamma]$$ (6)

where $$mv\gamma \equiv \frac{mv}{\sqrt{1 - v^2/c^2}}$$

Once dx is integrated, you can still claim x = vdt. Thus dt's divide and cancel out on (4)

Thats the best I can do on that for you. It's too late at night for me to truly dive into the idea of integrating from 0 to mv on v*d(mvy).

An admin here should come in here and correct everything done wrong. I do not think I am right, since I didn't get into any integration by parts with the approach. Tomorrow when its not late I shall take the approach using the other imformation you have given.

3. Mar 15, 2005

### binarybob0001

I wish the author had shown all that work. It is no wounder I'm confused. I thought there was some integration property I didn't know. What I'm still not understanding is how he changed the bounds. I hope the rest of this book isn't going to be so obscure. Thank you for the help. That is way farthure than I would have gotten. I will look forward to tomarrow or whenever you get back to me.

4. Mar 16, 2005

### binarybob0001

Clarifying My Question

I finally figured out notation on this site, so I'm going to rewrite my question cleanly. Force in reletivity is given by
$$\begin{displaymath} F = \frac{d}{d(t)}({\gamma}mv) \qquad {\gamma} = {\frac{1}{\sqrt{1-v^2/c^2}} \end{displaymath}$$
The formula for kenetic energy in classical physics can be given by
$$KE = \int_{0}^{s}Fd(s)$$
if all all the work goes into motion. Using substitution, we obtain the equation for reletivistic kenetic energy.
$$KE = \int_{0}^{s} \frac{d({\gamma}mv)}{d(t)}ds$$
I hope everything up to this point makes since because this next part is where I get confused. The author claims that
$$\begin{displaymath} KE = \int_{0}^{s} \frac{d({\gamma}mv)}{d(t)}ds = \int_{0}^{mv} vd({\gamma}mv) = \int_{0}^{v} vd(\frac{mv}{\sqrt{1-v^2/c^2}}) \end{displaymath}$$
How did the author change his bounds from s to mv to v? How did he convert d(s)/d(t) to v. By definition, velocity is change in distance over time, but the derivitive of $$\frac{d}{d(t)}({\gamma}mv})$$ is attatched to the function $$({\gamma}mv)$$, so mathematically d(s) cannot be devided by d(t) even though the notation makes it seem like it can be. In other words, I do not think he devided d(s) by d(t) to get v. I hope all this clarifies my question.
I was thrilled to get a response. Unfortunatly, the answer given above also abuses some mathematical rules. You cannot pull a derivitive out of an integral like that. Thank you for at least trying to answer my question though. Any more ideas? Thanks.

5. Mar 16, 2005

### zeronem

Well, the Integral

$$\begin{displaymath}KE = \int_{0}^{mv} vd({\gamma}mv) \end{displaymath}$$

Does make sense,, for it has $$d({\gamma}mv)$$ in the integral.. However.. why isn't it

$$\begin{displaymath}KE = \int_{0}^{{\gamma}mv} vd({\gamma}mv) \end{displaymath}$$ ?

Anyways, I took the d(p)/dt out of integal due that the integral was integating with respect to distance x.

In Textbooks, they usually define Work as

$$W = \int_{0}^{x} Fdx = F \int_{0}^{x} dx = Fx$$

Where Force is ofcourse the derivative of momentum with respect to time.

Last edited: Mar 16, 2005
6. Mar 17, 2005

### binarybob0001

Because the integral is now $$d({\gamma}mv)$$, the integral should have matching bounds, but the author did not arrange that. Also, if you pull F out of the integral and integrate, you would not get the right answer. There would still be an s left over. See what I mean? I think you are going the right way though.

7. Mar 17, 2005

### zeronem

You want Relativitistic form of Kinetic Energy.

Given that

$$P = mv\gamma = \frac{mv}{\sqrt{1 - v^2/c^2}}$$

and $$KE = \int_{0}^{v} Pdv =$$

We will integrate relativistic momentum from c to 0. First I'm going to rewrite relativistic momentum as

$$P = mv\gamma = \frac {mvc}{\sqrt{c^2 - v^2}}$$

So we have

$$E = \int_{0}^{c} \frac {mvc}{\sqrt{c^2 - v^2}}dv$$

Now I am going to say $$u = c^2 - v^2$$ and $$du = -2v dv$$

I will rewrite integral as

$$E = -\frac{mc}{2} \int_{0}^{c} \frac {du}{\sqrt{u}}$$

which then equals

$$E = -\frac{mc}{2} [\frac{\sqrt{u}}{\frac{1}{2}}]_{0}^{c}$$

given that $$u = c^2 - v^2$$

then

$$E = -mc[\sqrt{c^2 - v^2}]_{0}^{c}$$

= $$E = -mc[\sqrt{c^2 - c^2} - {\sqrt{c^2 - 0}] = -mc[\sqrt{0} - \sqrt{c^2)]$$

= $$E = -mc[0 - c] = -mc[-c] = mc^2$$

Therefore

$$E = mc^2$$

Wow,, didn't know $$E = mc^2$$ could be so beautiful.

Last edited: Mar 17, 2005
8. Mar 23, 2005

### binarybob0001

Cool but this does not give me the relitivistic form of KE just mc^2. No one I have asked can figure out what the book did, so if anyone out there has another book and would like to share the derivation with me and the rest of the world please feel free to post here.

9. Mar 23, 2005

### krab

Don't worry about the integration limits. You have an initial state where s=0, v=0, and at a final state s=s_f, v=v_f. Integrate through. If at some stage the integration variable is momentum, then it is from 0 to mv\gamma, and so on. Just do the integration manipulation and when you finally end up with a formula between two limits, take the difference between the endlimit, where s=s_f, v=v_f, p=p_f=mv_f/sqr(1-v_f^2/c^2), etc., and the initial state, where all these are zero.

10. Mar 23, 2005

### binarybob0001

Can you expand on what you mean be finding the limits and doing the integral minipulation? The point is I do not know what he did or even how he minipulated those bounds. One thing I am sure of is that the way he did it is one of the few ways of solving the problem. Look at what happens if I solve the momentum derivative.
$$\begin{displaymath} F = \frac{d}{dt}({\gamma}mv) = \frac{d}{dt}(\frac{mv}{\sqrt{1-v^2/c^2}}) = m{\frac{d(v)}{dt}}\bigg(\frac{(1-v^2/c^2)^{\frac{1}{2}}+\frac{v^2}{c^2}(1-v^2/c^2)^{\frac{-1}{2}}}{(1-v^2/c^2)}\bigg) = \end{displaymath} \begin{displaymath} m{\frac{d(v)}{dt}{\bigg[\frac{1}{(1-v^2/c^2)^\frac{1}{2}}+{\frac{v^2/c^2}{(1-v^2/c^2)^{\frac{3}{2}}}\bigg]} = m{\frac{d(v)}{dt}}{\bigg[\frac{1}{(1-v^2/c^2)^{\frac{3}{2}}}\bigg]} \end{displaymath}$$
Since d(v)/dt = a or acceleration, this formula becomes:
$$F = \frac{ma}{(1-v^2/c^2)^{\frac{3}{2}}}$$
Now, if I try and subsitute this value back into the equation for KE, I get:
$$KE = \int_{0}^{s}{\frac{ma}{(1-v^2/c^2)^{\frac{3}{2}}}}{ds}$$
We can see immediatly that all this does is add another variable, s into our equation. The way the integral bounds and variables change has to be the key to getting the formula found in most text books for KE. Also thank you zeronem for finding a very nifty way of getting E=mc^2 although multiplying the momentum by the change in velocity is sort of strange and does not return the whole formula for KE. Thanks for all the help.

11. Mar 24, 2005

### whozum

$$KE = \int{F}{dx} = \int{\frac{m\frac{d^2x}{dt^2}}{(1-\frac{dx}{dt}/c^2)^{3/2}}{dx}$$

Last edited: Mar 24, 2005
12. Mar 24, 2005

### krab

You want
$$\int_0^{s_f} {d(\gamma mv)\over dt}\,ds$$
Now forget about the limits. Just integrate, and when you are done, apply what you know about the end and subtract from the start condition. The reason you do this is because the limits should always be written in terms of the dummy variable. But you are changing dummy variables like you change underwear...
So first to notice is that you can put the dt under the ds and that is basically your v. So
$$\int v\,d(\gamma mv)$$
m is constant so take it outside. We get:
$$m\int v\,d\left({v\over\sqrt{1-v^2/c^2}}\right)$$
Integrate by parts:
$$m\left({v^2\over\sqrt{1-v^2/c^2}}-\int {v\,dv\over\sqrt{1-v^2/c^2}\right)$$
Now substitute $X=v^2/c^2$:
$$mc^2\left({X\over\sqrt{1-X}}-{1\over 2}\int{dX\over\sqrt{1-X}}\right)=mc^2\left({X\over\sqrt{1-X}}+\sqrt{1-X}\right)={mc^2\over\sqrt{1-X}}$$
Now remember X is v^2/c^2, which is zero at the start and $v_f^2/c^2$ at the end, so the answer is:
$$\left.{mc^2\over\sqrt{1-X}}\right|_0^{v_f^2/c^2}=mc^2\left({1\over\sqrt{1-v_f^2/c^2}}-1\right)$$

Last edited: Mar 24, 2005
13. Mar 24, 2005

### whozum

That has to be the sexiest derivation/equation ever.

14. Mar 24, 2005

### zeronem

No problem.

Notice though, that we have original Kinetic Energy as $$\frac {mv^2}{2}$$

Now lets look at the simple integral $$\int_{0}^{v} P dv$$

We know P = mv so we replace the P with mv in the Integral

$$\int_{0}^{v} mv dv = m \int_{0}^{v} v dv = \frac {mv^2}{2}$$

So Instead of taking the integral of momentum with respect to dv, On my last post I simply took the integral of relativistic momentum with respect to dv, from c to 0 since the velocity goes from 0 to c.

The class I am in will be going over Special Relativity as the last lesson in my class. In my book they actually show a different derivation of the "Relativistic kinetic energy" that you are trying to derive.

15. Mar 24, 2005

### binarybob0001

Wow, everything is starting to come together!! I am very excited. I have learnt my lesson. Forget everything my math class every told me about integration and just integrate. Physicists (not that I am complaining) do not necessarily fallow the strict rules of pure math. On the other hand, I am not qualified to speak on this matter. If I could learn or figure out the mathematical reason of why ignoring limits work and how you can turn ds/dt into v, I would be even happier. For now, I will simply except that I am freely able to do those tricks at will. Thanks bunches.

16. Mar 25, 2005

### Maxwell

Hey, I just glanced through the post quickly, and please forgive me if I'm wrong...but isn't the derivative of position (s) velocity? Therefore, d(s)/dt is equal to v.

17. Mar 25, 2005

### dextercioby

Yes,it is,i'm sure Krab's post used this "detail"...So what...?

Daniel.

18. Mar 28, 2005

### binarybob0001

I know that ds/dt is v; however, in my math class I was taught that reducing variables in such a manner can lead to wrong results. How do you know that ds/dt create a linear function v? What formula would we use for ds/dt^2? Would we use a for acceleration or a = adf/dfa^(adf/dfaj)? If ds/dt^2 where replaced like that, is it a constant or a variable? Where did these seemingly meaningless limits of integration (mv to v) come from? I'm pointing out that intuitivily placing v for ds/dt seems right but mathematically there needs to be stronger grounds to allow such things.
One final question. Does anyone find it odd that when deriving KE from momentum we get a different equation than when deriving KE from work? What does that mean?

19. Mar 29, 2005

### Maxwell

Did you read the rest of the posts? Specifically the part I quoted in my post?

20. Mar 29, 2005


text:
Article

# Ehrhart polynomials of integral simplices with prime volumes

07/2011;
Source: arXiv

ABSTRACT For an integral convex polytope $\Pc \subset \RR^N$ of dimension $d$, we call
$\delta(\Pc)=(\delta_0, \delta_1,..., \delta_d)$ the $\delta$-vector of $\Pc$
and $\vol(\Pc)=\sum_{i=0}^d\delta_i$ its normalized volume. In this paper, we
will establish the new equalities and inequalities on $\delta$-vectors for
integral simplices whose normalized volumes are prime. Moreover, by using
those, we will classify all the possible $\delta$-vectors of integral simplices
with normalized volume 5 and 7.

0 Followers
·
65 Views
• Source
##### Article: Gorenstein polytopes with trinomial $h^*$-polynomials
[Hide abstract]
ABSTRACT: The characterization of lattice polytopes based upon information about their Ehrhart $h^*$-polynomials is a difficult open problem. In this paper, we finish the classification of lattice polytopes whose $h^*$-polynomials satisfy two properties: they are palindromic (so the polytope is Gorenstein) and they consist of precisely three terms. This extends the classification of Gorenstein polytopes of degree two due to Batyrev and Juny. The proof relies on the recent characterization of Batyrev and Hofscheier of empty lattice simplices whose $h^*$-polynomials have precisely two terms. Putting our theorem in perspective, we give a summary of these and other existing results in this area.


text:
I'm not sure how to solve using general solutions $\sin{3\theta}=3\sin{\theta}$
I'm not sure how to solve using general solutions $\sin{3\theta}=3\sin{\theta}$
Start by simplifying the LHS using the identity $\displaystyle \sin{3\theta} \equiv 3\sin{\theta} - 4\sin^3{\theta}$.


text:
# Homework Help: Standing Wave on String Question

1. May 16, 2015

This is not coursework; I am preparing for an exam and this question is from a past paper. We have access to past papers but we are not given the answers to them.

1. The problem statement, all variables and given/known data

Two waves are generated on a string of length 2m, to produce a three-loop standing wave with an amplitude of 2cm. The wave speed is 50m/s.

A: What is the resonant frequency of the wave in Hz.
B: If the equation for one of the waves is of the form $y(x,t)=y_m \sin(kx+ \omega t)$ , what are the values of $y_m$ , $k$ and $\omega$ for the second wave?
C: What is the sign in front of $\omega$ for the second wave.

2. Relevant equations
$L=\frac{n \lambda}{2} \\ k=\frac{2 \pi}{\lambda} \\ v= \lambda f = \frac{\omega}{k} \\$
Other related equations

3. The attempt at a solution
The question does not specify whether the ends are open or closed (fixed) so I am assuming they are both open ends.

A:
I have no come across the terminology "Three-loop" before but after searching the web I think it means the same thing as being in the third harmonic, if so then this is what I have done.

$L=\frac{n \lambda}{2} \\ 2=\frac{3 \lambda}{2} \\ \lambda = (\frac{2}{3})(2) = \frac{4}{3}m \\ f = \frac{v}{\lambda} = \frac{50}{4/3}=37.5Hz$
And that is the frequency of the third harmonic so the first harmonic would be 37.5/3=12.5 Hz

EDIT: I just noticed I didn't need to use n=3 and could have just done it with n=1 from the beginning. Why is there any need to tell me its in the third-harmonic?

B:
Bit unsure of part B, I think it may be a bit of a trick question as throughout the course we have only dealt with standing waves where the two constituent waves have the same magnitude of amplitude wave-number and angular frequency, only have the phases differed.

So if its a trick question and they're both the same then I think this part is no problem. Oh and for part C, wouldn't it be the opposite, i.e. it would be negative.

Last edited: May 16, 2015
2. May 16, 2015

### CWatters

Is that likely for a string? How would it be tensioned?

You will have see drawings like this..
http://session.masteringphysics.com/problemAsset/1013932/10/1013932D.jpg
I would take it to show 1, 2 and 3 "loops".

I agree up to that point.

What does part A ask for?

3. May 16, 2015

Ah ok, yeah I can see why it would be both be fixed ends. I was used to doing problems with standing sound waves and the realted equations. What I really was getting at that I was assuming the situation to be $L=\frac{n \lambda}{2}$

Part A asks for the "resonant frequency", which I thought meant the "fundamental frequency" i.e. first harmonic, i.e n=1, the lowest frequency that the standing wave can be generated at. Which (again this might be me used to doing standing sound wave problems) I always though that third harmonic is 3 times the frequency of the first, the fourth four times etc.

4. May 16, 2015

### haruspex

It says resonant frequency of 'the wave', i.e. the three loop configuration, not the resonant frequency of the string.

5. May 16, 2015


text:
# Rational Numbers Class 8 Questions

### The operations addition and multiplication are.

Rational numbers class 8 questions. Check the below ncert mcq questions for class 8 maths chapter 1 rational numbers with answers pdf free download. A number $$\frac{a}{b}$$ is said to rational number if. Practicing the mcq questions on rational numbers class 7 with answers will boost your confidence thereby helping you score well in the exam.

Learn the concepts of maths rational numbers with videos and stories. Download cbse class 8 mathematics rational numbers mcqs in pdf, rational numbers chapter wise multiple choice questions free, cbse class 8 mathematics rational numbers mcqs. Rational numbers class 8 extra questions;

Well, worry no more as the quiz below is set to help you out with this. Kseeb solutions for class 8 maths chapter 7 rational numbers additional questions october 17, 2020 july 3, 2020 by prasanna students can download maths chapter 7 rational numbers additional questions and answers, notes pdf, kseeb solutions for class 8 maths helps you to revise the complete karnataka state board syllabus and score more marks in. Download free printable worksheets for cbse class 8 rational numbers with important topic wise questions, students must practice the ncert class 8 rational numbers worksheets, question banks, workbooks and exercises with solutions which will help them in revision of important concepts class 8 rational numbers.

Ex 1.1 class 8 maths question 1. Here are some practice questions in rational numbers class 8 will test your understanding of the concepts. Maths class 8 important questions are very helpful to score high marks in board exams.

Are you in grade 8 and struggling with the rational numbers concept? These questions include short answer type questions and long answer type questions related to rational numbers which are important for class 8 maths examination. Write the additive inverse of each of the following:

To score good marks in the exam, students can practice these questions which are based on ncert syllabus. Students are advised to solve the rational numbers multiple choice questions of class 8 maths to know different concepts. Solving extra questions for class 8 maths cbse chapters is really helpful during exams.


text:
## Bulgarian OI '09 P4 - Frogs

View as PDF

Points: 12 (partial)
Time limit: 1.0s
Memory limit: 16M

Problem type
##### 2009 Bulgarian Olympiad in Informatics

The frog-mutants in the metropolitan region have lost their mind. After years in the garbage, they are looking for a better life.

The boulevard they are living on is now fully covered with garbage bales. In particular, there are bales, labeled from left to right with the numbers from to , with positive heights .

On each of the bales there is a frog that is very tired and can only make up to jumps. Every jump is to the nearest bale on the right that is strictly higher than the current bale. A frog that can jump over all the bales succeeds in leaving the city - indicated with a height of . Find the maximal height that each frog can reach.

#### Input Specification

On the first line is the number of bales .
On the second line the natural numbers are given, separated by spaces. The third line contains the natural numbers , also separated by spaces.

#### Output Specification

Output integers - the maximal height each frog can reach.

#### Sample Input 1

8
3 1 4 5 6 2 3 8
1 2 1 3 4 2 1 2

#### Sample Output 1

4 5 5 -1 -1 8 8 -1

#### Sample Input 2

6
7 8 9 1 2 3
2 2 2 2 2 2

#### Sample Output 2

9 -1 -1 3 -1 -1


text:
# Swartzchild metric and free fall

1. Jul 15, 2007

### daniel_i_l

I just finished reading Black Holes by E. Taylor and J. Wheeler. Throughout the book they use the SC metric for the the metric near a massive object(for radial motion only:
$$d \tau^2 = \left( 1 - \frac{ 2M }{r} \right) dt^2 - \frac{dr^2}{\left( 1 - \frac{ 2M }{r} \right)}$$
Where dt is measured very far away from the massive body, r is measured as the circumference of a sphere whose center is in the middle and whose outer shell reaches the point divided by two times pi. M,t and r are mearured in meters.
Then, in order to calculate to path of a particle near a massive object in between two events they use the metric to find the path that give the maximal proper time (the Principal Of Maximal Aging).

Now my question is, to use POMA you need to have initial and final events and then calculate the path between them via the POMA. But I want to prove that the SC metric also predicts that an object at rest next to a massive object will start falling in. To do that shouldn't I start at t0 and r0 and then calculate which r1 will give the maximal proper time for a giver t1? Shouldn't this r1 be smaller than r0 - meaning that in order to maximize proper time the object should start falling towards the massive object? I tried to do this but I got that for any r1=/=r0 the proper time is smaller for a giver t1 then if r1=r0. Is that right? If so, how does the SC metric predict that an object that starts at rest next to a massive body will move towards it?
Thanks.

Last edited: Jul 15, 2007
2. Jul 15, 2007

### StatusX

That principle applies to the shortest path between two points, so you have to specify both the starting and ending locations completely, one coordinate of the final position isn't enough. More specifically, by leaving out this coordinate, you're not imposing the condition that the particle is initially at rest.

Last edited: Jul 15, 2007
3. Jul 15, 2007

### daniel_i_l

Then how can I use the metric to show that a particle released from rest near a massive object starts falling?
Thanks.

4. Jul 15, 2007

### StatusX

You can derive the geodesic equation, which determines the local conditions on a path so that it maximizes proper time globally. All the solutions can be verified to satisfy the maximal time conditions between their endpoints, but being local, they allow you to calculate the path of a particle knowing only its initial conditions, ie, position and velocity.

More visually, if you were to draw the paths maximizing time between (t0,r0) and (t1,r) for all r, these would all have different slopes through (t0,r0), and the condition that the particle is initial at rest picks out one of these, and so one final r.

Last edited: Jul 15, 2007
5. Jul 15, 2007

### daniel_i_l

Can you explain what you mean by:
"determines the local conditions on a path so that it maximizes proper time globally"?
How would I go about deriving this equation? Can you give me some starting points?
Thanks.

6. Jul 15, 2007

### StatusX

Did you see my edit? I think that's a more satisfying explanation. With that picture in mind (ie, a drawing of all possible geodesics passing though each point), note that if a given path maximizes proper time between its endpoints, it also maximizes proper time between any two points lying on it, since otherwise we could replace this section with a longer path and make the overall proper time bigger.

So being a geodesic is not just a global property, it requires that a certain condition must be satisfied between any two points, no matter how close they are. In particular, as you move the endpoint closer and closer to the starting point, you determine how any geodesic passing through a point must evolve given only its initial direction. It turns out that the condition specifices its second derivative with respect to proper time.

The derivation uses calculus of variations. It's very similar to the derivation of Lagrange's equations, and if you've seen these, it's not that hard to derive it yourself. I can get you started if you want, but it should be in any GR textbook.

Last edited: Jul 15, 2007
7. Jul 15, 2007

### daniel_i_l

I've never seen the derivation of the Lagrange's equations (the only quantitive use of the calculus of variations I've seen was in Feynman's Lectures on physics where he discussed the principal of least action - which is awfully similar to the POMA now that I think about it). But can you get me started please?
(Is it basically like this: http://www.eftaylor.com/pub/newton_mechanics.html ?)
And is this the general idea: Get an expression for the path from (t0,r0) to
(t1,r) as a variable of r and find the one whose slope at r0 is zero?
Thanks!

Last edited: Jul 15, 2007
8. Jul 15, 2007

### StatusX

That site presents a derivation of Lagrange's laws that's a little different than the usual one. If you take the time to go through it, it might be a little more intuitive than the standard derivation, but it takes a while to get there, and I think it would be more trouble than it's worth for the geodesic equation.

I've started trying to do the derivation a few times here, but I can't see a way to do without being confusing in less than 2 or 3 pages. I'd really suggest finding a book on GR, there are plenty of good ones. I was planning on writing up something on calculus of variations for the tutorial section here pretty soon, and if I do I'll be sure to include a derivation of the geodesic equation.

It's not a bad picture to have, but when deriving the equations this isn't what's being done directly. Although the way they do it on that site seems to be doing quantitatively what I described above, of imposing the condition that the path must be a maximum over every subpath, and using this condition on infinitesimal sections to derive differential equations governing the path. (ie, doing what you suggested for t1=t0+dt, r=r0+dr)

Last edited: Jul 15, 2007
9. Jul 15, 2007

### pervect

Staff Emeritus
If you just want to work out orbits (which will be geodesics) in the Schwarzschild space-time, the easy approach is to take advantage of the existence of a conserved energy and angular momentum.

Any orbit will occupy a plane, so you can eliminate one coordinate right off. Usually one sets $\theta=0$ for the equatorial plane.

Then you have two coordinates, r and $\phi$. So you need two equations.

The geodesic equations will be equivalent to

d/dt (E) = 0
d/dt (L) = 0

For massive particles one usually uses $\tilde{E}$, which is the energy per unit mass of the orbiting particle, rather than E, and also $\tilde{L}$

I would expect that "Exploring black holes" would cover some of the same material, you can also look at http://www.fourmilab.ch/gravitation/orbits/

Last edited: Jul 16, 2007
10. Jul 16, 2007

### daniel_i_l

Thanks everyone! I'll read those links and see if I can prove it. I'll post my conclusions if anything interesting comes out:)


text:
## Lattice Stuff

We — with Jean-Charles FaugèreRobert Fitzpatrick and Ludovic Perret – managed to finish our work on the cryptanalysis of all proposed parameters of the public-key encryption scheme proposed at PKC 2012 by Huang, Liu and Yang. The key observation is that the scheme can be viewed as an easy LWE instance:

In this paper, we investigate the security of a public-key encryption scheme introduced by Huang, Liu and Yang (HLY) at PKC’12. This new scheme can be provably reduced to the hardness of solving a set of quadratic equations whose coefficients of highest degree are chosen according to a discrete Gaussian distributions. The other terms being chosen uniformly at random. Such a problem is a variant of the classical problem of solving a system of non-linear equations (PoSSo), which is known to be hard for random systems. The main hypothesis of Huang, Liu and Yang is that their variant is not easier than solving PoSSo for random instances. In this paper, we disprove this hypothesis. To this end, we exploit the fact that the new problem proposed by Huang, Liu and Yang reduces to an easy instance of the Learning With Errors (LWE) problem. The main contribution of this paper is to show that security and efficiency are essentially incompatible for the HLY proposal. That is, one cannot find parameters which yield a secure and a practical scheme. For instance, we estimate that a public-key of at least 1.03 GB is required to achieve 80-bit security against known attacks. As a proof of concept, we present practical attacks against all the parameters proposed Huang, Liu and Yang. We have been able to recover the private-key in roughly one day for the first challenge proposed by HLY and in roughly three days for the second challenge.

Furthermore, I gave a talk yesterday on solving LWE with binary secret using a variant of the BKW algorithm at SIAM AG’13.

## BKW: Update

We have updated our pre-print titled “On the Complexity of the BKW Algorithm on LWE” on ePrint.

There are two main changes and the reasons why I am mentioning this update here.

1. We included a more thorough comparison with other approaches, in particular, with lattice reduction (reducing LWE to SIS). To our surprise, BKW is quite competitive even in relatively modest dimensions. For Regev’s and Lindner-Peikert’s parameter sets (as interpreted here) we get that BKW is at least as fast as BKZ starting in dimension $n \approx 250$, which I find very low (see Table 4 on page 19).
2. We also provide an alternative approximating for the running time of BKZ. The standard estimate due to Lindner-Peikert is $\log_2 T_{sec} = \log_2 1.8/\delta_0 - 110$ where $\delta_0$ is the targeted root hermit factor. Interpolating estimates from the BKZ 2.0 simulator and reflecting on the doubly exponential running time of BKZ in the blocksize $\beta$ we found: $\log_2 T_{sec} = \log_2 0.009/\delta^2_0 - 27$. However, since this might be controversial, we include estimates for both models.

## LPN and SVP

I am currently attending ESC 2013 in Mondorf, Luxembourg. Over dinner someone mentioned that there is no known reduction from LPN to lattice reduction, i.e., it is not known that you can solve LPN with LLL and friends.  This seems rather strange to me, because the standard lattice attack on LWE seems to be carrying over as is:

sage: n = 100 # number of variables
sage: m = 400 # number of samples
sage: A = random_matrix(GF(2), m, n)
sage: s = random_vector(GF(2), n) # our secret
sage: p = 0.25 # our error rate

sage:  v = A*s + vector(GF(2),[1 if random() < p else 0 for _ in range(m)])

# we are searching for a short vector in the dual lattice
sage: B = A.kernel().matrix()
sage: L = B.change_ring(ZZ).LLL()

# because a short vector there, means few additions which means a higher bias in the sum
sage: Av = A.augment(v)
sage: sum(map(lambda x: abs(x) % 2,L[0])), (L[0]*Av)[-1]

Of course, this means running lattice reduction many times, but still: what am I missing?

PS: Obligatory, Sage cell here.

## On the Complexity of the BKW Algorithm on LWE

We (with Carlos CidJean-Charles FaugèreRobert Fitzpatrick and Ludovic Perret) have finally managed to put our work on BKW on ePrint.

Abstract:

In this paper we present a study of the complexity of the Blum-Kalai-Wasserman (BKW) algorithm when applied to the Learning with Errors (LWE) problem, by providing refined estimates for the data and computational effort requirements for solving concrete instances of the LWE problem. We apply this refined analysis to suggested parameters for various LWE-based cryptographic schemes from the literature and, as a result,  provide new upper bounds for the concrete hardness of these LWE-based schemes.

The source code of our (not very efficient!) implementation of BKW is available on bitbucket.

## An All-In-One Approach to Differential Cryptanalysis for Small Block Ciphers

a paper that I wrote with Gregor Leander is finally done, out and accepted for presentation at SAC.

We present a framework that unifies several standard differential techniques. This unified view allows us to consider many, potentially all, output differences for a given input difference and to combine the information derived from them in an optimal way. We then propose a new attack that implicitly mounts several standard, truncated, impossible, improbable and possible future variants of differential attacks in parallel and hence allows to significantly improve upon known differential attacks using the same input difference. To demonstrate the viability of our techniques, we apply them to KATAN-32. In particular, our attack allows us to break 115 rounds of KATAN-32, which is 37 rounds more than previous work. For this, our attack exploits the non-uniformity of the difference distribution after 91 rounds which is 20 rounds more than the previously best known differential characteristic. Since our results still cover less than 1/2 of the cipher, they further strengthen our confidence in KATAN-32’s resistance against differential attacks.

## SAT Solvers for Sage

One of the most efficient techniques for solving polynomial systems over $\mathbb{F}_2$ is to convert the problem to a satisfiability problem and to use a standard SAT solver. In the past, I have used CryptoMiniSat and either my own ANF to CNF converter scripts based on Gregory Bard’s ideas or PolyBoRi’s script.

However, this setup leaves much to be desired:

1. It’s all based on string parsing which has some overhead.
2. Usually the instances produced using PolyBoRi’s conversion method are faster to solve. However, as the number of variables per equation increase this method becomes essentially exponentially more expensive. Hence, a compromise between the two techniques is needed.


text:
# Fourier transforms, vertical lines, and horizontal lines

A reader asked in a blog comment recently why a vertical line (or edge) shows up in the Fourier transform of an image as a horizontal line. I thought I would try to explain this using the simplest example I could think of.

I'll start with an image that is a constant black except for a single vertical line through the middle of it.

x = zeros(200, 200);
x(:, 100) = 1;
imshow(x)

Next I'll compute and display the log magnitude of the 2-D Fourier transform.

X = fft2(x);
imshow(fftshift(log(abs(X) + 1)), [])

There's the question in black and white, so to speak: Why is there a horizontal line in the 2-D Fourier transform?

Although I'm going to avoid equations and other complicated mumbo-jumbo in my answer, I do have to explain a couple of things about 1-D and 2-D Fourier transforms.

First, the magnitude of the 1-D Fourier transform an "impulse sequence" is a constant. An "impulse sequence" is a sequence that is nonzero only at one place, like this one:

x1 = [0 0 1 0 0]
x1 =

0     0     1     0     0

The magnitude of the 1-D Fourier transform of x is constant:

abs(fft(x1))
ans =

1.0000    1.0000    1.0000    1.0000    1.0000

Second, the magnitude of the 1-D Fourier transform of a constant sequence is an impulse. That is, the Fourier transform is nonzero only at one place.

x2 = [1 1 1 1 1]
x2 =

1     1     1     1     1

abs(fft(x2))
ans =

5     0     0     0     0

Finally, computing the 2-D Fourier transform is mathematically equivalent to computing the 1-D Fourier transform of all the rows and then computing the 1-D Fourier transforms of all the columns of the result. The order (row-first or column-first) doesn't actually matter.

Now let's go back to x, our 200-by-200 matrix with a vertical line down the middle of it. Each row of x is an impulse sequence:

plot(x(50,:))

So if we compute the Fourier transform of all the rows, they'll all be constant (in magnitude):

X_rows = fft(x, [], 2);
plot(abs(X_rows(50, :)))
ylim([0 2])

The next step in computing the 2-D Fourier transform is to compute the 1-D Fourier transforms of the columns of X_rows. But those columns are constant. Here's the 100th column of X_rows:

plot(abs(X_rows(:, 100)))
ylim([0 2])

As I said above, the Fourier transform of a constant sequence is an impulse. If you stack up all the resulting columns containing impulse sequences, the result looks like a horizontal line.

X = fft(X_rows, [], 1);
imshow(fftshift(log(abs(X) + 1)), [])

That's a step-by-step computational explanation. Let me leave you with more of a conceptual (that is, hand-wavy) explanation. Let's look at the input image and the 2-D Fourier transform side by side.

subplot(1,2,1)
imshow(x)
title('x')
subplot(1,2,2)
imshow(fftshift(log(abs(X) + 1)), [])
title('Log magnitude of fft2(x)')

You can think in terms of horizontal and vertical cross-sections. Each horizontal cross-section of x is an impulse sequence. The Fourier transform of an impulse sequence is constant, so horizontal cross-sections of the Fourier transform are constant.

Similarly, each vertical cross-section of x is a constant sequence. The Fourier transform of a constant sequence is an impulse sequence, so the vertical cross-sections of the Fourier transform are impulses. The impulses all line up each other, resulting in the appearance of a horizontal line.

Do these explanations work for you? Do you know of another way to think about it that makes a better explanation? Post your thoughts as comments below.

Published with MATLAB® 7.11

|

### 댓글

댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.


text:
### EstiHMM: heat plots for the number of maximal sequences

In a previous post, I mentioned an efficient algorithm for predicting the maximal state sequences for a given output sequence in an imprecise hidden Markov model (iHMM). Jasper De Bock and I have since given this algorithm a name, EstiHMM, and have written an implementation in Python that we intend to make public as soon as possible, also via this channel. We also hope to be able to present our work at the coming ISIPTA’11 conference in Innsbruck.

We now know that EstiHMM’s complexity is cubic in the number of states for the hidden variables, quadratic in the number of hidden variables, and linear in the number of maximal sequences. This is comparable to Viterbi’s algorithm, if we take into account that Viterbi resolves ties arbitrarily, something we are not allowed to do for iHMMs.

While a linear complexity in the number of sequences is probably as good as it gets, we see that we can only hope to find all maximal sequences efficiently provided their number is reasonably small. Should it, say, tend to increase exponentially with the length of the chain, then no algorithm, however cleverly designed, could overcome this hurdle.

Because this number of maximal sequences is so important, we decided to study its behaviour in more detail.

In a preliminary analysis, we used Monte Carlo methods to study the distribution of the number of maximal elements for randomly chosen transition and emission models. We found that the expected number of maximal elements is typically rather small, but its variance can become quite large with increasing imprecision, indicating roughly that high numbers of maximal elements only occur in restricted regions of (imprecise) probability space.

To get a more definite picture, we decided to concentrate on binary hidden Markov chains where the state variables have two possible values: say, $0$ and $1$. So have the output variables: say, $0$ and $1$ as well. This means that a precise transition matrix for going from one state to the next is completely determined by two values: the probability $p$ to go from state $0$ to state $0$, and the probability $q$ to go from state $1$ to state $1$. We can find an imprecise model by contamination: taking convex mixtures of these precise models, with mixture coefficient $1-\epsilon$, and the vacuous model, with mixture coefficient $\epsilon$. As $\epsilon$ ranges from zero to one, we go from a precise iHMM to a vacuous iHMM.

We kept the emission model fixed and precise, and for a fixed value of the output sequence and $\epsilon$, we allowed the probabilities $(p,q)$ to range over the possible values in the unit square, in a grid of size 1000 by 1000. For each of these values, we used the iHMMPredict algorithm to calculate the corresponding number of maximal state sequences. The results can be represented quite efficiently and elegantly in a heat plot.

Here are a few of the more spectacular ones:

To see how the number of maximal elements evolves as the imprecision increases, take a look at the following animation:

We see that, even for an imprecision that is appreciable, there are large regions of transition probability space where the number of maximal elements remains fairly small. The plots display quite interesting and intricate behaviour. And the nice thing is: we can explain it, and even predict it to some extent. But for this, you’ll have to wait until we see each other at the coming ISIPTA meeting. Looking forward to that!

Update: Call us fickle, but we have decided to rename the algorithm iHMMPredict to EstiHMM. It just tastes better.