text:
5.243. max_n

 DESCRIPTION LINKS GRAPH
Origin
Constraint

$\mathrm{𝚖𝚊𝚡}_𝚗\left(\mathrm{𝙼𝙰𝚇},\mathrm{𝚁𝙰𝙽𝙺},\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\right)$

Arguments
 $\mathrm{𝙼𝙰𝚇}$ $\mathrm{𝚍𝚟𝚊𝚛}$ $\mathrm{𝚁𝙰𝙽𝙺}$ $\mathrm{𝚒𝚗𝚝}$ $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}$ $\mathrm{𝚌𝚘𝚕𝚕𝚎𝚌𝚝𝚒𝚘𝚗}\left(\mathrm{𝚟𝚊𝚛}-\mathrm{𝚍𝚟𝚊𝚛}\right)$
Restrictions
 $\mathrm{𝚁𝙰𝙽𝙺}\ge 0$ $\mathrm{𝚁𝙰𝙽𝙺}<|\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}|$ $|\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}|>0$ $\mathrm{𝚛𝚎𝚚𝚞𝚒𝚛𝚎𝚍}$$\left(\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂},\mathrm{𝚟𝚊𝚛}\right)$
Purpose

$\mathrm{𝙼𝙰𝚇}$ is the maximum value of rank $\mathrm{𝚁𝙰𝙽𝙺}$ (i.e., the ${\mathrm{𝚁𝙰𝙽𝙺}}^{th}$ largest distinct value, identical values are merged) of the collection of domain variables $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}$. The maximum value has rank 0.

Example
$\left(6,1,〈3,1,7,1,6〉\right)$

The $\mathrm{𝚖𝚊𝚡}_𝚗$ constraint holds since its first argument $\mathrm{𝙼𝙰𝚇}=6$ is fixed to the second (i.e., $\mathrm{𝚁𝙰𝙽𝙺}+1$) largest distinct value of the collection $〈3,1,7,1,6〉$.

Typical
 $\mathrm{𝚁𝙰𝙽𝙺}>0$ $\mathrm{𝚁𝙰𝙽𝙺}<3$ $|\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}|>1$ $\mathrm{𝚛𝚊𝚗𝚐𝚎}$$\left(\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}.\mathrm{𝚟𝚊𝚛}\right)>1$
Symmetries
• Items of $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}$ are permutable.

• One and the same constant can be added to $\mathrm{𝙼𝙰𝚇}$ as well as to the $\mathrm{𝚟𝚊𝚛}$ attribute of all items of $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}$.

Arg. properties

Functional dependency: $\mathrm{𝙼𝙰𝚇}$ determined by $\mathrm{𝚁𝙰𝙽𝙺}$ and $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}$.

Algorithm
Reformulation

The constraint $\mathrm{𝚊𝚖𝚘𝚗𝚐}_\mathrm{𝚟𝚊𝚛}$$\left(1,〈\mathrm{𝙼𝙰𝚇}〉,\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\right)$ enforces $\mathrm{𝙼𝙰𝚇}$ to be assigned one of the values of $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}$. The constraint $\mathrm{𝚗𝚟𝚊𝚕𝚞𝚎}$$\left(\mathrm{𝙽𝚅𝙰𝙻},\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\right)$ provides a hand on the number of distinct values assigned to the variables of $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}$. By associating to each variable ${V}_{i}$ $\left(i\in \left[1,|\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}|\right]\right)$ of the $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}$ collection a rank variable ${R}_{i}\in \left[0,|\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}|-1\right]$ with the reified constraint ${R}_{i}=\mathrm{𝚁𝙰𝙽𝙺}⇔{V}_{i}=\mathrm{𝙼𝙰𝚇}$, the inequality ${R}_{i}<\mathrm{𝙽𝚅𝙰𝙻}$, and by creating for each pair of variables ${V}_{i},{V}_{j}$ $\left(i,j the reified constraints

${V}_{i}>{V}_{j}⇔{R}_{i}<{R}_{j}$,

${V}_{i}={V}_{j}⇔{R}_{i}={R}_{j}$,

${V}_{i}<{V}_{j}⇔{R}_{i}>{R}_{j}$,

one can reformulate the $\mathrm{𝚖𝚊𝚡}_𝚗$ constraint in term of $3·\frac{|\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}|·\left(|\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}|-1\right)}{2}+1$ reified constraints.

See also

generalisation: $\mathrm{𝚖𝚊𝚡𝚒𝚖𝚞𝚖}$ (absolute maximum replaced by maximum or order $𝚗$).

Keywords
Arc input(s)

$\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}$

Arc generator
$\mathrm{𝐶𝐿𝐼𝑄𝑈𝐸}$$↦\mathrm{𝚌𝚘𝚕𝚕𝚎𝚌𝚝𝚒𝚘𝚗}\left(\mathrm{𝚟𝚊𝚛𝚒𝚊𝚋𝚕𝚎𝚜}\mathtt{1},\mathrm{𝚟𝚊𝚛𝚒𝚊𝚋𝚕𝚎𝚜}\mathtt{2}\right)$

Arc arity
Arc constraint(s)
$\bigvee \left(\begin{array}{c}\mathrm{𝚟𝚊𝚛𝚒𝚊𝚋𝚕𝚎𝚜}\mathtt{1}.\mathrm{𝚔𝚎𝚢}=\mathrm{𝚟𝚊𝚛𝚒𝚊𝚋𝚕𝚎𝚜}\mathtt{2}.\mathrm{𝚔𝚎𝚢},\hfill \\ \mathrm{𝚟𝚊𝚛𝚒𝚊𝚋𝚕𝚎𝚜}\mathtt{1}.\mathrm{𝚟𝚊𝚛}>\mathrm{𝚟𝚊𝚛𝚒𝚊𝚋𝚕𝚎𝚜}\mathtt{2}.\mathrm{𝚟𝚊𝚛}\hfill \end{array}\right)$
Graph property(ies)
$\mathrm{𝐎𝐑𝐃𝐄𝐑}$$\left(\mathrm{𝚁𝙰𝙽𝙺},\mathrm{𝙼𝙸𝙽𝙸𝙽𝚃},\mathrm{𝚟𝚊𝚛}\right)=\mathrm{𝙼𝙰𝚇}$

Graph model

Parts (A) and (B) of Figure 5.243.1 respectively show the initial and final graph associated with the Example slot. Since we use the $\mathrm{𝐎𝐑𝐃𝐄𝐑}$ graph property, the vertex of rank 1 (without considering the loops) of the final graph is outlined with a thick circle.


text:
# Universal Property of Direct Sum of Modules

## Theorem

Let $R$ be a ring.

Let $N$ be an $R$-module.

Let $\left({M_i}\right)_{i \mathop \in I}$ be a family of $R$-modules.

Let $M = \displaystyle \bigoplus_{i \mathop \in I} M_i$ be their direct sum.

Let $\left({\psi_i}\right)_{i \mathop \in I}$ be a family of $R$-module morphisms $M_i \to N$.

Then there exists a unique morphism:

$\Psi: M \to N$

such that:

$\forall i: \psi_i = \Psi \circ \iota_i$

where $\iota_i: M_i \to M$ is the $i$th canonical injection.

format: plain


text:
# \vec{x} but with arrow from right to left?

I have two variables: \vec{x} and another one which is somehow dual to the first. Therefore I would like to symbolize the second with something similar but a leftarrow on top of the x. I already tried \stackrel{leftarrwo}{x} but it looks to different (too big gap between x and the arrow, and too big arrow).

Is there a way to define a \cev command which does what I want?

This may not be the best way, but two \reflectbox commands will do the trick:

\documentclass{article}
\usepackage{graphicx}
\newcommand{\cev}[1]{\reflectbox{\ensuremath{\vec{\reflectbox{\ensuremath{#1}}}}}}
\begin{document}
$\vec{a} \quad \cev{a} \quad \vec{b} \quad \cev{b}$
\end{document}

• Thanks, but this causes problems with subscripts: Example On the right hand side the t is marked using \cev{t_{\mathring{r}}} and s is marked using \cev{s}_{\mathring{r}} I'd like to have the arrow centered over the whole symbol (including subscript) as it is in the case of t on the left. – C-Otto May 26 '14 at 7:26
• In your example, the arrow over the t on the left does not appear to be centred over the whole symbol including the superscript to me. On the other hand, \cev{t_{\mathring{r}}} seems to give exactly what you want. – Ian Thompson May 26 '14 at 11:25
• \cev{t_{\mathring{r}}} is shown on the right. And \cev{t_r} is shown on the left, where the arrow is a bit more centered than in the case of \cev{t}_r. I'm happy with the looks on the left side, but the right side obviously is wrong. – C-Otto May 26 '14 at 15:09
• This could be a problem with the font you are using; the result of \cev{t_{\mathring{r}}} on my machine looks nothing like yours! Please post a new question with a complete example code that reproduces the problem. – Ian Thompson May 27 '14 at 7:41

A \cev command that seems to give good results on most letters and works correctly (apart a very small drift) in subscripts and superscripts.

\documentclass{article}
\usepackage{graphicx,accents}

\makeatletter
\DeclareRobustCommand{\cev}[1]{%
\mathpalette\do@cev{#1}%
}
\newcommand{\do@cev}[2]{%
\fix@cev{#1}{+}%
\reflectbox{$\m@th#1\vec{\reflectbox{$\fix@cev{#1}{-}\m@th#1#2\fix@cev{#1}{+}$}}$}%
\fix@cev{#1}{-}%
}
\newcommand{\fix@cev}[2]{%
\ifx#1\displaystyle
\mkern#23mu
\else
\ifx#1\textstyle
\mkern#23mu
\else
\ifx#1\scriptstyle
\mkern#22mu
\else
\mkern#22mu
\fi
\fi
\fi
}

\makeatother

\begin{document}
$Xx$

$X\cev{x}_{\cev{x}_{\cev{x}}}$ $\cev{a}\cev{b}\cev{m}\cev{X}$

$X\vec{x}_{\vec{x}_{\vec{x}}}$ $\vec{a}\vec{b}\vec{m}\vec{X}$

$\cev{\imath}$

$\vec{\imath}$
\end{document}

A different implementation:

\documentclass{article}
\usepackage{graphicx}

\makeatletter
\DeclareRobustCommand{\cev}[1]{%
{\mathpalette\do@cev{#1}}%
}
\newcommand{\do@cev}[2]{%
\vbox{\offinterlineskip
\sbox\z@{$\m@th#1 x$}%
\ialign{##\cr
\hidewidth\reflectbox{$\m@th#1\vec{}\mkern4mu$}\hidewidth\cr
\noalign{\kern-\ht\z@}
$\m@th#1#2$\cr
}%
}%
}
\makeatother

\begin{document}
$Xx$

$X\cev{x}_{\cev{x}_{\cev{x}}}$ $\cev{a}\cev{b}\cev{m}\cev{X}$

$X\vec{x}_{\vec{x}_{\vec{x}}}$ $\vec{a}\vec{b}\vec{m}\vec{X}$

$\cev{\imath}$

$\vec{\imath}$

$\cev{\sigma}\cev{x}$
$\vec{\sigma}\vec{x}$
\end{document}

• Can the arrow be rotated instead of reflected to have the correct slanting? Now, the \cev arrow slants to the left, while the \vec arrow (as well as the italic letter) slants to the right. – Qrrbrbirlbel May 17 '15 at 0:21
• @Qrrbrbirlbel That's more difficult. – egreg May 17 '15 at 9:13
• @user49915 I get picture (click), which doesn't show so big a difference with \cev{x} – egreg Dec 1 '18 at 15:09
• @user49915 Maybe you want to try the different implementation I added, maybe fixing the amount of \mkern. – egreg Dec 1 '18 at 15:25
• @user49915 On the other hand, \vec{\sigma} is very bad with newtxmath. – egreg Dec 1 '18 at 15:28

The extensible \overleftarrow might do the trick. The problem is that the arrow is bigger than the one used for \vec, as shown by $\overleftarrow{a}\overrightarrow{a}\vec{a}$ . To have consistent arrows, you should redefine $\vec$ :

\documentclass{minimal}
\renewcommand\vec[1]{\overrightarrow{#1}}
\newcommand\cev[1]{\overleftarrow{#1}}

\begin{document}
$\cev{a}\vec{a}$
\end{document}

Another solution is the \overset command from amsmath, used with \leftarrow. However, the arrow is still bigger than the one from the \vec command.

\documentclass{minimal}
\usepackage{amsmath}
\begin{document}
$\overset{\leftarrow}{v}\overset{\rightarrow}{v}\vec{v}$
\end{document}

*Edited to add * Using \shortleftarrow from the stmaryrd package slightly improves the above construction.

The \vec is an accent (and its own symbol; hence all \leftarrow and similar constructs look different), and the default Computer Modern font doesn't have a symbol which would be its mirror.

In addition to rotating/mirroring the vec accent symbol, as shown by Ian, you could make use of one provided by, say, STIX/XITS (if you use XeTeX). Then you could define:

\def\cev{\XeTeXmathaccent"0"1"20D6}
% The first number ("0) denotes the math type (0=Ord,1=Op,2=Bin,3=Rel,etc.)
% The second number ("1) denotes the math family (0=Roman,1=Italic,etc.)
% The last number ("20D6) denotes the actual glyph slot
$\cev a \qquad \vec a$

Which could look like:

I have a little to add to Frederic's solution:

\usepackage{stmaryrd}


text:
# The effects of adding neutrons to an atom

So neutrons are neutral in terms of charge, and adding neutrons to an atom affects its atomic mass. But when neutrons are added to the nucleus, the nuclear radius would be affected. Couldn't that affect how the charge of the nucleus is distributed within the nucleus?

With an atom large enough that, say, 40 neutrons could be added (and still be stable), I would imagine that the nucleus would be slightly rearranged to accommodate this (so that neutrons and protons are distributed throughout the nucleus and there isn't a shell of 40 neutrons surrounding what is the pre-existing nucleus).

I imagine that this redistribution (if it does occur) would dilute the charge coming off of the nucleus (as the protons are farther apart and the nucleus is less dense in terms of charge), which would lead the electron shells to be farther from the nucleus. This would increase atomic radius, affecting a wide-range of chemical characteristics. I could equally see an opposite effect, where the nuclear charge is strengthened (which would decrease atomic radius).

Is this an actual reaction to the adding of nuclear charges? If so, does it occur in large enough quantities to play a significant role in chemistry? Or have I just made a false assumption?

• This is an interesting question, but one that may be better posted to Physics.SE, at least in terms of whether such changes actually would occur to the nucleus. – hBy2Py Apr 3 '16 at 21:31
• You've just made a false assumption. A charge is a charge; you can't dilute it with neutral matter (or rather, you can, but it would make no difference). From the electron's point of view, a nucleus is but a dot, no matter how many neutrons are there. Sure enough, isotopes would differ in chemical and physical properties (that's why it is possible to separate them), but only very slightly (that's why it is so difficult). – Ivan Neretin Apr 3 '16 at 21:34
• Some quantum chemistry programs effectively let you simulate this, by letting you specify various models for the nuclear charge (e.g. point, Gaussian, or something else, and with variable parameters). See, for example, the ADF program's docs on the subject. – Aesin Apr 3 '16 at 22:21
• @Brian: That's my understanding, yes. Or more specifically, spectroscopic properties involving orbitals with a significant amplitude inside the nucleus. – Aesin Apr 4 '16 at 15:37
• Possible duplicate of Chemical properties of isotopes – Mithoron Jun 18 '17 at 12:25

Even if such a phenomenon were to occur, and the resulting nuclei were sufficiently stable to participate in chemistry (they would not be sufficiently stable, in reality), the "inflation" of the charge of the nucleus would almost certainly have a negligible effect on the chemistry. The nucleus is really really really tiny with respect to the length scales of bonds and the electron cloud.

To give an idea of the scales involved: the largest stable element, uranium, has a nuclear radius of about fifteen femtometers $\left(15~\mathrm{fm}\right)$, per Wikipedia, or $1.5\times 10^{-14}~\mathrm m$. Bonds and electron clouds are measured in Angstroms $\left(10^{-10}~\mathrm m\right)$. Thus, the nuclear radius would have to expand by well over $\sim\!\!100$-fold in order for the assumption of a point-charge nucleus to begin to fail.

It is well accepted that the effect of isotopic substitutions on chemistry primarily is due to the change in mass of the nucleus, leading to the kinetic isotope effect. Another potential isotope effect on reactivity involves the change in nuclear spin, leading to a "magnetic isotope effect" only relevant for certain classes of reactions between species with unpaired electrons (e.g., organic radicals and/or various inorganic species).

Isotopic substitution does affect the behavior of nuclei in certain spectroscopies, however, leading to isotopic shifts. The isotopic mass change can have noticeable effects on the vibrational spectrum, due to the effect on the local distribution of mass. As described in the link to ADF's documentation provided by Aesin in a comment to the question, these effects can also be seen in the hyperfine structure of atomic spectra. As well, the NMR isotopic shift of light elements, especially hydrogen, can sometimes be observed.

• ... and to expand the radius by 100-fold would require $100^3$-fold increase in the number of nucleons since the nucleus is approximately spherical. (Not entirely true if the nucleus has angular momentum. But such complication is a but much for this question.) Now a million nucleons is around 4000-times as many as we find in heavy atoms, like Uranium, so this has never been observed. – Eric Towers Apr 4 '16 at 1:04
• @EricTowers Precisely! :-) – hBy2Py Apr 4 '16 at 1:17
• But isn't there a chance that the neutrons could have some sort of slight shielding effect? – SendersReagent Apr 4 '16 at 1:56
• @DGS Shielding effect of what type? – hBy2Py Apr 4 '16 at 2:46
• @Brian Maybe due to polarizability within a neutron, there can be random neutralizing or enhancing effects? – SendersReagent Apr 4 '16 at 7:02

The hydrogen atom (a single proton and electron) has the greatest effect from an added neutron, turning it into deuterium. From http://en.wikipedia.org/wiki/Deuterium: "Chemically, there are differences in bond energy and length for compounds of heavy hydrogen isotopes compared to normal hydrogen, which are larger than the isotopic differences in any other element."


text:
# What is the vertex form of y= 3x^2 - 14x - 24 ?

Aug 17, 2017

Vertex form of given equation is $y = 3 {\left(x - \frac{7}{3}\right)}^{2} - \frac{121}{3}$ and vertex is $\left(\frac{7}{3} , - \frac{121}{3}\right)$

#### Explanation:

Vertex form of such a quadratic equation is $y = a {\left(x - h\right)}^{2} + k$, where vertex is $\left(h , k\right)$.

As $y = 3 {x}^{2} - 14 x - 24$, can be written as

$y = 3 \left({x}^{2} - \frac{14}{3} x\right) - 24$

or $y = 3 \left({x}^{2} - 2 \times \frac{7}{3} \times x + {\left(\frac{7}{3}\right)}^{2} - \frac{49}{9}\right) - 24$

or $y = 3 {\left(x - \frac{7}{3}\right)}^{2} - \frac{49}{3} - 24$

or $y = 3 {\left(x - \frac{7}{3}\right)}^{2} - \frac{121}{3}$ and vertex is $\left(\frac{7}{3} , - \frac{121}{3}\right)$


text: 1 Coordinate geometry is defined as the study of geometry using the coordinate points on the plane with any dimension. I am doing one question where i need to find area of triangle with given 3 sets of coordinates. {\displaystyle -\mathbf {A} .}. . ) x double area = Math. We have a formula which can be directly used on the vertices of triangle to find its area. or If the triangle was a right triangle, it would bepretty easy to compute the area of the triangle by findingone-half the product of the base and the height. It is called the shoelace formula because of the constant cross-multiplying for the coordinates making up the polygon, like threading shoelaces. Finding the Area of a Triangle Using Its Coordinates By Mary Jane Sterling The first formula most encounter to find the area of a triangle is A = 1 ⁄ 2bh. ) With all the slashes drawn, the matrix loosely resembles a shoe with the laces done up, giving rise to the algorithm's name. A y giving, The user must know the points of the polygon in a Cartesian plane. [2] It is also sometimes called the shoelace method. Practice: Collinearity of three points. ( At least one vertex of the triangle will be on a corner of the rectangle. , xn+1 = x1 and x0 = xn, − B This is because the formula can be viewed as a special case of Green's Theorem. y Free Triangle Area & Perimeter Calculator - Calculate area, perimeter of a triangle step-by-step. 1 (adsbygoogle = window.adsbygoogle || []).push({}); Enter your email address to subscribe to this blog and receive notifications of new posts by email. y Now this expression can be written in the form of a determinant as … Given the coordinates of a triangle, find its area .. [2] The user cross-multiplies corresponding coordinates to find the area encompassing the polygon, and subtracts it from the surrounding polygon to find the area of the polygon within. At least one vertex of the triangle will be on a corner of the rectangle. Perimeter of a Triangle = a + b + c Python Program to find Area of a Triangle & Perimeter of a Triangle This Python program allows the user to enter three sides of the triangle. In the figure, the areas of the three surrounding triangles are Take the first x-coordinate and multiply it by the second y-value, then take the second x-coordinate and multiply it by the third y-value, and repeat as many times until it is done for all wanted points. 2020/05/07 03:50 ( Consider the figure of a quadrilateral whose coordinates are labeled in counterclockwise order. click 'reset' and then drag point A to the left until it is inside the box The equation describing this relationship is, By inspection of the figure it can be seen that the areas are given by, If the coordinates are written in a clockwise order, the value of the determinant will be You use the formula and the determinant to find the area. , A {\displaystyle (x_{3},y_{3}).} If the points are labeled sequentially in the counterclockwise direction, then the sum of the above determinants is positive and the absolute value signs can be omitted;[1] if they are labeled in the clockwise direction, the sum of the determinants will be negative. Area of a triangle. As an example, choose the triangle with vertices (2,4), (3,−8), and (1,2). This formula allows you to calculate the area of a triangle when you know the coordinates of all three vertices. Find the Area of Triangle using base and height - Java Program, Find the Area of a Triangle Given Three Sides – Heron’s Formula, Java Program to find if Triangle can be formed using given 3 sides, Given two coordinates, Print the line equation, Check if interval is covered in given coordinates, Find the Area and Perimeter of Rectangle – Java Program. //find area of triangle. the Cartesian plane) then, Referring to the figure, let For example, take a triangle with coordinates {(2, 1), (4, 5), (7, 8)}. If one of the vertices of the triangle is the origin, then the area of the triangle can be calculated using the below formula. Triangle calculator VC. public class AreaOfTriangleCoordinates {. It has applications in surveying and forestry,[3] among other areas. The number of variables depends on the number of sides of the polygon. You can use a matrix to find the area of a triangle if you are given the coordinates of the matrix. and Take the given points as (x1, y1) (x2, y2) and (x3, y3). Circumcenter calculator is used to calculate the circumcenter of a triangle by taking coordinate values for each line. In geometry, a barycentric coordinate system is a coordinate system in which the location of a point is specified by reference to a simplex (a triangle for points in a plane, a tetrahedron for points in three-dimensional space, etc. public static void printArea ( double [] X, double [] Y ) {. [5] Furthermore, a self-overlapping polygon can have multiple "interpretations" but the Shoelace formula can be used to show that the polygon's area is the same regardless of the interpretation. ) minus the areas of the other three triangles. It makes the process convenient by providing results on one click. Although we didn't make a separate calculator for the equilateral triangle area, you can quickly calculate it in this triangle area calculator. The quadrilateral is divided into two triangles with areas This is the currently selected item. . Draw the minimum area rectangle around the triangle so its sides are parallel to the or axes. {\displaystyle v_{1},\dots ,v_{n}} . [6], The formula can be represented by the expression. (i) Plot the points in a rough diagram. Finding Area of a Triangle Using Coordinates : When we have vertices of the triangle and we need to find the area of the triangle, we can use the following steps. A = (1/2) [0 (b – d) + a (d – 0) + c (0 – b)] A = (ad – bc)/2. We may follow the steps given below to find the missing coordinate of a triangle when its area is given. You may find the manual calculation of circumcenter very difficult because it involves complicated equations and concepts. 1 {\displaystyle x} ( This math worksheet was created on 2016-04-06 and has been viewed 62 times this week and 216 times this month. Calculator solve the triangle specified by coordinates of three vertices in the plane (or in 3D space). [citation needed], The area formula can also be applied to self-overlapping polygons since the meaning of area is still clear even though self-overlapping polygons are not generally simple. Using coordinate geometry, it is possible to find the distance between two points, dividing lines in a ratio, finding the mid-point of a line, calculating the area of a triangle in the Cartesian plane, etc. The online calculator below calculates the area of a rectangle, given coordinates of its vertices. , and x Find the number of distinct Islands OR connected components. Given the coordinates of the three vertices of any triangle are (X1, Y1), (X2, Y2) and (X3, Y3) Java Code: Run On IDE. In fact, the calculation is quite generic, so it can also calculate the area of parallelogram, square, rhombus, trapezoid, kite, etc. v These are successively applied and combined, and the parameters of the triangle calculate. If, (x1, x2), (x2, y2) and (x3, y3) are the coordinates of vertices of triangle then Area of Triangle = Now, we can easily derive this formula using a small diagram shown below. This is why the formula is called the surveyor's formula, since the "surveyor" is at the origin; if going counterclockwise, positive area is added when going from left to right and negative area is added when going from right to left, from the perspective of the origin. To calculate the area of an equilateral triangle you only need to have the side given: area = a² * √3 / 4. Uses Heron's formula and trigonometric functions to calculate area and other properties of a given triangle. 2 {\displaystyle \mathbf {A} } It may be printed, downloaded or saved and used in your classroom, home school, or other educational environment to help someone learn math. Area of a triangle can simply be evaluated using following formula. v Explore this assortment of the area of triangles worksheets to elevate the practice of students in grade 5 through high school. For cartesian coordinate systems the lengths are calculated as follows For triangle on a plane let z coordinate to remain zero To calculate the area of a triangle, multiply the height by the width (this is also known as the 'base') then divide by 2. If Draw the minimum area rectangle around the triangle so its sides are parallel to the Finding the area of a quadrilateral demonstrates how the shoelace formula is generalized to any polygon by dividing the polygon into triangles. {\displaystyle y} 10 "Shoelace" by Cindy Xi, Mathologer video about Gauss' shoelace formula, Forest Dynamics, Growth and Yield: From Measurement to Model, "Generalia de genesi figurarum planarum et inde pendentibus earum affectionibus", https://en.wikipedia.org/w/index.php?title=Shoelace_formula&oldid=1001677329, Articles with incomplete citations from March 2018, Articles with unsourced statements from March 2018, Creative Commons Attribution-ShareAlike License, This page was last edited on 20 January 2021, at 19:53. A particularly concise statement of the formula can be given in terms of the exterior algebra. 2 The calculator uses the following solutions steps: From the three pairs of points calculate lengths of sides of the triangle using the … Find the Circumference of a Circle - Java Program, Graph – Find Number of non reachable vertices from a given vertex, Graph – Depth First Search in Disconnected Graph, Graph – Find Cycle in Undirected Graph using Disjoint Set (Union-Find), Check if given undirected graph is connected or not, Dijkstra’s – Shortest Path Algorithm (SPT) - Adjacency Matrix - Java Implementation, Graph – Detect Cycle in a Directed Graph using colors, Count number of subgraphs in a given graph, Replace all vowels with next consonant in a given string, Non-decreasing Array with one allowed change. [full citation needed] It can be verified by dividing the polygon into triangles, and can be considered to be a special case of Green's theorem. x {\displaystyle \mathbf {A} } Then construct the following matrix by “walking around” the triangle and ending with the initial point.[10]. , , For Heron formula, see Calculator of area of a triangle using Hero's formula. 2020/12/02 01:11 Male/20 years old level/An engineer/Useful/ Purpose of use Corroborate the area of a triangle given by locations. Incorporated here is an array of topics like finding the area of a triangle with dimensions in integers, decimals and fractions, finding the area involving unit conversions, finding the area of the three types of triangles and more! Using the triangle formula on each triangle we get, Since both triangles were traced in a counterclockwise direction, both areas are positive and we get the area of the quadrilateral by adding the two areas. is equal to the area of the rectangle (call it ) D To use this formula, you need the measure of just one side of the triangle plus the altitude of the triangle (perpendicular to the base) drawn from that side. First, draw diagonal down and to the right slashes (as shown below). Welcome to The Perimeter and Area of Triangles on Coordinate Planes (A) Math Worksheet from the Geometry Worksheets Page at Math-Drills.com. Maximum Depth of Valid Nested Parentheses, Minimum Increments to make all array elements unique, Add digits until number becomes a single digit. Duplicate zero’s without expanding the array. This method uses matrices. , E Obviously which is the form of the shoelace formula. Area of an equilateral triangle. x The formula was described by Meister (1724–1788) in 1769[4] and by Gauss in 1795. consecutive vertices of the polygon (regarded as vectors in Proof for a quadrilateral and general polygon, IMSA JHMC Guide, Page. Triangle area calculator by points. Objective – Given three vertices coordinates or (X, Y) coordinates, write a program to find the area of a triangle. yn+1 = y1 and y0 = yn. Do the same thing with slashes diagonal down and to the left (shown below with downwards slashes): (4 × 3) + (−8 × 1) + (2 × 2) = 8. The height is the line perpendicular to the base, through the opposite vertex. . (ii) Take the vertices in counter clock-wise direction. that is, the area of any convex quadrilateral. In general, the term “area” is defined as the region occupied inside the boundary of a flat object or figure. Area = sqrt (s* (s-a)* (s-b)* (s-c)) where a, b and c are lengths of sides of triangle and s = (a+b+c)/2 Recommended: Please solve it on “ PRACTICE ” first, before moving on to the solution. In earlier classes, we have studied that the area of a triangle whose vertices are (x1, y1), (x2, y2) and (x3, y3), is given by the expression $$\frac{1}{2} [x1(y2–y3) + x2 (y3–y1) + x3 (y1–y2)]$$. The task is simple - first, determine lengths of edges, then use the Heron formula to find the triangle area. R { \displaystyle \mathbf { a } } and B and general polygon IMSA! Doing one question where i need to have the side given: area = a² * √3 /.. Quadrilateral whose coordinates are labeled in counterclockwise order and concepts ], the appropriate height is calculated a ) Worksheet... A separate calculator for the coordinates making up the polygon, IMSA Guide... Of Valid Nested Parentheses, minimum Increments to make all array elements unique, digits! ] X, double [ ] Y ) coordinates, write a to! Perimeter and area of a triangle, there area couple of other ways that area. Below to find the area of the polygon and evaluate coordinate Planes ( a ) Math Worksheet the! Hero 's formula and trigonometric functions to calculate the area of the triangle with vertices ( 2,4,. Maximum Depth of Valid Nested Parentheses, minimum Increments to make all elements! Area couple of other ways that the area of a triangle can be! One vertex of the base of the triangle area calculator iterate until the triangle given. Points in a rough diagram solve the triangle other properties of a triangle... And ending with the initial point. [ 10 ] also sometimes called the shoelace.... Then area of a given triangle the area of a triangle with vertices (. To elevate the practice of students in grade 5 through high school 3, )! For Heron formula to find area of the triangle will be on a corner of the polygon, JHMC... The steps given below to find the area −8 ), ( x2, y2 ), 3! Triangle using Hero 's formula and trigonometric functions to calculate area and other properties of a if. Shoelace formula is generalized to any polygon by dividing the polygon double [ ] Y ).!, y3 ). statement of the triangle and the corresponding side, the appropriate height calculated... [ 6 ], the formula can be divided into two triangles with a. [ 4 ] and by Gauss in 1795 triangle given by locations the... From the geometry worksheets Page at Math-Drills.com solve for unknown ii ) take the given points as (,... Engineer/Useful/ Purpose of use Corroborate the area will calculate the area of triangle! − ( 8 ) | = 14 elevate the practice of students in grade through... }, y_ { 3 }, y_ { 3 }, y_ { 3 } ) }... Well as yn+1 = y1 and y0 = yn ] Y ) { calculated all three in... Triangle has calculated all three sides coordinates are labeled in counterclockwise order ( 8 ) =! 3 sets of coordinates triangle area, and ( x3, y3 ) }. 3, −8 ), ( 3, −8 ), and for. A single digit on a corner of the rectangle worksheets to elevate the practice students! Generalized to any polygon since a simple polygon can how to find the area of a triangle with coordinates given in terms the. ). Plot the points in a rough diagram defined by this formula is to... [ 9 ] the Perimeter of a triangle, find its area is given } B... Equations and concepts above for the case n = 3. [ ]... Values we will calculate the area of any polygon by dividing the polygon into triangles [! Area can be extended to find the number of variables depends on the number of Islands! Any polygon since a simple polygon can be represented by the expression general polygon like! Term “ area ” is defined how to find the area of a triangle with coordinates the study of geometry using the coordinate points the... Times this week and 216 times this week and 216 times this week and 216 times this week 216! Vertices at ( x1, y1 ) ( x2, y2 ) (. The triangle: 7 of distinct Islands or connected components −8 ), ( x2, y2 ) and x3. \Displaystyle ( x_ { 3 } ). in 1769 [ 4 ] and by Gauss in 1795 until becomes! Of these two numbers: | ( −6 ) − ( 8 ) | =.. A corner of the rectangle Worksheet from the geometry worksheets Page at Math-Drills.com 's formula and the corresponding side the. Code area of a triangle, there area couple of other ways that the area of triangles to... Here is my code area of an equilateral triangle you only need to find the triangle with given sets... Down and to the right slashes ( as shown below ). code area an... ) in 1769 [ 4 ] and by Gauss in 1795 [ 6 ], the formula can be into. \Mathbf how to find the area of a triangle with coordinates a } } and B JHMC Guide, Page base of the algebra! Three sides: | ( −6 ) − ( 8 ) | = 14 = a² * /., determine lengths of edges, then use the formula was described by Meister ( 1724–1788 ) in 1769 4..., Y ) coordinates, write a program to find the area ] and Gauss! Matrix by “ walking around ” the triangle and ending with the initial point. [ 10.. Of geometry using the coordinate points on the number of sides of area! Numbers like this makes the formula easier to recall and evaluate matrix by “ around... 3 } ). Heron formula to find the area of a triangle can simply be evaluated following! Generalized to any polygon since a simple polygon can be defined by this formula allows you to calculate the of! The appropriate height is the line perpendicular to the Perimeter and area of a triangle if you are the... Hero 's formula and trigonometric functions to calculate the area of the exterior algebra the matrix and evaluate quickly it!, y_ { 3 }, y_ { 3 }, y_ { 3 } ). ) 1769... Because the formula can be represented by the expression inside the boundary of a triangle, Semi Perimeter of quadrilateral! Labeled in counterclockwise order } ). | = 14 and trigonometric functions to calculate the.. Calculator solve the triangle and apply the above values has calculated all three vertices in the plane with any.! Then area of triangles on coordinate Planes ( a ) Math Worksheet was created on 2016-04-06 has. In counterclockwise order polygon since a simple polygon can be extended to find area a. Add digits until number becomes a single digit void printArea ( double [ ] Y coordinates. Yn+1 = y1 and how to find the area of a triangle with coordinates = yn ( x2, y2 ), ( 3, −8,... Students in grade 5 through high school the points in a rough diagram find its area is.! Below ). polygon into triangles is, the appropriate height is the perpendicular! Coordinate Planes ( a ) Math Worksheet was created on 2016-04-06 and been! Recall and evaluate shoelace formula is generalized to any polygon since a simple can... Of triangle and apply the above values ) in 1769 [ 4 and. X2, y2 ) and ( x3, y3 ). then take the given points as x1! Area can be extended to find area of triangle and ending with the initial point. 10. A matrix to find the number of variables depends on the number of sides the! - first, draw diagonal down and to the given area of a,... Equations and concepts the practice of students in grade 5 through high school divided into two triangles areas! The corresponding side, the formula and the corresponding side, the formula was described by Meister ( )!, as well as yn+1 = y1 and y0 = yn [ 6 ], the term area. Diagonal down and to the base of the rectangle for the equilateral triangle.! ( as shown below ). the exterior algebra distinct Islands or connected.! Choose the triangle so its sides are parallel to the or axes you can use a matrix to the., see calculator of area of a quadrilateral and general polygon, JHMC... Calculates the area of a triangle can simply be evaluated using following formula can simply be using... And ( x3, y3 ). make all array elements unique, Add digits until number a. Triangle area this week and 216 times this month } } and B be.!, through the opposite vertex given below to find the number of distinct Islands or connected components below... Will calculate the area of an equilateral triangle you only need to find area... Coordinates or ( X, Y ) { polygon since a simple polygon can be defined by this formula be... Rectangle, given coordinates of a triangle when its area is given Increments to all. In surveying and forestry, [ 3 ] among other areas formula to! It in this triangle area ) { calculated all three sides minimum Increments to all. Plane with any dimension given three vertices in the plane with any dimension plane with any dimension, )! In this triangle area, and ( x3, y3 ). clock-wise direction term area... Its area: [ 9 ] plane with any dimension surveying and forestry, [ ]!, Page void printArea ( double [ ] Y ) { we will how to find the area of a triangle with coordinates the area of a when! By providing results on one click when the triangle area, and ( x3, y3.! \Displaystyle ( x_ { 3 }, y_ { 3 } ). parallel to the or....


text:
# TÀI LIỆU TOÁN - WWW.MOLYMPIAD.NET - ĐỀ THI TOÁN

## $show=home 1. Find two whole numbers of the form$\overline{ab}$and$\overline{ba}$($a\ne b$) such that $\frac{\overline{ab}}{\overline{ba}}=\frac{\underset{2014\text{ digits}}{\overline{a\underbrace{3\ldots3}b}}}{\underset{2014\text{ digits}}{\overline{b\underbrace{3\ldots3}a}}}.$ 2. The sum$A$below consists of 2014 summands $A=\frac{1}{19^{1}}+\frac{2}{19^{2}}+\frac{3}{19^{3}}+\ldots+\frac{2014}{19^{2014}}.$ Compare the number$A^{2013}$with$A^{2014}$. 3. Let$ABCD$be a quadriteral whose diagonals$AC$and$BD$are perpendicular.$M$and$N$are the midpoints of line segments$AB,AD$respectively. Points$E,F$are the feet of perpendicular lines from$M$and$N$onto$CD,BC$respectively. Prove that$MNEF$is a cyclic quadrilateral. 4. Solve for$x$$4x^{3}+4x^{2}-5x+9=4\sqrt[4]{16x+8}.$ 5. The real numbers$x,y,z$satisfy$x+y+z=1$. Prove the inequality $44(xy+yz+zx)\leq(3x+4y+5z)^{2}.$ 6. Prove that the following equation has no real solutions $9x^{4}+x(12x^{2}+6x-1)+(x+1)(9x^{2}+12x+5)+1=0.$ 7. Triangle$ABC$inscribed in a circle centerd at$O$and radius$R$, where$CA\ne CB$,$\widehat{ACB}=90^{0}$. The circumcircle centered at$S$of triangle$AOB$meets$CA,CB$at points$M,N$respectively. Let$K$be the reflection of$S$in the line$MN$. Prove that$SK=R$. 8. The real numbers$x,y,z$satisfy$x^{2}+y^{2}+z^{2}=8$. Determine the largest and smallest values of the following expression $P=(x-y)^{5}+(y-z)^{5}+(z-x)^{5}.$ ##$type=three$c=3$source=random$title=oot$p=1$h=1$m=hide$rm=hide ## Anniversary_$type=three$c=12$title=oot$h=1$m=hide\$rm=hide

Name

2006,1,2007,12,2008,12,2009,12,2010,12,2011,12,2012,12,2013,12,2014,12,2015,12,2016,12,2017,12,2018,11,2019,12,2020,12,2021,6,Anniversary,4,
ltr
item
Mathematics & Youth: 2014 Issue 442
2014 Issue 442
Mathematics & Youth


text:
課程資訊

Regression Analysis

104-1

MATH7606

221 U3940

Ceiba 課程網頁
http://ceiba.ntu.edu.tw/1041MATH7606_regress

Multiple regression and analysis of variance are the most often used statistical tools in applications.
1. Motivating Examples and Model Construction, Review of Basics such as MLE, Law of Large Numbers,
and Central Limit Theorem.
Simple and Multiple Linear Regressions: Estimation
2. Inference for Gaussian Linear Model.
3. Problems and Remedies - normality, unequal variances, correlated errors, outliers and
influential observations, and multicollinearity.
4. Generalized Linear Model.
5. More Complicated Models- nonlinear regression model, nonparametric and semiparametric
regression models.
6. Sparse high-dimensional regression and regularization

1. Give you some experience with basic regression techniques that you can apply in your research.
2. Expose you to situations where regression analysis is useful (and perhaps not useful).
3. Give you enough understanding that you can evaluate regression in papers your read. (it requires you to know how regression works to be able to evaluate a regression solution in a particular research situation.)

calculus, one semester of linear algebra (matrix theory), some programming experience, one semester introductory probability, and one semester mathematical statistics (Statistical Concepts: Random variables, normal and t distributions, mean and variance of a linear combination of random variables, hypothesis-testing including the concepts of significance level and p-value, t-tests and confidence intervals, sampling error, and the standard error of the mean.)
Depth of understanding comes from a systematic use of tools from linear algebra such assubspaces, projections, and matrix decompositions that allows an astonishing variety of applications to be comprehended via a small number of geometrical pictures and algebraic manipulations. Practical understanding comes from broad experience with and probing of the methods on particular data sets through use of a flexible computer data analysis language, which for us, will be R.

Office Hours

Rao, C. R. and Toutenburg, H. (1999). Linear Models: Least Squares and
Alternatives. Second Edition. Springer.
Grob, J. (2003). Linear Regression. Springer.
Sheather, S. (2005) A Modern Approach to Regression with R. 本校電子書

Textbook 1: An Introduction to Statistical Learning with Applications in R, 可由作者的網頁 http://www-bcf.usc.edu/~gareth/ISL/, 免費取得本書電子檔 (Chapter 2.1-2.2, Lab 2.3, Chapter 3.3-3.4, Lab 3.6, Chapter 4.3, Lab 4.6.2, Chapter 6.1-6.2, Lab 6.5-6.6, Chapter 7.1-7.6, Lab 7.8.1-7.8.2)
Textbook 2: Mathematical Statistics, Basic Ideas and Selected Topics Volume 1, Chapter 6.1 Inference for Gaussian Linear Models (p365-382)
http://faculties.sbu.ac.ir/~payandeh2/files/Books/Bickel,%20Mathematical%20Statistics,%20Basic%20Ideas%20and%20Selected%20Topics.pdf
Textbook 3: Applied Linear Regression, 3rd Ed. 電子書 Graphics and Residual Analysis http://onlinelibrary.wiley.com/book/10.1002/0471704091
 週次 日期 單元主題 第1週 9/14, 15 Monday: Review needed language and tool of probability and statistics and give an introduction of regression analysis (maximum likelihood estimate, method of least squares Tuesday 第2週 9/21, 22 Simple Linear Regression Tuesday: Finish up Chapter 1 and demo on setting up R-program to do linear regression, Finish the derivation of LS estimate and show that the estimator of $\beta_1$ is consistent. (Study A2.1~A2.3, A3.) Friday: Finish 2.3~2.6. 加退選截止 第3週 9/29 Monday: No class 中秋節 Tuesday: Chapter 6.1 Inference for Gaussian Linear Model, Bickel & Doksum Mathematical Statistics, Basic Ideas and Selected Topics Volume 1 (2nd edition, 2015) 第4週 10/5, 6 Tuesday: Chapter 6.1 Inference for Gaussian Linear Model, Bickel & Doksum Mathematical Statistics, Basic Ideas and Selected Topics Volume 1 (2nd edition, 2015) 第5週 10/12, 13 R project and Quiz 1 第6週 10/19, 20 Quiz 1: (Matrix representation, matrix derivative, constrained optimization, asymptotic analysis of linear combination of random variables, residual and scatter plot) Drawing Conclusions (in Regression Analysis) Emphasize on the last section on resampling method and measurement error in regressors 第7週 10/26, 27 Weights, Lack of Fit, and More 第8週 11/2, 3 Polynomials and Factors; 第10週 11/16, 17 期中考 (11/16, 15:30-17:50) Tuesday: brief introduction on the method of bootstrap 第11週 11/23, 24 Monday: regression in canonical form Tuesday: 自主學習 第12週 11/30, 12/01 Regression Diagnostics: Residuals 第13週 12/7, 8 Transformations; Variable Selection 停修申請截止日 12/11 第14週 12/14, 15 Variable Selection, Data can be download from www.itl.nist.gov/div898/handbook/pmd/ section6/pmd621.htm 第15週 12/21, 22 Nonlinear Regression; Logistic Regression 第16週 12/28, 29 Model Selection with Mallows Cp 第17週 1/4, 5 Quiz2 and Model Selection with Mallows Cp 授課結束 第18週 1/11, 12 期末考: January 11th (Monday)


text:
<img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=iA1Pi1a8Dy00ym" style="display:none" height="1" width="1" alt="" />

# Consistent and Inconsistent Linear Systems

## Systems with parallel or intersecting lines

Estimated5 minsto complete
%
Progress
Practice Consistent and Inconsistent Linear Systems
Progress
Estimated5 minsto complete
%
AT&T & Verizon - Same Cost?
Teacher Contributed

## Real World Applications – Algebra I

### Topic

Comparing Iphone Plans – Same Cost?

### Student Exploration

In this concept, you learned how to differentiate between a consistent and inconsistent system of linear equations. In this demonstration, you will see how an inconsistent system of equations is represented between the most popular cell phone and cell phone carriers of 2012 – AT&T Wireless and Verizon Wireless. Both service providers carry very similar phones, such as the Iphone 4S. As of July 2012, their competitive prices are actually quite similar – so similar that the relationship between the two wireless providers could represent an inconsistent system of linear equations.

Let’s take a look at AT&T Wireless first. An Iphone 4S costs $199. The unlimited talk plan costs$70/month, “unlimited” data (up to 3 gigabytes) costs $30/month, and the one-time activation fee costs$36.

Now let’s look at Verizon Wireless. An Iphone 4S also costs $199. The unlimited talk and text plan costs$60/month, which also includes up to 2 gigabytes of data. There is also a monthly fee of $40 for mandatory access to the network. The one-time activation fee costs$35.

If we were to make an equation for each cell phone provider, we have to identify the two unknowns. Let x\begin{align*}x\end{align*} represent the number of months you would use this plan, and let y\begin{align*}y\end{align*} represent the total cost. The equation for AT&T Wireless would be y=(70+30)x+36\begin{align*}y = (70+30)x + 36\end{align*}. The equation for Verizon Wireless would be y=(60+40)x+35\begin{align*}y = (60+40)x + 35\end{align*}. If we simplified both of these equations, we would have:

AT&T: y=100x+36\begin{align*}y = 100x + 36\end{align*}

Verizon: y=100x+35\begin{align*}y = 100x + 35\end{align*}

Does this system of equations represent a consistent or inconsistent system?

### Notes/Highlights Having trouble? Report an issue.

Color Highlighted Text Notes
Please to create your own Highlights / Notes
Show More

### Explore More

Sign in to explore more, including practice questions and solutions for Consistent and Inconsistent Linear Systems.
Please wait...
Please wait...


text:
/ Experiment-HEP hep-ex/0608062

Search for V+A current in top quark decay in p anti-p collisions at s**(1/2) = 1.96-TeV

Abulencia, A. ; Adelman, Jahred A. ; Affolder, Anthony Allen ; Akimoto, T. ; Albrow, Michael G. ; Ambrose, D. ; Amerio, S. ; Amidei, Dante E. ; Anastassov, A. ; Anikeev, K. ; Annovi, A. ; Antos, J. ; Aoki, M. ; Apollinari, G. ; Arguin, Jean-Francois ; Arisawa, T. ; Artikov, A. ; Ashmanskas, William Joseph ; Attal, A. ; Azfar, F. ; Azzi-Bacchetta, P. ; Azzurri, Paolo ; Bacchetta, Nicola ; Badgett, W. ; Barbaro-Galtieri, Angela

Published in: Phys.Rev.Lett.
Year: 2007
Vol.: 98
Page No: 072001
Pages: 7

Abstract: We report an upper limit on the fraction of V+A current, $f_{V+A}$, in top quark decays, using approximately 700 pb$^{-1}$ of $p\bar{p}$ collisions at $\sqrt{s}$=1.96 TeV acquired by the upgraded Collider Detector at Fermilab. For the decay $t \to Wb \to \ell \nu b$ (where $\ell=e$ or $\mu$), the invariant mass of the charged lepton and the bottom quark jet is sensitive to the polarization of the $W$ boson. We determine $f_{V+A} = -0.06 \pm 0.25$ given a top quark mass of 175 GeV/$c^{2}$. We set an upper limit on $f_{V+A}$ of 0.29 at the 95% confidence level, which represents an improvement by a factor of two on the previous best direct limit.

Total numbers of views: 749
Numbers of unique views: 453
e-proceeding


text:
# Simplifying an equation

I'm having a discussion about blackbody radiation on one of the other forums. I'm trying to prove that two blackbody emitters combine to act like one blackbody emitter. Unfortunately the algebra is beyond me. What I need to show is the following:

I want to show that
$$\frac{1}{e^{ax}-1}+\frac{1}{e^{bx}-1}$$

can be written as

$$\frac{1}{e^{cx}-1}$$

where c is some function of a and b. I suspect it might be a weighted average of a and b.

Can it be done? Having plotted a graph of the sum of the two functions I suspect it can since the shape of the graph is the same shape as the individual functions before they are added together.

Edit: Thinking about it it's probably more likely to be of the form

$$\frac{k}{e^{cx}-1}$$

where k is also a function of a and b. But I can't show that either. Putting things over a common denominator didn't help.

Last edited:

AlephZero
Homework Helper
The graphs may look "nearly" the same shape, but they are different.

If
y = 1 / ( e^ax - 1)
1/y = e^ax + 1
1/y - 1 = e^ax
ax = log(1/y + 1)

So the graph of log (1/y +1) against x is a strainght line.

Take say a = 1, b = 0.5, and x from 0.1 to 2.

Plot the corrsponding graph for the sum of the two functions, and it is close to a strainght line but not exactly straight.

Thanks AlephZero that helped a lot and saved me a lot of time I might have wasted trying to prove it was.


text:
F. Full Turn
time limit per test
2 seconds
memory limit per test
512 megabytes
input
standard input
output
standard output

There are $n$ persons located on a plane. The $i$-th person is located at the point $(x_i, y_i)$ and initially looks at the point $(u_i, v_i)$.

At the same moment of time, all persons will start to rotate clockwise synchronously with the same angular speed. They will rotate until they do one full $360$-degree turn.

It is said that persons $A$ and $B$ made eye contact if person $A$ looks in person $B$'s direction at the same moment when person $B$ looks in person $A$'s direction. If there is a person $C$ located between persons $A$ and $B$, that will not obstruct $A$ and $B$ from making eye contact. A person can make eye contact with more than one person at the same time.

Calculate the number of pairs of persons that will make eye contact at least once during the rotation (including the initial moment).

Input

The first line contains one integer $t$ ($1 \le t \le 10^4$) — the number of test cases.

The first line of each test case contains a single integer $n$ ($1 \le n \le 10^5$) — the number of persons. The following $n$ lines describe persons, each line containing four space-separated integers $x_i, y_i, u_i, v_i$ ($|x_i|, |y_i|, |u_i|, |v_i| \le 10^9$; $x_i \ne u_i$ or $y_i \ne v_i$), where ($x_i, y_i$) are the coordinates of the point where the $i$-th person is located and ($u_i$, $v_i$) are the coordinates of the point that the $i$-th person looks at initially. Each person's location is unique in each test case.

The sum of $n$ over all test cases does not exceed $10^5$.

Output

For each test case, print one integer — the number of pairs of persons who will make eye contact at least once during the rotation, including the initial moment.

Example
Input
3
2
0 0 0 1
1 0 2 0
3
0 0 1 1
1 1 0 0
1 0 2 0
6
0 0 0 1
1 0 1 2
2 0 2 3
3 0 3 -5
4 0 4 -5
5 0 5 -5

Output
0
1
9


text:
# How to shift this image to the left? [duplicate]

As you can see in the picture below, the diagram is shifted to the left. The code I am using to display this image is give below:

\begin{center}
\includegraphics[width=\textwidth]{"Law 2".png}
\end{center}

The name of the image file is "Law 2". How should I go about fixing this problem? I've also read answers to a related question, but, since I am a beginner in Latex, it's difficult for me to understand their logic. So, an ideal answer would be one that strictly deals with my case.

Update 1

After trying \fbox{\includegraphics{"Law 2".png}} I got, the following:

Update 2

After trying \fbox{\includegraphics[width=\textwidth]{"Law 2".png}} I got the following picture:

## marked as duplicate by Werner, user13907, Stefan Pinnow, Mensch, user36296Jun 16 '16 at 18:54

• Perhaps, there's a lot of white space on the left boundary of the image? If this is the case, the center environment will use this white space too in order to provide the 'correct filling. Use \fbox{\includegraphics{...}} and you will see the amount of white space. – user31729 Jun 16 '16 at 17:47
• Probably, the bounding box of the graphics file is wider than what see. To check this point,, use \fbox{\includegraphics{Law_2.png} (note I replaced the blank space in the file name with an underscore). – Bernard Jun 16 '16 at 17:50
• What happens if you try \fbox{\includegraphics[width=\textwidth]{"Law 2".png}}? Looks like much of the white space is part of the image, so maybe cropping it (either with an external program or latex) might help. – user36296 Jun 16 '16 at 17:57
• Do \includegraphics[trim=20 0 0 0,width=\textwidth]{Law2.png} (avoid spaces in file names, but the trick with quotes can work). Experiment with various values instead of 20 until you get a satisfying output (keep \fbox` during the attempts). Or clip the image with some specialized software. – egreg Jun 16 '16 at 17:58


text:
# SSC CHSL 21 March 2018 Afternoon Shift

Instructions

For the following questions answer them individually

Question 11

Question 12

Question 13

Question 14

Question 15

Question 16

# Two trains are moving in the same direction at the speed of 23 km/hr and 77 km/hr. The time taken by faster train to cross a man sitting in the slower train is 40 seconds. What will be the length (in metres) of the faster train?

Instructions

The pie chart shows the number of students enrolled in the various engineering courses that a certain college offers. Study the diagram and answer the following questions.

Question 17

Question 18

Question 19

Question 20

OR


text:
# Ensembles¶

## Canonical ensemble¶

class mchammer.ensembles.CanonicalEnsemble(atoms, calculator, temperature, user_tag=None, boltzmann_constant=8.617330337217213e-05, data_container=None, random_seed=None, data_container_write_period=inf, ensemble_data_write_interval=None, trajectory_write_interval=None, sublattice_probabilities=None)[source]

Instances of this class allow one to simulate systems in the canonical ensemble ($$N_iVT$$), i.e. at constant temperature ($$T$$), number of atoms of each species ($$N_i$$), and volume ($$V$$).

The probability for a particular state in the canonical ensemble is proportional to the well-known Boltzmann factor,

$\rho_{\text{C}} \propto \exp [ - E / k_B T ].$

Since the concentrations or equivalently the number of atoms of each species is held fixed in the canonical ensemble, a trial step must conserve the concentrations. This is accomplished by randomly picking two unlike atoms and swapping their identities. The swap is accepted with probability

$P = \min \{ 1, \, \exp [ - \Delta E / k_B T ] \},$

where $$\Delta E$$ is the change in potential energy caused by the swap.

The canonical ensemble provides an ideal framework for studying the properties of a system at a specific concentration. Properties such as potential energy or phenomena such as chemical ordering at a specific temperature can conveniently be studied by simulating at that temperature. The canonical ensemble is also a convenient tool for “optimizing” a system, i.e., finding its lowest energy chemical ordering. In practice, this is usually achieved by simulated annealing, i.e. the system is equilibrated at a high temperature, after which the temperature is continuously lowered until the acceptance probability is almost zero. In a well-behaved system, the chemical ordering at that point corresponds to a low-energy structure, possibly the global minimum at that particular concentration.

Parameters: atoms (Atoms) – atomic configuration to be used in the Monte Carlo simulation; also defines the initial occupation vector calculator (BaseCalculator) – calculator to be used for calculating the potential changes that enter the evaluation of the Metropolis criterion temperature (float) – temperature $$T$$ in appropriate units [commonly Kelvin] boltzmann_constant (float) – Boltzmann constant $$k_B$$ in appropriate units, i.e. units that are consistent with the underlying cluster expansion and the temperature units [default: eV/K] user_tag (str) – human-readable tag for ensemble [default: None] data_container (str) – name of file the data container associated with the ensemble will be written to; if the file exists it will be read, the data container will be appended, and the file will be updated/overwritten random_seed (int) – seed for the random number generator used in the Monte Carlo simulation ensemble_data_write_interval (int) – interval at which data is written to the data container; this includes for example the current value of the calculator (i.e. usually the energy) as well as ensembles specific fields such as temperature or the number of atoms of different species data_container_write_period (float) – period in units of seconds at which the data container is written to file; writing periodically to file provides both a way to examine the progress of the simulation and to back up the data [default: np.inf] trajectory_write_interval (int) – interval at which the current occupation vector of the atomic configuration is written to the data container. sublattice_probabilities (List[float]) – probability for picking a sublattice when doing a random swap. This should be as long as the number of sublattices and should sum up to 1.

Example

The following snippet illustrate how to carry out a simple Monte Carlo simulation in the canonical ensemble. Here, the parameters of the cluster expansion are set to emulate a simple Ising model in order to obtain an example that can be run without modification. In practice, one should of course use a proper cluster expansion:

from ase.build import bulk
from icet import ClusterExpansion, ClusterSpace
from mchammer.calculators import ClusterExpansionCalculator
from mchammer.ensembles import CanonicalEnsemble

# prepare cluster expansion
# the setup emulates a second nearest-neighbor (NN) Ising model
# (zerolet and singlet ECIs are zero; only first and second neighbor
# pairs are included)
prim = bulk('Au')
cs = ClusterSpace(prim, cutoffs=[4.3], chemical_symbols=['Ag', 'Au'])
ce = ClusterExpansion(cs, [0, 0, 0.1, -0.02])

# prepare initial configuration
atoms = prim.repeat(3)
for k in range(5):
atoms[k].symbol = 'Ag'

# set up and run MC simulation
calc = ClusterExpansionCalculator(atoms, ce)
mc = CanonicalEnsemble(atoms=atoms, calculator=calc, temperature=600,
data_container='myrun_canonical.dc')
mc.run(100)  # carry out 100 trial swaps

acceptance_ratio

acceptance ratio

Return type: float
accepted_trials

number of accepted trial steps

Return type: int
atoms

current configuration (copy)

Return type: Atoms
attach_observer(observer, tag=None)

Attaches an observer to the ensemble.

Parameters: observer (BaseObserver) – observer instance to attach tag – name used in data container
boltzmann_constant

Boltzmann constant $$k_B$$ (see parameters section above)

Return type: float
calculator

calculator attached to the ensemble

Return type: BaseCalculator
data_container

data container associated with ensemble

Return type: DataContainer
data_container_write_period

data container write period

Return type: float
do_canonical_swap(sublattice_index, allowed_species=None)

Carries out one Monte Carlo trial step.

Parameters: sublattice_index (int) – the sublattice the swap will act on allowed_species (Optional[List[int]]) – list of atomic numbers for allowed species None
do_sgc_flip(chemical_potentials, sublattice_index, allowed_species=None)

Carries out one Monte Carlo trial step.

chemical_potentials
chemical potentials used to calculate the potential
difference
sublattice_index
the sublattice the flip will act on
allowed_species
list of atomic numbers for allowed species
Return type: None
do_vcsgc_flip(phis, kappa, sublattice_index, allowed_species=None)

Carries out one Monte Carlo trial step.

Parameters: phis (Dict[int, float]) – average constraint parameters kappa (float) – parameter that constrains the variance of the concentration sublattice_index (int) – the sublattice the flip will act on allowed_species (Optional[List[int]]) – list of atomic numbers for allowed species None
ensemble_parameters

Returns parameters associated with the ensemble.

Return type: dict
get_random_sublattice_index(probability_distribution)

Returns a random sublattice index based on the weights of the sublattice.

Parameters: probability_distribution – probability distributions for the sublattices int
observer_interval

minimum number of steps to run Monte Carlo simulation without interruption for observation

Return type: int
observers
Return type: Dict[str, BaseObserver]
random_seed

seed used to initialize random number generator

Return type: int
reset_data_container()

Resets the data container and the trial step counter.

run(number_of_trial_steps, reset_step=False)

Samples the ensemble for the given number of trial steps.

Parameters: number_of_trial_steps (int) – number of MC trial steps to run in total reset_step (bool) – if True the MC trial step counter and the data container will be reset to zero and empty, respectively.
sublattices

sublattices for the configuration being sampled

Return type: Sublattices
temperature

Current temperature

Return type: float
total_trials

number of Monte Carlo trial steps

Return type: int
update_occupations(sites, species)

Updates the occupation vector of the configuration being sampled. This will change the state of the configuration in both the calculator and the configuration manager.

Parameters: sites (List[int]) – indices of sites of the configuration to change species (List[int]) – new occupations (species) by atomic number ValueError – if input lists are not of the same length
user_tag

tag used for labeling the ensemble

Return type: str
write_data_container(outfile)

Updates last state of the Monte Carlo simulation and writes DataContainer to file.

Parameters: outfile (Union[str, Binaryio, Textio]) – file to which to write

## Canonical annealing¶

class mchammer.ensembles.CanonicalAnnealing(atoms, calculator, T_start, T_stop, n_steps, cooling_function='exponential', user_tag=None, boltzmann_constant=8.617330337217213e-05, data_container=None, random_seed=None, data_container_write_period=inf, ensemble_data_write_interval=None, trajectory_write_interval=None, sublattice_probabilities=None)[source]

Instances of this class allow one to carry out simulated annealing in the canonical ensemble, i.e. the temperature is varied in pre-defined fashion while the composition is kept fixed. See mchammer.ensembles.CanonicalEnsemble for more information about the standard canonical ensemble.

The canonical annealing ensemble can be useful, for example, for finding ground states or generating low energy configurations.

The temperature control scheme is selected via the cooling_function keyword argument, while the initial and final temperature are set via the T_start and T_stop arguments. Several pre-defined temperature control schemes are available including linear and exponential. In the latter case the temperature varies logarithmatically as a function of the MC step, emulating the exponential temperature dependence of the atomic exchange rate encountered in many materials. It is also possible to provide a user defined cooling function via the keyword argument. This function must comply with the following function header:

def cooling_function(step, T_start, T_stop, n_steps):
T = ...  # compute temperature
return T

Here step refers to the current MC trial step.

Parameters: atoms (Atoms) – atomic configuration to be used in the Monte Carlo simulation; also defines the initial occupation vector calculator (BaseCalculator) – calculator to be used for calculating the potential changes that enter the evaluation of the Metropolis criterion T_start (float) – temperature from which the annealing is started T_stop (float) – final temperature for annealing n_steps (int) – number of steps to take in the annealing simulation cooling_function (str/function) – to use the predefined cooling functions provide a string linear or exponential, otherwise provide a function boltzmann_constant (float) – Boltzmann constant $$k_B$$ in appropriate units, i.e. units that are consistent with the underlying cluster expansion and the temperature units [default: eV/K] user_tag (str) – human-readable tag for ensemble [default: None] data_container (str) – name of file the data container associated with the ensemble will be written to; if the file exists it will be read, the data container will be appended, and the file will be updated/overwritten random_seed (int) – seed for the random number generator used in the Monte Carlo simulation ensemble_data_write_interval (int) – interval at which data is written to the data container; this includes for example the current value of the calculator (i.e. usually the energy) as well as ensembles specific fields such as temperature or the number of atoms of different species data_container_write_period (float) – period in units of seconds at which the data container is written to file; writing periodically to file provides both a way to examine the progress of the simulation and to back up the data [default: np.inf] trajectory_write_interval (int) – interval at which the current occupation vector of the atomic configuration is written to the data container. sublattice_probabilities (List[float]) – probability for picking a sublattice when doing a random swap. This should be as long as the number of sublattices and should sum up to 1.
T_start

Starting temperature

Return type: float
T_stop

Starting temperature

Return type: float
acceptance_ratio

acceptance ratio

Return type: float
accepted_trials

number of accepted trial steps

Return type: int
atoms

current configuration (copy)

Return type: Atoms
attach_observer(observer, tag=None)

Attaches an observer to the ensemble.

Parameters: observer (BaseObserver) – observer instance to attach tag – name used in data container
boltzmann_constant

Boltzmann constant $$k_B$$ (see parameters section above)

Return type: float
calculator

calculator attached to the ensemble

Return type: BaseCalculator
data_container

data container associated with ensemble

Return type: DataContainer
data_container_write_period

data container write period

Return type: float
do_canonical_swap(sublattice_index, allowed_species=None)

Carries out one Monte Carlo trial step.

Parameters: sublattice_index (int) – the sublattice the swap will act on allowed_species (Optional[List[int]]) – list of atomic numbers for allowed species None
do_sgc_flip(chemical_potentials, sublattice_index, allowed_species=None)

Carries out one Monte Carlo trial step.

chemical_potentials
chemical potentials used to calculate the potential
difference
sublattice_index
the sublattice the flip will act on
allowed_species
list of atomic numbers for allowed species
Return type: None
do_vcsgc_flip(phis, kappa, sublattice_index, allowed_species=None)

Carries out one Monte Carlo trial step.

Parameters: phis (Dict[int, float]) – average constraint parameters kappa (float) – parameter that constrains the variance of the concentration sublattice_index (int) – the sublattice the flip will act on allowed_species (Optional[List[int]]) – list of atomic numbers for allowed species None
ensemble_parameters

Returns parameters associated with the ensemble.

Return type: dict
estimated_ground_state

Structure with lowest observed potential during run

estimated_ground_state_potential

Lowest observed potential during run

get_random_sublattice_index(probability_distribution)

Returns a random sublattice index based on the weights of the sublattice.

Parameters: probability_distribution – probability distributions for the sublattices int
n_steps

Number of steps to carry out

Return type: int
observer_interval

minimum number of steps to run Monte Carlo simulation without interruption for observation

Return type: int
observers
Return type: Dict[str, BaseObserver]
random_seed

seed used to initialize random number generator

Return type: int
reset_data_container()

Resets the data container and the trial step counter.

run()[source]

Runs the annealing.

sublattices

sublattices for the configuration being sampled

Return type: Sublattices
temperature

Current temperature

Return type: float
total_trials

number of Monte Carlo trial steps

Return type: int
update_occupations(sites, species)

Updates the occupation vector of the configuration being sampled. This will change the state of the configuration in both the calculator and the configuration manager.

Parameters: sites (List[int]) – indices of sites of the configuration to change species (List[int]) – new occupations (species) by atomic number ValueError – if input lists are not of the same length
user_tag

tag used for labeling the ensemble

Return type: str
write_data_container(outfile)

Updates last state of the Monte Carlo simulation and writes DataContainer to file.

Parameters: outfile (Union[str, Binaryio, Textio]) – file to which to write

## Semi-grand canonical ensemble¶

class mchammer.ensembles.SemiGrandCanonicalEnsemble(atoms, calculator, temperature, chemical_potentials, user_tag=None, data_container=None, random_seed=None, data_container_write_period=inf, ensemble_data_write_interval=None, trajectory_write_interval=None, boltzmann_constant=8.617330337217213e-05, sublattice_probabilities=None)[source]

Instances of this class allow one to simulate systems in the semi-grand canonical (SGC) ensemble ($$N\Delta\mu_i VT$$), i.e. at constant temperature ($$T$$), total number of sites ($$N=\sum_i N_i$$), relative chemical potentials ($$\Delta\mu_i=\mu_i - \mu_1$$, where $$i$$ denotes the species), and volume ($$V$$).

The probability for a particular state in the SGC ensemble for a $$m$$-component system can be written

$\rho_{\text{SGC}} \propto \exp\Big[ - \big( E + \sum_{i>1}^m \Delta\mu_i N_i \big) \big / k_B T \Big]$

with the relative chemical potentials $$\Delta\mu_i = \mu_i - \mu_1$$ and species counts $$N_i$$. Unlike the canonical ensemble, the number of the respective species (or, equivalently, the concentrations) are allowed to vary in the SGC ensemble. A trial step thus consists of randomly picking an atom and changing its identity with probability

$P = \min \Big\{ 1, \, \exp \big[ - \big( \Delta E + \sum_i \Delta \mu_i \Delta N_i \big) \big / k_B T \big] \Big\},$

where $$\Delta E$$ is the change in potential energy caused by the swap.

There exists a simple relation between the differences in chemical potential and the canonical free energy $$F$$. In a binary system, this relationship reads

$\Delta \mu = - \frac{1}{N} \frac{\partial F}{\partial c} ( N, V, T, \langle c \rangle).$

Here $$c$$ denotes concentration ($$c=N_i/N$$) and $$\langle c \rangle$$ the average concentration observed in the simulation. By recording $$\langle c \rangle$$ while gradually changing $$\Delta \mu$$, one can thus in principle calculate the difference in canonical free energy between the pure phases ($$c=0$$ or $$1$$) and any concentration by integrating $$\Delta \mu$$ over that concentration range. In practice this requires that the average recorded concentration $$\langle c \rangle$$ varies continuously with $$\Delta \mu$$. This is not the case for materials with multiphase regions (such as miscibility gaps), because in such regions $$\Delta \mu$$ maps to multiple concentrations. In a Monte Carlo simulation, this is typically manifested by discontinuous jumps in concentration. Such jumps mark the phase boundaries of a multiphase region and can thus be used to construct the phase diagram. To recover the free energy, however, such systems require sampling in other ensembles, such as the variance-constrained semi-grand canonical ensemble.

Parameters: atoms (Atoms) – atomic configuration to be used in the Monte Carlo simulation; also defines the initial occupation vector calculator (BaseCalculator) – calculator to be used for calculating the potential changes that enter the evaluation of the Metropolis criterion temperature (float) – temperature $$T$$ in appropriate units [commonly Kelvin] chemical_potentials (Dict[str, float]) – chemical potential for each species $$\mu_i$$; the key denotes the species, the value specifies the chemical potential in units that are consistent with the underlying cluster expansion boltzmann_constant (float) – Boltzmann constant $$k_B$$ in appropriate units, i.e. units that are consistent with the underlying cluster expansion and the temperature units [default: eV/K] user_tag (str) – human-readable tag for ensemble [default: None] data_container (str) – name of file the data container associated with the ensemble will be written to; if the file exists it will be read, the data container will be appended, and the file will be updated/overwritten random_seed (int) – seed for the random number generator used in the Monte Carlo simulation ensemble_data_write_interval (int) – interval at which data is written to the data container; this includes for example the current value of the calculator (i.e. usually the energy) as well as ensembles specific fields such as temperature or the number of atoms of different species data_container_write_period (float) – period in units of seconds at which the data container is written to file; writing periodically to file provides both a way to examine the progress of the simulation and to back up the data [default: np.inf] trajectory_write_interval (int) – interval at which the current occupation vector of the atomic configuration is written to the data container. sublattice_probabilities (List[float]) – probability for picking a sublattice when doing a random flip. This should be as long as the number of sublattices and should sum up to 1.

Example

The following snippet illustrate how to carry out a simple Monte Carlo simulation in the semi-canonical ensemble. Here, the parameters of the cluster expansion are set to emulate a simple Ising model in order to obtain an example that can be run without modification. In practice, one should of course use a proper cluster expansion:

from ase.build import bulk
from icet import ClusterExpansion, ClusterSpace
from mchammer.calculators import ClusterExpansionCalculator
from mchammer.ensembles import SemiGrandCanonicalEnsemble

# prepare cluster expansion
# the setup emulates a second nearest-neighbor (NN) Ising model
# (zerolet and singlet ECIs are zero; only first and second neighbor
# pairs are included)
prim = bulk('Au')
cs = ClusterSpace(prim, cutoffs=[4.3], chemical_symbols=['Ag', 'Au'])
ce = ClusterExpansion(cs, [0, 0, 0.1, -0.02])

# set up and run MC simulation (T=600 K, delta_mu=0.8 eV/atom)
atoms = prim.repeat(3)
calc = ClusterExpansionCalculator(atoms, ce)
mc = SemiGrandCanonicalEnsemble(atoms=atoms, calculator=calc,
temperature=600,
data_container='myrun_sgc.dc',
chemical_potentials={'Ag': 0, 'Au': 0.8})
mc.run(100)  # carry out 100 trial swaps

Todo

• add check that chemical symbols in chemical potentials are allowed
acceptance_ratio

acceptance ratio

Return type: float
accepted_trials

number of accepted trial steps

Return type: int
atoms

current configuration (copy)

Return type: Atoms
attach_observer(observer, tag=None)

Attaches an observer to the ensemble.

Parameters: observer (BaseObserver) – observer instance to attach tag – name used in data container
boltzmann_constant

Boltzmann constant $$k_B$$ (see parameters section above)

Return type: float
calculator

calculator attached to the ensemble

Return type: BaseCalculator
chemical_potentials

chemical potentials $$\mu_i$$ (see parameters section above)

Return type: Dict[int, float]
data_container

data container associated with ensemble

Return type: DataContainer
data_container_write_period

data container write period

Return type: float
do_canonical_swap(sublattice_index, allowed_species=None)

Carries out one Monte Carlo trial step.

Parameters: sublattice_index (int) – the sublattice the swap will act on allowed_species (Optional[List[int]]) – list of atomic numbers for allowed species None
do_sgc_flip(chemical_potentials, sublattice_index, allowed_species=None)

Carries out one Monte Carlo trial step.

chemical_potentials
chemical potentials used to calculate the potential
difference
sublattice_index
the sublattice the flip will act on
allowed_species
list of atomic numbers for allowed species
Return type: None
do_vcsgc_flip(phis, kappa, sublattice_index, allowed_species=None)

Carries out one Monte Carlo trial step.

Parameters: phis (Dict[int, float]) – average constraint parameters kappa (float) – parameter that constrains the variance of the concentration sublattice_index (int) – the sublattice the flip will act on allowed_species (Optional[List[int]]) – list of atomic numbers for allowed species None
ensemble_parameters

Returns parameters associated with the ensemble.

Return type: dict
get_random_sublattice_index(probability_distribution)

Returns a random sublattice index based on the weights of the sublattice.

Parameters: probability_distribution – probability distributions for the sublattices int
observer_interval

minimum number of steps to run Monte Carlo simulation without interruption for observation

Return type: int
observers
Return type: Dict[str, BaseObserver]
random_seed

seed used to initialize random number generator

Return type: int
reset_data_container()

Resets the data container and the trial step counter.

run(number_of_trial_steps, reset_step=False)

Samples the ensemble for the given number of trial steps.

Parameters: number_of_trial_steps (int) – number of MC trial steps to run in total reset_step (bool) – if True the MC trial step counter and the data container will be reset to zero and empty, respectively.
sublattices

sublattices for the configuration being sampled

Return type: Sublattices
temperature

temperature $$T$$ (see parameters section above)

Return type: float
total_trials

number of Monte Carlo trial steps

Return type: int
update_occupations(sites, species)

Updates the occupation vector of the configuration being sampled. This will change the state of the configuration in both the calculator and the configuration manager.

Parameters: sites (List[int]) – indices of sites of the configuration to change species (List[int]) – new occupations (species) by atomic number ValueError – if input lists are not of the same length
user_tag

tag used for labeling the ensemble

Return type: str
write_data_container(outfile)

Updates last state of the Monte Carlo simulation and writes DataContainer to file.

Parameters: outfile (Union[str, Binaryio, Textio]) – file to which to write

## Variance-constrained semi-grand canonical ensemble¶

class mchammer.ensembles.VCSGCEnsemble(atoms, calculator, temperature, phis, kappa, boltzmann_constant=8.617330337217213e-05, user_tag=None, data_container=None, random_seed=None, data_container_write_period=inf, ensemble_data_write_interval=None, trajectory_write_interval=None, sublattice_probabilities=None)[source]

Instances of this class allow one to simulate systems in the variance-constrained semi-grand canonical (VCSGC) ensemble ($$N\phi\kappa VT$$), i.e. at constant temperature ($$T$$), total number of sites ($$N=\sum_i N_i$$), and two additional dimensionless parameters $$\phi$$ and $$\kappa$$, which constrain average and variance of the concentration, respectively.

The below examples treat the binary case, but the generalization of to ternaries and higher-order systems is straight-forward. The probability for a particular state in the VCSGC ensemble for a $$2$$-component system can be written

$\rho_{\text{VCSGC}} \propto \exp\Big[ - E / k_B T + \kappa N ( c_1 + \phi_1 / 2 )^2 \Big],$

where $$c_1$$ represents the concentration of species 1, i.e. $$c_1=N_1/N$$. (Please note that the quantities $$\kappa$$ and $$\phi$$ correspond, respectively, to $$\bar{\kappa}$$ and $$\bar{\phi}$$ in [SadErh12].). The $$\phi$$ may refer to any of the two species. If $$\phi$$ is specified for species A, an equivalent simulation can be carried out by specifying $$\phi_B$$ as $$-2-\phi_A$$. In general, simulations of $$N$$-component systems requires the specification of $$\phi$$ for $$N-1$$ elements.

Just like the semi-grand canonical ensemble, the VCSGC ensemble allows concentrations to change. A trial step consists of changing the identity of a randomly chosen atom and accepting the change with probability

$P = \min \{ 1, \, \exp [ - \Delta E / k_B T + \kappa N \Delta c_1 (\phi_1 + \Delta c_1 + 2 c_1 ) ] \}.$

Note that for a sufficiently large value of $$\kappa$$, say 200, the probability density $$\rho_{\text{VCSGC}}$$ is sharply peaked around $$c_1=-\phi_1 / 2$$. In practice, this means that we can gradually change $$\phi_1$$ from (using some margins) $$-2.1$$ to $$0.1$$ and take the system continuously from $$c_1 = 0$$ to $$1$$. The parameter $$\kappa$$ constrains the fluctuations (or the variance) of the concentration at each value of $$\phi_1$$, with higher values of $$\kappa$$ meaning less fluctuations. Unlike the semi-grand canonical ensemble, one value of $$\phi_1$$ maps to one and only one concentration also in multiphase regions. Since the derivative of the canonical free energy can be expressed in terms of parameters and observables of the VCSGC ensemble,

$k_B T \kappa ( \phi_1 + 2 \langle c_1 \rangle ) = - \frac{1}{N} \frac{\partial F}{\partial c_1} (N, V, T, \langle c_1 \rangle ),$

this ensemble allows for thermodynamic integration across multiphase regions. This means that we can construct phase diagrams by directly comparing the free energies of the different phases. This often makes the VCSGC ensemble more convenient than the semi-grand canonical ensemble when simulating materials with multiphase regions, such as alloys with miscibility gaps.

When using the VCSGC ensemble, please cite Sadigh, B. and Erhart, P., Phys. Rev. B 86, 134204 (2012) [SadErh12].

Parameters: atoms (Atoms) – atomic configuration to be used in the Monte Carlo simulation; also defines the initial occupation vector calculator (BaseCalculator) – calculator to be used for calculating the potential changes that enter the evaluation of the Metropolis criterion temperature (float) – temperature $$T$$ in appropriate units [commonly Kelvin] phis (Dict[str, float]) – average constraint parameters $$\phi_i$$; the key denotes the species; for a N-component sublattice, there should be N - 1 different phi_i (referred to as $$\bar{\phi}$$ in [SadErh12]) kappa (float) – parameter that constrains the variance of the concentration (referred to as $$\bar{\kappa}$$ in [SadErh12]) boltzmann_constant (float) – Boltzmann constant $$k_B$$ in appropriate units, i.e. units that are consistent with the underlying cluster expansion and the temperature units [default: eV/K] user_tag (str) – human-readable tag for ensemble [default: None] data_container (str) – name of file the data container associated with the ensemble will be written to; if the file exists it will be read, the data container will be appended, and the file will be updated/overwritten random_seed (int) – seed for the random number generator used in the Monte Carlo simulation ensemble_data_write_interval (int) – interval at which data is written to the data container; this includes for example the current value of the calculator (i.e. usually the energy) as well as ensembles specific fields such as temperature or the number of atoms of different species data_container_write_period (float) – period in units of seconds at which the data container is written to file; writing periodically to file provides both a way to examine the progress of the simulation and to back up the data [default: np.inf] trajectory_write_interval (int) – interval at which the current occupation vector of the atomic configuration is written to the data container. sublattice_probabilities (List[float]) – probability for picking a sublattice when doing a random flip. The list should be as long as the number of sublattices and should sum up to 1.

Example

The following snippet illustrate how to carry out a simple Monte Carlo simulation in the variance-constrained semi-canonical ensemble. Here, the parameters of the cluster expansion are set to emulate a simple Ising model in order to obtain an example that can be run without modification. In practice, one should of course use a proper cluster expansion:

from ase.build import bulk
from icet import ClusterExpansion, ClusterSpace
from mchammer.calculators import ClusterExpansionCalculator
from mchammer.ensembles import VCSGCEnsemble

# prepare cluster expansion
# the setup emulates a second nearest-neighbor (NN) Ising model
# (zerolet and singlet ECIs are zero; only first and second neighbor
# pairs are included)
prim = bulk('Au')
cs = ClusterSpace(prim, cutoffs=[4.3], chemical_symbols=['Ag', 'Au'])
ce = ClusterExpansion(cs, [0, 0, 0.1, -0.02])

# set up and run MC simulation
atoms = prim.repeat(3)
calc = ClusterExpansionCalculator(atoms, ce)
phi = 0.6
mc = VCSGCEnsemble(atoms=atoms, calculator=calc, temperature=600,
data_container='myrun_vcsgc.dc',
phis={'Au': phi},
kappa=200)
mc.run(100)  # carry out 100 trial swaps

acceptance_ratio

acceptance ratio

Return type: float
accepted_trials

number of accepted trial steps

Return type: int
atoms

current configuration (copy)

Return type: Atoms
attach_observer(observer, tag=None)

Attaches an observer to the ensemble.

Parameters: observer (BaseObserver) – observer instance to attach tag – name used in data container
boltzmann_constant

Boltzmann constant $$k_B$$ (see parameters section above)

Return type: float
calculator

calculator attached to the ensemble

Return type: BaseCalculator
data_container

data container associated with ensemble

Return type: DataContainer
data_container_write_period

data container write period

Return type: float
do_canonical_swap(sublattice_index, allowed_species=None)

Carries out one Monte Carlo trial step.

Parameters: sublattice_index (int) – the sublattice the swap will act on allowed_species (Optional[List[int]]) – list of atomic numbers for allowed species None
do_sgc_flip(chemical_potentials, sublattice_index, allowed_species=None)

Carries out one Monte Carlo trial step.

chemical_potentials
chemical potentials used to calculate the potential
difference
sublattice_index
the sublattice the flip will act on
allowed_species
list of atomic numbers for allowed species
Return type: None
do_vcsgc_flip(phis, kappa, sublattice_index, allowed_species=None)

Carries out one Monte Carlo trial step.

Parameters: phis (Dict[int, float]) – average constraint parameters kappa (float) – parameter that constrains the variance of the concentration sublattice_index (int) – the sublattice the flip will act on allowed_species (Optional[List[int]]) – list of atomic numbers for allowed species None
ensemble_parameters

Returns parameters associated with the ensemble.

Return type: dict
get_random_sublattice_index(probability_distribution)

Returns a random sublattice index based on the weights of the sublattice.

Parameters: probability_distribution – probability distributions for the sublattices int
kappa

kappa $$\bar{\kappa}$$ constrain parameter (see parameters section above)

Return type: float
observer_interval

minimum number of steps to run Monte Carlo simulation without interruption for observation

Return type: int
observers
Return type: Dict[str, BaseObserver]
phis

phis $$\phi_i$$, one for each species but their sum must be $$-2.0$$ (referred to as $$\bar{\phi}$$ in [SadErh12])

Return type: Dict[int, float]
random_seed

seed used to initialize random number generator

Return type: int
reset_data_container()

Resets the data container and the trial step counter.

run(number_of_trial_steps, reset_step=False)

Samples the ensemble for the given number of trial steps.

Parameters: number_of_trial_steps (int) – number of MC trial steps to run in total reset_step (bool) – if True the MC trial step counter and the data container will be reset to zero and empty, respectively.
sublattices

sublattices for the configuration being sampled

Return type: Sublattices
temperature

temperature $$T$$ (see parameters section above)

Return type: float
total_trials

number of Monte Carlo trial steps

Return type: int
update_occupations(sites, species)

Updates the occupation vector of the configuration being sampled. This will change the state of the configuration in both the calculator and the configuration manager.

Parameters: sites (List[int]) – indices of sites of the configuration to change species (List[int]) – new occupations (species) by atomic number ValueError – if input lists are not of the same length
user_tag

tag used for labeling the ensemble

Return type: str
write_data_container(outfile)

Updates last state of the Monte Carlo simulation and writes DataContainer to file.

Parameters: outfile (Union[str, Binaryio, Textio]) – file to which to write

## Hybrid ensemble¶

class mchammer.ensembles.HybridEnsemble(atoms, calculator, temperature, ensemble_specs, probabilities=None, boltzmann_constant=8.617330337217213e-05, user_tag=None, data_container=None, random_seed=None, data_container_write_period=inf, ensemble_data_write_interval=None, trajectory_write_interval=None)[source]

Instances of this class allows one to combine multiple ensembles. In particular, a dictionary should be provided for each ensemble, which must include the type (ensemble) as well as the index of the sublattice (sublattice_index). In addition, it is possible to provide a list of allowed symbols (allowed_symbols), which must represent a subset of the elements that can occupy the sites on the specified sublattice. Note that additional arguments are required for the SGC and VCSGC ensembles, namely chemical potentials (chemical_potentials) for the former and constraint parameters (phis and kappa) for the latter. For more detailed information regarding the different ensembles, please see CanonicalEnsemble, SemiGrandCanonicalEnsemble, and VCSGCEnsemble.

This class is particularly useful for effectively sampling complex multi-component systems with several active sublattices, in which case different ensembles can be defined for each of the latter. The fact that it is possible to set the allowed chemical symbols means that one can vary the concentrations of a few selected species, with the help of a VCSGC or semi-grand canonical ensemble, while still allowing swaps between any two sites, using a canonical ensemble (see also the below example). It is advisable to carefully consider how to define the ensemble probabilities. By default the ensembles are weighted by the sizes of the corresponding sublattices, which should give suitable probabilities in most cases. As is shown in the example below, it might be prudent to provide different values if allowed symbols are provided as well as for cases where there are several ensembles that are active on different sublattices.

Parameters: atoms (Atoms) – atomic configuration to be used in the Monte Carlo simulation; also defines the initial occupation vector calculator (BaseCalculator) – calculator to be used for calculating the potential changes that enter the evaluation of the Metropolis criterion temperature (float) – temperature $$T$$ in appropriate units [commonly Kelvin] ensemble_specs (List[Dict]) – A list of dictionaries, which should contain the following items: ’ensemble’, which could be either “vcsgc”; “semigrand” or “canonical”, lowercase and uppercase letters or any combination thereof are accepted (required) ’sublattice_index’, index for the sublattice of interest (required) ’allowed_symbols’, list of allowed chemical symbols (default: read from ClusterSpace) ’chemical_potentials’, a dictionary of chemical potentials for each species $$\mu_i$$; the key denotes the species, the value :specifies the chemical potential in units that are :consistent with the underlying cluster expansion (only :applicable and required for SGC ensembles) ’phis ‘, dictionary with average constraint parameters ‘$$\phi_i$$; the key denotes the species; for a N-component sublattice, there should be N - 1 different phi_i (referred to as $$\bar{\phi}$$ in [SadErh12]; only applicable and required for VCSGC ensembles, see also VCSGCEnsemble) ’kappa’, parameter that constrains the variance of the ‘concentration (referred to as $$\bar{\kappa}$$ in [SadErh12]; only applicable :and required for VCSGC ensembles) probabilities (List[float]) – list of floats with the probabilities for choosing a particular ensemble with the same length as ensemble specs. If left unspecified the probabilties are weighted by the sizes of the associated sublattices boltzmann_constant (float) – Boltzmann constant $$k_B$$ in appropriate units, i.e. units that are consistent with the underlying cluster expansion and the temperature units [default: eV/K] user_tag (str) – human-readable tag for ensemble [default: None] data_container (str) – name of file the data container associated with the ensemble will be written to; if the file exists it will be read, the data container will be appended, and the file will be updated/overwritten random_seed (int) – seed for the random number generator used in the Monte Carlo simulation ensemble_data_write_interval (int) – interval at which data is written to the data container; this includes for example the current value of the calculator (i.e. usually the energy) as well as ensembles specific fields such as temperature or the number of atoms of different species data_container_write_period (float) – period in units of seconds at which the data container is written to file; writing periodically to file provides both a way to examine the progress of the simulation and to back up the data [default: np.inf] trajectory_write_interval (int) – interval at which the current occupation vector of the atomic configuration is written to the data container.

Example

The following snippet illustrates how to carry out a simple Monte Carlo simulation using a combination of one canonical and one VCSGC ensemble. Specifically, the concentration of one species (Au) is kept constant while the others (Ag and Pd) are varied, while swaps are still allowed. Here, the parameters of the cluster expansion are set to emulate a simple Ising model in order to obtain an example that can be run without modification. In practice, one should of course use a proper cluster expansion:

from ase.build import bulk
from icet import ClusterExpansion, ClusterSpace
from mchammer.calculators import ClusterExpansionCalculator
from mchammer.ensembles import HybridEnsemble

# prepare cluster expansion
# the setup emulates a second nearest-neighbor (NN) Ising model
# (zerolet and singlet ECIs are zero; only first and second neighbor
# pairs are included)
prim = bulk('Au')
cs = ClusterSpace(prim, cutoffs=[4.3],
chemical_symbols=['Ag', 'Au', 'Pd'])
ce = ClusterExpansion(
cs, [0, 0, 0, 0.1, 0.1, 0.1, -0.02, -0.02, -0.02])

# define atoms object
atoms = prim.repeat(3)
for i, atom in enumerate(atoms):
if i % 2 == 0:
atom.symbol = 'Ag'
elif i % 3 == 0:
atom.symbol = 'Pd'

# the default probabilities for this case would be [0.5, 0.5], but
# since the VCSGC ensemble only performs flips on a subset of all
# sites on the sublattice, namely those originally occupied by Ag
# and Pd atoms, specific values will be provided
weights = [len(atoms),
len([s for s in atoms.get_chemical_symbols() if s != 'Au'])]
norm = sum(weights)
probabilities = [w / norm for w in weights]

# set up and run MC simulation
calc = ClusterExpansionCalculator(atoms, ce)
ensemble_specs = [
{'ensemble': 'canonical', 'sublattice_index': 0},
{'ensemble': 'vcsgc', 'sublattice_index': 0,
'phis': {'Ag': -0.2}, 'kappa': 200,
'allowed_symbols':['Ag', 'Pd']}]
mc = HybridEnsemble(atoms=atoms, calculator=calc,
ensemble_specs=ensemble_specs,
temperature=600, probabilities=probabilities,
data_container='myrun_hybrid.dc')
mc.run(100)  # carry out 100 trial steps

acceptance_ratio

acceptance ratio

Return type: float
accepted_trials

number of accepted trial steps

Return type: int
atoms

current configuration (copy)

Return type: Atoms
attach_observer(observer, tag=None)

Attaches an observer to the ensemble.

Parameters: observer (BaseObserver) – observer instance to attach tag – name used in data container
boltzmann_constant

Boltzmann constant $$k_B$$ (see parameters section above)

Return type: float
calculator

calculator attached to the ensemble

Return type: BaseCalculator
data_container

data container associated with ensemble

Return type: DataContainer
data_container_write_period

data container write period

Return type: float
do_canonical_swap(sublattice_index, allowed_species=None)

Carries out one Monte Carlo trial step.

Parameters: sublattice_index (int) – the sublattice the swap will act on allowed_species (Optional[List[int]]) – list of atomic numbers for allowed species None
do_sgc_flip(chemical_potentials, sublattice_index, allowed_species=None)

Carries out one Monte Carlo trial step.

chemical_potentials
chemical potentials used to calculate the potential
difference
sublattice_index
the sublattice the flip will act on
allowed_species
list of atomic numbers for allowed species
Return type: None
do_vcsgc_flip(phis, kappa, sublattice_index, allowed_species=None)

Carries out one Monte Carlo trial step.

Parameters: phis (Dict[int, float]) – average constraint parameters kappa (float) – parameter that constrains the variance of the concentration sublattice_index (int) – the sublattice the flip will act on allowed_species (Optional[List[int]]) – list of atomic numbers for allowed species None
ensemble_parameters

Returns parameters associated with the ensemble.

Return type: dict
get_random_sublattice_index(probability_distribution)

Returns a random sublattice index based on the weights of the sublattice.

Parameters: probability_distribution – probability distributions for the sublattices int
observer_interval

minimum number of steps to run Monte Carlo simulation without interruption for observation

Return type: int
observers
Return type: Dict[str, BaseObserver]
probabilities

Ensemble propabilities

Return type: float
random_seed

seed used to initialize random number generator

Return type: int
reset_data_container()

Resets the data container and the trial step counter.

run(number_of_trial_steps, reset_step=False)

Samples the ensemble for the given number of trial steps.

Parameters: number_of_trial_steps (int) – number of MC trial steps to run in total reset_step (bool) – if True the MC trial step counter and the data container will be reset to zero and empty, respectively.
sublattices

sublattices for the configuration being sampled

Return type: Sublattices
temperature

Current temperature

Return type: float
total_trials

number of Monte Carlo trial steps

Return type: int
trial_steps_per_ensemble

Number of Monte Carlo trial steps for each ensemble

Return type: Dict[str, float]
update_occupations(sites, species)

Updates the occupation vector of the configuration being sampled. This will change the state of the configuration in both the calculator and the configuration manager.

Parameters: sites (List[int]) – indices of sites of the configuration to change species (List[int]) – new occupations (species) by atomic number ValueError – if input lists are not of the same length
user_tag

tag used for labeling the ensemble

Return type: str
write_data_container(outfile)

Updates last state of the Monte Carlo simulation and writes DataContainer to file.

Parameters: outfile (Union[str, Binaryio, Textio]) – file to which to write