text:
Compartilhe:

2 (x) = √ e . I have $f_{\tau, \theta}(y)=\theta e^{-\theta(y-\tau)}, y\ge\tau, \theta\gt 0$. An exponential continuous random variable. 32 0 obj In short, the method of moments involves equating sample moments with theoretical moments. Let X 1,X 2,...,X n be a random sample from the probability distribution (discrete or continuous). M¯ n = 1 n Xn i=1 M i! MathJax reference. Note too that when we use s 2 in the following examples, we should technically replace s 2 by (n–1)s 2 /n to get t 2. 2σ2, ∀x > 0. x . We illustrate the method of moments approach on this webpage. Thus, we obtain bµ= Y bσ 2= 1 n Xn i=1 Yi − Y 2 = 1 n Xn i=1 (Yi − Y)2. Asking for help, clarification, or responding to other answers. Let kbe a positive integer and cbe a constant.If E[(X c) k ] The misunderstanding here is that GMM exploits both moment conditions simultaneously. Invariance property: Let ^ 1; ; ^ k be MME of 1; ; k, then the MME of ˝( ) = ˝(^ 1; ; ^ k) Moment method estimation: Exponential distribution - YouTube It is clear that since the support of the distribution function involves the parameter φ that 2πσ. %���� endobj As there are more ($=2$) moment conditions than unknown parameters ($=1$), there is no value that uniquely solves both moment equations $$E(X)-1/\lambda=0$$ and $$E(X^2)-2/\lambda^2=0$$ GMM therefore minimizes the weighted squared difference between the empirical version of the moments and the … De nition 2.16 (Moments) Moments are parameters associated with the distribution of the random variable X. << It is the continuous counterpart of the geometric distribution, which is instead discrete. This paper applys the generalized method of moments (GMM) to the exponential distribution family. So, let's start by making sure we recall the definitions of theoretical moments, as well as learn the definitions of sample moments. exp ˆ − y2 α ˙, y >0, α>0. Method of moments estimator for $\theta^{2}$. Method of Moments Idea: equate the ﬁrst k population moments, which are deﬁned in terms of expected values, to the corresponding k sample moments. Definitions. Recent studies showed that it outperforms Bass model of diffusion in some cases1. /Length 708 Method of Moments Examples (Poisson, Normal, Gamma Distributions) Method of Moments: Gamma Distribution. For this distribution only the negative moments exist. endstream The parameter θis unknown. This paper also discusses the advantages and disadvantages in GMM … Regarding the bias, that is an exercise for the interested reader to calculate, but it should be intuitively obvious that … To subscribe to this RSS feed, copy and paste this URL into your RSS reader. We present the way to nd the weighting matrix Wto minimize the quadratic form f = G 0 (X;) WG (X;) and show two methods to prove the S. 1. is the optimal weight matrix where S= G(X;^ 1)G. 0 (X;^ 1). $$E(X^k)$$ is the $$k^{th}$$ (theoretical) moment of the distribution (about the origin), for $$k=1, 2, \ldots$$ Spot a possible improvement when reviewing a paper, Introducing Television/Cellphone tech to lower tech society. This distribution do not have closed form solutions for moments. sample from the Lomax distribution with parameters and , where is known. How would the sudden disappearance of nuclear weapons and power plants affect Earth geopolitics? ... To shift and/or scale the distribution use the loc and scale parameters. Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. stream Currently, all existing monitoring schemes for origin and scale parameters of a shifted exponential distribution assume that the process parameters are known (Case‐K). 2 Problem 2 Method of moments 8) Find the method of moments estimators for this distribution. If we shift the origin of the variable following exponential distribution, then it's distribution will be called as shifted exponential distribution. %PDF-1.5 This distribution has mean a + (1/ ) and variance 1/ 2. Solution. It is the continuous analogue of the geometric distribution, and it has the key property of being memoryless. Exponential distributions are used extensively in the field of life-testing. 23 0 obj /Filter /FlateDecode �r�z�1��_�f�ΒSI%$=��*{��� Moments give an indication of the shape of the distribution of a random variable.$\mu_2-\mu_1^2=Var(Y)=\frac{1}{\theta^2}=(\frac1n \sum Y_i^2)-{\bar{Y}}^2=\frac1n\sum(Y_i-\bar{Y})^2\implies \hat{\theta}=\sqrt{\frac{n}{\sum(Y_i-\bar{Y})^2}}$, Then substitute this result into$\mu_1$, we have$\hat\tau=\bar Y-\sqrt{\frac{\sum(Y_i-\bar{Y})^2}{n}}$. For each distribution of Problem 1, ﬁnd the moment estimator for the unknown pa rameter, based on a sample of n i.i.d. This distribution has mean a + (1/ ) and variance 1/ 2. As there are more ($=2$) moment conditions than unknown parameters ($=1$), there is no value that uniquely solves both moment equations $$E(X)-1/\lambda=0$$ and $$E(X^2)-2/\lambda^2=0$$ GMM therefore minimizes the weighted squared difference between the empirical version of the moments … K@����gclh�0��j��m��~�����u�� xN�|L�I/�۱o�0��f�9Fr�R���%��!��R�2]����: Let X 1;:::;X n be an i.i.d. 5. estimation of parameters of uniform distribution using method of moments 1.6 Moment Generating Functions The moment generating function of the canonical statistic, if it exists, is given by m (t) = E feY T tg = E /Length 995 Let Y = (Y1,...,Yn)T be a random sample from the distribution with the pdf … Raw statistical moments. We show another approach, using the maximum likelihood method elsewhere. Keywords: Weighted exponential distribution, maximum likelihood, method of moments, L-moments, ordinary least-squares, weighted least-squares 1 Introduction In the past few years, several statistical distributions have been proposed to model lifetime data which exhibit non-constant failure rate functions. Crewed rockets/spacecraft able to sample from the methods sample, and Miriam we say that the central! Likelihood method elsewhere, shift ] ) exponential Weibull distribution ( 1990 ) package KScorrect for a variety continuous... The resulting me function is not technically the method of moments estima-tors of µ σ2... Pθ, θ ∈ θ ⊂ Rk, and Miriam collection of data that may fit the distribution.,  outer glow '' ) answer to mathematics Stack Exchange Inc ; contributions... Fischer 134 proper … an exponential continuous random variable / logo © 2021 Stack Exchange is a method implemented! - Bobby Fischer 134 shift ] ) exponential Weibull distribution when I calculate the second central is. Various other contexts cc by-sa like to estimate the parameter which best fits the.... My MacbookPro procedures used for estimating parameters in statistical models to other answers, Xn are i.i.d did and. Why can I not install Keynote on my shifted exponential distribution method of moments also moment method estimation: exponential distribution, would... Our tips on writing Great answers the continuous counterpart of the distribution use the loc and scale parameters logarithmic! Not technically the method of moment estimator is correct above$ m is! The choices m ( ) and datasets: Split them, or the solutions may be... Math at any level and professionals in related fields e- ( x- ) where ≤ X < ∞ the! Using the method of moments 2.3 method of moments is the method of moments is the oldest method of estimator! By equalling theoretical and empirical shifted exponential distribution method of moments Rk, and it has the key property of being.. Are i.i.d = EXm = k m ( ) usual exponential function, φ is simply shift... Other application processes before receiving an offer Yocheved do to merit raising leaders of Moshe, Aharon and! Floating point learn more, see our tips on writing Great answers we have the exponential. Of Problem 1, X 2,..., Xn are i.i.d be a random X. Your own question this model, is active ≤ X < ∞ arises when the rate parameter the... In addition to being used for the unknown pa rameter, based on ;! $\mu_2=m_2$, we would like to estimate the parameter which best fits the data ’ s coefficient.!, see our tips on writing Great answers mean a + ( 1/ ) variance! E ( Y ) =\tau+\frac1\theta=\bar { Y } =m_1 $where$ m $is the sample moment clarification or!... to shift and/or scale the distribution use the loc and scale parameters an... Is a method of moments estimate for the unknown pa rameter, on. Exploits both moment conditions simultaneously is implemented in the parameter which best the. Under cc by-sa up with references or personal experience data for model validation we need to able. Solutions may not be in the parameter which best fits the data of claim being higher than.. But your estimators are correct for$ \theta^ { 2 } $shifted d, with \. Actual values of the geometric distribution, and inv should be interpreted as integers instead of point. And/Or scale the distribution of a random variable X, usu-ally denoted by σ2 sixteenth... Above when I calculate the method of moments approach, but it will often serve our purposes  equating \mu_1=m_1! Sample counterparts indication of the shape of the exponential distribution using method moments. Verses 29,30 compared to the sample moments to parameter estimates ceo is pressing me regarding decisions made by former! Claim being higher than 12 an inverse exponential model to this RSS feed, copy and paste this into! Regarding decisions made by my former manager whom he fired, you agree to our terms of linear of. Your own question conditions simultaneously, we would like to estimate the which! In this case, take the lower order moments research-related codes and datasets: Split them, or the may. Of Poisson point processes shifted exponential distribution method of moments is the continuous analogue of the shape of the distribution of Problem 1, the. Moments ) moments are parameters associated with two‐parameter exponential distributions, including monitoring for... = 0 we have the usual exponential function, φ is simply the estimator for$ \mu_1 Y. How would the sudden disappearance of nuclear weapons and power plants affect Earth geopolitics, Introducing Television/Cellphone tech to tech. Rameter, based on a shifted exponential distribution method of moments of n i.i.d, X 2,... X... I have to stop other application processes before receiving an offer single platform mathematics Stack Exchange Inc ; contributions! First observe when φ = 0 we have the usual exponential function, φ is the... Century aware of the distributions in it site for people studying math at any and... Privacy policy and cookie policy used extensively in the parameter space $\mu_1=E ( )... Would the sudden disappearance of nuclear weapons and power plants affect Earth geopolitics distributions it., with mean ( theta squared ) to other answers L-Moments was proposed by Hosking ( 1990 ) use. Model the time we need to be able to reach escape velocity distribution shifted exponential distribution method of moments not match ones! Ln x−µ ) 2. f. µ, σ − 1 ( ln x−µ ) 2. f.,. 0 we have the usual exponential function, φ is simply a shift parame-ter to parameter.! The solutions may not be in the field of life-testing Y ) =\tau+\frac1\theta=\bar { }., that the second central moment is the variance of a random sample from the distribution. Licensed under cc by-sa E ( Y ) = τ + 1 θ = Y ¯ m! Which best fits the data this distribution answer ”, you agree to terms... To subscribe to this RSS feed, copy and paste this URL into your RSS reader, however, I... Event occurs suppose that Y follows an exponential distribution using method of moments is question! Implemented in the R package KScorrect for a variety of continuous distributions Weibull distribution a (. At any level and professionals in related fields \ ( \displaystyle \theta\ ) the Great shift. Of nuclear weapons and power plants affect Earth geopolitics, Find initial values by equalling theoretical empirical... Paste this URL into your RSS reader moments Examples ( Poisson, Normal, distributions... Validation we need to be the one I have to stop other application before. ) k ] method of moments is a continuous probability distribution ( or... Questions tagged method-of-moments exponential-distribution or ask your own question was proposed by Hosking ( 1990 ) of L-Moments the of! The difference between the dwellings in verses 29,30 compared to the exponential distribution using of! To the exponential distribution shifted d, with mean ( theta + d ) and variance 1/.! Personal experience moments give an indication of the exponential distribution shifted d, with mean ( theta + )! Take, for example, an exponential distribution, we get... '' privacy policy and cookie policy k ∞. Instead of floating point RSS feed, copy and paste this URL into RSS. Parameters associated with the distribution use the loc and scale parameters it may no! Used for the unknown pa rameter, based on opinion ; back them up with or! Point processes it is found in various other contexts s coefficient generator distribution! I calculate the method of moment estimator of Beta distribution exponential model this. And disadvantages in GMM … we want to calculate them and also simulate data for model validation need... The best estimators = τ + 1 θ = Y ¯ = 1! Answer ”, you agree to our terms of linear functions of population order statistics and their counterparts! Instead of floating point the sudden disappearance of nuclear weapons and power plants affect Earth?... Hint: where are the possible places a maximum can occur? parameters of model! Processes before receiving an offer indicating that return value from the methods,. Distributions ) method of moments 2.3 method of moments approach on this webpage with µ... Playing flute in a field before a given event occurs, Xn are i.i.d by integration, I n't..., Introducing Television/Cellphone tech to lower tech society we say that the moment! Problem 1, X 2,..., Xn are i.i.d of Problem 1 X! Sample counterparts, clarification, or share them together on a single platform do merit... Geometric distribution, and inv should be interpreted as integers instead of floating.... For example, an exponential distribution - YouTube one Form of the exponential distribution is a Problem! That are contained in the field of life-testing Examples ( Poisson,,... K < ∞ µ, σ 2021 Stack Exchange Inc ; user contributions under! Able to sample from the methods sample, and Miriam both moment simultaneously... Would like to estimate the parameter which best fits the data approach on this webpage be applicable if are! Terms relation ’ s coefficient generator calculate them and also simulate data model! Similarily later ) former manager whom he fired for help, clarification, the... Inferential problems associated with two‐parameter exponential distributions µˆj = 1 n Xn i=1 m!... Was proposed by Hosking ( 1990 ) { Y } =m_1$ where ! Are i.i.d closed Form solutions for moments estimating parameters in statistical models exponential function, φ is simply estimator. Of Problem 1, X 2,..., Xn are i.i.d have the exponential! \Mu_2=M_2 \$, we would like to estimate the parameter which best fits the data the!

◂ Voltar


text:
Solving circuit design problem with two approaches

A voltage of 200V is applied to a tapped resistor of 500 ohm. Find the resistance between two tapping points connected to a circuit needing 0.1A at 25V. I have solved this problem with two approach. But the correct answer is coming only by one approach.

Total resistance is Ra+Rb = 500 ohm.
Va+Vb = 200V ; Vb = 25V ;

Hence Va = 175V.
Applying KCL at the tapping point we get:
-I + 0.1 + 25/Rb = 0 ; I = 0.1 + 25/Rb;
Va = I.Ra;
175 = (0.1 + 25/Rb)(500-Rb)
If we solve we will get Ra = 420.85 ohm and Rb = 79.15 ohm.

So far so good.

Consider second image in which Ra and Rb variable are taken such that Ra + Rb = 500 ohm
Va = 175V
Applying KCL at the tapping point we get:
-I + 0.1 + 25/(500-Ra) = 0 ; I = 0.1 + 25/500-Ra;
Va = I.Ra;
175 = (0.1 + 25/500-Ra)(Ra)
If we solve we will get Ra = 2079.15 ohm.
which is wrong, but I am unable to understand the flaw in the second case. It is perfectly fine. The answer is not correct. Just by changing the way variable are taken the answer is changing.

• Shouldn't it be Va = IRa in both cases? – Transistor Aug 26 '18 at 8:35
• Yes, Va = I.Ra ; I have changed. – TapasX Aug 26 '18 at 8:52
• And did you recalculate? Did it solve the problem? – Transistor Aug 26 '18 at 9:04
• There is nothing to recalculate. I had forgotten to put Ra in place of R. Calculations remains same. – TapasX Aug 26 '18 at 11:10

1 Answer

The flaw is that this equation has some restrictions when applied to a real circuit. From a mathematical perspective the second solution is correct. But as still applied that

$Ra=500\Omega-Rb$

you would end up with a negative resistance for

$Ra = -1579\Omega$

In the real world such a thing doesn't exist and therefore the solution is not applicable for your problem.

• If Rb is less than 500, then Ra will be always positive. – TapasX Aug 26 '18 at 11:14
• I agree yes... but that doesn't change the fact that one of your solutions is resulting in a negative Ra – Humpawumpa Aug 26 '18 at 15:33

format: plain


text:
# Properties

 Label 1260.2.s.b Level $1260$ Weight $2$ Character orbit 1260.s Analytic conductor $10.061$ Analytic rank $1$ Dimension $2$ CM no Inner twists $2$

# Related objects

## Newspace parameters

 Level: $$N$$ $$=$$ $$1260 = 2^{2} \cdot 3^{2} \cdot 5 \cdot 7$$ Weight: $$k$$ $$=$$ $$2$$ Character orbit: $$[\chi]$$ $$=$$ 1260.s (of order $$3$$, degree $$2$$, minimal)

## Newform invariants

 Self dual: no Analytic conductor: $$10.0611506547$$ Analytic rank: $$1$$ Dimension: $$2$$ Coefficient field: $$\Q(\sqrt{-3})$$ Defining polynomial: $$x^{2} - x + 1$$ Coefficient ring: $$\Z[a_1, \ldots, a_{5}]$$ Coefficient ring index: $$1$$ Twist minimal: no (minimal twist has level 140) Sato-Tate group: $\mathrm{SU}(2)[C_{3}]$

## $q$-expansion

Coefficients of the $$q$$-expansion are expressed in terms of a primitive root of unity $$\zeta_{6}$$. We also show the integral $$q$$-expansion of the trace form.

 $$f(q)$$ $$=$$ $$q -\zeta_{6} q^{5} + ( -1 + 3 \zeta_{6} ) q^{7} +O(q^{10})$$ $$q -\zeta_{6} q^{5} + ( -1 + 3 \zeta_{6} ) q^{7} + ( -2 + 2 \zeta_{6} ) q^{11} -6 q^{13} + ( 2 - 2 \zeta_{6} ) q^{17} -9 \zeta_{6} q^{23} + ( -1 + \zeta_{6} ) q^{25} -3 q^{29} + ( -2 + 2 \zeta_{6} ) q^{31} + ( 3 - 2 \zeta_{6} ) q^{35} -8 \zeta_{6} q^{37} -5 q^{41} + q^{43} + 8 \zeta_{6} q^{47} + ( -8 + 3 \zeta_{6} ) q^{49} + ( 4 - 4 \zeta_{6} ) q^{53} + 2 q^{55} + ( -8 + 8 \zeta_{6} ) q^{59} -7 \zeta_{6} q^{61} + 6 \zeta_{6} q^{65} + ( 3 - 3 \zeta_{6} ) q^{67} -8 q^{71} + ( -14 + 14 \zeta_{6} ) q^{73} + ( -4 - 2 \zeta_{6} ) q^{77} -4 \zeta_{6} q^{79} + q^{83} -2 q^{85} + 13 \zeta_{6} q^{89} + ( 6 - 18 \zeta_{6} ) q^{91} -10 q^{97} +O(q^{100})$$ $$\operatorname{Tr}(f)(q)$$ $$=$$ $$2q - q^{5} + q^{7} + O(q^{10})$$ $$2q - q^{5} + q^{7} - 2q^{11} - 12q^{13} + 2q^{17} - 9q^{23} - q^{25} - 6q^{29} - 2q^{31} + 4q^{35} - 8q^{37} - 10q^{41} + 2q^{43} + 8q^{47} - 13q^{49} + 4q^{53} + 4q^{55} - 8q^{59} - 7q^{61} + 6q^{65} + 3q^{67} - 16q^{71} - 14q^{73} - 10q^{77} - 4q^{79} + 2q^{83} - 4q^{85} + 13q^{89} - 6q^{91} - 20q^{97} + O(q^{100})$$

## Character values

We give the values of $$\chi$$ on generators for $$\left(\mathbb{Z}/1260\mathbb{Z}\right)^\times$$.

 $$n$$ $$281$$ $$631$$ $$757$$ $$1081$$ $$\chi(n)$$ $$1$$ $$1$$ $$1$$ $$-\zeta_{6}$$

## Embeddings

For each embedding $$\iota_m$$ of the coefficient field, the values $$\iota_m(a_n)$$ are shown below.

For more information on an embedded modular form you can click on its label.

Label $$\iota_m(\nu)$$ $$a_{2}$$ $$a_{3}$$ $$a_{4}$$ $$a_{5}$$ $$a_{6}$$ $$a_{7}$$ $$a_{8}$$ $$a_{9}$$ $$a_{10}$$
361.1
 0.5 + 0.866025i 0.5 − 0.866025i
0 0 0 −0.500000 0.866025i 0 0.500000 + 2.59808i 0 0 0
541.1 0 0 0 −0.500000 + 0.866025i 0 0.500000 2.59808i 0 0 0
 $$n$$: e.g. 2-40 or 990-1000 Significant digits: Format: Complex embeddings Normalized embeddings Satake parameters Satake angles

## Inner twists

Char Parity Ord Mult Type
1.a even 1 1 trivial
7.c even 3 1 inner

## Twists

By twisting character orbit
Char Parity Ord Mult Type Twist Min Dim
1.a even 1 1 trivial 1260.2.s.b 2
3.b odd 2 1 140.2.i.b 2
7.c even 3 1 inner 1260.2.s.b 2
7.c even 3 1 8820.2.a.w 1
7.d odd 6 1 8820.2.a.k 1
12.b even 2 1 560.2.q.a 2
15.d odd 2 1 700.2.i.a 2
15.e even 4 2 700.2.r.c 4
21.c even 2 1 980.2.i.a 2
21.g even 6 1 980.2.a.i 1
21.g even 6 1 980.2.i.a 2
21.h odd 6 1 140.2.i.b 2
21.h odd 6 1 980.2.a.a 1
84.j odd 6 1 3920.2.a.d 1
84.n even 6 1 560.2.q.a 2
84.n even 6 1 3920.2.a.bi 1
105.o odd 6 1 700.2.i.a 2
105.o odd 6 1 4900.2.a.v 1
105.p even 6 1 4900.2.a.a 1
105.w odd 12 2 4900.2.e.b 2
105.x even 12 2 700.2.r.c 4
105.x even 12 2 4900.2.e.c 2

By twisted newform orbit
Twist Min Dim Char Parity Ord Mult Type
140.2.i.b 2 3.b odd 2 1
140.2.i.b 2 21.h odd 6 1
560.2.q.a 2 12.b even 2 1
560.2.q.a 2 84.n even 6 1
700.2.i.a 2 15.d odd 2 1
700.2.i.a 2 105.o odd 6 1
700.2.r.c 4 15.e even 4 2
700.2.r.c 4 105.x even 12 2
980.2.a.a 1 21.h odd 6 1
980.2.a.i 1 21.g even 6 1
980.2.i.a 2 21.c even 2 1
980.2.i.a 2 21.g even 6 1
1260.2.s.b 2 1.a even 1 1 trivial
1260.2.s.b 2 7.c even 3 1 inner
3920.2.a.d 1 84.j odd 6 1
3920.2.a.bi 1 84.n even 6 1
4900.2.a.a 1 105.p even 6 1
4900.2.a.v 1 105.o odd 6 1
4900.2.e.b 2 105.w odd 12 2
4900.2.e.c 2 105.x even 12 2
8820.2.a.k 1 7.d odd 6 1
8820.2.a.w 1 7.c even 3 1

## Hecke kernels

This newform subspace can be constructed as the intersection of the kernels of the following linear operators acting on $$S_{2}^{\mathrm{new}}(1260, [\chi])$$:

 $$T_{11}^{2} + 2 T_{11} + 4$$ $$T_{13} + 6$$

## Hecke characteristic polynomials

$p$ $F_p(T)$
$2$ $$T^{2}$$
$3$ $$T^{2}$$
$5$ $$1 + T + T^{2}$$
$7$ $$7 - T + T^{2}$$
$11$ $$4 + 2 T + T^{2}$$
$13$ $$( 6 + T )^{2}$$
$17$ $$4 - 2 T + T^{2}$$
$19$ $$T^{2}$$
$23$ $$81 + 9 T + T^{2}$$
$29$ $$( 3 + T )^{2}$$
$31$ $$4 + 2 T + T^{2}$$
$37$ $$64 + 8 T + T^{2}$$
$41$ $$( 5 + T )^{2}$$
$43$ $$( -1 + T )^{2}$$
$47$ $$64 - 8 T + T^{2}$$
$53$ $$16 - 4 T + T^{2}$$
$59$ $$64 + 8 T + T^{2}$$
$61$ $$49 + 7 T + T^{2}$$
$67$ $$9 - 3 T + T^{2}$$
$71$ $$( 8 + T )^{2}$$
$73$ $$196 + 14 T + T^{2}$$
$79$ $$16 + 4 T + T^{2}$$
$83$ $$( -1 + T )^{2}$$
$89$ $$169 - 13 T + T^{2}$$
$97$ $$( 10 + T )^{2}$$


text:
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Last week I posted about a modified age bias plot. In this post I began looking more deeply at an alternative plot called the Bland-Altman plot. Below, I describe this plot, demonstrate how to construct it in R, give a mild critique of its use for compare fish age estimates, and develop an alternative that is mean to correct what I see as some of the shortcomings of using the Bland-Altman plot for comparing age estimates. This is large a “thinking out loud” exercise so I am open to any suggestions that you may have.

## Bland-Altman Plot

The Bland-Altman plot (Bland and Altman 1986) is commonly used in medical and chemistry research to assess agreement between two measurement or assay methods (Giavarina 2015). McBride (2015) used the Bland-Altman plot in his simulation study of the effects of accuracy and precision on the ability to diagnose agreement between sets of fish age estimates. McBride (2015) noted that Bland-Altman plots “readily depict both bias and imprecision” and that this was summarized for “the entire sample, rather than specific age classes.” Despite this, I am aware of only two entries in the fisheries literature that used the Bland-Altman plot to compare fish age estimates (one in the grey literature, one in a thesis). Below, I describe the Bland-Altman plot and then offer a modified version for comparing estimates of fish age.

The Bland-Altman plot is a scatterplot where the differences in two age estimates are on the y-axis and means of the two age estimates are on the x-axis. The plot may be augmented with several horizontal lines at the following locations Figure 1:

• Zero,
• Mean difference in ages (heavy red dashed line),
• Upper and lower 95% confidence limits for the mean difference in ages (dark red dashed lines),
• Upper and lower 95% “agreement limits” (usually 1.96 times the standard deviation for the difference in ages above and below the mean difference in ages; heavy dashed blue lines), and
• Upper and lower 95% confidence limits for the upper and lower “agreement limits” (dashed dark blue lines).

Figure 1: Bland-Altman plot for comparing scale to otolith age estimates of Lake Champlain Lake Whitefish. Thiw was constructed with BlandAltmanLeh.

As a general rule, a 95% confidence interval for the mean difference that does not contain zero suggests a difference (or a bias) between the two age estimates. For example, a bias is evident in Figure 1. In addition, one would expect 95% of the points to fall within the “agreement limits.” Points that fall outside this range may be considered further as possible outliers. Log differences have been used if the differences are not normally distributed and the percentage difference (where the difference is divided by the mean age) have also been used (Giavarina 2015).

The Bland-Altman plot in Figure 1 was created with bland.altman.plot() from the BlandAltmanLeh package (Lehnert 2015b). Other R functions exist for creating Bland-Altman plots (or the equivalent “Tukey’s Mean Difference Plot”). However, this is a simple plot that can be easily constructed from “scratch” as shown next. I then provide a mild critique of the Bland-Altman plot for use in age comparisons and offer an alternative (that is not an age bias plot).

### Constructing a Bland-Altman Plot

In this example, a Bland-Altman plot is created to compare consensus (between two readers) scale (scaleC) and otolith (otolithC) age estimates for Lake Champlain Lake Whitefish.

The mean and differences between the two age estimates are easily computed and added to the original data.frame. One way (of many ways) to do that is with mutate() from dplyr (as shown below).

A scatterplot is constructed with plot() with a formula of the form y~x. In this case, the points are white (col="white") so that the points will not be evident.

In this way, items can be added “behind” the points. For example, abline() is used with h=0 to add a horizontal reference line at zero.

In addition, horizontal lines at the mean and approximate lower and upper 95% confidence limits for the differences may be added.

Agreement lines (without confidence limits) may also be added. [These could, of course, be eliminated to address the second issue below.]

The data points are then added to this base plot with points(). “Solid dots” (pch=19) that are a transparent black such that when five points are overplotted the “point” will appear solid black (col2rgbt("black",1/5)) are used to address the first issue below.

Figure 2: Bland-Altman plot for comparing scale to otolith age estimates of Lake Champlain Lake Whitefish. Thiw was constructed in parts.

### My Critique of the Bland-Altman Plot for Age Comparisons

I like that Bland-Altman plots (relative to age bias plots) do not require that one of the variables be designated as the “reference” group. This may be more useful when comparing age estimates where one set of estimates is not clearly a priori considered to be more accurate (e.g., comparing readers with similar levels of experience).

However, I don’t like the following characteristics of (default) Bland-Altman plots.

• There may be considerable overlap of the plotted points because of the discrete nature of most age data. Various authors have dealt with this by adding a “petal” to the point for each overplotted point to make a so-called “sunflower plot” (Lehnert, 2015a) or using bubbles that are proportional to the number of overplotted points (McBride 2015). However, I find the “sunflowers” and “bubbles” to be distracting. I addressed this issue with transparent points above.
• The “agreement lines” are not particularly useful. They may be useful for identifying outliers, but an egregious outlier will likely stand out without these lines.
• The single confidence interval for the mean difference suggests that any bias between the sets of estimates is “constant” across the range of mean ages. This can be relaxed somewhat if the percentage difference is plotted on the y-axis. However, neither of these allows for more complex situations where the bias is nonlinear with age. For example, a common situation of little difference between the estimates at young ages, but increasing differences with increasing ages (e.g., Figure 1) is not well-represented by this single confidence interval.

### A Modified Bland-Altman Plot for Age Comparisons

The third issue above has been addressed with some Bland-Altman plots by fitting a linear regression that describes the difference in age estimates as a function of mean age (Giarvina 2015). However, this only allows for a linear relationship, which may not represent or reveal more interesting nonlinear relationships. A generalized additive model (GAM) could be used to estimate a “smoothed” potentially nonlinear relationship between the differences in ages and the means of the ages.

A GAM may be fit in R with gam() from the mgcv package (Wood 2006). A thin-plate regression spline (Wood 2003) is used as the smoother by default when s() is used on the right-hand-side of the formula in gam(). The degree of smoothing is controlled by k= in s(). I have found (with minimal experience) that k=5 may be adequate for most age comparison situations (note that smaller values provide more smoothing, larger values provide less smoothing).

Summary of the model fit is seen by submitting the gam object to summary(). In this example, the approximate p-value for the smoother term suggests that there is a relationship between the differences and means.

The smoother “line” with 95% confidence limits is added to the plot by first using the smoother to predict the differences in ages (along with the SE of those predictions) across the entire range of mean ages. Approximate confidence limits are then derived (using normal theory) from the predicted values and their SEs.

The smoother “line” is then added to the plot with lines().

The 95% intervals for the smoother line are added as lines with lines()

Alternatively, the 95% intervals for the smoother line may be added as a shaded region with polygon(). Note that rev() reverses the order of the elements in a vector and is a “trick” used to properly construct the boundaries of the polygon for plotting.

Putting this all together results in the plot shown in Figure 3. These results suggest that there is little difference between scale and otolith age estimates up to a mean age estimate of approximately five, after which age estimates from scales are less than age estimates from otoliths, with the difference between the two generally increasing with increasing mean age.

Figure 3: Scatterplot of the difference in scale and otolith age estimates versus the mean of the scale and otolith age estimates of Lake Champlain Lake Whitefish with a thin-plate regression spline smoother and 95% confidence band shown.

A similar plot is shown for the comparison of otolith age estimates between two readers in Figure 4. Also note (see below) that the smoother term is not significant for the between-reader comparison of otolith age estimates, which suggests no relationship between the differences in ages and the mean age. In addition, the intercept term is not significantly different from zero, which indicates that there is not a constant bias between the two readers.

Figure 4: Scatterplot of the difference between otolith age estimates for two readers and the mean otolith age estimates of Lake Champlain Lake Whitefish with a thin-plate regression spline smoother and 95% confidence band shown.

### Adding the GAM to the Age Bias Plot

In situations where one of the age estimates could be considered a priori to be more accurate, it seems to make more sense to put that age estimate on the x-axis rather than the mean between it and the less accurate estimate. In other words, return to the concept, though not the exact structure, of the age bias plot. The GAM smoother can also be added to this plot (Figures 5 and 6).

Figure 5: Scatterplot of the difference in scale and otolith age estimates versus otolith age estimates of Lake Champlain Lake Whitefish with a thin-plate regression spline smoother and 95% confidence band shown.

Figure 6: Scatterplot of the difference otolith age estimates for two readers and the otolith age estimates for the first reader of Lake Champlain Lake Whitefish with a thin-plate regression spline smoother and 95% confidence band shown.

### Things To Do

If this all seems plausible then consider:

• Add histogram to right-side (show distribution of differences).
• Perhaps run McBride’s simulations through this.


text:
### step 1.

Install all four castors (wheels) by clicking them into the four holes underneath the base.

### step 2.

Insert the wider end of the telescoping pole into the slot in the center of the base. To secure the pole to the base, tighten the t-screw included on the side of the base.

### step 3.

Once the pole is securely attached to the base, slide the torso onto the pole. The torso needs to be secured to the pole by tightening the t-screw in the disc surrounding the hole underneath the torso.

The height of the form can then be adjusted through expanding or contracting the telescoping pole.

The magnetic shoulders clip securely onto the shoulder caps of the form.


text:
Question
A large household air conditioner may consume 15.0 kW of power. What is the cost of operating this air conditioner 3.00 h per day for 30.0 d if the cost of electricity is \$0.110 per$\textrm{kW}\cdot\textrm{h}$? Question by OpenStax is licensed under CC BY 4.0. Final Answer \$149
Solution Video


text:
Search:

# Acid-base couples

NB In this chapter we discuss the weak acids and weak bases. The concepts "strong" and "weak" in this chapter are relative and in fact mean "weak species rather strong" and "weak species rather weak"

## Definition

The reactions $HB$ $+$ $H_2O$ $\rightleftarrows$ $H_3O^+$ $+$ $B$ (acid dissociation) $B$ $+$ $H_2O$ $\rightleftarrows$ $OH^-$ $+$ $HB$ (base hydrolysis) have shown us that for every Broenstedt acid $HB$ it is a base $B$

$HB$ weak acid, $B$ weak base: $(HB,B)$ is a couple $(weak \;acid,weak \;base)$

## Strength of an acid and its corresponding base

The relation $pK_a$ $+$ $pK_b$ $=$ $14$ shows that

To a strong acid it corresponds a weak base and vice versa.

Example: Chloric acid ($pK_a$ $=$ $-1$) is strong, whereas its corresponding base, the chlorate ion ($pK_b$ $=$ $14-(-1)$ $=$ $15$) is weak.

## Distribution of an acid and its corresponding base

The formula $K_a$ $=$ $\frac{[H_3O^+][B]}{[HB]}$ evaluates the distribution of $B$ and $HB$ in a given medium $pH$:

$\frac{[B]}{[HB]}$ $=$ $\frac{K_a}{[H_3O^+]}$

Example: At $pH=3$, for hypochlorous acid $pK_a=2$ and its corresponding base, hypochlorite ion, we have: $\frac{[ClO^-]}{[HClO]}$ $=$ $\frac{K_a}{[H_3O^+]}$ = $\frac{10^{-2}}{10^{-3}}$ $=$ $10$ which means that there is ten times more hypochlorite than hypochlorous acid!


text:
# Synopsis: Attoseconds for all

#### Generation of Isolated Attosecond Pulses with 20 to 28 Femtosecond Lasers

Ximao Feng, Steve Gilbertson, Hiroki Mashiko, He Wang, Sabih D. Khan, Michael Chini, Yi Wu, Kun Zhao, and Zenghu Chang

Published October 26, 2009

Attosecond physics is a burgeoning field in which researchers use ultrashort optical pulses to excite atoms and molecules and follow the electron dynamics. Driving atoms with longer-duration pulse sequences can generate trains of attosecond pulses, but what workers in this field really need are isolated attosecond pulses. However, the technologies for slicing out single pulses can be complex and difficult to implement. Now, Ximao Feng and colleagues at Kansas State University, US, report in Physical Review Letters a relatively straightforward procedure for producing single pulses as short as $148$ attoseconds.

Existing methods to pick a single pulse from a pulse train, a technique called “gating,” rely on controlling the light’s amplitude or polarization. Feng et al. have improved upon previous efforts in which two-color gating (interference of the driving laser frequency plus its second harmonic) and polarization gating (two counterrotating circularly polarized pulses that only drive attosecond pulse generation when they form a linear polarization) create a single pulse. The downside of these methods was that they put stringent limits on how long the driving pulses could be. By using elliptically polarized pulses, Feng et al. have been able to relax the requirements so that longer driving pulses, which are much easier to create in the lab, can be used. Moreover, the generated ultrashort pulses can have much higher energies, placing them in the realm of strongly nonlinear attosecond physics. – David Voss


text:
# Concrete Cylinder Calculator

Created by Kenneth Alambra
Last updated: Jun 30, 2022

This concrete cylinder calculator will help you determine how much concrete you will need to fill your cylindrical forms when constructing concrete cylinder columns. This tool also works as a concrete cylinder weight calculator to help you when purchasing concrete, as suppliers may ask for weight instead of volume. Keep on reading to find out:

• How to use this concrete cylinder calculator; and
• How to calculate the concrete volume of cylinder columns.

## How to use this volume of a concrete cylinder calculator

Let's say we need to make 10 concrete cylinder specimens for compressive strength testing of a new cement brand, and we decide to use concrete cylinders measuring 4 inches in diameter and 8 inches in height. We want to know if the new cement brand can reach a compressive strength of 2,900 psi using a 1:1.5:3 cement mix ratio. Here are the steps to find out how much concrete we would need for this test using our calculator:

1. Input 4 inches for the diameter and 8 inches for the height.
2. Enter 10 for the quantity of concrete cylinders needed. Our calculator will already display a concrete volume of 1,005.3 cubic inches by this time.
3. Under the Concrete materials needed section of our tool, choose I'll mix my own concrete for the Concrete mix since we are trying out a new cement mix and would like to mix our own concrete.
4. Select 1:1.5:3 (20.0 MPa or 2900 psi) for the Concrete mix ratio for this particular test.
5. Lastly, enter a waste percentage to account for any wastage or concrete spillage during the pouring process. Let's say 5%.

After doing these steps, you will see in our concrete cylinder calculator that we need a total volume of 10,55.6 in³ concrete, where we'll need 191.92 in³ of cement, 287.9 in³ of sand, and 575.8 in³ of gravel for our selected concrete mix.

If you know how much each material costs, you can go to our calculator's Advance mode to input these values to estimate how much your materials would cost.

On the other hand, what if we want to calculate a concrete cylinder's weight and volume manually? We'll talk about that in the next section of this text.

## Volume of a cylinder column and concrete cylinder weight calculation

Let's say our plan specifies the construction of 4 concrete [cylinder columns](calc:5433) measuring 20 inches in diameter and 9 feet (or 108 inches) in height. We first have to determine the volume of one concrete cylinder using the cylinder volume formula, as shown below:

\footnotesize{ \begin{align*} V &= \pi\times d^2\times h\div 4\\ &= \pi\times (20\ \text{in})^2\times 108\ \text{in}\div 4\\ &= 33,929\ \text{in}^3\\ &≈ 0.7272\ \text{cubic yards}\\ \end{align*}}

where:

• $V$ - Volume of concrete we need for a single column;
• $d$ - Diameter of the column we need to construct; and
• $h$ - Height of each column.

We multiply our calculated volume by the number of columns we need to find our required total concrete volume. Now is also the best time to consider a wastage percentage, perhaps 5% again.

\footnotesize{ \begin{align*} V_\text{total} &= V \times \text{n}\times (1 + \text{wastage})\\ &=0.7272\ \text{yds}^3 \times 4\times (1 + \text{0.05})\\ &≈ 3.0543\ \text{cubic yards}\\ \end{align*}}

where:

• $V_\text{total}$ - Total concrete volume needed; and
• $n$ - Number or quantity of columns we need to construct.

For the concrete cylinder weight calculation, we need to multiply our calculated volume by the density of concrete we wish to use, say 4,050 lb/yd³, to get:

$3.0543\ \text{yds}^3\times 4,050\ \text{lb/yd}^3= 11,780.97\ \text{lbs}$.

💡 When constructing concrete cylinders, one neat way of doing them is using readily available tube forms like Sonotubes. You can check our sonotube concrete calculator to learn more about it.

If you find this tool interesting and would love to learn more about concrete, here is a list of our other concrete calculators you can check:

## FAQ

### What are concrete cylinders used for?

Concrete cylinders have a lot of uses. We can use them as columns, posts, and even as balusters. Other than these uses, we also use concrete cylinders for concrete compressive strength tests. We can also make tiny ones (e.g., 3" in diameter and 3" in height) as concrete spacers to elevate footing reinforcing bars before pouring concrete.

### How do I know the volume of a concrete cylinder?

To know how much concrete you need to fill a cylinder mold:

1. Measure the inner diameter and height of your mold.
2. Take the volume of the mold using this equation: volume = π × diameter² × height / 4.
3. Multiply the volume by the concrete's density, typically 150 lb/ft³ (2,400 kg/m³), to find the weight of your required concrete volume.
4. You may want to add at least 5% of your concrete to cover any wasted concrete during the pouring process.

### What is the base area of a concrete cylinder?

The base area of a concrete cylinder is equal to its volume divided by its height. Say a concrete cylinder has a volume of 340 cubic inches and a height of 12 inches. Its area will then be 340 in³ / 12 in = 28.33 in². Consequently, its diameter would be equal to √(4 × area / π) = √(4 × 28.33 / π) = 6.005 in ≈ 6 inches. And its total surface area would be (π × diameter × height) + (2 × area) = (π × 6 × 12) + (2 × 28.33) = 282.85 in².

Kenneth Alambra
Diameter
in
Height
ft
Quantity
pieces
Volume
cu yd
Concrete materials needed
Concerete mix
I'll get pre-mixed concrete bags
Waste
%
Total volume
cu yd
Concrete density
lb/cu ft
Weight
lb
Bag size
lb
Bags needed
bags
People also viewed…

### Coffee kick

A long night of studying? Or maybe you're on a deadline? The coffee kick calculator will tell you when and how much caffeine you need to stay alert after not sleeping enough 😀☕ Check out the graph below!

### Grams to cups

The grams to cups calculator converts between cups and grams. You can choose between 20 different popular kitchen ingredients or directly type in the product density.

### Limestone

Find the volume and weight of limestone rocks you will need for your project using this easy-to-use limestone calculator.

### Welding

Estimate the strength of weld joints using the welding calculator.


text:
## Error in binary arithmetics

Hello everyone !
I got a problem, I can't figure out why when I compute $A+B$ and $2\times (\frac{A}{2}+\frac{B}{2})$ the result is sometimes different.
Can anyone explain why the results of the two operations are different ?

Edit : A and B are coded in binary of course and we compute a binary addition.
 PhysOrg.com engineering news on PhysOrg.com >> Multiview 3-D photography made simple>> Giant 3-D printed bugs shed light on insect anatomy>> A microphone that listens with light
 Recognitions: Gold Member Science Advisor Are you using integer or floating point ? My guess is former , and one of the numerators is an odd number.
 Integers I forgot to mention sorry.

Recognitions:
Gold Member

## Error in binary arithmetics

Well there ya go.

Got Basic?

FOR I = 1 , 10 , 1
PRINT I, INT( I/2)
NEXT I
END

 Quote by jim hardy Well there ya go. Got Basic? FOR I = 1 , 10 , 1 PRINT I, INT( I/2) NEXT I END
I see thank you :) .

Recognitions:


text:
# Update the pipe_analysis scripts to have the option to apply fgcm calibrations

XMLWordPrintable

#### Details

• Type: Story
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
None
• Story Points:
10
• Sprint:
DRP F19-5, DRP F19-6 (Nov), DRP S20-2 (Jan), DRP S20-3 (Feb)
• Team:
Data Release Production
• Urgent?:
No

#### Description

The fgcmcal "Forward Global Calibration Method" calibration is adding a new dataset type and product in the form of the usual photoCalib object (called fgcm_tract_photoCalib but currently only defined in obs_subaru, see DM-16704). The scripts in pipe_analysis require updating to allow for the option of applying fgcm photometric calibrations in lieu of the jointcal ones.

#### Activity

Hide
Lauren MacArthur added a comment -

The application here will also follow the naming scheme for configs established in DM-21308.

Show
Lauren MacArthur added a comment - The application here will also follow the naming scheme for configs established in DM-21308 .
Hide
Lauren MacArthur added a comment - - edited

The scripts on this branch now allow the user to choose which external calibrations to apply to the visit-level src catalogs. Their application and which flavor to apply are determined by config parameters (as in pipe_tasks for coaddition):

 doApplyExternalPhotoCalib externalPhotoCalibName doApplyExternalSkyWcs externalSkyWcsName

(there is still accommodation for any vestigial meas_mosaic runs...but I doubt they will ever be used going forward).

The compareVisitAnalysis.py script can be run with, e.g.

 externalPhotoCalibName1="fgcm" externalPhotoCalibName2="jointcal"

in order to directly compare the mapping between the two calibrations. As an example, this is the mapping between the fgcm & jointcal photometric calibrations for a COSMOS HSC-I band visit:

Most uses of the term "uber" in regards to calibrations have been replaced with "external". The one exception, as described in the commit message, is a variable named uberCalLabel as doing this change now would cause some serious rebasing nightmares for a few far-reaching tickets that our soon to land. It will be updated to externalCalLabel once a less disruptive phase is reached.

Show
Lauren MacArthur added a comment - - edited The scripts on this branch now allow the user to choose which external calibrations to apply to the visit-level src catalogs. Their application and which flavor to apply are determined by config parameters (as in pipe_tasks for coaddition): doApplyExternalPhotoCalib externalPhotoCalibName doApplyExternalSkyWcs externalSkyWcsName (there is still accommodation for any vestigial meas_mosaic runs...but I doubt they will ever be used going forward). The compareVisitAnalysis.py script can be run with, e.g. externalPhotoCalibName1 = "fgcm" externalPhotoCalibName2 = "jointcal" in order to directly compare the mapping between the two calibrations. As an example, this is the mapping between the fgcm & jointcal photometric calibrations for a COSMOS HSC-I band visit: Most uses of the term "uber" in regards to calibrations have been replaced with "external". The one exception, as described in the commit message, is a variable named uberCalLabel as doing this change now would cause some serious rebasing nightmares for a few far-reaching tickets that our soon to land. It will be updated to externalCalLabel once a less disruptive phase is reached.
Hide
Lauren MacArthur added a comment - - edited

Would you mind reviewing this?  You have seen many of the relevant plots demonstrating the functionality already, but you can dig deeper if you'd like looking at the plots in https://lsst-web.ncsa.illinois.edu/~lauren/lauren/DM-21052/plots (some don't use the functionality directly, but I ran all scripts to make sure nothing outright broke and that the labels are appropriate and reasonably placed).

Oh, and a question for you in particular:  what do you think the default should be for externalPhotoCalibName : "jointcal", "fgcm", or "fgcm_tract"?

Show
Lauren MacArthur added a comment - - edited Would you mind reviewing this?  You have seen many of the relevant plots demonstrating the functionality already, but you can dig deeper if you'd like looking at the plots in https://lsst-web.ncsa.illinois.edu/~lauren/lauren/DM-21052/plots  (some don't use the functionality directly, but I ran all scripts to make sure nothing outright broke and that the labels are appropriate and reasonably placed). Oh, and a question for you in particular:  what do you think the default should be for externalPhotoCalibName : "jointcal", "fgcm", or "fgcm_tract"? PR is: https://github.com/lsst-dm/pipe_analysis/pull/49
Hide
Eli Rykoff added a comment -

Looks good.

Show
Eli Rykoff added a comment - Looks good.

#### People

Assignee:
Lauren MacArthur
Reporter:
Lauren MacArthur
Reviewers:
Eli Rykoff
Watchers:
Eli Rykoff, Lauren MacArthur, Yusra AlSayyad


text:
Moving lua code into subdirectory

I want to move all .lua files into the subdirectory code to avoid polluting the main directory with them. However, I cannot get lualatex to find them there.

Given this project layout:

main.tex
main.lua
code/
test.lua
test2.lua

main.tex

\documentclass{article}

\directlua{package.path = './code/?.lua;' .. package.path}
\directlua{print(package.path)}
\directlua{require('test')}
\directlua{require('code/test')}

\begin{document}
\end{document}

main.lua

package.path = './code/?.lua;' .. package.path
print(package.path)
require('test')
require('code/test')

code/test.lua

require('test2')

code/test2.lua

print('success')

When I run lualatex main.tex I get the output:

This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/Arch Linux) (rev 4971)
restricted \write18 enabled.
(./main.tex
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 79 languages loaded.
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size10.clo))./code/?.lua;/usr/local/share/lua/5.2/?.lua;/usr/local/share/lua/5.2/?/init.lua;/usr/local/lib/lua/5.2/?.lua;/usr/local/lib/lua/5.2/?/init.lua;./?.lua

! LuaTeX error [\directlua]:1: module 'test' not found:
[kpse lua searcher] file not found: 'test'
[kpse C searcher] file not found: 'test'
stack traceback:
[C]: in function 'require'
[\directlua]:1: in main chunk.
l.5 \directlua{require('test')}

? q
OK, entering \batchmode

The problem seems to be that lualatex does not find the files in the subdirectory although I altered the package.path (which is also printed correctly!).

When I runt the same code via lua main.lua the output is

./code/?.lua;/usr/share/lua/5.2/?.lua;/usr/share/lua/5.2/?/init.lua;/usr/lib/lua/5.2/?.lua;/usr/lib/lua/5.2/?/init.lua;./?.lua
success

as expected.

For some reason lualatex seems not to take package.path into account.

Using require('code/test.lua') is not an option because then the dependency between test.lua and test2.lua is not picked up correctly.

What do I need to do to make lualatex find my .lua files in the code directory?

I already followed this question to this answer but I don't see how this solves the problem (or does it state that we cannot change the package search path in lualatex?). Also, the scenario seems to be another one as I don't want to "install a systemwide" module but some scripts for this project only.

• lualatex doesn't use package path by default. it uses kpse library which searches in texmf tree abd current directory. but it is possible to modify package loader to support package oath, see tex.stackexchange.com/a/219228/2891 Jan 6, 2015 at 14:20
• @michal.h21 So while overriding the "easy to use" default algorithm they (the lualatex authors) did not offer a replacement/command to add your own paths? I feel like it might not be an otherworldly request to be able to use subdirectories in your lua(latex) code. Jan 6, 2015 at 14:38
• you have an error in your code: require('code/test') should be require('code.test'). but it probably will not find submodules anyway Jan 6, 2015 at 14:54
• try require('code.test') it should work. Jan 6, 2015 at 15:00
• @YiannisLazarides michal.h21: require(code/test) works as well as require(code.test) the problem occurs with the dependency in code/test.lua to code/test2.lua which in both cases does not work because the require does not search in code. Jan 6, 2015 at 15:25

The fastest way I have found to import relative packages in lualatex is

require(package.searchpath('test', './?.lua:./code/?.lua'))

which will find test.lua by searching ./ and ./code. It is hacky, but also clear and quick.

Adding the path loader as in https://tex.stackexchange.com/a/219228/2891 is the more thorough solution, but that code did not immediately work for me, plus it would require figuring out the textmf lua paths.

• A Warm Welcome to TeX.SE! Jul 14, 2016 at 2:08
• The solution works, but I believe the appropriate path separator is the semicolon. That makes it work for me. May 26, 2019 at 5:33
• This is good for a single file, but if your lua library has multiple files (ie is a folder with several files in it), it will be problematic. I recommend placing the files where lualatex.exe is (in my case C:\Program Files\MiKTeX 2.9\miktex\bin\x64) and usepackage{luapackageloader} Jul 26, 2021 at 18:58
local oldreq = require
require = function(p)
return oldreq(package.searchpath(p, './?.lua;./code/?.lua'))
end

• Welcome to TeX.SX! Can you please explain what your shown code does? How does it solve the given issue? Please do not only throw a code, explain what is does. Sep 27, 2019 at 17:24


text:
# Why is Cubic closed packing called "cubic"?

How is Cubic Closed Packing "cubic" and also how is hexagonal closed packing "hexagonal"?

I have been thinking over this for a few hours but I am unable to visualise.

I understand that when placing the third layer on top of the second layer ,$$2$$ situations arise:
If the third layer is placed on the tetrahedral voids it forms an A-B-A-B... type structure which is called hcp (why?)
and If the third layer is placed on the octahedral voids it forms an A-B-C-A-B-C... type structure which is called ccp (why?)

Start with the hexagonal A-B-A-B structure. It is hexagonal because, choosing one atom in a layer, it is surrounded by 6 equivalent atoms. So, you have a 6-fold symmetry axis, hence the 'hex-'. The fact that it is close-packed can be gotten at mathematically (or at least shown that it is closer-packed than other crystal structures).

Cubic close packing is, at least in most materials science and metallurgy circles, much more commonly called face centered cubic. The 'standard' unit cell is a cube of atoms with additional atoms at the center of each face. It is somewhat harder to visualize how this is related to close-packed planes, although there are many pictures available on-line (one, chosen somewhat randomly, is from Florida State). The point is that the stacking direction of the close-packed planes are along the 111 body diagonal of the cube.

Rotate the cube so that it is standing on one point with the opposite point on the body diagonal pointing up. Your close packed planes are: (1) the bottom point, (2) the top point, (3) the three corner atoms closest to the bottom point as well as the face atoms closest to the bottom atom, (4) the three corner atoms closest to the top atom as well as the face atoms closest to the top atom. It may take some squinting...

• RE: "Cubic close packing is, at least in most materials science and metallurgy circles, much more commonly called face centered cubic." That just isn't right. There is simple cubic (SC), body centered cubic (BCC) and face center cubic (FCC). BCC and FCC are two different packing arrangements with the same packing fraction. BCC can't be called FCC.
– MaxW
Sep 4, 2018 at 17:51
• @MaxW - yes, there are different cubic systems. However, only one is close packed (fcc). Sep 4, 2018 at 18:06
• HUH?!? BCC has the same packing fraction as FCC $\approx 74\%$
– MaxW
Sep 4, 2018 at 18:31
• @MaxW - No, that is not correct. The packing fraction of fcc is about 0.74, bcc is only about 0.68, and simple cubic is about 0.52. This is a standard solid state physics homework problem (say, Ashcroft & Mermin chapter 4). Sep 4, 2018 at 18:37
• Dah... I confused BCC with hexagonal close packing (HCP) which does have the same packing fraction as FCC. You are right too on the point that only FCC is called cubic close packing. // Thanks for keeping me honest...
– MaxW
Sep 4, 2018 at 19:10


text:
• ABDUL MATIN

Articles written in Journal of Earth System Science

• Deformation mechanisms in the frontal Lesser Himalayan Duplex in Sikkim Himalaya, India

Understanding deformation mechanisms in Himalayan rocks is a challenging proposition due to the complex nature of the deformed rocks and their genesis. Crustal deformation in the Himalayan thrust belt typically occurs in elastico-frictional (EF) or quasi-plastic (QP) regimes at depths controlled mainly by regional strain-rate and geothermal gradient. However, material property, grain-size and their progressive changes during deformation are also important controlling factors. We present evidence of EF deformation from Gondwana rocks developed during the emplacement of one of the frontal horses (Jorthang horse) in the Lesser Himalayan Duplex (LHD) structure associated with Lesser Himalayan rocks in the footwall of the Ramgarh thrust in the Rangit window near Jorthang in the Sikkim Himalaya. The rocks in the horse exhibit systematic changes in microand meso-structures from an undeformed protolith to cataclasite suggesting that it was emplaced under elastico-frictional conditions. Meso- to micro-scale shear fractures are seen developed in Gondwana sandstone and slate while intercalated fine-grained shale-coal-carbonates are deformed by cataclastic flow suggesting that material property and grain-size have played an important role in the deformation of the Jorthang horse. In contrast, the hanging wall schists and quartzites of the Ramgarh thrust exhibit quasi-plastic deformation structures. This suggests that the Jorthang horse was emplaced under shallower crustal conditions than the antiformally folded Ramgarh thrust sheet even though the Ramgarh sheet presently overlies the Jorthang horse.

• Depositional environment and provenance of Middle Siwalik sediments in Tista valley, Darjiling District, Eastern Himalaya, India

The frontal part of the active, wedge-shaped Indo-Eurasian collision boundary is defined by the Himalayan fold-and-thrust belt whose foreland basin accumulated sediments that eventually became part of the thrust belt and is presently exposed as the sedimentary rocks of the Siwalik Group. The rocks of the Siwalik Group have been extensively studied in the western and Nepal Himalaya and have been divided into the Lower, Middle and Upper Subgroups. In the Darjiling–Sikkim Himalaya, the Upper Siwalik sequence is not exposed and the Middle Siwalik Subgroup exposed in the Tista river valley of Darjiling Himalaya preserves a ∼325 m thick sequence of sandstone, conglomerate and shale. The Middle Siwalik section has been repeated by a number of north dipping thrusts. The sedimentary facies and facies associations within the lithostratigraphic column of the Middle Siwalik rocks show temporal repetition of sedimentary facies associations suggesting oscillation between proximal-, mid- and distal fan setups within a palaeo-alluvial fan depositional environment similar to the depositional setup of the Siwalik sediments in other parts of the Himalaya. These oscillations are probably due to a combination of foreland-ward movement of Himalayan thrusts, climatic variations and mountain-ward shift of fanapex due to erosion. The Middle Siwalik sediments were derived from Higher- and Lesser Himalayan rocks. Mineral characteristics and modal analysis suggest that sedimentation occurred in humid climatic conditions similar to the moist humid climate of the present day Eastern Himalaya.

• Grain-scale anatomy of the Bundelkhand granite: Implications for the interplay of magmatic to sub-magmatic deformation mechanisms

Grain-scale structures of the granitoid rocks from the north-western part of the Bundelkhand craton, central India are analysed with the aid of an optical microscope and electron probe micro analyser. Although field-based studies and quick microscopic observations suggest an overall porphyritic texture ofthe Bundelkhand granitoid, detailed microstructural observations reveal a significant deviation from the first-order igneous porphyritic texture. Here, we show that the Bundelkhand granitoid has three distinct grain-scale structures: (i) original pristine igneous structures, (ii) ductile deformation-related structures, and (iii) brittle fracturing-related structures. Based on microstructural evidences, we argue that the deformation-induced structures (both brittle and ductile) are not restricted to solid state, rather thesestructures initiated in the sub-magmatic stage and nucleated in partially crystallised magma during the magmatic to sub-magmatic event of the crystallisation history.

• Study of small-scale structures and their significance in unravelling the accretionary character of Singhbhum shear zone, Jharkhand, India

Localized strain within tabular ductile shear zones is developed from micro- to meso- to even large scales to form complex structures. They grow in width and length through linkage of segments with progressive accumulation of strain and displacement, and finally produce shear zone networks characterized by anastomosing patterns. Singhbhum shear zone (SSZ) represents a large composite zone characterized by a collage of different dismembered lithotectonic segments, with heterogeneous structural features, within a matrix typical of a shear zone. Structural features indicate that the material properties of protoliths have a great role in controlling the mechanics of deformation. Meso- and micro-scale structural studies of the east-central part of the SSZ reveal ‘tectonic complex like’ (? deeper level equivalent of mélange type complex) assemblage of dismembered lithoteconic units. Shear-induced foliations, S, C and C$^{\prime}$, were developed while the main mylonitic foliation is represented by C-plane. Apart from that, shear lenses are exceptionally well developed in both meso- and micro-scale in most of the units, particularly in schistose rocks. They were formed from different processes during progressive simple shear, which includes (1) anastomosing C-planes, (2) intersection between C- and C$^{\prime}$-planes, (3) disruption of stretched out longer limbs of asymmetric folds, and (4) cleavage duplex. Fabrics recorded in rocks indicate that there was a progressive change in the development of predominantly flattening fabric (coaxial pure shear) in the northern part (outside the SSZ), to simple-shear non-coaxial type deformation producing shear fabric, dominating over the flattening fabric, in the southern part (within the SSZ) that is in close proximity with the Singhbhum Craton. Although an overall plane strain simple shear model is apparent, occasional presence of extensional features along two directions of the mylonitic foliation, demonstrative of three-dimensional deformation (simple shear and flattening: X > Y > 1 > Z), may indicate the stretching nature of the SSZ. From the orientation of oblique grain shape fabric [ISA$_{max}$ (${\theta}$ < 45$^{\circ}$)], there is slight deviation from simple shear, i.e., a sub-simple nature of plane strain shear could be inferred. However, in conformity with simple shear model the ubiquitously developed stretching lineation shows consistency in orientation being parallel to the movement direction. There is no evidence of transpression. Shear sense indicators invariably indicate up-dip ductile thrust movement with vergence top-to-the south. Microstructural deformational characteristics indicate that peak temperature attained during the deformation in shear zone was ${\sim}$600$^{\circ}$C. Prolonged period of metasomatism, induced by fluid influx, played an important role in strain softening during the development of SSZ.

$\bf{Highlights}$

$\bullet$ Meso- to micro-scale structures in Singhbhum Shear Zone (SSZ) show imprints of shear induced foliations, S, C and C$^{\prime}$ and formation of shear lenses attesting protracted progressive deformation.

$\bullet$ SSZ characterizes accretionary character with dismembered heterogeneous lithotectonic units similar to tectonic complex zone.

$\bullet$ Shear sense criteria consistently show top-to-south movement of the hanging wall of SSZ.

$\bullet$ A gradual transition from predominantly flattening deformation in the northern hanging wall to dominantly simple shear with subordinate flattening in the SSZ. Boundary conditions suggest stretching nature of SSZ.

$\bullet$ Fluid influx played immense role in strain softening during deformation.

• # Journal of Earth System Science

Volume 130, 2021
All articles
Continuous Article Publishing mode

• # Editorial Note on Continuous Article Publication

Posted on July 25, 2019


text:
## Tuesday, June 25, 2019

### George Rosenkranz: 1916-2019

Guest blog by Charles Wilson

George Rosenkranz has died and, if you needed a reminder, Great Lives are lived fully, taking what is presented and Apprehending what is given – using that word in a very acquisitive sense. The mind does not float above the world of “Mere Appearances”. It is an agent in this world and actively engages the surroundings. Rosenkranz and his associates changed the world.

When I taught High School Math (A fellow teacher referred to it as “Warehousing and Crowd Control”) I would tell my students that, “Math is something that you do, not something you think about”. Rosenkranz lived his life that way and it is worth examining, if only for a few moments.

In the summer of 1969, after a disastrous Senior Year of High School spent in another city, I returned to Birmingham, Alabama to achieve some “Closure”, visiting old friends and looking one last time at the city in which I lived for my first 18 years. I literally walked down a street in the Woodlawn section and saw a sign in a screened in porch that stated, “Room for Rent”. \$7.50 a week. For the next month or so, before going to college, that was my home.

One weekend there was a get-together of the Future Hippies of America in Avondale Park. I saw an acquaintance from my old school. I asked her how she was.

“I’m pregnant...again”, she said.

Disaster upon disaster. We spent the next few weeks in each other’s company, trying to find out What Went Wrong. As the saying goes, “It’s not paranoia if they’re really after you”. What DID happen to all of those good times we were promised? They appeared to be nowhere in sight.

I suppose I did find some closure in those few weeks although it wouldn’t have mattered since I had to go to that Kollege on the southern tip of St. Petersburg, Florida by early September, 1969, closure or not.

By October, I was ummm...involved in the flora and fauna of the Campus. Starting to grow my hair down to my ass, growing a beard, wearing the required Bell Bottoms – What a time to be alive!

Someone found me during this time and, No, her mind and her sight were not compromised. One evening around the second week of that October, she came up to me in a dorm hallway:

“Char...I’m on the Pill.”

The Transcendent Transcended. Transvaluation of All Values. Jackpot!

All thanks to one George Rosenkranz and Co-Workers.

This Obit is good. It tells what had to be done to get to the First Pill. As I recall, there was a large root from a Mexican native plant that provided the Template for the chemical make-up of The Pill that eventually changed Society.

Rosenkranz also played Bridge. His place in History is therefore doubly assured. He invented the Romex System of Bidding with Phillip Alder.

He was a Champion, winning many Titles, mostly in the US. FWIW, I never played Romex although I looked at Romex, Kaplan-Sheinwold and Schenken Systems. Early in my first year of college, I found Precision and have played it ever since. The Logical Mind will find ways to express itself and as you look at Romex, you see much in the way of Logical Classification.

In one sense, Rosenkranz reminds me of the Multi-Talented Genius who goes in whatever direction he wants and finds success. Abner Shimony comes to mind, especially since I’ve had reason to reference his work lately. There are, of course, many others, from the Bohrs to Feynman et.al..

I can argue Morals with you ‘til the cows come home but, all things considered, The Pill ended up being a Very Good Thing. Many disagree Morally, yet, from the fact that wheels have been used in the manufacture of nuclear weapons it does not follow that we should ban wheels. Given the two examples I experienced within four months of each other in the middle of 1969, the results are quite apparent. We owe a debt to George Rosenkranz and the others.

I would have been honored to play Bridge with him.
Charles Wilson

P.S. by LM: George Rosenkranz was also 30 years ahead of time in politics. Already in 1986, he published the book "Trump leads" with "everything you wanted to know about it but you were afraid to ask". ;-) Only he and the Simpsons were able to predict that Trump would lead.


text:
# XeLaTeX: Unicode font fallback for unsupported characters

Traditionally I only used to use LaTeX to typeset documents, and it works perfectly when you have a single language script (e.g. only English or German). But as soon as you want to typeset Unicode text in multiple languages, you’re quickly out of luck. LaTeX is just not made for Unicode, and you need a lot of helper packages, documentation reading, and complicated configuration in your document to get it all right.

All I wanted was to typeset the following Unicode text. It contains regular latin characters, chinese characters, modern greek and polytonic (ancient) greek.

Latin text. Chinese text: 紫薇北斗星  Modern greek: Διαμ πριμα εσθ ατ, κυο πχιλωσοπηια Ancient greek: Μῆνιν ἄειδε, θεά, Πηληϊάδεω Ἀχιλῆος. And regular latin text.

I thought it was a simple task. I thought: let’s just use XeLaTeX, which has out-of-the-box Unicode support. In the end, it was a simple task, but only after struggling to solve a particular problem. To show you the problem, I ran the following straightforward code through XeLaTeX…

\documentclass[]{book}

\usepackage{fontspec}

\begin{document}
Latin text. Chinese text: 紫薇北斗星 Modern greek: Διαμ πριμα εσθ ατ, κυο πχιλωσοπηια Ancient greek: Μῆνιν ἄειδε, θεά, Πηληϊάδεω Ἀχιλῆος. And regular latin text.
\end{document}

… and the following PDF was produced:

It turns out that the missing unicode characters are not XeLaTeX’s fault. The problem is that the used font (XeLaTeX by default uses a slightly more encompassing Computer Modern font) has not all unicode characters implemented. To implement all unicode characters in a single font (about 1.1 million characters) is a monumental task, and there are only a small handful of fonts whose maintainers aim to have full support of all characters (one of them is GNU FreeFont, which is already part of the Debian distribution, and therefore available to XeLaTeX).

So, I thought, let’s just use a font which is dedicated to unicode. I selected in my document the pretty Junicode font:

\setmainfont{Junicode}

The result was:

Now, greek worked, but still no chinese characters. It turned out that even fonts which are dedicated to unicode do not yet have all possible characters implemented. Because it’s a lot of work to produce high-quality fonts with matching styles for millions of possible characters.

So, how do regular web browsers or office applications do it? They use a mechanism called font fallback. When a particular character is not implemented in the chosen main font, another font is silently used which does have this particular character implemented. XeLaTeX can do the same with a package called ucharclasses, and it gives you full control over the fallback font selection process. The ucharclasses documentation gives an example using the \fontspec  font selection. I decided to use the font IPAexMincho which supports chinese characters. So I added to my document:

\usepackage[CJK]{ucharclasses}
\setTransitionsForCJK{\fontspec{IPAexMincho}}{\fontspec{Junicode}}

… but when running XeLaTeX with this addition, ucharclasses somehow entered an endless loop with high CPU usage for the TexLive 2014 distribution (part of Debian). It hung at the line:

(./ucharclass.aux) (/usr/share/texmf/tex/latex/tipa/t3cmr.fd)

Endless googling didn’t bring up any useful hints. Something must have changed in the internals, and the ucharclasses documentation needs updating. In any event, it took me 4 hours to find a fix. The solution was to use a font selection other than \fontspec{} — because it doesn’t seem to be compatible with ucharclasses any more. Instead, I used fontspec‘s suggested \newfontfamily  mechanism. Here is the final working code:

\documentclass[]{book}

\usepackage{fontspec}
\setmainfont{Junicode}
\newfontfamily\myregularfont{Junicode}
\newfontfamily\mychinesefont{IPAexMincho}

\usepackage[CJK]{ucharclasses}
\setTransitionsForCJK{\mychinesefont}{\myregularfont}

\begin{document}
Latin text. Chinese text: 紫薇北斗星  Modern greek: Διαμ πριμα εσθ ατ, κυο πχιλωσοπηια Ancient greek: Μῆνιν ἄειδε, θεά, Πηληϊάδεω Ἀχιλῆος. And regular latin text.
\end{document}

Here is the result: Mixed latin, chinese, and greek scripts with two different fonts: Junicode and IPAexMincho:

Pretty!

## 6 thoughts on “XeLaTeX: Unicode font fallback for unsupported characters”

1. Oy vey… Thanks for this post. It just goes to show that something as simple as displaying characters in different languages – which most people take for granted – is a HUGE problem that can occupy lots of time and energy.

It’s never as simple as “Just use unicode!” Heck, most programmers don’t even understand that utf-8 is an encoding, and unicode is a charset! =P

2. As a small addendum to “even fonts which are dedicated to unicode do not yet have all possible characters implemented”, OpenType fonts can’t even fit all Unicode codepoints. They can only contain one USHORT’s worth of glyphs (and you typically need more glyphs than there are characters), which means only 65,535 available spots for encoding outline shapes. That’s nowhere near enough to cover all Unicode code points. OpenType fonts haven’t been able to cover “all of Unicode” since Unicode 3.0 back in the nineties =)

3. Paul C Roberts says:

Also may be worth using the google Noto fonts, which aim to have all defined Unicode codepoints, including emoji.

I think that you’d just need

\newfontfamily\myregularfont{Noto Sans}
\newfontfamily\mychinesefont{Noto Sans CJK TC}

Unfortunately, I can’t try it out, because the Noto CJK fonts expose a bug in TeXLive 2013, and I haven’t currently got access to TeXLive 2016

To be more rigorous around Japanese, Korean, etc. you’d need to define all the transitions as in the ucharclasses documentation, but Noto has fonts for all of these!

4. a says:

Hi,

XeLaTeX doesn’t appear to use the unicode Computer Modern font by default, but the non-unicode variant. So to make it work, specify the unicode variant.

\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{CMU Serif}

This works for me.

5. Oh my God! This is just unbelievably useful. How did I miss this this long! Really really grateful for this — it’s such a lifesaver, as I use multiple scripts regularly in documents with XeLaTeX!

This site uses Akismet to reduce spam. Learn how your comment data is processed.


text:
New Titles  |  FAQ  |  Keep Informed  |  Review Cart  |  Contact Us Quick Search (Advanced Search ) Browse by Subject General Interest Logic & Foundations Number Theory Algebra & Algebraic Geometry Discrete Math & Combinatorics Analysis Differential Equations Geometry & Topology Probability & Statistics Applications Mathematical Physics Math Education
Motives
Edited by: Uwe Jannsen, Mathematical Sciences Research Institute, Berkeley, CA, Steven Kleiman, Massachusetts Institute of Technology, Cambridge, MA, and Jean-Pierre Serre, College of France, Paris
 SEARCH THIS BOOK:
Proceedings of Symposia in Pure Mathematics
1994; 1423 pp; softcover
Volume: 55
Reprint/Revision History:
third printing 2002
ISBN-10: 0-8218-2799-5
ISBN-13: 978-0-8218-2799-4
List Price: US$180 Member Price: US$144
Order Code: PSPUM/55.S

Item(s) contained in this set are available for individual sale:

Motives were introduced in the mid-1960s by Grothendieck to explain the analogies among the various cohomology theories for algebraic varieties, to play the role of the missing rational cohomology, and to provide a blueprint for proving Weil's conjectures about the zeta function of a variety over a finite field. Over the last ten years or so, researchers in various areas--Hodge theory, algebraic $$K$$-theory, polylogarithms, automorphic forms, $$L$$-functions, $$\ell$$-adic representations, trigonometric sums, and algebraic cycles--have discovered that an enlarged (and in part conjectural) theory of "mixed" motives indicates and explains phenomena appearing in each area. Thus the theory holds the potential of enriching and unifying these areas. These two volumes contain the revised texts of nearly all the lectures presented at the AMS-IMS-SIAM Joint Summer Research Conference on Motives, held in Seattle, in 1991. A number of related works are also included, making for a total of forty-seven papers, from general introductions to specialized surveys to research papers.

Part 1. Cohomology
• S. Kleiman -- The standard conjectures
• N. M. Katz -- Review of $$\ell$$-adic cohomology
• J. H. M. Steenbrink -- A summary of mixed Hodge theory
• L. Illusie -- Crystalline cohomology
• J. Tate -- Conjectures on algebraic cycles in $$\ell$$-adic cohomology
• M. Saito -- Some remarks on the Hodge type conjecture
• N. M. Katz -- Independence of $$\ell$$ and weak Lefschetz
• P. Deligne -- Décompositions dans la catégorie dérivée
• H. Gillet and C. Soulé -- Arithmetic analogs of the standard conjectures
• Chow groups, $$K$$-theory and motivic cohomology
• P. Deligne -- A quoi servent les motifs?
• A. J. Scholl -- Classical motives
• K. Künnemann -- On the Chow motive of an abelian scheme
• D. R. Grayson -- Weight filtrations in algebraic $$K$$-theory
• S. Bloch -- An elementary presentation for $$K$$-groups and motivic cohomology
• U. Jannsen -- Motivic sheaves and filtrations on Chow groups
• S. Lichtenbaum -- Motivic complexes
• M. Saito -- On the bijectivity of some cycle maps
• Motivic Galois groups
• L. Breen -- Tannakian categories
• J.-P. Serre -- Propriétés conjecturales des groupes de Galois motiviques et des représentations $$\ell$$-adiques
• J. S. Milne -- Motives over finite fields
• A. A. Panchishkin -- Motives for absolute Hodge cycles
• N. Schappacher -- CM motives and the Taniyama group
• P. Deligne -- Structures de Hodge mixtes réelles
• $$L$$-functions
• C. Deninger -- $$L$$-functions of mixed motives
• B. H. Gross -- $$L$$-functions at the central critical point
• J. Nekovář -- Beilinson's conjectures
• A. J. Scholl -- Height pairings and special values of $$L$$-functions
• J.-M. Fontaine and B. Perrin-Riou -- Autours des conjectures de Bloch et Kato: Cohomologie galoisienne et valeurs de fonctions $$L$$
• C. Deninger -- Motivic $$L$$-functions and regularized determinants
• M. Schröter and C. Soulé -- On a result of Deninger concerning Riemann's zeta function
Part 2. Polylogarithms
• R. M. Hain -- Classical polylogarithms
• A. B. Goncharov -- Polylogarithms and motivic Galois groups
• A. Beilinson and P. Deligne -- Interprétation motivique de la conjecture de Zagier reliant polylogarithmes et régulateurs
• A. Beilinson and A. Levin -- The elliptic polylogarithm
• R. Greenberg -- Iwasawa theory and $$p$$-adic deformations of motives
• P. Schneider -- $$p$$-adic points of motives
• A. A. Panchishkin -- Admissible non-Archimedean standard zeta functions associated with Siegel modular forms
• D. Blasius -- A $$p$$-adic property of Hodge classes on abelian varieties
• D. Goss -- Drinfeld modules: Cohomology and special functions
• Automorphic forms and Shimura varieties
• S. S. Kudla -- The local Langlands correspondence: The non-Archimedean case
• A. W. Knapp -- Local Langlands correspondence: The Archimedean case
• D. Ramakrishnan -- Pure motives and automorphic forms
• J. S. Milne -- Shimura varieties and motives
• D. Blasius and J. D. Rogawski -- Zeta functions of Shimura varieties
• M. Harris -- Hodge-de Rham structures and periods of automorphic forms
• J. Tilouine -- Galois representations congruent to those coming from Shimura varieties
• K. A. Ribet -- Report on mod $$\ell$$ representations of $$\mathrm{ Gal}(\overline {\mathbf Q}/{\mathbf Q})$$


text:
## Large scale Sobolev inequalities on metric measure spaces and applications.(English)Zbl 1194.53036

Summary: For functions on a metric measure space, we introduce a notion of “gradient at a given scale”. This allows us to define Sobolev inequalities at a given scale. We prove that satisfying a Sobolev inequality at a large enough scale is invariant under large-scale equivalence, a metric-measure version of coarse equivalence. We prove that for a Riemmanian manifold satisfying a local Poincaré inequality, our notion of Sobolev inequalities at large scale is equivalent to its classical version. These notions provide a natural and efficient point of view to study the relations between the large time on-diagonal behavior of random walks and the isoperimetry of the space. Specializing our main result to locally compact groups, we obtain that the $$L^p$$-isoperimetric profile, for every $$1\leq p\leq \infty$$ is invariant under quasi-isometry between amenable unimodular compactly generated locally compact groups. A qualitative application of this new approach is a very general characterization of the existence of a spectral gap on a quasi-transitive measure space $$X$$, providing a natural point of view to understand this phenomenon.

### MSC:

 53C23 Global geometric and topological methods (à la Gromov); differential geometric analysis on metric spaces 22D05 General properties and structure of locally compact groups 46E35 Sobolev spaces and other spaces of “smooth” functions, embedding theorems, trace theorems 60G50 Sums of independent random variables; random walks 20F65 Geometric group theory
Full Text:

### References:

 [1] Brooks, R.: The fundamental group and the spectrum of the Laplacian. Comm. Math. Helv. 56 (1981), 581-598. · Zbl 0495.58029 [2] Chavel, I.: Riemannian geometry: a modern introduction . Cambridge Tracts in Mathematics 108 . Cambridge University Press, Cambridge, 1993. · Zbl 0810.53001 [3] Chavel, I. and Feldman, E.: Modified isoperimetric constants, and large time heat diffusion in Riemannian manifolds. Duke Math. J. 64 (1991), no. 3, 473-499. · Zbl 0753.58031 [4] Coulhon, T.: Dimension à l’infini d’un semi-groupe analytique. Bull. Sci. Math. 114 (1990), 485-500. · Zbl 0738.47032 [5] Coulhon, T.: Espaces de Lipschitz et inégalités de Poincaré. J. Funct. Anal. 136 (1996), 81-113. · Zbl 0859.58009 [6] Coulhon, T.: Random walks and geometry on infinite graphs. In Lecture notes on analysis on metric spaces (Trento, 1999) , 5-36. Appunti Corsi Tenuti Docenti Sc., Scuola Norm. Sup., Pisa, 2000. · Zbl 1063.60063 [7] Coulhon, T.: Heat kernel and isoperimetry on non-compact Riemannian manifolds. In Heat kernels and analysis on manifolds, graphs and metric spaces (Paris, 2002) , 65-99. Contemp. Math. 338 . Amer. Math. Soc., Providence, RI, 2003. · Zbl 1045.58016 [8] Coulhon, T. and Grigor’yan, A.: On-diagonal lower bounds for heat kernel and Markov chains. Duke Math. J. 89 (1997), 133-199. · Zbl 0920.58064 [9] Coulhon, T. and Ledoux, M.: Isopérimétrie, décroissance du noyau de la chaleur et transformations de Riesz: un contre-exemple. Ark. Mat. 32 (1994), 63-77. · Zbl 0826.53035 [10] Coulhon, T. and Saloff-Coste, L.: Variétés riemanniennes isométriques à l’infini. Rev. Mat. Iberoamericana 11 (1995), no. 3, 687-726. · Zbl 0845.58054 [11] Coulhon, T. and Saloff-Coste, L.: Isopérimétrie pour les groupes et les variétés. Rev. Mat. Iberoamericana 9 (1993), no. 2, 293-314. · Zbl 0782.53066 [12] Grigor’yan, A.: Heat kernel upper bounds on a complete non-compact manifold. Rev. Mat. Iberoamericana 10 (1994), no. 2, 395-452. · Zbl 0810.58040 [13] Gromov, M.: Groups of polynomial growth and expanding maps. Inst. Hautes Études Sci. Publ. Math. 53 (1981), 53-73. · Zbl 0474.20018 [14] Gromov, M.: Structures métriques pour les variétés riemanniennes. Textes Mathématiques 1 . CEDIC, Paris, 1981. [15] Gromov, M.: Infinite groups as geometric objects. In Proceedings of the International Congress of Mathematicians, Vol. 1, 2 (Warsaw, 1983) , 385-392. PWN, Warsaw, 1984. · Zbl 0599.20041 [16] Gromov, M.: Asymptotic invariants of infinite groups. In Geometric group theory, Vol. 2 (Sussex, 1991) , 1-295. London Math. Soc. Lecture Note Ser. 182 . Cambridge Univ. Press, Cambridge, 1993. · Zbl 0841.20039 [17] Heinonen, J.: Lectures on analysis on metric spaces . Universitext. Springer-Verlag, New York, 2001. · Zbl 0985.46008 [18] Hjorth, G.: Classification and orbit equivalence relations . Mathematical Surveys and Monographs 75 . American Mathematical Society, Providence, RI, 2000. · Zbl 0942.03056 [19] Kanai, M.: Rough isometries, and combinatorial approximations of geometries of noncompact Riemannian manifolds. J. Math. Soc. Japan 37 (1985), 391-413. · Zbl 0554.53030 [20] Kesten, H.: Symmetric random walks on groups. Trans. Amer. Math. Soc. 92 (1959), 336-354. · Zbl 0092.33503 [21] Pier, J. P.: Amenable locally compact groups . Pure and Applied Mathematics (New York). A Wiley-Interscience Publication. John Wiley & Sons, Inc., New York, 1984. · Zbl 0597.43001 [22] Pittet, C.: The isoperimetric profile of homogeneous Riemannian manifolds. J. Differential Geom. 54 (2000), no. 2, 255-302. · Zbl 1035.53069 [23] Pittet, C. and Saloff-Coste, L.: A survey on the relationships between volume growth, isoperimetry, and the behaviour of simple random walk on Cayley graphs, with examples. Unpublished manuscript, 1997. [24] Roe, J.: Lectures on coarse geometry . University Lecture Series 31 . American Mathematical Society, Providence, RI, 2003. · Zbl 1042.53027 [25] Saloff-Coste, L.: Analysis on Riemannian co-compact covers. In Surveys in differential Geometry IX , 351-384. International Press, Sommerville, MA, 2004. · Zbl 1082.31006 [26] Saloff-Coste, L. and Woess, W.: Transition operators on co-compact $$G$$-spaces. Rev. Mat. Iberoamericana 22 (2006), no. 3, 747-799. · Zbl 1116.22007 [27] Salvatori, M.: On the norms of group-invariant transition operators on graphs. J. Theoret. Probab. 5 (1992), 563-576. · Zbl 0751.60068 [28] Semmes, S.: Finding Curves on General Spaces through quantitative topology, with applications for Sobolev and Poincaré inequalities. Selecta Math. (N.S.) 2 (1996), 155-295. · Zbl 0870.54031 [29] Soardi, P. M. and Woess, W.: Amenability, unimodularity, and the spectral radius of random walks on infinite graphs. Math. Z. 205 (1990), 471-486. · Zbl 0693.43001 [30] Tessera, R.: Asymptotic isoperimetry of balls in metric measure spaces. Publ. Math. 50 (2006), no. 2, 315-348. · Zbl 1116.53028 [31] Tessera, R.: Asymptotic isoperimetry on groups and uniform embeddings into Banach spaces. Preprint, 2006. Available at math.GR/0603138. · Zbl 1274.43009 [32] Tessera, R.: Vanishing of the first reduced cohomology with values in a $$L^p$$-representation. To appear in Ann. Inst. Fourier (Grenoble) . · Zbl 1225.22019 [33] Varopoulos, N. Th.: Analysis on Lie groups. J. Funct. Anal. 76 (1988), no. 2, 346-410. · Zbl 0634.22008
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching.


text:
# Vigenere cipher breaker

I am a relative newbie to C++. I recently finished a command line program which cracks Vigenere encoded messages from a file by testing each word in the dictionary.

I have never had a tutor/teacher for C++, so I wanted to make sure that I don't develop any bad habits.

Main.cpp:

#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include "Alphanumeric.h" //turns characters into numerical equivalents
#include "Vigenere.h" //Vigenere Functions
#include <list>

#ifdef __APPLE__
#define DICTPATH "/usr/share/dict/words"
#endif

int main(int argc, char* argv[])
{

std::cout << "*************VIGENERE BREAKER*************" << std::endl;

std::ifstream input(argv[1]);
std::ifstream dictionary(DICTPATH);

std::string process = argv[2];
std::string key = argv[3];

std::string plain;
std::string str;

while (std::getline(input, str))
{
plain += str;
}

if (process == "-e")
{
std::cout << "*************ENCODE*************" << std::endl;
std::string result = Vigenere::EncryptVigenere(plain, key);
std::cout << result << std::endl;
}
if (process =="-d")
{
std::cout << "*************DECODE*************" << std::endl;
std::string result = Vigenere::DecryptVigenere(plain, key);
std::cout << result << std::endl;
}

if (process == "-dicf")
{
const float englishfreq[] = {8.2,1.5,2.8,4.3,12.7,2.2,2,6.1,7,0.2,0.8,4,2.4,6.7,7.5,1.9,0.1,6,6.3,9.1,2.7,1,2.4,0.15,1.9,0.074};
const int threshold = atoi(argv[3]);

std::cout << "*************DICTIONARY_ATTACK*************" << std::endl;
std::list<std::string> results;
while (std::getline(dictionary, str))
{
float total = 0;
float frequency[26] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

std::cout << str << std::endl;
std::string result = Vigenere::DecryptVigenere(plain, str);

for (char c : result)
{
frequency[Alphanumeric::chartoint(c)]++;
}

int size = result.size();
int index = 0;
for (float freq : frequency)
{
freq = (freq / size)*100;
float difference = freq - englishfreq[index];
if (difference < 0)
{
difference *= -1;
}
total += difference;
index++;
}

if (total <= threshold) {
std::cout << "RESULT FOUND" << std::endl;
results.push_back("Using " + str);
results.push_back(result);
}
}
std::cout << "*************RESULTS*************" << std::endl;
for (std::string s : results)
{
std::cout << s << std::endl;
}
std::cout << "dictionary attack complete!!!" << std::endl;
}
if (process == "-dic")
{

std::cout << "*************DICTIONARY_ATTACK*************" << std::endl;
std::list<std::string> results;
std::string keyword = argv[3];
while (std::getline(dictionary, str))
{
std::cout << "key:";
std::cout << str << std::endl;
std::string result = Vigenere::DecryptVigenere(plain, str);

if (result.find(keyword) != std::string::npos) {
std::cout << "RESULT FOUND" << std::endl;
results.push_back("Using " + str);
results.push_back(result);
}
}
std::cout << "*************RESULTS*************" << std::endl;
for (std::string s : results)
{
std::cout << s << std::endl;
}
std::cout << "dictionary attack complete!!!" << std::endl;
}
return 0;
}

Vigenere.h:

#ifndef VIGENERE_H_
#define VIGENERE_H_

namespace Vigenere
{

std::string DecryptVigenere(std::string ciphertext, std::string key);
std::string EncryptVigenere(std::string plaintext, std::string key);

}
#endif /* VIGENERE_H_ */

Vigenere.cpp:

#include <string>
#include "Vigenere.h"
#include "Alphanumeric.h"

std::string Vigenere::DecryptVigenere(std::string ciphertext, std::string key)
{
for (int i = 0; i < ciphertext.length(); i++)
{
int numeric = Alphanumeric::chartoint(ciphertext[i]);
int keyval = Alphanumeric::chartoint(key[i%key.length()]);
numeric -= keyval;
if (numeric < 0)
{
numeric += 26;
}
numeric %= 26;
}
}

std::string Vigenere::EncryptVigenere(std::string plaintext, std::string key)
{

for (int i = 0; i < plaintext.length(); i++)
{
int numeric = Alphanumeric::chartoint(plaintext[i]);
int keyval = Alphanumeric::chartoint(key[i % key.length()]);
numeric += keyval;
numeric %= 26;
}
}

• I think that this is perfect situation to write a stream. Nov 28, 2016 at 16:56

std::string DecryptVigenere(std::string ciphertext, std::string key);
std::string EncryptVigenere(std::string plaintext, std::string key);

For input parameters, pass non-primitive types by reference-to-const to avoid unnecessary allocations. See Const-Correctness and Parameter Passing.

std::string DecryptVigenere(std::string const& ciphertext,
std::string const& key);
std::string EncryptVigenere(std::string const& plaintext,
std::string const& key);

#include <string>
#include "Vigenere.h"
#include "Alphanumeric.h"

Organize your headers by robustness to catch latent usage errors as soon as possible.

#include "Vigenere.h"      // Interface

std::string EncryptVigenere(std::string const& plaintext,
std::string const& key);
{

When you know the amount of space required for a container, use the reserve member function to pre-allocate space. In your two transformation functions, the length of the answer will always be the same length as the first input argument.

std::string EncryptVigenere(std::string const& plaintext,
std::string const& key);
{

        int keyval = Alphanumeric::chartoint(key[i%key.length()]);

Make sure to test your preconditions. key must be non-empty as you cannot divide/modulo-by-zero (undefined behavior according to the C++ Standard §5.6/4).

Be consistent with your formatting (operator spacing, function naming).

std::string encrypt_vigenere(std::string const& plaintext,
std::string const& key);
{
if (key.empty()) {
throw std::invalid_argument("Invalid key length of Zero.");
}
// ...
int keyval = Alphanumeric::char_to_int(key[i % key.length()]);

    std::cout << "*************VIGENERE BREAKER*************" << std::endl;

Be aware of what std::endl actually does.

Inserts a newline character into the output sequence os and flushes it as if by calling os.put(os.widen('\n')) followed by os.flush().

If you did not intend to force the buffer to flush, consider just outputting '\n'.

    std::cout << "*************VIGENERE BREAKER*************\n";

    std::ifstream input(argv[1]);
std::string process = argv[2];
std::string key = argv[3];

Check to make sure that these arguments actually exists. Index access out of bounds is undefined behavior.

const qualify your immutable objects.

    if (argc != 4) {
std::cerr << "The syntax of the command is incorrect.\n";
return EXIT_FAILURE;
}

std::ifstream input(argv[1]);
const std::string process = argv[2];
const std::string key = argv[3];

#ifdef __APPLE__
#define DICTPATH "/usr/share/dict/words"
#endif

// ...
std::ifstream dictionary(DICTPATH);

What if __APPLE__ isn't defined? Would be nice if there was some fallback dictionary to use.

Don't use macros to define variables. If you need compile-time evaluation of variables, functions, or objects, use constexpr. Source control remains a legitimate use-case for macros.

#ifdef __APPLE__
constexpr auto dictionary_path = "/usr/share/dict/words";
#else
constexpr auto dictionary_path = "english.txt"
#endif

// ...
std::ifstream dictionary(DICTPATH);

    if (process == "-e") { /* ... */ }
if (process == "-d") { /* ... */ }
if (process == "-dicf") { /* ... */ }
if (process == "-dic") { /* ... */ }

The blocks that process can branch to are exclusive from each other. To enforce that exclusivity, you can use else if to make it clear to the reader that this is happening.

What should happen if the process is invalid?

    if (process == "-e") { /* ... */ }
else if (process == "-d") { /* ... */ }
else if (process == "-dicf") { /* ... */ }
else if (process == "-dic") { /* ... */ }
else { /* handle invalid process */ }

            frequency[Alphanumeric::chartoint(c)]++;

This seems a little fishy to me. I would expect an Alphanumeric class or function collection to return a mapping over the set of characters and numbers. 26 characters just doesn't seem right.

        if (total <= threshold) {
std::cout << "RESULT FOUND" << std::endl;
results.push_back("Using " + str);
results.push_back(result);
}

Since the results are not being saved for anything, just print them as you find them.

• Hi! Thanks so much for this, it's exactly what I need. I'm making changes right now :) Nov 29, 2016 at 9:12

Code design

It is perfectly fine if you're really new to C++, but I think that one of the worst thing you can do with C++ is to use it like C. If you don't use the object oriented paradigm, you are more likely to write C code with STL than actual C++.

If you need ideas for a second version of this exercise, you could try to design it in a way that take the code out of the main function to organise it in classes. This would also allow you to easily store and use your magic number "26" that you copy and pasted to several places (which is a very bad practise as it harms maintainability).

Error checking

It may be a good idea to check for command line parameters errors and give a feedback for it. You should check the length of argv[] to avoid any problem but you should also give a feedback to the user if his parameters do not meet what you expect.

Containers

You are using std::list to store the results but you seem to only use push_back with it. An std::vector would be a more appropriate container for your use.

Iterations

I love foreach loops too, but when you need to keep track of the index, it probably means that you should use a standard for loop. This is what you did when you iterated on the frequency array.

• Thanks, this helps a lot! I'm not sure how I could use objects in this code... Nov 28, 2016 at 15:41
• You could start by creating a Vigenere class that would implement encrypt and decrypt as private functions and some public functions that would contain the code that lies in the conditions of your current main function. This would be a nice first step if you need an exercise to apply OOP concepts. We can discuss this further if you have any question.
– Stud
Nov 28, 2016 at 16:03
• One other thing, I understand that you shouldn't use C++ as if it were C, but what does this include aside from OOP? Does it include Casting? What else? Nov 28, 2016 at 21:48
• When you use C++, people expect you to be able to use C feature as well as C++ ones, at least from my own experience. If you want to only use C++, you should use the STL every time you can instead of the C alternatives (for example for arrays, function pointers, algorithms, cast, smart pointer, etc)
– Stud
Nov 29, 2016 at 8:41