text:
# Natural number

The natural numbers are the numbers (0), 1,2,3,etc. used for counting, and for enumerating an ordered sequence. As such they are the basis of all numbers used in everyday life for calculating and measuring. They are also used to indicate the number of equal parts into which a unit of measure is divided, and how many of such parts are needed for a measurement, thus being the basis for fractions and rational numbers.

Because of their importance every culture has developed a numeral system for representing and manipulating natural numbers, both in oral and in written language. Now the decimal system is almost universally used to write natural numbers while -- depending on history and the context -- other methods (e.g., Roman numerals) still coexist.

Moreover, since ancient times the natural numbers have been of interest not only for practical reasons. On the one hand, their properties have been studied out of (theoretical or mathematical) curiosity, and, on the other hand, some numbers have been assigned symbolic value.

In modern mathematics, the natural numbers are either defined axiomatically by the Peano axioms, i.e., they are characterized by their properties or, in set theory, as a specific set that serves as a concrete object (model) which can be shown to have the desired properties, i.e., to satisfy the Peano axioms.

Is zero a natural number?
Whether 0 is a natural number or not is not a mathematical question but the matter of an essentially arbitrary definition, a decision which depends on the context and on personal taste. Historically, 0 was not considered as a "number" because it means that there is "nothing to count". In modern mathematics, in particular because of set theory and the concept of cardinality, 0 is usually included into the natural numbers.

##  Decimal system

In principle, a natural number could be represented by the corresponding number of dots, strokes, or similar. But this soon becomes impractical if the numbers get large.

Therefore, decimal numerals are used as a sort of shorthand: They are written with ten digits — 0,1,2,3,4,5,6,7,8,9 — which represent the numbers zero, one, two, three, four, five, six, seven, eight, nine. Larger numbers are represented by a sequence of digits, e.g., 325. Such a numeral is read starting from the right. The first (rightmost) digit represents the corresponding number of dots (in the example: five); the next (second-right) represents the corresponding number of groups of ten dots (in the example: two groups of ten dots each), the next digit indicates the corresponding number of "groups of ten groups of ten dots" (in the example, three groups of ten times ten dots), and so on.

##  Arithmetic

Elementary arithmetic with natural numbers is based on addition: Adding two natural numbers is equivalent to counting two sets in sequence. (This is equivalent to the mathematical notion of adding cardinal numbers.)

Addition of two numbers is written with a plus sign "+", and the result is called the sum of the two numbers.

e.g., 2 + 3 = 5, read "two plus three equals (or makes) five"

If an equation like 2 + n = 5 can be solved, i.e., if there is a number (denoted by n) which added to 2 makes 5, then its solution is unique and called the difference of these two numbers and is written with a minus sign "-":

e.g., 5 - 2 = 3, read "five minus two equals (or makes) three".

Addition of two or more numbers does not depend on the order in which they are added.

Multiplication can be considered as multiple addition, and the result is called product:

e.g., "3 times 5" means "5 plus 5 plus 5" (three summands of five).

It is written with a times sign "×" (or a central dot "•").

e.g., 3 • 5 = 15, read "three times five equals (or makes) fifteen".

The times sign is only used for elementary examples, in mathematics only the dot is usual – the times sign is used for other operations – amd usually is omitted when variables (denoted by letters) are involved:

2 • 3 and n • 2, but 2n (only rarely 2 • n) and nm (only very rarely nm).

If an equation like 2 • n = 6 can be solved, i.e., if there is a number (denoted by n) which multiplied by 2 makes 6, then its solution is unique and called the quotient of these two numbers and is written with a division sign ":" or as fraction with "/":

e.g., 6 : 2 = 6 / 2 = 3, read "six divided by two equals (or makes) three".

Multiplication of two or more numbers also does not depend on the order in which they are multiplied: 3 • 2 = 2+2+2 = 6 = 3+3 = 2 • 3.

Exponentiation can be considered as multiple multiplication.

##  Special properties

The natural numbers have been used since thousands of years. It is no surprise that many properties and curious facts have been observed and investigated, some for practical reasons, some out of curiosity, some because they turned out to have connections with seemingly unrelated problems.

The first properties that come to mind are the distinction between even and odd numbers, between prime and composite numbers, and the perfect squares.

• A number is even, if it is a multiple of 2, and odd if not.
• A number is composite, if it is the product of two other numbers, and prime it not.
• A number is a (perfect) square if it is the product of a number with itself.

###  Figurate numbers

All these properties can be viewed as simple cases of figurate numbers. Figurate numbers arise if one tries to arrange a certain number of dots, coins, etc. into a nice geometrical shape.

A number is even if the dots can be arranged pairwise, it is composite if they can be arranged in the form of a rectangle, and it is a square if this rectangle can be a square.

The simplest figurate numbers are the triangular numbers

1, 3 = 1+.2, 6 = 1+2+3, 10 = 1+2+3+4

which are of the form k(k+1)/2.

###  Sum of divisors

Another type of property, also already investigated in Ancient Greece, concerns the sum of the divisors (excluding the number itself) of a number: A number is called perfect if it is equal to the sum of its divisors:

6 = 1+2+3, 28 = 1+2+4+7+14, etc.

Two numbers are amicable, if each is the sum of the divisors of the other, as in the following pair which was already known to Euclid:

220 and 284.

###  Properties in general

There is no limit to the various properties which can be considered. It can even be argued that every natural number is "interesting": Indeed, if there were a number which is not interesting then the set of such numbers were not empty, and thus it had a minimal element (by axiom (5a)). But the smallest uninteresting number certainly would be interesting, wouldn't it?

For more properties see the corresponding catalog.

##  Symbolic meaning

Many natural numbers had - and still have - a symbolic meaning, some are considered as "lucky" or even "holy" numbers, others are considered to indicatie bad luck, some are "nice", others are not. Some of these meanings are (almost) universal, while others vary from culture to culture. Numbers derived from words have significance in numerology. Numbers play a – sometimes secret – role in (secret) orders like the freemasons. But all such interpretations are not part of mathematics, even in cases where they are motivated by mathematical properties and arguments — they are determined by tradition, by mythology, or by esoteric beliefs.

For examples of symbolic meanings see the corresponding catalog.

##  Peano axioms

During the 19th century the foundations of mathematics which, of course, include the concept of number became a major topic of discussion and research. In 1889 Giuseppe Peano published a system of axioms that characterizes the natural numbers. The axioms, essentially, state that eventually every natural number will be reached if one starts to count at 0 (or 1, if that is preferred) and proceeds from that by stepping from one number to the next. The axioms are usually given as follows:

(1) 0 is a natural number.
(2) Every natural number has a unique successor.
(3) 0 is not the successor of a natural number.
(4) Different natural numbers have different successors.
(5) If a property of natural numbers is such that:
0 has the property, and
if a natural number has the property then its successor has it as well.
Then every natural number has this property

The last axiom is equivalent to the following property:

(5a) Any non-empty set of natural numbers has a least element.

In these axioms, the first (least) element is taken to be 0, but this is arbitrary. It can be replaced by 1 (or any other number).

Axiom (5) (or (5a)) is the basis for proofs by induction, and for definition by recursion.

##  Set theoretic model

In modern mathematics, sets are used as a basis on which all other theories are built. In this context it is therefore necessary to construct a model which incorporates the natural numbers as sets such that the axioms can be verified (using the axioms of set theory). from the properties of these sets. Such constructions indeed exist of which one (due to John von Neumann) has particularly "nice" properties, and which is consequently usually used.

The construction starts with the number 0. It is represented by the empty set which has no – or 0 – elements.
The number 1 is represented by a set which has one single element, namely the number 0 (i.e., the empty set).
Next, 2 is represented by a set which has precisely 2 elements, the numbers 0 and 1.
3 is represented by a set with 3 elements (0,1,2), etc.
In general, an arbitrary number n is represented by a set with precisely n elements, the numbers 0,1,2,..,n-1, i.e., the (previously constructed) numbers smaller than n.

This construction can be extended (in a natural way) to both the infinite cardinal numbers and the infinite ordinal numbers.

In all the formulas below $k,m,n \in \mathbb N$ is assumed.

##  Formal construction

The formal construction of the natural numbers starts with the definition of an operator which can be applied to any set:

$S(A) := A \cup \{ A \}$

This operator S can be interpreted as defining a successor for every set.

A set A is called closed under S if it contains the successor of all its elements:

$a \in A \Rightarrow S(a) \in A$

The next step needs the smallest set that contains the empty set and is closed under S. It can be constructed by taking the intersection of such sets:

$\mathbb N := \bigcap \{ A \mid \emptyset \in A, A \text{ closed under } S \}$

This construction is immediate in naive set theory and can be justified in axiomatic set theory.

$\mathbb N$ is (by definition) a countably infinite set and, in the usual model that extends the von Neumann construction to infinite sets, is taken both as the smallest infinite cardinal number aleph-0 and the smallest infinite ordinal number omega:

$\aleph_0 := \mathbb N \textrm{ \ and \ } \omega := \mathbb N$.

###  Peano axioms

Now it can be verified that the elements of this set satisfy the Peano axioms, and that it therefore can be taken as a model for the natural numbers:

Axioms (1) and (2) become definitions:

$(1) \quad 0 := \emptyset \in \mathbb N$
$(2) \quad (\forall n \in \mathbb N) n' := S(n) \in \mathbb N$

Axioms (3) and (4) state that S is an injective mapping:

$S : \mathbb N \rightarrow \mathbb N \setminus\{0\}$

Axiom (5) states that a set which contains 0 and is closed under S is the set $\mathbb N$. This proposition is true because $\mathbb N$ is the smallest set with this property.

The set theoretical order (by set inclusion) in $\mathbb N$ coincides – because of $a \subset S(a)$ – with that needed for the natural numbers:

$n \le m :\Leftrightarrow n \subset m \Leftrightarrow n \in m$

The alternative axiom (5a) states that $\mathbb N$ is well-ordered. If A is a non-empty set, than its minimum coincides (because of the model) with the intersection of its elements:

$\emptyset \not= A \subset \mathbb N \Rightarrow \min A = \cap A \in \mathbb N$

Once established, this construction is no longer needed. All further investigations can be founded on the Peano axioms.

###  Notation

The symbol $\mathbb N$ – an N in the Blackboard Bold font – for the natural numbers has become usual (often even assumed as well-known standard which needs no further explanation) during the second half of the 20th century, replacing the previously customary bold N.

However, some authors do not include 0 into $\mathbb N$. In order to explicitly indicate the inclusion or exclusion of 0, often $\mathbb N_0$ (with 0) and $\mathbb N^\ast$ (without 0) are used.
${}^\ast \mathbb N$ is used for the nonstandard extension of the natural numbers.

Addition is a binary operation $\;+\;$ in $\mathbb N$ which is defined recursively (using axiom (5)) as follows:

$n+0 := n,\; n+k' := (n+k)' \qquad (k' = k+1)$

$(\mathbb N,+)$ is a semigroup with neutral element 0. It is:

$\quad n+m = m+n \textrm{}$ commutative
$\quad k+(n+m) = (k+m)+n \textrm{}$ associative
$\quad n+0 = 0+n = n \textrm{}$ neutral element

Moreover,

$\quad n+k = m+k \Rightarrow n=m \textrm{}$

###  Multiplication

Multiplication is a binary operation $\;\cdot\;$ in $\mathbb N$ which is defined recursively (using axiom (5) and addition) as follows:

$0 \cdot n := 0 ,\quad k' \cdot n := ( k \cdot n ) + n ( 1 \cdot n = n )$

$(\mathbb N \setminus\{0\},\cdot)$ is a semigroup with neutral element 1. It is:

$\quad n \cdot m = m \cdot n \textrm{}$ commutative
$\quad k \cdot (n \cdot m) = (k \cdot n)\cdot m \textrm{}$ associative
$\quad 1 \cdot n = n \cdot 1 = n \textrm{}$ neutral element

Moreover,

$\quad n \cdot k = m \cdot k \Rightarrow n=m \textrm{}$

###  Order relation

An order relation $\le$ is defined using addition:

$n \le m :\Leftrightarrow (\exists k)\ n+k = m$.

(Another order, a partial order, can be defined using divisibility.)

$(\mathbb N , \le)$ is linearly ordered set:

$\quad n \le n \textrm{}$ reflexive
$\quad n \le m , m \le n \Rightarrow n=m \textrm{}$ antisymmetric
$\quad k \le n, n \le m \Rightarrow k \le m \textrm{}$ transitive

This order is a well-ordering (by axiom 5), i.e., all non-empty sets have a minimal element:

$\emptyset \not= A \subset \mathbb N \Leftrightarrow (\exist n) n \in A, (\forall m \in A)\ n \le m \qquad (n:=\min A)$.

###  Relations between the structures

The binary operations + and $\;\cdot$, and the order relation $\le$ are compatible with each other:

$\quad k \cdot (n+m) = k \cdot n+k \cdot m \textrm{}$
$\quad n \le m \Rightarrow k + n \le k + m \textrm{}$
$\quad n \le m \Rightarrow k \cdot n \le k \cdot m \textrm{}$

###  Exponentiation

$n^0 := 1 , n^{k'} := n^k \cdot n$


text:
SAT Math Practice: Absolute Values

Today at College Compass we’ll run through an SAT practice problem involving absolute values:

What value of x satisfies the equation  $|2x-7|+3=0$.

| Tagged | Leave a comment

ApplyTexas vs. the Common Application

To better help prepare you for the upcoming admissions season, we’ve put together a quick guide on ApplyTexas and the CommonApp, noting the differences between the two and what exactly you’ll need to apply.

What is the difference between ApplyTexas and CommonApp?

Though Texas might not be its own country (yet), it does have its own separate application system

The one main difference between the two applications is which schools use them. Of course, this is a huge difference, but apart from this, the sets of applications are pretty similar in terms of required documents. One catch is that since ApplyTexas is a different system than CommonApp, if you plan on applying to both Texas schools and other schools, you’ll have to submit both an ApplyTexas and a CommonApp application, along with letters of recommendation, test scores, and transcripts to both.

| Leave a comment

Best of the Blog: College Visits 101 – Talking to Students

Nothing like a nice stroll through Harvard yard, right?

Since many of you are embarking on college tours, we’ll be presenting one of our favorite blog posts on college visits, originally posted by Calvin. Enjoy!

You can learn a lot about a college from its website, its guided tours, and its employees. However, there are some questions that can only be answered by a real, live college student. In fact, speaking with a university’s current students is one of the best ways to find out whether a college is right for you. There are many ways to interact with students when visiting a college campus, some more mediated than others. Current students (hand-picked and trained by the administration) will usually lead campus tours when you visit, and it might be possible to meet with students from a particular major by contacting the office of admissions. Simply call them up, tell them you are a prospective student who wants to major in X, and that you would like to talk to a current student who is majoring in X when you visit. They may be able to set something up for you.

SAT Math Practice: Solving for a Variable!

Today I’ll show you a problem I see a lot of students facing: how to solve for a variable if it appears in both the numerator and the denominator. Given the New SAT’s increased focus on simplifying equations, make sure you have this process down pat!

Given the equation $y=\dfrac{3x+5}{2x-8}$, give x in terms of y.

Posted in New SAT 2016, Standardized Tests | Tagged | Leave a comment

What is a Good Score on the New SAT?

Today was exciting news in the standardized test community, as College Board released its first set of data and concordance tables regarding the New 2016 SAT. In light of this, we have updated our previous post with updated average New 2016 SAT scores by university.

Methodology

To find New SAT score equivalents, we used information provided by universities through either their websites or through their Common Data Set publications. We then used the official concordance table presented by College Board to convert Old (2005-2015) SAT scores and ACT scores to the new format. Keep in mind, however, that the ACT has disputed the validity of some concordances and that these concordances may be subject to change as College Board collects more data. In looking at the table, you may note that some universities show a significant 60-100 point difference between New Scores via ACT Concordance and New Scores via Old SAT Concordance. As more test-takers sit for the New 2016 SAT exam, College Board may revisit these preliminary concordances and adjust as needed. As such, the scores presented below are subject to change.

Further, this information is based on the most up-to-date college data we were able to obtain, but these scores may not be reflective of future entering classes, as scores may be higher or lower than in past years. We will not have official data on New SAT scores for admitted students until next year, and perhaps even until years after that, as the class of 2021 will still be able to use Old SAT scores for admissions. Schools may also elect to judge New 2016 SAT scores differently than the data presented within the concordance tables, so keep this in mind as well.

Finally, the data presented are averages (i.e. middle 50% of students admitted), so depending on your own life circumstances (e.g. low GPA, disadvantaged background, competitive high school, etc.), you should determine whether you need to score above the average to have a good shot at being admitted to these schools. Nevertheless, we hope this data will provide you with a good baseline to shoot for when preparing for this exam, and we wish you the best of luck in your college pursuits!

Do’s and Don’t’s of Writing a College Admissions Essay

Break out your pen and paper, and take a look at our tips for writing a great college admissions essay!

Today we’ll be giving some tips about how to and what to write for your college admissions essay! Don’t waste your summer! Make sure to start early on these essays because it’s quite possibly the most important piece of writing you’ll ever do!

Do’s

• Do show, don’t tell: This is the classic advice every essay writer receives. Engaging writing is engaging because it elicits sympathy and understanding from the reader. Humans love storytelling, as it’s essentially hard coded into our DNA, and there’s no better way to connect with your reader than to tell stories or short anecdotes. This isn’t to say you should spend 500 words elaborating on a single story. Rather, you should include sentences that allow the reader to picture themselves in the moment. For example, instead of using the bland line”I love teaching because it allows me to help others gain a better understanding of the world,”  try something like “I’ve never been more proud than when Bobby Sue finally realized how Gauss’s Law works. After hours of slogging through a single assignment during a help session, there was no greater joy than seeing his face light up with understanding, and that single moment made the entire semester of tutoring worth it.”
• Do have a good hook: Admissions committees are reading hundreds, if not thousands, of applications, so make sure to capture their interest. Draw them in with an interesting anecdote, and give them something to remember you by. Of course, don’t be melodramatic or insincere with this hook, but make sure to start off on the right foot. Just think back to all the required reading assignments you’ve had in the past — don’t be that author who bores you starting from line 1; be the author who engages you and draws you in so you want to continue reading.
• Do demonstrate your passion: The essay is essentially the only opportunity you get to show off who you are. Both ApplyTexas and the CommonApp only afford a very limited number of characters to describe your listed activities, so the essay is the only significant opportunity you get to describe in detail your hopes, dreams, and interests. Take advantage of this! The most important thing is to demonstrate that you’re an interesting person and that you have a life apart from just school. If you have an extracurricular you love, write about it! If you have a hobby you enjoy doing, explain why you love it! Talk about anything you have a strong passion for because that is without a doubt the easiest way to translate passion onto the page.
• Do be humble and genuine: Admissions officers can smell insincerity a mile away. If you volunteered once at a soup kitchen, don’t write an essay about how bad you felt for the patrons and now want to dedicate your life to abolishing poverty. Even if admissions officers didn’t major in math, they can tell when something doesn’t add up. One meeting with the underprivileged likely won’t elicit an epiphany, and one event likely won’t determine your entire life’s path. Don’t be overdramatic or oversell your experiences to make some grand statement about life or morals. Be humble and true to yourself! No one expects a high schooler to have had dramatic life-changing experiences, so there’s no need to wildly upsell your accomplishments or motivations. A pinch of humility will go a long way in distinguishing yourself from the rest of the overeager pack.

What Does My New SAT Score Mean?

College Board just released the results from the first administration of the New SAT, administered March 2016, and with it they also released a set of concordance tables to let us know what exactly a good score is. We’ll take a look at this and analyze what exactly these new scores mean for students!

How do New SAT Scores Compare to Old 2400 SAT Scores?

Figure 1. Charting the difference in scores between the New SAT and Old SAT

Since the new SAT is scored out of 1600, while the old SAT was scored out of 2400, the new scores are obviously lower than the old. However, if we adjust the old scores using the “sliding scale” method (i.e. subtract 800 across the board from the old SAT scores, normalizing as if it were on the 1600 scale), we can see (Figure 1 above) that overall there is a much larger difference for lower-scoring students, with the New SAT having higher scores than the old pre-2016 SAT. This suggests that the same performance would net a higher numerical score. This means that the “sliding scale” method would not actually work for comparing new and old SAT scores.

AP Exams are in May! What are they? Who needs them? Why Should I take them? What about AP Exam Score Choice?

It’s that time of year again, when high school students must frantically juggle preparing for final exams, AP exams, and the last administrations of the SAT/ACT/SAT Subject Tests. There is a lot going on! And as you carefully plot out the next several weeks, you may be asking yourself, are AP exams really worth it? The answer, unfortunately, is yes, they really are worth it.

So let’s start with the basics, what are AP classes? As a College Compass acolyte, you are undoubtedly already familiar with AP classes (having taken literally a bajillion already), but if you are not a regular reader, AP stands for Advanced Placement. Advanced Placement classes are basically honors classes whose material has been standardized by College Board. These classes are roughly equivalent to undergraduate college classes. Oftentimes, AP classes are weighted; if you are taking an AP class you probably have both an unweighted and weighted GPA, where your AP grades count for +1 letter grade or equivalent more towards your GPA (so, for example, a letter grade of B in an AP class would count as an A toward your cumulative GPA). If you take an AP class, or in fact even if you do not, you can register to take AP exams at the end of the year. If you score well enough on an AP exam (usually a score of 4 or 5 out of 5), many universities will award you college level credit based on that score – meaning you do not have to take that class as a college student! More on that later.  Continue reading “AP Exams are in May! What are they? Who needs them? Why Should I take them? What about AP Exam Score Choice?” »

Posted in Miscellaneous | Leave a comment

What Are SAT Subject Tests?

Since the end of the school year is fast approaching, as are the deadlines for signing up for the May and June SATs, we wanted to remind people what the SAT Subject Tests are and which colleges require them. We’ve previously posted this article but consider this topic especially relevant at this time of year. Enjoy!

What Are SAT Subject Tests?

You may or may not be aware that College Board offers SAT Subject Tests. These are short, one-hour exams that test your knowledge in specific areas. We’ve compiled a table of every Subject Test offered below:

 Math Level 1 Math Level 2 US History World History Biology Chemistry Physics Literature Spanish French Chinese Italian German Hebrew Latin Japanese Korean

As you can see, there are quite a few Subject Tests available to you that cover a wide variety of topics. In terms of content, you can think of these Subject Tests as mini AP Exams. The two exams cover essentially the same material, but Subject Tests are only one hour long each, compared to the behemoths that are AP exams.

SAT Trigonometry Problem!

Today we’ll be solving a practice SAT trigonometry problem and walking you through the steps to solve it!

If Sin(A)=0.5 and side BC=10, find the length of the hypotenuse, AB.

| Tagged | Leave a comment

format: plain


text:
## The Stanley-Reisner Ring

Today, we’re going to do something completely different, but which most of my peers seem not to have seen, but is a very cool application of algebraic geometry.

A simplicial complex is a nice type of topological space.  Take a collection of points, called the vertices $X_0$, and define $X_n$ to be sets of $(n+1)$ elements of $X_0$ which are $n$-simplices, that is, every subset of $(k+1)$ elements of an element of $X_n$ is an element of $X_k$.  We can construct these geometrically by looking in a really large Euclidean space, picking points, and for each simplex, taking their simplicial span, that is, all linear combinations of the points with coefficients nonnegative and summing to one.

Now, we start with the algebra.  Given a simplicial complex $\Delta$, we have a ring $k[X_0]$, which is the free $k$-algebra on the vertices.  We can take each element of $X_n$ to be a monomial of degree $n+1$ in the vertices, in fact, every possible $n$-simplex is such a monomial, and squarefree!  So we define an ideal $I_\Delta$ to be generated by the non-faces of $\Delta$, and we define the Stanley-Reisner ring of $\Delta$ to be $k[\Delta]=k[X_0]/I_\Delta$.

So now, a couple of examples.  The first is the trivial example: the $n$-simplex.  For the $n$-simplex, every subset is a face, and so $I_\Delta=0$, so $k[\Delta]=k[v_0,\ldots,v_n]$.  Now, a less trivial example is in order: the octohedron.  It has six vertices, and we can label them so that the non-edges are $v_2v_6, v_1v_3, v_4v_5$, and these will be the generators of $I_\Delta$.

So now, we define the $f$-vector of $\Delta$, which has for $f_i$ the number of $i$-faces, and we consider $\emptyset$ to be a $-1$ face.  So the octohedron has $(1,6,12,8)$.

Next, we look at polytopes.  These are the convex hulls of a finite collection of points in some Euclidean space.  We’ll actually care only about the case where the boundary is a simplicial complex, we’ll call these simplicial polytopes.  We even get a couple of nice formulas: there’s Euler’s formula that for a simplicial polyhedron in $\mathbb{R}^3$, we have $f_0-f_1+f_2=2$ and $3f_2=2f_1$, and so $f_0$ determines the $f$-vector.

Now, it’s clear what date the $f$-vector describes, but we’re going to transform it into a much less obvious form, and from that, pull a nice theorem out of thin air.  The $h$-vector is defined to be $h_j=\sum_{i=0}^j (-1)^{j-i}\binom{d-i}{j-i}f_{i-1}$ and $f_j$ can be recovered as $\sum_{i=0}^{j+1}\binom{d-i}{j+1-i}h_i$.

So…where does this come from? This is just a strange thing to do.  Lets look at $k[\Delta]$ itself.  We want to try to make a graded free resolution (which we’ll treat largely as a black box).  This amounts to there being an exact sequence with maps of degree 0 which is free modules, except the last term.  For the octohedron, we have $0\to R(-6)\to R(-4)^3\to R(-2)^3\to R\to R/I_\Delta\to 0$.

For the octohedron, the $h$-vector is $(1,3,3,1)$, which you can see are the exponents here, and that’s not a coincidence! But more fundamentally, we define the Hilbert series of a graded module to be $h_M(t)=\sum (\dim M_i)t^i$, and this is additive in exact sequences.  So the resolution above lets us compute $h_{k[\Delta]}(t)=\frac{1-3t^2+3t^4-t^6}{(1-t)^6}=\frac{1+3t+3t^2+t^3}{(1-t)^3}$, so the $h$-vector is the set of coefficients of the reduced Hilbert series!

Now, it’s a nontrivial theorem that $h_i=h_{d-i}$ if $\Delta$ is a $d$-polytope.  So then, we take $\Delta$ to be such a polytope.  Then it defines a simplicial projective toric variety $X_\Delta$, and it can be proved that $h_i=\dim H^{2i}(X_\Delta,\mathbb{C})$.  So this gives a weaker version of Poincare duality for “nice” but possibly singular toric varieties!

Charles Siegel is currently a postdoc at Kavli IPMU in Japan. He works on the geometry of the moduli space of curves.
This entry was posted in AG From the Beginning, Algebraic Geometry, Cohomology, MaBloWriMo, Toric Geometry. Bookmark the permalink.

### 4 Responses to The Stanley-Reisner Ring

1. Estraven says:

Wonderful. I kind of knew this but it’s really well explained this way and much clearer than I remember.
Thanks a lot and keep up the good MaBloWriMo!
PS There’s an extra comma between v_2 and v_6 in the fourth paragraph.

2. Steven Sam says:

Isn’t simplicial equivalent to smooth for toric varieties?

• Very much no! Simplicial means that the edges of maximal fans span the space over $\mathbb{R}$, smooth means that they span over $\mathbb{Z}$. Look at weighted projective space: these are simplicial, but generally, they won’t be smooth!


text:
# A tensor network representation of path integrals: Implementation and analysis

Amartya Bose and Peter L. Walters, arXiv:2106.12523 [physics.chem-ph], submitted (2021)

Abstract
Tensors with finite correlation afford very compact tensor network representations. A novel tensor network-based decomposition of real-time path integral simulations involving Feynman-Vernon influence functional is introduced. In this tensor network path integral (TNPI) technique, the finite temporarily non-local interactions introduced by the influence functional can be captured very efficiently using matrix product state representation for the path amplitude (PA) tensor. We illustrate this particular TNPI method through various realistic examples, including a charge transfer reaction and an exciton transfer in a dimer. We also show how it is readily applied to systems with greater than two states. The augmented propagator (AP) TNPI utilizes the symmetries of the problem, leading to accelerated convergence and dramatic reductions of computational effort. We also introduce an approximate method that speeds up propagation beyond the non-local memory length. Furthermore, the structure imposed by the tensor network representation of the PA tensor naturally suggests other factorizations that make simulations for extended systems more efficient. These factorizations would be the subject of future explorations. The flexibility of the AP-TNPI framework makes it a promising new addition to the family of path integral methods for non-equilibrium quantum dynamics.


text:
]> 13.4 Divide and Conquer

## 13.4 Divide and Conquer

The last previous method uses a straight line approximation to get a new argument between old ones, once the values of $f$ at the old arguments have the opposite sign. This is usually a smart thing to do, unless the endpoints of the interval between which your solution is trapped (in columns s and t above) converge very slowly.

To avoid that possibility we can, once the function $f$ has opposite sign at two points, say $a$ and $b$ , evaluate it at the middle point, and replace one end by the middle.

This will cut the size of the interval in which the solution must lie in half. This is slow convergence compared to the best of Newton's algorithm or the variants discussed above, but it is steady and effective and will always give a definite improvement in accuracy in a fixed number of steps.

Since 2 to the tenth power is a bit more than one thousand, (it's 1024) the size of the interval goes down by a factor of at least 1000 for every ten iterations, and so if it starts at something like 1, after 35 or so steps you will have the answer to ten decimal places.

How does the algorithm go?

We start with two arguments, $a$ and $b$ and suppose we assume $a < b$ . We evaluate $f ( a )$ and $f ( b )$ , and also $f ( a + b 2 )$ . Then if the last of these and the first has the same sign you replace a by $a + b 2$ and keep $b$ , while otherwise you keep $a$ and replace $b$ by $a + b 2$ .

In a spreadsheet you can put your initial guesses in aa2 and ab2 put "= aa2/2+ab2/2" in ac2 and put "= f(aa2)" in ad2 and copy that to ae2 and af2. You can then put "= if(ae2*af2>0, aa2,ac2)" in aa3, and "= if(ae2*af2>0,ac2,ab2)" in ab3, copy down and you are done.

Unless there is an error lurking somewhere, or you started with ad2 and ae2 having the same sign, this will shorten the initial $a$ to $b$ by a factor of at least $10 − 10$ interval after 35 or so steps.

Exercise 13.9 Compare performance of this algorithm with the previous ones on the same examples. Any comments?


text:
# What is the gauge group of eletromagnetism?

Gauge transformations allowed by physical theories form groups. For example, a wave function in quantum mechanics can be multiplies by $e^{i\theta}$ and this won't change a thing. So the gauge group of this theory is $U(1)$.

Now, the Maxwell equations can be written in terms of a scalar $\phi$ and a vector potential $\vec{A}$ (I don't write them here since they are very well known). They admit gauge transformations in which $\vec{A}\to\vec{A}+\vec{\nabla} f$ and $\phi\to\phi+\partial_t f$ (up to some factors), where $f(\vec{r},t)$ can be any differentiable function.

Since I can take any function, I conclude that the gauge group of electromagnetism is infinite-dimensional. Is this correct?

No, the gauge group of electromagnetism is still $\mathrm{U }(1)$. This is because there is a difference between the gauge group $G$ of a physical theory on a manifold $M$ and the group of gauge transformations $\mathcal{G}$ consisting of local functions $M\to G$ and the algebra of infinitesimal gauge transformations consisting of local functions $M\to\mathfrak{g}$ for $\mathfrak{g}$ the Lie algebra of $G$.
The group of gauge transformations is indeed typically infinite-dimensional, and in your example you have observed that the algebra of infinitesimal gauge transformation of a $\mathrm{U}(1)$-theory on flat $\mathbb{R}^4$ is just the (infinite-dimensional) algebra of smooth functions $\mathbb{R}^4\to\mathbb{R}$. Since $\mathfrak{u}(1)\cong\mathbb{R}$ (the tangent space of a circle is just the real line), this is indeed an infinitesimal gauge transformation in the above sense.


text:
# Energy-Time Uncertainty Relation

by harjyot
Tags: energytime, relation, uncertainty
 Share this thread:
 P: 42 I was trying to Go from the uncertainty principle to its energy-time counter part. i know the maths is a bit off,but the idea is correct? dx=position p=momentum e=energy $\upsilon$=frequency $\lambda$=wavelength c=velocity of electromagnetic radiations dt=time now , $\lambda$=h/p.............(i) c=$\upsilon$.$\lambda$.............(ii) e=h.$\upsilon$ e=(h.c)/$\lambda$ replacing $\lambda$'s value here from (i) e=(h.c)/(h/p) e=c.p now c = velocity of light , it can be written as dx/dt e= (dx/dt).p multiplying by dt on both sides e.dt=(dx/dt).dt.p e.dt=dx.p Therefore frome this relation if we straight away incorporate this in place of the σx.σp≥h/4π cannot we get σe.σt≥4π
P: 32
 Quote by harjyot I was trying to Go from the uncertainty principle to its energy-time counter part. i know the maths is a bit off,but the idea is correct? dx=position p=momentum e=energy $\upsilon$=frequency $\lambda$=wavelength c=velocity of electromagnetic radiations dt=time now , $\lambda$=h/p.............(i) c=$\upsilon$.$\lambda$.............(ii) e=h.$\upsilon$ e=(h.c)/$\lambda$ replacing $\lambda$'s value here from (i) e=(h.c)/(h/p) e=c.p now c = velocity of light , it can be written as dx/dt e= (dx/dt).p multiplying by dt on both sides e.dt=(dx/dt).dt.p e.dt=dx.p Therefore frome this relation if we straight away incorporate this in place of the σx.σp≥h/4π cannot we get σe.σt≥4π
Your derivation only works symbolically (and is a good way to convince youself of the idea), as some of the equations above are meaningful only in a narrow range of applications. The uncertainty principle for position-momentum has a rigorous definition and proof (which is caused by the non-commutative relation of X and P operator), but not the energy-time relation. A better explanation for the energy-time uncertainty I've seen is from Shankar's Principles of Quantum Mechanics, this is due to the fact that particles' life time is only finite (at least on the one end), thus its fourier transform into the frequency domain fails to peak at a single frequency, instead will be spreaded - causing the uncertainty in energy measurement.

 Related Discussions Quantum Physics 10 Introductory Physics Homework 1 Quantum Physics 23 Quantum Physics 2 Quantum Physics 8


text:
## Some consequences of the Karpenko-Merkurjev theorem.

### Summary

We use a recent theorem of N. A. Karpenko and A. S. Merkurjev to settle several questions in the theory of essential dimension.

### Mathematics Subject Classification

20G15, 20D15, 20C15, 14L30, 11E72

### Keywords/Phrases

essential dimension, linear representations, finite $p$-groups, algebraic tori


text:
12:22 AM
That seems to work, if you don't write the answer I'll try to write one up later
Have to go sterilize a lab now

3 hours later…
3:49 AM
Anyone seeing lots of pdf backend warnings about duplicate destinations with the latest nicematrix update with lualatex?

4 hours later…
7:37 AM
@LaTeXereXeTaL can you show a small complete example?

8:09 AM
@UlrikeFischer did the generic bit of xkeyval get into miktex properly? (see recent question)

@DavidCarlisle I'll check.
@DavidCarlisle the generic files are missing. I will open an issue.

@UlrikeFischer thanks it looked that way from the OPs log :-)

8:25 AM
@DavidCarlisle hm, the texlive installation isn't faultless either. They seem to have put the examples into tex/generic.

@UlrikeFischer sometimes I wonder about the ctan preference for not having tds archives, and leaving it up to miktex and texlive to guess where to install stuff

@DavidCarlisle yes, it certainly opens place for errors, not only for the tex systems but also for users installing manually.

2 hours later…
10:05 AM
> The Best Nintendo Switch Games To Avoid Uncomfortable Interactions With Distant Relatives on Thanksgiving
@samcarter_preparing_for_xmas ^^ you gotta love some headlines. :)

@PauloCereda :D I thought that's why we do all this covid nonsense :)
Luckily my desk lamp broke yesterday, so I had to make a trip to the hardware store and there was this cute duck waiting to be adopted:

@samcarter_preparing_for_xmas :)
@samcarter_preparing_for_xmas OH MY <3

@PauloCereda One must simply love the colour!

@samcarter_preparing_for_xmas indeed!

10:35 AM
@DavidCarlisle do you know how (in)compatible tabulary is with arydshln?

10:50 AM
@UlrikeFischer I may have done once but not now. I can't remember is arydshln compatible with array package at all? If it is it should work with tabularx/y as that's just a normal tabular* after it has guessed the width to make p columns.

\documentclass{article}

\usepackage{tabulary}
\usepackage{arydshln}

\begin{document}
\begin{tabulary}{10cm}{CCC}
& Mo & Di\\
10:00 & Deutsch & Englisch\\
11:00 & Deutsch & Kunst\\
\end{tabulary}
\end{document}
\documentclass{article}

\usepackage{array}
\usepackage{arydshln}
\usepackage{tabulary}

\begin{document}
\begin{tabular}{lll}\hline
A&B&C\\\hdashline
\end{tabular}

\begin{tabulary}{10cm}{CCC}
& Mo & Di\\%\hdashline
10:00 & Deutsch & Englisch\\
11:00 & Deutsch & Kunst\\
\end{tabulary}
\end{document}
gives
! Missing # inserted in alignment preamble.
&
l.31 \end{tabulary}
So I think I will say "you will have to choose ..."

Good morning all, I want to get rid of pkg pdftexcmds, but I cannot get the L3 replacement working. For example pdffiledump. This is my example:
\documentclass{article}

\usepackage{pdftexcmds}

\begin{document}
\ExplSyntaxOn
% works
\lua_now:e{
oberdiek.pdftexcmds.filedump( "0", "8", "\lua_escape:e{\jobname.tex}" )
}
~
% doesn't
\lua_now:e{
ltx.util.filedump( "\lua_escape:e{\jobname.tex}", "0", "8" )
}
\ExplSyntaxOff
\end{document}

@AlexG Where is ltx.util from? The expl3 equivalent would be l3kernel.filedump

@AlexG there is an s missing in utils, and I think the numbers should be numbers. And you need to do something to print it,
\lua_now:e{
tex.sprint(ltx.utils.filedump( "\lua_escape:e{\jobname.tex}", 0, 8 ))
}

@PhelypeOleinik I took it from texdoc interface3, page 257.

11:06 AM
@AlexG Oh, l3kernel is deprecated. Sorry

@PhelypeOleinik ooh l4kernel :)
2

@PauloCereda Only 2000 years to go

@UlrikeFischer Oh, a typo!
@UlrikeFischer Thank you, this works!!!
( I am luatex almost illiterate.)

@UlrikeFischer I suppose I should look... especially for horizontal dashes it must be trivial to make work as they are self contained, vertical dashes have a larger impact on the whole table buildup.

@UlrikeFischer We should probably add tonumber() here

11:15 AM
@PhelypeOleinik In the year 2525... :)

@PauloCereda ... if ducks are still alive

@DavidCarlisle oh no
@DavidCarlisle do you know Futurama's version of this song? :)

@AlexG The “official” name for \jobname is \c_sys_jobname_str

@PauloCereda probably not. Sadly though non-biodegradable plastic ducks may still be here in 2525

11:25 AM
@DavidCarlisle woo

@PauloCereda wrong response to an environmental damage comment

@DavidCarlisle oh

@DavidCarlisle I think I can obsolete textcase :)

@egreg Oh, didn't know that. Thank you!

@DavidCarlisle That's would only be a problem, if people would throw away plastic ducks - which of course nobody does because one keeps such nice things

11:34 AM
@samcarter_preparing_for_xmas exactly

@JosephWright there are only 60 lines of code to replace:-)

@DavidCarlisle See Skype
@DavidCarlisle Sure :)
@DavidCarlisle I do worry that the expandable code isn't efficient, but it's as close-to as short as I could make it (if we need more speed, I can drop some bool operations and do things old-style)
@DavidCarlisle Did you see my email?

@JosephWright er, no, let me catch up..

@PauloCereda ketchup is red

11:40 AM
@DavidCarlisle ooh

11:52 AM
Regarding f-type expansion \romannumeral-0. Is it known who actually discovered this trick?

@HenriMenke I'd guess Heiko or Alan Jeffrey, or of course DEK himself, but I can't be sure: it certainly goes back a long way (it's been in expl3 more-or-less for ever, so late 1980s or early 1990s)

@JosephWright Is there version control information from these days to see who checked it in?

@PhelypeOleinik is this supposed to loop?
\documentclass{article}
\ExplSyntaxOn
\NewDocumentCommand\test{m}{#1}
\NewCommandCopy\origtest\test
\RenewDocumentCommand{\test}{m}{something\origtest{#1}}
\ExplSyntaxOff

\begin{document}
\origtest{abc}
\end{document}

@PauloCereda ^^^

@HenriMenke Er, no, I don't think even the 'private' SVN goes back that far (plus the older checkins were done by Rainer 'on behalf' of others, so the commit messages don't really help)

11:58 AM
@JosephWright Too bad, so I'll keep calling it “romannumeral trick”.

@HenriMenke What I do

@UlrikeFischer, @JosephWright Just discovered \file_hex_dump:nnn. But it doesn't seem to work, as it returns nothing:
\documentclass{article}

\begin{document}
\ExplSyntaxOn
\lua_now:e{
tex.sprint(ltx.utils.filedump( "\lua_escape:e{\c_sys_jobname_str.tex}", 0, 8 ))
}
\par
% (empty)
\file_hex_dump:nnn{\c_sys_jobname_str.tex}{0}{8}
\ExplSyntaxOff
\end{document}

@HenriMenke LOL! in my mind they will be microcrisps hereafter. :p

@AlexG Hmm, we have some index issues here: you need to start from 1 in the TeX code, but it looks like the Lua code starts from 0. We've standardised on index-from-1, but that's probably fuzzy when emulating primitives that index from zero. I'll log an issue

@HenriMenke LOL

12:07 PM
@JosephWright Thanks!

@AlexG github.com/latex3/latex3/issues/825 - I want to see if my analysis is right before adjusting the code
@AlexG I think pdfTeX indexes from 1 in any case, so you should be saying {1}{8} not {0}{8}. But I'd like some testing (@UlrikeFischer, @DavidCarlisle, @MarcelKrüger, @PhelypeOleinik could all look as well as me)

find of the day: \mathrm{\exp}, hmmm

@HenriMenke possibly David K (he certainly popularised it)
@JosephWright ^

@UlrikeFischer I can do better. I sent the .log to the maintainer and while I was sleeping the replied to confirmed a bug, sent a fix which works, and said the fix wold soon be pushed to CTAN.

@JosephWright pdftex manual says: ... must be >=0

12:23 PM
@JosephWright looks like 0 8 is correct to get the first 8 bytes according to th emanual

@JosephWright , @DavidCarlisle I ran a test, in pdftex, offset is zero-based. With offset=1 , the result is different:
\documentclass{article}

\begin{document}
\ExplSyntaxOn
%\lua_now:e{
%  tex.sprint(ltx.utils.filedump( "\lua_escape:e{\c_sys_jobname_str.tex}", 0, 8 ))
%}
\pdffiledump offset 0 length 8 {\c_sys_jobname_str.tex}
\par
\file_hex_dump:nnn{\c_sys_jobname_str.tex}{1}{8}
\ExplSyntaxOff
\end{document}
@JosephWright I find it unfortunate that \file_hex_dump:nnn wants an absolute index as second arg rather than a length (number of bytes) that pdftex and luatex expect.

@AlexG OK, so some adjustment is required
@AlexG I'll check hy we've done that

@JosephWright because REASONS? :)

@AlexG Ah, I remember
@AlexG In general, all of our 'range' functions take start-and-end, not start-and-length - for example \tl_range:nnn
@AlexG That's also why the TeX functions should index from 1: it's consistent with other parts of expl3

@JosephWright wait, 1-based indices?! That should be the 0-th item in your TODO. :)

12:35 PM
@JosephWright Makes sense. But as far as reading bytes from a file is concerned...

@JosephWright I was going to comment to @AlexG that the 0 offset is still consistent with the index being 1-based. The first byte is index 1.
@AlexG agreed but you can make your own user function that takes offset and length and calculates start and end so expl3 can do the reverse calculation to pass to pdftex.

@DavidCarlisle That's possible, of course.

@AlexG I see that it's n unusl case: I think we likely need to have a biref discussion on GitHub to work out how things should go
@AlexG Lu also indexes from 1 everywhere

@JosephWright don't make me hit you with my Flores book on computer arithmetic. :)
2
"Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration." — Stan Kelly-Bootle
@JosephWright ^^ :)

12:42 PM
@PauloCereda Futurama is awesome :D

@PhelypeOleinik <3

@PauloCereda given that I spend my day job converting between C and Fortran array indices are a big issue:-)

@UlrikeFischer I think so, because I didn't add \NewCommandCopy/\ShowCommand support to xparse (coming soon :)

@DavidCarlisle ooh :)

@PauloCereda ??

12:46 PM
@UlrikeFischer Yes, without xparse support, that is the same as \let\origtest\test, and then \origtest recurses to (the new) \test

@JosephWright computer arithmetic is a... fun subject. :)

@AlexG The main use cawses seem to be either 'all the file' or a predictable part, plus one can use expressions in those arguments to do a start pos. and an end-pos based on start + length

@DavidCarlisle :)

@PhelypeOleinik you mean if \test is an xparse command?

12:52 PM
@JosephWright Allow 0 as functionally-equivalent to zero did you mean 1 there?

@UlrikeFischer Yes, \NewCommandCopy has to “know” what an xparse command looks like to copy it, but it still doesn't

@JosephWright start, start+length-1 ;-)

@DavidCarlisle |E, yes

@PhelypeOleinik ah, somehow I thought it would already support xparse commands. But currently it is only \DeclareRobustCommands? How do one get the documentation with texdoc?

@JosephWright OK then I don't agree but at least I understand the suggestion:-)

1:00 PM
@UlrikeFischer \DeclareRobustCommand, \newcommand with optional argument, and (etoolbox) \newrobustcmd... Basically the same as \LetLtxMacro :)
@UlrikeFischer There isn't a documentation other than what's in ltnews or the source... sorry :)

1:12 PM
@PhelypeOleinik @DavidCarlisle will be pleased to hear ;-).

@UlrikeFischer :)
@UlrikeFischer I wonder where do we document these new stuff

@PhelypeOleinik the documentation of latex is a bit difficult to access anyway. You can get source2e with texdoc, but the rest is a bit of a chance game if you don't know the exact file name you are looking for.

1:50 PM
@JosephWright I'm confused by your last gh comment the version with % doesn't (empty) works and produces the same output as the line above doesn't it?

@DavidCarlisle Yes, I didn't remove @AlexG's comment line: guess I should

2:02 PM
@JosephWright ah I must say I have often posted on this site OP's mwe with "this doesn't work" comments after I'd made it work, so I should have spotted that:-)

OH NO

@PauloCereda LOL!

2:18 PM
@JosephWright @DavidCarlisle did you see the \romanumeral mail on the luatex list? Doing \romannumeral2000000000 \end with pdflatex is quite impressing too ;-)

@UlrikeFischer No??

ooh naughty romans
What have \romannumeral's ever done for us?

@JosephWright it segfaults with luatex. But with pdflatex it prints lots, really lots of "m". The romans seems not to have something for such large numbers ;-)
3

@UlrikeFischer LOL

2:31 PM
Just got some comments back from my thesis advisor and he specially mentioned that my tikz graphics are beautiful. :p
4

@Plergux ooh congrats!
:D

@PauloCereda :D thanks. :) I haven't told him yet that it's tikz (LaTeX). He probably thinks it's R graphics or Python or something. :p

@Plergux ooh :)

@PauloCereda but I'm probably going to tell him soon. seeing as how he's impressed :p
@PauloCereda When I mentioned it first in connection with my thesis he said something like "yeah, you should probably have learned that ten years ago." XD

@Plergux :)
@Plergux ooh :D

2:41 PM
@Plergux In the old days with thesis set on typewriter you had to do good mathematics to impress your supervisor, now all you need to do is throw in a few colourful tikz pictures. Progress of a sort:-)

@DavidCarlisle Heh heh heh... I actually did impress him with my mathematics in my analysis of colour compound distribution (ratios of red yellow versus yellow red, green blue versus blue green, etc.), but seeing as how he's a linguist and not a mathematician perhaps that is not such a feat. :p
@DavidCarlisle (it was a great feat for me in any case!)

@Plergux Sumir eru málfræðingar og stærðfræðingar

ooh partial derivatives

@DavidCarlisle Sumir já. Það er fámennt en góðmennt í þeim hópi. :p

@Plergux Eintómt líf sem ég lifi

2:54 PM
@DavidCarlisle Innantómt? Einmanalegt? "Eintómt" er "nothing but", e.g. "Það eru eintómir rugludallar á tex-latex-and-friends." :p

baa

@Plergux @PauloCereda struggles to understand my Portuguese sometimes as well. As I use an infallible linguistic oracle I can not imagine why it is hard to understand.

@DavidCarlisle oh

@PauloCereda small test: Panquecas de pato chinesas

@DavidCarlisle Pshaw, we've got "linguistic licence" :p
@DavidCarlisle Eu não entendo o que ele está confundindo! :p

3:10 PM
@DavidCarlisle OH NO

2 hours later…
5:40 PM
DEUTSCHE POST

6:03 PM
Nov 20 at 19:39, by David Carlisle
@LaTeXereXeTaL you are making the fundamental error of assuming that anyone has any idea what @PauloCereda is talking about most of the time.

6:52 PM
@PhelypeOleinik Expect a PR pretty soon: I thinkl I've sorted the xparse final move for 2e

@JosephWright Ah, cool!

@PhelypeOleinik Oddly, I'm a bit nervous about rollback

@JosephWright No idea why ;-)

@PhelypeOleinik I plan to leave the latex3 side until after the kernel release: it's tidying-up and should be safe left until then

@JosephWright Sounds reasonable, yes
@JosephWright Did you manage to move the commit history along?

6:56 PM
@JosephWright On success: Another great triumph for Great Britain! / On failure: Drat, Joseph broke it again.

@PhelypeOleinik The xparse one? No: it's really tricky to do that as it's a partial file, not even a full directory. We have the xparse history in latex3, and it's not going anywhere

@JosephWright No problem. I remember trying to move a commit history once and though I was too stupid to get it right :)
@JosephWright Shouldn't it go into develop?

@PhelypeOleinik @UlrikeFischer's sword kept the histories in ho-tex :-)

@PhelypeOleinik So it should: fixed
@PhelypeOleinik I hope I've got roll forward right, but we likely need to think about where best to 'park' the frozen xparse.ltx

@DavidCarlisle A history of blood and terror complaints and broken code

7:04 PM
@PhelypeOleinik blame @UlrikeFischer

@DavidCarlisle I'm not saying it's not doable
@DavidCarlisle, @PhelypeOleinik The issue with xparse is we actually don't want the full file anyway. So it's a partial re-write and move, at which point I'm not sure if doing a copy-commit-split approach is helfpul

@JosephWright it doesn't really matter much if the history is still in the old place. I was hoping to dwindle oberdiek to nothing so needed to move the history really (and it was whole files of course)

@DavidCarlisle True

If anyone was into jazz, some friends hold a live e-concert just now from one of the coolest jazz clubs in Europe :) youtube.com/watch?v=_gPrAEfzyzw

@DavidCarlisle We do have the history back though the old move from l3in2e of course

7:08 PM
@yo' ooh thanks

@JosephWright the secret fact about source control is the history is hardly ever used:-)

@DavidCarlisle Reminds me we should look at my color PR

@PauloCereda I know the drummer and the soundmaster

@yo' cool!

@PauloCereda ^^ at a concert!

7:18 PM
@yo' ooh

@PauloCereda lolwhut?

@Plergux no idea
@Plergux but it's Snake 'n' Bacon! :)

@PauloCereda Well, I've never had snake. For all I know it's just as delicious as bacon. :p

1 hour ago, by David Carlisle
Nov 20 at 19:39, by David Carlisle
@LaTeXereXeTaL you are making the fundamental error of assuming that anyone has any idea what @PauloCereda is talking about most of the time.

@Plergux LOL
@DavidCarlisle oh

7:35 PM
@PauloCereda bacon and dangernoodles sounds delish. :p

@Plergux ooh <3

@DavidCarlisle Well, I haven't got the foggiest what I'm talking about half the time either so that would break even, I think. :p

@Plergux <3

Came into the room just in time to see my name. Hope I'm not in trouble.

@LaTeXereXeTaL :)

2 hours later…
9:21 PM
@DavidCarlisle Hi, as I know you belong to most things related to TeX, just for fun (and to try to understand how it works), try to compile the examples of bidi-atbegshi and they don't work :( ...the team of "persian" TeX is related to the team of LaTeX3?
@PauloCereda I miss my swap partition :D

@PabloGonzálezL Some of us got 'asked' to help out
@PabloGonzálezL bidi is 'interesting'

@JosephWright Yes, quite interesting, I have never written anything LR, but the way the code works is what I would like to try to understand, especially why only XeTeX and not LuaTeX
@JosephWright I assume that bidi-atbegshi is another victim of hooks :)

@PabloGonzálezL It's not just interesting for that reason: I meant specifically code released as 'bidi', although yes, RTL is 'fun' [even more so for vertical setting: what does 'hbox' even mean in that context ;)]

@PabloGonzálezL what do you mean? which examples?

@UlrikeFischer From git repo

9:31 PM
@PabloGonzálezL yes, but which one? this bidi stuff is wandering all the time some like sand dune.

@PabloGonzálezL this gh organisation is me more or less :-) github.com/bidi-tex but it no longer looks after bidi and xepersion (a long story you don't want to know)

@DavidCarlisle, @PhelypeOleinik, @egreg, @MarcelKrüger, @UlrikeFischer (@PauloCereda) I wonder if Bruno's seen alanshawn.com/tech/2020/08/03/l3fp-accuracy.html

@JosephWright Wow!

@UlrikeFischer All test fail :(

@egreg Bruno did an amazing job

9:34 PM
@JosephWright Indeed!
@JosephWright Now, if he could improve the trig functions… 😉

@egreg Hyperbolics?

@JosephWright The blog mentions the trig functions being the less accurate of the lot.

@JosephWright hmm he's comparing against the double not the (newer) ieee standard decimal, still results pretty good:-)

@PabloGonzálezL yes that quite probably won't work with a current latex. bidi patches lots of packages and kernel code but seems no longer to update its patches. If we hadn't added something to firstaid, it wouldn't work at all github.com/persiantex/bidi/issues/18

@egreg True, relatively of course
@DavidCarlisle Well yes: the decimal standard was the aim; I just thought it was a nice article (I was re-reading his expl3` tutorial)

9:40 PM
@JosephWright Bruno was targetting the decimal floating point from IEEE-754-2008 not double, it would be interesting to check what it says about the bounds on trig accuracy.

@UlrikeFischer OK, I don't really understand the organization of this in Git (github.com/bidi-tex) or (github.com/persiantex)

@PabloGonzálezL bidi-tex is basically archived. At some time bidi was there but as I wrote it wandered around and you don't want to know the story (and we don't want to tell it).

@UlrikeFischer Heh-heh..OK
@DavidCarlisle To all this, some advertising for 'latex' in (texfaq.org/FAQ-tutbitslatex) would not be bad :)
I refer to 'www.learnlatex.org'.

@PabloGonzálezL ooh JUST READ THIS: IGNORE ALL FALSE PROPHETS TUTORIALS
4

@DavidCarlisle I will add this sentence to my list :)

9:57 PM
@PabloGonzálezL @JosephWright I guess I should add a line.

@DavidCarlisle at the begin and in bold ...

@DavidCarlisle And if possible repair the broken link (tac.dk/cgi-bin/info2www?(latex)) :P

@PabloGonzálezL looks like it's gone? tac.dk/?s=latex

@Dr.ManuelKuehner Hi, very kind. I hope you are well as all your loved ones. I send you and everyone a big greeting and a virtual hug. Sebastiano
Good evening from East Sicily to everyone.

@DavidCarlisle We probably should revise that page; it's quite out-of-date

10:05 PM
@DavidCarlisle Searching for broken links is a headache, there should be some script that does this efficiently, I add in Perl or Lua, no java of course (@PauloCereda)

@JosephWright yes I removed the para with the broken link and added something for learnlatex but a rewrite wouldn't hurt (eg listing some of the ones you found while starting the learnlatex effort)

@DavidCarlisle Probably best if someone else does that; might be rather biased otherwise (I wonder about @barbarabeeton)

@JosephWright :-)

10:53 PM
@Plergux -- Well, you could try to impress him with structure trees and parsed utterances.

11:19 PM
@JosephWright -- You rang? What would you like me to read?


text:
# Fixing A VS2017 15.6 Installation Problem

After installing the latest Visual Studio 2017 15.6.6 (Community Edition), I found my custom setting of environment variables INCLUDE lost effect in the Developer Command Prompt. Strangely, LIB was still there. Some tracing indicated that it was a bug in the .BAT files Microsoft provided to initialize the environment. The offending lines are the following (in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd\core\winsdk.bat; one of them is very long and requires scrolling for viewing):

@REM the folowing are architecture neutral
set __tmpwinsdk_include=
if "%INCLUDE%" NEQ "" set "__tmp_include=;%INCLUDE%"
set "INCLUDE=%WindowsSdkDir%include\%WindowsSDKVersion%shared;%WindowsSdkDir%include\%WindowsSDKVersion%um;%WindowsSdkDir%include\%WindowsSDKVersion%winrt;%WindowsSdkDir%include\%WindowsSDKVersion%cppwinrt%__tmpwinsdk_include%"
set __tmpwinsdk_include=

Apparently somebody missed renaming __tmp_include to __tmpwinsdk_include. Doing that myself fixed the problem.

I’ve reported the problem to Microsoft. In the meanwhile, you know how to fix it if you encounter the same problem.


text:
B. Olympic Medal
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

The World Programming Olympics Medal is a metal disk, consisting of two parts: the first part is a ring with outer radius of r 1 cm, inner radius of r 2 cm, (0 < r2 < r1) made of metal with density p 1 g/cm 3. The second part is an inner disk with radius r 2 cm, it is made of metal with density p 2 g/cm 3. The disk is nested inside the ring.

The Olympic jury decided that r 1 will take one of possible values of x 1, x 2, ..., x n. It is up to jury to decide which particular value r 1 will take. Similarly, the Olympic jury decided that p 1 will take one of possible value of y 1, y 2, ..., y m, and p 2 will take a value from list z 1, z 2, ..., z k.

According to most ancient traditions the ratio between the outer ring mass m out and the inner disk mass m in must equal , where A, B are constants taken from ancient books. Now, to start making medals, the jury needs to take values for r 1, p 1, p 2 and calculate the suitable value of r 2.

The jury wants to choose the value that would maximize radius r 2. Help the jury find the sought value of r 2. Value r 2 doesn't have to be an integer.

Medal has a uniform thickness throughout the area, the thickness of the inner disk is the same as the thickness of the outer ring.

Input

The first input line contains an integer n and a sequence of integers x 1, x 2, ..., x n. The second input line contains an integer m and a sequence of integers y 1, y 2, ..., y m. The third input line contains an integer k and a sequence of integers z 1, z 2, ..., z k. The last line contains two integers A and B.

All numbers given in the input are positive and do not exceed 5000. Each of the three sequences contains distinct numbers. The numbers in the lines are separated by spaces.

Output

Print a single real number — the sought value r 2 with absolute or relative error of at most 10 - 6. It is guaranteed that the solution that meets the problem requirements exists.

Examples
Input
3 1 2 31 23 3 2 11 2
Output
2.683281573000
Input
4 2 3 6 42 1 23 10 6 82 1
Output
2.267786838055
Note

In the first sample the jury should choose the following values: r 1 = 3, p 1 = 2, p 2 = 1.


text:
# [texhax] Set depth to zero

Philip Taylor P.Taylor at Rhul.Ac.Uk
Thu Jul 12 11:40:00 CEST 2018

Rodolfo Medina wrote:
>
> It seems to me that it's not possible to achieve what I was asking (well, just
> an experiment...), i.e. nullify the depth of text lines; or, in other words,
> set \baselineskip to the mere height' of lines: height, without their depth,
> that's zero for a', m', and not zero for g', p', etc...  In that case, the
> valour of \baselineskip should be different for different lines, with or
> without capital letters in them...  and equal to the line height that's
> variable.  It doesn't seem that TeX has a way to do that...

Would you not accept equi-spaced lines which are both ascender and
descender presence/height/depth independent ?  That effect is easy to
accomplish :

% !TeX Program=XeTeX

\hsize = 10 pc

\parindent = 0 pt

\parskip = 1\normalbaselineskip

\baselineskip = 1,2 \normalbaselineskip

\toks 0 = {Now is the time for all good men to come to the aid of the
party. The quick brown fox jump right over the lazy dog's back. Of all
the fish within the sea, the mermaid is the one for me. The Leith police
dismisseth us, for we sufficeth them.}

\lineskip = 0 pt

\lineskiplimit = -\maxdimen

\loop

\the \toks 0 \endgraf

\baselineskip = 0,9 \baselineskip

\ifdim \baselineskip > 7 pt

\repeat

\end

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20180712/b83a36b1/attachment.html>
`


text:
$$\renewcommand\AA{\unicode{x212B}}$$

# FilterEvents v1¶

## Summary¶

Filter events from an EventWorkspace to one or multiple EventWorkspaces according to a series of splitters.

## Properties¶

Name

Direction

Type

Default

Description

InputWorkspace

Input

EventWorkspace

Mandatory

An input event workspace

SplitterWorkspace

Input

Workspace

Mandatory

An input SpilltersWorskpace for filtering

OutputWorkspaceBaseName

Input

string

OutputWorkspace

The base name to use for the output workspace. The output workspace names are a combination of this and the index in splitter.

InformationWorkspace

Input

TableWorkspace

Optional output for the information of each splitter workspace index.

OutputTOFCorrectionWorkspace

Output

MatrixWorkspace

TOFCorrectWS

Name of output workspace for TOF correction factor.

FilterByPulseTime

Input

boolean

False

Filter the event by its pulse time only for slow sample environment log. This option can make execution of algorithm faster. But it lowers precision.

GroupWorkspaces

Input

boolean

False

Option to group all the output workspaces. Group name will be OutputWorkspaceBaseName.

OutputWorkspaceIndexedFrom1

Input

boolean

False

If selected, the minimum output workspace is indexed from 1 and continuous.

CorrectionToSample

Input

string

None

Type of correction on neutron events to sample time from detector time. Allowed values: [‘None’, ‘Customized’, ‘Direct’, ‘Elastic’, ‘Indirect’]

DetectorTOFCorrectionWorkspace

Input

TableWorkspace

Name of table workspace containing the log time correction factor for each detector.

IncidentEnergy

Input

number

Optional

Value of incident energy (Ei) in meV in direct mode.

SpectrumWithoutDetector

Input

string

Skip

Approach to deal with spectrum without detectors. Allowed values: [‘Skip’, ‘Skip only if TOF correction’]

SplitSampleLogs

Input

boolean

True

If selected, all sample logs will be splitted by the event splitters. It is not recommended for fast event log splitters.

NumberOutputWS

Output

number

Number of output output workspace splitted.

DBSpectrum

Input

number

Optional

Spectrum (workspace index) for debug purpose.

OutputWorkspaceNames

Output

str list

List of output workspaces names

RelativeTime

Input

boolean

False

Flag to indicate that in the input Matrix splitting workspace,the time indicated by X-vector is relative to either run start time or some indicted time.

FilterStartTime

Input

string

Start time for splitters that can be parsed to DateAndTime.

TimeSeriesPropertyLogs

Input

str list

List of name of sample logs of TimeSeriesProperty format. They will be either excluded from splitting if ExcludedSpecifiedLogs is specified as True. Or They will be the only TimeSeriesProperty sample logs that will be split to child workspaces.

ExcludeSpecifiedLogs

Input

boolean

True

If true, all the TimeSeriesProperty logs listed will be excluded from duplicating. Otherwise, only those specified logs will be split.

DescriptiveOutputNames

Input

boolean

False

If selected, the names of the output workspaces will include information about each slice.

## Description¶

This algorithm filters events from a single Event Workspace to one or multiple EventWorkspaces according to the SplittersWorkspace property. The Event Filtering concept page has a detailed introduction to event filtering.

## Specifying the splitting strategy¶

The SplittersWorkspace describes much of the information for splitting the InputWorkspace into the various output workspaces. It can have one of three types

workspace class

units

rel/abs

MatrixWorkspace

seconds

either

SplittersWorkspace

nanoseconds

absolute

TableWorkspace

seconds

either

Whether the values in MatrixWorkspace and TableWorkspace is treated as relative or absolute time is dependent on the value of RelativeTime. In the case of RelativeTime=True, the time is relative to the start of the run (in the ws.run()['run_start']) or, if specified, the FilterStartTime. In the case of RelativeTime=False, the times are relative to the GPS epoch.

Both TableWorkspace and SplittersWorkspace have 3 columns, start, stop, and target which should be a float, float, and string. The event filtering concept page has details on creating the TableWorkspace by hand.

If the SplittersWorkspace is a MatrixWorkspace, it must have a single spectrum with the x-value is the time boundaries and the y-value is the workspace group index.

The optional InformationWorkspace is a TableWorkspace for information of splitters.

## Unfiltered Events¶

Some events are not inside any splitters. They are put to a workspace name ended with _unfiltered. If OutputWorkspaceIndexedFrom1=True, then this workspace will not be created.

## Using FilterEvents with fast-changing logs¶

There are a few parameters to consider when the log filtering is expected to produce a large splitter table. An example of such a case would be a data file for which the events need to be split according to a log with two or more states changing in the kHz range. To reduce the filtering time, one may do the following:

• Make sure the SplitterWorkspace input is a MatrixWorkspace. Such a workspace can be produced by using the FastLog = True option when calling GenerateEventsFilter.

• Choose the logs to split. Filtering the logs can take a substantial amount of time. To save time, you may want to split only the logs you will need for analysis. To do so, set ExcludeSpecifiedLogs = False and list the logs you need in TimeSeriesPropertyLogs. For example, if we only need to know the accumulated proton charge for each filtered workspace, we would set TimeSeriesPropertyLogs = proton_charge.

### Correcting time neutron was at the sample¶

When filtering fast logs, the time to filter by is the time that the neutron was at the sample. This can be specified using the CorrectionToSample parameter. Either the user specifies the correction parameter for every pixel, or one is calculated. The correction parameters are applied as

$TOF_{sample} = TOF_{detector} * scale[detectorID] + shift[detectorID]$

and stored in the OutputTOFCorrectionWorkspace.

• CorrectionToSample="None" applies no correction

• CorrectionToSample="Elastic" applies $$shift = 0$$ with $$scale = L1/(L1+L2)$$ for detectors and $$scale = L1/L_{monitor}$$ for monitors

• CorrectionToSample="Direct" applies $$scale = 0$$ and $$shift = L1 / \sqrt{2 E_{fix} / m_n}$$. The value supplied in IncidentEnergy will override the value found in the workspace’s value of Ei.

• CorrectionToSample="Indirect" applies $$scale = 1$$ and $$shift = -1 * L2 / \sqrt{2 E_{fix} / m_n}$$ for detectors. For monitors, uses the same corrections as Elastic.

• CorrectionToSample="Customized" applies the correction supplied in the DetectorTOFCorrectionWorkspace.

## Difference from FilterByLogValue¶

In FilterByLogValue, EventList.splitByTime() is used. In FilterEvents, it only uses this when FilterByPulse=True. Otherwise, EventList.splitByFullTime() is used. The difference between splitByTime and splitByFullTime is that splitByTime filters events by pulse time, and splitByFullTime considers both pulse time and TOF.

## Usage¶

Example - Filtering event without correction on TOF

ws = Load(Filename='CNCS_7860_event.nxs')
splitws, infows = GenerateEventsFilter(InputWorkspace=ws, UnitOfTime='Nanoseconds', LogName='SampleTemp',
MinimumLogValue=279.9,  MaximumLogValue=279.98, LogValueInterval=0.01)

FilterEvents(InputWorkspace=ws, SplitterWorkspace=splitws, InformationWorkspace=infows,
OutputWorkspaceBaseName='tempsplitws',  GroupWorkspaces=True,
FilterByPulseTime = False, OutputWorkspaceIndexedFrom1 = False,
CorrectionToSample = "None", SpectrumWithoutDetector = "Skip", SplitSampleLogs = False,
OutputTOFCorrectionWorkspace='mock')

# Print result
wsgroup = mtd["tempsplitws"]
wsnames = wsgroup.getNames()
for name in sorted(wsnames):
tmpws = mtd[name]
print("workspace %s has %d events" % (name, tmpws.getNumberEvents()))

Output:

workspace tempsplitws_0 has 124 events
workspace tempsplitws_1 has 16915 events
workspace tempsplitws_2 has 10009 events
workspace tempsplitws_3 has 6962 events
workspace tempsplitws_4 has 22520 events
workspace tempsplitws_5 has 5133 events
workspace tempsplitws_unfiltered has 50603 events

Example - Filtering event by a user-generated TableWorkspace

import numpy as np

# create TableWorkspace
split_table_ws = CreateEmptyTableWorkspace()

# filter events
FilterEvents(InputWorkspace=ws, SplitterWorkspace=split_table_ws,
OutputWorkspaceBaseName='tempsplitws3',  GroupWorkspaces=True,
FilterByPulseTime = False, OutputWorkspaceIndexedFrom1 = False,
CorrectionToSample = "None", SpectrumWithoutDetector = "Skip", SplitSampleLogs = False,
OutputTOFCorrectionWorkspace='mock',
RelativeTime=True)

# Print result
wsgroup = mtd["tempsplitws3"]
wsnames = wsgroup.getNames()
for name in sorted(wsnames):
tmpws = mtd[name]
print("workspace %s has %d events" % (name, tmpws.getNumberEvents()))
split_log = tmpws.run().getProperty('splitter')
entry_0 = np.datetime_as_string(split_log.times[0].astype(np.dtype('M8[s]')), timezone='UTC')
entry_1 = np.datetime_as_string(split_log.times[1].astype(np.dtype('M8[s]')), timezone='UTC')
print('event splitter log: entry 0 and entry 1 are {0} and {1}.'.format(entry_0, entry_1))

Output:

workspace tempsplitws3_a has 77580 events
event splitter log: entry 0 and entry 1 are 2010-03-25T16:08:37Z and 2010-03-25T16:10:17Z.
workspace tempsplitws3_b has 0 events
event splitter log: entry 0 and entry 1 are 2010-03-25T16:08:37Z and 2010-03-25T16:11:57Z.
workspace tempsplitws3_c has 0 events
event splitter log: entry 0 and entry 1 are 2010-03-25T16:08:37Z and 2010-03-25T16:15:17Z.
workspace tempsplitws3_unfiltered has 34686 events
event splitter log: entry 0 and entry 1 are 2010-03-25T16:08:37Z and 2010-03-25T16:10:17Z.

Example - Filtering event by pulse time

ws = Load(Filename='CNCS_7860_event.nxs')
splitws, infows = GenerateEventsFilter(InputWorkspace=ws, UnitOfTime='Nanoseconds', LogName='SampleTemp',
MinimumLogValue=279.9,  MaximumLogValue=279.98, LogValueInterval=0.01)

FilterEvents(InputWorkspace=ws,
SplitterWorkspace=splitws,
InformationWorkspace=infows,
OutputWorkspaceBaseName='tempsplitws',
GroupWorkspaces=True,
FilterByPulseTime = True,
OutputWorkspaceIndexedFrom1 = True,
CorrectionToSample = "None",
SpectrumWithoutDetector = "Skip",
SplitSampleLogs = False,
OutputTOFCorrectionWorkspace='mock')

# Print result
wsgroup = mtd["tempsplitws"]
wsnames = wsgroup.getNames()
for name in sorted(wsnames):
tmpws = mtd[name]
print("workspace %s has %d events" % (name, tmpws.getNumberEvents()))

Output:

workspace tempsplitws_1 has 123 events
workspace tempsplitws_2 has 16951 events
workspace tempsplitws_3 has 9972 events
workspace tempsplitws_4 has 7019 events
workspace tempsplitws_5 has 22529 events
workspace tempsplitws_6 has 5067 events

Example - Filtering event with correction on TOF

ws = Load(Filename='CNCS_7860_event.nxs')
splitws, infows = GenerateEventsFilter(InputWorkspace=ws, UnitOfTime='Nanoseconds', LogName='SampleTemp',
MinimumLogValue=279.9,  MaximumLogValue=279.98, LogValueInterval=0.01)

FilterEvents(InputWorkspace=ws, SplitterWorkspace=splitws, InformationWorkspace=infows,
OutputWorkspaceBaseName='tempsplitws',
GroupWorkspaces=True,
FilterByPulseTime = False,
OutputWorkspaceIndexedFrom1 = False,
CorrectionToSample = "Direct",
IncidentEnergy=3,
SpectrumWithoutDetector = "Skip",
SplitSampleLogs = False,
OutputTOFCorrectionWorkspace='mock')

# Print result
wsgroup = mtd["tempsplitws"]
wsnames = wsgroup.getNames()
for name in sorted(wsnames):
tmpws = mtd[name]
print("workspace %s has %d events" % (name, tmpws.getNumberEvents()))

Output:

workspace tempsplitws_0 has 123 events
workspace tempsplitws_1 has 16951 events
workspace tempsplitws_2 has 9972 events
workspace tempsplitws_3 has 7019 events
workspace tempsplitws_4 has 22514 events
workspace tempsplitws_5 has 5082 events
workspace tempsplitws_unfiltered has 50605 events

Categories: AlgorithmIndex | Events\EventFiltering


text:
# Proof of probability of weak keys in block cipher

My textbook has the following theorem:

Given a block cipher with a key length of K bits and blocksize of n bits as well as t plaintext-ciphertext pairs, the expected number of false keys which encrypt all plaintexts to the corresponding cipher text is $$2^{k - tn}$$

This makes sense if you consider DES gives us roughly $$2^{-8}$$ for a single plaintext-ciphertext pair as explained here. However the author doesn't give a proof to this theorem, I want to know if it's possible to prove it and how can I prove it? I thought about using induction but I'm having some problems about which assumptions I can make

• BTW: the generally accepted meaning of 'weak key' isn't 'one that happens to decrypt this specific ciphertext into the correct plaintext', instead, it is a key with special properties; such as 'one of a set of keys for which we can detect (or decrypt) with much less than expected effort' or 'one with some surprising property' (such as the DES weak keys, which are self-decrypting keys, that is $Enc_k(Enc_k(X)) = X$ if $k$ is a DES weak key. May 16 '20 at 15:20

However the author doesn't give a proof to this theorem, I want to know if it's possible to prove it and how can I prove it?

The author likely doesn't bother with the proof because it is so straight-forward; we also need to note that the figure $$2^{k-tn}$$ is not exact, but merely an approximation (albeit a very close one for realistic key and block sizes); once we skip the approximation, the proof becomes slightly less trivial.

First, the assumption we make: that the cipher acts like an ideal cipher, in particular, if we give an incorrect key to the cipher, that it generates random ciphertext blocks (and ones that are independent of the ones generated with the correct key).

Then, if we consider giving the known $$t$$ plaintexts to the cipher with an incorrect key, it will generate $$t$$ random ciphertexts, each of which is $$n$$ bits. Given that these are random, the probability that all $$n$$ of them are precisely the same bits as the expected ciphertext bits is $$2^{-nt}$$ (as there are a total of $$nt$$ bits, all of which need to be precisely the correct value.

Now, this isn't quite accurate. The block cipher, even given an incorrect key, is still a permutation, and assuming that all the plaintext blocks are distinct, all the generated ciphertext blocks will be distinct. This means that, if $$t>1$$, that certain outputs (such as the all-0 output) will be impossible (because the cipher will never encrypt two different plaintexts into the same all-0 ciphertext block); the precise probability for an incorrect key is $$(2^n-t)! / 2^n! = \frac{1}{2^n \cdot (2^n-1) \cdot (2^n-2) \cdot … \cdot (2^n-t+1)}$$. If $$2^{n/2} \ggg t$$, that is, we're considerably under the "birthday bound", this is quite close to $$2^{-nt}$$

Now, this is the expected value for one incorrect key, and the total expected value is the sum of the expected values for all the various disjoint possibilities. There are a total of $$2^k$$ incorrect keys, and so the total expected value is $$2^k \cdot 2^{-nt} = 2^{k - nt}$$

Now, this also isn't quite accurate, there are $$2^k-1$$ incorrect keys (as we assumed that there was a correct key); obviously, for the key sizes we use, $$2^k$$ is quite a good approximation; we've also seen that $$(2^k-1)(2^n-t)! / 2^n!$$ is the precise (if generally less useful) expectation.

• @kelalaka: $t$ is the number of known plaintext-ciphertext blocks, and so the total number of bits of ciphertext we have is $nt$. I do see I swapped the meanings of $n, t$ around in my answer; fixed it May 16 '20 at 13:31
• Now, Ok. I was like in a hell! May 16 '20 at 13:49


text:
# FET Datasheet Specifications & Parameters

### Many different parameters and specifications appear in FET datasheets - everything from the Vgs to RDSON.

FET, Field Effect Transistor, Tutorial Includes:
FET basics     FET specs     JFET     MOSFET     Dual gate MOSFET     Power MOSFET     MESFET / GaAs FET     HEMT & PHEMT     FinFET technology

FET datasheets contain a host of different parameters and specifications which define the performance of the particular FET type.

When developing a new circuit or replacing an existing FET it is important to understand the different parameters and specifications that appear in the datasheets so that the correct device can be chosen and used..

All the specifications and parameters are important in different applications. Also dependent upon the device, the FET datasheets may quote different parameters which are relevant to the particular for which the device is intended.

## Major FET datasheet specifications & parameters

Some of the main FET specifications used in datasheets are defined below. Some of the parameters are particularly important for different types of FET, e.g. JFET while others may be more applicable to the MOSFET, etc.

• Gate source voltage, VGS :   The FET parameter VGS is the rating for the maximum voltage that can be tolerated between the gate and source terminals. The purpose for including this parameter in the data sheet is to prevent damage of the gate oxide. The actual gate oxide withstand voltage is typically much higher than this but it varies as a result of the tolerances that exist in the manufacturing processes. It is advisable to remain well within this rating so that the reliability of the device is maintained. Often many design rules indicate that the device should only be run to 60 or 70% of this rating.
• Drain-Source Voltage, VDSS:   This is a rating for the maximum drain-source voltage that can be applied without causing avalanche breakdown. The parameter is normally stated for the case where the gate is shorted to the source and for a temperature of 25°C. Depending on temperature, the avalanche breakdown voltage could actually be less than the VDSS rating.

When designing a circuit, it is always best to leave a significant margin between the maximum voltage to be experienced and the VDSS specification. Often they may be run at around 50% VDSS to ensure reliability.
• Gate reverse leakage current , Igss:

• Threshold voltage VGS(TH) :   The threshold voltage VGS(TH) is the minimum gate voltage that can form a conducting channel between the source and the drain. It is normally quoted for a given source drain current.
• Drain current at zero gate voltage , Idss :   This FET parameter is the maximum continuous current the device can carry with the device fully on. Normally it is specified for a particular temperature, typically 25°C.

This FET specification is based on the junction-to-case thermal resistance rating RθJC (junction / channel temperature) and the case temperature.

This FET parameter is of particular interest for power MOSFETs and when determining the maximum current parameter no switching losses are accounted for. Also holding the case at 25°C is not feasible in practice. As a result the actual switching current should be limited to less than half of the Idss at TC = 25°C rating in a hard switched application. Values of a third to a quarter are commonly used.
• Gate source cut-off voltage , VGS(off):   The gate source cut-off voltage is really a turn-off specification. It defines the threshold voltage for a given residual current, so the device is basically off but on the verge of turning on. The threshold voltage has a negative temperature coefficient, i.e. it decreases with increasing temperature. This temperature coefficient also affects turn-on and turn-off delay times which has an impact on some circuits.
• Forward transconductance, Gfs :
• Input capacitance, Ciss :   The input capacitance parameter for a FET is the capacitance that is measured between the gate and source terminals with the drain shorted to the source for AC signals. In other words this is effectively the capacitance between the gate and channel. Ciss is made up of the gate to drain capacitance Cgd in parallel with the gate to source capacitance Cgs. This can be expressed as:
${C}_{\mathrm{iss}}={C}_{\mathrm{gs}}+{C}_{\mathrm{gd}}$
• Drain-source on resistance, Rds(on) :   With the FET turned hard on, this is the resistance in ohms exhibited across the channel between the drain and source. It is particularly important in switching applications from logic to power switching as well as in RF switching, including applications in mixers. FETs typically are able to provide a good performance for switching and have a relatively low Rds(on) value.
• Power dissipation, Ptot :   This FET specification details the maximum continuous power that the device can dissipate. The power dissipation is normally specified in free standing in air, or with the base held at a given temperature, typically 25°C. The actual conditions, whether held in a heat-sink, or in free air will depend upon the device types and the manufacturer. Obviously power FETs are more likely to detailed in a condition where they are held on a heatsink, whilst the free air condition is applicable to signal FETs.

FET datasheets contain a host of different parameters and specifications to define the performance of the FET. These are all set out in the various datasheets that will enable the correct choice of FET to be made.


text:
# Overview

We will learn how to use the package MAST to analyze single cell RNAseq experiments.

Starting from a matrix of counts of transcripts (cells by transcripts), we will discuss the preliminary steps of quality control, filtering, and exploratory data analysis. Once we are satisfied that we have high-quality expression, we will consider tests for differential expression and ways to visualize results. It is often helpful to synthesize from gene-level into module-level statements. Therefore, we will learn how to use MAST to test for gene set enrichment.

We will apply these methods to a data set of Mucosal Associated Invariant T cells (MAITs), measured on the Fluidigm C1. Half of the cells have been cytokine stimulated.

library(devtools)
library(BiocInstaller)
useDevel()
biocLite('SummarizedExperiment')
biocValid()
install_github('RGLab/MAST@summarizedExpt')

If you are running this at BioC, you should not need to run this chunk. Otherwise you will need to install the summarizedExpt branch and the devel (3.4) branch of Bioconductor.

suppressPackageStartupMessages({
library(ggplot2)
library(GGally)
library(GSEABase)
library(limma)
library(reshape2)
library(data.table)
library(knitr)
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
library(stringr)
library(NMF)
library(rsvd)
library(RColorBrewer)
library(MAST)
})
#options(mc.cores = detectCores() - 1) #if you have multiple cores to spin
options(mc.cores = 1)
knitr::opts_chunk$set(message = FALSE,error = FALSE,warning = FALSE,cache = TRUE,fig.width=8,fig.height=6, auto.dep=TRUE) # Loading and transforming data freq_expressed <- 0.2 FCTHRESHOLD <- log2(1.5) First, let’s set some constants that we can use throughout this analysis. data(maits, package='MAST') dim(maits$expressionmat)
head(maits$cdat) head(maits$fdat)

Next, let’s load the data, which consists of a matrix of log2 + 1 transcripts per million (TPM), as output by RSEM. Internally, we use the packages RNASeqPipelineR and preprocessData to facilitate aligning and quantitating the raw reads. This is an experiment on Mucosal Associated Invariant T-cells from a single healthy donor. A number of cells were subjected to reverse transcription and library prep immediately, while others were first stimulated for 24 hours with a cytokine cocktail.

scaRaw <- FromMatrix(t(maits$expressionmat), maits$cdat, maits$fdat) FromMatrix constructs an object from a matrix (genes $$\times$$ cells) of expression, a data.frame of cell-level covariance and a data.frame of feature-level covariates. In this case, there are 96 single cells measured over 16302 genes. We derive from the SummarizedExperiment class, which makes it easy for feature (row) and cell (column) metadata to come along for the ride. There is also a constructor, FromFlatDF for flattened data where measurements, and cell and feature covariates are intermingled. ## Exploratory Data Analysis Let’s explore these data with a heatmap and some PCA. aheatmap(assay(scaRaw[1:1000,]), labRow='', annCol=as.data.frame(colData(scaRaw)[,c('condition', 'ourfilter')]), distfun='spearman') set.seed(123) plotPCA <- function(sca_obj){ projection <- rpca(t(assay(sca_obj)), retx=TRUE, k=4)$x
pca <- data.table(projection,  as.data.frame(colData(sca_obj)))
print(ggpairs(pca, columns=c('PC1', 'PC2', 'PC3', 'libSize', 'PercentToHuman', 'nGeneOn', 'exonRate'),
mapping=aes(color=condition), upper=list(continuous='blank')))
invisible(pca)
}

plotPCA(scaRaw)

filterCrit <- with(colData(scaRaw), pastFastqc=="PASS"& exonRate >0.3 & PercentToHuman>0.6 & nGeneOn> 4000)

From the PCA and heatmap we can tell that we’ve got some data quality issues with low-diversity libraries, and libraries where we capture a lot of non mRNA. We’ll set a filtering threshold using the Potter Stewart method, though Shalek et al and others have come up with more principled ways, such as training SVM on the expression data and quality metrics to predict failed libraries. Though this still presupposes a set of labeled “failures” and “successes”.

## Filtering

sca <- subset(scaRaw,filterCrit)
eid <- select(TxDb.Hsapiens.UCSC.hg19.knownGene,keys = mcols(sca)$entrez,keytype ="GENEID",columns = c("GENEID","TXNAME")) ueid <- unique(na.omit(eid)$GENEID)
sca <- sca[mcols(sca)$entrez %in% ueid,] ## Remove invariant genes sca <- sca[freq(sca)>0,] We’ll now consider only cells that pass the filter. subset(scaRaw, filterCrit) is just syntactic sugar for subsetting by columns, but who doesn’t like a little sugar? We’ll also limit ourselves to transcripts that have an EntrezGene id to facilitate interpretation. ### Recalculating the cellular detection rate (ngeneson) We and others have found that the number of genes detected in a sample, which we deemed the cellular detection rate is often the first principal component. After we removed genes low expression, perhaps we want to recalculate it. cdr2 <-colSums(assay(sca)>0) qplot(x=cdr2, y=colData(sca)$nGeneOn) + xlab('New CDR') + ylab('Old CDR')

We can assign this to a new column in the colData in the obvious fashion:

colData(sca)$cngeneson <- scale(cdr2) ### PCA on filtered cells plotPCA(sca) PC1 now primarily captures stimulation effects. We still observe that PC2 correlates with the exonRate and ngeneson, but the data are more smoothly distributed. ### Exercises on loading and transforming data 1. These samples were reverse-transcribed and amplified on two Fluidigm C1 chips (and stimulation is completely confounded with chip…) The chip location is contained in the column wellKey in colData(sca) as a three-character string like CXX. How could you extract the chip location and add it as column to the cellular data? Hint: str_split_fixed or str_extract may be your friends here. # Adaptive thresholding Single cell gene expression data are known to be zero-inflated and bimodal, which is feature we observe here as well. scaSample <- sca[sample(which(freq(sca)>.1), 20),] flat <- as(scaSample, 'data.table') ggplot(flat, aes(x=value))+geom_density() +facet_wrap(~symbolid, scale='free_y') Here we’ve taken subsample of size 20, then flattened it into a data.table to make it easy to plot with ggplot2. thres <- thresholdSCRNACountMatrix(assay(sca), nbins = 20, min_per_bin = 30) par(mfrow=c(5,4)) plot(thres) We suspect that the left-most mode corresponds to non-specific hybridization of mRNA or genomic DNA. Here we apply an adaptive scheme to threshold values below a cut-off that depends on the intensity of the signal cluster from the gene (determined from the median expression value). When we plot the threshold vs genes binned by median expression value, we can see this evolution of thresholding value. assays(sca) <- list(thresh=thres$counts_threshold, tpm=assay(sca))
expressed_genes <- freq(sca) > freq_expressed
sca <- sca[expressed_genes,]

We’ll limit ourselves to genes that are found in at least 0.2 of the sample (since we won’t have any power to conclude much about less frequent transcripts).

### Exercises on thresholding

1. Many modeling procedures assume (or perform best) when the data are Normally distributed. How could we evaluate how thresholding affects the Normality of the data? How about the Normality of the non-zero data?

# Differential Expression using a Hurdle model

We’ll fit a hurdle model, modeling the condition and (centered) ngeneson factor, thus adjusting for the cellular detection rate.

In order to have more interpretable coefficients, we’ll set the reference level of the factor to be the “unstimulated” cells.

cond<-factor(colData(sca)$condition) cond<-relevel(cond,"Unstim") colData(sca)$condition<-cond
zlmCond <- zlm.SingleCellAssay(~condition + cngeneson, sca)
# The following are equivalent
## lrt <- lrTest(zlm, "condition")
## lrt <- lrTest(zlm, CoefficientHypothesis('conditionStim'))

# This would test if 2*cngeneson=conditionStim
#  This is sheer nonsense biologically and statistically, but gives an example of the flexibility.
## lrt <- lrTest(zlm, Hypothesis('2*cngeneson-conditionStim'))

We could run a likelihood ratio test here, testing for differences when we drop the condition factor. Note that any arbitrary contrast matrix can be tested here, and specified either using a matrix or syntactically. See Hypothesis for details.

#only test the condition coefficient.
summaryCond <- summary(zlmCond, doLRT='conditionStim')
#print the top 4 genes by contrast using the logFC
print(summaryCond, n=4)
## Fitted zlm with top 4 genes per contrast:
## ( log fold change Z-score )
##  primerid conditionStim cngeneson
##  1843       -8.4*          0.6
##  1968        0.5           3.9*
##  2353       -7.7*          0.4
##  255252     -5.0           4.1*
##  285962     -9.7*          0.4
##  374868     -1.8           4.4*
##  392490     -0.9          -4.1*
##  7538       -8.7*          1.0
## by discrete Z-score
print(summaryCond, n=4, by='D')
## Fitted zlm with top 4 genes per contrast:
## ( Wald Z-scores on discrete )
##  primerid conditionStim cngeneson
##  134147     -4.1*          3.1
##  163702     -3.4           4.5*
##  1843       -4.0*          0.2
##  2354       -4.3*          2.6
##  285962     -4.3*          1.2
##  5465       -3.1           4.4*
##  56996      -3.1           4.3*
##  6360       -3.3           4.5*
## by continuous Z-score
print(summaryCond, n=4, by='C')
## Fitted zlm with top 4 genes per contrast:
## ( Wald Z-scores tests on continuous )
##  primerid  conditionStim cngeneson
##  100462981   -6.4*          1.5
##  152926       6.2*         -2.9
##  253512       3.2          -4.6*
##  26054        4.1          -4.6*
##  3458         7.3*          0.5
##  3727        -6.7*          0.5
##  514          3.1          -4.2*
##  6482         4.5          -6.4*

But often of more general use is this delicious syntactic sugar to make a giant data.table containing coefficients, standard errors, etc, for the various model components. Many Bothan spies died so that we could pretty-print this summary of the top differentially expressed genes.

Strip off the $datatable component to stop this pretty-printing (or call print.default.) summaryDt <- summaryCond$datatable
fcHurdle <- merge(summaryDt[contrast=='conditionStim' & component=='H',.(primerid, Pr(>Chisq))], #hurdle P values
summaryDt[contrast=='conditionStim' & component=='logFC', .(primerid, coef, ci.hi, ci.lo)], by='primerid') #logFC coefficients

fcHurdle[,fdr:=p.adjust(Pr(>Chisq), 'fdr')]
fcHurdleSig <- merge(fcHurdle[fdr<.05 & abs(coef)>FCTHRESHOLD], as.data.table(mcols(sca)), by='primerid')
setorder(fcHurdleSig, fdr)

We see that there are 628 genes significant at a FDR of 5% and with a log-fold change larger than 0.6.

### Visualization of 50 most differentially expressed genes

entrez_to_plot <- fcHurdleSig[1:50,primerid]
symbols_to_plot <- fcHurdleSig[1:50,symbolid]
flat_dat <- as(sca[entrez_to_plot,], 'data.table')
ggbase <- ggplot(flat_dat, aes(x=condition, y=thresh,color=condition)) + geom_jitter()+facet_wrap(~symbolid, scale='free_y')+ggtitle("DE Genes in Activated MAIT Cells")
ggbase+geom_violin()

Here is a standard violin plot showing how expression differs in each gene between stimulated and unstimulated cells. What could be improved about this visualization to make it more accurately reflect the model that’s being fit?

flat_dat[,lmPred:=lm(thresh~cngeneson + condition)\$fitted, key=symbolid]
ggbase +aes(x=cngeneson) + geom_line(aes(y=lmPred), lty=1) + xlab('Standardized Cellular Detection Rate')