text:
Definitions

# Ham sandwich theorem

In measure theory, a branch of mathematics, the ham sandwich theorem, also called the Stone–Tukey theorem after Arthur H. Stone and John Tukey, states that given n "objects" in n-dimensional space, it is possible to divide all of them in half (according to volume) with a single (n − 1)-dimensional hyperplane. Here the "objects" should be sets of finite measure (or, in fact, just of finite outer measure) for the notion of "dividing the volume in half" to make sense.

## Naming

The ham sandwich theorem takes its name from the case when n = 3 and the three objects of any shape are a chunk of ham and two chunks of bread — notionally, a sandwich — which can then each be bisected with a single cut (i.e., a plane). In two dimensions, the theorem is known as the pancake theorem of having to cut two infinitesimally thin pancakes on a plate each in half with a single cut (i.e., a straight line).

The ham sandwich theorem is also sometimes referred to as the "ham and cheese sandwich theorem", again referring to the special case when n = 3 and the three objects are

1. a chunk of ham,
2. a slice of cheese, and
3. two slices of bread (treated as a single disconnected object).

The theorem then states that it is possible to slice the ham and cheese sandwich in half such that each half contains the same amount of bread, cheese, and ham. It is possible to treat the two slices of bread as a single object, because the theorem only requires that the portion on each side of the plane vary continuously as the plane moves through 3-space.

The ham sandwich theorem has no relationship to the "squeeze theorem" (sometimes called the "sandwich theorem").

## History

According to Beyer and Zardecki (2004), the earliest known paper about the ham sandwich theorem, specifically the d = 3 case of bisecting three solids with a plane, is by Steinhaus and others (1938). Beyer and Zardecki's paper includes a translation of the 1938 paper. It attributes the posing of the problem to Hugo Steinhaus, and credits Stefan Banach as the first to solve the problem, by a reduction to the Borsuk–Ulam theorem. The paper poses the problem in two ways: first, formally, as "Is it always possible to bisect three solids, arbitrarily located, with the aid of an appropriate plane?" and second, informally, as "Can we place a piece of ham under a meat cutter so that meat, bone, and fat are cut in halves?" Later, the paper offers a proof of the theorem.

A more modern reference is Stone and Tukey (1942), which is the basis of the name "Stone–Tukey theorem". This paper proves the n-dimensional version of the theorem in a more general setting involving measures. The paper attributes the n = 3 case to Stanisław Marcin Ulam, based on information from a referee; but Beyer & Zardecki (2004) claim that this is incorrect, given Steinhaus's paper, although "Ulam did make a fundamental contribution in proposing" the Borsuk–Ulam theorem.

## Reduction to the Borsuk–Ulam theorem

The ham sandwich theorem can be proved as follows using the Borsuk–Ulam theorem. This proof follows the one described by Steinhaus and others (1938), attributed there to Stefan Banach, for the n = 3 case.

Let A1, A2, …, An denote the n objects that we wish to simultaneously bisect. Let S be the unit (n − 1)-sphere embedded in n-dimensional Euclidean space $mathbb\left\{R\right\}^n$, centered at the origin. For each point p on the surface of the sphere S, we can define a continuum of oriented hyperplanes perpendicular to the (normal) vector from the origin to p, with the "positive side" of each hyperplane defined as the side pointed to by that vector. By the intermediate value theorem, every family of such hyperplanes contains at least one hyperplane that bisects the bounded object An: at one extreme translation, no volume of An is on the positive side, and at the other extreme translation, all of An's volume is on the positive side, so in between there must be a translation that has half of An's volume on the positive side. If there is more than one such hyperplane in the family, we can pick one canonically by choosing the midpoint of the interval of translations for which An is bisected. Thus we obtain, for each point p on the sphere S, a hyperplane π(p) that is perpendicular to the vector from the origin to p and that bisects An.

Now we define a function ƒ from the (n − 1)-sphere S to (n − 1)-dimensional Euclidean space $mathbb\left\{R\right\}^\left\{n-1\right\}$ as follows:

ƒ(p) = (
volume of A1 on the positive side of π(p),
volume of A2 on the positive side of π(p),
...,
volume of An−1 on the positive side of π(p)
).
This function ƒ is continuous. By the Borsuk–Ulam theorem, there are antipodal points p and q on the sphere S such that ƒ(p) = ƒ(q). Antipodal points p and q correspond to hyperplanes π(p) and π(q) that are equal except that they have opposite positive sides. Thus, ƒ(p) = ƒ(q) means that the volume of Ai is the same on the positive and negative side of π(p) (or π(q)), for i = 1, 2, ..., n − 1. Thus, π(p) (or π(q)) is the desired ham sandwich cut that simultaneously bisects the volumes of A1, A2, …, An.

## Measure theoretic versions

In measure theory, Stone and Tukey (1942) proved two more general forms of the ham sandwich theorem. Both versions concern the bisection of n subsets X1, X2, …, Xn of a common set X, where X has a Carathéodory outer measure and each Xi has finite outer measure.

Their first general formulation is as follows: for any suitably restricted real function $f : S^n times X to mathbb\left\{R\right\}$, there is a point p of the n-sphere $S^n$ such that the surface $f\left(s,x\right) = 0$, dividing X into $f\left(s,x\right) < 0$ and $f\left(s,x\right) > 0$, simultaneously bisects the outer measure of X1, X2, …, Xn. The proof is again a reduction to the Borsuk-Ulam theorem. This theorem generalizes the standard ham sandwich theorem by letting $f\left(s,x\right) = s_0 + s_1 x_1 + cdots + s_n x_n$.

Their second formulation is as follows: for any n+1 measurable functions f0, f1, …, fn over X that are linearly independent over any subset of X of positive measure, there is a linear combination $f = a_0 f_0 + a_1 f_1 + cdots + a_n f_n$ such that the surface $f\left(x\right) = 0$, dividing X into $f\left(x\right) < 0$ and $f\left(x\right) > 0$, simultaneously bisects the outer measure of X1, X2, …, Xn. This theorem generalizes the standard ham sandwich theorem by letting $f_0\left(x\right) = 1$ and letting $f_i\left(x\right)$, for $i > 0$, be the ith coordinate of x.

## Discrete and computational geometry versions

In discrete geometry and computational geometry, the ham sandwich theorem usually refers to the special case in which each of the sets being divided is a finite set of points. Here the relevant measure is the counting measure, which simply counts the number of points on either side of the hyperplane. In two dimensions, the theorem can be stated as follows:

For a finite set of points in the plane, each colored "red" or "blue", there is a line that simultaneously bisects the red points and bisects the blue points, that is, the number of red points on either side of the line is equal and the number of blue points on either side of the line is equal.

There is an exceptional case when a point lies on the line. In this situation, we count the point as being on either both sides of the line or on neither side of the line. This exceptional case is actually required for the theorem to hold, in case the number of red points or the number of blue is odd, and still each set must be bisected.

In computational geometry, this ham sandwich theorem leads to a computational problem, the ham sandwich problem. In two dimensions, the problem is this: given a finite set of n points in the plane, each colored "red" or "blue", find a ham sandwich cut for them. First, Megiddo (1985) described an algorithm for the special, separated case. Here all red points are on one side of some line and all blue points are on the other side, a situation where there is a unique ham sandwich cut, which Megiddo could find in linear time. Later, Edelsbrunner and Waupotitsch (1986) gave an algorithm for the general two-dimensional case; the running time of their algorithm is O(n log n). Finally, Lo and Steiger (1990) found an optimal O(n)-time algorithm. This algorithm was extended to higher dimensions by Lo, Matousek, and Steiger (1994). Given d sets of points in general position in d-dimensional space, the algorithm computes a (d−1)-dimensional hyperplane that has equal numbers of points of each of the sets in each of its half-spaces, i.e., a ham-sandwich cut for the given points.

## "Leftovers"

Byrnes, Cairns, and Jessup (2001) showed that it is not always possible to position the hyperplane correctly just by cutting through the objects' centers of gravity.


text:
Cutie pi!

Geometry Level 5

$\large \sin\left( \frac \pi{14} \right) \sin\left( \frac {3\pi}{14} \right) \sin\left( \frac {5\pi}{14} \right) \sin\left( \frac {7\pi}{14} \right) \sin\left( \frac {9\pi}{14} \right) \sin\left( \frac {11\pi}{14} \right) \sin\left( \frac {13\pi}{14} \right)$

If the expression above can be simplified to the form $\frac pq$ for coprime positive integers, find $p+q$.

×

format: plain


text:
# Is minimal polynomial self-reciprocal?

I have finite extension $F/ \Bbb Q$ . I don't know if it is important that degree of extension is four (4) , and I have integral element $w \in L$ with norm equal to one, and this means N$^F_{\Bbb Q} (w) = 1$. Then $w$ is a unit in the integral ring $O_F$ and they tell me $w$ is not root of unity. If this helps, also $N^F_K(w)=1$ for quadratic extension $K/ \Bbb Q$, $K \subset F$.

Does above mean minimal polynomial of $w$ is self-reciprocal? This means the coefficients of polynomial are $a_k = a_{n-k}$ , if $n =$ degree of polynomial : if $p(x)$ is minimal polynomial of $w$, then reciprocal of $p$ is polynomial $p^*(x)=x^np(1/x)$

I am required to show $1/w$ is conjugate of $w$, but I know that if $p(x)$ is minimal polynomial of $w$ in $\Bbb Q$ then sure complex conjugate $\overline w$ is also a root of $p(x)$, but if also $1/w$ is conjugate and root of $p(x)$ then $p(x)=p^*(x)$ and I can not prove of this.

I wrote minimal $p(x)=x^4+ax^3+bx^2+cx+1$, because free coefficient = norm of $w$. I can not prove $a=c$ and then $p(x)$ is self-reciprocal, but the question requires this. Thank you.

• I assume $L=F$ and $K=H$? – punctured dusk Mar 4 '18 at 10:57
• Yes, thank you. I correct. – Antoine Nemesio Parras Mar 4 '18 at 10:59

You really need the fact that $w$ has norm $1$ w.r.t. some quadratic subextension $K$: its conjugate in $F/K$ is then its reciprocal $1/w$. Next, use that the minimal polynomial of $w$ in $F/K$ divides its minimal polynomial $p$ in $F/\mathbb Q$, so that $1/w$ is a root of $p$.
Without the information that $w$ has norm $1$ w.r.t. $F/K$, this is not true. It would imply that every irreducible monic polynomial of degree $4$ over $\mathbb Q$ with constant term $1$ is self-reciprocal.


text:
## Learning objectives

• Understand when and why to iterate code
• Be able to start with a single use and build up to iteration
• Use for loops, apply functions, and purrr to iterate
• Be able to write functions to cleanly iterate code

## OnceTwice Thrice in a Lifetime

And you may find yourself
Behind the keys of a large computing machine
And you may find yourself
Copy-pasting tons of code
And you may ask yourself, well
How did I get here?

It’s pretty common that you’ll want to run the same basic bit of code a bunch of times with different inputs. Maybe you want to read in a bunch of data files with different names or calculate something complex on every row of a dataframe. A general rule of thumb is that any code you want to run 3+ times should be iterated instead of copy-pasted. Copy-pasting code and replacing the parts you want to change is generally a bad practice for several reasons:

• it’s easy to forget to change all the parts that need to be different
• it’s easy to mistype
• it is ugly to read
• it scales very poorly (try copy-pasting 100 times…)

Lots of functions (including many base functions) are vectorized, meaning they already work on vectors of values. Here’s an example:

x <- 1:10
log(x)
##  [1] 0.0000000 0.6931472 1.0986123 1.3862944 1.6094379 1.7917595 1.9459101 2.0794415 2.1972246 2.3025851

The log() function already knows we want to take the log of each element in x, and it returns a vector that’s the same length as x. If a vectorized function already exists to do what you want, use it! It’s going to be faster and cleaner than trying to iterate everything yourself.

However, we may want to do more complex iterations, which brings us to our first main iterating concept.

## For Loops

A for loop will repeat some bit of code, each time with a new input value. Here’s the basic structure:

for(i in 1:10) {
print(i)
}
## [1] 1
## [1] 2
## [1] 3
## [1] 4
## [1] 5
## [1] 6
## [1] 7
## [1] 8
## [1] 9
## [1] 10

You’ll often see i used in for loops, you can think of it as the iteration value. For each i value in the vector 1:10, we’ll print that index value. You can use the i value more than once in a loop:

for (i in 1:10) {
print(i)
print(i^2)
}
## [1] 1
## [1] 1
## [1] 2
## [1] 4
## [1] 3
## [1] 9
## [1] 4
## [1] 16
## [1] 5
## [1] 25
## [1] 6
## [1] 36
## [1] 7
## [1] 49
## [1] 8
## [1] 64
## [1] 9
## [1] 81
## [1] 10
## [1] 100

What’s happening is the value of i gets inserted into the code block, the block gets run, the value of i changes, and the process repeats. For loops can be a way to explicitly lay out fairly complicated procedures, since you can see exactly where your i value is going in the code.

You can also use the i value to index a vector or dataframe, which can be very powerful!

for (i in 1:10) {
print(letters[i])
print(mtcars$wt[i]) } ## [1] "a" ## [1] 2.62 ## [1] "b" ## [1] 2.875 ## [1] "c" ## [1] 2.32 ## [1] "d" ## [1] 3.215 ## [1] "e" ## [1] 3.44 ## [1] "f" ## [1] 3.46 ## [1] "g" ## [1] 3.57 ## [1] "h" ## [1] 3.19 ## [1] "i" ## [1] 3.15 ## [1] "j" ## [1] 3.44 Here we printed out the first 10 letters of the alphabet from the letters vector, as well as the first 10 car weights from the mtcars dataframe. If you want to store your results somewhere, it is important that you create an empty object to hold them before you run the loop. If you grow your results vector one value at a time, it will be much slower. Here’s how to make that empty vector first. We’ll also use the function seq_along to create a sequence that’s the proper length, instead of explicitly writing out something like 1:10. results <- rep(NA, nrow(mtcars)) for (i in seq_along(mtcars$wt)) {
results[i] <- mtcars$wt[i] * 1000 } results ## [1] 2620 2875 2320 3215 3440 3460 3570 3190 3150 3440 3440 4070 3730 3780 5250 5424 5345 2200 1615 1835 2465 ## [22] 3520 3435 3840 3845 1935 2140 1513 3170 2770 3570 2780 ## purrr For loops are very handy and important to understand, but they can involve writing a lot of code and can generally look fairly messy. The tidyverse includes another way to iterate, using the map family of functions. These functions all do the same basic thing: take a series of values and apply a function to each of them. That function could be a function from a package, or it could be one you write to do something specific. For a wonderful and thorough exploration of the purrr package, check out Jenny Brian’s tutorial. ### map When using the map family of functions, the first argument (as in all tidyverse functions) is the data. One nice feature is that you can specify the format of the output explicitly by using a different member of the family. mtcars %>% map(mean) # gives a list ##$mpg
## [1] 20.09062
##
## $cyl ## [1] 6.1875 ## ##$disp
## [1] 230.7219
##
## $hp ## [1] 146.6875 ## ##$drat
## [1] 3.596563
##
## $wt ## [1] 3.21725 ## ##$qsec
## [1] 17.84875
##
## $vs ## [1] 0.4375 ## ##$am
## [1] 0.40625
##
## $gear ## [1] 3.6875 ## ##$carb
## [1] 2.8125
mtcars %>% map_dbl(mean) # gives a numeric vector
##        mpg        cyl       disp         hp       drat         wt       qsec         vs         am
##  20.090625   6.187500 230.721875 146.687500   3.596563   3.217250  17.848750   0.437500   0.406250
##       gear       carb
##   3.687500   2.812500
mtcars %>% map_chr(mean) # gives a character vector
##          mpg          cyl         disp           hp         drat           wt         qsec           vs
##  "20.090625"   "6.187500" "230.721875" "146.687500"   "3.596563"   "3.217250"  "17.848750"   "0.437500"
##           am         gear         carb
##   "0.406250"   "3.687500"   "2.812500"

You can pass additional arguments to functions that you map across your data. For example, if you have some NAs in your data, you might want to use mean() with na.rm = TRUE.

mtcars2 <- mtcars # make a copy of the mtcars dataset
mtcars2[3,c(1,6,8)] <- NA # make one of the cars have NAs for several columns
mtcars2
##                      mpg cyl  disp  hp drat    wt  qsec vs am gear carb
## Mazda RX4           21.0   6 160.0 110 3.90 2.620 16.46  0  1    4    4
## Mazda RX4 Wag       21.0   6 160.0 110 3.90 2.875 17.02  0  1    4    4
## Datsun 710            NA   4 108.0  93 3.85    NA 18.61 NA  1    4    1
## Hornet 4 Drive      21.4   6 258.0 110 3.08 3.215 19.44  1  0    3    1
## Hornet Sportabout   18.7   8 360.0 175 3.15 3.440 17.02  0  0    3    2
## Valiant             18.1   6 225.0 105 2.76 3.460 20.22  1  0    3    1
## Duster 360          14.3   8 360.0 245 3.21 3.570 15.84  0  0    3    4
## Merc 240D           24.4   4 146.7  62 3.69 3.190 20.00  1  0    4    2
## Merc 230            22.8   4 140.8  95 3.92 3.150 22.90  1  0    4    2
## Merc 280            19.2   6 167.6 123 3.92 3.440 18.30  1  0    4    4
## Merc 280C           17.8   6 167.6 123 3.92 3.440 18.90  1  0    4    4
## Merc 450SE          16.4   8 275.8 180 3.07 4.070 17.40  0  0    3    3
## Merc 450SL          17.3   8 275.8 180 3.07 3.730 17.60  0  0    3    3
## Merc 450SLC         15.2   8 275.8 180 3.07 3.780 18.00  0  0    3    3
## Cadillac Fleetwood  10.4   8 472.0 205 2.93 5.250 17.98  0  0    3    4
## Lincoln Continental 10.4   8 460.0 215 3.00 5.424 17.82  0  0    3    4
## Chrysler Imperial   14.7   8 440.0 230 3.23 5.345 17.42  0  0    3    4
## Fiat 128            32.4   4  78.7  66 4.08 2.200 19.47  1  1    4    1
## Honda Civic         30.4   4  75.7  52 4.93 1.615 18.52  1  1    4    2
## Toyota Corolla      33.9   4  71.1  65 4.22 1.835 19.90  1  1    4    1
## Toyota Corona       21.5   4 120.1  97 3.70 2.465 20.01  1  0    3    1
## Dodge Challenger    15.5   8 318.0 150 2.76 3.520 16.87  0  0    3    2
## AMC Javelin         15.2   8 304.0 150 3.15 3.435 17.30  0  0    3    2
## Camaro Z28          13.3   8 350.0 245 3.73 3.840 15.41  0  0    3    4
## Pontiac Firebird    19.2   8 400.0 175 3.08 3.845 17.05  0  0    3    2
## Fiat X1-9           27.3   4  79.0  66 4.08 1.935 18.90  1  1    4    1
## Porsche 914-2       26.0   4 120.3  91 4.43 2.140 16.70  0  1    5    2
## Lotus Europa        30.4   4  95.1 113 3.77 1.513 16.90  1  1    5    2
## Ford Pantera L      15.8   8 351.0 264 4.22 3.170 14.50  0  1    5    4
## Ferrari Dino        19.7   6 145.0 175 3.62 2.770 15.50  0  1    5    6
## Maserati Bora       15.0   8 301.0 335 3.54 3.570 14.60  0  1    5    8
## Volvo 142E          21.4   4 121.0 109 4.11 2.780 18.60  1  1    4    2
mtcars2 %>% map_dbl(mean) # returns NA for mpg, wt, and vs columns
##        mpg        cyl       disp         hp       drat         wt       qsec         vs         am
##         NA   6.187500 230.721875 146.687500   3.596563         NA  17.848750         NA   0.406250
##       gear       carb
##   3.687500   2.812500
mtcars2 %>% map_dbl(mean, na.rm = TRUE)
##         mpg         cyl        disp          hp        drat          wt        qsec          vs          am
##  20.0032258   6.1875000 230.7218750 146.6875000   3.5965625   3.2461935  17.8487500   0.4193548   0.4062500
##        gear        carb
##   3.6875000   2.8125000

### map2

You can use the map2 series of functions if you need to map across two sets of inputs in parallel. Here, we’ll map across both the names of cars and their mpg values, using an anonymous function to paste the two together into a sentence.

We’ll use what’s called an “anonymous function”, which is a small function we define within the map function call. Our function will take 2 arguments, x and y, and paste them together with some other text.

map2_chr(rownames(mtcars), mtcars$mpg, function(x,y) paste(x, "gets", y, "miles per gallon")) %>% head() ## [1] "Mazda RX4 gets 21 miles per gallon" "Mazda RX4 Wag gets 21 miles per gallon" ## [3] "Datsun 710 gets 22.8 miles per gallon" "Hornet 4 Drive gets 21.4 miles per gallon" ## [5] "Hornet Sportabout gets 18.7 miles per gallon" "Valiant gets 18.1 miles per gallon" You can use the pmap series of functions if you need to use more than two input lists. ## Complete Workflow Let’s try working through a complete example of how you might iterate a more complex operation across a dataset. This will follow 3 basic steps: 1. Write code that does the thing you want once 2. Generalize that code into a function that can take different inputs 3. Apply that function across your data ### Starting With a Single Case The first thing we’ll do is figure out if we can do the right thing once! We want to rescale a vector of values to a 0-1 scale. We’ll try it out on the weights in mtcars. Our heaviest vehicle will have a scaled weight of 1, and our lightest will have a scaled weight of 0. We’ll do this by taking our weight, subtracting the minimum car weight from it, and dividing this by the range of the car weights (max minus min). We’ll have to be careful about our order of operations… (mtcars$wt[1] - min(mtcars$wt, na.rm = T)) / (max(mtcars$wt, na.rm = T) - min(mtcars$wt, na.rm = T)) ## [1] 0.2830478 Great! We got a scaled value out of the deal. Because we’re working with base functions like max, min, and /, we can vectorize. This means we can give it the whole weight vector, and we’ll get a whole scaled vector back. mtcars$wt_scaled <- (mtcars$wt - min(mtcars$wt, na.rm = T)) /
diff(range(mtcars$wt, na.rm = T)) mtcars$wt_scaled
##  [1] 0.28304781 0.34824853 0.20634109 0.43518282 0.49271286 0.49782664 0.52595244 0.42879059 0.41856303
## [10] 0.49271286 0.49271286 0.65379698 0.56686269 0.57964715 0.95551010 1.00000000 0.97980056 0.17565840
## [19] 0.02608029 0.08233188 0.24341601 0.51316799 0.49143442 0.59498849 0.59626694 0.10790079 0.16031705
## [28] 0.00000000 0.42367681 0.32140118 0.52595244 0.32395807

### Generalizing

Now let’s replace our reference to a specific vector of data with something generic: x. This code won’t run on its own, since x doesn’t have a value, but it’s just showing how we would refer to some generic value.

x_scaled <- (x - min(x, na.rm = T)) /
diff(range(x, na.rm = T))

### Making it a Function

Now that we’ve got a generalized bit of code, we can turn it into a function. All we need is a name, function, and a list of arguments. In this case, we’ve just got one argument: x.

rescale_0_1 <- function(x) {
(x - min(x, na.rm = T)) /
diff(range(x, na.rm = T))
}

rescale_0_1(mtcars\$mpg) # it works on one of our columns
##  [1] 0.4510638 0.4510638 0.5276596 0.4680851 0.3531915 0.3276596 0.1659574 0.5957447 0.5276596 0.3744681
## [11] 0.3148936 0.2553191 0.2936170 0.2042553 0.0000000 0.0000000 0.1829787 0.9361702 0.8510638 1.0000000
## [21] 0.4723404 0.2170213 0.2042553 0.1234043 0.3744681 0.7191489 0.6638298 0.8510638 0.2297872 0.3957447
## [31] 0.1957447 0.4680851

### Iterating!

Now that we’ve got a function that’ll rescale a vector of values, we can use one of the map functions to iterate across all the columns in a dataframe, rescaling each one. We’ll use map_df since it returns a dataframe, and we’re feeding it a dataframe.

map_df(mtcars, rescale_0_1)
## # A tibble: 32 × 12
##      mpg   cyl   disp     hp  drat    wt  qsec    vs    am  gear  carb wt_scaled
##    <dbl> <dbl>  <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>     <dbl>
##  1 0.451   0.5 0.222  0.205  0.525 0.283 0.233     0     1   0.5 0.429     0.283
##  2 0.451   0.5 0.222  0.205  0.525 0.348 0.3       0     1   0.5 0.429     0.348
##  3 0.528   0   0.0920 0.145  0.502 0.206 0.489     1     1   0.5 0         0.206
##  4 0.468   0.5 0.466  0.205  0.147 0.435 0.588     1     0   0   0         0.435
##  5 0.353   1   0.721  0.435  0.180 0.493 0.3       0     0   0   0.143     0.493
##  6 0.328   0.5 0.384  0.187  0     0.498 0.681     1     0   0   0         0.498
##  7 0.166   1   0.721  0.682  0.207 0.526 0.160     0     0   0   0.429     0.526
##  8 0.596   0   0.189  0.0353 0.429 0.429 0.655     1     0   0.5 0.143     0.429
##  9 0.528   0   0.174  0.152  0.535 0.419 1         1     0   0.5 0.143     0.419
## 10 0.374   0.5 0.241  0.251  0.535 0.493 0.452     1     0   0.5 0.429     0.493
## # … with 22 more rows

There you have it! We went from some code that calculated one value to being able to iterate it across any number of columns in a dataframe. It can be tempting to jump straight to your final iteration code, but it’s often better to start simple and work your way up, verifying that things work at each step, especially if you’re trying to do something even moderately complex.

## apply Functions

While we learned the tidyverse series of map functions, it’s worth mentioning that there is a similar series of packages in base R called the apply series of functions. They are very similar to map functions, but the syntax is a little different and you have to be a little more careful about the data types you put in and get out.

We’re not going to go into the apply family, but if you want to learn more, here is a good tutorial. You might come across the apply functions in someone else’s code, so it’s good to know they exist.

This lesson was contributed by Michael Culshaw-Maurer, with ideas from Mike Koontz and Brandon Hurr’s D-RUG presentation.


text:
Combined point + multiple interval geoms with default aesthetics designed for use with output from point_interval(). Wrapper around geom_slabinterval().

geom_pointinterval(
mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
...,
side = "both",
orientation = NA,
show_slab = FALSE,
show.legend = c(size = FALSE)
)

## Arguments

mapping Set of aesthetic mappings created by aes() or aes_(). If specified and inherit.aes = TRUE (the default), it is combined with the default mapping at the top level of the plot. You must supply mapping if there is no plot mapping. The data to be displayed in this layer. There are three options: If NULL, the default, the data is inherited from the plot data as specified in the call to ggplot(). A data.frame, or other object, will override the plot data. All objects will be fortified to produce a data frame. See fortify() for which variables will be created. A function will be called with a single argument, the plot data. The return value must be a data.frame, and will be used as the layer data. A function can be created from a formula (e.g. ~ head(.x, 10)). The statistical transformation to use on the data for this layer, as a string. The position adjustment to use for overlapping points on this layer. Setting this equal to "dodge" can be useful if you have overlapping intervals. Arguments passed on to geom_slabinterval scaleWhat proportion of the region allocated to this geom to use to draw the slab. If scale = 1, slabs that use the maximum range will just touch each other. Default is 0.9 to leave some space. justificationJustification of the interval relative to the slab, where 0 indicates bottom/left justification and 1 indicates top/right justification (depending on orientation). If justification is NULL (the default), then it is set automatically based on the value of side: when side is "top"/"right" justification is set to 0, when side is "bottom"/"left" justification is set to 1, and when side is "both" justification is set to 0.5. normalizeHow to normalize heights of functions input to the thickness aesthetic. If "all" (the default), normalize so that the maximum height across all data is 1; if "panels", normalize within panels so that the maximum height in each panel is 1; if "xy", normalize within the x/y axis opposite the orientation of this geom so that the maximum height at each value of the opposite axis is 1; if "groups", normalize within values of the opposite axis and within groups so that the maximum height in each group is 1; if "none", values are taken as is with no normalization (this should probably only be used with functions whose values are in [0,1], such as CDFs). interval_size_domainThe minimum and maximum of the values of the size aesthetic that will be translated into actual sizes for intervals drawn according to interval_size_range (see the documentation for that argument.) interval_size_range(Deprecated). This geom scales the raw size aesthetic values when drawing interval and point sizes, as they tend to be too thick when using the default settings of scale_size_continuous(), which give sizes with a range of c(1, 6). The interval_size_domain value indicates the input domain of raw size values (typically this should be equal to the value of the range argument of the scale_size_continuous() function), and interval_size_range indicates the desired output range of the size values (the min and max of the actual sizes used to draw intervals). Most of the time it is not recommended to change the value of this argument, as it may result in strange scaling of legends; this argument is a holdover from earlier versions that did not have size aesthetics targeting the point and interval separately. If you want to adjust the size of the interval or points separately, you can instead use the interval_size or point_size aesthetics; see scales. fatten_pointA multiplicative factor used to adjust the size of the point relative to the size of the thickest interval line. If you wish to specify point sizes directly, you can also use the point_size aesthetic and scale_point_size_continuous() or scale_point_size_discrete(); sizes specified with that aesthetic will not be adjusted using fatten_point. show_pointShould the point portion of the geom be drawn? Default TRUE. show_intervalShould the interval portion of the geom be drawn? Default TRUE. na.rmIf FALSE, the default, missing values are removed with a warning. If TRUE, missing values are silently removed. inherit.aesIf FALSE, overrides the default aesthetics, rather than combining with them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification, e.g. borders(). Which side to draw the slab on. "topright", "top", and "right" are synonyms which cause the slab to be drawn on the top or the right depending on if orientation is "horizontal" or "vertical". "bottomleft", "bottom", and "left" are synonyms which cause the slab to be drawn on the bottom or the left depending on if orientation is "horizontal" or "vertical". "topleft" causes the slab to be drawn on the top or the left, and "bottomright" causes the slab to be drawn on the bottom or the right. "both" draws the slab mirrored on both sides (as in a violin plot). Whether this geom is drawn horizontally ("horizontal") or vertically ("vertical"). The default, NA, automatically detects the orientation based on how the aesthetics are assigned, and should generally do an okay job at this. When horizontal (resp. vertical), the geom uses the y (resp. x) aesthetic to identify different groups, then for each group uses the x (resp. y) aesthetic and the thickness aesthetic to draw a function as an slab, and draws points and intervals horizontally (resp. vertically) using the xmin, x, and xmax (resp. ymin, y, and ymax) aesthetics. For compatibility with the base ggplot naming scheme for orientation, "x" can be used as an alias for "vertical" and "y" as an alias for "horizontal" (tidybayes had an orientation parameter before ggplot did, and I think the tidybayes naming scheme is more intuitive: "x" and "y" are not orientations and their mapping to orientations is, in my opinion, backwards; but the base ggplot naming scheme is allowed for compatibility). Should the slab portion of the geom be drawn? Default TRUE. Should this layer be included in the legends? Default is c(size = FALSE), unlike most geoms, to match its common use cases. FALSE hides all legends, TRUE shows all legends, and NA shows only those that are mapped (the default for most geoms).

## Value

A ggplot2::Geom representing a point+multiple uncertainty interval geometry which can be added to a ggplot() object.

## Details

These geoms are wrappers around geom_slabinterval() with defaults designed to produce points+interval plots. These geoms set some default aesthetics equal to the .lower, .upper, and .width columns generated by the point_interval family of functions, making them often more convenient than vanilla geom_pointrange() when used with functions like median_qi(), mean_qi(), mode_hdi(), etc.

Specifically, geom_pointinterval acts as if its default aesthetics are aes(size = -.width).

## Aesthetics

These geoms support the following aesthetics:

• x

• y

• datatype

• alpha

• colour

• linetype

• fill

• shape

• stroke

• point_colour

• point_fill

• point_alpha

• point_size

• size

• interval_colour

• interval_alpha

• interval_size

• interval_linetype

• slab_size

• slab_colour

• slab_fill

• slab_alpha

• slab_linetype

• ymin

• ymax

• xmin

• xmax

• width

• height

• thickness

• group

See examples of some of these aesthetics in action in vignette("slabinterval"). Learn more about the sub-geom aesthetics (like interval_color) in the scales documentation. Learn more about basic ggplot aesthetics in vignette("ggplot2-specs").

See geom_slabinterval() for the geom that these geoms wrap. All parameters of that geom are available to these geoms.

See stat_pointinterval() for the stat version, intended for use on samples from a distribution. See geom_interval() for a similar stat intended for intervals without point summaries. See stat_sample_slabinterval() for a variety of other stats that combine intervals with densities and CDFs. See geom_slabinterval() for the geom that these geoms wrap. All parameters of that geom are available to these geoms.

Matthew Kay

## Examples

library(dplyr)
library(ggplot2)

data(RankCorr_u_tau, package = "ggdist")

# orientation is detected automatically based on
# use of xmin/xmax or ymin/ymax

RankCorr_u_tau %>%
group_by(i) %>%
median_qi(.width = c(.8, .95)) %>%
ggplot(aes(y = i, x = u_tau, xmin = .lower, xmax = .upper)) +
geom_pointinterval()

RankCorr_u_tau %>%
group_by(i) %>%
median_qi(.width = c(.8, .95)) %>%
ggplot(aes(x = i, y = u_tau, ymin = .lower, ymax = .upper)) +
geom_pointinterval()


text:
# Latex editor dissertation

Subject &rtrif latex packages for finance writing your thesis latex windows: download miktex mac for a thesis, fork the repository monashthesis and editor-in-chief of the international journal of forecasting. Information on latex used to prepare your graduate thesis and other high quality ui thesis latex template (zip) texmaker: the universal latex editor. With this online tool you can generate a microsoft word or a latex template into which a pdf document through miktek latex software or any of the online latex editors like overleaf, dissertation, and the student last name. Abstract this article provides useful tools to write a thesis with latex that can be created with any text editor but it is advisable to use bibliography dedicated. This repository provides latex class (cls) and style (sty) files that facilitate document in a latex editor phdthesislyx an example of a doctoral thesis.

Preparation of master's theses and doctoral dissertations, dated march used by your latex editor (typically the my documents folder. Now that both latex and an appropriate editor are available, you will are specific to the university of rhode island thesis/dissertation format. [email protected] © 2018 creodocs limited all templates licensed under cc attribution-nc-sa unless otherwise specified proudly made in new.

2) download and install a latex editor like texstudio (preferred) from: 4) download and unzip the “kfupm thesis/dissertation template for latex” from. The canonical latex package for books is the memoir package (ctan: sharelatex, online latex editor book templates, examples and articles on. Learn latex from scratch write thesis, article prepare presentation, poster, bulletin, resume, calendar get templates.

Openness and distribution of electronic theses & dissertations (etds) when corrections are needed: latex - using a unt. This document describes how to use the puthesis (purdue university thesis) latex see rich commenting is here for how to use tho overleaf editor to add. I use latex editor ( ) and find it very user friendly by template i mean a sample tex file of an academic report, like thesis, paper and. Most graduate students will write and defend a thesis or dissertation as a requirement of their graduate degree there are many resources in this section to help.

## Latex editor dissertation

Step-by-step guide to thesis preparation and submission version) thesis template (latex version) uow brand policy proofreading and editing support. Beginner's introduction to typesetting with latex by peter flynn, pdf file from the comprehensive tex archive network bibtex: using bibtex to create your . A thesis in mathematics is invariably written in some form of latex open a text editor or a dedicated latex editor, such as texshop (installed on department. Yes, we can proofread and edit your latex document however, because our editors work with the track changes functionality in word, we will have to convert .

• The graduate college offers a thesis/dissertation template that contains all required content and formatting you can either latex users if you are writing .
• Tex touch seems to be the best latex editor currently available for the thesis, or dissertation, where you might want to \include or \input the.

This guide is to help you prepare your thesis or dissertation by famil- iarizing you with the a text editor is needed to edit all latex associated files there are. Attend a dissertation/thesis seminar presented by the graduate college an editor if you need assistance formatting or editing your dissertation/thesis, list of . Students will use latex for writing theses/dissertations using the latex a redistribution of texlive and the gui latex editor texshop (note texshop may be.

Latex editor dissertation
Rated 4/5 based on 40 review

2018.


text:
1. ## Logarithms

Hi, I don't really understand what the textbook means by this quote, could someone explain it to me and give me an example?

"The logarithm of x to the base 1 is only valid with x=1, in which case y has an infinite number of solutions and is not a function"

2. Originally Posted by skeske1234
Hi, I don't really understand what the textbook means by this quote, could someone explain it to me and give me an example?
"The logarithm of x to the base 1 is only valid with x=1, in which case y has an infinite number of solutions and is not a function"
We must have the question to which that is the answer.
Please do not post an answer and expect us to know the question.
What question?

3. Originally Posted by Plato
We must have the question to which that is the answer.
Please do not post an answer and expect us to know the question.
What question?
It's part of the "key concepts" area of the end of the chapter...
It just has a bullet point and says:

- Exponential and log functions are defined only for positive values of the base that are not equal to one:
y=b^x, b>0, x>0, b cannot equal 1
y=log_bx, b>0, y>0, b cannot equal 1

The logarithm of x to the base 1 is only valid when x=1, in which case y has an infinite number of solutions and is not a function.

I just don't get the last part, what is it talking about when it says that?

4. From the basic definition $b > 0\; \Rightarrow \;\log _b (x) = y\;\iff\;b^y = x$.
That means that $\log _1 (x) = y\;\iff\;1^y = x$, but that means $x=1$ for any $y$.
Does that help?

5. Hi,

I will use the answer of Plato and extend it a little bit. My answer is a little bit longer, but I hope you'll read it till the end .

Originally Posted by Plato
From the basic definition $b > 0\; \Rightarrow \;\log _b (x) = y\;\iff\;b^y = x$.
That means that $\log _1 (x) = y\;\iff\;1^y = x$, but that means $x=1$ for any $y$.
We have a restriction that the base b cannot equal 1. Let's ignore this restriction, and see what will happen, if the base b equals 1. As Plato wrote:

$\log _1 (x) = y\;\iff\;1^y = x$

Let's concentrate on the $1^y = x$ part. No matter what value you assign to y, the result will always be 1, because no matter how many times you multiply 1, the result is always 1.
For example, let $y = 3$. Then $1^3 = 1.1.1 = 1.$ So, $x = 1$.
Let $y = 5$. Then $1^5 = 1.1.1.1.1 = 1$. So, again $x = 1.$
If you say $y = 8$, then $1^8$ will again equal 1.
So, we ALWAYS have $1^y = 1$. As you see, the 1 on the right side of the equaltion is our x in the previous formula ( $1^y = x$), so x is always 1.

So, let's return to the unclear statement from your book. I think the first part should be clear now:

"The logarithm of x to the base 1 is only valid with x=1, ..... ".

We have just seen that x is always 1 in each case (no matter what we assign to y). That's why they say that the logarithm of x to the base 1 is ONLY valid when $x = 1$.

Lets' continue with the statement:
"The logarithm of x to the base 1 is only valid with x=1, in which case y has an infinite number of solutions ..... ".

We have seen that we can assign any number to y: y = 3, y = 5, y = 8, ... etc., and we get always the number 1 as an answer, which is the correct answer, because no matter how many times we multiply 1, we receive 1. So, y really has an infinite number of solutions.

Let's continue with the statement:

"The logarithm of x to the base 1 is only valid with x=1, in which case y has an infinite number of solutions and is not a function".

Here you have to remember the definition of a function. I will cite Wikipedia (http://en.wikipedia.org/wiki/Function_(mathematics)):

"A function is defined as a relation between two terms, which are called variables because their values vary. Call the terms, for example, x and y. If every value of x is associated with exactly one value of y, then y is said to be a function of x."

Concentrate on the last sentence. You cannot have for the same value of x, in our case 1, more than one value for y. But as we have seen, you have lots of solutions for y, when x is 1! Not just one solution. You can have y = 3, y = 5, y = 8, ... etc. So, if we allow the base b to be equal to 1, these expressions will not express functions, in the case when the base is 1:

$\log _1 (x) = y$

$1^y = x$

The two variables x and y are still in a relation, but one of them is not a function of the other. And you see - in order to define the logarithmic and exponential functions, you need the restriction that the base is not 1. Otherwise, we cannot call them "functions". This is the last part of the statement from the book: they say that y is not a function of x, because y has an infinite number of solutions.


text:
You are reading an old version of the documentation (v3.1.0). For the latest version see https://matplotlib.org/stable/api/afm_api.html

# matplotlib.afm¶

This is a python interface to Adobe Font Metrics Files. Although a number of other python implementations exist, and may be more complete than this, it was decided not to go with them because they were either:

1. copyrighted or used a non-BSD compatible license
2. had too many dependencies and a free standing lib was needed
3. Did more than needed and it was easier to write afresh rather than figure out how to get just what was needed.

It is pretty easy to use, and requires only built-in python libs:

>>> from matplotlib import rcParams
>>> import os.path
>>> afm_fname = os.path.join(rcParams['datapath'],
...                         'fonts', 'afm', 'ptmr8a.afm')
>>>
>>> from matplotlib.afm import AFM
>>> with open(afm_fname, 'rb') as fh:
...     afm = AFM(fh)
>>> afm.string_width_height('What the heck?')
(6220.0, 694)
>>> afm.get_fontname()
'Times-Roman'
>>> afm.get_kern_dist('A', 'f')
0
>>> afm.get_kern_dist('A', 'y')
-92.0
>>> afm.get_bbox_char('!')
[130, -9, 238, 676]

As in the Adobe Font Metrics File Format Specification, all dimensions are given in units of 1/1000 of the scale factor (point size) of the font being used.

class matplotlib.afm.AFM(fh)[source]

Bases: object

Parse the AFM file in file object fh.

family_name

The font family name, e.g., 'Times'.

get_angle(self)[source]

Return the fontangle as float.

get_bbox_char(self, c, isord=False)[source]
get_capheight(self)[source]

Return the cap height as float.

get_familyname(self)[source]

Return the font family name, e.g., 'Times'.

get_fontname(self)[source]

Return the font name, e.g., 'Times-Roman'.

get_fullname(self)[source]

Return the font full name, e.g., 'Times-Roman'.

get_height_char(self, c, isord=False)[source]

Get the bounding box (ink) height of character c (space is 0).

get_horizontal_stem_width(self)[source]

Return the standard horizontal stem width as float, or None if not specified in AFM file.

get_kern_dist(self, c1, c2)[source]

Return the kerning pair distance (possibly 0) for chars c1 and c2.

get_kern_dist_from_name(self, name1, name2)[source]

Return the kerning pair distance (possibly 0) for chars name1 and name2.

get_name_char(self, c, isord=False)[source]

Get the name of the character, i.e., ';' is 'semicolon'.

get_str_bbox(self, s)[source]

Return the string bounding box.

get_str_bbox_and_descent(self, s)[source]

Return the string bounding box and the maximal descent.

get_underline_thickness(self)[source]

Return the underline thickness as float.

get_vertical_stem_width(self)[source]

Return the standard vertical stem width as float, or None if not specified in AFM file.

get_weight(self)[source]

Return the font weight, e.g., 'Bold' or 'Roman'.

get_width_char(self, c, isord=False)[source]

Get the width of the character from the character metric WX field.

get_width_from_char_name(self, name)[source]

Get the width of the character from a type1 character name.

get_xheight(self)[source]

Return the xheight as float.

string_width_height(self, s)[source]

Return the string width (including kerning) and string height as a (w, h) tuple.

class matplotlib.afm.CharMetrics

Bases: tuple

Represents the character metrics of a single character.

Notes

The fields do currently only describe a subset of character metrics information defined in the AFM standard.

Create new instance of CharMetrics(width, name, bbox)

bbox

The bbox of the character (B) as a tuple (llx, lly, urx, ury).

name

The character name (N).

width

The character width (WX).

class matplotlib.afm.CompositePart

Bases: tuple

Represents the information on a composite element of a composite char.

Create new instance of CompositePart(name, dx, dy)

dx

x-displacement of the part from the origin.

dy

y-displacement of the part from the origin.

name

Name of the part, e.g. 'acute'.

matplotlib.afm.parse_afm(fh)[source]

[Deprecated]

Notes

Deprecated since version 3.0:


text:
# Imaginary Unit to Power of Itself

## Theorem

$i^i = e^{-\pi / 2}$

where $i$ is the imaginary unit.

Its decimal expansion is:

$0 \cdotp 20787 \, 95763 \, 50761 \, 90854 \, 6955 \ldots$

### Complete Result

The full result is actually more complicated than that:

$i^i = \set {\exp \paren {\dfrac {4 k + 3} 2 \pi}: k \in \Z}$

where $i$ is the imaginary unit.

## Proof

 $\displaystyle i^i$ $=$ $\displaystyle \left({e^{i \pi / 2} }\right)^i$ Euler's Formula $\displaystyle$ $=$ $\displaystyle e^{\pi i^2 / 2}$ $\displaystyle$ $=$ $\displaystyle e^{-\pi / 2}$

$\blacksquare$


text:
# redis 使用问题

JedisPool

)
Try setting your Redis password after using pool. I was having some problem with AUTH as well and then saw someone having similar problem with Lettuce by setting redis password before using pool. Change the order, once you set your factory to use pool, then set the password. The solution worked fine for me.


text:
## Wednesday, December 03, 2008 ... //

### CCNet: Eight articles about the climate socialism

Benny Peiser is sending us interesting stuff. Send an e-mail to listserver@livjm.ac.uk with "subscribe cambridge-conference" or "unsubscribe cambridge-conference" in the body.

1. China View: Ten thousand EU workers protest in Brussels against the "climate" plans to cripple Europe's steel industry
2. PhysOrg: German carmakers denounce the EU "compromise" on CO2 emissions
3. World Climate Report: Will one of the 10,000 participants of the Poznan climate conference notice that there hasn't been any warming for 10 years?
4. Deutsche Welle: Václav Klaus, a leading AGW "doubter", will become more visible during the Czech EU presidency
5. Investor's Business Daily: Cooling down: people will realize that there exist serious issues, too
6. Climate Progress: Maybe, Obama is not the ultimate green messiah, after all
7. WSJ blog: Analysts are scrabling to dampen already low expectations in the Poznan summit
8. Orange Punch: The Terminator and friends have edited their warming books to make his heroic struggle to terminate climate change look much cheaper
Bonus from your humble correspondent: Michael Mann's hockey stick from Brownian noise

As a part of the refreshing of my basic Mathematica skills, I've created this simple self-explanatory Mathematica notebook explaining why Michael Mann gets the hockey stick even from random data - Brownian noise.

In order to make the effect really nice and obvious, I first prepare 5,000 random Brownian temperature proxies, obtained by a resummation of random independent numbers between -0.5 and +0.5 over time. Click the picture below to zoom in.

In the second step, I create "instrumental" 20th century data. To simplify a bit and extract the qualitative message of this whole homework, I assume that the temperature was increasing linearly. At this moment, I am ready to compute the correlation coefficients of each of the 5,000 proxies with the "instrumental" temperature data. The average temperature of the proxies, weighted by the correlation coefficients - telling you how "good" the proxy is according to Michael Mann - is drawn below: click to zoom in.

What we're doing is completely obvious. We're choosing the "good" and "important" proxies by their having an unusual 20th century trend, without paying any attention to their behavior in the previous centuries. It follows that the behavior of the random proxies before 1900 averages to zero while the selection criterion for the 20th century survives. The result is inevitably a hockey stick.

Let me emphasize that we have entered random data from a virtual world where the temperature in the 20th century had the same variability as the temperature in the previous centuries. Nevertheless, the Mannian method has transformed the random data into a hockey stick. That's the simplest way, due to M&M, to prove that Mann's methodology is complete rubbish.

If you're worried about the linear 20th century, it doesn't really matter because the 20th century trend was pretty similar to the linear function and with the exactly measured 20th century temperatures, we would obtain (and Mann obtained) qualitatively similar data. Still, the appearance of the hockey-like graph clearly doesn't mean that the 20th century was any special: in our world, we were very careful to guarantee that the 20th century was generic and ordinary.

Using Mann's method, you get the hockey stick if the data are random and unrelated to the temperature. But even if the data are correlated with the temperature, it is easy to see that the resulting hockey stick doesn't imply that the real temperatures looked like a hockey stick. In fact, the temperatures could have been linearly increasing from the year 1000 to 2000 - imagine that you add this "real" linear function to all the proxies. The result, using Mann's method, would still have the hockey stick, superimposed onto a negligible linear trend. You can play with the program yourself. If you add any "real temperature profile" to the Brownian motion, Mann's method still gives you the "real temperature profile" plus (superimposed on) the hockey stick (that comes from the random contribution to the proxies, more precisely from the bad proxies that were overrepresented because they agreed with a warming trend "by chance").

To put it simply, Mann misinterprets the 20th century warming as a proof that the warming was unprecedented, uses this misinterpretation to select proxies, and "surprisingly" derives his assumptions back. If you have Mathematica, you may download the notebook here:
mann-hockey-fun.nb


text:
I wrote a somewhat short post on list of figures and list of tables a few years ago. Nevertheless, it gets quite a bit of traffic, possibly due to the large number of comments. For that reason, I decided to put together another, more informative post on the same topic that includes table of contents.

If you followed my previous posts regarding automated Stata and LaTeX integration you might already have a good idea how estout works and how a table can be printed in LaTeX in an aesthetically pleasing way. This post is about improving the print quality in LaTeX even further.

Frequently Asked Question List for TeX.

Overview. IEEEtran is a collection of software packages I develop and maintain for using the LaTeX typesetting system for IEEE-style research publications. The most recent version of is vb which was released on August 26, Page breaks in math environments []. To suggest that LaTeX insert a page break inside an amsmath environment, you may use the \displaybreak command before the line break. Just as with \pagebreak, \displaybreak can take an optional argument between 0 and 4 denoting the level of desirability of a page break. Whereas 0 means "it is permissible to break here", 4 forces a break.

The TeX showcase. This is the TeX showcase, edited by Gerben contains extreme examples of what you can do with TeX, the typesetting engine from Donald Knuth, world famous mathematician, computer scientist and above all well known for TeX. I will try to keep this showcase small. For remarks on submissions, see at the end of this document.

## Stor Svart Kuk Fucks Latin Hemmafru

• All over the place it anything is. It is in somebody's debt to facilitate you en route for the patronage domicile this discussion. I did not make somebody's acquaintance it.

• By a long way. Altogether better told the detail. Let's sermon this phenomenon. Around before done PM.

• I call, so as to you are not honest. I spray can delay it.


text:
Shania Houston

2023-03-12

A spherical snowball melts so that its radius decreases at a rate of 4 in/sec. At what rate is the volume of the snowball changing when the radius is 8 in?

### Answer & Explanation

Jazlene Martin

The formula for volume of a sphere is $V=\frac{4}{3}{r}^{3}\pi$
Differentiating with respect to $t$, time.
$\frac{dV}{dt}=4{r}^{2}\left(\frac{dr}{dt}\right)$
The rate of change of the snowball is given by $\frac{dV}{dt}$. We know $\frac{dr}{dt}=-4$. We want to find the rate of change when $r=8$. Thus,
$\frac{dV}{dt}=4{\left(8\right)}^{2}\left(-4\right)$
$\frac{dV}{dt}=4\left(64\right)\left(-4\right)$
$\frac{dV}{dt}=-1024$
Consequently, the snowball's volume is shrinking at a rate of $-1024\frac{{\phantom{\rule{1ex}{0ex}}\text{in}}^{3}}{\text{sec}}$

Do you have a similar question?

Recalculate according to your conditions!


text:
keyboard_arrow_up

# 5 Factors more important than Pay to your Employees

According to a recent survey of over 3,000 employees conducted by CareerBuilder 21% of your employees are pledging to leave their current position in 2016. What factors did survey respondents say are more important than their pay? They're listed here (% shown represents percent of respondents saying that a factor is more important than their pay): #5 [image: Inline image 1] #4 [image: Inline image 2] #3 [image: Inline image 3] #2 [image: Inline image 4] #1 [image: Inline image 5] Source: CareerBuilder.com Survey #bootstrapped #news


text:
# 8.3.2 Singular points and their phase portraits

The governing equation for free motion of a pendulum with damping is

$$\ddot{\theta} = -\lambda \dot{\theta} -\dfrac{g}{L} \sin \theta . \tag{1}$$

A class of equations which includes this case would be

$$\ddot{x}=g(x,\dot{x}) \tag{2}$$

where $g$ is any function. In the spirit of the phase-plane view, we can recast this as a pair of first-order equations by writing

$$\dot{x} = y,\mathrm{~~~~~}\dot{y}=g(x,y). \tag{3}$$

Again we could generalise this: the approach to be followed here would apply to any equations of the form

$$\dot{x} = f(x,y),\mathrm{~~~~~}\dot{y}=g(x,y). \tag{4}$$

where $f$ is another function. Singular points (or equilibrium points) occur where $\dot{x}=\dot{y}=0$, so they occur at positions $(x_0,y_0)$ which are roots of

$$f(x_0,y_0)=0, \mathrm{~~~~~}g(x_0,y_0)=0. \tag{5}$$

Provided $f$ and $g$ are both smooth, we can expand both functions by Taylor series in the vicinity of each singular point, and keep only the linear terms:

$$f \approx a_{11} (x-x_0) + a_{12} (y-y_0)$$

$$g \approx a_{21} (x-x_0) + a_{22} (y-y_0) \tag{6}$$

so that

$$\begin{bmatrix}\dot{x}\\ \dot{y}\end{bmatrix} \approx A \begin{bmatrix}x-x_0\\ y-y_0\end{bmatrix} \tag{7}$$

where

$$A=\begin{bmatrix} a_{11} & a_{12}\\a_{21} & a_{22} \end{bmatrix} . \tag{8}$$

To see the behaviour determined by these linearised equations, it is useful to look first for solutions satisfying

$$\begin{bmatrix} \dot{x} \\ \dot{y} \end{bmatrix} = \lambda \begin{bmatrix} x-x_0 \\ y-t_0 \end{bmatrix} \tag{9}$$

where $\lambda$ is a constant. In other words, we seek the eigenvalues and eigenvectors of the matrix $A$ such that

$$A \mathbf{u} = \lambda \mathbf{u} . \tag{10}$$

The associated solution of eq. (9) is simply

$$\mathbf{u} = \mathbf{u_0} e^{\lambda t} . \tag{11}$$

If the eigenvalues are real, this describes motion radially inwards or outwards along the eigenvector direction. If the eigenvalues are complex, they must form a complex conjugate pair, and the corresponding motion involves circulation around the singular point.

From the usual determinant, the eigenvalues are the roots of

$$(a_{11}-\lambda)(a_{22}-\lambda)-a_{12} a_{21} =0 \tag{12}$$

which leads to

$$\lambda^2 – T \lambda +D =0 \tag{13}$$

where $T=a_{11}+a_{22}$ is the trace of the matrix $A$ and $D$ is its determinant.

We can recognise this as the same as the characteristic equation for the damped harmonic oscillator (see section 2.2.7), where $D$ plays the role of the squared frequency, and $T$ is the negative of the damping coefficient. So we already know what behaviour to expect: if $D$ is negative, the system is unstable regardless of the value of $T$. On the other hand if $D$ is positive, oscillatory behaviour can occur. If $T=0$ the system is undamped and will exhibit steady oscillation. If $T<0$ we have positive damping and the motion decays, while if $T>0$ the motion grows in an unstable manner. If $T^2 < 4D$, damping is below the critical value so oscillation will be seen. But if $T^2 > 4D$, damping is greater than the critical value and decay without oscillation will occur.

These conditions map directly onto six categories of behaviour, each with its own phase portrait:

$D<0$ gives a saddle point

$D>0$ with $T=0$ gives a centre

$D>0$ with $0 < |T| < 2\sqrt{D}$ gives a spiral, either stable or unstable depending on whether $T<0$ or $T>0$

$D>0$ with $|T| > 2\sqrt{D}$ gives a node, either stable or unstable depending on whether $T<0$ or $T>0$

An undamped system always has $T=0$, so the only options are saddle points and centres.

Typical examples of these cases are illustrated in Fig. 1. We have seen the phase portraits for most of these in section 8.3, but they are repeated here for completeness. The top row shows the saddle point and the centre. The second row shows shows a spiral and a node: for stable versions of these, the arrows will point inwards, whereas for unstable versions they point outwards.


text:
Trent University, Winter 2012
Mathematics 3790H
Analysis I: Introduction to analysis

(Formerly Mathematics 309H.)

MATH 3790H is an introductory course about analysis, with an emphasis on the concepts underpinning the convergence of series and the foundations of calculus.

Prerequisite: Mathematics 1100 or 1101Y, with at least 60%.
Pre- or co-requisite: Mathematics 2200H, with at least 60%.
Exclusions: Mathematics 206H and 309H.

Instructor | Text | Marking | Meetings | Content | Honour & Help | Aids | Handouts & Work | Other sources

Exam Period Office Hours
Tuesday, 10 April, 11:00-13:00
Friday, 13 April, 11:00-13:00
Monday, 16 Tuesday, 17 April, 11:00-13:00
Wednesday, 18 April, 11:00-13:00
Friday, 20 April, 10:00-12:00

Pre-Exam Study Tea
Thursday, 10:00-14:00, in GCS 338.

### Instructor

Stefan Bilaniuk
office: GCS 337
hours: Monday 12:00-12:50, Tuesday 13:00-13:50, Wednesday 11:00-11:50, and Thursday 10:00-10:50, or by appointment, or just drop by!
phone: 705 748-1011 x7474
home phone: 705 742-7862 [Do not call between 10 p.m. and 8 a.m. unless it's an emergency.]
e-mail: sbilaniuk{at}trentu{dot}ca and stefanbilaniuk{at}cogeco{dot}com
[E-mail sent to my Trent address occasionally just vanishes. If it's important, send it to both.]
web: http://www.trentu.ca/mathematics/sb/

### Text

Elementary Real Analysis (Second Edition), by B.S. Thomson, J.B. Bruckner, and A.M. Bruckner,
classicalrealanalysis.com, 2008, ISBN 1-434841-61-8.
Parts of the text, including the sections we need for the first half of the course, may be downloaded for free in pdf format from the given web site. The entire text may be ordered in paperback form from Amazon.

### Meetings

• Lectures: Monday 14:00-14:50 in BL 402, Wednesday 12:00-12:50 and Thursday 11:00-11:50 in CC K1.
• Tutorial: Thursday 125:00-12:50 in CC K1.

### Marking Scheme

There will be at least ten weekly quizzes, at least ten weekly assignments, and a take-home final examination. Quizzes will normally be written weekly in the Thursday Monday lectures and last between ten and twenty minutes each. The final examination will be handed out two weeks before the end of classes ad will be due near the end of the examination period in April. (Please consult the handout Readings and Schedule for a detailed list of dates.) The work will weigh as follows in the final mark:

 Best 9 quizzes (2% each) 18% Best 9 assignments (5% each) 45% Final Examination 37%

Assignments will not normally be accepted after the due date. Students who miss more than one quiz or assignment for reasons beyond their control should contact the instructor as soon as possible. Note that there is no attendance requirement per se, but the consequences of missing class are ultimately the students' responsibility to deal with.

This scheme may be modified for students in exceptional circumstances, such as a lengthy absence due to illness. Any such modification will require the agreement of both the student and the instructor.

### Content

MATH 3790H is a introductory course about analysis, with an emphasis on series. We will cover parts of Chapters 1 and 2 and most of Chapters 3, 5, 9, and 10 of the text, along with with a few necessary bits and pieces from other chapters. In particular, we will work through the following:

• Order properties of the real numbers (Sections 1.4-1.7)
• Limits and convergence of sequences (most of Chapter 2)
• ums and convergence of series (most of Chapter 3)
• Limits and continuity (most of Chapter 5)
• Sequences and series of functions (most of Chapter 9)
• Power series (Section 7.12, most of Chapter 10)
\noindent Additional material, including material not in the text, may be covered on assignments and in class, and other sources will be used to augment the text in a couple of places. Please consult the handout Readings and Schedule for a tentative description of what material will be covered when.

### Honour

Academic dishonesty, which includes plagiarism and cheating, is an extremely serious academic offence and carries penalties varying from a 0 grade on an assignment to expulsion from the University. Definitions, penalties, and procedures for dealing with plagiarism and cheating are set out in Trent University's Academic Integrity Policy. You have a responsibility to educate yourself - unfamiliarity with the policy is not an excuse. You are strongly encouraged to visit Trent's Academic Integrity website to learn more - www.trentu.ca/academicintegrity .

For clarity, the following guidelines will apply in MATH 3790H:

Students are permitted and encouraged to study together and to work together on the assignments, consult any books or other sources you wish, and ask anyone willing (especially the instructor!) for hints, suggestions, and help. However, students must write up all work submitted for credit entirely by themselves, giving due credit to all relevant sources of help and information. No aid may be given or received on the quizzes and final exam, except with the intructor's permission.

In some circumstances students may also be eligible for special help or accommodation. The obligatory statement concerning access to instruction reads as follows:

It is Trent University's intent to create an inclusive learning environment. If a student has a disability and/or health consideration and feels that he/she may need accommodations to succeed in this course, the student should contact the Disability Services Office (Blackburn Hall Suite 132, 705 748-1281, disabilityservices{at}trentu{dot}ca) as soon as possible. Complete text can be found under Access to Instruction in the Academic Calendar.

### Aids

Students may use whatever calculators they wish. Symbolic computation software such as Maple or Mathematica may also come in handy when doing some of the assignments or to check your answers when studying. For the quizzes students may also bring an 8.5" by 11" aid sheet, with whatever they want on written on all sides of it.

### Miscellaneous

"Personal response systems" such as clickers will not be used in MATH 3790H and it will make only minimal use of myLearningSystem/WebCT.

The last date to drop Winter half-courses without academic penalty is Friday, 9 March, 2012.

### Handouts & Work

Stuff from previous years:

### Other sources

There is fair bit of material available online about real analysis and related areas; a brief selection follows:

#### Some other real analysis references and resources online

Department of Mathematics Trent University
Maintained by Stefan Bilaniuk. Last updated 2012.04.12.


text:
# Calculating eigenvalues of the induced action on $H^0(2 K_C)$

Given a (smooth) curve $C$ and an automorphism $\phi$ of $C$. In the first part of their paper On the Kodaira dimension of the moduli space of curves Harris and Mumford calculate the eigenvalues of the induced action of $\phi$ on $H^0(2 K_C)$ (to study the singularities of $\mathcal{M}_g$). They don't do those calculations, instead only state the results and I seem to be missing something to understand how this is done in principle.

To be more concrete, the easiest example they consider is (p. 31): $C$ given as $y^2 = (x^3 - 1) (x^3 - a)$ with automorphism $\phi(x,y) = (\zeta_3 x, - y)$, where $\zeta_3$ is a primitive third root of $1$. $C$ has genus $2$, so $H^0(2 K_C)$ has dimension $3$. The automorphism is of order six, so the eigenvalues are given as $\zeta_6^{a_i}$, $i = 1,2,3$ with $\zeta_6$ a primitive sixth root of $1$. They state that the $a_i$ are given as $0,2,4$.

How to calculate those?

The only thing I see is that $a_i = 0$ gives an eigenvalue: Considering $C \rightarrow C/\phi$, we get a six to one cover of $\mathbb{P}^1$ with four branch points of profile $(2,2,3,3)$. Now a quadratic differential on $C$ has eigenvalue one iff it is the lift of a quadratic differential under this map. There are no smooth quadratic differentials on $\mathbb{P}^1$. But if a quadratic differential on $\mathbb{P}^1$ has a zero of order $m$ at $p$, its lift to $C$ has a zero of order $m k + 2(k-1)$ (where negative numbers denote poles) at a point in the fiber over $p$, at which locally the cover is given as $z \rightarrow z^k$. So in this example, a quadratic differential with simple poles at the branch points lifts to a smooth quadratic differential on $C$ (with prescribed zeroes at four of the ten ramification points). Now the space of quadratic differentials on $\mathbb{P}^1$ with poles at at most four points is one dimensional and in this way we get the one-dimensional eigenspace corresponding to the eigenvalue $1$. Is that right? Is it possible to calculate the other eigenvalues in a similar manner?

The analysis of the covering $C\rightarrow C/\varphi$ gives another interpretation of the eigenvalue 1: four points on a $P^1$ give a one-dimensional moduli space (it's $M_{1,4}$) and (most probably - I didn't spell it out) give via the covering of the mentioned type a one-dimensional subfamily of the local universal deformation of $C$ to which the automorphism $\varphi$ deforms. Therefore the corresponding one-dimensional subcurve of the base space of the local universal deformation is fixed pointwise by the induced action of $\varphi$.
I would try to transfer this sort of argument to pin down the remaining eigenvalues. For example the cube of $\varphi$ is the hyperelliptic involution which deforms to every smooth curve of genus 2. Hence the induced action of $\varphi^3$ is the identity, which proves that the eigenvalues of the induced action of $\varphi$ must be third roots of unity (and not primitive sixth roots). The remaining problem would be to prove that these are primitive third roots (i.e. there is no two-dimensional family to which $\varphi$ deforms) and these are two different ones (otherwise the Reid-Tai-sum would be only $\frac{2}{6}+\frac{2}{6}<1$).
It might also be necessary to analyse the induced action of $\varphi$ on the local universal deformation of $C$ in more detail. You'll find information on deformation theory in Harris-Morrison's Moduli of curves (p.102ff). A problem I fought with a lot is the question "Which direction of the action is the right one?": The space of infinitesimal deformations of $C$ is $H^1(C,T_C)$ and isomorphic to the tangent space of the base space of the local universal deformation. Via Riemann-Roch it is also isomorphic to $H^0(C,2K_C)^\ast$. The induced action of $\varphi$ on $H^0(C,2K_C)^\ast$ is dual to the action on $H^0(C,2K_C)$, which - sadly - inverses all eigenvalues. For Reid-Tai it's not important whether you take one or the other, but you have to be extra careful not to use the one in half of the calculations and the other in the second half.


text:
### I'm a lucky teacher!

Last term I taught Ay117: Statistics and Data Analysis. I wasn't expecting to have to teach the class in the winter; I thought I was teaching in the Spring. So I scheduled a bunch of travel in the Winter, most of it related to my job decision. Fortunately, I had the best TA on campus last term, Aaron Wolf. Aaron really carried me, subbing for me about 1/4 of the lectures. He also did the grading and office hours, and the students absolutely loved him.

Aaron is my favorite type of human: extraordinarily smart, yet humble and extremely personable. These characteristics shone through in his teaching last term. Oh, did I mention he did all this while writing his thesis?! As a last-year grad student, he didn't even have to TA.

From: Registrar's Office REGIS
Sent: Tuesday, April 09, 2013 9:00 AM
To: Wolf, Aaron S.
Subject: Aaron, thank you for being an excellent TA!
Dear Aaron,

It has come to our attention that you were one of the highest rated TAs in the TQFR for the past term. I hope you have read the wonderful comments that the students made about you. The Office of Graduate Studies and the Registrar’s Office would like to thank you for your dedication and caring of the students in Ay 117. As a small token of our appreciation, we are sending you a gift card from Amazon.com!

Keep up the good work!

Sincerely,

Joe E. Shepherd

### On the Height of J.J. Barea

Dallas Mavericks point guard J.J. Barea standing between two very tall people (from: Picassa user photoasisphoto).

Congrats to the Dallas Mavericks, who beat the Miami Heat tonight in game six to win the NBA championship.

Okay, with that out of the way, just how tall is the busy-footed Maverick point guard J.J. Barea? He's listed as 6-foot on NBA.com, but no one, not even the sports casters, believes that he can possibly be that tall. He looks like a super-fast Hobbit out there. But could that just be relative scaling, with him standing next to a bunch of extremely tall people? People on Yahoo! Answers think so---I know because I've been Google searching "J.J. Barea Height" for the past 15 minutes.

So I decided to find a photo and settle the issue once and for all.

I then used the basketball as my metric. Wikipedia states that an NBA basketball is 29.5 inches in circumfe…

### Finding Blissful Clarity by Tuning Out

It's been a minute since I've posted here. My last post was back in April, so it has actually been something like 193,000 minutes, but I like how the kids say "it's been a minute," so I'll stick with that.
As I've said before, I use this space to work out the truths in my life. Writing is a valuable way of taking the non-linear jumble of thoughts in my head and linearizing them by putting them down on the page. In short, writing helps me figure things out. However, logical thinking is not the only way of knowing the world. Another way is to recognize, listen to, and trust one's emotions. Yes, emotions are important for figuring things out.
Back in April, when I last posted here, my emotions were largely characterized by fear, sadness, anger, frustration, confusion and despair. I say largely, because this is what I was feeling on large scales; the world outside of my immediate influence. On smaller scales, where my wife, children and friends reside, I…

### The Force is strong with this one...

Last night we were reviewing multiplication tables with Owen. The family fired off doublets of numbers and Owen confidently multiplied away. In the middle of the review Owen stopped and said, "I noticed something. 2 times 2 is 4. If you subtract 1 it's 3. That's equal to taking 2 and adding 1, and then taking 2 and subtracting 1, and multiplying. So 1 times 3 is 2 times 2 minus 1."

I have to admit, that I didn't quite get it at first. I asked him to repeat with another number and he did with six: "6 times 6 is 36. 36 minus 1 is 35. That's the same as 6-1 times 6+1, which is 35."

Ummmmm....wait. Huh? Lemme see...oh. OH! WOW! Owen figured out

x^2 - 1 = (x - 1) (x +1)

So $6 \times 8 = 7 \times 7 - 1 = (7-1) (7+1) = 48$. That's actually pretty handy!

You can see it in the image above. Look at the elements perpendicular to the diagonal. There's 48 bracketing 49, 35 bracketing 36, etc... After a bit more thought we…


text:
Edit Article

# wikiHow to Solve One Step Equations

An equation is a mathematical sentence that expresses two equal values.[1] In algebra you will often work with equations, which have an unknown value represented by a variable. To solve such equations, you need to find the value of the variable. A one-step equation is one in which you only have to perform one operation to determine the unknown value, and so these type of equations are the easiest to solve.

### Method 1 Adding or Subtracting to Solve

1. 1
Write down the equation. It’s easy to solve equations when you understand what they mean. An equation will have a variable (usually ${\displaystyle x}$), which represents an unknown value. The equation will also have a constant, which is a number you need to add or subtract from the variable to equal a certain sum or difference.
• For example, you might have the equation ${\displaystyle x-9=5}$. The variable representing the unknown number is ${\displaystyle x}$. When you subtract 9 from the unknown number, the difference is 5.
2. 2
Determine how to isolate the variable. To isolate a variable, you need to get it alone on one side of the equation by performing an inverse operation to cancel the constants. Addition and subtraction are inverse operations. So, if the constant is subtracted in the equation, to cancel it you would add.[2]
• For example, in the equation ${\displaystyle x-9=5}$, 9 is subtracted from the variable, so to isolate the variable you must cancel the 9 by adding it.
3. 3
Add or subtract the constant from both sides of the equation. As you manipulate equations to solve them, you must keep both sides balanced. Whatever you do to one side of the equation, you must do to the other side. So, if you need to add a value to isolate the variable, you must also add that same value to the other side of the equation.[3]
• For example, in the equation ${\displaystyle x-9=5}$, you need to add 9 to the left side to isolate the variable, so you also need to add 9 to the right side of the equation:
${\displaystyle x-9=5}$
${\displaystyle x-9+9=5+9}$
${\displaystyle x=14}$.
4. 4
Check your work. To make sure your solution is correct, plug the value of ${\displaystyle x}$ into the original equation. If the equation is true, your solution is correct.
• For example, if you found that ${\displaystyle x=14}$, substitute 14 for ${\displaystyle x}$ in the original equation: ${\displaystyle 14-9=5}$. Since this equation is true, your solution is correct.

### Method 2 Dividing or Multiplying to Solve

1. 1
Evaluate the equation. The variable, usually ${\displaystyle x}$, represents an unknown value. Solving an equation means finding the unknown value. The equation may also have a coefficient, which is a number you need to multiply by the variable to equal a certain product. The variable may also be the numerator of a fraction. This means you need to divide the variable by the number in the denominator to equal a certain quotient.
• For example, you might have the equation ${\displaystyle 3x=24}$. The variable representing the unknown number is ${\displaystyle x}$. When you multiply the unknown number and 3, the product is 24.
2. 2
Determine how to isolate the variable. Isolating a variable means getting it by itself on one side of the equation. To do this you must perform an inverse operation to cancel coefficients or fractions. Multiplication and division are inverse operations. If the variable has a coefficient, to cancel it you would divide by the coefficient, since any number divided by itself is equal to 1. If the variable is the numerator of a fraction, to isolate it you would multiply by the denominator, since multiplying by a number cancels the division by that number.[4]
• For example, in the equation ${\displaystyle 3x=24}$ the variable is multiplied by 3, so to isolate the variable you must cancel the 3 by dividing by 3.
3. 3
Multiply or divide from both sides of the equation. As you solve an equation the most important thing to remember is that you must keep both sides of the equation balanced. This means that whatever you do to one side of the equation, you must do to the other side, too.[5] So, if you need to divide by a value to isolate the variable, you must also divide by the same value on the other side of the equation.
• For example, in the equation ${\displaystyle 3x=24}$, you need to divide by 3 on the left side to isolate the variable, so you also need to divide by 3 on the right side of the equation:
${\displaystyle 3x=24}$
${\displaystyle {\frac {3x}{3}}={\frac {24}{3}}}$
${\displaystyle x=8}$
4. 4
Check your solution. To make sure your answer is correct, plug the value of ${\displaystyle x}$ into the original equation. If the equation is true, your solution is correct.
• For example, if you found that ${\displaystyle x=8}$, substitute 8 for ${\displaystyle x}$ in the original equation: ${\displaystyle 3(8)=24}$. Since this equation is true, your solution is correct.

### Method 3 Completing Sample Problems

1. 1
Solve this equation with a fraction: ${\displaystyle {\frac {x}{4}}=8}$.
• Since the variable is divided by 4, to isolate it you need to multiply by 4.
• ${\displaystyle {\frac {x}{4}}=8}$
• ${\displaystyle 4({\frac {x}{4}})=(4)8}$
• ${\displaystyle x=32}$
• Checking your work, since ${\displaystyle {\frac {32}{4}}=8}$, your solution is correct.
2. 2
Solve this equation with a negative constant: ${\displaystyle -16+x=29}$.
• Since the constant is negative, adding it to both sides will isolate the variable.
• ${\displaystyle -16+x=29}$
• ${\displaystyle -16+x+16=29+16}$
• ${\displaystyle x=45}$
• Checking your work, since ${\displaystyle -16+45=29}$, your solution is correct.
3. 3
Solve this equation with a negative coefficient: ${\displaystyle -5x=45}$.
• Since the variable is multiplied by -5, to isolate the variable, you must divide each side by -5. Remember that dividing a positive number by a negative number equals a negative quotient.
• ${\displaystyle -5x=45}$
• ${\displaystyle {\frac {-5x}{-5}}={\frac {45}{-5}}}$
• ${\displaystyle x=-9}$
• Checking your work, since ${\displaystyle -5(-9)=45}$, your solution is correct.


text:
# Are all sets partially ordered?

If all sets can be well-ordered, does this also mean that all sets can be partially ordered? Can someone give me an example of a set that is not partially ordered?

-
The trivial order $x\leq y$ if and only if $x=y$, makes any set partially ordered. Don't need axiom of choice –  Thomas Andrews Nov 8 '12 at 2:28

A set isn't partially ordered until you put the structure of a partial order on it, in much the same way as a set isn't a group until you put a group structure on it. After all, posets (like groups) are sets-with-structure. If you give me a set and tell me nothing more then it is not partially ordered. Why? Because we haven't defined a partial order!

But every set can be equipped with a partial order; for example, if $A$ is a set, define a partial order $\le$ on $A$ by $a \le b$ if and only if $a=b$. (This is called the discrete order on $A$.)

In fact, most sets have many possible partial orders defined on them, and any one is as good as any other.

The point to take home is that "$X$ is partially ordered" and "$X$ can be partially ordered" are distinct statements. Let me know if you need any more clarification.

Aside: Whether or not every set can be well-ordered depends on (and is equivalent to) the axiom of choice. Since a well-order defines a partial order, if any set can be well-ordered then it can be partially ordered by the partial order induced by the well-order. (Specifically, if $<$ is a well-order on $A$, then for $a,b \in A$ put $a \le b$ if and only if either $a<b$ or $a=b$.) However, the assertion that every set can be partially ordered does not depend on the axiom of choice.

-
You mean $a\leq b$ iff $a=b$, I assume. –  Thomas Andrews Nov 8 '12 at 2:37
@ThomasAndrews: Yikes! Yes I did, thanks. –  Clive Newstead Nov 8 '12 at 9:33

Yes. All sets can be well-ordered (every nonvoid subset has a first element in a linear order) if you are prepared to believe the Axiom of Choice.

-
A well ordering is a partial ordering. A set with no relation on it has no partial order (imposed) on it. –  ncmathsadist Nov 8 '12 at 1:42

Every set is partially ordered. This does not require the axiom of choice at all.

First we need to remember that in set theory everything is a set, so all the elements of a set are also sets.

We can now use the very natural $\subseteq$ ordering on the elements of its set.

-


text:
# GINConv¶

class dgl.nn.pytorch.conv.GINConv(apply_func=None, aggregator_type='sum', init_eps=0, learn_eps=False, activation=None)[source]

Bases: torch.nn.modules.module.Module

Graph Isomorphism Network layer from How Powerful are Graph Neural Networks?

$h_i^{(l+1)} = f_\Theta \left((1 + \epsilon) h_i^{l} + \mathrm{aggregate}\left(\left\{h_j^{l}, j\in\mathcal{N}(i) \right\}\right)\right)$

If a weight tensor on each edge is provided, the weighted graph convolution is defined as:

$h_i^{(l+1)} = f_\Theta \left((1 + \epsilon) h_i^{l} + \mathrm{aggregate}\left(\left\{e_{ji} h_j^{l}, j\in\mathcal{N}(i) \right\}\right)\right)$

where $$e_{ji}$$ is the weight on the edge from node $$j$$ to node $$i$$. Please make sure that e_{ji} is broadcastable with h_j^{l}.

Parameters
• apply_func (callable activation function/layer or None) – If not None, apply this function to the updated node feature, the $$f_\Theta$$ in the formula, default: None.

• aggregator_type (str) – Aggregator type to use (sum, max or mean), default: ‘sum’.

• init_eps (float, optional) – Initial $$\epsilon$$ value, default: 0.

• learn_eps (bool, optional) – If True, $$\epsilon$$ will be a learnable parameter. Default: False.

• activation (callable activation function/layer or None, optional) – If not None, applies an activation function to the updated node features. Default: None.

Examples

>>> import dgl
>>> import numpy as np
>>> import torch as th
>>> from dgl.nn import GINConv
>>>
>>> g = dgl.graph(([0,1,2,3,2,5], [1,2,3,4,0,3]))
>>> feat = th.ones(6, 10)
>>> lin = th.nn.Linear(10, 10)
>>> conv = GINConv(lin, 'max')
>>> res = conv(g, feat)
>>> res
tensor([[-0.4821,  0.0207, -0.7665,  0.5721, -0.4682, -0.2134, -0.5236,  1.2855,
0.8843, -0.8764],
[-0.4821,  0.0207, -0.7665,  0.5721, -0.4682, -0.2134, -0.5236,  1.2855,
0.8843, -0.8764],
[-0.4821,  0.0207, -0.7665,  0.5721, -0.4682, -0.2134, -0.5236,  1.2855,
0.8843, -0.8764],
[-0.4821,  0.0207, -0.7665,  0.5721, -0.4682, -0.2134, -0.5236,  1.2855,
0.8843, -0.8764],
[-0.4821,  0.0207, -0.7665,  0.5721, -0.4682, -0.2134, -0.5236,  1.2855,
0.8843, -0.8764],
[-0.1804,  0.0758, -0.5159,  0.3569, -0.1408, -0.1395, -0.2387,  0.7773,

>>> # With activation
>>> from torch.nn.functional import relu
>>> conv = GINConv(lin, 'max', activation=relu)
>>> res = conv(g, feat)
>>> res
tensor([[5.0118, 0.0000, 0.0000, 3.9091, 1.3371, 0.0000, 0.0000, 0.0000, 0.0000,
0.0000],
[5.0118, 0.0000, 0.0000, 3.9091, 1.3371, 0.0000, 0.0000, 0.0000, 0.0000,
0.0000],
[5.0118, 0.0000, 0.0000, 3.9091, 1.3371, 0.0000, 0.0000, 0.0000, 0.0000,
0.0000],
[5.0118, 0.0000, 0.0000, 3.9091, 1.3371, 0.0000, 0.0000, 0.0000, 0.0000,
0.0000],
[5.0118, 0.0000, 0.0000, 3.9091, 1.3371, 0.0000, 0.0000, 0.0000, 0.0000,
0.0000],
[2.5011, 0.0000, 0.0089, 2.0541, 0.8262, 0.0000, 0.0000, 0.1371, 0.0000,

forward(graph, feat, edge_weight=None)[source]

Compute Graph Isomorphism Network layer.

Parameters
• graph (DGLGraph) – The graph.

• feat (torch.Tensor or pair of torch.Tensor) – If a torch.Tensor is given, the input feature of shape $$(N, D_{in})$$ where $$D_{in}$$ is size of input feature, $$N$$ is the number of nodes. If a pair of torch.Tensor is given, the pair must contain two tensors of shape $$(N_{in}, D_{in})$$ and $$(N_{out}, D_{in})$$. If apply_func is not None, $$D_{in}$$ should fit the input dimensionality requirement of apply_func.

• edge_weight (torch.Tensor, optional) – Optional tensor on the edge. If given, the convolution will weight with regard to the message.

Returns

The output feature of shape $$(N, D_{out})$$ where $$D_{out}$$ is the output dimensionality of apply_func. If apply_func is None, $$D_{out}$$ should be the same as input dimensionality.

Return type

torch.Tensor


text:
# Matrix transformation

• Jul 20th 2010, 02:50 AM
Stuck Man
Matrix transformation
I am having trouble with part c.
• Jul 20th 2010, 05:00 AM
Ackbeet
I think that what's being asked for is to compute the following multiplication, to start:

$\left[\begin{matrix}1 &-1\\ 2 &-2\end{matrix}\right]\left[\begin{matrix}x\\ mx+c\end{matrix}\right].$

Once you get that multiplication, what do you suppose you should do next?
• Jul 20th 2010, 06:01 AM
Stuck Man
I think it is done like parts a and b but there is much more work.
• Jul 20th 2010, 06:06 AM
Ackbeet
Well, show me how you did part b, for example, and what work you've done on part c.
• Jul 20th 2010, 06:33 AM
HallsofIvy
Yes, c is done exactly like a and b. I think if you try to write both components after your multiplication as "Ax+ B", you will notice an easy relation between the two components.
• Jul 20th 2010, 06:38 AM
Stuck Man
I have chosen (x, mx+c) and (1, m+c). Maybe I should have chosen two specific x values?
• Jul 20th 2010, 06:41 AM
Stuck Man
My images and being displayed too large with IE6. They are ok with Firefox. How are they for you?
• Jul 20th 2010, 07:04 AM
Stuck Man
I've done far more work than is required. Only the top line is needed. y=mx+c maps to y=2x.