text:
help-gnu-emacs
[Top][All Lists]

## Smart Indent in Emacs

 From: tim_milstead Subject: Smart Indent in Emacs Date: 17 Nov 2006 06:31:45 -0800 User-agent: G2/1.0

```I am using emacs on Windows and Linux.

I would like something I call smart indent to help display structure in
my LaTeX (and other) documents. Something like this:

\chapter{My Chapter}
\section{My Section}
This is my paragraph that is indented. Now I know this can be
done but
what Emacs can't do it smart indent the wrapped lines to the same
level
as the initial line. Please note that there are no line breaks in
this paragraph
I am simulating the line wrapped to the window width.


text:
Wiki

A tasklet object represents a tiny task in a Python thread. Tasklets are characterized by being very lightweight and portable (SWH: is this true? If so, are all python platforms supported? CT:Yes, see comment below), and make great alternatives to system threads or processes.

At program start, there is always one running main tasklet.

You might also be interested in communicating between tasklets via channels, pickling your tasklets, or other things on the samples page.

Construction

You may construct a tasklet several different ways.

Starting with the following definition:

import stackless

def aCallable(value):
print "aCallable:", value

you may create a live tasklet inline:

task = stackless.tasklet(aCallable)

or create a live tasklet using bind():

task = stackless.tasklet()
# some code

deprecated: or in more sophisticated situations, using become() or capture().

After creating the tasklet, you can invoke it using task.run(), stackless.run(), or stackless.schedule().

Scheduling

Scheduling controls switching between tasklets. Until a tasklet is scheduled, it will not be invoked.

Note

If a tasklet is blocked via channels, it will not be invoked by the scheduler until reactivated by that channel.

run()
Schedules this tasklet at the front of the scheduler list, given that it isn't blocked. Blocked tasks need to be reactivated by channels.
kill()
Raises a TaskletExit exception and immediately activates the tasklet. Note that this is a regular xception that can be caught within the tasklet. If the exception passes the toplevel frame of the tasklet, the tasklet will silently die. (As opposed to OS threads, other exceptions are not silent and will show up in the main tasklet).
insert()
Insert this tasklet at the end of the scheduler list, given that it isn't blocked. Blocked tasklets need to be reactivated by channels.
remove()
Removing a tasklet from the runnables queue.

Note

If this tasklet has a non-trivial C stack attached, it will be destructed when the containing thread state is destroyed. Since this will happen in some unpredictabl order, it may cause unwanted side-effects. Therefore it is recommended to either run tasklets to the end or to explicitly kill() them.

scheduled property

A tasklet is said to be scheduled if it is either in the runnables list or waiting in a channel.

This attribute is computed.

blocked property
Nonzero if waiting on a channel (1: send, -1: receive).

Critical Sections

In any MultiTasking environment the ability to atomically execute a section of code is very important. To create a critical section in stackless, use the following idiom:

import stackless

try:
print "Executing critical section"
finally:

What are the stackless methods? --littldo, Thu, 15 Apr 2004 03:01:36 +0200

Where can I find the stackless methods? CT: use help(stackless)

timers, semaphores? --wware, Thu, 22 Sep 2005 17:12:12 +0200

Back in the microthread days there were timers and semaphores and other RTOS-like paraphenalia. I'm not seeing them any more, were they given up on?

semaphores ... --tomservo291, Wed, 12 Oct 2005 16:07:44 +0200

I believe that semaphores are used primarily with C. They are used to provide a failsafe way to set a single variable to determine who is running in a multi-task enviornment.

The reason they are used is because the OS "owns" the memory the semaphore exists in, and allows only one process/thread to access & change its value at any given time.

If you are able to perform mutual exclusion without semaphores reliably, there is no reason why you should need them to do so; which may be the case here, but I could be mistaken.

tasklet portability --tismer, Fri, 11 Nov 2005 07:44:56 +0100

Hard to explain (needs a new page). tasklets are by nature platform independent. Stackless is not, because it is able to mangle the C stack.

Stackless uses cooperative context switches wherever it can. That means the stack unwinding operations are visible to and supported by the interpreter. This is the most efficient task switching mode possible. In this mode, tasklets are completely OS independent.

There are of course situations where Stackless cannot do cooperative task switching, because the C implementation has certain callbacks which cannot be made stackless by reasonable effort. In this situation, the C stack is captured and attached to the current tasklet, making "a non-trivial C stack", mentioned elsewhere. A tasklet in this state is absolutely OS dependant in the sense that this only works if the OS is supported by Stackless.

It would be possible to produce an OS independent Stackless, this is what Stackless 1.0 did. It would just be much less powerful and fail to switch context in many situations.

Note that these problems have completely vanished in the PyPy project. Here we can produce stackless support code for all situations automatically. But the C stack problems may come back on us when we support calling into third-party code from PyPy.

Mutual exclusion --wware, Mon, 21 Aug 2006 13:36:02 +0200

I can see there are mechanisms for intertask communication and that's good. But you still want a mutual exclusion mechanism for when several tasks want access to a single data structure. In Java, each object gets a lock or monitor, and there is a well-designed mechanism where a thread can claim ownership of the object while it performs some multi-step atomic operation. Are there any locks in Stackless these days? Is the recommendation to use threading.Lock()?

Re: Mutual exclusion --rmtew, Tue, 22 Aug 2006 10:30:04 +0200

We have a set of locking primitives we use at CCP, and while there is an old out of date version of our uthread.py in PCBuild, I will ask permission to modify our latest version to replace the older one.

Re: Mutual exclusion --antony500, Mon, 12 Nov 2007 22:19:01 +0100

"Are there any locks in Stackless these days? Is the recommendation to use threading.Lock()?" - wware

Do we need locks when we have atomic execution? It seems to me the concept behind Stackless is simplicity (leading to programmer efficiency and readability of code). I think I can achieve everything I need by using the atomic mechanism. No need for semaphores, no need for explicitly "locking" objects, etc.

format: plain


text:
Firas and Nabil are comparing their bank accounts. “I have four times more money than you” , Firas says. “Anyway, I have only $240 less Question Firas and Nabil are comparing their bank accounts. “I have four times more money than you” , Firas says. “Anyway, I have only$240 less than you” , Nabil answers .
How much money does each one of them have in his account ?
should be solved as a system

in progress 0
4 months 2021-08-12T23:40:39+00:00 1 Answers 1 views 0

Firas = $320 Nabil =$80

Step-by-step explanation:

Firas = 4x

Nabil = x

x + 240 = 4x

3x = 240

x = $80 Firas =$240 + $80 OR$80 x 3 = $320 Nabil =$80

Hope that helps!


text:
## Thursday, April 28, 2016

### Agnostic Estimation of Mean and Covariance

The reason we have a zoo of matrix factorizations stems in part with the need to deal with different adversarial noises. From the paper:

The Achilles heel of algorithms for generative models is the assumption that data is exactly from the model. This is crucial for known guarantees, and relaxations of it are few and specialized, e.g., in ICA, data could by noisy, but the noise itself is assumed to be Gaussian. Assumptions about rank and sparsity are made in a technique that is now called Robust PCA [CSPW11, CLMW11]. There have been attempts [Kwa08, MT+11] at achieving robustness by L1 minimization, but they don’t give any error bounds on the output produced. A natural, important and wide open problem is estimating the parameters of generative models in the presence of arbitrary, i.e., malicious noise, a setting usually referred to as agnostic learning. The simplest version of this problem is to estimate a single Gaussian in the presence of malicious noise. Alternatively, this can be posed as the problem of finding a best-fit Gaussian to data or agnostically learning a single Gaussian.

Agnostic Estimation of Mean and Covariance  by Kevin A. Lai, Anup B. Rao, Santosh Vempala

We consider the problem of estimating the mean and covariance of a distribution from iid samples in $\mathbb{R}^n$, in the presence of an $\eta$ fraction of malicious noise; this is in contrast to much recent work where the noise itself is assumed to be from a distribution of known type. The agnostic problem includes many interesting special cases, e.g., learning the parameters of a single Gaussian (or finding the best-fit Gaussian) when $\eta$ fraction of data is adversarially corrupted, agnostically learning a mixture of Gaussians, agnostic ICA, etc. We present polynomial-time algorithms to estimate the mean and covariance with error guarantees in terms of information-theoretic lower bounds. As a corollary, we also obtain an agnostic algorithm for Singular Value Decomposition.

and previously the Recursive Fourier PCA algorithm

Max vs Min: Tensor Decomposition and ICA with nearly Linear Sample Complexity by Santosh S. Vempala, Ying Xiao

We present a simple, general technique for reducing the sample complexity of matrix and tensor decomposition algorithms applied to distributions. We use the technique to give a polynomial-time algorithm for standard ICA with sample complexity nearly linear in the dimension, thereby improving substantially on previous bounds. The analysis is based on properties of random polynomials, namely the spacings of an ensemble of polynomials. Our technique also applies to other applications of tensor decompositions, including spherical Gaussian mixture models.

Join the CompressiveSensing subreddit or the Google+ Community or the Facebook page and post there !
Liked this entry ? subscribe to Nuit Blanche's feed, there's more where that came from. You can also subscribe to Nuit Blanche by Email, explore the Big Picture in Compressive Sensing or the Matrix Factorization Jungle and join the conversations on compressive sensing, advanced matrix factorization and calibration issues on Linkedin.


text:
## Validity of Reduction Formula

1. The problem statement, all variables and given/known data

If In denotes $$\int_0^∞ \! \frac{1}{(1+x^2)^n} \, \mathrm{d} x$$
Prove that $2nI_{n+1} = (2n-1)I_n$, and state the values of n for which this reduction formula is valid.

2. Relevant equations

3. The attempt at a solution

$$I_n=\int_0^∞ \! \frac{1}{(1+x^2)^n} \, \mathrm{d} x$$
$$=\int_0^∞ \! (1+x^2)^{-n} \, \mathrm{d} x$$
By parts:
$$=\left[ x(1+x^2)^{-n} \right]_0^∞ + 2n\int_0^∞ \! \frac{x^2}{(1+x^2)^{n+1}} \, \mathrm{d} x$$
$$=0 + 2n\int_0^∞ \! \frac{(1+x^2)-1}{(1+x^2)^{n+1}} \, \mathrm{d} x$$
$$=2n\int_0^∞ \! \frac{(1+x^2)}{(1+x^2)^{n+1}} \, \mathrm{d} x - 2n\int_0^∞ \! \frac{1}{(1+x^2)^{n+1}} \, \mathrm{d} x$$
$$=2nI_{n}-2nI_{n+1}$$
$$2nI_{n+1}=(2n-1)I_{n}$$
as required.

It's the next bit where I'm stuck - the range of values for which n is valid. Obviously when part of the integral has been evaluated (following parts), this requires that n>0 otherwise the expression doesn't converge. I can't see anywhere else in the method where there is a restriction for n to be a specific value so I went with n>0 as my answer, but my book says n>1/2, can anyway shed some light on this for me.

Thanks

 PhysOrg.com science news on PhysOrg.com >> 'Whodunnit' of Irish potato famine solved>> The mammoth's lament: Study shows how cosmic impact sparked devastating climate change>> Curiosity Mars rover drills second rock target
 the expression inside the integral is always positive and so does the integral.at n=1/2 the integral does not converge and observe that at n=1/2 ,I(n+1) is zero and for 0
 you should use: $$\frac{1}{(1 + x^2)^n} = \frac{1 + x^2 - x^2}{(1 + x^2)^n} = \frac{1}{(1 + x^2)^{n - 1}} - \frac{x^2}{(1 + x^2)^n}$$ For the integral of the second term, use integration by parts: $$-\int_{0}^{\infty}{x \, \frac{x}{(1 + x^2)^n} \, dx}$$ $$u = x \Rightarrow du = dx$$ $$dv = \frac{x}{(1 + x^2)^n} \, dx \Rightarrow v = \int{ \frac{x}{(1 + x^2)^n} \, dx} \stackrel{t = 1 + x^2}{=} \frac{1}{2} \, \int{t^{-n} \, dt} = \frac{t^{1- n}}{2(1 - n)} = -\frac{1}{2 (n - 1) (1 + x^2)^{n - 1}}$$ Combine everything, identify the relevant integrals with $I_n$, and $I_{n - 1}$, and see what you get.

## Validity of Reduction Formula

Oh, I see you already did the steps. As for the range of validity, answer these questions:

1) What is the value of the integral $\int{t^{-n} \, dt}$ for $n = 1$?

2) When does the integrated out part $\frac{x}{2(n - 1)(1 + x^2)^{n - 1}}$ converge when $x \rightarrow \infty$?

 Quote by Dickfore Oh, I see you already did the steps. As for the range of validity, answer these questions: 1) What is the value of the integral $\int{t^{-n} \, dt}$ for $n = 1$? 2) When does the integrated out part $\frac{x}{2(n - 1)(1 + x^2)^{n - 1}$ converge when $x \rightarrow \infty$?

 Quote by Dickfore Oh, I see you already did the steps. As for the range of validity, answer these questions: 1) What is the value of the integral $\int{t^{-n} \, dt}$ for $n = 1$? 2) When does the integrated out part $\frac{x}{2(n - 1)(1 + x^2)^{n - 1}}$ converge when $x \rightarrow \infty$?
 what is $u v$ in the integration by parts?


text:
# Ubuntu – Remove text that I don’t want

command linetext processing

I have a big html file on my desktop that looks like

src="http://images.alaablubnan.com/images/Balls/20.jpg"
alt="http://images.alaablubnan.com/images/Balls/20.jpg"/>

webpage/url	http://www.playlebanon.com/webservices/website/lotto/PopUps/HistoryDetail.aspx?t=1405536730503&FromDraw=1&ToDraw=1213&Draw=0

	2	complete
lotto results	complete lotto results	2	<a
href="http://www.playlebanon.com/webservices/website/lotto/PopUps/HistoryDetail.

If possible, I want to:

• get all the .jpg files, remove all the html code (it's 1.jpg, 2.jpg… to 42.jpg)
• I want to remove the .jpg extenstion
• I want each row of numbers to have 7 numbers only, then insert new line

• This is not actually a particularly good job for sed but here goes:

sed -nr 's#.*/([^"]+).jpg.*#\1#p' file

The above will get you a list of numbers, one per line:

20
20
32
32
32
30
30
30

Now, it is actually possible to get all these on the same line with 7 numbers per line using sed but it is really not worth the effort. Just use standard *nix tools instead:

$echo$(sed -nr 's#.*/([^"]+).jpg.*#\1#p' file | tr $'\n' ' ') | fold -sw 21 20 20 32 32 32 30 30 30  Or, if you want to remove duplicates: echo$(sed -nr 's#.*/([^"]+).jpg.*#\1#p' file | sort -u | tr $'\n' ' ') 20 30 32  ### Explanation The sed command uses a few tricks: • -n: don't print any lines by default. • -r: enable extended regular expressions, this lets us use ( ) to capture groups without needing to escape the parentheses and + for "one or more". • s#from#to# : while the standard substitution operator in sed and other, similar tools, is s/from/to/, you can a non standard delimiter so that you can include / in the pattern. In this case I am using # but you could use something else like s|from|to| as well. • s#.*/([^"]+).jpg.*#\1#p : this will match everything from the beginning of the line until a / and then captures the longest stretch of non-" characters until .jpg. This is the filename minus extension. The filename is captured in the parenthesis and the whole line (because of the .* on either side) will be replaced with the captured patter (\1). The p at the end means that it will print the lines where the substitution was successful. Personally though, I would have done all of this with perl in the first place: $ perl -e '@k=grep(s/.*\/([^"]+).jpg.*/$1/s,<>); print "@k[0..6]\n@k[7..$#k]\n"' file
20 20 32 32 32 30 30
30

Or, for a larger file:

$perl -e '@k=grep(s/.*\/([^"]+).jpg.*/$1/s,<>); for($i=0;$i<=$#k;$i+=7){print "@k[$i..$i+7]\n"}' file
20 20 32 32 32 30 30 30
30

Or grep even:

$echo$(grep -oP '[^/]+(?=.jpg)' file | tr $'\n' ' ' ) | fold -w 21 20 20 32 32 32 30 30 30  Or, stealing @Olli's clever xargs idea: $ grep -oP '[^/]+(?=.jpg)' file |  xargs -n7 echo
20 20 32 32 32 30 30
30


text:
# If (3!)^2 - (2!)^1 - (1!)^0 - 3! - 2! - 1! - 0! = 7 + x^2 then x^2 - 3x/2 - 4 = ?

90 views

If
(3!)^2 - (2!)^1 - (1!)^0 - 3! - 2! - 1! - 0! = 7 + x^2
then
x^2 - 3x/2 - 4 = ?

posted Feb 22, 2017

6 or 18 Explanation as under
36-2-1-6-2-1-1=7+x^2 or x^2=16 leaving x to be +/- 4
for x^2- 1.5x-4 with x=4 the answer is 16-6-4=6
with x=-4 the answer is 16+6-4=18

Either 6 or -14, since x=±4

answer Mar 25, 2017 by anonymous

Similar Puzzles


text: We investigate relations between the ranks of marginals of multipartite quantum states. These are the Schmidt ranks across all possible bipartitions and constitute a natural quantification of multipartite entanglement dimensionality. We show that there exist inequalities constraining the possible distribution of ranks. This is analogous to the case of von Neumann entropy (\alpha-R\'enyi entropy for \alpha=1), where nontrivial inequalities constraining the distribution of entropies (such as e.g. strong subadditivity) are known. It was also recently discovered that all other \alpha-R\'enyi entropies for $\alpha\in(0,1)\cup(1,\infty)$ satisfy only one trivial linear inequality (non-negativity) and the distribution of entropies for $\alpha\in(0,1)$ is completely unconstrained beyond non-negativity. Our result resolves an important open question by showing that also the case of \alpha=0 (logarithm of the rank) is restricted by nontrivial linear relations and thus the cases of von Neumann entropy (i.e., \alpha=1) and 0-R\'enyi entropy are exceptionally interesting measures of entanglement in the multipartite setting.


text:
# Slip Test on Synchronous Machine

Electronics & ElectricalElectronDigital Electronics

The slip test is a simple no-load test, which is used to determine the direct-axis and quadrature-axis synchronous reactances of a salient-pole synchronous machine. In this test, a small voltage at rated frequency is applied to the 3-phase stator winding of the synchronous machine. The field winding is unexcited and left open circuited.

## Circuit Arrangement for Slip Test

The circuit arrangement for slip test is shown in Figure-1.

The rotor is driven by an auxiliary motor at a speed slightly less than or more than the synchronous speed. The direction of rotation should be same as that of the rotating magnetic field produced by the stator.

A small voltage reading indicated by the voltmeter connected across the open circuited field winding terminals shows that the direction of the rotation of the rotor is proper.

The rotor is running at a speed ($𝑁_{𝑅}$) close to the synchronous speed ($𝑁_{𝑆}$) and there will be a small slip between the rotating magnetic field produced by the armature and the actual salient-field poles. Thus, the relative speed between the armature MMF and the salient field poles is equal to the slip speed ($𝑁_{𝑆}$ − $𝑁_{𝑅}$).

Since the armature MMF moves slowly past the actual field poles, hence there will be an instant when the peak of the armature MMF wave is in line with the axis of the actual salient field poles as shown in Figure-2.

The axis of the field poles is direct axis or d-axis. In this position, the reluctance offered by the small air gap is minimum and this results in a minimum magnetising current 𝐼𝑚𝑖𝑛 indicated by the line ammeter A.

In this position, the armature flux linkage with the field winding is maximum and the rate of change of this flux linkage is zero. Hence, the voltage induced in the field winding is zero. Therefore, the d-axis can be located on the oscillogram as shown in Figure-4.

From this figure, the direct axis synchronous reluctance is given by,

$$\mathrm{𝑋_{𝑑} =\frac{𝑎𝑏}{𝑐𝑑}}$$

After one-quarter of slip cycle the peak armature wave is in line with the quadrature axis. In this position, the reluctance offered by the larger air gap is maximum as shown in Figure-3.

Due to the high reluctance, a large magnetising current is required to produce the same air gap flux. This maximum current (𝐼𝑚𝑎𝑥) is also measured from the line ammeter A. In this position, the armature flux linkage with the field winding is also zero and the rate of change of this flux linkage is maximum. As a result, the induced voltage across the field winding is maximum. Therefore, the q-axis can also be located on the oscillogram of Figure-4. From this figure, the quadrature axis synchronous reactance is given by,

$$\mathrm{𝑋_{𝑞} =\frac{{𝑎^{′}}{𝑏^{′}}}{𝑐^{′}𝑑^{′}}}$$

Published on 14-Oct-2021 11:33:41


text:
# Smooth submanifolds defined by Subrings

To be honest, I don't really know, whether or not the following is a research level question:

Let $M$ be a smooth manifold, $C^\infty(M)$ the smooth function ring on $M$ and suppose $R\subset C^\infty(M)$ is a subring. What are conditions, such that $R$ is the smooth function ring of a smooth manifold ?

On a first impression I would say, that this is a huge question and an exhaustive answer is unlikely. Nevertheless I don't really know where to start looking for something like that...

-
Have you looked at Gillman/Jerrison's book "Rings of Continuous Functions"? Maybe they shed a little light on your situation. –  LMN Dec 15 '12 at 0:43
just a small remark: subrings would rather correspond to quotient manifolds than to submanifolds. –  Michael Bächtold Dec 15 '12 at 10:20
yeah right. I should have just written manifolds defined by subrings... –  Nevermind Dec 17 '12 at 0:58

You have to be careful: let $Y\subset V$ be a submanifold of $V$, you have a restriction map $$C^{\infty}(V)\rightarrow C^{\infty}(Y)$$ whose kernel is an ideal $p_Y$, and if $Y$ is a closed submanifold: $$C^{\infty}(Y)\cong C^{\infty}(V)/p_Y$$

Thus the question is rather what ideals of $C^{\infty}(V)$ are of the form $p_Y$ for $Y$ a submanifold of $V$.

1) if $Z$ is any subset of $V$ it makes sense to define the ideal $p_Z$ of functions of $C^{\infty}(V)$ that vanish on $Z$. And one can prove that a closed subset $Z$ of $V$ is a submanifold if and only if $p_Z$ is regular.

Now the question is what are the ideals of $C^{\infty}(V)$ of type $p_Z$ with $Z$ closed.

2) you consider $C^{\infty}(V)$ as a Fréchet space and notice that $p_Z$ is a closed ideal.

Hence the question is what are the closed ideals of $C^{\infty}(V)$ of type $p_Z$ with $Z$ closed?
Let me give you an answer when $V=\mathbb{R}^n$.

Let $I$ be a closed ideal of $C^{\infty}(\mathbb{R}^n)$ the quotient $C^{\infty}(\mathbb R^n)/I$ is called a differentiable algebra. $I$ is of the form $p_Z$ if this quotient algebra is reduced ($O$ is the unique element vanishing at any point of the real spectrum $Spec_r(C^{\infty}(\mathbb{R}^n)/I)$).

Reference: $C^{\infty}$-Differentiable spaces (LNM) Juan A. Navarro González, Juan B. Sancho de Salas

Edit: @Nevermind, if you have a smooth surjective map $\pi:V\rightarrow Y$, then you will have a ring map $\pi^*:C^{\infty}(Y)\rightarrow C^{\infty}(V)$ and this map is injective.
Now I recommand you to look at Dominic Joyce's survey "Algebraic Geometry over $C^{\infty}$-rings" Corollary 3.4 He explains that the category of smooth manifolds embeds (fully, faithfully) as a subcategory of the category of finitely presented $C^{\infty}$-rings. Thus if you have a sub-$C^{\infty}$-ring $$R\rightarrow C^{\infty}(V)$$ this morphism of $C^{\infty}$-ring will be realizable by a smooth map $$V\rightarrow \mathfrak{R}$$ such that $C^{\infty}(\mathfrak{R})=R$ if and only if $R$ is an algebra of smooth functions and the way to recognize these algebras is exactly P. Michor's theorem in the note cited in your post. You notice that condition 1) of this theorem is satisfied for any subring of $C^{\infty}(V)$. Thus you are left with two criteria: "finitely generated" and "germ determined". Germ dertermined (related to condition 3) in Michor's theorem) is related to "fair $C^{\infty}$-rings" in D. Joyce's papers and related to reduced in the book on differentiable spaces cited above.

-
Thanks David. I'll think about it –  Nevermind Dec 15 '12 at 19:11
You're welcome. Moerdijk-Reyes's book is also a very good reference, Dominic Joyce has written a vey nice survey paper (available on arXiv) on $C^{\infty}$-schemes (how you can think of differentiable manifolds from the point of view algebraic geometry). –  David C Dec 15 '12 at 19:30
Why are you considering quotient rings and not subrings? –  Will Sawin Dec 15 '12 at 19:41
@ Will. Because in the case of a closed submanifold $Y$ of $M$, $C^{\infty}(Y)$ is a quotient ring of $C^{\infty}(M)$ and not a subring. Maybe I have misunderstood your comment. I don't know if there is a nice geometric interpretation of subrings of $C^{infty}(M)$ and I will be very happy to learn about it. –  David C Dec 15 '12 at 21:22
For example, I think it is valid to say that the subring of constant functions (i.e. multiples of $1_{C∞(M)}$) is the function ring of the point? It arise as a pullback by the terminal morphism. –  Nevermind Dec 17 '12 at 1:15

Seems like I found something useful by myself:

In case someone else is interested, here a short article of Peter Michor on that topic

Michor

-


text:
# Creating a MeshRegion object from a Graphics object

I am looking to convert a simple Graphics object that is defined by overlapping polygons into a MeshRegion object.

For example, here is code that will create three overlapping triangles

Table[Polygon@Map[{Cos[#], Sin[#]} &,
{RandomReal[{0, 2 Pi/3}],
RandomReal[{2 Pi/3, 4 Pi/3}],
RandomReal[{4 Pi/3, 2 Pi}]}], 3]
Graphics[{EdgeForm[Black], White, %}]

For the instance

{Polygon[{{-0.334165, 0.942514}, {-0.67166, 0.740859}, {-0.455064, -0.890459}}],
Polygon[{{0.274586, 0.961563}, {-0.99882, -0.0485668}, {-0.454045, -0.890979}}],
Polygon[{{0.832368, 0.554224}, {-0.977216, -0.212246}, {0.451922, -0.892057}}]}

we get the picture

I would like to convert this to a simple 1D MeshRegion Object with vertices at each intersection of two edges and line segments between them, but I am at a loss for how to do it efficiently.

For a small figure with three triangles, it is possible to do manually by finding the intersection points and the incidences, but when a Graphics object has dozens of polygons with many sides (possibly approximating circles), an automated function would be desirable!

One thing that I have tried and it has worked in a minimal yet extremely complicated manner was to convert each polygon to a 2D BoundaryMeshRegion object and use RegionDifference commands. I've tried other things like ImageMesh which has only given me more mess, but I feel there must be a simpler way, or at least a reason why there is no simple way.

After defining the variable triangles to be this set of three triangles, I turned each of the triangles into a BoundaryMeshRegion.

Table[triregion[i] = BoundaryDiscretizeGraphics[Graphics[triangles[[i]]]],
{i, 1, Length[triangles]}]

I then defined the order of the layers: The third triangle is above the second triangle is above the first triangle:

layerorder = {3, 2, 1}

Then I calculated which of the layers intersect which of the other layers. Here we see that layer 3 intersects layer 2, layer 3 intersects layer 1, and layer 2 intersects layer 1.

intersections = Flatten[
Table[If[Length[
RegionIntersection[
triregion[layerorder[[i]]],
triregion[layerorder[[j]]]]
] == 0, {layerorder[[i]], layerorder[[j]]}, Nothing],
{i, 1, 3}, {j, i + 1, 3}], 1]

Out: {{3, 2}, {3, 1}, {2, 1}}

Now define new MeshRegions that are the original MeshRegion subtracting out each intersecting MeshRegion using RegionDifference

Table[newregion[i] = triregion[i], {i, 20}];
Map[(newregion[#[[2]]] = RegionDifference[newregion[#[[2]]], triregion[#[[1]]]]) &,
intersections];

Here is the result.

To get the 1D frame I use MeshPrimitives

boundaries = Map[MeshPrimitives[#, 1] &, {newregion[1], newregion[2], newregion[3]}];
Show[Graphics /@ boundaries]

But now certain line segments are traversed by two different edges with different vertices, which is not what I need. I'm just hoping to have the 1D wireframe defined as a MeshRegion Object.

• It might help if you can give an example of your code using RegionDifference? – Dunlop Jun 9 '17 at 4:22
• Thanks @Dunlop, I have tried to add additional information. – Christopher Hanusa Jun 9 '17 at 20:54

I think you can use RegionDifference by working with both the 1D and 2D representations of your polygons. Here is your example data:

d1 = {{-0.334165,0.942514},{-0.67166,0.740859},{-0.455064,-0.890459}};
d2 = {{0.274586,0.961563},{-0.99882,-0.0485668},{-0.454045,-0.890979}};
d3 = {{0.832368,0.554224},{-0.977216,-0.212246},{0.451922,-0.892057}};

Here are the 1D representations:

t1 = Line[Append[d1, First@d1]];
t2 = Line[Append[d2, First@d2]];
t3 = Line[Append[d3, First@d3]];

Here are the 2D representations:

p1 = Polygon[d1];
p2 = Polygon[d2];
p3 = Polygon[d3];

Now, the top triangle is t3:

r1 = t3;

The next triangle is t2, but we only want the part of t2 that is disjoint from p3:

r2 = RegionDifference[t2, p3];

Finally, the last triangle is t1, and we only want the part of t1 that is disjoint from p2 and p3:

r3 = RegionDifference[t1, RegionUnion[p2, p3]];

Finally, we want to create a mesh that is the union of r1, r2 and r3:

DiscretizeRegion @ RegionUnion[r1, r2, r3]

Update

In Mathematica 12, RegionUnion[r1, r2, r3] directly produces the desired output:

RegionUnion[r1, r2, r3]

• This is very much along the lines of what I wanted. I have been working to modify your code in order to simplify the polygons so that the number of vertices is minimal, but so far I have not succeeded. It looks like one thing that makes a big difference is using BoundaryDiscretizeGraphics instead of BoundaryDiscretizeRegion. – Christopher Hanusa Jun 13 '17 at 11:35
Region@RegionUnion[
Polygon[{{-0.334165, 0.942514}, {-0.67166, 0.740859}, {-0.455064, -0.890459}}],
Polygon[{{0.274586, 0.961563}, {-0.99882, -0.0485668}, {-0.454045, 0.890979}}],
Polygon[{{0.832368, 0.554224}, {-0.977216, -0.212246}, {0.451922, -0.892057}}]
]

• I am looking for a 1D MeshRegion Object instead of a 2D MeshRegion Object. See my edit. – Christopher Hanusa Jun 9 '17 at 20:53

Try the following code:

In[1]:= pols=Table[Polygon@Map[{Cos[#], Sin[#]} &, {RandomReal[{0, 2 Pi/3}],
RandomReal[{2 Pi/3, 4 Pi/3}], RandomReal[{4 Pi/3, 2 Pi}]}], 3];
In[2]:= Graphics[{EdgeForm[Black], White, pols}];
In[3]:= DiscretizeGraphics@%;
In[4]:= Graphics@MeshPrimitives[%, 1];
In[5]:= reg=DiscretizeGraphics@%

Is the last output what you are looking for? You can check the region dimension:

In[6]:= RegionDimension@reg
Out[16]= 1


text:
# Chapter 2 Normalization

## 2.1 Motivation

Systematic differences in sequencing coverage between libraries are often observed in single-cell RNA sequencing data (Stegle, Teichmann, and Marioni 2015). They typically arise from technical differences in cDNA capture or PCR amplification efficiency across cells, attributable to the difficulty of achieving consistent library preparation with minimal starting material. Normalization aims to remove these differences such that they do not interfere with comparisons of the expression profiles between cells. This ensures that any observed heterogeneity or differential expression within the cell population are driven by biology and not technical biases.

We will mostly focus our attention on scaling normalization, which is the simplest and most commonly used class of normalization strategies. This involves dividing all counts for each cell by a cell-specific scaling factor, often called a “size factor” (Anders and Huber 2010). The assumption here is that any cell-specific bias (e.g., in capture or amplification efficiency) affects all genes equally via scaling of the expected mean count for that cell. The size factor for each cell represents the estimate of the relative bias in that cell, so division of its counts by its size factor should remove that bias. The resulting “normalized expression values” can then be used for downstream analyses such as clustering and dimensionality reduction. To demonstrate, we will use the Zeisel et al. (2015) dataset from the scRNAseq package.

#--- loading ---#
library(scRNAseq)
sce.zeisel <- ZeiselBrainData()

library(scater)
sce.zeisel <- aggregateAcrossFeatures(sce.zeisel,
id=sub("_loc[0-9]+$", "", rownames(sce.zeisel))) #--- gene-annotation ---# library(org.Mm.eg.db) rowData(sce.zeisel)$Ensembl <- mapIds(org.Mm.eg.db,
keys=rownames(sce.zeisel), keytype="SYMBOL", column="ENSEMBL")

#--- quality-control ---#
stats <- perCellQCMetrics(sce.zeisel, subsets=list(
Mt=rowData(sce.zeisel)$featureType=="mito")) qc <- quickPerCellQC(stats, percent_subsets=c("altexps_ERCC_percent", "subsets_Mt_percent")) sce.zeisel <- sce.zeisel[,!qc$discard]
sce.zeisel
## class: SingleCellExperiment
## dim: 19839 2816
## assays(1): counts
## rownames(19839): 0610005C13Rik 0610007N19Rik ... mt-Tw mt-Ty
## rowData names(2): featureType Ensembl
## colnames(2816): 1772071015_C02 1772071017_G12 ... 1772063068_D01
##   1772066098_A12
## colData names(10): tissue group # ... level1class level2class
## reducedDimNames(0):
## mainExpName: endogenous
## altExpNames(2): ERCC repeat

## 2.2 Library size normalization

Library size normalization is the simplest strategy for performing scaling normalization. We define the library size as the total sum of counts across all genes for each cell, the expected value of which is assumed to scale with any cell-specific biases. The “library size factor” for each cell is then directly proportional to its library size where the proportionality constant is defined such that the mean size factor across all cells is equal to 1. This definition ensures that the normalized expression values are on the same scale as the original counts, which is useful for interpretation - especially when dealing with transformed data (see Section 2.5).

library(scater)
lib.sf.zeisel <- librarySizeFactors(sce.zeisel)
summary(lib.sf.zeisel)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
##   0.176   0.568   0.868   1.000   1.278   4.084

In the Zeisel brain data, the library size factors differ by up to 10-fold across cells (Figure 2.1). This is typical of the variability in coverage in scRNA-seq data.

hist(log10(lib.sf.zeisel), xlab="Log10[Size factor]", col='grey80')

Strictly speaking, the use of library size factors assumes that there is no “imbalance” in the differentially expressed (DE) genes between any pair of cells. That is, any upregulation for a subset of genes is cancelled out by the same magnitude of downregulation in a different subset of genes. This ensures that the library size is an unbiased estimate of the relative cell-specific bias by avoiding composition effects (Robinson and Oshlack 2010). However, balanced DE is not generally present in scRNA-seq applications, which means that library size normalization may not yield accurate normalized expression values for downstream analyses.

In practice, normalization accuracy is not a major consideration for exploratory scRNA-seq data analyses. Composition biases do not usually affect the separation of clusters, only the magnitude - and to a lesser extent, direction - of the log-fold changes between clusters or cell types. As such, library size normalization is usually sufficient in many applications where the aim is to identify clusters and the top markers that define each cluster.

## 2.3 Normalization by deconvolution

As previously mentioned, composition biases will be present when any unbalanced differential expression exists between samples. Consider the simple example of two cells where a single gene $$X$$ is upregulated in one cell $$A$$ compared to the other cell $$B$$. This upregulation means that either (i) more sequencing resources are devoted to $$X$$ in $$A$$, thus decreasing coverage of all other non-DE genes when the total library size of each cell is experimentally fixed (e.g., due to library quantification); or (ii) the library size of $$A$$ increases when $$X$$ is assigned more reads or UMIs, increasing the library size factor and yielding smaller normalized expression values for all non-DE genes. In both cases, the net effect is that non-DE genes in $$A$$ will incorrectly appear to be downregulated compared to $$B$$.

The removal of composition biases is a well-studied problem for bulk RNA sequencing data analysis. Normalization can be performed with the estimateSizeFactorsFromMatrix() function in the DESeq2 package (Anders and Huber 2010; Love, Huber, and Anders 2014) or with the calcNormFactors() function (Robinson and Oshlack 2010) in the edgeR package. These assume that most genes are not DE between cells. Any systematic difference in count size across the non-DE majority of genes between two cells is assumed to represent bias that is used to compute an appropriate size factor for its removal.

However, single-cell data can be problematic for these bulk normalization methods due to the dominance of low and zero counts. To overcome this, we pool counts from many cells to increase the size of the counts for accurate size factor estimation (Lun, Bach, and Marioni 2016). Pool-based size factors are then “deconvolved” into cell-based factors for normalization of each cell’s expression profile. This is performed using the calculateSumFactors() function from scran, as shown below.

library(scran)
set.seed(100)
clust.zeisel <- quickCluster(sce.zeisel)
table(clust.zeisel)
## clust.zeisel
##   1   2   3   4   5   6   7   8   9  10  11  12  13  14
## 170 254 441 178 393 148 219 240 189 123 112 103 135 111
deconv.sf.zeisel <- calculateSumFactors(sce.zeisel, cluster=clust.zeisel)
summary(deconv.sf.zeisel)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
##   0.119   0.486   0.831   1.000   1.321   4.509

We use a pre-clustering step with quickCluster() where cells in each cluster are normalized separately and the size factors are rescaled to be comparable across clusters. This avoids the assumption that most genes are non-DE across the entire population - only a non-DE majority is required between pairs of clusters, which is a weaker assumption for highly heterogeneous populations. By default, quickCluster() will use an approximate algorithm for PCA based on methods from the irlba package. The approximation relies on stochastic initialization so we need to set the random seed (via set.seed()) for reproducibility.

We see that the deconvolution size factors exhibit cell type-specific deviations from the library size factors in Figure 2.2. This is consistent with the presence of composition biases that are introduced by strong differential expression between cell types. Use of the deconvolution size factors adjusts for these biases to improve normalization accuracy for downstream applications.

plot(lib.sf.zeisel, deconv.sf.zeisel, xlab="Library size factor",
ylab="Deconvolution size factor", log='xy', pch=16,
col=as.integer(factor(sce.zeisel$level1class))) abline(a=0, b=1, col="red") Accurate normalization is most important for procedures that involve estimation and interpretation of per-gene statistics. For example, composition biases can compromise DE analyses by systematically shifting the log-fold changes in one direction or another. However, it tends to provide less benefit over simple library size normalization for cell-based analyses such as clustering. The presence of composition biases already implies strong differences in expression profiles, so changing the normalization strategy is unlikely to affect the outcome of a clustering procedure. ## 2.4 Normalization by spike-ins Spike-in normalization is based on the assumption that the same amount of spike-in RNA was added to each cell (Lun et al. 2017). Systematic differences in the coverage of the spike-in transcripts can only be due to cell-specific biases, e.g., in capture efficiency or sequencing depth. To remove these biases, we equalize spike-in coverage across cells by scaling with “spike-in size factors”. Compared to the previous methods, spike-in normalization requires no assumption about the biology of the system (i.e., the absence of many DE genes). Instead, it assumes that the spike-in transcripts were (i) added at a constant level to each cell, and (ii) respond to biases in the same relative manner as endogenous genes. Practically, spike-in normalization should be used if differences in the total RNA content of individual cells are of interest and must be preserved in downstream analyses. For a given cell, an increase in its overall amount of endogenous RNA will not increase its spike-in size factor. This ensures that the effects of total RNA content on expression across the population will not be removed upon scaling. By comparison, the other normalization methods described above will simply interpret any change in total RNA content as part of the bias and remove it. We demonstrate the use of spike-in normalization on a different dataset involving T cell activation after stimulation with T cell recepter ligands of varying affinity (Richard et al. 2018). library(scRNAseq) sce.richard <- RichardTCellData() sce.richard <- sce.richard[,sce.richard$single cell quality=="OK"]
sce.richard
## class: SingleCellExperiment
## dim: 46603 528
## assays(1): counts
## rownames(46603): ENSMUSG00000102693 ENSMUSG00000064842 ...
##   ENSMUSG00000096730 ENSMUSG00000095742
## rowData names(0):
## colnames(528): SLX-12611.N701_S502. SLX-12611.N702_S502. ...
##   SLX-12612.i712_i522. SLX-12612.i714_i522.
## colData names(13): age individual ... stimulus time
## reducedDimNames(0):
## mainExpName: endogenous
## altExpNames(1): ERCC

We apply the computeSpikeFactors() method to estimate spike-in size factors for all cells. This is defined by converting the total spike-in count per cell into a size factor, using the same reasoning as in librarySizeFactors(). Scaling will subsequently remove any differences in spike-in coverage across cells.

sce.richard <- computeSpikeFactors(sce.richard, "ERCC")
summary(sizeFactors(sce.richard))
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
##   0.125   0.428   0.627   1.000   1.070  23.316

We observe a positive correlation between the spike-in size factors and deconvolution size factors within each treatment condition (Figure 2.3), indicating that they are capturing similar technical biases in sequencing depth and capture efficiency. However, we also observe that increasing stimulation of the T cell receptor - in terms of increasing affinity or time - results in a decrease in the spike-in factors relative to the library size factors. This is consistent with an increase in biosynthetic activity and total RNA content during stimulation, which reduces the relative spike-in coverage in each library (thereby decreasing the spike-in size factors) but increases the coverage of endogenous genes (thus increasing the library size factors).

to.plot <- data.frame(
DeconvFactor=calculateSumFactors(sce.richard),
SpikeFactor=sizeFactors(sce.richard),
Stimulus=sce.richard$stimulus, Time=sce.richard$time
)

ggplot(to.plot, aes(x=DeconvFactor, y=SpikeFactor, color=Time)) +
geom_point() + facet_wrap(~Stimulus) + scale_x_log10() +
scale_y_log10() + geom_abline(intercept=0, slope=1, color="red")

The differences between these two sets of size factors have real consequences for downstream interpretation. If the spike-in size factors were applied to the counts, the expression values in unstimulated cells would be scaled up while expression in stimulated cells would be scaled down. However, the opposite would occur if the deconvolution size factors were used. This can manifest as shifts in the magnitude and direction of DE between conditions when we switch between normalization strategies, as shown below for Malat1 (Figure 2.4).

# See below for explanation of logNormCounts().
sce.richard.deconv <- logNormCounts(sce.richard, size_factors=to.plot$DeconvFactor) sce.richard.spike <- logNormCounts(sce.richard, size_factors=to.plot$SpikeFactor)

gridExtra::grid.arrange(
plotExpression(sce.richard.deconv, x="stimulus",
colour_by="time", features="ENSMUSG00000092341") +
theme(axis.text.x = element_text(angle = 90)) +
ggtitle("After deconvolution"),
plotExpression(sce.richard.spike, x="stimulus",
colour_by="time", features="ENSMUSG00000092341") +
theme(axis.text.x = element_text(angle = 90)) +
ggtitle("After spike-in normalization"),
ncol=2
)

Whether or not total RNA content is relevant – and thus, the choice of normalization strategy – depends on the biological hypothesis. In most cases, changes in total RNA content are not interesting and can be normalized out by applying the library size or deconvolution factors. However, this may not always be appropriate if differences in total RNA are associated with a biological process of interest, e.g., cell cycle activity or T cell activation. Spike-in normalization will preserve these differences such that any changes in expression between biological groups have the correct sign.

However! Regardless of whether we care about total RNA content, it is critical that the spike-in transcripts are normalized using the spike-in size factors. Size factors computed from the counts for endogenous genes should not be applied to the spike-in transcripts, precisely because the former captures differences in total RNA content that are not experienced by the latter. Attempting to normalize the spike-in counts with the gene-based size factors will lead to over-normalization and incorrect quantification. Thus, if normalized spike-in data is required, we must compute a separate set of size factors for the spike-in transcripts; this is automatically performed by functions such as modelGeneVarWithSpikes().

## 2.5 Scaling and log-transforming

Once we have computed the size factors, we use the logNormCounts() function from scater to compute normalized expression values for each cell. This is done by dividing the count for each gene/spike-in transcript with the appropriate size factor for that cell. The function also log-transforms the normalized values, creating a new assay called "logcounts". (Technically, these are “log-transformed normalized expression values”, but that’s too much of a mouthful to fit into the assay name.) These log-values will be the basis of our downstream analyses in the following chapters.

set.seed(100)
clust.zeisel <- quickCluster(sce.zeisel)
sce.zeisel <- computeSumFactors(sce.zeisel, cluster=clust.zeisel, min.mean=0.1)
sce.zeisel <- logNormCounts(sce.zeisel)
assayNames(sce.zeisel)
## [1] "counts"    "logcounts"

The log-transformation is useful as differences in the log-values represent log-fold changes in expression. This is important in downstream procedures based on Euclidean distances, which includes many forms of clustering and dimensionality reduction. By operating on log-transformed data, we ensure that these procedures are measuring distances between cells based on log-fold changes in expression. Or in other words, which is more interesting - a gene that is expressed at an average count of 50 in cell type $$A$$ and 10 in cell type $$B$$, or a gene that is expressed at an average count of 1100 in $$A$$ and 1000 in $$B$$? Log-transformation focuses on the former by promoting contributions from genes with strong relative differences.

## Session Info

R Under development (unstable) (2021-11-10 r81171)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.3 LTS

Matrix products: default
BLAS:   /home/biocbuild/bbs-3.15-bioc/R/lib/libRblas.so
LAPACK: /home/biocbuild/bbs-3.15-bioc/R/lib/libRlapack.so

locale:
[1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
[3] LC_TIME=en_GB              LC_COLLATE=C
[5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8       LC_NAME=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats4    stats     graphics  grDevices utils     datasets  methods
[8] base

other attached packages:
[1] ensembldb_2.19.2            AnnotationFilter_1.19.0
[3] GenomicFeatures_1.47.2      AnnotationDbi_1.57.1
[5] scRNAseq_2.9.1              scran_1.23.0
[7] scater_1.23.1               ggplot2_3.3.5
[9] scuttle_1.5.0               SingleCellExperiment_1.17.1
[11] SummarizedExperiment_1.25.2 Biobase_2.55.0
[13] GenomicRanges_1.47.3        GenomeInfoDb_1.31.1
[15] IRanges_2.29.0              S4Vectors_0.33.2
[17] BiocGenerics_0.41.1         MatrixGenerics_1.7.0
[19] matrixStats_0.61.0          BiocStyle_2.23.0
[21] rebook_1.5.0

loaded via a namespace (and not attached):
[1] AnnotationHub_3.3.3           BiocFileCache_2.3.0
[3] igraph_1.2.8                  lazyeval_0.2.2
[5] BiocParallel_1.29.1           digest_0.6.28
[7] htmltools_0.5.2               viridis_0.6.2
[9] fansi_0.5.0                   magrittr_2.0.1
[11] memoise_2.0.0                 ScaledMatrix_1.3.0
[13] cluster_2.1.2                 limma_3.51.0
[15] Biostrings_2.63.0             prettyunits_1.1.1
[17] colorspace_2.0-2              blob_1.2.2
[19] rappdirs_0.3.3                ggrepel_0.9.1
[21] xfun_0.28                     dplyr_1.0.7
[23] crayon_1.4.2                  RCurl_1.98-1.5
[25] jsonlite_1.7.2                graph_1.73.0
[27] glue_1.5.0                    gtable_0.3.0
[29] zlibbioc_1.41.0               XVector_0.35.0
[31] DelayedArray_0.21.1           BiocSingular_1.11.0
[33] scales_1.1.1                  DBI_1.1.1
[35] edgeR_3.37.0                  Rcpp_1.0.7
[37] viridisLite_0.4.0             xtable_1.8-4
[39] progress_1.2.2                dqrng_0.3.0
[41] bit_4.0.4                     rsvd_1.0.5
[43] metapod_1.3.0                 httr_1.4.2
[45] dir.expiry_1.3.0              ellipsis_0.3.2
[47] farver_2.1.0                  pkgconfig_2.0.3
[49] XML_3.99-0.8                  CodeDepends_0.6.5
[51] sass_0.4.0                    dbplyr_2.1.1
[53] locfit_1.5-9.4                utf8_1.2.2
[55] labeling_0.4.2                tidyselect_1.1.1
[57] rlang_0.4.12                  later_1.3.0
[59] munsell_0.5.0                 BiocVersion_3.15.0
[61] tools_4.2.0                   cachem_1.0.6
[63] generics_0.1.1                RSQLite_2.2.8
[65] ExperimentHub_2.3.1           evaluate_0.14
[67] stringr_1.4.0                 fastmap_1.1.0
[69] yaml_2.2.1                    knitr_1.36
[71] bit64_4.0.5                   purrr_0.3.4
[73] KEGGREST_1.35.0               sparseMatrixStats_1.7.0
[75] mime_0.12                     xml2_1.3.2
[77] biomaRt_2.51.0                compiler_4.2.0
[79] beeswarm_0.4.0                filelock_1.0.2
[81] curl_4.3.2                    png_0.1-7
[83] interactiveDisplayBase_1.33.0 tibble_3.1.6
[85] statmod_1.4.36                bslib_0.3.1
[87] stringi_1.7.5                 highr_0.9
[89] lattice_0.20-45               bluster_1.5.0
[91] ProtGenerics_1.27.0           Matrix_1.3-4
[93] vctrs_0.3.8                   pillar_1.6.4
[95] lifecycle_1.0.1               BiocManager_1.30.16
[97] jquerylib_0.1.4               BiocNeighbors_1.13.0
[99] cowplot_1.1.1                 bitops_1.0-7
[101] irlba_2.3.3                   httpuv_1.6.3
[103] rtracklayer_1.55.0            R6_2.5.1
[105] BiocIO_1.5.0                  bookdown_0.24
[107] promises_1.2.0.1              gridExtra_2.3
[109] vipor_0.4.5                   codetools_0.2-18
[111] assertthat_0.2.1              rjson_0.2.20
[113] withr_2.4.2                   GenomicAlignments_1.31.2
[115] Rsamtools_2.11.0              GenomeInfoDbData_1.2.7
[117] parallel_4.2.0                hms_1.1.1
[119] grid_4.2.0                    beachmat_2.11.0
[121] rmarkdown_2.11                DelayedMatrixStats_1.17.0
[123] shiny_1.7.1                   ggbeeswarm_0.6.0
[125] restfulr_0.0.13

### References

Anders, S., and W. Huber. 2010. “Differential expression analysis for sequence count data.” Genome Biol. 11 (10): R106.

Love, M. I., W. Huber, and S. Anders. 2014. “Moderated estimation of fold change and dispersion for RNA-seq data with DESeq2.” Genome Biol. 15 (12): 550.

Lun, A. T., K. Bach, and J. C. Marioni. 2016. “Pooling across cells to normalize single-cell RNA sequencing data with many zero counts.” Genome Biol. 17 (April): 75.

Lun, A. T. L., F. J. Calero-Nieto, L. Haim-Vilmovsky, B. Gottgens, and J. C. Marioni. 2017. “Assessing the reliability of spike-in normalization for analyses of single-cell RNA sequencing data.” Genome Res. 27 (11): 1795–1806.

Richard, A. C., A. T. L. Lun, W. W. Y. Lau, B. Gottgens, J. C. Marioni, and G. M. Griffiths. 2018. “T cell cytolytic capacity is independent of initial stimulation strength.” Nat. Immunol. 19 (8): 849–58.

Robinson, M. D., and A. Oshlack. 2010. “A scaling normalization method for differential expression analysis of RNA-seq data.” Genome Biol. 11 (3): R25.

Stegle, O., S. A. Teichmann, and J. C. Marioni. 2015. “Computational and analytical challenges in single-cell transcriptomics.” Nat. Rev. Genet. 16 (3): 133–45.

Zeisel, A., A. B. Munoz-Manchado, S. Codeluppi, P. Lonnerberg, G. La Manno, A. Jureus, S. Marques, et al. 2015. “Brain structure. Cell types in the mouse cortex and hippocampus revealed by single-cell RNA-seq.” Science 347 (6226): 1138–42.


text:
# <material> - Material Phases¶

## Single Material¶

MicroStructPy supports an arbitrary number of materials, including just one. For example:

<?xml version="1.0" encoding="UTF-8"?>
<input>
<material>
<shape> circle </shape>
<size> 0.15 </size>
</material>

<domain>
<shape> square </shape>
</domain>
</input>

This input file will produce a microstructure with nearly circular grains of size 0.15 (within a domain with side length 1).

## Multiple Materials¶

MicroStructPy supports an arbitrary number of materials within a microstructure. For example:

<?xml version="1.0" encoding="UTF-8"?>
<input>
<material>
<shape> circle </shape>
<size> 1 </size>
<fraction> 0.2 </fraction>
</material>

<material>
<shape> circle </shape>
<size> 0.5 </size>
<fraction> 0.3 </fraction>
</material>

<material>
<shape> circle </shape>
<size> 1.5 </size>
<fraction> 0.5 </fraction>
</material>

<domain>
<shape> square </shape>
<side_length> 10 </side_length>
</domain>
</input>

Here there are three phases: the first has grain size 1 and makes up 20% of the area, the second has grain size 0.5 and makes up 30% of the area, and the third has grain size 1.5 and makes up 50% of the area. If the fractions are not specified, MicroStructPy assumes the phases have equal volume fractions. The fractions can also be given as ratios (e.g. 2, 3, and 5) and MicroStructPy will normalize them to fractions.

Volume fractions can also be distributed quantities, rather than fixed values. This is useful if measured volume fractions have some uncertainty. For example:

<?xml version="1.0" encoding="UTF-8"?>
<input>
<material>
<shape> circle </shape>
<size> 1 </size>
<fraction>
<dist_type> norm </dist_type>
<loc> 0.7 </loc>
<scale> 0.03 </scale>
</fraction>
</material>

<material>
<shape> circle </shape>
<size> 0.5 </size>
<fraction>
<dist_type> norm </dist_type>
<loc> 0.3 </loc>
<scale> 0.03 </scale>
</fraction>
</material>
</input>

Here the standard deviation on the volume fractions is 0.03, meaning that volume fractions are accurate to within 6 percentage points at 95% confidence.

Note

If the volume fraction distribution has negative numbers in the support, MicroStructPy will re-sample the distribution until a non-negative volume fraction is sampled.

## Grain Size Distributions¶

Distributed grain sizes, rather than constant sizes, can be specified as follows:

<?xml version="1.0" encoding="UTF-8"?>
<input>
<material>
<shape> circle </shape>
<size>
<dist_type> uniform </dist_type>
<loc> 1 </loc>
<scale> 1 </scale>
</size>
</material>

<material>
<shape> circle </shape>
<size>
<dist_type> lognorm </dist_type>
<scale> 0.5 </scale>
<s> 0.1 </s>
</size>
</material>

<material>
<shape> circle </shape>
<size>
<dist_type> cdf </dist_type>
<filename> my_empirical_dist.csv </filename>
</size>
</material>

<domain>
<shape> square </shape>
<side_length> 10 </side_length>
</domain>
</input>

In all three materials, the size field contains a dist_type. This type can match the name of a statistical distribution in the SciPy scipy.stats module, or be either “pdf” or “cdf”. If it is a SciPy distribution name, then the remaining parameters must match the inputs for that function. The first material has size distribution $$S\sim U(1, 2)$$ and the second has distribution $$S\sim 0.5e^{N(0, 0.1)}$$. Refer to the SciPy website for the complete list of available distributions and their input parameters.

In the case that the distribution type is “pdf” then the only other field should be filename. For a PDF, the file should contain two lines: the first has the (n) bin heights and the second has the (n+1) bin locations. A PDF file could contain, for example:

0.5, 1
1, 2, 2.5

For a CDF, the file should have two columns: the first being the size and the second being the CDF value. The equivalent CDF file would contain:

1, 0
2, 0.5
2.5, 1

Both PDF and CDF files should be in CSV format.

Warning

Do not use distributions that are equivalent to a deterministic value, such as $$S\sim N(1, 0)$$. The infinite PDF value causes numerical issues for SciPy. Instead, replace the distribution with the deterministic value or use a small, non-zero variance.

## Grain Geometries¶

MicroStructPy supports several grain geometries and each can be specified in multiple ways. For example, the ellipse can be specified in terms of its area and aspect ratio, or by its semi-major and semi-minor axes. The ‘size’ of a grain is defined as the diameter of a circle or sphere with equivalent area (so for a general ellipse, this would be $$2\sqrt{a b}$$). The parameters available for each geometry are described in the lists below.

### Circle¶

Parameters

• area - the area of the circle

• d - alias for diameter

• diameter - the diameter of the circle

• r - alias for radius

• radius - the radius of the circle

• size - same as diameter

Only one of the above is necessary to define the circle geometry. If no parameters are specified, the default is a unit circle.

### Ellipse¶

Parameters

• a - the semi-major axis of the ellipse

• angle - alias for angle_deg

• angle_deg - the counterclockwise positive angle between the semi-major axis and the +x axis, measured in degrees

• angle_rad - the counterclockwise positive angle between the semi-major axis and the +x axis, measured in radians

• aspect_ratio - the ratio a/b

• axes - semi-axes of ellipse, equivalent to [a, b]

• b - the semi-minor axis of the ellipse

• matrix - orientation matrix for the ellipse

• orientation - alias for matrix

• size - the diameter of a circle with the same area as the ellipse

Two shape parameters and one orientation parameter are necessary to fully define the ellipse geometry. If less than two shape parameters are given, the default is a unit circle. If an orientation parameter is not given, the default is aligned with the coordinate axes.

Note

The default orientation of an ellipse is aligned with the coordinate axes. Uniform random orientation can be achieved by setting <orientation> random </orientation> in the input file.

### Ellipsoid¶

Parameters

• a - first semi-axis of the ellipsoid

• axes - semi-axes of the ellipsoids, equivalent to [a, b, c]

• b - second semi-axis of the ellipsoid

• c - third semi-axis of the ellipsoid

• matrix - orientation matrix for the ellipsoid

• orientation - alias for matrix

• ratio_ab - the ratio a/b

• ratio_ac - the ratio a/c

• ratio_ba - the ratio b/a

• ratio_bc - the ratio b/c

• ratio_ca - the ratio c/a

• ratio_cb - the ratio c/b

• rot_seq - alias for rot_set_seq

• rot_seq_deg - a rotation sequence, with angles in degrees, to define the orientation of the ellipsoid. See below for details.

• rot_seq_rad - a rotation sequence, with angles in radians, to define the orientation of the ellipsoid. See below for details.

• size - the diameter of a sphere with the same volume as the ellipsoid

Three shape parameters and one orientation parameter are necessary to fully define the ellipsoid geometry. If the length of a semi-axis cannot be determined from the input parameters, it defaults to unit length. If an orientation parameter is not given, the default is aligned with the coordinate axes.

A rotation sequence is a list of axes and angles to rotate the ellipsoid. The order of the rotations is as such: supposing after a z-rotation that the new x and y axes are x’ and y’, a subsequent y-rotation would be about the y’ axis. An example rotation sequence is:

<?xml version="1.0" encoding="UTF-8"?>
<input>
<material>
<shape> ellipsoid </shape>
<axes> 5, 3, 1 </axes>

<rot_seq_deg>
<axis> z </axis>
<angle> 10 </angle>
</rot_seq_deg>

<rot_seq_deg>
<axis> x </axis>
<angle>
<dist_type> uniform </dist_type>
<loc> 30 </loc>
<scale> 30 </scale>
</angle>
</rot_seq_deg>

<rot_seq_deg>
<axis> y </axis>
<angle>
<dist_type> norm </dist_type>
<loc> 0 </loc>
<scale> 30 </scale>
</angle>
</rot_seq_deg>
</material>
</input>

This represents first a z-rotation of 10 degrees, then an x-rotation of 30-60 degrees, then finally a y-rotation of $$N(0, 30)$$ degrees.

Note

Ellipsoids with uniform random distribution will be generated using <orientation> random </orientation>. Positions on the unit 4-sphere are generated with a uniform random distribution, then converted into a quaternion and finally into a rotation matrix.

### Rectangle¶

Parameters

• angle- alias for angle_deg

• angle_deg - rotation angle, in degrees, measured counterclockwise from the +x axis

• angle_rad - rotation angle, in radians, measured counterclockwise from the +x axis

• length - the x-direction side length of the rectangle

• matrix - the orientation matrix of the rectangle

• side_lengths - equivalent to [length, width]

• width - the y-direction side length of the rectangle

Both the length and the width of the rectangle must be specified. If either is not specified, the default rectangle is a sqaure with unit side length. If an orientation is not specified, the default is aligned with the coordinate axes.

### Sphere¶

Parameters

• d - alias for diameter

• diameter - the diameter of the sphere

• r - alias for radius

• radius - the radius of the sphere

• size - alias for diameter

• volume - volume of the sphere

Only one of the above is necessary to define the sphere geometry. If no parameters are specified, the default is a unit sphere.

### Square¶

Parameters

• angle - alias for angle_deg

• angle_deg - the rotation angle, in degrees, of the square measured counterclockwise from the +x axis

• angle_rad - the rotation angle, in radians, of the square measured counterclockwise from the +x axis

• matrix - the orientation matrix of the square

• side_length - the side lnegth of the square

If the side length of the square is not specified, the default is 1. If an orientation parameter is not specified, the default orientation is aligned with the coordinate axes.

Note

Over-parameterizing grain geometries will cause unexpected behavior.

For parameters such as “side_lengths” and “axes”, the input is expected to be a list, e.g. <axes> 1, 2 </axes> or <axes> (1, 2) </axes>. For matrices, such as “orientation”, the input is expected to be a list of lists, e.g. <orientation> [[0, -1], [1, 0]] </orientation>.

Each of the scalar arguments can be either a constant value or a distribution. For uniform random distribution of ellipse and ellipsoid axes, used the parameter <orientation> random </orientation>. The default orientation is axes-aligned.

Here is an example input file with non-circular grains:

<?xml version="1.0" encoding="UTF-8"?>
<input>
<material>
<shape> ellipse </shape>
<size>
<dist_type> uniform </dist_type>
<loc> 1 </loc>
<scale> 1 </scale>
</size>
<aspect_ratio> 3 </aspect_ratio>
<orientation> random </orientation>
</material>

<material>
<shape> square </shape>
<side_length>
<dist_type> lognorm </dist_type>
<scale> 0.5 </scale>
<s> 0.1 </s>
</side_length>
</material>

<material>
<shape> rectangle </shape>
<length>
<dist_type> cdf </dist_type>
<filename> my_empirical_dist.csv </filename>
</length>
<width> 0.2 </width>
<angle_deg>
<dist_type> uniform <dist_type>
<loc> -30 </loc>
<scale> 60 </scale>
</angle_deg>
</material>

<domain>
<shape> square </shape>
<side_length> 10 </side_length>
</domain>
</input>

## Material Type¶

There are three types of materials supported by MicroStructPy: crystalline, amorphous, and void. For crystalline phases, facets between cells of the same grain are removed before unstructured meshing. For amorphous phases, facets between cells of the same phase are removed before meshing. Finall, void phases produce empty spaces in the unstructured mesh. There are several synonyms for these material types, including:

• crystalline: granular, solid

• amorphous: glass, matrix

• void: crack, hole

The default material type is crystalline. An example input file with material types is:

<?xml version="1.0" encoding="UTF-8"?>
<input>
<material>
<shape> circle </shape>
<size>
<dist_type> uniform </dist_type>
<loc> 0 </loc>
<scale> 1 </scale>
</size>
<material_type> matrix </material_type>
</material>

<material>
<shape> square </shape>
<side_length> 0.5 </side_length>
<material_type> void </material_type>
</material>

<domain>
<shape> square </shape>
<side_length> 10 </side_length>
</domain>
</input>

Here, the first phase is an amorphous (matrix) phase and the second phase contains square voids of constant size. A material can contain multiple amorphous and void phases.

Note

Void phases may cause parts of the mesh to become disconnected. MicroStructPy does not check for or remove disconnected regions from the mesh.

## Grain Position Distribution¶

The default position distribution for grains is random uniform throughout the domain. Grains can be non-uniformly distributed by adding a position distribution. The x, y, and z can be independently distributed or coupled. The coupled distributions can be any of the multivariate distributions listed in the SciPy scipy.stats module.

In the example below, the first material has independently distributed coordinates while the second has a coupled distribution.

<?xml version="1.0" encoding="UTF-8"?>
<input>
<material>
<shape> circle </shape>
<size>
<dist_type> uniform </dist_type>
<loc> 0 </loc>
<scale> 1 </scale>
</size>
<position>  <!-- x -->
<dist_type> binom </dist_type>
<loc> 0.5 </loc>
<n> 9 </n>
<p> 0.5 </p>
</position>
<position> <!-- y -->
<dist_type> uniform </dist_type>
<loc> 0 </loc>
<scale> 10 </scale>
</position>
</material>

<material>
<shape> square </shape>
<side_length> 0.5 </side_length>
<position>
<dist_type> multivariate_normal </dist_type>
<mean> [2, 3] </mean>
<cov> [[4, -1], [-1, 3]] </cov>
</position>
</material>

<domain>
<shape> square </shape>
<side_length> 10 </side_length>
<corner> 0, 0 </corner>
</domain>
</input>

Position distributions should be used with care, as seeds may not fill the entire domain.

## Other Material Settings¶

Name The name of each material can be specified by adding a “name” field. The default name is “Material N” where N is the order of the material in the XML file, starting from 0.

Color The color of each material in output plots can be specified by adding a “color” field. The default color is “CN” where N is the order of the material in the XML file, starting from 0. For more information about color specification, visit the Matplotlib Specifying Colors webpage.

For example:

<?xml version="1.0" encoding="UTF-8"?>
<input>
<material>
<name> Aluminum </name>
<color> silver </color>
<shape> circle </shape>
<size> 1 </size>
</material>

<domain>
<shape> square </shape>
<side_length> 10 </side_length>
</domain>
</input>


text:
# Tag Info

### How can I calculate the angle of attack of an airfoil?

AOA is taken by gathering the arctangent of (w / u) or arctangent (v_z / v_x) Where w (or v_z) is the speed (velocity) of motion downwards (relative to the body) where up is positive [and of course, ...
• 1


text:
# How do you simplify (x-1)/(x^2-1)+2/(5x+5)?

Jul 22, 2016

$\frac{7}{5 \left(x + 1\right)}$

#### Explanation:

$\frac{x - 1}{{x}^{2} - 1} + \frac{2}{5 x + 5}$

Focus on the first fraction first. Notice that the denominator is the difference of two squares, since

${x}^{2} - 1 = {x}^{2} - {1}^{2}$

As you know, the difference of two squares can be factored as

$\textcolor{p u r p \le}{| \overline{\underline{\textcolor{w h i t e}{\frac{a}{a}} \textcolor{b l a c k}{{a}^{2} - {b}^{2} = \left(a - b\right) \left(a + b\right)} \textcolor{w h i t e}{\frac{a}{a}} |}}}$

This means that the first fraction is equivalent to

$\frac{\textcolor{red}{\cancel{\textcolor{b l a c k}{\left(x - 1\right)}}}}{\textcolor{red}{\cancel{\textcolor{b l a c k}{\left(x - 1\right)}}} \left(x + 1\right)} = \frac{1}{x + 1}$

Next, focus on the second fraction. In this case, the denominator can be factored as

$\frac{2}{5 x + 5} = \frac{2}{5 \left(x + 1\right)}$

The expression can thus be written as

$\frac{1}{x + 1} + \frac{2}{5 \left(x + 1\right)}$

The next thing to do here is multiply the first fraction by $1 = \frac{5}{5}$. This will allow you to express both fractions in terms of their common denominator, which is equal to $5 \left(x + 1\right)$

$\frac{1}{x + 1} \cdot \frac{5}{5} + \frac{2}{5 \left(x + 1\right)} = \frac{5}{5 \left(x + 1\right)} + \frac{2}{5 \left(x + 1\right)}$

$= \frac{2 + 5}{5 \left(x + 1\right)} = \textcolor{g r e e n}{| \overline{\underline{\textcolor{w h i t e}{\frac{a}{a}} \textcolor{b l a c k}{\frac{7}{5 \left(x + 1\right)}} \textcolor{w h i t e}{\frac{a}{a}} |}}}$

Notice that you must have $x \ne \pm 1$.


text:
# question on notation for partial derivatives

• October 27th 2009, 05:28 PM
oblixps
question on notation for partial derivatives
what does it mean when a partial derivative has a prime on it? usually i just see partial derivatives as f and a subscript x but i recently came across f with a subscript x and a prime on the top. just curious, what does that mean?
• October 27th 2009, 05:45 PM
Quote:

Originally Posted by oblixps
what does it mean when a partial derivative has a prime on it? usually i just see partial derivatives as f and a subscript x but i recently came across f with a subscript x and a prime on the top. just curious, what does that mean?

Do you mean like this $f'_x$

?
• October 27th 2009, 10:37 PM
oblixps
Quote:

Do you mean like this $f'_x$
yes, sorry if my description was confusing. can you tell me what $f'_x$ means?


text: A 155 mm compound gun barrel with full-length integral mid-wall cooling channels was manufactured and connected to a purpose built heat exchanger. Laboratory testing of this system was carried out using electrical heating jackets applied to the outer surface of the barrel and an internal electrical chamber heater to heat the barrel as uniformly as possible along its length. A series of tests were then carried out consisting of first heating the barrel to a uniform temperature of approximately 80°C followed by switching on the heat exchanger and monitoring the rate at which the barrel cooled. The purpose of these tests was to determine the optimum cooling characteristics of the system by studying the effect of different coolant flow rates combined with one or both radiators functioning and also the effect of using different cooling fluid solutions. Having derived the optimum flow rate and coolant solution combination a further cooling test was carried out with the heat exchanger configured to these optimum values and with the barrel heaters operating at maximum capacity. Finally a natural cooling test was undertaken where the barrel was uniformly heated to 160°C, the heating jackets removed and the barrel left to cool overnight. The results from these tests prove that natural cooling is dramatically slower than forced mid-wall cooling.


text:
# SYMMETRIC POWER CONGRUENCE IDEALS AND SELMER GROUPS

Abstract : We prove for all $n$ less than or equal to 8 and under certain assumptions the equality predicted by the Iwasawa-Greenberg main conjecture between the characteristic power series of the Selmer group of the $2n$-th symmetric power twisted by $det^{-n}$ of the Galois representation associated to a Hida family and a congruence ideal for $Symm^n$ of this family.
Keywords :
Document type :
Preprints, Working Papers, ...

Cited literature [8 references]

https://hal.archives-ouvertes.fr/hal-01398905
Contributor : Jacques Tilouine <>
Submitted on : Friday, November 18, 2016 - 3:55:24 AM
Last modification on : Wednesday, February 6, 2019 - 1:22:59 AM
Document(s) archivé(s) le : Thursday, March 16, 2017 - 4:54:34 PM

### File

321v10.pdf
Files produced by the author(s)

### Identifiers

• HAL Id : hal-01398905, version 1

### Citation

Haruzo Hida, Jacques Tilouine. SYMMETRIC POWER CONGRUENCE IDEALS AND SELMER GROUPS. 2016. ⟨hal-01398905⟩

Record views


text:
# "Reid & Wright Learning Center needed some long-term financing and arranged for a 10-year,...

"Reid & Wright Learning Center needed some long-term financing and arranged for a 10-year, $100,000, 7% mortgage loan on January 1, Year 1. Annual payments of$14,238 will be made on December 31 each year. Show the effect on the accounting equation of the second annual payment. Round to the nearest dollar. Assets Liabilities Shareholders' Equity"

 Year Beg. Bal Installment Interest Principal Repay end. Bal 1 100,000 14,238 7,000 7,238 92,762 2 92,762 14,238 ...

## Related Questions in Assets and Liabilities

• ### "Reid & Wright Learning Center needed some long-term financing and arranged for a 10-year, $100,000, (Solved) March 30, 2018 " Reid & Wright Learning Center needed some long-term financing and arranged for a 10 - year ,$ 100,000 , 7 % mortgage loan on January 1 , Year 1 . Annual payments of $14,238 will be made on December 31 each year . Show the effect on the accounting equation of the second annual payment . Round to... #### Answer Preview : Year Beg. Bal Installment Interest Principal Repay end. Bal 1 100,000 14,238 7,000 7,238 92,762 2 92,762 14,238 6,493 7,745 85,017 Assets Liabilities Shareholders Equity • ### Pickeril Inc. issues a$600,000, 10%, 10-year mortgage note on December 31, 2011

(Solved) March 10, 2014

Pickeril Inc. issues a $600,000, 10%, 10 - year mortgage note on December 31 , 2011, to obtain financing for a new building. The terms provide for semiannual installment payments of$ 48 ,145. Prepare the entry to record the mortgage loan on December 31 , 2011, and the first installment payment .

Answer: a. a debit to Interest expense for $36,000. Particulars Debit Amount Credit Amount Notes Payable A/c Dr 80,000.00 Interest Expense A/c Dr 36,000.00 To Cash A/C 116,000 • ### *P10-11A On January 1, 2012, Lehn Company issued$2,000,000 face value, 7%, 10-year bonds

(Solved) March 10, 2014

*P10-11A On January 1 , 2012, Lehn Company issued $2,000,000 face value, 7 %, 10 - year bonds at$2,147,202. This price resulted in a 6% effective -interest rate on the bonds. Lehn uses the effective -interest method to amortize bond premium or discount. The bonds pay annual interest on each January


text:
3. (a) Solve isin z = 3 (2 pts), (b) cos = = [ (2 pts), (c) isin = cos

Question:

3. (a) Solve isin z = 3 (2 pts), (b) cos = = [ (2 pts), (c) isin = cos = = 2 (2pts), (d) show if the difference between answers from (a) and (b) to be equal to the answer from (c) and write the reason why (4 pts)

Similar Solved Questions

250 g of water at 72.0 0C and a 650 g chunk of lead at-7.00 0C are are put into a pyrex/glass bowl at 20.0 0C in thermalisolation. The final equilibrium temperature is 45.40C. What is the mass of the pyrex bowl in kg?c - water = 4186 J/kg/Cc - lead = 130 J/kg/Cc - pyrex = 753 J/kg/CLf - water = 334,000 J/kg
250 g of water at 72.0 0C and a 650 g chunk of lead at -7.00 0C are are put into a pyrex/glass bowl at 20.0 0C in thermal isolation. The final equilibrium temperature is 45.4 0C. What is the mass of the pyrex bowl in kg? c - water = 4186 J/kg/C c - lead = 130 J/kg/C c - pyrex = 753 J/kg/C Lf - wat...
2-bromo-3-ethylhexanec:4-ethyl-2,2-diiodo-5,5-dimethyloctane27 6 ;Cyclopentanol .
2-bromo-3-ethylhexane c: 4-ethyl-2,2-diiodo-5,5-dimethyloctane 27 6 ; Cyclopentanol ....
Fad tkegenexa ( Solli_n9 4xJ =X
Fad tkegenexa ( Solli_n 9 4x J =X...
Evaluate the integral.$int frac{10 d x}{(x-1)^{2}left(x^{2}+9ight)}$
Evaluate the integral. $int frac{10 d x}{(x-1)^{2}left(x^{2}+9 ight)}$...
Calculate the solubility (in g/L) of CaSO 4 ( s ) in 0.400 M Na 2...
Calculate the solubility (in g/L) of CaSO 4 ( s ) in 0.400 M Na 2 SO 4 ( aq ) at 25 ° C . The K sp of CaSO 4 is 4.93 × 10 − 5 ....
QUESTION 24POINTFind the average rate of change of the given function on the interval [2, 6] h(z) = 41" + 6r _ 7Enter ~Vouf answeras reduced improper fraciion, necessary:Provide your answer belovr
QUESTION 24 POINT Find the average rate of change of the given function on the interval [2, 6] h(z) = 41" + 6r _ 7 Enter ~Vouf answeras reduced improper fraciion, necessary: Provide your answer belovr...
Fill in the BlankDraw every constitutional isomer that is an ether with the formula C4H1oO. The total number of ethers with this formula isIn the appropriate blank, provide the whole number answer (e:g: Type only the number such as "1", or "3" do not write anything else):
Fill in the Blank Draw every constitutional isomer that is an ether with the formula C4H1oO. The total number of ethers with this formula is In the appropriate blank, provide the whole number answer (e:g: Type only the number such as "1", or "3" do not write anything else):...
1  Which lunulc numbc following "91*zi*81 clrcu urcr uudilion? Whhy
1  Which lunulc numbc following "91*zi*81 clrcu urcr uudilion? Whhy...
Correct them plz clear handwriting 6. Indicate the hybeidization stutes and molecular shapes (geometries) of each...
correct them plz clear handwriting 6. Indicate the hybeidization stutes and molecular shapes (geometries) of each of toe carbon atoms in the following molecule (20 points) ?? carbon #hybridiration shape 7. Indicate the formal charge on N in the following structures. You muat show your work ar) point...
Millennium Development Goals (MDGs) aimed to: A. reduce the percent of the world suffering from hunger...
Millennium Development Goals (MDGs) aimed to: A. reduce the percent of the world suffering from hunger to half of its 1990 level by 2015. B. reduce income inequality (Gini-Coefficient) from 0.5 to 0.2 by 2020. C. reduce the absolute number of people living below the poverty line. D. reduce p...
Point) Consider Ine curvu (2" cos(_4t) , 22" sin(_4t), 22'). Compute tne arclongth function s(t): (with Initial point (
point) Consider Ine curvu (2" cos(_4t) , 22" sin(_4t), 22'). Compute tne arclongth function s(t): (with Initial point (...
In the figure a 15 V battery is connected across capacitors of capacitances C1 = Cs = 4.5 pF and C3 C5 = 20C2 = 2.0C4 6.0 pF What are (a) the equivalent capacitance Ceq of the capacitors and (b) the charge stored by Ceq What are (c) V1 and (d) 91 of capacitor 1,(e) V2 and (f) 92 of capacitor 2,and (g) V3 and (h) 93 of capacitor 32(a) Number 4.5Units pF(b) Number 67.5UnitsC(c) Number 7.5Units(d) Number33.75Units C(e) NumberUnitsNumberUnitsNumberUnits(h) NumberUnits
In the figure a 15 V battery is connected across capacitors of capacitances C1 = Cs = 4.5 pF and C3 C5 = 20C2 = 2.0C4 6.0 pF What are (a) the equivalent capacitance Ceq of the capacitors and (b) the charge stored by Ceq What are (c) V1 and (d) 91 of capacitor 1,(e) V2 and (f) 92 of capacitor 2,and (...
3.15kg object is moving this object att = 1.70DUMcodndinales given JYWhcrcinclers Jndsccunde Find the magnitudelhe net WufC acllg
3.15kg object is moving this object att = 1.70 DUM codndinales given JY Whcrc inclers Jnd sccunde Find the magnitude lhe net WufC acllg...
Use transformations to help you sketch the graph of each function. See Example 5.$f(x)=e^{-x}-1$
Use transformations to help you sketch the graph of each function. See Example 5. $f(x)=e^{-x}-1$...
1 points Save Answer QUESTION 29 Which of the following are externalities (to drivers) of the...
1 points Save Answer QUESTION 29 Which of the following are externalities (to drivers) of the number of miles they drive? a. wear and tear on highways D. the probability of getting in an accident involving another driver C. the length of time it takes the average driver to get from point A to Point ...
Set up the triple integral that gives the volume of the region bounded by 2 = 1~y? and 12/4
Set up the triple integral that gives the volume of the region bounded by 2 = 1~y? and 12/4...
National income equals GNP -less depreciation, less net unilateral transfers. -less depreciation or net unilateral transfers....
National income equals GNP -less depreciation, less net unilateral transfers. -less depreciation or net unilateral transfers. -plus depreciation, less net unilateral transfers. - plus depreciation, plus net unilateral transfers. -less depreciation, plus net unilateral transfers....
Devise a year's worth of passwords based on a common theme.
Devise a year's worth of passwords based on a common theme....
You recieve a box with books: 2 romances 3 mystery novels and four science fiction A)...
You recieve a box with books: 2 romances 3 mystery novels and four science fiction A) if you select four books at random in succession with out replacement what is the probability that the fourth book is a romance? B) if you select two books at random in succession without replacement what is the pr...
, Armstrong - CHEM 1212 - Fall19 - HIZER > Activities and Due Dates > HW...
, Armstrong - CHEM 1212 - Fall19 - HIZER > Activities and Due Dates > HW 17 ert Score: 735/2300 Resources [ Give Up? | < Question 90123 > ОА Using the data in the table, determine the rate constant or ne reaction and select the appropriate units. Trial [A] (M) 0.390 A + 2B - ...
Find the centroid of the region bounded the 1Find the area of the surface generated revoiving 2 curve1 length of the curve yEvaluate the Improper Integral02*) 1)3/2 between 41 and X-2.Xe ~*3and5*> Assume constant density about the X-axis.< 4
Find the centroid of the region bounded the 1 Find the area of the surface generated revoiving 2 curve 1 length of the curve y Evaluate the Improper Integral 0 2*) 1)3/2 between 41 and X-2. Xe ~* 3 and 5*> Assume constant density about the X-axis. < 4...
Define a miracle, according to traditional Christian thought. Explain the relationship between ones worldview and ones...
Define a miracle, according to traditional Christian thought. Explain the relationship between ones worldview and ones interpretation of biblical accounts of miraculous events....
Which of these elements is most electronegative ? K Ga Br
Which of these elements is most electronegative ? K Ga Br...
The vapor pressure of liquid ethyl acetate, CH_3 COOC_2 H_5, is 40.0 mm Hg at 282...
The vapor pressure of liquid ethyl acetate, CH_3 COOC_2 H_5, is 40.0 mm Hg at 282 K. A sample of CH_3 COOC_2 H_5 is placed in a closed, evacuated container of constant volume at a temperature of 411 K. It is found that all of the CH_3 COOC_2 H_5 is in the vapor phase and that the pressure is 60.0 mm...
Chapter 3 Calculating Descriptive StatisticsCalculating Time of Departure You have a 5.30 PM flight from the airport on Thursday and need to decide the time of departure from home: The times in the table below are based on the average times and standard your deviations for travel time, parking, check-in, and security for Thursday afternoon: Mean Standard DeviationTravel Time55 minutes23 minutesParking18 minutes8 minutesCheck-in38 minutes24 minutesSecurity32 minutes21 minutesAssume the distributi
Chapter 3 Calculating Descriptive Statistics Calculating Time of Departure You have a 5.30 PM flight from the airport on Thursday and need to decide the time of departure from home: The times in the table below are based on the average times and standard your deviations for travel time, parking, che...
3. (5 pts) Carbon tetrachloride has a vapor pressure of 11.3 torr at 255 K, and...
3. (5 pts) Carbon tetrachloride has a vapor pressure of 11.3 torr at 255 K, and 99,0 torr at 295 K. What is the normal boiling point in °C) of carbon tetrachloride? 4. (5 pts) At its boiling point, how much heat would be required to vaporize 225.0 mL of carbon tetrachloride? pcc = 1.59 g/cm"...
If a codon (5' t0 3'| is GCU, what is the anticodon (5' t0 3)For which amino acid does this code?
If a codon (5' t0 3'| is GCU, what is the anticodon (5' t0 3) For which amino acid does this code?...
Results Bile Esculin , ? produced L Ybrown and Which = }bacteria Why? media, turn brown? Howdoes this 1 positive , bacteria likely to ) grow Isagram onthis _ media? Why or whynot? Can bactera grow on this plate but not be able to hydrolyze Esculin? Explain; Name two other bacterial species that we haveused in this class that can grow on Uhus media; Expai any errors that have occurred
Results Bile Esculin , ? produced L Ybrown and Which = }bacteria Why? media, turn brown? Howdoes this 1 positive , bacteria likely to ) grow Isagram onthis _ media? Why or whynot? Can bactera grow on this plate but not be able to hydrolyze Esculin? Explain; Name two other bacterial species that we...
1）Find the square of a complex number z=a+ib using only two real number multiplications plus as ...
1）Find the square of a complex number z=a+ib using only two real number multiplications plus as many additions and subtractions as you wish. 2）Multiply two complex numbers z1=a+ib and z2=c+id using only 3 real number multiplications. 3）Compute (a+ib)2(c+id)2 using only 5 real nu...
As sales manager, Joe Batista was given the following static budget report for selling expenses in...
As sales manager, Joe Batista was given the following static budget report for selling expenses in the Clothing Department of Soria Company for the month of October. SORIA COMPANY Clothing Department Budget Report For the Month Ended October 31, 2020 Difference Budget Actual Favorable Unfavorable Ne...
Use Gaussian elimination to determine the solution set to the given system. \begin{aligned} x_{1}+2 x_{2}+x_{3} &=1 \\ 3 x_{1}+5 x_{2}+x_{3} &=3 \\ 2 x_{1}+6 x_{2}+7 x_{3} &=1 \end{aligned}
Use Gaussian elimination to determine the solution set to the given system. \begin{aligned} x_{1}+2 x_{2}+x_{3} &=1 \\ 3 x_{1}+5 x_{2}+x_{3} &=3 \\ 2 x_{1}+6 x_{2}+7 x_{3} &=1 \end{aligned}...