text:
# Overfull hbox with British English

I write in British English and occasionally I get an overfull hbox warning because LaTeX does not know how to break a word correctly in its British form. For example, the word 'analysing' causes an overfull hbox because LaTeX will not break the word, whereas 'analyzing' is broken into 'analyz-ing' and the hbox warning goes away. what is the best solution to this? Is there a way to have LaTeX recognise British English and correctly break words?

-
Did you forget to load the babel package? Otherwise, you will be using the default American hyphenation patterns which indeed do not break "analysing". You see which hyphens are allowed by \showhyphens{analysing} etc. and add new hyphenations with the \hyphenation command. – Andrew Swann Feb 24 '13 at 13:43

Load babel with the british option (simply using english won't work).

\documentclass{article}

\usepackage[american,british]{babel}

\textwidth 30pt% just for the example

\begin{document}

xxx analysing

\selectlanguage{american}

xxx analysing

\end{document}

EDIT: Here's a solution in case you're using XeLaTeX/polyglossia:

\documentclass{article}

\usepackage{polyglossia}
\setmainlanguage[variant=british]{english}

\textwidth 30pt% just for the example

\begin{document}

xxx analysing

\end{document}

-
I did this and my biblatex-chicago package stopped working, so I loaded [american,british,english] as options for babel, which fixed it. – David Rowthorn Feb 25 '13 at 15:25


text:
## CryptoDB

### Paper: Key Mixing in Block Ciphers through Addition modulo $2^n$

Authors: Debdeep Mukhopadhyay Dipanwita RoyChowdhury URL: http://eprint.iacr.org/2005/383 Search ePrint Search Google The classical technique to perform key mixing in block ciphers is through exclusive-or (exor). In this paper we show that when the $n$-bit key is mixed in a block cipher of size $n$ bits via addition modulo $2^n$, the bias of the linear approximations falls exponentially fast. Experimental results have been provided to show that such a scheme cannot be cryptanalyzed using Linear Cryptanalysis.
##### BibTeX
@misc{eprint-2005-12717,
title={Key Mixing in Block Ciphers through Addition modulo $2^n$},
booktitle={IACR Eprint archive},
keywords={secret-key cryptography / Block Ciphers, linear cryptanalysis, Key Mixing, Linear Approximations, Piling-Up Lemma},
url={http://eprint.iacr.org/2005/383},
note={ debdeep@vlsi.iitkgp.ernet.in 13078 received 22 Oct 2005},

format: plain


text:
# Linear Equations Examples

Equations are used everywhere in mathematics. An equation is defined to an expression with equal $(=)$ sign. Just to recall that expression is a combination of variables and constants. There are different types of equations in mathematics. Linear equations are studied in middle-level mathematics. There may be a set of linear equations each equation of which shares the same values of variables. Such set is known as a system of linear equations. Math is one subject that students find tough to understand. The difficult problems, endless practice questions and equations certainly don't make it easy. However, learning math can be made fun and less stressful if students are allowed to learn at their own pace. In this section you will be able to practice some linear equations problems designed by subject experts. Answers have been structured in a logical and easy language for quick revisions.

## Examples on Linear Equations

We can directly solve equations with one variable using one step or two step solutions. Whereas to solve equations with two or more variables, we use listed methods: Substitution method, graphical method, elimination method etc. Let us solve some of the problems using these methods.

Example 1: Solve the set of simultaneous equation by graphing

$2x - y$ = $3$ and $x + y$ = $5$

Solution:

Rewrite both equations into slope intercept form.

$2x - y$ = $3$ can be written as $y$ = $2x - 3$

$x + y$ = $6$ can be written as $y$ = $-x + 6$

Graph both the lines on a same graph and if they intersect find the point of intersection and this point would be the solution.

$(3, 3)$ is the solution it means $x$ = $3,\ y$ = $3$.

One can cross check by plugging in the value into the original equations.

$2x - y$ = $3$ we can plug in $x$ = $3$ and $y$ = $3$ we get $2(3) - 3$ = $3$ = $6 - 3$ = $3$ is true, similarly
the second equation can be checked x + y = 6 plug in $x$ = $3$ and $y$ = $3$. $3 + 3$ = $6$.  Which is true. Our solution is right.

Example 2: Find the solution(s) common( if any )  to the given equations 3x + y = 10 , 6x + 2y = -5
Solution: Let us solve the given equations by elimination method.
Let us first number the equations.
3x + y = 10  ---------------------(1)
6x + 2y = -5  ---------------------(2)

Multiplying Equation (1) by 2, we get 2 ( 3x + y ) = 2 ( 10)
6x  +  2y   = 20  ----------------------(3)
6x + 2y     = -5  -----------------------(2)
(-)  (-)       (+)
________________________
Subtracting (2) from (3), we get
0  =  25 , which is  a false statement.
Hence the above system of equations have no solution.

Example 3: Solve the set of linear equation by Elimination Method

$3x + y$ = $5$

$2x - y$ = $0$

Solution

What we see one of variable in one equation is having the opposite sign in the other equation, in such cases we just add the two equations.

$3x + y$ = $5$
$2x - y$ = $0$
--------------------
$5x$ + 0y = $5$

This implies 5x = 5
or x = 1

Substitute the value of $x$ into any one of the equation and solve for $y$

$3x + y$ = $5$

$3(1) + y$ = $5$

$3 + y$ = $5$

$y$ = $2$

The solution is $x$ = $1,\ y$ = $2$, we can also represent it as an ordered pair $(1, 2)$

## Practice Problems

Below listed problems are based on NCERT book. Practice-cum NCERT problems series for class 6 to 12 emphasizes that learning should be activity-based and knowledge driven.

Problem 1: Solve $\sqrt{3} - \sqrt{2x -1} = \sqrt{x}$
Problem 2: Solve 10x - 6 + 5x = 54x - 21
Problem 3: Solve by graphical method
y - 2x = 3
y = -x + 6
Problem 4: Solve pair of linear equations: -x + 2y = 3 and 12x - 6y = 10
Problem 5: The sum of 2 numbers is 105 and their ratio is 2:3. What are the numbers?


text:
# Image thresholding while retaining “underneath” contents

I have sample images, and I need to extract certain features that depend on color. Images are more like line art, contours, and consist of various line forms, and several colors.

I can extract specific features through thresholding, but if lines intersect I always get discontinuities (holes) that are not acceptable. As example I prepared this:

• I have image with two "lines":

• I'll threshold to remove black, but underneath line (which of course doesn't exist as information in bitmap representation) gets discontinued:

• while I want it like this:

which I'll later equalize, and get wanted context.

I used image processing program, and would appreciate some tip how to do this in Gimp or Photoshop, but any answer is welcomed like Python/ndimage, Matlab/Octave...

-
You want to separate two overlapping transparent images, is that right? A complete example image is welcome. – Emre Feb 20 '13 at 0:57
In your example you see two bars, but there is really three. Your brain uses some higher level processes, joining up the edges to give that perception. Any method would also have to do this an be quite complicated. – geometrikal Feb 20 '13 at 3:21
@Emre: No, those a scans of various topological maps. – zetah Feb 20 '13 at 10:20
@geometrikal: I'm aware of that, and already noted that such information does not exist. I thought that there is known algorithm that can consider bitmap image with "lines" as content. I'll try skeletonizing and some thinning methods later, to see if I can retain color in the process, and afterwards do morph operators, as that way discontinuities should be 1px. I just thought that someone could give me some advice in that direction. – zetah Feb 20 '13 at 10:27
ahh ok. can you put up an example image? – geometrikal Feb 22 '13 at 13:01

This is by no means a complete answer but I think it will get you far enough to achieve what you want. Edit: maybe not.

• find main colours using kmeans
• assign main colours to different types (brown line, blue line, etc). Some appear in both
• clean up with morphology
• segment image

What I thought might work was to pick out the most common colours and classify each pixel by the nearest colour. Then classify each pixel by type (brown line, etc), where the colour class can belong to multiple type classes. This would hopefully solve the problem of gaps in the lines - i.e. the colour where blue crosses brown would belong to both type class and fill the gap.

Not sure if it really does a better job. The issue with kmeans is that it uses random starting points so the colour classes were changing every time the script was run. I think I've fixed that now.

I wonder if there is some code out there to connect the broken lines?

% Reshape into 2D matrix of pixel colours
ir = reshape(I, [size(I,1) * size(I,2),3]);

% Choose exact same sample points everytime
rng(0);
ir_indx = randi(size(ir,1),20,1);
ir_startpoints = ir(ir_indx,:);

% Use k-means clustering to find most common colours
[ik,c,sk,sd] = kmeans(double(ir),20,'Start',double(ir_startpoints));

% Show colours
cim = reshape(uint8(c),[1,20,3]);
image(cim); title('Colours'); pause;

% Sort colours
chsv = rgb2hsv(c);
[~,cni] = sort(chsv(:,1),1);
cn = c(cni,:);
cnim = reshape(uint8(cn),[1,20,3]);
image(cnim); title('Sorted colours'); pause;

% Get index of index
[~,cni2] = sort(cni);

% Show pixels classified
in = reshape(cni2(ik,:), [size(I,1),size(I,2)]);
imagesc(in);  title('Pixel classification'); pause;

% Show each class
In = zeros(size(I));
for k = 1:20
In(:,:,1) = I(:,:,1) .* uint8(in == k);
In(:,:,2) = I(:,:,2) .* uint8(in == k);
In(:,:,3) = I(:,:,3) .* uint8(in == k);
image(uint8(In)); title (['Class ' num2str(k)]); pause;
im_dist(:,:,k) = reshape(sd(:,k), [size(I,1),size(I,2)]);
imagesc(-im_dist(:,:,k) .* (in == k));  title('Pixel distance'); pause;
end

% 12,19 and 20 blue lines
im_blue = (in == 13) | (in == 19) | (in == 20);
imagesc(im_blue); title('Blue lines'); colormap gray; pause;
im_blue = imopen(im_blue,strel('diamond',1));
imagesc(im_blue); title('Blue lines opened'); colormap gray; pause;
for k=1:3; In(:,:,k) = I(:,:,k) .* uint8(im_blue); end;
image(uint8(In)); pause;
imagesc(bwmorph(im_blue,'skel',Inf));

% brown lines
im_brown = (in == 1) | (in == 2) | (in == 1) | ...
(in == 7) | (in == 8) | (in == 11) | (in == 12) | (in == 13);
imagesc(im_brown); title('Brown lines'); pause;
im_brown = imopen(im_brown,strel('diamond',1));
imagesc(im_brown); title('Brown lines opened'); pause;
for k=1:3; In(:,:,k) = I(:,:,k) .* uint8(im_brown); end;
image(uint8(In)); pause;
imagesc(bwmorph(im_brown,'skel',Inf));

% 9 - black line
im_black = (in == 10);
imagesc(im_black); title('Black lines'); pause;
im_black = imopen(im_black,strel('diamond',1));
imagesc(im_black); title('Black lines opened'); pause
for k=1:3; In(:,:,k) = I(:,:,k) .* uint8(im_black); end;
image(uint8(In)); pause;
imagesc(bwmorph(im_black,'skel',Inf));

% 16,17,18 green area
im_green = (in == 16) | (in == 17) | (in == 18);
imagesc(im_green); title('Grean area'); pause;
im_green = imopen(im_green,strel('diamond',1));
imagesc(im_green); title('Green area opened'); pause;
im_green = imclose(im_green,strel('disk',7));
imagesc(im_green); title('Green area opened and closed'); pause;
for k=1:3; In(:,:,k) = I(:,:,k) .* uint8(im_green); end;
image(uint8(In)); pause;

-
Thanks for your effort geometrikal. I'm sorry but I just can't see what are you trying to suggest. If I'm not mistaken you show me here how to segment image based on colors. I can do that with any decent image processing tool. For reference and those interested in results of above code, topological (brown) lines are extracted as following image: i.imgur.com/fMPBBom.png I can do better than that, and I upvoted you answer – zetah Feb 28 '13 at 21:14
@zetah ahh I thought that might happen. The kmeans clustering gets slightly different results each time. I was in a rush yesterday and didnt post up my results, I will update shortly with some comments. – geometrikal Mar 1 '13 at 1:05
OK. I don't understand how you expect to find "crossing" color, as image lines are not blended but one line is drawn on top of other. About connecting broken lines there are actually several methods, but none is easy. For example: PDF. This apparently belongs to a topic of curve reconstruction, and contour closing is one of "easier" subtopics. The thing is, I could find such method implemented anywhere (not in a library nor even in GIS tools, like gdal or ArcGIS or QGIS) – zetah Mar 1 '13 at 3:31
Some of the colours are a bit blended (not all of them) thats why I looked for the crossing colours. I had a quick look as well and I couldn't find contour closing either. Sorry I can't be more help at the moment! Good luck! P.S. what is the application? Map processing? – geometrikal Mar 1 '13 at 4:58
OK, thanks for your time geometrikal. I need to reconstruct older map, while I'm not trained for the process. – zetah Mar 1 '13 at 5:13


text:
GW190521: orbital eccentricity and signatures of dynamical formation in a binary black hole merger signal

Isobel M. Romero-Shaw, Paul Lasky, Eric Thrane, Juan Calderon Bustillo

Research output: Contribution to journalArticleResearchpeer-review

Abstract

Pair-instability supernovae are thought to restrict the formation of black holes in the mass range $\sim 50\mbox{--}135\,{M}_{\odot }$. However, black holes with masses within this "high mass gap" are expected to form as the remnants of binary black hole mergers. These remnants can merge again dynamically in densely populated environments such as globular clusters. The hypothesis that the binary black hole merger GW190521 formed dynamically is supported by its high mass. Orbital eccentricity can also be a signature of dynamical formation, since a binary that merges quickly after becoming bound may not circularize before merger. In this work, we measure the orbital eccentricity of GW190521. We find that the data prefer a signal with eccentricity $e\geqslant 0.1$ at 10 Hz to a nonprecessing, quasi-circular signal, with a log Bayes factor $\mathrm{ln}{ \mathcal B }=5.0$. When compared to precessing, quasi-circular analyses, the data prefer a nonprecessing, $e\geqslant 0.1$ signal, with log Bayes factors $\mathrm{ln}{ \mathcal B }\approx 2$. Using injection studies, we find that a nonspinning, moderately eccentric (e = 0.13) GW190521-like binary can be mistaken for a quasi-circular, precessing binary. Conversely, a quasi-circular binary with spin-induced precession may be mistaken for an eccentric binary. We therefore cannot confidently determine whether GW190521 was precessing or eccentric. Nevertheless, since both of these properties support the dynamical formation hypothesis, our findings support the hypothesis that GW190521 formed dynamically.
Original language English L5 7 The Astrophysical Journal Letters 903 1 https://doi.org/10.3847/2041-8213/abbe26 Published - 1 Sep 2020


text:
# enable¶

astropy.units.imperial.enable()[source]

Enable Imperial units so they appear in results of find_equivalent_units and compose.

This may be used with the with statement to enable Imperial units only temporarily.


text:
CMStatistics 2017: Start Registration
View Submission - CMStatistics
B0499
Title: Risk measure estimation for $\beta-$mixing time series and applications Authors:  Valerie Chavez-Demoulin - University of Lausanne (Switzerland)
Armelle Guillou - Strasbourg (France) [presenting]
Abstract: The application of extreme-value theory in the context of stationary $\beta-$mixing sequences that belong to the Frechet domain of attraction is discussed. In particular, we propose a methodology to construct bias-corrected tail estimators. Our approach is based on the combination of two estimators of the extreme-value index to cancel the bias. Then the resulting estimator is used to estimate an extreme quantile. In a simulation study, we outline the performance of our proposals that we compare to alternative estimators recently introduced in the literature. Also, we compute the asymptotic variance in specific examples when possible. Our methodology is applied to two datasets on finance and environment.


text:
Applied econometrics: Econ 508

## TA: Nicolas Bottan

Welcome to this new issue of e-Tutorial. We focus now on time series models, with special emphasis on the tests of unit roots and cointegration. We would like to remark that the theoretical background given in class is essential to proceed with the computational exercise below. Thus, I recommend you to study Prof. Koenker’s Lectures 8 and 9 as you go through the tutorial.1

# Data

The first thing you need is to download the updated Thurman and Fisher (1988) data, called eggs.csv from the Econ 508 web site. Save it in your preferred directory (I will save my as “C:/eggs.csv”.) The next step is inserting the Data in R:

  Thurman<-read.table("C:/eggs1.txt", header=T, sep=",")

An alternative is to call your data from the web:

  Thurman<-read.table("http://www.econ.uiuc.edu/~econ508/data/eggs.csv", header=T, sep=",")

The next step is to declare chickens and eggs as time series:

  year<-ts(Thurman$year) chic<-ts(Thurman$chic)
egg<-ts(Thurman$egg)  # Unit Root: Augmented Dickey-Fuller Test At first, it is important that you to sketch the ADF test, explaining the NULL and the ALTERNATIVE hypotheses. ADF Test in R: I suggest you to use the R code adf.R, available at http://www.econ.illinois.edu/~econ508/routines.html: "adf" <- function(x,k = 0, int = TRUE, trend = FALSE){ # NB: returns conventional lm summary so p-values for adf test are wrong! require(dynlm) dx <- diff(x) formula <- paste("dx ~ L(x)") if(k > 0) formula <- paste(formula," + L(dx,1:k)") if(trend){ s <- time(x) t <- ts(s - s[1],start = s[1],freq = frequency(x)) formula <- paste(formula," + t") } if(!int) formula <- paste(formula," - 1") summary(dynlm(as.formula(formula))) } }  Your job is to copy the R code above and paste in the R console. This will create a R function called “adf”, which runs the unit root test for each case. You should use the ADF test for each individual series (chickens and eggs), controlling for the number of lags, and the inclusion of constants and trends. If you don’t feel like downloading it and doing the copy pasting you can directly source it from the web page  source("http://www.econ.uiuc.edu/~econ508/routines/adf.R") Examples DF for Chickens • Models including constant and trend: For example, using 1 lag in the chicken series:  adf(chic, k=1, int=T, trend=T)  Loading required package: dynlm Loading required package: zoo Attaching package: 'zoo' The following objects are masked from 'package:base': as.Date, as.Date.numeric  Time series regression with "ts" data: Start = 3, End = 75 Call: dynlm(formula = as.formula(formula)) Residuals: Min 1Q Median 3Q Max -55584 -10044 1244 8846 77813 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 4.71e+04 3.10e+04 1.52 0.133 L(x) -1.14e-01 6.81e-02 -1.68 0.098 . L(dx, 1:k) -9.76e-02 1.22e-01 -0.80 0.428 t -2.08e-01 1.38e+02 0.00 0.999 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 22000 on 69 degrees of freedom Multiple R-squared: 0.0715, Adjusted R-squared: 0.0312 F-statistic: 1.77 on 3 and 69 DF, p-value: 0.161 Then you can test the significance of the coefficient L(x) by using the appropriate Dickey & Fuller critical values (Table B.6 from Hamilton 1994). You can access the DF Test tables given by Hamilton(1994) by clicking HERE. Here the null hypothesis is the presence of unit root. Thus, the augmented Dickey-Fuller statistic is -1.678, and lies inside the acceptance region at 1%, 5%, and 10%, as you can see form the tables. Therefore, we cannot reject the presence of unit root. If you don’t want to use the tables, there’s a package in R called fUnitRoots that gives you the DFtable  install.packages("fUnitRoots") require(fUnitRoots) The qadf function will give you the quantiles for the ADF test  qadf(0.01, N=75, trend="ct") From this starting point, you can add lags by changing k=1 to k=2 or k=3 or k=4 and so on. If wish to exclude the intercept, just substitute int=T by int=F. (As usual, T means true, i.e., inclusion, and F means false, i.e., exclusion). The same applies to the inclusion/exclusion of trend. My suggestion is that you run 3 different types of ADF, each of them including 1, 2, 3, and 4 lags: (i) Models with intercept and trend (int=T, trend=T) (ii) Models with intercept but without trend (int=T, trend=F) (iii) Models without intercept and without trend (int=F, trend=F) • Models including constant but no trend. Same rationale, but adjusting the command to:  adf(chic, k=1, int=T, trend=F)  Time series regression with "ts" data: Start = 3, End = 75 Call: dynlm(formula = as.formula(formula)) Residuals: Min 1Q Median 3Q Max -55583 -10040 1240 8838 77817 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 4.71e+04 2.48e+04 1.90 0.062 . L(x) -1.14e-01 5.99e-02 -1.91 0.061 . L(dx, 1:k) -9.76e-02 1.18e-01 -0.83 0.411 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 21800 on 70 degrees of freedom Multiple R-squared: 0.0715, Adjusted R-squared: 0.045 F-statistic: 2.7 on 2 and 70 DF, p-value: 0.0745 • Models excluding both constant and trend. Idem, but adjusting the command to:  adf(chic, k=1, int=F, trend=F)  Time series regression with "ts" data: Start = 3, End = 75 Call: dynlm(formula = as.formula(formula)) Residuals: Min 1Q Median 3Q Max -63272 -8100 1536 9986 73866 Coefficients: Estimate Std. Error t value Pr(>|t|) L(x) -0.00116 0.00628 -0.19 0.85 L(dx, 1:k) -0.15157 0.11675 -1.30 0.20 Residual standard error: 22200 on 71 degrees of freedom Multiple R-squared: 0.0237, Adjusted R-squared: -0.00376 F-statistic: 0.863 on 2 and 71 DF, p-value: 0.426 Do that for each individual series. This will generate 12 regressions for chickens, and 12 for eggs. Very likely, some of them will indicate the presence of unit root, while others will not. The choice of the best model can be done by calculating AIC, SIC or any other reasonable criterion. At the end, please provide a table with the summary of your results, and draw your conclusions. After performing the test on the three models, what can you conclude? The adf function gave you the tests for the chickens annual series, using 1 lag. We recommend you to repeat these 3 processes for lags 2,3,and 4 as well. After you complete this cycle for chickens, you need to do the same cycle for eggs. At the end of both cycles, you will have 24 regression outputs. If you prefer, you don’t need to report all output details, but rather concentrate on the ADF test statistics of each equation. Think that you are writing an academic paper. Don’t spend too much space with intermediary results; concentrate instead on your final conclusions, which can be paradoxical as you go through different tetsting steps. By the end of the day you are expected to summarize your main results in a table, and then to write a paragraph with comments on the different results you can obtain when you include/exclude trends/constants/lags for both chickens and eggs series. ### Comments on Unit Root Tests: • Unit root tests are very sensitive to the number of included lags and/or constant and trends. That’s the reason by which we are asking you to show all ADF statistics in the table above. Very likely, some of the results will indicate the presence of unit root while others will not. • How to make a general conclusion on the test results with so many models available? Johnston & DiNardo (1997, p.226), for example, mention that one of the objectives of including lags is to achieve white noise residuals. Other authors recommend the use AIC or SIC in the model selection. • It is quite simple to calculate information criteria in ADF tests. Each output of adf corresponds to a linear regression on the lags, constant, and/or trend of the series. From OLS regression, you recover the sample size, the RSS, and the # of parameters requested to calculate SIC or AIC, plus the original ADF statistic. But remember to use the Dickey-Fuller critical values. # Cointegration: Engle-Granger Test The first thing you should do always is to sketch the Engle-Granger test, explaining the NULL and the ALTERNATIVE hypotheses. : Engle-Granger in R: The test can be done in 3 steps, as follows: 1. Pre-test the variables for the presence of unit roots (done above) and check if they are integrated of the same order 2. Regress the long run equilibrium model of chickens vs. eggs  Engle<-lm(chic~egg) summary(Engle)  Call: lm(formula = chic ~ egg) Residuals: Min 1Q Median 3Q Max -57843 -30963 -15177 18559 169232 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 446387.63 27575.93 16.19 <2e-16 *** egg -6.23 5.05 -1.23 0.22 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 44200 on 73 degrees of freedom Multiple R-squared: 0.0204, Adjusted R-squared: 0.00696 F-statistic: 1.52 on 1 and 73 DF, p-value: 0.222 Obtain the residuals.  residual<-resid(Engle) Plot the residuals along time.  ts.plot(year,residual, gpars=list(main="Chickens vs. eggs: Is there cointegration?", xlab="year", ylab="residuals")) Plot also the residuals versus lagged residuals. Draw your conclusions 1. Proceed with a unit root test on the residuals, i.e. test whether the residuals are $$I(0)$$, as you have done the ADF test for unit roots on chickens and eggs. Consider lags 0 to 4, though. This is a residual-based version of the ADF test. The only difference from the traditional ADF to (this version of) the Engle-Granger test are the critical values. The critical values to be used here are no longer the same provided by Dickey-Fuller, but instead provided by Engle and Yoo (1987) and others (see approximated critical values in Table B.9, Hamilton 1994) HERE. This happens because the residuals above are not the actual error terms, but estimated values from the long run equilibrium equation of chickens against eggs. Some authors (e.g., Enders, 1995) consider a fourth step, consisting in the estimation of error-correction models and checking of models adequacy. However, you are not required to do that for the purposes of the problem set 3. At the end of the test, please provide a table summarizing your results. Comment your findings. # Cointegration: Johansen Test Again we recommend you to sketch the Johansen test, explaining the NULL and the ALTERNATIVE hypotheses. Then we suggest you to use the R code johansen.R, provided by Prof. Koenker, and available at http://www.econ.uiuc.edu/~econ472/routines.html: "johansen"<- function(x, L = 2){ #Johansen Test of cointegration for multivariate time series x #Returns vector of eigenvalues after that you are on your own. #This is a modified version for R, in which rts is substituted by ts. x <- ts(x) n <- nrow(x) p <- ncol(x) Ly <- lag(x[, 1], -1) D <- diff(x[, 1]) for(i in 1:p) { if(i > 1) { D <- ts.intersect(D, diff(x[, i])) Ly <- ts.intersect(Ly, lag(x[, i], -1)) } if(L > 0) for(j in 1:L) D <- ts.intersect(D, lag(diff(x[, i]), - j)) } iys <- 1 + (L + 1) * (0:(p - 1)) Y <- D[, iys] X <- D[, - iys] Ly <- ts.intersect(Ly, D)[, 1:p] ZD <- lm(Y ~ X)$resid
ZL <- lm(Ly ~ X)$resid df <- nrow(X) - ncol(X) - 1 S00 <- crossprod(ZD)/df S11 <- crossprod(ZL)/df S01 <- crossprod(ZD, ZL)/df M <- solve(S11) %*% t(S01) %*% solve(S00) %*% S01 eigen(M)$values
}

Your job is to copy the code above and paste in the R console. This will create a R function called “johansen” that calculates the eigenvalues.

Once again, if you don’t feel like downloading it and doing the copy pasting you can directly source it from the web page

  source("http://www.econ.uiuc.edu/~econ508/routines/johansen.R")

The command to obtain the eigenvalues is:

johansen(cbind(egg,chic), L=1)
[1] 0.14143 0.01169

The code above refers to the case including trend and intercept, and the appropriate critical values should be used. Note that the theoretical background here is essential, given that you need to interpret the eigenvalues and calculate the test statistic by yourself, before to draw your conclusions.


text:
# Is HBr a strong acid?

Jun 5, 2018

Yes!

#### Explanation:

In the Bronsted-Lowry definition, an acid is anything which donates ${H}^{+}$ ions in an aqueous solution.

$H B r$ would be considered an acid, because it does dissociate in aqueous solutions in the following dissociation reaction:

$H B r \left(g\right) r i g h t \le f t h a r p \infty n s {H}^{+} \left(a q\right) + B {r}^{-} \left(a q\right)$

Now, a strong acid is an acid which almost completely dissociates in aqueous solutions.

$H B r$ fulfils this, because it very readily dissociates—here's why.

$H B r$ is a hydrohalic acid, or an acid with the formula $H X$ where $X$ is a halogen.
In all hydrohalic acids except for $H F$, the bond between $H$ and $X$ is very weak because halogens tend to:

• have a high number of energy levels, increasing the size of the halogen. This decreases attraction between $H$ and $X$.
• Be very electronegative, causing the $H - X$ bond to be very polar.

These two factors cause hydrogen to be very easily "snapped off" of $H X$, causing it to dissociate into ${H}^{+}$ and ${X}^{-}$.

This is also true for $H B r$—because bromine is so electronegative and large, hydrogen will very easily dissociate from $H B r$, causing $H B r$ to readily dissociate into ${H}^{+}$ and $B {r}^{-}$.

Dissociation happens so readily that we can say $H B r$ almost completely dissociates, fulfilling the criteria for a strong acid.


text:
# Method of moments (probability theory)

34,136pages on
this wiki

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In probability theory, the method of moments is a way of proving convergence in distribution by proving convergence of a sequence of moment sequences. Suppose X is a random variable and that all of the moments

$\operatorname{E}(X^k)\,$

exist. Further suppose the probability distribution of X is completely determined by its moments, i.e., there is no other probability distribution with the same sequence of moments (cf. the problem of moments). If

$\lim_{n\to\infty}\operatorname{E}(X_n^k) = \operatorname{E}(X^k)\,$

for all values of k, then the sequence {Xn} converges to X in distribution.

The method of moments is especially useful for proving limits theorems for random matrices with independent entries, such as Wigner's semi-circle law.


text:
# Evasive maneuver game

First of all, I want to state that I'm not an expert in the game theory and searching the references for the game I just made up. Solving this game by itself seems like a decent project for strong highschool / undergrad students and I would like to suggest it to some people, but I'm not sure whether anything is known about it already and need to familiarize with the topic.

The game is a zero-sum probabilistic game with two players: runner and catcher.

Runner moves in some space, say a line or a plane with limited speed $$v$$ and arbitrary direction.

Catcher knows the exact position of a runner. Once catcher can declare some circle of radius $$R$$, and after the time $$t$$ passes, if the runner is in the circle, the catcher wins. Otherwise, runner wins.

Runner doesn't know the declaration moment.

We also state that if for $$T >> t$$ catcher does not declare anything, runner wins automatically (but I think that runner's behavior should actually have some limit for $$T \rightarrow \infty$$).

I've tried to tackle the problem for the following discrete model: the time is discrete, runner moves 1 step left or right each turn, catcher declares 1 possible position, $$t = 2$$ turns. Then, there is a strategy for a runner which allows to escape with probability $$\frac{\sqrt{5} - 1}{2} \approx 0.62$$ independent on a catcher behavior. I believe it is optimal but didn't prove it fully. Note that escape with probability $$> \frac{2}{3} \approx 0.66$$ is not possible due to the following catcher strategy: choose $$3$$ possible positions of a runner on a second turn with equal probability.

Note also that the symmetric random walk allows the escape with probability $$\frac{1}{2}$$ which is much worse.

The discrete approximation problem you mention was proposed by Isaacs, and solved independently by Dubins [1] and Karlin [2]. These papers show that the runner has a unique optimal strategy which depends on the previous move only and yields escape probability $$p=\frac{\sqrt{5} - 1}{2}$$. Conversely, for every $$\epsilon>0$$, the catcher has a strategy that succeeds with probability at least $$1-p-\epsilon=(3-\sqrt{5})/2 -\epsilon$$. However, the catcher does not have an optimal strategy. A generalization is described in [3]. This problem is related to Pursuit-Evasion type game on graph ("Flyswatter game") Isaacs' original motivation involved continuum games of the type you describe, which are considered in the theory of differential games.


text:
# Finding the eigenvalue for a given graph

1. Dec 8, 2004

### Falnom

I'm having trouble finding the eigenvalue for a given graph; but more specifically I can't seem to find the characteristic polynomial. My book tells me that the characteristic polynomial of a simple graph with n vertices is the determinant of the matrix (A-$$\lambda$$I), where A is the adjaceny matrix and I is the n X n identity matrix. What is $$\lambda$$? And I've read someplace else that the characteristic equation of a matrix is the determinant of (xI-A) - which is right, or are they both?
And isn't the root of the equation the eigenvalue?

2. Dec 8, 2004

### matt grime

lambda is a variable, use x if you prefer. It's just a letter.

3. Dec 8, 2004

### Falnom

Ah yes of course, I had thought as much. Thank you very much. (It works now!)


text:
Copied to
clipboard

## G = C4×C24⋊C5order 320 = 26·5

### Direct product of C4 and C24⋊C5

Aliases: C4×C24⋊C5, C24⋊C20, C25.C10, (C24×C4)⋊C5, C2.1(C2×C24⋊C5), (C2×C24⋊C5).2C2, SmallGroup(320,1584)

Series: Derived Chief Lower central Upper central

 Derived series C1 — C24 — C4×C24⋊C5
 Chief series C1 — C24 — C25 — C2×C24⋊C5 — C4×C24⋊C5
 Lower central C24 — C4×C24⋊C5
 Upper central C1 — C4

Generators and relations for C4×C24⋊C5
G = < a,b,c,d,e,f | a4=b2=c2=d2=e2=f5=1, ab=ba, ac=ca, ad=da, ae=ea, af=fa, bc=cb, bd=db, be=eb, fbf-1=bcd, cd=dc, ce=ec, fcf-1=cde, fdf-1=de=ed, fef-1=b >

Subgroups: 732 in 147 conjugacy classes, 9 normal (all characteristic)
C1, C2, C2 [×6], C4, C4 [×3], C22 [×31], C5, C2×C4 [×24], C23 [×31], C10, C22×C4 [×28], C24, C24 [×6], C20, C23×C4 [×6], C25, C24×C4, C24⋊C5, C2×C24⋊C5, C4×C24⋊C5
Quotients: C1, C2, C4, C5, C10, C20, C24⋊C5, C2×C24⋊C5, C4×C24⋊C5

Permutation representations of C4×C24⋊C5
On 20 points - transitive group 20T75
Generators in S20
(1 8 13 17)(2 9 14 18)(3 10 15 19)(4 6 11 20)(5 7 12 16)
(1 13)(2 14)(4 11)(5 12)(6 20)(7 16)(8 17)(9 18)
(1 13)(2 14)(8 17)(9 18)
(1 13)(3 15)(8 17)(10 19)
(1 13)(2 14)(3 15)(5 12)(7 16)(8 17)(9 18)(10 19)
(1 2 3 4 5)(6 7 8 9 10)(11 12 13 14 15)(16 17 18 19 20)

G:=sub<Sym(20)| (1,8,13,17)(2,9,14,18)(3,10,15,19)(4,6,11,20)(5,7,12,16), (1,13)(2,14)(4,11)(5,12)(6,20)(7,16)(8,17)(9,18), (1,13)(2,14)(8,17)(9,18), (1,13)(3,15)(8,17)(10,19), (1,13)(2,14)(3,15)(5,12)(7,16)(8,17)(9,18)(10,19), (1,2,3,4,5)(6,7,8,9,10)(11,12,13,14,15)(16,17,18,19,20)>;

G:=Group( (1,8,13,17)(2,9,14,18)(3,10,15,19)(4,6,11,20)(5,7,12,16), (1,13)(2,14)(4,11)(5,12)(6,20)(7,16)(8,17)(9,18), (1,13)(2,14)(8,17)(9,18), (1,13)(3,15)(8,17)(10,19), (1,13)(2,14)(3,15)(5,12)(7,16)(8,17)(9,18)(10,19), (1,2,3,4,5)(6,7,8,9,10)(11,12,13,14,15)(16,17,18,19,20) );

G=PermutationGroup([(1,8,13,17),(2,9,14,18),(3,10,15,19),(4,6,11,20),(5,7,12,16)], [(1,13),(2,14),(4,11),(5,12),(6,20),(7,16),(8,17),(9,18)], [(1,13),(2,14),(8,17),(9,18)], [(1,13),(3,15),(8,17),(10,19)], [(1,13),(2,14),(3,15),(5,12),(7,16),(8,17),(9,18),(10,19)], [(1,2,3,4,5),(6,7,8,9,10),(11,12,13,14,15),(16,17,18,19,20)])

G:=TransitiveGroup(20,75);

32 conjugacy classes

 class 1 2A 2B ··· 2G 4A 4B 4C ··· 4H 5A 5B 5C 5D 10A 10B 10C 10D 20A ··· 20H order 1 2 2 ··· 2 4 4 4 ··· 4 5 5 5 5 10 10 10 10 20 ··· 20 size 1 1 5 ··· 5 1 1 5 ··· 5 16 16 16 16 16 16 16 16 16 ··· 16

32 irreducible representations

 dim 1 1 1 1 1 1 5 5 5 type + + + + image C1 C2 C4 C5 C10 C20 C24⋊C5 C2×C24⋊C5 C4×C24⋊C5 kernel C4×C24⋊C5 C2×C24⋊C5 C24⋊C5 C24×C4 C25 C24 C4 C2 C1 # reps 1 1 2 4 4 8 3 3 6

Matrix representation of C4×C24⋊C5 in GL5(𝔽41)

 32 0 0 0 0 0 32 0 0 0 0 0 32 0 0 0 0 0 32 0 0 0 0 0 32
,
 40 0 0 0 0 25 1 0 0 0 31 0 1 0 0 0 0 0 40 0 23 0 0 0 1
,
 40 0 0 0 0 0 40 0 0 0 0 0 40 0 0 4 0 0 1 0 0 0 0 0 40
,
 1 0 0 0 0 0 1 0 0 0 10 0 40 0 0 37 0 0 40 0 0 0 0 0 1
,
 1 0 0 0 0 0 1 0 0 0 10 0 40 0 0 0 0 0 1 0 18 0 0 0 40
,
 16 39 0 0 0 0 25 1 0 0 0 31 0 1 0 0 4 0 0 1 0 23 0 0 0

G:=sub<GL(5,GF(41))| [32,0,0,0,0,0,32,0,0,0,0,0,32,0,0,0,0,0,32,0,0,0,0,0,32],[40,25,31,0,23,0,1,0,0,0,0,0,1,0,0,0,0,0,40,0,0,0,0,0,1],[40,0,0,4,0,0,40,0,0,0,0,0,40,0,0,0,0,0,1,0,0,0,0,0,40],[1,0,10,37,0,0,1,0,0,0,0,0,40,0,0,0,0,0,40,0,0,0,0,0,1],[1,0,10,0,18,0,1,0,0,0,0,0,40,0,0,0,0,0,1,0,0,0,0,0,40],[16,0,0,0,0,39,25,31,4,23,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0] >;

C4×C24⋊C5 in GAP, Magma, Sage, TeX

C_4\times C_2^4\rtimes C_5
% in TeX

G:=Group("C4xC2^4:C5");
// GroupNames label

G:=SmallGroup(320,1584);
// by ID

G=gap.SmallGroup(320,1584);
# by ID

G:=PCGroup([7,-2,-5,-2,-2,2,2,2,70,2250,3161,4632,7363]);
// Polycyclic

G:=Group<a,b,c,d,e,f|a^4=b^2=c^2=d^2=e^2=f^5=1,a*b=b*a,a*c=c*a,a*d=d*a,a*e=e*a,a*f=f*a,b*c=c*b,b*d=d*b,b*e=e*b,f*b*f^-1=b*c*d,c*d=d*c,c*e=e*c,f*c*f^-1=c*d*e,f*d*f^-1=d*e=e*d,f*e*f^-1=b>;
// generators/relations

׿
×
𝔽


text:
# Calculate and draw difference of two plots automatically

I'm trying to automatically generate a plot, which visualizes the difference of two other plots. The input source is a single(!) file. The data is filtered by one column with /tr/rowfilter. Here is an example image:

I want that the "difference (b-a)" plot is generated by TikZ/PGFPlots/PGFPlotstable/LaTeX. I've experimented with /pgfplots/x filter, but I wasn't successful (I don't even know, if it's possible) Here is the corresponding tex example:

\documentclass{article}

\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{pgfplotstable}

\pgfkeys{
/tr/rowfilter/.style 2 args={
/pgfplots/x filter/.append code={
\edef\arga{\thisrow{#1}}
\edef\argb{#2}
\ifx\arga\argb
\else
\def\pgfmathresult{}
\fi
}
}
}

\usepackage{filecontents}
\begin{filecontents}{diagram.dat}
x y kind
1 1 a
2 6 a
3 10 a
4 13 a
5 15 a

1 1 b
2 7 b
3 13 b
4 17 b
5 20 b
\end{filecontents}
\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{\huge The way it is now:}
\vspace{0.5cm}

\begin{tikzpicture}
\begin{axis}[
height=8cm,
width=12cm,
grid=major,
legend pos=outer north east
]
\end{axis}
\end{tikzpicture}
\vspace{1cm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{\huge The way it should look like}
\vspace{0.5cm}

\begin{tikzpicture}
\begin{axis}[
height=8cm,
width=12cm,
grid=major,
legend pos=outer north east
]

%%% This should be generated with Tikz/PGFPLOTS/PGFPLOTSTABLE/Latex!!!
(1,0)
(2,1)
(3,3)
(4,4)
(5,5)
};

\end{axis}
\end{tikzpicture}

\end{document}

Can you help me?

-
Welcome to TeX.SE. And thanks for posting a complete MWE. –  Peter Grill Jul 7 '12 at 4:34
Thanks for the compliment:) –  Thomas Rebele Jul 7 '12 at 14:34
See also my proposal for tex.stackexchange.com/questions/62536/… - perhaps that is interesting for you as well. In short: if you can efford a simpler input table format, you can simplify the task drastically. –  Christian Feuersänger Jul 7 '12 at 21:01
Thanks for the comment, but changing the table format means probably more programming in c (or post-processing with some other tools), so the solution with PGFPLOTS is better for me in this case –  Thomas Rebele Jul 13 '12 at 20:14

You can use the stack plot=y functionality, using stack dir=minus to subtract the a plot from the b plot.

When plotting the b plot, add stack plots=y to the options:

\addplot +[stack plots=y] table[/tr/rowfilter={kind}{b}] {diagram.dat};

and then plot the difference by "stacking" the a plot on top, with a negative sign:

\addplot +[stack plots=y, stack dir=minus] table[/tr/rowfilter={kind}{a}] {diagram.dat};

et voilà:

\documentclass{article}

\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{pgfplotstable}

\pgfkeys{
/tr/rowfilter/.style 2 args={
/pgfplots/x filter/.append code={
\edef\arga{\thisrow{#1}}
\edef\argb{#2}
\ifx\arga\argb
\else
\def\pgfmathresult{}
\fi
}
}
}

\usepackage{filecontents}
\begin{filecontents}{diagram.dat}
x y kind
1 1 a
2 6 a
3 10 a
4 13 a
5 15 a

1 1 b
2 7 b
3 13 b
4 17 b
5 20 b
\end{filecontents}
\begin{document}

\begin{tikzpicture}
\begin{axis}[
height=8cm,
width=12cm,
grid=major,
legend pos=outer north east
]

% Make the "b" plot the first "stacked" plot
\addlegendentry{$(b-a)$}


text:
# All Questions

20 views

### Book/article with details for finding fiber modes numerically?

What is good book/article that describes in detail the basics in finding fiber modes numerically? I am interested in photonics fibers and multilayer fibers, but would like to start with hollow fiber. ...
24 views

### Optical devices for micro meter photons?

Are there all the common optical devices like beam splitters, mirrors, polarizers, fibers, etc for photons with a wavelenght in the range of micro meters? If so, how broad can the bandwidth be for ...
162 views

### Most useful maths for theoretical and mathematical physics [closed]

I am going to apply for a programme of mathematical and theoretical physics for graduate studies and I'm currently studying maths. What is a good area to do a thesis (that is to say, considerable ...
292 views

### Inertia tensor of a spherical cap

I'm trying to calculate the inertia tensor of a spherical cap (a piece of a sphere) like the one shown below. The origin (not shown) is located at the center of the whole sphere and the axes ...
93 views

### The ridge at LHC

One of the results obtained by LHC is the following diagram for p-Pb collisions: I would like to understand what is actually depicted in the figure, what should we expect based on theoretical ...
54 views

### Confinement of charged tachyons in AdS spacetime

It is well known that the negative cosmological constant of AdS spacetime can act like a confining potential. That is, in contrast to asymptotically flat spacetime, in an asymptotically AdS spacetime ...
74 views

### how safe is using the remote car toy from radiation [closed]

how safe is using the remote car toy from radiation, especially for kids, The manufacturers claiming that it will be safe, but is that 100 % safe over kids.
72 views

### Idea is to make an equipment like torch, which should emit darkness.. Is it possible? [duplicate]

Can we have any equipment as such? If light can emit form a hand held device, why not darkness
458 views

### $Q$ factor of parallel RLC circuit in series with a capacitor and resistor

I know that for parallel RLC circuits, the $Q$ factor is given by: $$Q = R \sqrt {\frac{C}{L}}$$ But now suppose it is connected in series to a resistor $R_2$ and capacitor $C_2$. Would the $Q$ ...
5k views

### Classic home experiments for an 8-year-old child

My 8-year-old daughter's school report says that she's good at understanding the basic science she's doing, but she's having trouble seeing how experimental results lead to conclusions. Specifically, ...
82 views

### Serious advice/ plan for getting into Physics/Math Grad schools of choice [closed]

I am currently studying a Bachelor of Technology in the subject "Food Technology". I have completed 2 years just now.Yes, I have been exposed to Mathematics in my first year of college studying ...
274 views

100 views

### Would white light waves act as same as monochromatic waves in double slit experiment?

Would white light waves act as same as monochromatic waves in double slit experiment? If not, what pattern would be seen on the screen?
150 views

### AM vs FM radio under bridges

I know what the difference between AM (Amplitude Modulation) and FM (Frequency Modulation) radios is. However, I noticed that when I drive under a bridge while listening to a station on AM, it just ...
70 views

### Paraxial wave equation solution?

I am looking for a worked solution to the paraxial wave equation, since most sources just say that clearly Gaussians are solutions but they do not explicitly show so. This equation is equivalent to ...
55 views

### CM: Need to recover the Hamiltonian, knowing conserved quantities and information about the EOM, possibly via action-angle coordinates

Statement of the problem: I have a system with 2 degrees of freedom and I have found two independent conserved quantities, without knowledge of the Hamiltonian. I'm looking for a method to recover a ...
50 views

257 views

### Traveling between two planets at rest to one another [duplicate]

If I travel at relativistic speed from planet A to planet B which are at rest relative to one another, I will be younger than people on A or B when I arrive. However how does this mesh with the fact ...
95 views

### Extension of an unfixed spring

Suppose a spring with spring constant 1 N m^-1 is held horizontally. If a pull of 1 N is applied to its left end and a pull of 2 N is applied to its right end, how much longer would the spring be as ...
266 views

### How to replace $T$-product with retarded commutator in LSZ formula?

I am reading Itzykson and Zuber's Quantum Field Theory book, and am unable to understand a step that is made on page 246: Here, they consider the elastic scattering of particle $A$ off particle $B$: ...
58 views

### Do the Maxwell equations yield the proper time of electromagnetic waves?

I apologize in advance for possible errors in my premises as I have no precise knowledge of Maxwell equations. Proposals for the correction or even abandon of my question are welcome. As Maxwell ...
154 views

### Is speed of light invariant in different inertial frame?

Don't get angry at me. I believe in special relativity just as any scientist would. But reading this article http://arxiv.org/abs/0708.2687 I realize that actually I haven't done any experiments on ...
2k views

### Why do I feel cold air in the shower?

Our house has a glass sliding door to the shower. The shower has the dimensions of about 2 feet wide, 5 feet long, and 6 feet high. Above the door (and shower head) there is about 1 foot of open space ...
151 views

### How to convert RGB values to physical radiometry and/or photometry quantities and back?

What are RGB values actually mean in physical sense? Are these values mean some amount of light or energy per surface unit or what? Are they logarithmic? Fro example, why do these values are ...
50 views

### Is there Phase difference between voltages at end points of a long AC Power line

I found this explanation somewhere: Since wavelength=c/freq so in a AC power line of 50 Hz, wavelength=(3*10^8)/50 = 6000 Km, so voltage phase reverses after 6000 Km in a ac Power line. Now this ...
69 views

### i can't detect what wrong have i done in a kinematics problem [closed]

a question was given to us in assignment which was as follows A person moves 20 metres towards north then 30 metres towards east and then moves 30 x 1.414 metres towards south west. The whole ...


text:
## Introduction

Just like the concept of propositions is fundamental to propositional calculus, — in fact even to predicate calculus — the concept of predicates is fundamental to predicate calculus. The whole system of predicate logic revolves around predicates.

So, in order to get the hang of predicate logic, we ought to first get the hang of predicates. Let's see what exactly are they...

## What is a predicate?

Before defining what exactly is a predicate formally, let's consider a couple of examples first.

Take a look at the following sentences:

'Python is easy.'
'JavaScript is object-oriented.'
'C++ is quite difficult.'
'Alex loves cats.'

Do you notice any similarity in all these sentences?

Well there is one. Each sentence makes an assertion regarding a given subject. In each sentence, we specify a property, a characteristic for the given subject.

Let's see some other sentences.

'Python influenced JavaScript.'
'Time is money.'
'Cake requires flour.'
'Success isn't easy.'

Now, in these sentences, we specify two objects and a relation between them. To be precise, we have a subject and an object and a propety of both of them.

In either way, there is some claim made in the sentences regarding the subject/object.

We call such a segment, of a sentence, a predicate.

A predicate is a part of a sentence that makes an assertion regarding the subject.

In other words, a predicate can be thought of as a property — an attribute — of the subject.

So coming back to all the sentences, we saw above, can you now spot the predicates in them?

Well, let's find them together. The predicates are given in blue below each sentence:

'Python is easy.'
'is easy'

'JavaScript is object-oriented.'
'is object-oriented'

'C++ is quite difficult.'
'is quite difficult'

'Alex loves cats.'
'loves cats'

This is exactly what predicates are in predicate logic.

Predicate logic views sentences in terms of assertions made regarding a subject. The assertions are referred to as predicates. The subject is also of significance, and is treated separately, as we shall see next.

In each of the sentences above, if we exclude the predicate, we are mainly left with the subject. The subject in each sentence refers to a specific entity. Note that the entity might be fictitious,but it doesn't really matter as to what is it. What matters is that we refer to specific entity.

In predicate logic, subjects that refer to specific entities are known as constants (or sometimes as inidividuals, or individual constants).

Let's suppose you have to symbolically show the following sentences.

'Python is easy.'
'Java is easy.'
'C++ is easy.'
'Ruby is easy.'
'Swift is easy.'

One straightforward way is that, for each sentence, we assign it to a separate propositional variable, as follows:

$p$:  'Python is easy.'
$q$:  'Java is easy.'
$r$:  'C++ is easy.'
$s$:  'Ruby is easy.'
$t$:  'Swift is easy.'

However, realise on important thing here...

The predicate in all the sentences is the same. Technically, we could reuse this predicate, keeping it the same, while just changing the subject, instead of denoting each one with a different propositional variable.

This is where the concept of a predicate function, or a propositional function comes to the play.

A propositional function takes a value and joins a predicate to it. Its output is a proposition.

A propositional function follows the conventional notation to denote a function in maths, i.e. $f(x)$.

Let's define a propositional function that could be used to represent each of the sentences above.

$\text{Easy(}x\text{): }$ $x$ is easy

This function is simply saying that whatever is passed to $\text{Easy}$ is used in place of $x$ in the sentence '$x$ is easy'.

So for instance, passing 'Python' into the function $\text{Easy}$, which is denoted as $\text{Easy(Python)}$ represents the statment 'Python is easy.'

The $x$ in the propositional function above is called something very familiar to all of us — a variable. On its own, the variable doesn't refer to any specific entity. In fact, it refers to nothing!

This means that $\text{Easy(}x\text{)}$ where $x$ is a variable, as is, is NOT a proposition. This is because it has no truth value. However, when we assign a value to $x$, it gets one of the truth values and hence becomes a proposition.

With all this in place, let's now symbolically define all the sentences shown above.

Although, these symbolic representation are longer than using propositional variablex, as we did before, we have however reused the predicate and prevented repetition.

As we shall see later on, this could be very useful in creating compound propositions using simpler sentences with similar predicates.

## Unary, binary and n-ary predicates

Let's reconsider one of the sentences, we saw above.

We know that Python is the subject of the sentence and 'is easy' is the predicate.

Now, precisely speaking, how many things are discussed in this sentence? In other words, how many things does the predicate talk about? Well, in this case, it just talks about one thing i.e. Python. The predicate makes a claim about just Python, that's it.

'Python is easier than Java.'

Now the predicate 'is easier than' makes claims regarding two things: Python and Java. If we suppose that our predicate is 'easier than Java' the the predicate makes a claim regarding just one thing and that is 'Python', and vice versa.

Hence, it turns out that a predicate may make a claim regarding just one thing or regarding multiple things. This distinction is useful.

A predicate that makes claim regarding one thing is called unary predicate. On the same lines, a predicate that makes a claim regarding two things is called a binary predicate. Beyond this, we call it an n-ary predicate, or an n-place predicate.

Notationally, a predicate $P$ that operates on a list of arguments ($x_1$, $x_2$, $\dots$, $x_n$) is called an n-ary, or an n-place predicate.

Some examples are shown below:

Note that we've used pretty descriptive names for the predicate function. However, you could also use a simple letter such as $P$. It is convention to represent propositional functions with uppercase letters, as opposed to representing atomic propositions using lowercase letters.

## Moving on

At this point, we are completely familiar with the notion of predicates in predicate calculus. They are properties/attributes of given subjects.

In predicate logic, we could use propositional functions to join predicates with given subjects and thus form propositions. Together, these concepts pave the foundation for first-order logic.


text:
# Vapour Liquid Equilibrium (VLE)

(Redirected from VLE)
Jump to navigation Jump to search

Navigation: Models ➔ Sub-Models ➔ Vapour Liquid Equilibrium (VLE)

## General Description

The VLE block or sub-model is used to calculate the vapour-liquid equilibrium state and adjust the fractions of these vapour and liquid species in the model or stream. The VLE sub-model is used in a number of unit models. Different models may have options to specify some of the required state variable results for the VLE calculations. The VLE block is typically used in one of these three ways:

• flash off vapour (eg flash tank, where user may specify required operating pressure or temperature)
• condense vapour (eg condensing shell & tube heater, where user may specify requirement to condense all vapour)
• adjust vapour/liquid ratio (eg pipe, where the ratio of vapour/liquid is adjusted to equilibrium for the current pressure & temperature)

Notes:

1. VLE is most commonly used for H2O (steam / water) calculations. Please see Water and Steam Properties for information about the equations used in SysCAD for H2O.
2. If the species model used includes a Boiling Point Elevation (BPE) correlation, this will be accounted for in the VLE calculations. See also Boiling Point Elevation for Std Model.
3. If other vapours are present (for example non-condensibles) then these will have an effect on the VLE and the final pressure exerted by the flash component is its 'Partial Pressure' and not the full pressure.

## Model Theory

The sub-model is used or configured to achieve vapour : liquid equilibrium at a required pressure (or temperature) using the user defined VLE method. It may also be used to fully condense all of the vapours or flash all of the liquid. At this stage only two phase flash calculations are handled in SysCAD. Any solids are ignored in the flash calculations, however the enthalpy balance does include the solids. The temperature and amount of material which changes phase is calculated using an adiabatic flash routine. The routine used depends on the VLE specified by the user.

The two broad categories of VLE theory used in SysCAD are VLE of a single species or VLE for multiple species using K values1.

### Single Component VLE

The Temperature : Pressure curves for saturated steam is automatically part of the SysCAD internal data. For other species the required data needs to be entered in the species database to allow the user to select other species for the single component VLE calculations.

The solver will attempt to obtain equilibrium between the vapour and liquor phases of water (or selected species) at the user defined flash pressure. If the unit is using the default species model, Standard, then the equilibrium point will be that of saturated steam, as found in Steam Tables.

If the unit uses a species model with an Elevated Boiling point calculation, then the equilibrium point will be adjusted to compensate for the changed boiling point.

#### Partial Pressure

The partial pressure of any species is calculated as follows:

$\mathbf{\mathit{P_a = y_a\times P_T}}$

where

Pa = partial pressure of species 'a'
ya = mole fraction of species 'a' in vapour phase
PT = total pressure of the stream

### Multiple Component VLE

In this case the model will use K values to determine the phase equilibrium at the required pressure. The K values are either specified by the user, or are the ideal values.

The basic equations that need to be solved to obtain the equilibrium point are:

• $\mathbf{\mathit{f_1(V_2T_2)=\sum_i \cfrac {z_i(1-K_i)}{1+V(K_i-1)}=0}}$
• $\mathbf{\mathit{f_1(V_2T_2)=H^F-V(H^V-H^L)-H^L=0}}$
where:
V Vapour Flow rate
T2 Temperature after flash
zi Mole fraction of component i in the Feed
Ki Vapour-Liquid equilibrium Ratio of component i.
HF Enthalpy of Feed
HV Enthalpy of Vapour fraction
HL Enthalpy of Liquid fraction

The model will use iterative techniques to solve the above equations simultaneously. If, after a large number of iterations, convergence is not achieved, the model will flag the user with a message that Vapour : Liquid equilibrium was not achieved.

References

Coker, A.K., "Equilibrium flash calculations quickly computed on PC", Oil & Gas Journal, Jan 14, 1991.

## Vapour Pressure Data

The vapour pressure data for H2O is included in SysCAD. Users can add new species to the list by following these steps:

We will use ammonia as an example:

• Edit the SysCAD Database to include both the liquid and vapour phase of ammonia.
• For NH3(g), make sure the field Vp and Tc contain valid data. (See Species Table - Vapour Pressure for further information.)
• Next, close any opened projects and edit the project configuration file to include NH3(g) and NH3(aq) in the Display List. (See Species Configuration for further information.)
• Reload the project and the ammonia should be available as a flash component.
• Choose ammonia from the VLE Tab Component droplist.

## Data Sections

Tag (Long/Short) Input / Calc Description/Calculated Variables

### Requirements

Model Single/Vapour P This option allows the user to set the vapour fraction of a single component at a fixed percentage.
Multi/Fixed K This allows the user to set the K values of the relevant components in the species list.
Multi/Ideal K's NOTE: THIS METHOD IS CURRENTLY BEING REVISED AND IMPROVED, PLEASE DO NOT USE.
State FeedBack This will display the calculation state of the block. If there are no warnings or errors this will be 'OK'.
(The following fields are only shown if Model = Single/Vapour P)
Component List The user may choose which component to flash.
Note: Only components with VLE data in the species database will be available in the drop down list. (See the ammonia example described on the top of the page.)
PrevVapFrac Input
PrevVapPress Input
BPE.Method None The Boiling Point Elevation will be set to zero in this unit.
StreamModel The Boiling Point Elevation will be calculated based on the stream model.
If the Standard Species Model is used, this will use the method defined in the Plant Model - Standard Properties Model Options, which is either None or van't Hoff. Please see Boiling Point Elevation Definition for more information on this equation.
If a Species Properties Model is detected, the BPE value will be based on the calculation defined for that Species Properties Model.
User The user may enter a value to be used for the Boiling Point Elevation in this unit. This value must be between 0 and 30°C.
VantHoff Only visible if at least one species in the project has van't Hoff constants defined in the species database. The Boiling Point Elevation will be calculated based on the van't Hoff equation and the constants entered by the user into the species database. Please see Boiling Point Elevation Definition for more information on this equation.
BPE.User Input Only visible if BPE.Method = User. The user specified Boiling Point Elevation in this unit. This value must be between 0 and 30°C.
BPE.ScaleOrOffset Tick Box Only visible if BPE.Method is NOT set to None. If this is enabled then the user may apply a scaling value to the calculated BPE value, and / or an offset. The following 2 fields will become visible if this box is ticked:
BPE.Scale Input The required scaling value to apply to the calculated BPE value. This is only applied to the BPE value in the selected unit.
BPE.Offset Input The required offset value to add to the calculated BPE value. This is only applied to the BPE value in the selected unit.
(The following fields are only shown if Model = Multi/Fixed K OR Multi/Ideal K's)
K..
XXX Input/Display The K value for component XXX. If Model = Multi/Fixed K then this is a user specified value (input). If Model = Multi/Ideal K's, then this will be a calculated value.

GridDisplay Tick Box This is a global selection, if this is selected, then where available, variables will display in a table format, if not selected, they will be listed in separate groups as a single list.

### Feed OR Product Conditions

Feed.... OR Prod...
Temperature / T Display The stream Temperature.
TotalP Display The stream Total Pressure.
PartialP Display The Partial Pressure of the flashing species (often H2O(g)) in the stream.
SatP@T Display The saturation pressure at stream temperature.
SatT@PP Display The saturation temperature at stream Partial Pressure.
SatT@P Display The saturation temperature at stream Total Pressure.
SuperHeat@PP Display The degree of super heat at stream Partial Pressure.
SuperHeat@P Display The degree of super heat at stream Total Pressure.
MassFlow / Qm Display The total mass flowrate in the stream.
VapourMassFlow / VQm Display The vapour volumetric flowrate in the stream.
VapourFrac / Vf Display The vapour fraction in the stream.
FlashVapFlow / FlashVapQm Display The flow of the flash vapour (often H2O(g)) in the stream.
FlashVapFrac Display The mass fraction of the flash vapour (often H2O(g)) in the stream.

### Results

VapFlashed.MassFlow / Qm Calc The mass of vapour flashed.
BPE Calc The boiling point elevation value used in the VLE calculation.
LiquorModel Display Displays the calculation model used for liquor properties. This may be Standard where the Standard Mass Weighted mean model is used, or it may be a different species model, such as Bayer or a client specific species model.
SatMethodUsed Display Displays the method used to calculate the mixture's saturation conditions.

## Further Notes

The following discussion relates primarily to the use of VLE (the VLEquilibrium field) in a Feeder.

### Simple Liquors

If no non-condensable gases are present, then we have a single vapor component in equilibrium with the liquor.

For the generic case (Bayer liquor, steam vapor) the vapor is actually superheated. The non-volatile components in the liquor lead to Boiling Point Elevation', so the vapor temperature is higher than the saturation temperature for pure water at that pressure.

In general the Saturated or Superheated Vapor options will be meaningless here. In some cases it may be possible to flash off all of the water from a particular liquor, but the present implementations have correlations that are pretty much meaningless when there are low levels of water (high concentrations of caustic/alumina etc in the case of Bayer liquors).

• For a given fixed temperature:
• If the pressure is greater or equal to the liquor vapor pressure, then we have pure liquid.
• If the pressure is below the liquor vapor pressure, then steam will flash off. The residual liquor will have a greater boiling point elevation (or equivalently a lower vapor pressure). Note that this is not a flash calculation: ie we keep the temperature fixed. We must adjust the composition to get the right vapor pressure at that temperature.

Whether non-condensable gases are present or not, these calculations with liquors are more complex than for the single component case, since the BPE or saturation pressure changes with composition. With only a pure component in the liquid phase, the saturation pressure is fixed.

### Simple Liquors with non-condensable gases

This situation arises in modelling Bayer liquors and other aqueous solutions. Because the partial pressure of the volatile vapor (steam in this case) must be equal to the saturation pressure, small amounts of non-condensable gases can generate large fractions of steam in the vapor phase.

If non-condensable gases are present, then some vapor will evaporate from the liquor so that the partial pressure of vapor in the non-condensable gases is equal to the vapor pressure of the liquor. Thus even if the liquor is subcooled (wrt the system pressure) there may be some fraction of vapor in the gas phase.

In practice however, we may want to have a saturated liquor together with non-condensable gases alone (without vapor). Using the Saturated_Liq options will achieve this.

### VLE Option Matrix (as used in Feeder)

Name PARAM RESULT Pure Component Liquor (with Non-volatiles) Pure Comp + non-condensable gases Liquor + NC Selectable in Operation Mode
(Available in Build 138 or later)
Off T,P - Yes* Yes* Yes* Yes* All
Saturated_Vap(T) T P, X=1 Yes No Yes No General, Vapour, Steam
Saturated_Vap(P) P T, X=1 Yes No Yes No General, Vapour, Steam
Superheated_Vap(dT,P) Degree Superheat, P X=1 Yes No Yes No General, Vapour, Steam
Superheated_Vap(T,P) T,P X=1 Yes No Yes No General, Vapour, Steam
Saturated_Liq(T) T P, X=0 Yes Yes No No General, Liquids, Slurry, Water
Saturated_Liq(P) P T, X=0 Yes Yes No No General, Liquids, Slurry, Water
Subcooled_Liq(dT,P) Degree Subcool, P X=0 Yes Yes No No General, Liquids, Slurry, Water
Subcooled_Liq(T,P) T,P X=0 Yes Yes No No General, Liquids, Slurry, Water
Saturated(X,T) T,X P Yes NI NI NI General
Saturated(X,P) P,X T Yes NI NI NI General
Saturated_NonCond(T,P) T,P X No** Yes Yes Yes General
RelativeHumidity T, P, RH X Yes Yes General
• Yes - Available and physically meaningful
• * - If VLE is off, anything goes, the resulting stream may not be in equilibrium and quality can be set arbitrarily.
• ** - Unless P=PSat(T)
• No - Not physically meaningful; should be avoided, behavior is undefined.
• NI - (Not Implemented) Possibly meaningful but not specifically implemented, undefined behaviour if used.

If you are using the VLE option, you should ensure that you choose conditions that are physically realistic. The cases flagged here are not physically achievable in true VLE conditions.

However they can still be used: just use care in interpreting the results. For example, if you are venting non-condensable gases and don't want to change the composition of the liquor (due to venting small amounts of steam as well), selecting Saturated_Liq(T) will ensure that no vapor is present.


text:
# Vapor Pressure and Antoine Constants for Hydroncarbons, and

Format: Hardcover

Language: English

Format: PDF / Kindle / ePub

Size: 11.76 MB

Being able to turn magnetism on and off, the great strength of electromagnets, and being able to vary the magnetism by varying the electrical current are characteristics of electromagnetism used in many inventions. He connected the coil to a galvanometer, and then moved a magnet back and forth inside the cylinder. Consequently, a wire with electric current running through it has an inherent magnetic force. The relationship $$\Gamma_E \propto -\partial B/\partial t$$ tells us that a changing magnetic field creates an electric field in the surrounding region of space, but the phrase “surrounding region of space” is vague, and needs to be made mathematical.

Pages: 373

Publisher: Springer; 1999 edition (May 11, 1999)

ISBN: 354064735X

Modern Theories of Many-Particle Systems in Condensed Matter Physics (Lecture Notes in Physics)

Quantum Magnetism (Lecture Notes in Physics)

High resolution NMR spectroscopy in solids

For instance, directly below a high voltage power line, the EF level may be close to, though still within safety limits while MF fields are further below limits , cited: Low Energy Neutrons and their download here luxurycharters.miami. Schroeder, Norbert. "Radio Frequency Spectrum Allocations in the United States." National Telecommunications and Information Administration. July 1, 2000. (Jan. 30, 2003). The electromagnetic spectrum consists of all the frequencies at which electromagnetic waves can occur, ordered from zero to infinity. Radio waves, visible light, and x rays are examples of electromagnetic waves at different frequencies , cited: A Book in Every Home: read here http://eatdrinkitaly.org/books/a-book-in-every-home-containing-three-subjects-eds-sweet-sixteen-domestic-and-political-views. PEMF mats are primarily advertised and distributed over the Internet, often used without medical supervision , source: Introduction to Magnetic read epub Introduction to Magnetic Materials. The form of electromagnetic radiation your eyes can detect is called visible'' or optical''. Astronomers have only recently (within the past few decades) been able to use the other forms of electromagnetic radiation or light. Every time technology has been developed to detect another form of light, a revolution in our understanding of the universe has occurred , e.g. Earth Magnetism: A Guided Tour download for free Earth Magnetism: A Guided Tour through. If these processes occur in living tissue, the photoelectrons emitted from the organic molecules destroy the cells of the tissue ref.: Physical and Chemical Properties of the Air / Physikalische und chemische Eigenschaften der Luft (Landolt-Börnstein: Numerical Data and Functional Relationships in Science and Technology - New Series) Physical and Chemical Properties of the. This instrument, however, was used only to send alphabetical and numerical characters, not the Chappe symbols. The long regulator was horizontal, and only the two indicator arms rotated, each taking seven positions. It was essentially two telegraphs in one, and required two wires, in addition to the earth return Introduction to Magnetic read online www.gastrotarget.de. We felt that it would be useful and fun to be able to quickly carry out the computations illustrating various waves and antenna applications, and have included enough MATLAB code in each example (but skipping all figure annotations) that would enable the reader to reproduce the results , source: Physics 6C Notes: Electricity, download here http://eatdrinkitaly.org/books/physics-6-c-notes-electricity-magnetism-and-transport.

Pierre Pèlerin de Maricourt (presumably his proper french name) a.k.a. Petrus Peregrinus de Maharncuria (his latin title, which means "Peter the Pilgrim of Maricourt"). Peter wrote what is commonly known as the Epistole de Magnete or Letter on the Magnet. It's full title is Epistola Petri Peregrini de Maricourt ad Sygerum de Foucaucourt, militem, de magnete (Letter on the Magnet of Peter Peregrinus of Maricourt to Sygerus of Foucaucourt, Soldier") Handbook of High -Temperature Superconductivity: Theory and Experiment http://eatdrinkitaly.org/books/handbook-of-high-temperature-superconductivity-theory-and-experiment. There were regular telegraph schools in large cities, where the demand for operators was greatest. Individual operators sometimes affected certain syncopations that gave them a recognizable "fist," but this was bad practice, though irresistible to a certain type of person. The best code was perfect code, since it could be universally understood, like good pronunciation in speech , source: Fluctuations, Information, Gravity and the Quantum Potential (Fundamental Theories of Physics) http://demos.webicode.com/freebooks/fluctuations-information-gravity-and-the-quantum-potential-fundamental-theories-of-physics. We can get some guidance from the example of a car's alternator (which just means generator), referred to in the self-check on page 691 Theory of Itinerant Electron read here http://totalkneereplacementrecovery.net/library/theory-of-itinerant-electron-magnetism-international-series-of-monographs-on-physics.

Surface Plasmon Nanophotonics (Springer Series in Optical Sciences)

The Scientific Satellite Programme during the International Magnetospheric Study: Proceedings of the 10th ESLAB Symposium, Held at Vienna, Austria, ... 1975 (Astrophysics and Space Science Library)

Magnetic Phase Transitions: Proceedings of a Summer School at the Ettore Majorana Centre, Erice, Italy, 1-15 July, 1983 (Springer Series in Solid-State Sciences)

Microwave Propagation in Ferrimagnetics

High Pressure NMR (NMR Basic Principles and Progress)

Second-Generation HTS Conductors

Compass: A Story of Exploration and Innovation

Conjugated Conducting Polymers (Springer Series in Solid-State Sciences)

Magnetism: Lectures delivered before the Manchester and District Branch of the Institute of Physics on 1st and 2nd July 1937.

Analysis of Gravitational-Wave Data (Cambridge Monographs on Particle Physics, Nuclear Physics and Cosmology)

Electronic Structure and Magnetism of 3d-Transition Metal Pnictides (Springer Series in Materials Science) (Volume 131)

Principles of Magnetohydrodynamics: With Applications to Laboratory and Astrophysical Plasmas

Understanding Magnetic Resonance Imaging

Advances in Polaron Physics (Springer Series in Solid-State Sciences) (Volume 159)

Physics of II-VI and I-VII Compounds, Semimagnetic Semiconductors / Physik der II-VI und I-VII-Verbindungen, semimagnetische Halbleiter Elemente ... in Science and Technology - New Series)

Applied Electromagnetism and Materials

Proceedings of the Seventh Conference on Magnetism and Magnetic Materials


text:
• # question_answer Three blocks ${{B}_{1}},$ ${{B}_{2}}$ and ${{B}_{3}}$ are to inserted in cannel of width S maintaining a minimum gap of width $T=0.125\,\,m,$ as shown in figure. For $=\,18.75\pm 0.08\,;\,Q=25.00\pm 0.12\,;\,R=28.125\pm 0.1$and $S=72.35+X,$ (where all dimensions are in mm), the tolerance X is: A) $+0.38$                      B) $-\,0.38$C) $+0.05$                      D) $-\,0.05$

Tolerance build up, $P+Q+R+T=(18.75\pm 0.08)+(25.00\pm 0.12)+$ $(28.125\pm 0.10)+0.125$ $=72.000\pm 0.30$ $72.35+X=72.00\pm 0.30$ $X=72.30-72.35=-\,0.05\,mm$


text:
# Specific absorption rate

SAR is the abbreviation for the specific absorption rate and a measure of the absorption of electromagnetic fields in a material. It always leads to its heating . The specific absorption rate is expressed as power per mass in units of W / kg .

## determination

The specific absorption rate can be calculated from

1. the field strength in the tissue: ${\ displaystyle \ mathrm {SAR} = {\ frac {1} {2}} {\ frac {\ sigma | {\ vec {E}} | ^ {2}} {\ rho}}}$
2. the current density in the tissue: ${\ displaystyle \ mathrm {SAR} = {\ frac {1} {2}} {\ frac {J ^ {2}} {\ rho \ sigma}}}$
3. the temperature increase in the tissue: ${\ displaystyle \ mathrm {SAR} = c_ {i} {\ frac {dT} {dt}}}$

there is:

E = electric field strength ([ E ] = V / m ) at a point inside a body to be measured (e.g. measuring phantom).
J = current density ([ J ] = A / ), caused by the magnetic and electric fields. (The limit value of the current density for skilled workers is, for example, 10 mA / m². For normal people, 2 mA / m².)
ρ = density of the fabric ([ ρ ] = kg / )
σ = electrical conductivity of the tissue ([σ] = S / m )
c i = specific heat capacity of the tissue ([ c i ] = J / kg K )
dT / dt = time derivative of tissue temperature ([ dT / dt ] = K / s )

## Cellular area

A SAR value is often given for cell phones . With modern devices, this is approximately between 0.10 and 1.99 W / kg. The lower the SAR value, the less the tissue is heated by the radiation. The recommended upper limit of the World Health Organization is 2.0 W / kg. In the past, the SAR value for mobile phones was determined by manufacturers under inconsistent conditions, which made it unreliable. A European standard ( EN 50361) has existed since autumn 2001 , which precisely defines the measurement conditions. In March 2007, EN 50361 was replaced by EN 62209-1.

A maximum SAR value of 0.5 W / kg when used on the ear and 1.0 W / kg when used on the body is permitted for labeling a mobile phone with the blue angel . A maximum SAR value of 0.8 W / kg is permitted for labeling with the TCO '01 Mobile Phone logo.

The SAR value for mobile phones is given for the maximum transmission power . Due to the power regulation , however, a smaller SAR value usually occurs during operation, which depends on the respective cellular network . In well-developed networks with a high density of transmission masts , the mobile phone usually transmits with significantly lower transmission power than in poorly developed networks. As a result, exposure when making calls is also lower in areas with a high density of transmission towers than in areas with a low density of transmission towers. Staying in vehicles and buildings (especially those made of reinforced concrete ), on the other hand, increases the required transmission power. The power levels of standard GSM mobile phones are between 1 and 2000 mW depending on the reception situation and generate permissible SAR values within this range.

## Other technically relevant areas

Other areas where SAR values are relevant:


text:
## New ICFP functional pearl on subtracting bijections

Kenny Foner and I have a paper accepted to ICFP on subtracting bijections. Here’s the basic problem: suppose you have a bijection $h$ between two sum types, $h : A + B \leftrightarrow A' +B'$, and another bijection $g : B \leftrightarrow B'$. Of course $A$ and $A'$ must have the same size, but can you construct an actual bijection $f$ between $A$ and $A'$?

This problem and its solution has been well-studied in the context of combinatorics; we were wondering what additional insight could be gained from a higher-level functional approach. You can get a preprint here.

## Ertugrul Söylemez: 1985-2018

I do not know many details, but IRC user mupf joined the #haskell-ops channel yesterday to tell us that Ertugrul Söylemez died unexpectedly on May 12. This is a great loss for the Haskell community. Going variously by mm_freak, ertes, ertesx or ertes-w, Ertugrul has been very active on the #haskell IRC channel for almost 11 years—since June 2007—and he will be remembered as a knowledgeable, generous, and patient teacher. In addition to teaching on IRC, he wrote several tutorials, such as this one on foldr and this one on monoids. The thing Ertugrul was probably most well-known for in the Haskell community was his netwire FRP package, which he had developed since 2011, and more recently its successor package wires. I think it is no exaggeration to say that his work on and insights into FRP helped shape a whole generation of approaches.

He will be greatly missed. I will leave the comments open for anyone to share memories of Ertugrul, his writing, or his code.

Posted in haskell, meta | Tagged , , , , | 4 Comments

## Future of Coding podcast interview

I recently did an interview with my friend and former student Steve Krouse for his Future of Coding podcast. I think I still agree with almost everything I said, and I didn’t say anything too embarrassing, so if you want to listen to it I won’t stop you! We chatted about teaching and learning, functional programming and type systems, how to read academic papers, and a bunch of other things. You can listen to it here.

## Apply to attend the Oregon Programming Languages Summer School!

Although the official deadline has passed, I hear there are still a few spots left for the Oregon Programming Languages Summer School (OPLSS), hosted at the University of Oregon in Eugene. This is a really fantastic opportunity to take a deep dive in programming languages and type theory. I attended as a graduate student and although it was overwhelming at times—like drinking from a fire hose!—it was a wonderful experience. I made some great friends and learned a ton (I still occasionally refer back to my notes!). Eugene is also beautiful in the summer (I have fond memories of going geocaching in a nearby park).

The main summer school (July 9–21) has a focus on parallelism and concurrency, but for those with less background, there is also a one-week introduction on the foundations of programming languages (July 3–8). If you want, you can actually choose to attend only the July 3–8 session (or both, or just July 9–21 of course). Attending just the introductory session could be a great option for someone who knows some functional programming but wants a more solid grounding in the underlying theory.

If you’re a member of the Haskell/FP community who is thinking of applying, and I’m familiar with you or your work, I would be happy to write you a recommendation if you need one.

## Conversations with a six-year-old on functional programming

My six-year-old son walked up to me yesterday. “What are you reading?”

At the time, I was reading part of Janis Voigtländer’s habilitation thesis. Unsure where to even start, I decided to just answer straightforwardly: “I’m reading a very long story about free theorems.”

He persisted. “What are free theorems?”

Never one to shrink from a pedagogical challenge, I thought for a moment, then began: “Do you know what a function is?” He didn’t. “A function is like a machine where you put something in one end and something comes out the other end. For example, maybe you put a number in, and the number that is one bigger comes out. So if you put in three, four comes out, or if you put in six, seven comes out.” This clearly made sense to him, so I continued, “The type of a function machine tells you what kinds of things you put in and what kinds of things come out. So maybe you put a number in and get a number out. Or maybe you put in a list of numbers and get a number out.” He interrupted excitedly, “Or maybe you could put words in??” “Yes, exactly! Maybe you can put words in and get words out. Or maybe there is a function machine where you put other function machines in and get function machines out!” He gasped in astonishment at the idea of putting function machines into function machines.

“So,” I concluded, “a free theorem is when you can say something that is always true about a function machine if you only know its type, but you don’t know anything about what it does on the inside.” This seemed a bit beyond him (and to be fair, free theorems are only interesting when polymorphism is involved which I definitely didn’t want to go into). But the whole conversation had given me a different idea.

“Hey, I have a good idea for a game,” I said. “It’s called the function machine game. I will think of a function machine. You tell me things to put into the function machine, and I will tell you what comes out. Then you have to guess what the function machine does.” He immediately liked this game and it has been a huge hit; he wants to play it all the time. We played it while driving to a party yesterday, and we played it this morning while I was in the shower. So far, he has correctly guessed:

• $\lambda x.\, x + 1$
• $\lambda x.\, x - 3$
• $\lambda x.\, 10x$
• $\lambda x.\, 2x$
• $\lambda x.\, 6$
• $\lambda w\!:\!\text{English noun}.\, \text{plural}(w)$
• $\lambda x.\, 10 \lfloor x/10 \rfloor$

I tried $\lambda x.\, \min(x+2,10)$ but that was a bit tough for him. I realized that in some cases he may understand intuitively what the function does but have trouble expressing it in words (this was also a problem with $\lambda x.\, 10 \lfloor x/10 \rfloor$), so we started using the obvious variant where once the guesser thinks they know what the function does, the players switch roles and the person who came up with function specifies some inputs in order to test whether the guesser is able to produce the correct outputs.

$\lambda x.\, 6$ was also surprisingly difficult for him to guess (though he did get it right eventually). I think he was just stuck on the idea of the function doing something arithmetical to the input, and was having trouble coming up with some sort of arithmetic procedure which would result in $6$ no matter what you put in! It simply hadn’t occurred to him that the machine might not care about the input. (Interestingly, many students in my functional programming class this semester were also confused by constant functions when we were learning about the lambda calculus; they really wanted to substitute the input somewhere and were upset/confused by the fact that the bound variable did not occur in the body at all!)

After a few rounds of guessing my functions, he wanted to come up with his own functions for me to guess (as I knew he would). Sometimes his functions are great and sometimes they don’t make sense (usually because his idea of what the function does changes over time, which of course he, in all sincerity, denies), but it’s fun either way. And after he finally understood $\lambda x. \min(x+2, 10)$, he came up with his own function which was something like

$\lambda x:\mathbb{N}. \begin{cases} 10 - x & x \leq 10 \\ 10 & \text{otherwise} \end{cases}$

inspired, I think, by his kindergarten class where they were learning about pairs of numbers that added up to $10$.

Definitely one of my better parenting days.

Posted in teaching | Tagged , , , , , | 69 Comments

## Call for submissions: FARM 2018

I’m the general chair this year for the ACM SIGPLAN International Workshop on Functional Art, Music, Modelling and Design (better known as FARM), which will be colocated with ICFP this September in St. Louis, Missouri, USA. The goal of the workshop is to “gather together people who are harnessing functional techniques in the pursuit of creativity and expression”. For me (and I think for many others as well), FARM, including the associated performance evening, is always one of the highlights of ICFP.

Please consider submitting something! As in previous years, we are accepting a wide range of types of submissions. Paper and demo submissions are due by June 28: you can submit original research, a technology tutorial, a call for collaboration, or propose some sort of live demo. In addition, we also solicit performances to be given during the associated performance evening—performance proposals are due by July 8.

See the website for more info, and let me know if you have any questions!

Posted in meta | Tagged , , , , , , , | 3 Comments

## Parametricity for Bifunctor

I’ve begun work to add Bifunctor, Bifoldable, and Bitraversable to the Typeclassopedia. While thinking and writing about Bifunctor I ended up proving some “folklore” results for my own satisfaction, and decided someone might possibly find it useful if I formally record the proofs here.

## Bifunctor and its laws

The Bifunctor type class governs types of kind * -> * -> * which are (covariantly) functorial in both type arguments; that is, we can map over the two type arguments independently:

class Bifunctor (p :: * -> * -> *) where
bimap  :: (a -> b) -> (c -> d) -> p a c -> p b d

first  :: (a -> b) -> p a c -> p b c
second :: (b -> c) -> p a b -> p a c

bimap allows mapping over both type arguments simultaneously, for example, bimap toUpper (+1) ('j', 3) = ('J',4). first and second allow mapping over only one or the other. Note that bimap can be implemented in terms of first and second, or first and second in terms of bimap (we’ll see what these implementations are later, or you can work them out as an easy exercise if you haven’t seen them before).

Instances of Bifunctor should satisfy some laws, which are straightforward analogues of the laws for Functor instances:

bimap id id = id                                (IB)
bimap (f . g) (h . i) = bimap f h . bimap g i   (CB)

first id = id                                   (IF)
first (f . g) = first f . first g               (CF)

second id = id                                  (IS)
second (f . g) = second f . second g            (CS)

So far so good. But there is an additional law relating bimap, first, and second:

bimap f g = first f . second g                  (BFS)

When I first read this law, it gave me pause: unlike the other laws, there seems to be some arbitrary asymmetry here. What about the symmetric law BFS2?

bimap f g = second g . first f                  (BFS2)

Intuitively, the order in which we perform first f and second g should not make any difference, since they cannot interact with each other in any way; the a values and b values in an arbitrary p a b structure have to be distinct. That is, intuitively, if (BFS) holds, then (BFS2) should hold as well, and I wondered whether it is possible to formally derive this fact.

Let us note first that if one defines a Bifunctor instance by defining bimap alone, then first and second receive default definitions:

first  f = bimap f id
second g = bimap id g

In this case, assuming that bimap satisfies its composition law (CB), we can see that

  first f . second g
= bimap f id . bimap id g
= bimap (f . id) (id . g)
= bimap f g
= bimap (id . f) (g . id)
= bimap id g . bimap f id
= second g . first f

So when bimap alone is defined and satisfies (CB), both (BFS) and (BFS2) hold automatically. Let’s now consider the situation where first and second are defined, and bimap acquires its default definition of bimap f g = first f . second g (which is just (BFS))—or we can assume that all three of first, second, and bimap are defined, as long as law (BFS) still holds. In this case, can we derive (BFS2) as well?

## Parametricity for Bifunctor

We can derive parametricity, aka a free theorem, for any function with the type of bimap. Let p :: * -> * -> * be some two-argument type. In order to even express parametricity for types involving p, we have to assume that p is functorial—that is, we assume the existence of a function

BIMAP :: (a -> b) -> (c -> d) -> p a c -> p b d

satisfying (IB). (As with Functor, (IB) + parametricity is enough to imply that it must satisfy (CB) as well.) We write BIMAP in all caps to indicate that it is some canonical, Platonic function, handed down from on high, inherent to the very essence of p. (Something like that.) Now let us suppose that we mortals have written some function bimap with the same type as BIMAP, which also satisfies (IB). But we don’t make any assumptions about whether our bimap is the same function as BIMAP; we only assume that it has type (a -> b) -> (c -> d) -> p a c -> p b d and satisfies (IB).

We can now take the polymorphic type of bimap and turn the crank to derive a statement of parametricity. I’m assuming some familiarity with this process; for details, see Wadler’s paper. If you don’t care about the details of the derivation, you can just skip to the final statement of parametricity at the end of this section, and then proceed to see how it is applied in the next.

Parametricity for bimap says that if we interpret its type as a relation (according to certain rules), then (bimap, bimap) will be a member of the relation, that is, bimap will be related to itself. Below I show the process of expanding out the definition of the relation corresponding to bimap’s type. (I don’t want to take the time to typeset it really nicely using LaTeX or anything like that; a slightly cleaned-up text version will do for now.) I use @a to denote explicit type application, but after the second step I leave type application implicit to reduce clutter.

(bimap,bimap) ∈ ∀ a b c d. (a -> b) -> (c -> d) -> p a c -> p b d

<=>

∀ Q :: a <-> a', R :: b <-> b', S :: c <-> c', T :: d <-> d'.
(bimap @a @b @c @d, bimap @a' @b' @c' @d')
∈ (Q -> R) -> (S -> T) -> p Q S -> p R T

<=>

∀ Q :: a <-> a', R :: b <-> b', S :: c <-> c', T :: d <-> d'.
∀ (g,g') ∈ (Q -> R).
∀ (h,h') ∈ (S -> T).
∀ (x,x') ∈ p Q S.
(bimap g h x, bimap g' h' x') ∈ p R T

<=>

∀ Q :: a <-> a', R :: b <-> b', S :: c <-> c', T :: d <-> d'.
∀ (g,g'). (∀ (y,y') ∈ Q. (g y, g' y') ∈ R) ->
∀ (h,h'). (∀ (z,z') ∈ S. (h z, h' z') ∈ T) ->
∀ (x,x') ∈ p Q S.
(bimap g h x, bimap g' h' x') ∈ p R T

At this point, we don’t need the extra generality afforded by assuming everything is a relation, so we specialize all the relations in sight to functions. For example, the relation Q :: a <-> a' just becomes a function q :: a -> a'; statements of relatedness, such as (y,y') ∈ Q, turn into equations like q y = y'.

∀ q :: a -> a', r :: b -> b', s :: c -> c', t :: d -> d'.
∀ (g,g'). (∀ (y,y'). q y = y' -> r (g y) = g' y') ->
∀ (h,h'). (∀ (z,z'). s z = z' -> t (h z) = h' z') ->
∀ (x,x') ∈ p q s.
(bimap g h x, bimap g' h' x') ∈ p r t

We now have to interpret p q s and p r t as relations. Wadler’s original paper doesn’t really cover this; it only talks about the specific case of the list functor. However, reading between the lines (and consulting subsequent work on parametricity), we can see that the right way to do this is

(a,b) ∈ p f g <=> BIMAP f g a = b

That is, we interpret the type p as the relation corresponding to its BIMAP function. Hence, we now have

∀ q :: a -> a', r :: b -> b', s :: c -> c', t :: d -> d'.
∀ (g,g'). (∀ (y,y'). q y = y' -> r (g y) = g' y') ->
∀ (h,h'). (∀ (z,z'). s z = z' -> t (h z) = h' z') ->
∀ (x,x'). (BIMAP q s x = x') ->
BIMAP r t (bimap g h x) = bimap g' h' x'

Finally, we can simplify this by substituting equals for equals in a few places:

∀ q :: a -> a', r :: b -> b', s :: c -> c', t :: d -> d'.
∀ (g,g'). (∀ (y,y'). r (g y) = g' (q y)) ->
∀ (h,h'). (∀ (z,z'). t (h z) = h' (s z)) ->
∀ (x,x').
BIMAP r t (bimap g h x) = bimap g' h' (BIMAP q s x)       (PAR)

This is the specific statement of parametricity for bimap that we will use to derive the results below.

## Uniquness of bimap

Let’s first prove that bimap is unique—that is, anything with the type of bimap must in fact be equal to BIMAP. The name of the game is just to pick appropriate values for all those quantified variables in (PAR). In particular, let’s pick

• g = h = q = s = id,
• r = g', and
• t = h'.

We have some conditions to check:

• (∀ (y,y'). r (g y) = g' (q y)) under our choices becomes (∀ (y,y'). r (id y) = r (id y)) which is obviously true.
• Likewise, (∀ (z,z'). t (h z) = h' (s z)) becomes (∀ (z,z'). t (id z) = t (id z)) which is also obviously true.

We then get to conclude that ∀ (x,x'). BIMAP r t (bimap g h x) = bimap g' h' (BIMAP q s x), which is equivalent to

∀ (x,x'). BIMAP r t (bimap g h x) = bimap g' h' (BIMAP q s x)

<=>

BIMAP r t . bimap g h = bimap g' h' . BIMAP q s

<=>

BIMAP r t . bimap id id = bimap r t . BIMAP id id

Since we have assumed that both BIMAP and bimap satisfy the id law, this is equivalent to BIMAP r t = bimap r t, so bimap and BIMAP coincide (r and t were arbitrary).

## first and second commute

Finally, let’s prove that first and second commute. We will again use (PAR), but with different choices:

• g = g' = t = s = id
• h = h'
• q = r

Let’s check the conditions:

• We have to check(∀ (y,y'). r (g y) = g' (q y)), which becomes (∀ (y,y'). r (id y) = id (r y)), which is true since both sides reduce to r y.
• Likewise, (∀ (z,z'). t (h z) = h' (s z)) becomes (∀ (z,z'). id (h z) = h (id z)) which is true by similar reasoning.

Hence, we may conclude that BIMAP r t (bimap g h x) = bimap g' h' (BIMAP q s x), which is equivalent to

BIMAP r id . bimap id h = bimap id h . BIMAP r id

We can simplify this further using a few assumptions: first, we already showed that BIMAP = bimap. Second, since we are assuming (BFS), that is, bimap f g = first f . second g, setting f or g to id shows that bimap f id = first f . second id = first f . id = first f (by the id law for second), and likewise bimap id g = second g. Hence the equation becomes

first r . second h = second h . first r

And voila!

One can also show that the id laws plus parametricity together imply the composition laws—I will leave that as an exercise. (Hint: make appropriate choices for g', h', q, and s.)


text:
MathSciNet bibliographic data MR184234 55.60 (57.55) Hamstrom, Mary-Elizabeth Homotopy properties of the space of homeomorphisms on \$P\sp{2}\$$P\sp{2}$ and the Klein bottle. Trans. Amer. Math. Soc. 120 1965 37–45. Article

For users without a MathSciNet license , Relay Station allows linking from MR numbers in online mathematical literature directly to electronic journals and original articles. Subscribers receive the added value of full MathSciNet reviews.