text:
# Start a new discussion

## Not signed in

Want to take part in these discussions? Sign in if you have an account, or apply for one below

## Site Tag Cloud

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

• CommentRowNumber1.
• CommentAuthorUrs
• CommentTimeSep 18th 2012
• (edited Sep 18th 2012)

created diagram chasing lemmas - contents (with some information on what implies what) and included it as a floating TOC into the relevant entries.

• CommentRowNumber2.
• CommentAuthorTobyBartels
• CommentTimeSep 21st 2012

If lemma A implies lemma B, is it because B is very easy to prove using A, or because every diagram to which B applies is a diagram to which A applies (and then applying A gives B’s result), or because these lemmas are true only in some categories and lemma B holds in every category in which lemma A holds, or what?

• CommentRowNumber3.
• CommentAuthorUrs
• CommentTimeSep 21st 2012

The first.

The salamander lemma makes the mechanism behind all these lemmas clear, they are simple corollaries once the salamander lemma is there.

And that the five lemma is the four lemma applied twice is standard and almost by definition. In fact the nLab entry on five lemma originally just listed three cases, the first two are what is called the four lemma, the third is “1 and 2 combined”. I made four lemma a separate entry, four I think it deserves one.

• CommentRowNumber4.
• CommentAuthorTobyBartels
• CommentTimeSep 21st 2012

four I think it deserves one

(^_^)

• CommentRowNumber5.
• CommentAuthorzskoda
• CommentTimeSep 23rd 2012
• (edited Sep 23rd 2012)

Could somebody comment on terminology “4-lemma” ? I learned the five lemma from Cartan-Eilenberg when I was 20 year old, so this is one of my romantic early memories on advanced mathematics. By five lemma there in my memory they meant the statement listing the two dual cases which are here quoted as 4-lemma. Bourbaki also (Homological algebra, 1980) says five lemma for precisely what is here 4-lemma. The iso case is just a trivial special case of the combination of the two, and Bourbaki singles out a remark of even more special case that in particular if f1,f2,f4,f5 are all isos then f3 is so. Of course CE and here have the intermediate case of generality. Newer books often just do that iso special case and say 5-lemma what always made me uneasy as it is weaker.

Is 4-lemma terminology also old ? I admit that the terminology 4-lemma is completely new to me. Anybody ?

• CommentRowNumber6.
• CommentAuthorUrs
• CommentTimeSep 23rd 2012
• (edited Sep 23rd 2012)

Lemmas ch I 3.2, 3.3 and ch XII 3.1 in Mac Lane’s Homology.

• CommentRowNumber7.
• CommentAuthorjim_stasheff
• CommentTimeSep 24th 2012
Are you saying Mac lane calls it (or something else) 4-lemma?
I agree with Zoran - never heard of such a thing.
• CommentRowNumber8.
• CommentAuthorzskoda
• CommentTimeSep 24th 2012
• (edited Sep 24th 2012)

Thanks Urs for the reference, though it does not resolve the terminology issue yet. I have a Russian edition of MacLane’s Homology, and he calls it Lemma on five homomorphisms there 3.3, for precisely in (i),(ii) what is here called 4-lemma. He indeed has also something what he calls “strong lemma on 4 homomorphisms”, 3.2 but which is different from the statement called 4-lemma in $n$Lab in five lemma entry. He has a diagram with 4 homomorphisms, and makes an assertition about the comparison of sizes of kernel and image of the central two vertical arrows and assigns that one to J. Leight (Leicht ?) or so (I do not know the spelling as it is russified).

• CommentRowNumber9.
• CommentAuthorTim_Porter
• CommentTimeSep 24th 2012

For information on the terminology: page 364 of Mac Lane’s Homology, lemma 3.1 is called the weak Four Lemma, 3.2. is the 3x3 lemma and 3.3 is the sharp 3x3 lemma. Lemma I.3.2 (page 14) is called the Strong Four Lemma.

I found it interesting that Mac Lane refers to Lubkin’s representation theorem from 1960. Can anyone shed light on the history of the Lubkin-Freyd-Michell theorem, as I should know that history but seem not to! I had not looked at Mac Lane recently.

• CommentRowNumber10.
• CommentAuthorUrs
• CommentTimeSep 24th 2012
• (edited Sep 24th 2012)

Yes, the strong four lemma compares the sizes of the kernels and cokernels. This implies the weak four lemma.

I still want to put this weak/strong distinction into the entry, but I am too busy with other things. Maybe somebody feels like helping.

You can just copy it from MacLane. Or you copy it from Salamander lemma – Implications – Four lemma where in fact the strong four lemma is derived in the proof.

• CommentRowNumber11.
• CommentAuthorUrs
• CommentTimeSep 24th 2012

I still want to put this weak/strong distinction into the entry,

Now I did.

• CommentRowNumber12.
• CommentAuthorzskoda
• CommentTimeSep 25th 2012
• (edited Sep 25th 2012)

This is helpful. Now we have at four lemma both the weak and strong versions, in the terminology of MacLane. On the other hand, MacLane, Bourbaki and Cartan-Eilenberg still call 5-lemma Lemma 1, both parts in five lemma entry. Thus the four lemma in entry four lemma, neither weak nor strong version agrees with what is called four lemma in entry five lemma. Is there still a reason in literature to say four lemma for Lemma 1 (i) in entry five lemma ?

• CommentRowNumber13.
• CommentAuthorUrs
• CommentTimeSep 25th 2012
• (edited Sep 25th 2012)

the four lemma in entry four lemma, neither weak nor strong version agrees with what is called four lemma in entry five lemma.

They do agree. The five lemma is the four lemma applied to the left four columns and then to the right four columns of a five-column diagram.

• CommentRowNumber14.
• CommentAuthorzskoda
• CommentTimeSep 25th 2012
• (edited Sep 25th 2012)

Good, you are right, I misread the weak 4-lemma under entry four lemma (of course I know the obvious which part one applies at). But still even MacLane calls in Lemma 3.3 page 14 as five lemma what is here an in his later chapter called the weak four lemma together with iso corollary (he says the weaker form of iso statement where all are iso and then says, more precisely and lists what you call 4-lemma). That means that MacLane is hesitant in terminology.

• CommentRowNumber15.
• CommentAuthorUrs
• CommentTimeSep 25th 2012
• (edited Sep 25th 2012)

That means that MacLane is hesitant in terminology.

I am not sure what you are after. This is entirely standard terminology. It’s also on Wikipedia and on Mathworld, people use it on the SE forums and on blogs.

• CommentRowNumber16.
• CommentAuthorzskoda
• CommentTimeSep 25th 2012

Well, the original terminology (Cartan-Eilenberg etc. and still used when quoting the argument in practice in algebraic topology/geometry) is that if we assume 5 vertical arrows and suppose a version with two epis and one mono or two monos and one epi, then they call it 5-lemma. Now I see that new secondary sources use also 4-lemma (after inessentially throwing out one vertical morphism in assumptions, not used in proof). It seems the clarification by naming the intermediate step as 4-lemma may be due MacLane, for pedagogical purposes (hence popularity in wikipedia and alike). Still if $n$Lab does not allow the original usage as well (that is that the 5-lemma includes the case with two epis, not only the iso corollary) we do not support the usage in many many references. Both terminologies seem to have place and one should write the historical remarks, including all variants in terminology.

• CommentRowNumber17.
• CommentAuthorUrs
• CommentTimeSep 25th 2012

You are now saying that there is a statement missing at five lemma? Then please add it.

• CommentRowNumber18.
• CommentAuthorUrs
• CommentTimeSep 25th 2012

By the way, I find this suggestion that the word “four lemma” is used only for “pedagogical purposes” wrong. The four lemma is the stronger, more general and sharper result. It has four vertical maps instead of five. It is by all accounts most reasonable not to conflate it with the five lemma.

But I guess we have discussed that sufficiently now. Let me know when you add more content to five lemma.

• CommentRowNumber19.
• CommentAuthorjim_stasheff
• CommentTimeSep 25th 2012
Yes, most reasonable not to conflate it with the five lemma.''
• CommentRowNumber20.
• CommentAuthorzskoda
• CommentTimeSep 25th 2012
• (edited Sep 25th 2012)

Yes, Urs, the thing is that it is conflated in the present version of five lemma (unlike in MacLane’s book where lemma 3.3 on page 14 has it clear) while I am happy with the entry four lemma which does not conflate. I will deconflate it when i can. I have the feeling that you still did not understand my point. I learned some things about terminology and strong version of four lemma thanks to this, but still I am not clear about the history here and true level of appearance of new terminology.

• CommentRowNumber21.
• CommentAuthorzskoda
• CommentTimeSep 25th 2012
• (edited Sep 25th 2012)

I have made the careful work, please check now if you agree.

The present version in five lemma is what I will be happy with as it agrees with the literature which I have seen so far. I have also added MacLane 1963, Bourbaki 1980, Cartan-Eilenberg 1956 and Borceux-Bourn to the references.

Lemma (the lemma on five homomorphisms or the five lemma)

1. sharp five lemma (essentially the weak four lemma)

1. If $f_2$ and $f_4$ are epi and $f_5$ is mono, then $f_3$ is epi.

2. If $f_2$ and $f_4$ are mono and $f_1$ is epi, then $f_3$ is mono.

2. (weak) five lemma (conjunction of the two statements above)

If $f_2$ and $f_4$ are isos, $f_1$ is epi, and $f_5$ is mono, then $f_3$ is iso.

The weak four lemma is another terminology (cf. MacLane, Homology) for the same as 1.1 and 1.2 except that in 1.1 $f_1$ is not required to exist, and in 1.2 $f_5$ is not required to exist (see four lemma), where the dropped requirements are inessential as not used in the proof. The four lemma follows directly also with the salamander lemma, as discussed at salamander lemma - impliciations - four lemma. The following is a direct proof.

+++++++++++++++++++++++

P.S. By the way, I said pedagogical because anybody who ever read the proof of (strong version of) five lemma knows that the existence of fifth vertical arrow is not important for strong version of the half of the statement. Formulating the well known as a separate fact is for pedagogical (clarification of exposition and memorizing) purposes I think, as it is anyway practically always used when the ladder can be prolonged. It is obvious of course that it is formally stronger.

I should also note that Cartan-Eilenberg 1956 (what is the most influential historical reference on classical homological algebra) has, as I just checked, only 1.1 and 1.2 as five lemma (proposition 1.1, page 5), while not even mentioning second, weaker, combined, statement. Massey’s simple book has only the weaker statement. The author of what MacLane calls strong 4-lemma is in English spelling J. LEICHT. The name is in MathReviews with three listed references

• MR0266949 Lorenz, F.; Leicht, J. Die Primideale des Wittschen Ringes. (German) Invent. Math. 10 1970 82–88. (Reviewer: H. Gross) 15.70 (12.00)

• MR0080695 Leicht, J. Über ZPE-Ringe in der algebraischen Geometrie. (German) Monatsh. Math. 60 (1956), 214–222. (Reviewer: P. Samuel) 10.0X

• MR0078002 Leicht, J. Über die Mannigfaltigkeit der reduziblen quadratischen Formen. (German) Monatsh. Math. 60 (1956), 123–129.

It is not clear if any of the three has the lemma, or his contribution is a folklore fact known more precisely to MacLane…

• CommentRowNumber22.
• CommentAuthorUrs
• CommentTimeSep 25th 2012

Looks good, thanks.

• CommentRowNumber23.
• CommentAuthorTodd_Trimble
• CommentTimeSep 25th 2012

Thanks for taking care with this, Zoran.

• CommentRowNumber24.
• CommentAuthorPeter Heinig
• CommentTimeJun 18th 2017
• (edited Jun 18th 2017)

Added a section to diagram chasing lemmas - contents, since this seemed the most fitting place for it, for the time being. Explanations in standout-box there should be sufficient.

• CommentRowNumber25.
• CommentAuthorTodd_Trimble
• CommentTimeJun 18th 2017

I suppose you want the square(s) on the right in lemmas about equalizers to be serially commutative.

I don’t understand (in the lemma about pushouts) why you need $\mathcal{C}$ on top of $C$ (in whatever font it was). Seems needlessly redundant; you could just say “diagram in $C$”.

• CommentRowNumber26.
• CommentAuthorTodd_Trimble
• CommentTimeJun 18th 2017

I’m a little conflicted as well about grafting these results onto a page where the original intention seems clearly to be about diagram-chasing in abelian categories. Undoubtedly these types of lemmas do deserve a place somewhere on the nLab.

• CommentRowNumber27.
• CommentAuthorTodd_Trimble
• CommentTimeJun 18th 2017

Actually, coming back to the lemma on equalizers, it seems worthwhile to note the converse as well, that if the top row is an equalizer, then the left square is a pullback.

• CommentRowNumber28.
• CommentAuthorPeter Heinig
• CommentTimeJun 18th 2017
> I’m a little conflicted as well about grafting these results onto a page where the original intention seems clearly to be about diagram-chasing in abelian categories

So am I. Hence the comment in the standout-box.
The page just was the most apt I found.
Would not be surprised if there was an "atlas" of such lemmas already.
Having such lemmas somehow connected to the phrase "diagram chasing",even after moving the (hopefully soon better developed) page, or creating a new page, seems advisable from the point of view of utility though:

"diagram chasing" for such things is something of an "attractor": people searching for statements like these will probably not know better than to search for that phrase. "diagram chasing" also seems something of a "pars pro toto" for such results; I have experienced people referring to anything in that direction by that phrase.

One could also see "diagram chasing" for such results as an "anachronym" like "blackboard", technically wrong, but pragmatically useful (from what I know of the history, such results tended to be mostly discovered in categories where there are elements).

Many thanks for the edits, by the way.
• CommentRowNumber29.
• CommentAuthorTodd_Trimble
• CommentTimeJun 18th 2017

Fair enough. Can’t think right now of a better thing to do, so it’s okay as a holding pattern.

• CommentRowNumber30.
• CommentAuthorUrs
• CommentTimeJun 18th 2017
• (edited Jun 18th 2017)

Wait. The entries with titles of the form

topic - contents

are being used as “floating tables of contents” in pulldown menus in the top right of the entries being linked to.

For instance if you go do salamander lemma you see a pulldown menu “Context – Diagram chasing lemmas” in the top right. Clicking on that shows the content of the file “diagram chasing lemmas - contents”.

Therefore this file must contain a vertically-ordered list of hyperlinked keywords .. and nothing else.

If you have a further diagram-chasing-like lemma to add you need to

2. add the page’s name (and nothing else) to the list at “diagram chasing lemmas - contents”.

Therefore I needed to undo your edit in the file, but the content is still kept here. Just copy-and-paste the relevant bits into a new entry.

• CommentRowNumber31.
• CommentAuthorUrs
• CommentTimeJun 18th 2017
• (edited Jun 18th 2017)

And maybe the best entry to include the new material is at pasting law.

• CommentRowNumber32.
• CommentAuthorPeter Heinig
• CommentTimeJun 19th 2017
Thanks. Did not know about the floating toc, learned something new.

> And maybe the best entry to include the new material is at pasting law.

Thanks. Included it there. The lemma about the jointly monic span is indeed very similar to one of the pasting lemmas. Will think about how to comment on this within the diagram-chase-like-lemma-collection, when I get round to doing so.
• CommentRowNumber33.
• CommentAuthorUrs
• CommentTimeJun 19th 2017

Okay. I have added proposition-environments at pasting law.

And the statement about pushouts of strong monomorphisms I moved, since this is is not an example of a pasting law, as far as I see. I copied it to pushout here and to strong monomorphism here.

• CommentRowNumber34.
• CommentAuthorPeter Heinig
• CommentTimeJun 20th 2017

Thanks. More or less in the same spirit, added to pullback some elementary preservation statements. The intent is to add to the nLab some collection of statements which is more systematic and reference-work-like than statements “pullbacks of monos are monos” used within other contexts.

• CommentRowNumber35.
• CommentAuthorUrs
• CommentTimeJun 20th 2017
• (edited Jun 20th 2017)

Peter, the pasting statement is already in the entry, in the section above the one you added. For all the other statements which you added “the right square is irrelevant”, as you note, so I suggest that you remove the right square and just talk about pullback of monomorphisms.

• CommentRowNumber36.
• CommentAuthorUrs
• CommentTimeJun 20th 2017

I have edited accordingly, here.

• CommentRowNumber37.
• CommentAuthorPeter Heinig
• CommentTimeJun 20th 2017

Thanks for the edits.

format: plain


text:
# Math Help - Arithmetic sequence

1. ## Arithmetic sequence

The first term of an arithmetic sequence is 30 and the common differenc eis -1.5.
a) Find the value of the 25th term.

The rth term of the sequence is 0.
b)Find the value of r.

The sum of the first n terms of the sequence is Sn.

c) Find the largest postitive value of Sn.

i worked out a and b but got stuck with c. Any help!

2. Originally Posted by thereddemon
The first term of an arithmetic sequence is 30 and the common differenc eis -1.5.
a) Find the value of the 25th term.

The rth term of the sequence is 0.
b)Find the value of r.

The sum of the first n terms of the sequence is Sn.

c) Find the largest postitive value of Sn.

i worked out a and b but got stuck with c. Any help!
Part c will be the sum of terms from the first term to your answer to part b which will be the sum of all the positive terms hence the most positive

3. Hello, thereddemon!

Another approach . . .

The first term of an arithmetic sequence is $a = 30$
. . and the common difference is $d = \text{-}1.5$

The sum of the first $n$ terms of the sequence is $S_n.$

c) Find the largest postitive value of $S_n.$
Formula: . $S_n \;=\;\frac{n}{2}\bigg[2a + (n-1)d\bigg]$

We have: . $a = 30,\;d = \text{-}1.5$

. . $S \:=\:\frac{n}{2}\bigg[2(30) + n(-1.5)\bigg] \quad\Rightarrow\quad S \:=\:30n - 0.75n^2$

This is a down-opening parabola; its maximum is at its vertex.

. . The vertex is at: . $n \:=\:\frac{\text{-}b}{2a} \:=\:\frac{\text{-}30}{2(\text{-}0.75)} \:=\:20$

Therefore, maximim $S$ is: . $S \:=\:30(20)+0.75(20^2) \;=\;300$


text:
# Remarks on the thin obstacle problem and constrained Ginibre ensembles

@article{Karakhanyan2017RemarksOT,
title={Remarks on the thin obstacle problem and constrained Ginibre ensembles},
author={Aram L. Karakhanyan},
journal={Communications in Partial Differential Equations},
year={2017},
volume={43},
pages={616 - 627}
}
• A. Karakhanyan
• Published 1 February 2017
• Mathematics
• Communications in Partial Differential Equations
ABSTRACT We consider the problem of constrained Ginibre ensemble with prescribed portion of eigenvalues on a given curve Γ⊂ℝ2 and relate it to a thin obstacle problem. The key step in the proof is the H1 estimate for the logarithmic potential of the equilibrium measure. The coincidence set has two components: one in Γ and another one in ℝ2∖Γ which are well separated. Our main result here asserts that this obstacle problem is well posed in which improves previous results in .
2 Citations
A nonlocal free boundary problem with Wasserstein distance
We study the probability measures $\rho\in \mathcal M(\mathbb R^2)$ minimizing the functional $J[\rho]=\iint \log\frac1{|x-y|}d\rho(x)d\rho(y)+d^2(\rho, \rho_0),$ where $\rho_0$ is a given
Log-gas equilibria with free boundary and optimal transport
We study the probability measures $\rho\in \mathcal M(\mathbb R^2)$ minimizing the functional $J[\rho]=\iint \log\frac1{|x-y|}d\rho(x)d\rho(y)+d^2(\rho, \rho_0),$ where $\rho_0$ is a given

## References

SHOWING 1-10 OF 12 REFERENCES
Remarks on a Constrained Optimization Problem for the Ginibre Ensemble
• Mathematics
• 2013
We study the limiting distribution of the eigenvalues of the Ginibre ensemble conditioned on the event that a certain proportion lie in a given region of the complex plane. Using an equivalent
Logarithmic Potentials with External Fields
• Mathematics
• 1997
This treatment of potential theory emphasizes the effects of an external field (or weight) on the minimum energy problem. Several important aspects of the external field problem (and its extension to
The real Ginibre ensemble with $k = O(n)$ real eigenvalues
• Mathematics, Computer Science
• 2015
A large deviations principle for the joint eigenvalue density of such matrices is demonstrated and a two phase log-gas whose stationary distribution coincides with the spectral measure of the ensemble is introduced.
The Real Ginibre Ensemble with $$k=O(n)$$k=O(n) Real Eigenvalues
• Mathematics
• 2016
We consider the ensemble of real Ginibre matrices conditioned to have positive fraction $$\alpha >0$$α>0 of real eigenvalues. We demonstrate a large deviations principle for the joint eigenvalue
Logarithmic Potentials with
• External Fields. Springer. Berlin. COMMUNICATIONS IN PARTIAL DIFFERENTIAL EQUATIONS
• 1997
Multivalent Functions. Cambridge Tracts in Mathematics and Mathematical Physics
• 1993


text:
# Publications

Found 116 results
Author Title [ Type] Year
Filters: First Letter Of Title is D  [Clear All Filters]
Articles in international peer reviewed journals
On the damped oscillations of an elastic quasi-circular membrane in a two-dimensional incompressible fluid. Journal of Fluid Mechanics. 2014;746:300-331.Edit
dAMUSE - A new tool for denoising and blind source separation. {DIGITAL SIGNAL PROCESSING}. 2005;{15}:{400-421}.Edit
Data Mining in Hiv-Aids Surveillance System Application to Portuguese Data. Journal of Medical Systems. 2017;4:41-51.Edit
Data-sparse approximation on the computation of a weakly singular Fredholm equation: A stellar radiative transfer application. Applied Numerical Mathematics. 2017;114:55-62.
Decidability and tameness in the theory of finite semigroups. Bull. Iranian Math. Soc.. 2008;34:1-22.Edit
On the decidability of iterated semidirect products with applications to complexity. Proc. London Math. Soc. (3). 2000;80:50-74.Edit
Decidability of the word problem in Yamamura’s HNN extensions of finite inverse semigroups. Semigroup Forum. 2008;77:163-186.Edit
Defect correction for spectral computations for a singular integral operator. Communications on Pure and Applied Analysis. 2006;5:241-250.Edit
Deformation theory and finite simple quotients of triangle groups I. Journal of the European Mathematical Society. 2014;16(7):1349-1375.Edit
Deformation theory and finite simple quotients of triangle groups II. Groups, Geometry, and Dynamics. 2014;8(3):811-836.Edit
Deformations of maximal representations in $\rm Sp(4,\Bbb R)$. Q. J. Math.. 2012;63:795-843.Edit
Degenerate Hopf bifurcation and nerve impulse. SIAM J. Math. Anal.. 1985;16:1121-1133.
Degenerate Hopf bifurcation and nerve impulse. II. SIAM J. Math. Anal.. 1989;20:1-12.
Degenerate Hopf bifurcation formulas and Hilbert's 16th problem. SIAM J. Math. Anal.. 1989;20:13-30.Edit
Delay in the diagnosis of tuberculosis. Rev Port Pneumol. 2015;Aug 17:346-348.Edit
Alencastre IS, Sousa DM, Alves CJ, Leitao L, Neto E, Aguiar P, et al. Delivery of pharmaceutics to bone: nanotechnologies, high-throughput processing and in silico mathematical models. EUROPEAN CELLS & MATERIALS. 2016;30:355-381.Edit
On the delta set and the Betti elements of a BF-monoid. Arab. J. Math. (Springer). 2012;1:53-61.Edit
Delta sets for nonsymmetric numerical semigroups with embedding dimension three. Forum Math.. 2018;30:15-30.Edit
Delta sets for symmetric numerical semigroups with embedding dimension three. Aequationes Math.. 2017;91:579-600.Edit
Dense heteroclinic tangencies near a Bykov cycle. Journal of Differential Equations. 2015; 259(11):5875-5902.
Dense ideal extensions of strict regular semigroups. Algebra Discrete Math.. 2006:67-80 (2007).Edit
Denseness of ergodicity for a class of volume-preserving flows. Port. Math.. 2011;68:1-17.
Density of first Poincaré returns, periodic orbits, and Kolmogorov-Sinai entropy. Commun. Nonlinear Sci. Numer. Simul.. 2011;16:863-875.Edit
Dependence of magnetic field generation by thermal convection on the rotation rate: a case study. Physica D: Nonlinear Phenomena. 2010;239(13):1188-1209.Edit
Derivations of a parametric family of subalgebras of the Weyl algebra. J. Algebra. 2015;424:46-97.Edit


text:
# In Period 2 of the Periodic Table, which Group contains the element with the highest first ionization energy?

Jan 19, 2017

Surely it is $\text{neon}$?

#### Explanation:

We examine the rxn:

$\text{Element(g)"+Delta rarr"Elemental cation(g)} + {e}^{-}$

Ionization energy increases across a Period (from left to right as we face the Table). It decreases down a Group.

This is one of the most important manifestations of Periodicity. Incomplete electronic shells shield the nuclear charge very imperfectly, with the result that across the Period the atomic radius is known to decrease. When we reach the Noble Gases, however, the valence shell is full. And maximum attraction results between the nuclear charge and the valence electrons.

Anyway, as chemists, as physical scientists, we are obliged to look up the numbers, to see if the data agree with our notions of chemistry. And if they don't then our understanding is awry.

And thus neon, with the greatest nuclear charge of the 2nd period, has the corresponding greatest ionization energy of the Period. Clearly, this property is shared by all the Noble Gases.


text:
Not really blogging

A. Makelov

Arbitrarily biasing a coin in 2 expected tosses

Here’s a neat probability trick that I learned from Konstantin Matveev and which, I think, everybody mildly interested in math should know about:

Problem. Given a fair coin, how do you (efficiently) generate an event $E$ with probability 1/5?

Solution. We can, of course, toss the coin three times, giving us a total of 8 possibilities, then discard our least favorite 3 of them, and weigh the remaining  5 possibilities equally. This algorithm requires an expected number of tosses equal to $3\times 8/5=24/5$. But, what if instead of $1/5$, we have $1/1000000$? You can easily see that the expected number of tosses to emulate a probability of $1/n$ grows logarithmically with $n$. But even worse, what if we had $1/\pi$? Well, here’s a trick that gets rid of both of these problems: let

$\frac{1}{5} = \displaystyle\sum_{i=1}^\infty \frac{a_i}{2^i}$

for $a_i\in \{0,1\}$ be the binary expansion of $1/5$. Then, start tossing the coin until it lands heads, at some time $I$. If $a_I=1$, declare that $E$ has occurred; otherwise, $E$ has not occurred. Then clearly

$\mathbb{P}[E]=\displaystyle\sum_{i=1}^\infty \mathbb{P}[E\ \big| \ I=i]\mathbb{P}[I=i]=\displaystyle\sum_{i=1}^\infty \frac{a_i}{2^i}=\frac{1}{5}$

Furthermore, notice that $\mathbb{E}[I]=2$, regardless of the probability we want to emulate! Well, that seems pretty efficient. When you think about it some more, it really appears to be mind-boggling – you can emulate extremely small, or irrational, probabilities with just two expected tosses. Moreover, you don’t need to have the binary expansion of the probability in advance – you can pass the next digit depending on the status of your experiment.

Combining this with a standard unbiasing technique, say von Neumann unbiasing,, this gives you a very simple procedure that given a biased coin that lands heads with probability $0, allows you to simulate a biased coin that lands heads with probability $0 for any other $q$. Any binary source of randomness is convertible to any other such source.

But we haven’t said anything about the efficiency of unbiasing. There, we can’t do as well as in biasing: there is a fundamental obstacle, the information-theoretic limit. Roughly speaking, the amount of information a biased coin tells us is always strictly less than the amount of information we get from an unbiased coin – this is why biasing is easier than unbiasing. Fortunately, there is a procedure that lets us extract an unbiased stream of bits that on average achieves the best performance theoretically possible: see this paper by Mitzenmacher to learn more.

I guess the moral of all this is the following: if you’re stuck on a deserted island with $\pi -1$ other people, you need to decide who the first to be eaten is, and all you have in your random arsenal is a suspicious-looking coin handed to you by one of your shipmates, do not despair – you can still make sure you have a fair chance of surviving the day.

mathbabe

Exploring and venting about quantitative issues

Rational Altruist


text:
# Notional V2 Technical Deep Dive Part 2: Trading Actions

In this series of posts, I will walk you through the Notional V2 smart contracts. The goal of these posts is to help technically minded users and developers better understand a large and complex codebase (~12,000+ lines of Solidity!). In part 1, we described the Notional V2 fCash Market. This is the second post of the series where we will walk through what happens when a user lends or borrows by interacting with one of those fCash markets.

A typical user interaction on Notional V2 will likely involve multiple steps: depositing a currency (i.e. DAI, cDAI, ETH, etc), trading for fCash, and withdrawing cash. Like Notional V1, Notional V2 batches these actions up into a single transaction to give the user a better experience and reduce their gas costs. This post will walk through the batchBalanceAndTradeAction method.

The BalanceActionWithTrades parameter is an array of structs that specifies what actions the user wants to take on every currency.

For the rest of the post, I will walk through the steps of batchBalanceActionAndTrade. Just note that there are other methods like batchBalanceAction, settleAccount, depositUnderlyingToken, depositAssetToken, and withdraw (the latter four methods are in AccountAction.sol) that function in much the same way. The website will tend to use batchBalanceActionAndTrade so that is what's described here.

## Settlement

Account Context and Settlement will be described in depth in their own blog posts but I'll quickly summarize what is happening here.

When an account has fCash that is matured (i.e. it's maturity date is in the past), we convert that fCash into a cash balance. A lender will have a positive cash balance which they can withdraw. A borrower will have a negative cash balance that they have to repay. Since cash balances are denominated in "asset cash" that accrues interest, lenders and borrowers will be earning (or paying) a variable rate of interest after maturity. Settlement is a larger topic that will get it's own post, but it's sufficient to say that before any trading occurs we must settle fCash assets if they have matured.

## Balance State

Each currency in Notional V2 is identified by a unique integer rather than a token address. A uint16 takes up much less storage space than a token address and also allows currencies to be easily sorted which is useful in some contexts. For example, on these lines we require that inputs to the batchBalanceActionAndTrade method are sorted by currencyId.

In _preTradeActions, the balanceState object is loaded with the account's balance of a the specified currency and we apply any settled cash amounts accordingly. The requirement for sorted currency ids allows us to only require one pass through the settleAmounts array (which is also sorted by currencyId) to apply settled cash balances.

## Deposit Actions

Similar to how Compound wraps collateral into cTokens to ensure that collateral generates yield, Notional V2 wraps deposits into either "asset cash" (cTokens) or nTokens (Notional V2's liquidity token). DepositActionType specifies how a user's deposit should be handled.

Note that depositActionAmount is specified in different "precision" depending on the DepositActionType specified. Notional V2 tracks all internal balances with 8 decimal places. This significantly reduces the storage space required to track balances (18 decimal places balances require larger storage slots) and also reduces storage loads which would be required to determine the decimal places of different currencies (i.e. 6 decimals for USDC vs 18 decimals for DAI). When the code base refers to "internal precision" it means that it expects a particular value to be denominated in 8 decimal places. Conversely, "external precision" means that it expects the value to be denominated in the currency's native decimal precision (i.e. 6 for USDC, 18 for DAI).

Note that Notional V2 will never hold underlying tokens (i.e. DAI). When a user deposits an underlying token like DAI, it will be immediately wrapped to it's "asset cash" equivalent (i.e. cDAI). Also note that when depositing "asset cash" tokens like cDAI, the transfer is recorded in memory and deferred until balanceState.finalize is called later in the transaction. This is a bit of a gas optimization to ensure that only one ERC20 token transfer occurs on the net amount of tokens for the entire transaction (rather than one for deposit and one for withdraw).

This post won't discuss minting of nTokens, that will be covered in a subsequent post. It may seem odd that RedeemNToken is considered a DepositActionType since redeeming nTokens is analogous to withdrawing liquidity, however, having this happen before trading occurs in the next step ensures that the resulting cash balance is available to users for trading.

After deposits, we execute fCash trades via the TradingAction library. There are two flavors of fCash trading depending on the account's portfolio type which is out of scope for this post. There are also other specialized trading actions such as PurchaseNTokenResidual and SettleCashDebt which are out of scope for this post. They will be discussed in a post on settlement and market initialization.

In this section we'll focus on executeTradesArrayBatch which is similar enough to executeTradesBitmapBatch to communicate the idea. In this method, we iterate over each tightly packed bytes32 element in the bytes32[] trades array. Each trade is defined differently depending on the type in the first byte, the TradeActionType. How the bytes are packed is described here:

• tradeActionType: first byte (big endian) which defines how the rest of the bytes will be decoded.
• marketIndex: a numerical id between 1 to 7 that defines the tenor of the fCash market being traded.
• fCashAmount: a uint88 amount of fCash to be traded. Note that this is a positive amount regardless of whether the trade is a lend or borrow.
• assetCashAmount: a uint88 amount of cash to be deposited into an fCash Market when providing liquidity.
• minImpliedRate or maxImpliedRate defines the minimum or maximum rate the trade will occur. This allows users to blunt the effects of front running their trades. If set to zero then no rate limit will be applied. When providing liquidity, both values can be set .

Each trade is executed in the order specified and will accumulate a net cash position in the specified currency. The reason we chose to structure the code this way is to allow users to trade across multiple fCash Markets in a single transaction. This allows a user to create trades where they borrow at a 1 year fCash market to lend at 3 month fCash market for example. These types of trades can give the user a lot of leverage for speculating on interest rates.

Since Notional V2 allows users to provide liquidity passively using nTokens, most users will not opt to provide liquidity directly to markets. However, there are scenarios where users may find it more profitable to provide liquidity directly to markets and so these methods are made available.

_executeLiquidityTrade is fairly straightforward. It loads a market object into memory, updates the state in memory via addLiquidity or removeLiquidity, and updates the user's portfolio. Note that when removing liquidity, a negative amount of liquidity tokens is added to the portfolio (without allowing the portfolio's tokens to go negative).

The following lines of code are worth a bit more color:

Specifying a zero cashAmount when providing liquidity will dump all the accumulated net cash into the specified market as liquidity. A couple use cases for this would be removing liquidity in one market to "roll" it into another one. Another might be to borrow from one market to provide liquidity to another.

Most of the complexity with lending and borrowing on Notional V2 is abstracted inside the calculateTrade method. See part 1 of this series for an in depth dive into how fCash trades are calculated. Otherwise, _executeLendBorrowTrade is pretty straightforward.

### Updating Portfolio State

All trades calculated above are done in memory in the TradingAction library. executeTradesArrayBatch returns the updated in memory PortfolioState and the aggregate netCash required from the trades.  A check is done to ensure that the account actually has enough cash to pay for its trades and then the account balances are updated accordingly.

After all currencies have been processed, the portfolio and account context are updated in the storeAssetsAndUpdateContext method call.

It's worth noting that if the executeTradesBitmapBatch method had been called instead, the account's portfolio would have been updated in storage inside the TradingAction library. Without going into more depth, bitmap portfolios can hold more fCash assets of a single currency than an array portfolio. They are also restricted from holding liquidity tokens. We will go into more depth on bitmap portfolios in a post on Advanced Trading in Notional V2.

## Withdraws

Withdraws in each currency are defined by these three parameters:

• withdrawAmountInternalPrecision: This specifies the amount of cash to be withdrawn unless withdrawEntireCashBalance is set to true.
• withdrawEntireCashBalance: As discussed in the fCash Markets post, fCash Markets only calculate exchange rates from fCash to cash amounts. Because transactions are finalized asynchronously and depend on the block time, it's not possible to predetermine exactly how much cash will be lent or borrowed in a given transaction. Setting this field to true will cause any residual cash balance to be withdrawn back to the user's wallet. For example, when lending 110 fDAI, the user deposits 100.5 DAI (perhaps expecting that it actually requires 100 DAI). Perhaps the trade finalizes at 100.025 DAI, the remaining 0.475 DAI will be withdrawn back to the user's wallet, leaving them with exactly 110 fDAI and 0 DAI in Notional V2. A similar dynamic will occur when borrowing.
• redeemToUnderlying: This is used in conjunction with withdrawEntireCashBalance to specify if the amount withdrawn should be redeemed to the underlying token or not. As discussed in the fCash Markets post, all balances in Notional V2 are held in money market funds (such as Compound) so users accrue passive interest. redeemToUnderlying will convert cTokens to the underlying token before transferring to the user.

The balanceState.finalize method call will take the following steps:

• Ensure that nToken balances cannot become negative.
• Ensure that cash balances can only become negative as a result of settlement.
• Finalize ERC20 transfers as required, redeeming to underlying tokens if necessary. Note that we must be careful to ensure that amounts are denominated in the correct internal or external decimal precision at each step.
• Mint incentives if the nToken balance changes. The actual incentive calculation will be discussed in the nToken post.
• Update contract storage for nToken and cash balances.
• Set a flag denoting if a currency is "active". An account may have up to 10 currencies that they actively hold fCash, nToken or cash balances in. If the balances are reduced to zero during this method, this currency is marked as "not active in balances" in the active currencies list. If the account also does not hold actively hold fCash or liquidity tokens in that currency, then the currency is removed from the list. A more in depth discussion of the Account Context will be in a separate post.
• If the cash balance is negative, set the hasDebt flag to true for HAS_CASH_DEBT. This flag is used to check if an account requires a free collateral check.

## Finalizing the Transaction

Before completing the transaction, we update any settleAmount balances that have not been net off in _preTradeActions and call setAccountContext to ensure that all account state is properly updated. The final step is to check if the account has any debt and do a free collateral check.

A free collateral check will determine if an account can complete the transaction given it's current collateral. Since a free collateral check can cost upwards of 40k gas we only run it for accounts that have debt. Since we don't scan all the account's assets to determine this, it is absolutely critical that the hasDebt flag is always set properly. The mechanics of the free collateral check are discussed in a separate post on the Notional V2 valuation framework.

## Wrapping Up

This post discussed how complex trades can be accomplished on Notional V2 in a single transaction. If batchBalanceActionAndTrade does more than the user requires, a la carte methods are available for just depositing or withdrawing assets. Because we cannot calculate exactly how much net cash an account will have after lending or borrowing fCash, batchBalanceActionAndTrade ensures that the user's account can remain free of gas inefficient "dust" amounts.

TechnicalDeep Dive

### Jeff Wu

Co-Founder and CTO


text:
# Introduction

Nine Mens's Morris (also called Mills) is a board game for two players which is played on the following board (image taken from the linked Wikipedia-page):

Each player has 9 men, colored black and white. The concrete rules are not important for this challenge, but check out the Wikipedia-page if you are interested.

# The Challenge

Given a grid as input, which represents a certain boardstate, output the total mill count m with 0<=m<=8.
Three men of the same color form a mill when they are in a straight row of connected points. b2 to f2 is not a mill since the men are of different color. Also d2 to d5 would not form a mill since the three points have to be connected.
The board in the image above contains two mills for example. One from f2 to f6 and one from e3 to e5.

# Input

The board is represented as a 2D grid with 24 points which are connected as shown in the example image above. The example uses letters from a-g for the columns and numbers from 1-7 for the rows, but you may choose any reasonable input format as long as it maps 24 unique coordinates to one of the following states:

• Empty
• Taken by black
• Taken by white

The concrete repersentation is up to you you are not restricted to "b" or "w" for the colors.

• You don't have to map the points by any kind of values. If you want to take the input as a 2D array, that's fine as well. But keep in mind that not all points in there are used and that you have to consider the connections between them.
• The input might be empty, in which case you have to output zero (empty board -> no mills).
• Since each player has 9 men, the input will never contain more than 18 taken points.
• You may leave out emtpy points in the input and therefore only input points which are taken.
• The input may be ordered in any way. You can't rely on a specific order.
• You may assume that the input will always be valid. This means that there won't be more than 9 men of each color and that each point will be unique.

# Rules

• Make clear which input format you use in your solution. Providing an example run of your program is hightly encouraged.
• Function or full program allowed.
• Default rules for input/output.
• Standard loopholes apply.
• This is , so lowest byte-count wins. Tiebreaker is earlier submission.

# Test cases

The input format here is a list of tuples with the coordinates as in the example above as first element and the state of the point second element. A point taken by white is marked as "w" and a point taken by black as "b". All other points are left out and are empty.

[("a4","w"),("b2","b"),("b4","b"),("c4","b"),("d1","w"),("d2","w"),("e3","w"),("e4","w"),("e5","w"),("f2","b"),("f4","b"),("f6","b"),("g4","w")] -> 2
[("a1","b"),("a4","b"),("a7","b"),("b4","b"),("c4","b"),("d3","w"),("d2","w"),("d1","w")] -> 3
[] -> 0
[("b4", "b"),("a4",b"),("c4",w")] -> 0
[("b4", "b"),("a4",b"),("c4",b")] -> 1
[("a1", "b"),("a4", "b"),("a7", "b"),("b2", "b"),("b4", "b"),("b6", "b"),("c3", "b"),("c4", "b"),("c5", "b"),("e3", "w"),("e4", "w"),("e5", "w"),("f2", "w"),("f4", "w"),("f6", "w"),("g1", "w"),("g4", "w"),("g7", "w")] -> 8

Happy Coding!

• Related - a little. Feb 17 '16 at 19:19
• I assume the colors must be contiguous as well as aligned, but it is a bit unclear. E.g. would d2, d3, d5 of the same color form a mill? Feb 18 '16 at 14:33
• @RobertBenson No it would not because d3 and d5 are not connected. Rules say: Three men of the same color form a mill when they are in a straight row of connected points.. I added some examples in this section tho to make it clear, thanks for the comment! Feb 18 '16 at 14:43

# JavaScript (ES6), 276228125117 105 bytes

a=>btoai·yø!9%z)ª»-ºü1j;ÝÈ%¥·¡ªÜ"·ç¹Ê1.replace(/.../g,b=>(a[b[0]]+a[b[1]]+a[b[2]])/3&1||'').length

(the above contains some unprintable ascii characters that won't show up here, so here's a version without the btoa that can be copied and run)

a=>'abcdefghijklmnopqrstuvwxajvdksglpbehqtwimrfnucox'.replace(/.../g,b=>(a[b[0]]+a[b[1]]+a[b[2]])/3&1||'').length

Breaks a reference string into letter triplets that match up with mill group keys. Input is in the form of an object, where keys are the letters a-x, starting from the bottom left and ending in the top right, moving left-to-right first. Values are 1 for white, -1 for black, and 0 for blank.

### Example

{b:1,d:-1,e:1,f:-1,i:1,k:-1,l:-1,m:1,n:-1,r:1,u:-1} => 2
{j:1,d:-1,k:-1,l:-1,b:1,e:1,i:1,m:1,r:1,f:-1,n:-1,u:-1,o:1} => 2
{a:-1,j:-1,v:-1,k:-1,l:-1,h:1,e:1,b:1} => 3
{} => 0
{k:-1,j:-1,l:1} => 0
{k:-1,j:-1,l:1} => 1
{a:-1,j:-1,v:-1,d:-1,k:-1,s:-1,g:-1,l:-1,p:-1,i:1,m:1,r:1,f:1,n:1,u:1,c:1,o:1,x:1} => 8

These examples are taken from OP's examples, converted to the letter-key and number-value object. The first is from the example image, while the others are from the example set.

• Nice job! You could compress the big string with atob. Feb 25 '16 at 22:52
• @ETHproductions Thanks! It seems to be using unprintable ascii characters though, so I'll include one without the btoa as well. Also found some other improvements that bring it down even more. Feb 25 '16 at 23:22

# APL (Dyalog Classic), 26 25 bytes

-1 thanks to FrownyFrog

≢{|∊(+/⍵⍪↓⍵),⊢/4 2⍴+⌿⍵}∩≢

Try it online!

The argument is a 3x3x3 array of 1(black), ¯1(white), and 0(empty). The first dimension is along the concentric squares' nesting depth. The other two dimensions are along the vertical and horizontal axis.

000---------001---------002
|           |           |
|  100-----101-----102  |
|   |       |       |   |
|   |  200-201-202  |   |
|   |   |       |   |   |
010-110-210     212-112-012
|   |   |       |   |   |
|   |  220-221-222  |   |
|   |       |       |   |
|  120-----121-----122  |
|           |           |
020---------021---------022

We have a mill whenever summation along any axis yields a 3 or ¯3, except we must discard the four corners when summing along the first axis.

{} is a function with implicit argument ⍵

↓⍵ is split - in our case it turns a 3x3x3 cube into a 3x3 matrix of nested length-3 vectors

⍵⍪↓⍵ takes the original cube and glues the 3x3 matrix of 3-vectors below it, so we get a 4x3x3 mixed array of scalars and vectors

+/ sums along the last axis; this has the combined effect of summing the original cube along the last axis (+/⍵) and summing it along the middle axis due to the split we did (+/↓⍵)

Now we must take care of the special case for the first axis.

+⌿⍵ sums along the first axis, returning a 3x3 matrix

4 2⍴ but we must not count the corners, so we reshape it to a 4x2 matrix like this:

ABC      AB
DEF  ->  CD
GHI      EF
GH  ("I" disappears)

now we are only interested in the last column (BDFH), so we use the idiom ⊢/

, concatenates BDFH to the matrix we obtained before for the 2nd&3rd axis (BDFH and the matrix both happen to have a leading dimension of 4)

∊ flattens everything we obtained so far into a single vector

| takes the absolute values

{ }∩≢ filters only the threes - the length (≢) of the input is always 3

≢ counts them

• Heh, I was just about to suggest that.
Apr 13 '17 at 10:43
• Can you join chat.stackexchange.com/rooms/52405/apl for a moment?
Apr 13 '17 at 11:39
• ≢{|∊(+/⍵⍪↓⍵),⊢/4 2⍴+⌿⍵}∩≢ is one shorter :) May 20 '18 at 15:27
• @FrownyFrog thanks! edited in
– ngn
May 20 '18 at 19:42

# Mathematica, 217 131 Bytes

While I'm sure this is not particularly competitive, here's an entry for you.

Count[Total/@{{a1,d1,g1},{b2,d2,f2},{c3,d3,e3},{a4,b4,c4},{e4,f4,g4},{c5,d5,e5},{b6,d6,f6},{a7,d7,g7},{a1,a4,a7},{b2,b4,b6},{c3,c4,c5},{d1,d2,d3},{d5,d6,d7},{e3,e4,e5},{f2,f4,f6},{g1,g4,g7}}/.#/.{"w"->1,"b"->2},3|6]&

Input example:

{a4 -> "w", b2 -> "b", b4 -> "b", c4 -> "b", d1 -> "w", d2 -> "w", e3 -> "w", e4 -> "w", e5 -> "w", f2 -> "b", f4 -> "b", f6 -> "b", g4 -> "w"}

Allowing single-character coordinate names trivially golfs off 51 characters, making this a 166 byte solution. Naming the players 1 and 2 rather than "w" and "b" golfs off 17 further characters.

So we get

Count[Total/@{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,a,j,v,d,k,s,g,l,p,b,e,h,q,t,w,r,i,m,f,u,n,c,o,x}~Partition~3,3|6]/.#&

• If I understand the input formatting rules correctly, you should be able to take them in as 1 and 2. the example used w and b, but I'm fairly certain we're not restricted to that. Feb 22 '16 at 19:44
• @Mwr247 You are right. You can use any format you want, as long as it does not add additional information. I will clarify this when I'm home. Feb 22 '16 at 20:00

# APL (Dyalog Unicode), 50 bytes

### "The Objects' Solution"

While longer (29 chars) than @ngn's solution, it uses an entirely different approach: The input has the same overall structure as that solution, but all slots are represented as objects. Empty slots (including the non-existing center column) must be empty objects. while all black men must be references to the "black man" object, and all white men must be references to the "white man" object. All the objects may optionally have nice Display Forms for readability, and so the center column can optionally be made invisible.

+/1=(≢¨(,∪/,∪⌿⍤2),(⊢/4 2⍴∪⌿))

Try it online!

+/ the sum of

1=() ones in

≢¨() the tallys of

, the raveled (flattened)

∪/ unique sets across

, concatenated to

∪⌿⍤2 unique sets down

,() concatenated to

⊢/ the rightmost column of

4 2⍴ the, reshaped into four rows and two columns,

∪⌿ unique columnar sets

An atop operator, as supplied with AGL (ä), would bring the length down to 27 characters.


text:
I made this recently by searching for “hummus pasta salad” on google, taking inspiration for a recipe or two and then improvising with what I had. It’s surprisingly tasty! The flavours of each component stay relatively separated, so the better your olives/feta/tomatoes/hummus, the better your dish will be.

Pictured in tupperware because I was lazy

Ingredients:

• About 250g of pasta (e.g. Fusilli. Wholewheat is nice/optional)
• Three/four tablespoons of hummus. I make my own with this recipe.
• A bowl of cherry tomatoes
• Half a jar of olives (about 90g?)
• A single red pepper
• About 200g of feta, chopped (vegan option: omit!)
• A glove of garlic, chopped
• Spices (e.g. black pepper, paprika, basil)
• A bit of oil for frying

Instructions:

Add red pepper, half of the tomatoes and garlic to a frying pan, fry on a medium heat for a few minutes, then turn down to low and add the olives and spices.

Meanwhile, mix the hummus with water until it takes on the consistency of cheese sauce. If you didn’t add enough lemon juice before, now’s your chance!

When the tomatoes have just started to fall apart, add the pasta, the hummus and the rest of the tomatoes. Simmer for a few minutes (more if you made your sauce too thin), adding the feta halfway through.

Serve warm or cold!

# I hosted CollabPaint! And got annoyed at 4-years-ago-Joe.

### CollabPaint!

I put my old collaborative whiteboard project CollabPaint back up on the internet! Multiple people can log in to a room and paint at the same time, without having to register for an account or sign up.

You can set the size/colour/opacity for your brush and also draw lines, rectangles and ovals. There’s even a chat box and the option to save download the thing you draw.

I wrote CollabPaint about four years ago, and it was one of my first forays in to node.js and socket.io after CollabBox. Like all of my other projects, I never really polished it. It’s still missing a few things such as an undo button (and some overdue bugfixes…), but otherwise it gets the job done!

### On future-proofing Code and following best practice

Sadly I had trouble getting CollabBox to run, because I used old crusty versions of all the libraries and never made a package.json file to record which versions of what things I used, so everything is broken. But, here it is on github anyway.

If I could go back four years, I’d tell myself the following set of related things:

• Keep a record of which versions of everything you use, if you can
• When you start using a new language or ecosystem, make sure you actually look up the best practices for the things you’re using.
• For example, with node.js and npm, actually bother to write package.json files to track all your dependancies!

This kind of stuff should really go without saying, but it strikes me as interesting that – as a hobbyist coder four+ years ago – it didn’t really occur to me. So if you ever see your hobby-programmer kids writing code and they forget to make a package.json file, set them straight so they don’t make the same mistakes I did!

# Setting up shop, proximity mines and Dokku

I decided to bite the bullet and get myself an actual server on the internets to host my thingamabobs, and here I write about my experience.

I was pointed to Digital Ocean. $5/month/server for a 512MB an actual VPS on an SSD (actually,$0.007/hour since you can turn your server off and on), not bad!

Like other server providers, they let you create servers with pre-installed software like WordPress, and Dokku. Wait, Dokku? What’s that?

In the words of a friend:

I set one up at cloud.example.com. Then I git pushed a Go web app to cloud.example.com:goapp and it was up and running at goapp.cloud.example.com.

That sounds fun! So I decided to get my old WebMines game running with Dokku, and all it took was one change to the code (I had host the server on the port specified by the PORT environment variable), two files

requirements.txt (naming the versions of libraries I’ve used)

and Procfile (pointing to the name of the main file),

and two commands:

And done! My terrible, three year old long-polling-based Python-powered incomplete minesweepers game has a place on the internet, and when I want to update it, all I have to do is another git push. Be warned, it’s occasionally broken and doesn’t include a concept of points/success/failure.

Multiplayer Minesweeper!

As for hosting static pages like Plotter and Automa, all I had to do was make sure the main page was called index.php, and dokku figured out it was a php application and set up an ngnix server for me. This makes me very happy because it means I get to continue my run of never having have to learn how to actually set up a web server properly.
P.S: Once I get a bunch of my things up and running, I’ll probably do a post about it. Or just make a page for them and post about the page. Or maybe a post about how much I’m annoyed that NodeJS’s API has changed so much in three years that I basically have to rewrite half of everything I made back then, but how it’s really my fault for not keeping track of which versions of which modules and nodejs runtimes I was using for which app. *grumble*

# Removing dead files from iTunes

So, I made a blog. Mainly so I have a place to put my things. I used to have a website which I meticulously handcrafted and put all my stuff on, but it got wiped from the internet and now I’m significantly lazier, WordPress is a much more attractive option.

Without further ado, I begin the reverse chronological journey through the catalogue of Crap I Made with an underwhelming but still kind of useful entry: an AppleScript which goes through whatever songs you have selected in iTunes and removes any which don’t actually point to any files.

Here’s the gist. My first Applescript! Hacked together from various bits and pieces on The Internet. And because I feel it will make the blog post look nicer, I’ll put the code here too:

And here’s a python script to accompany it which goes through all your subfolders and deletes the newest of any two files which have the same name except for a different extension.

Can you guess what I’ve been doing today? That’s right, failing to import things in to iTunes properly and then writing code to patch up my mistakes. Could I have combined the two scripts in to a single applescript which actually does the job of hunting for duplicates and deleting the newest? Probably, yes.

Edit: want easy access to that AppleScript, or indeed any script for iTunes? /Library/iTunes/Scripts. Create the folder if it doesn’t exist already, then it’ll show up in a funky little scripts menu in the menubar.


text:
## Encyclopedia > Pochhammer symbol

Article Content

# Pochhammer symbol

In mathematics, the Pochhammer symbol
[itex](x)_n\,[/itex]
is used in the theory of special functions to represent the "rising factorial" or "upper factorial"
[itex](x)_n=x(x+1)(x+2)\cdots(x+n-1)[/itex]
and, confusingly, is used in combinatorics to represent the "falling factorial" or "lower factorial"
[itex](x)_n=x(x-1)(x-2)\cdots(x-n+1).[/itex]

The empty product (x)0 is defined to be 1 in both cases.

The falling factorial occurs in a formula which represents polynomials using the forward difference operator Δ and which is formally similar to Taylor's theorem of calculus. In this formula and in many other places, the falling factorial (x)k in the calculus of finite differences plays the role of xk in differential calculus. Note for instance the similarity of

[itex]\Delta (x)_k = k (x)_{k-1}[/itex]
and
[itex]D x^k = k x^{k-1}[/itex]
(where D denotes differentiation with respect to x).

All Wikipedia text is available under the terms of the GNU Free Documentation License

Search Encyclopedia
 Search over one million articles, find something about almost anything!

Featured Article
 Han Empire ... System 4 Emperor Wu and Confucianism 5 Establishment of Eastern Han Dynasty 6 Rise and Fall of Eastern Han Dynasty Summary During the Han Dynasty, China ...


text:
# MathML and fractions browsing

• The are a few ways you can generate typeset maths. Below are a number of options that you can try when generating expressions. They behave slightly differently to each other but I include them here for discussion.

$a1=maple("x^(5/2)"); #temporarily assign to variable inside maple call$d1=maple("a1:=$a1:printf(MathML[ExportPresentation](a1))"); #whole calculation done in maple call$d2=maple("a1:=x^(5/2):printf(MathML[ExportPresentation](a1))");

# using codegen
$a3=maple("x^(5/2)");$d3=maple("codegen[MathML]($a1)"); #using just Export$a4=maple("x^(5/2)");
$d4=maple("printf(MathML[Export]($a1))");

# if you prefer the 5/2 form
$a5=maple("x^(5/2)");$d5=maple("printf(MathML[ExportPresentation]($a1))");  Here is the output they generate. Notice that$d1 to $d4 give the same result, but$d5 is different. Under the hood the first 4 are generating fractions using the MathML <mfrac> whereas \$d5 is using <mrow>.


text:
2014
02-10

# Unversity Rankings

At present, the university rankings are very popublar.They help senior high school students to choose universities for study.For example,you can find the CHINESE UNIVERSITY RANGKINGS at http://www.netbig.com/.
As we know ,a university ususally has many different departments,such as department of Language(FLS).some of them are quit good when comparing to other universities,but others are not.So,most of universities’rangkings are are composed of several ranking lists, each list for one department.
But here comes a problem that sometimes it’s hard to determine which universities is better,when comparing two universities with each othe.Fortunately,Doctor Bob has advanced a new concept named “absolutely better”,with which the problem above can be solved.
Now,here is a an example to explain the concept “absolutely better”:
Assum that there are three universities (X,Y,Z)and every university has three department:CS,EE and FLS.And the rangkings of the departments are as the followed:
The rankings of the CS:X>Y>Z(X>Y means X has a better CS department than Y)
The rankings of the EE:X>Z>Y
The rankings of the FLS:Z>X>y
Obviously,each each department of University X is better than that of University Y. Then,it’s called that X is absolutely better than Y.Using the “absolutely better”concept, it becomes better to compare some paires of Universities.
Now Bob has the complete rangkings of different departments of many universities,and he wants to find k universities(U1,u2,….Uk)such that Ui is absolutely better that Uj(for any i<j).

The first line of the input is a positive integer C.C is the number of test cases
followed.
The first line of each test case is two positive integers N,M(0<N,M<=100),N is the number of the universities and M is the number of departments.And then M lines follow.The i(th)(1<=i<=M)line contains N numbers Ui(1<=i<=N,1<=Ui<=N),indicating the ranking of the i(th)department.If Universitites Ui preceds to University Uj in line k(th department, then the k(th)department do Ui is better than k(th) department of Uj.

The first line of the input is a positive integer C.C is the number of test cases
followed.
The first line of each test case is two positive integers N,M(0<N,M<=100),N is the number of the universities and M is the number of departments.And then M lines follow.The i(th)(1<=i<=M)line contains N numbers Ui(1<=i<=N,1<=Ui<=N),indicating the ranking of the i(th)department.If Universitites Ui preceds to University Uj in line k(th department, then the k(th)department do Ui is better than k(th) department of Uj.

1
3 3
1 2 3
1 3 2
3 1 2

2

#include<iostream>

using namespace std;

int rank[105][105];

int b[105];

int cmp(int *a,int *b,int n)

{

int i;

for(i=1;i<=n;i++)

if(a[i]>b[i])

break;

if(i==n+1)

return -1;

for(i=1;i<=n;i++)

if(a[i]<b[i])

break;

if(i==n+1)

return 1;

return 0;

}

int main()

{

int c,i,j,max,temp,m,n;

cin>>c;

while(c--)

{

cin>>m>>n;//m university,n is department

for(i=1;i<=n;i++)

for(j=1;j<=m;j++)

{

scanf("%d",&temp);

rank[temp][i]=j;

}

for(i=1;i<=m;i++)

{

max=i;

for(j=1+i;j<=m;j++)

if(cmp(rank[j],rank[max],n)==1)

max=j;

if(max!=i)

{

for(j=1;j<=n;j++)

{

temp=rank[max][j];

rank[max][j]=rank[i][j];

rank[i][j]=temp;

}

}

}

/* for(i=1;i<=m;i++)

{

for(j=1;j<=n;j++)

cout<<rank[i][j]<<" ";

cout<<endl;

}*/

for(i=1;i<=m;i++)

b[i]=1;

for(i=1;i<=m;i++)

{

max=-1;

for(j=1;j<i;j++)

{

if(cmp(rank[i],rank[j],n)==-1)

{

//if(i==3)

// cout<<max<<endl;

if(b[j]>max)

max=b[j];

}

}

if(max+1>b[i])

b[i]=max+1;//cout<<b[3]<<endl;

}

max=-1;

for(i=1;i<=m;i++)

{

if(b[i]>max)

max=b[i];

}

cout<<max<<endl;

}

return 0;

}

1. Often We don’t set up on weblogs, but I would like to condition that this established up really forced me individually to do this! considerably outstanding publish

2. 算法是程序的灵魂，算法分简单和复杂，如果不搞大数据类，程序员了解一下简单点的算法也是可以的，但是会算法的一定要会编程才行，程序员不一定要会算法，利于自己项目需要的可以简单了解。

3. 第2题，TCP不支持多播，多播和广播仅应用于UDP。所以B选项是不对的。第2题，TCP不支持多播，多播和广播仅应用于UDP。所以B选项是不对的。


text:
# Start a new discussion

## Not signed in

Want to take part in these discussions? Sign in if you have an account, or apply for one below

## Discussion Tag Cloud

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

• CommentRowNumber1.
• CommentAuthorUrs
• CommentTimeDec 30th 2014
• (edited Dec 30th 2014)

I have fine-tuned the definition of manifolds in differential cohesion a bit more (here).

I think now a good axiomatization is like this:

Let $V$ be a differentially cohesive homotopy type equipped with a framing. Then a $V$-manifold is an object $X$ such that there exists a $V$-cover, namely a correspondence

$\array{ && U \\ & \swarrow && \searrow \\ V && && X }$

such that both morphisms are formally étale morphisms and such that $U \to X$ is in addition an effective epimorphism.

This style of definition very naturally leads to a good concept of integrable G-structures (in differential cohesion).

What I find particularly charming is that if we take such a correspondence and “prequantize” it in the sense of prequantized Lagrangian correspondences, i.e. if we pick a differential coefficient object $\mathbf{B}\mathbb{G}_{conn}$ and complete to a correspondence in the slice

$\array{ && U \\ & \swarrow && \searrow \\ V && \swArrow_{\simeq} && X \\ & {}_{\mathllap{\mathbf{L}_{WZW}}}\searrow && \swarrow_{\mathrlap{\mathbf{L}^X_{WZW}}} \\ && \mathbf{B}\mathbb{G}_{conn} }$

then this captures precisely the globalization problem of WZW terms that we have been discussing elsewhere: on the left we pick a WZW term on the model space, and completing the diagram to the right means finding a globalization of this term to $X$ that locally restricts to the canonical term, up to equivalence.

I think I have now full proof of one direction of the corresponding obstruction (details in this pdf):

Theorem Given $V$ a differentially cohesive $\infty$-group, $X$ a $V$-manifold, and $\mathbf{L}_{WZW}$ an equivariant WZW-term on $V$, then an obstruction to $\mathbf{L}_{WZW}^X$ to exist as above is the existence of an integrable $QuantMorph(\mathbf{L}_{WZW}^{\mathbb{D}^V})$-structure on $X$,

(i.e. a lift of the structure group of the frame bundle to the quantomorphism n-group of the restriction $\mathbf{L}_{WZW}^{\mathbb{D}^V_e}$ of the WZW term to the infinitesimal neighbourhood of the neutral element in $V$, such that this lift restricts over a $V$-cover $U$ to the canonical $QuantMorph(\mathbf{L}_{WZW}^{\mathbb{D}^V_e})$-structure on $V$).

I still need to prove that this is not just a necessary but also a sufficient condition. This is harder…

• CommentRowNumber2.
• CommentAuthorUrs
• CommentTimeFeb 12th 2015
• (edited Feb 12th 2015)

With the definition of $V$-manifolds and their frame bundles in differential cohesion here and here, it is immediate that forming frame bundles extends to an $\infty$-functor $\tau_{(-)}$ from the sub-$\infty$-category of the $\infty$-topos $\mathbf{H}$ on the $V$-manifold with local diffeos between them, to the slice $\infty$-topos $\mathbf{H}_{/\mathbf{B}GL(V)}$.

But I need this functor internally: for $X$ a $V$-manifold I need a morphism in $\mathbf{H}$ of the form

$\mathbf{Aut}(X) \longrightarrow \underset{\mathbf{B}GL(V)}{\prod} \mathbf{Aut}(\tau_X)$

where on the right $\mathbf{Aut}(\tau_X) \in \mathbf{H}_{/\mathbf{B}GL(V)}$ denotes the internal automorphism $\infty$-group of $\tau_X \in \mathbf{H}_{/\mathbf{B}GL(V)}$.

First I thought it’s obvious, but now I seem to be stuck…


text:
Share
Notifications

View all notifications
Advertisement

# A Trader Buys X Articles for a Total Cost of Rs 600. (I) Write Down the Cost of One Article in Terms of X. If the Cost per Article Were Rs 5 More, the Number of Articles that Can Be Bought - Mathematics

Login
Create free account

Forgot password?
Course

#### Question

A trader buys x articles for a total cost of Rs 600.
(i) Write down the cost of one article in terms of x.
If the cost per article were Rs 5 more, the number of articles that can be bought for Rs 600 would be four less.
(ii) Write down the equation in x for the above situation and solve it for x.

#### Solution

Number of articles = x

The total cost of articles = Rs 600

1) Cost of one article = Rs 600/"x"

2) From the given information we have

600/(x - 4) - 600/x = 5

(600x - 600 x + 2400)/(x(x - 4))  = 5

480/(x(x - 4)) = 1

x^2 - 4x - 480 = 0

x^2 - 24x + 20x - 480 = 0

x(x - 24) + 20(x - 24) = 0

(x - 24)(x + 20) = 0

x = 24, -20

Since number of article cannnot be negative So x = 24.

Is there an error in this question or solution?
Advertisement

#### APPEARS IN

Selina Solution for Concise Mathematics for Class 10 ICSE (2020 (Latest))
Chapter 6: Solving (simple) Problems (Based on Quadratic Equations)
Exercise 6(E) | Q: 2 | Page no. 79
Advertisement

#### Video TutorialsVIEW ALL [5]

Solution A Trader Buys X Articles for a Total Cost of Rs 600. (I) Write Down the Cost of One Article in Terms of X. If the Cost per Article Were Rs 5 More, the Number of Articles that Can Be Bought Concept: Quadratic Equations.
Advertisement


text:
Triangulation scaling problem. (Multiple Images)

Hello everyone,

I try to do 3d metric reconstruction with 60 images.

I use python and there is only this function in opencv to triangulation with python. It reconstructs the images two by two.

There are 2 methods that I consider using to make triangulation.

The first method is to select 1 image as base and triangulate one by one with its neighbors ;

Like this:

where 1 -> Base Image ; 2,3,4,5,6 -> Base Image's neighbors

 R1 =[[1 0 0]   t1 = [[0]]
[0 1 0]         [0]
[0 0 1]]        [0]]

R2,t2 = cv2.findEssentialMat(img1.pts, img2.pts, K) and cv2.recoverPose(E)
R3,t3 = cv2.findEssentialMat(img1.pts, img3.pts, K) and cv2.recoverPose(E)
.
.
R6,t6 = cv2.findEssentialMat(img1.pts, img6.pts, K) and cv2.recoverPose(E)

P1 = K[R1|t1]
P2 = K[R2|t2]
.
.
P6 = K[R6|t6]

3d_first = cv2.triangulatePoints(P1,P2, pts1,pts2)
3d_second = cv2.triangulatePoints(P1,P3, pts1,pts3)
3d_third = cv2.triangulatePoints(P1,P4, pts1,pts4)
3d_fourth = cv2.triangulatePoints(P1,P5, pts1,pts5)
3d_fifth = cv2.triangulatePoints(P1,P6, pts1,pts6)

When I visualize the 3d points, they do not overlap and there is a difference between them.(I guess It is a scaling problem).

How can i fix the problem?

There is a suggestion like that ;

t1 = t1 * (camera1 and camera2 baseline (unit metric))
t2 = t2 * (camera1 and camera3 baseline (unit metric))

but this sometimes does not work. Does this give me a metric results?

The second method is to triangulate the photos as img1-img2, img2-img3, img3-img4 instead of img1-img2, img1-img3, img1-img4. In this case, I have to bring all the 3D points to the same plane. Because P1 = [I | 0] for img1-img2 triangulation, P2 = [I, 0] for img2-img3 triangulation.

In this case, point clouds for img1-img2 will appear on the plane img1, and point clouds for img2, img3 will appear on the plane 2.

How can I bring them to the same plane?


text:
# Trying to use FreeSerif as a maths font — what am I doing wrong?

Always in search of the ideal font combination unicorn, I thought I'd try the GNU Free UCS Outline Fonts (FreeSerif, FreeSans, and FreeMono). I seem to have fallen at the first hurdle:

\documentclass[final]{article}
\usepackage{fontspec}
\setmainfont{FreeSerif}
\usepackage{unicode-math}
\setmathfont{FreeSerif}
\begin{document}
$x+y=\sqrt{z}$
\end{document}

Both XeLaTeX and LuaLaTeX (.otf format fonts with TexLive, Windows 7) give me this:

What am I missing?

-
This is not an answer but to help, here is using XeTeX img819.imageshack.us/img819/9996/shutterseleo006.png and here using LuaLaTeX img267.imageshack.us/img267/7355/shutterseleo007.png on my Lubuntu 11.10 with TexLive2011. – Sigur Feb 10 '13 at 13:38
@Sigur Is that using the .otf version? (I'm on Windows 7) – Brent.Longborough Feb 10 '13 at 13:45
Hum, sorry. I checked it now and I have those fonts in .ttf format. But I don't know if TeXLive uses them. – Sigur Feb 10 '13 at 13:51
You can't use FreeSerif as a math font because it lacks a MATH table. Both XITS Math and TG Termes Math have the table and are based, like FreeSerif, on Times. – egreg Feb 10 '13 at 13:55
In Classic TeX (and apparently a fallback in xetex) the thickness of the rule in \sqrt is given by the height of the sqrtsign character, so TeX fonts have a sqrtsign with large depth making tex math fonts unusable in other systems. The math table can specify this without needing to corrupt the glyph positioning. – David Carlisle Feb 10 '13 at 14:05