text:
# Formail followup

A few more comments on archiving old email:

• The fastest way to open a Finder window of the folder where the eml files are stored is to open the corresponding mail folder in MailMate and right-click on one of the messages. That’ll bring up a longish menu with the item near the bottom. Boom.

• Both DEVONthink and EagleFiler are general-purpose organizing tools that have ways of archiving email messages, and MailMate has commands that work with each of them. I’ve tried them both and have come to the conclusion that I’m just not an organizer guy. I prefer to stick with well-named directories and files.
• <NAME> tells me that MailMate itself is going to be adding an Export command relatively soon. Like my little command line trick, it’s based on formail.
• There are a couple of other formail tricks in this message from <NAME> to the MailMate mailing list. Maybe I should subscribe.
• <NAME> pointed out that formail won’t be included with El Capitan, because Apple is dropping procmail. I knew from some of <NAME>’s tweets that the lockfile utility, which SuperDuper relies on, was being dropped, but I didn’t realize that it was going because it was part of procmail. I guess I’ll have to learn how to build it myself.

# Archiving old mail with formail

I’ve been trying to clean up my email at work lately. When a new project comes in, I create an email folder for it in MailMate and then save the incoming and outgoing messages associated with that project in the folder. When the project is finished, I’m faced with four options:

1. Delete the project folder and its messages. This gets rid of the messages on both the server and my local computer. I don’t like doing this because you never know when a client is going to come back asking for information that’s squirreled away in an email.
2. Move the project folder into an “Old projects” folder. This preserves the messages on both the server and my local computer, but keeps the MailMate interface cleaner by hiding folders I don’t expect to access. The problem with this is that messages accumulate on my local computer—not a concern with for the iMac with a 3 TB hard drive, but a bit of a squeeze on my old MacBook Air with only a 128 GB SSD.
3. Go into and change the subscription settings for the project folder.

This keeps the messages on the server but allows my local computer to reclaim some disk space. And I can always change the setting back temporarily if I need to get at the old messages.

4. Archive the messages in mbox format, save the archive with the rest of the old project files, and delete the project folder and its messages. This gets rid of the messages from both the server and my local computer, but preserves them along with the rest of the file materials in an offline archive.

Choice 4 is my preference, with Choice 3 coming in a close second. Unfortunately, MailMate—which I switched to when Mail.app on Mavericks refused to collect mail from the GMail servers on a regular basis—has no Export command, so I’ve been forced to go with Choice 3 since early last year. But today I found the formail command, and it looks like I can return to archiving and deleting.

I learned about formail from this Stack Exchange page, in which the questioner wanted to be able to open an email stored in eml format in Mutt. The top answer used formail to convert the eml into mbox so Mutt could open it. MailMate stores its messages in eml format, so it took only a little messing around to adapt the answer to handle a folder full of messages in eml format.

Here’s what I do to make an mbox archive:

• In the Finder, navigate to the folder on my local disk where the eml files for the project are stored. This is deep within ~/Library/Application Support/MailMate/, but it’s pretty easy to follow the trail to the correct folder.
• Open a Terminal window and change the working directory to the folder found in the previous step. I use a Keyboard Maestro macro to do this, but you could also drag the Finder window’s proxy icon fill in the argument to the cd command.
• Issue the following command:

for f in *.eml; do formail < "\$f" >> ~/Desktop/test.mbox; done

This converts all the messages in turn and strings them together into a single mbox archive file. Obviously, the archive doesn’t have to be named test.mbox and it doesn’t have to be saved on the Desktop, but that’s what the form of the command should be.

I’ve tested this command several times on different mail folders, and it’s always worked well. The easiest way to test is to open the mbox file in Mutt:

mutt -f test.mbox

which, if it works, leads to something like this:

Mutt isn’t shipped with OS X, but it’s easy to install through Homebrew. I’m sure there are other ways to test an archive, but I was a happy Mutt user back in my Linux days, so that’s what I thought of first.

formail is part of the old Unix procmail system. I was a procmail user in my Linux days, too, but definitely not a happy one. Only a masochist could enjoy editing a procmail recipe.

# I'll wait, my dear, till it's my turn

I know there are more good podcasts than there is time available to listen to them, but you really should give <NAME> and <NAME>’s new Liftoff podcast a try. It’s fun and informative without being overly technical. Unlike certain blogs I could name.

In the current episode, Stephen and Jason talked about the Moon, and it got me thinking about tides and gravitational forces. After my recent calculation of the position of the L1 Lagrange point, I was confident I could do something similar with tidal calculations. Nope.

Oh, there are lots of explanations of tides, both online and in books, but the overwhelming majority of them are qualitative, somewhat handwavy when it comes to the hard parts, and often flatly wrong. The page Stephen and Jason linked to in their show notes, for example, has some pretty silly stuff in its “Facts” section. I like this page from NASA, but it’s explanation of why the Moon produces a tidal bulge on both the near side and the far side of the Earth is just gibberish.

Why do I like a page with gibberish? Because it also has these two animated GIFs, which do a great job of showing how the tidal bulges move across the Earth’s surface. The first one shows just the rotation of the Earth,

Animation from NASA.

and the second one shows the combined effect of the Earth’s rotation and the Moon’s revolution.

Animation from NASA.

But what causes the water to bulge? The best simple explanation I’ve seen was given by <NAME>. Unfortunately, I can’t remember which of his books it was in, but the explanation itself has stayed with me since I read it as a teenager. It’s because the gravitational force from the Moon is not constant over the entire Earth’s surface.

The total gravitational force from the Moon on the Earth comes from Newton:

where $M_e$ is the mass of the Earth, $M_m$ is the mass of the Moon, $R$ is the distance between their mass centers, and $G$ is the universal gravitational constant.1 The average force per unit mass (of Earth), which we’ll call $f_{avg}$, is obtained by dividing the total force by the mass of the Earth:

But because not every point on (and in) the Earth is a distance $R$ away from the Moon’s center of mass, the local value of the force per unit mass, $f$, varies. In particular, directly below the Moon, the value of $f$ is

where $r$ is the radius of the Earth. This is about 3% higher than $f_{avg}$. Similarly the value of $f$ at the point directly opposite the Moon is

which is about 3% less than $f_{avg}$. The elliptical elongation, the bulging, comes because the water nearest the Moon is pulled the most, the water farthest from the Moon is pulled the least, and the water in between is pulled by an amount in between.

If you want a more in-depth accounting of tides, and you’re not afraid of a little multivariate calculus, take a look at <NAME>’s explanation. Stewart is a professor of oceanography at Texas A&M, and he doesn’t do any handwaving. Unfortunately, there are some errors in the equations on Stewart’s web page that seem to have come about through a LaTeX-to-HTML conversion. If you want to follow along with his derivations, you’re better off downloading the PDF of his book and flipping to Section 17.4. I found no errors in the PDF.

I won’t replicate his derivations here. For our purposes, the key result is that the gravitational force per unit mass of Earth due to the Moon can be broken into two parts:

1. A part that’s constant in magnitude throughout the Earth and is directed parallel to the line connecting the two mass centers. This can be thought of as the part associated with the centripetal acceleration of the Earth’s orbit around the Earth-Moon barycenter.
2. A part that varies in magnitude and direction from point to point on the Earth. It is the horizontal component (that is, the component tangent to the surface of the Earth) of this part of the gravitational force that pulls the water into the tidal bulges.

The horizontal tidal force per unit mass, which we’ll call $\mathbf{H}$, is governed by this formula:

where $\varphi$ is the angle from the point directly under the Moon, as shown in the figure below, and $\mathbf{u}_\varphi$ is the unit vector in the $\varphi$ direction. We can account for both the magnitude and the direction of this force by plotting it around the circumference of the Earth:

The red lobes show the magnitude, which is zero when $\varphi$ is 0°, 90°, 180°, and 270° and at its maximum when $\varphi$ is at 45°, 135°, 225°, and 315°.

The red arrows show the direction of the horizontal tidal force, and here’s where we see why there are bulges on both sides. The water on the half of the Earth closest to the Moon is being driven toward the point directly below the Moon. The water on the half of the Earth farthest from the Moon is being driven toward the point on the opposite side.

So far, we’ve only looked at 2-D views. Stewart has a nice 3-D view of the directions of the horizontal tidal forces when the Moon is over a point (Z) on the equator.

Source: Texas A&M University.

You can see things are getting complicated, and we haven’t even included the tidal effect of the Sun yet. Or the tilt of the Earth relative to the plane of the Moon’s orbit. Or the tilt of the Earth relative to the plane of its orbit. Or the eccentricities of the Earth’s and Moon’s orbits. Stewart puts all of this stuff together and shows that tides have a much richer frequency content than the simple “twice a day” explanation we usually see. Even in the neighborhood of “twice a day” (30° per hour) there’s a multitude of constituent frequencies.

Source: Texas A&M University.

If you don’t feel like following up on Professor Stewart’s calculations, you can always go with <NAME>’s explanation.

Hold on.

1. Which was first measured by <NAME> in a famous and elegant experiment

# Back to Tweetbot

I’ve been trying out the official Twitter app on both my iPhone and my Mac. The iOS app has certainly improved, especially with the most recent version released last week, but after five or six days of experimentation I’m returning to the comfort and convenience of Tweetbot.

To me, the biggest improvement to Twitter1 on iOS is getting rid of that hideous baby blue band from the top of the home timeline. I don’t think of myself as especially sensitive, but whenever I tried out Twitter in the past, that color would drive me away in less than a day. Now that I think of it, it’s Twitterrific’s color choices that have kept me away from it, too, so maybe I’m more sensitive than I’d like to admit. At any rate, Twitter’s baby blue branding is still there, but only in the button icons, which are on a more palatable white background.

Twitter for iOS is distinctly better than Tweetbot in two areas: the presentation of (certain) images and the presentation of (certain) linked web pages.

For reasons I’ve never understood, Twitter clients have a tradition of displaying images inside a wide rectangle, cropping the image if necessary to make it fit. I suppose the idea was to conserve vertical space so more tweets could fit onscreen, but all it did was force me to tap on the images so I could see what I was missing. I even tapped images that were wide rectangles to expand them, because there was no way to know if they were cropped or not.

The new Twitter eliminates some of that tapping by presenting most images at or near their native aspect ratios. Tweetbot, by contrast, is still cropping severely, and the browsing experience is distinctly worse because of it.

Twitter still does some cropping, so it’s not what I’d really like to see, but its presentation of images is something I’m going to miss.

Twitter is also better at presenting links to web pages that have implemented Twitter Cards. It’s nice to see a little description and (usually) an image from the linked page instead of just a truncated URL.

This is something I fear Tweetbot will never catch up with. Accessing cards is, as best I can tell, not part of the Twitter REST API and not likely to become part of it.

Despite these advantages for Twitter, I’m going back to Tweetbot because the balance of features and presentation still tilts in its direction.

I mentioned above that Twitter is superior at presenting certain images. One set of images it’s not superior at is those that come from Instagram. Twitter is still apparently in a snit over losing out to Facebook on the purchase of Instagram, so it shows only the URLs of Instagram photos. Tweetbot, having no political ax to grind, displays Instagram photos directly in the timeline.

They’re still cropped, mind you, but at least they’re there. Many of the people I follow use Instagram, and it’s a pain to have to tap links and wait for Twitter’s in-app browser to open up the page.

Update 9/1/15 9:07 AM
<NAME> alerted me last night that I got my snits backward. It was Instagram that blocked Twitter. I’m not exactly sure how they manage that, as I thought anyone could get a direct link to an Instagram photo. That’s what I used to do in Dr. Twoot, anyway, and it always worked. I guess Instagram’s doing something to figure out who the requester is.

Another advantage of Tweetbot is the simplicity of its timeline. Each tweet appears once, whether it’s an original statement or a reply. In contrast, Twitter tries to provide context for replies by showing them along with excerpts from the conversation they were part of. While I appreciate that Twitter believes this makes conversations easier to follow, I don’t find that it does. In fact, I find myself often missing the new tweets in a conversation because my eyes glaze over as I keep seeing the same excerpts over and over. It’s true that Tweetbot’s minimalist timeline can sometimes lead to puzzling isolated replies, but context is only a right-to-left swipe away.

Lack of clutter is also why I prefer Tweetbot’s Mentions tab to Twitter’s Notifications. The retweets, favorites, and follows in Notifications are a distraction from what I really want to see, which is what people are saying to me. If I want to see that other stuff, I can go to Twitter Analytics or Favstar.

You’ll note that I haven’t said anything yet about the Twitter and Tweetbot Mac apps. That’s because neither are especially good. Tweetbot, though, has one big advantage: it actually stays in sync with its iOS counterpart. The two Twitter apps sometimes sync up nicely, but often drift away from each other. This is especially annoying to me because I switch back and forth between my iPhone and my Macs several times during the day. The whole point of using sister apps is to avoid scrolling around to find where I was on another device. Tweetbot gives that to me, Twitter doesn’t.

On the whole, I was impressed with how much better Twitter for iOS has become. It just hasn’t improved enough to take over for Tweetbot.

1. From here on, I’m going to be calling the official Twitter app “Twitter” instead of “the official Twitter app” and hoping that there’s no confusion between the app and the service.


text:
98-306 <NAME>, <NAME>, <NAME>
Remark on the (Non)convergence of Ensemble Densities in Dynamical Systems (15K, TeX) Apr 27, 98
Abstract , Paper (src), View paper (auto. generated ps), Index of related papers

Abstract. We consider a dynamical system with state space $M$, a smooth, compact subset of some ${\Bbb R}^n$, and evolution given by $T_t$, $x_t = T_t x$, $x \in M$; $T_t$ is invertible and the time $t$ may be discrete, $t \in {\Bbb Z}$, $T_t = T^t$, or continuous, $t \in {\Bbb R}$. Here we show that starting with a continuous positive initial probability density $\rho(x,0) > 0$, with respect to $dx$, the smooth volume measure induced on $M$ by Lebesgue measure on ${\Bbb R}^n$, the expectation value of $\log \rho(x,t)$, with respect to any stationary (i.e.\ time invariant) measure $\nu(dx)$, is linear in $t$, $\nu(\log \rho(x,t)) = \nu(\log \rho(x,0)) + Kt$. $K$ depends only on $\nu$ and vanishes when $\nu$ is absolutely continuous wrt $dx$.

Files: 98-306.tex

format: plain


text:
## May 17, 2012

### Travolta Case <NAME> #2 Drops Out

Travolta Case <NAME> #2 Drops Out, The remaining plaintiff in the sexual battery lawsuit against <NAME> fired his lawyer, bringing an end to the case, the lawyer told CNN on Thursday.
The suit filed in federal court last week accused the actor of groping two male massage therapists at hotels in Los Angeles and Atlanta in January.

Travolta's lawyer, <NAME>, called the allegations by both men "ridiculous."
Attorney <NAME>, who initially represented the men identified only as <NAME> #1 and <NAME> #2, said he did not know why his Atlanta client decided to withdraw from the lawsuit. He said he was told in a phone call Thursday morning.

<NAME> #1, who said that Travolta sexually harassed him at the Beverly Hills Hotel, hired Los Angeles attorney <NAME> on Tuesday, just hours after he withdrew from Okorocha's lawsuit.

Allred said in a statement Tuesday that she and her new client would discuss if a new lawsuit would be filed against Travolta.

"We are in the process of conferring with him regarding the next steps, which he may wish to take," Allred said.

That dismissal was "without prejudice, which means that he is still legally entitled to file a lawsuit against <NAME> if he chooses," Allred said Wednesday.

When told of the second plaintiff's decision to dismiss Okorocha and withdraw from the suit, Allred said, "No comment on this at this time."

There was no immediate reaction from Travolta's lawyer.

<NAME> #1 withdrew from the lawsuit after it was learned Travolta was in New York, not Los Angeles, on January 16, the day he had alleged the massage incident took place.

Okorocha told CNN the date should have been January 15, but the mistake would have hampered the chances of John Doe #2 in court. He also said "personality conflicts" with <NAME> #1 contributed to the decision.

The lawyer insisted in a CNN interview Tuesday that he would "mop up" in the courtroom with the allegations made by <NAME> #2.

Source:http://edition.cnn.com/2012/05/17/showbiz/travolta-sex-suit-dismissed/index.html


text:
# Rigid body rotation problem

I am trying to solve problem number 4 part A and B from (http://people.physics.tamu.edu/kamon/teaching/phys218/exam/2003C/2003C_Exam3_Solution.pdf) but I am confused about certain aspects of it.

In part A, I understand that since we are considering the person as a cylinder, the equation for moment of inertia will include (1/2)MR^2. What I can't seem to understand is where did 2MR^2 come from and why we didn't include the moment of inertia of the arm(which is a rod).

In part B, I understand the rest of the moment of inertia equation but I am confused where did m(1l/2 + R)^2 come from?

BvU
Homework Helper
Hello Ken,

Please use the template and the superscript/subscript buttons. See guidelines
Apparently you have a question on moment of inertia. So isolate that problem and state it. Show the relevant equations.

And note that the solution does make a difference between M and m -- as you do not.

Doc Al
Mentor
What I can't seem to understand is where did 2MR^2 come from and why we didn't include the moment of inertia of the arm(which is a rod).
The 2mR^2 is the moment of inertia of the arms -- when they are hanging down, not outstretched. (Note: m, not M.)

In part B, I understand the rest of the moment of inertia equation but I am confused where did m(1l/2 + R)^2 come from?
Here the arms are outstretched. Note that the axis of rotation is the center of the person, not the shoulder.

BvU
Homework Helper
The 2mR^2 is the moment of inertia of the arms -- when they are hanging down, not outstretched. (Note: m, not M.)

Here the arms are outstretched. Note that the axis of rotation is the center of the person, not the shoulder.
Giving it away, eh ? not PF ! Well, let's say Ken has beginner's credit

<NAME>
Mentor
Giving it away, eh ? not PF !

Well, let's say Ken has beginners credit
First one's free!

BvU


text:
# Thread: Help with finding an expression for an integral...

1. ## Help with finding an expression for an integral...

Find an expression for $\int_1^s \frac {1}{x^m} dx$ in terms of m and s, where m is a positive rational number, m != -1 and s > 1. Show that the infinte integral $\int_1^\infty \frac {1} {x^m} dx$ has a meaning if m > 1, and state its value in terms of m.

Is it asking me to integrate and come up with a simplified expression? I did that, but it's not matching the answer on multiple attempts.

2. What did you come up with?

3. Originally Posted by struck
Find an expression for $\int_1^s \frac {1}{x^m} dx$ in terms of m and s, where m is a positive rational number, m != -1 and s > 1. Show that the infinte integral $\int_1^\infty \frac {1} {x^m} dx$ has a meaning if m > 1, and state its value in terms of m.

Is it asking me to integrate and come up with a simplified expression? I did that, but it's not matching the answer on multiple attempts.
1. $\int_1^s{ \frac {1}{x^m}\, dx} = \int_1^s{ x^{-m}\, dx}$

$= \left[\frac{1}{1-m}x^{1 - m}\right]_1^s$

$= \left[\frac{1}{1-m}s^{1 - m}\right] - \left[-\frac{1}{m}\right]$

$= \frac{1}{m} + \frac{1}{1-m}s^{1 - m}$.

2. The question is exactly the same, but this time you have to take the limit as s approaches infinity.

4. ## Integral

Hello struck
Originally Posted by struck
Find an expression for $\int_1^s \frac {1}{x^m} dx$ in terms of m and s, where m is a positive rational number, m != -1 and s > 1. Show that the infinte integral $\int_1^\infty \frac {1} {x^m} dx$ has a meaning if m > 1, and state its value in terms of m.

Is it asking me to integrate and come up with a simplified expression? I did that, but it's not matching the answer on multiple attempts.
I'm assuming that m != -1 means $m \ne 1$, because if $m=1$ the answer is quite different (it's $\text{ln }x$)

So:

Re-write $\frac{1}{x^m}$ as $x^{-m}$, and then use the usual integration rule: Increase the power by 1, and then divide by the number you just thought of.

When you increase $-m$ by $1$ you get $-m+1$, so let's see what it looks like:

$\int_0^s x^{-m}= \left[\frac{x^{-m+1}}{-m+1}\right]$

(Note that this is where we need $m \ne 1$, because if $m=1$, we'd be violating the first commandment of arithmetic: Thou shalt not divide by zero.)

Now what you have to do:

• Return $x$ to the denominator of the fraction, by changing the sign of its power.
• Put in the limits $s$ and $1$ being careful with the minus signs.

This should give you the answer to the first part:

$\frac{1}{m-1}\left(1-\frac{1}{s^{m-1}}\right)$

Now you need to look at what happens when $m>1$ and $m<1$. So, think about the sign of $m-1$, and what happens to $\frac{1}{s^{m-1}}$ as $s \to \infty$ if $m-1$ is positive, and if $m-1$ is negative.

Can you see what to do now?


text:
# How do you find the exact value of cos(arcsin(1/3))?

Aug 28, 2016

$\frac{2 \sqrt{2}}{3}$

#### Explanation:

Let $a = a r c \sin \left(\frac{1}{3}\right) \in Q 1$,

for the principal value, wherein cosine is positive.

The given expression is

$\cos a = \sqrt{1 - {\sin}^{2} a} = \sqrt{1 - \frac{1}{9}} = \frac{2 \sqrt{2}}{3}$.

If Q2 value of $a = {180}^{o} - Q 1 a$ is permitted, the answer will be

$\pm \left(2 \sqrt{2}\right) / 3$,

using

$\sin \left({180}^{o} - a\right) = \sin a$ but $\cos \left({180}^{o} - a\right) = - \cos a$.


text:
# Strophoid

A third-order plane algebraic curve whose equation takes the form

in Cartesian coordinates, and

in polar coordinates. The coordinate origin is a node with tangents (see Fig.). The asymptote is . The area of the loop is

The area between the curve and the asymptote is

A strophoid is related to the so-called cusps (cf. Cusp).

Figure: s090630a

#### References

 [1] <NAME>, "Planar curves" , Moscow (1960) (In Russian) [2] <NAME>, <NAME>, "Handbook of the theory of planar curves of the third order" , Moscow (1961) (In Russian)


text:
Using factor theorem, show that g(x) is a factor of p(x), when
Question:

Using factor theorem, show that g(x) is a factor of p(x), when

$p(x)=2 x^{3}+9 x^{2}-11 x-30, g(x)=x+5$

Solution:

Let:

$p(x)=2 x^{3}+9 x^{2}-11 x-30$

Here,

$x+5=0 \Rightarrow x=-5$

By the factor theorem, (x + 5) is a factor of the given polynomial if p (5) = 0.
Thus, we have:

$p(-5)=\left[2 \times(-5)^{3}+9 \times(-5)^{2}-11 \times(-5)-30\right]$

$=(-250+225+55-30)$

$=0$

Hence, (x + 5) is a factor of the given polynomial.


text:
# Measurement of Wγ and Zγ production in pp collisions at √s = 7 TeV

CMS Collaboration; <NAME>; <NAME>; <NAME>; <NAME>; <NAME>; <NAME>; <NAME> (2011). Measurement of Wγ and Zγ production in pp collisions at √s = 7 TeV. Physics Letters B, 701(5):535-555.

## Abstract

A measurement of W-gamma and Z-gamma production in proton-proton collisions at sqrt(s) = 7 TeV is presented. Results are based on a data sample recorded by the CMS experiment at the LHC, corresponding to an integrated luminosity of 36 inverse picobarns. The electron and muon decay channels of the W and Z are used. The total cross sections are measured for photon transverse energy >10 GeV and spatial separation from charged leptons in the plane of pseudorapidity and azimuthal angle >0.7, and with an additional dilepton invariant mass requirement of > 50 GeV for the Z-gamma process. The following cross section times branching fraction values are found: sigma(pp to W-gamma+X) B(W to lepton neutrino) = 56.3 +/- 5.0 (stat.) +/- 5.0 (syst.) +/- 2.3 (lumi.) pb and sigma(pp to Z-gamma+X) B}(Z to lepton lepton) = 9.4 +/- 1.0 (stat.) +/- 0.6 (syst.) +/- 0.4 (lumi.) pb. These measurements are in agreement with standard model predictions. The first limits on anomalous WW gamma, ZZ gamma, and Z gamma gamma trilinear gauge couplings at sqrt(s) = 7 TeV are set.

## Abstract

A measurement of W-gamma and Z-gamma production in proton-proton collisions at sqrt(s) = 7 TeV is presented. Results are based on a data sample recorded by the CMS experiment at the LHC, corresponding to an integrated luminosity of 36 inverse picobarns. The electron and muon decay channels of the W and Z are used. The total cross sections are measured for photon transverse energy >10 GeV and spatial separation from charged leptons in the plane of pseudorapidity and azimuthal angle >0.7, and with an additional dilepton invariant mass requirement of > 50 GeV for the Z-gamma process. The following cross section times branching fraction values are found: sigma(pp to W-gamma+X) B(W to lepton neutrino) = 56.3 +/- 5.0 (stat.) +/- 5.0 (syst.) +/- 2.3 (lumi.) pb and sigma(pp to Z-gamma+X) B}(Z to lepton lepton) = 9.4 +/- 1.0 (stat.) +/- 0.6 (syst.) +/- 0.4 (lumi.) pb. These measurements are in agreement with standard model predictions. The first limits on anomalous WW gamma, ZZ gamma, and Z gamma gamma trilinear gauge couplings at sqrt(s) = 7 TeV are set.

## Citations

22 citations in Web of Science®
35 citations in Scopus®

## Altmetrics

Other titles: Measurement of W-gamma and Z-gamma production in pp collisions at sqrt(s) = 7 TeV Journal Article, refereed, original work 07 Faculty of Science > Physics Institute 530 Physics English 2011 13 Feb 2012 09:19 05 Apr 2016 15:36 Elsevier 0370-2693 (P) 1873-2445 (E) https://doi.org/10.1016/j.physletb.2011.06.034 http://arxiv.org/abs/1105.2758

 Preview
Content: Accepted Version
Filetype: PDF (Version 2)
Size: 1MB
View at publisher
 Preview
Content: Accepted Version
Filetype: PDF (Version 1)
Size: 1MB

## TrendTerms

TrendTerms displays relevant terms of the abstract of this publication and related documents on a map. The terms and their relations were extracted from ZORA using word statistics. Their timelines are taken from ZORA as well. The bubble size of a term is proportional to the number of documents where the term occurs. Red, orange, yellow and green colors are used for terms that occur in the current document; red indicates high interlinkedness of a term with other terms, orange, yellow and green decreasing interlinkedness. Blue is used for terms that have a relation with the terms in this document, but occur in other documents.
You can navigate and zoom the map. Mouse-hovering a term displays its timeline, clicking it yields the associated documents.


text:
# Getting messages asynchronously using MailKit

I'm writing a prototype for an application that uses MailKit and imap to connect to gmail. It's the first time I've used MailKit and I'm a bit stumped around the best way to do this.

Essentially, I want to write an async method hosted in a class library that downloads emails based on a simple header text search and invokes a callback each time so I can update the GUI. My attempt to do this is given in the following method.

public async Task<IList<IEmail>> EmailQueryAsync(string query, Action<IEmail> callBack)
{
IList<IEmail> result = new List<IEmail>();

using (ImapClient client = new ImapClient())
{
await client.ConnectAsync("imap.gmail.com", 993, true);

client.AuthenticationMechanisms.Remove("XOAUTH2");

IMailFolder folder = client.Inbox;

IList<UniqueId> uniqueIds = await client.Inbox.SearchAsync(SearchQuery.FromContains(query));

{

IEmail email = new Email(date: message.Date, id: message.MessageId, messageBody: message.TextBody, references: message.References);

callBack(email);

}

return result;
}
}

However, I feel there is a lot of code for what I want to do - do I really need to call so many async methods to get the messages, is it essential to have everything inside the using statement, or are there any obvious objects that I can cache. Is there a way that I can rewrite this method so I do not have to include the callBack action? Also, I'm a bit unsure about the types of exceptions I can sensibly expect to handle, timeouts etc...

It's hard to say how to write the ideal method for your use-case because you don't specify some of the details that would be necessary to know, such as:

How often will your code be making this query?

Is the connection always to the same IMAP server, username and password?

(if it'll be called fairly frequently with the same server/username/password combo, you could try to re-use the same ImapClient connection)

That said, I'll start with trying to at least clean up the code a bit.

public async Task<IList<IEmail>> EmailQueryAsync(string query, Action<IEmail> callBack)
{
var result = new List<IEmail>();

using (var client = new ImapClient ()) {
client.Connect ("imap.gmail.com", 993, true);

client.AuthenticationMechanisms.Remove ("XOAUTH2");

var folder = client.Inbox;

var uids = client.Inbox.Search (SearchQuery.FromContains (query));

foreach (var uid in uids) {
var message = folder.GetMessage (uid);

var email = new Email (date: message.Date, id: message.MessageId, messageBody: message.TextBody, references: message.References);

callBack (email);

}

return result;
}
}
}

I changed your code to put the entire block of logic into a single task which will all run on the same thread rather than your previous block which would effectively just run synchronously anyway since it didn't actually parallelize anything (it can't, really, since you can't search a folder until you've opened the folder - which you can't do until you've authenticated - which you can't do until you've connected, etc).

As far replacing your GetMessageAsync() logic goes, since the ImapClient can only process a single command at a time anyway, it doesn't make sense to spawn potentially thousands of command tasks asynchronously so that they can all just hurry up and wait for the previously queued tasks. Better to just write a synchronous loop in this scenario.

Update 2017-12-14: This will no longer be the case in MailKit 2.0. 2.0 will no longer wrap the synchronous calls using Task.Run() which means that they will no longer spawn threads.

• Thanks for your response. Your comments make sense, and I like the approach of wrapping it up in a single task, especially since the original was not utilising the asynchronous methods. I'm expecting quite a few calls using the same credentials, so depending on performance issues, I might rewrite it to reuse the same ImapClient connection. – <NAME>person Jun 1 '15 at 23:10
• Cool, glad that my answer has helped. When you do modify it to reuse the same connection, you'll want to lock the ImapClient.SyncRoot property if multiple threads may access the client at a time. The ImapFolder.SyncRoot property can also be used - in fact, the SyncRoot properties of both objects is the same object. – jstedfast Jun 2 '15 at 10:19


text:
# Why did supernova 1987A's “String of 'Cosmic Pearls'” appear to be so lumpy 20 years later? Is it still?

NASA's A String of 'Cosmic Pearls' surrounds an exploding star is beautiful and the page says:

This image shows the entire region around the supernova. The most prominent feature in the image is a ring with dozens of bright spots. A shock wave of material unleashed by the stellar blast is slamming into regions along the ring's inner regions, heating them up, and causing them to glow. The ring, about a light-year across, was probably shed by the star about 20,000 years before it exploded.

Did the ring break up into "pearls" or lumps due to some kind of instability? Why so lumpy? The image was taken 20 years after the supernova was first observed, does the ring still look like this?

The "lumpiness" is (mostly) inherent to the ring, and is probably the result of instabilities in the outflowing gas that gave rise to it in the first place. E.g., Akashi et al. (2015):

We suggest that clumpy dense outflowing equatorial rings around evolved giant stars, such as in supernova 1987A and the Necklace planetary nebula, are formed by bipolar jets that compress gas towards the equatorial plane. The jets are launched from an accretion disc around a stellar companion.... we perform 3D numerical simulations, and show that bipolar jets expanding into a dense spherical shell can compress gas towards the equatorial plane and lead to the formation of an expanding equatorial ring. Rayleigh-Taylor instabilities in the interaction region break the ring to clumps.

What you're seeing in the image is emission due to heating from the impact of the expanding supernova shock wave. Some of the clumpiness may be exaggerated by the fact that denser clumps of gas can radiatively cool more efficiently than diffuse gas, as explained by Fransson et al. (2015):

If the density of a clump is sufficiently high, radiative cooling will cause the clump to collapse to an even higher density. The result will be an optically emitting hotspot (Pun et al. 2002). If instead, the density of a clump falls below the threshold density for radiative cooling, the gas behind the transmitted shock will radiate X-rays and very little optical radiation. This threshold density is a sensitive function of the velocity, $${{V}_{{\rm clump}}}$$, of the shock entering the clump. Thus, at any given time, the requirement for radiative cooling acts as a high contrast filter, limiting optical radiation to only the denser clumps.

The brightness of the ring has faded somewhat since that image was made (more on the east side than on the west), as shown in this composite of HST images (Figure 3 of Larsson et al. 2019):

The figure in the paper itself includes an animation of the evolution.


text:
# How do you draw the electron configuration of nitrogen?

nitrogen is atomic number 7 therefore it's Electron configuration is 2,5 (GCSE) or $1 {s}^{2}$ $2 {s}^{2}$ $2 {p}^{3}$ (A-Level / Higher level) or [He] $2 {s}^{2}$ $2 {p}^{3}$


text:
# CERN Accelerating science

The Preprints collection aims to cover as far as possible all the grey literature in particle physics and its related technologies. The collection contains something like 400,000 documents, out of which about 50% can be accessed electronically. The documents originate from a variety of institutes all over the world. The collection, currently available, starts in 1979 and it has a full coverage of the arXiv.org e-Print archive since its beginning in 1991.

# Preprints

2018-09-24
11:15
 Polarization measurements / R. Schmidt CERN-SL-91-51-BI. - 1991. - 21 p.

2018-09-24
11:04
 The SL annual report for 1990 / SL division staff CERN-SL-91-13-DI. - 1991. - 13 p.

2018-09-24
10:35
 The SPS annual report for 1989 / The SPS Staff CERN-SL-90-03-DI. - 1990. - 29 p.

2018-09-24
09:46
 Hunting for narrow resonances in the dijet mass spectrum at CMS / Diamantopoulou, Melpomeni (Athens U.) /CMS Collaboration Results from the Dijet Resonance Search using data from 2016 and 2017 running will be shown, with emphasis on narrow resonances, for resonance masses above 1.6 TeV and a variety of new physics models used for the interpretation of the experimental results. The traditional method of estimating the QCD background is used, employing a parametrization for the background and an empirical fit of the data in the signal region.. CMS-CR-2018-204.- Geneva : CERN, 2018 - 6 p. Fulltext: PDF; In : Sixth Annual Conference on Large Hadron Collider Physics, Bologna, Italy, 4 - 9 Jun 2018

2018-09-24
09:46
 Searches for long-lived particles with CMS / Kutzner, <NAME> (Hamburg U.) /CMS Collaboration The current status of the searches for exotic, long-lived particles with the CMS experiment at $\sqrt{s}=13$~TeV is presented. Many theories beyond the Standard Model predict long-lived particles, for which different search approaches are utilized from those used in prompt searches. [...] CMS-CR-2018-190.- Geneva : CERN, 2018 - 8 p. Fulltext: PDF; In : Sixth Annual Conference on Large Hadron Collider Physics, Bologna, Italy, 4 - 9 Jun 2018

2018-09-24
09:46
 Search for Z' gauge boson predicted by lepton flavor and lepton flavor universality violating models with the CMS experiment at LHC / Kalsi, <NAME> (Brussels U.) /CMS Collaboration The standard model conserves lepton flavor and lepton flavor universality although these do not follow from an underlying gauge symmetry. However, the discovery of neutrino oscillations and anomalies observed in B-meson decays indicate violation of lepton flavor and lepton flavor universality, respectively. [...] CMS-CR-2018-189.- Geneva : CERN, 2018 - 8 p. Fulltext: PDF; In : Sixth Annual Conference on Large Hadron Collider Physics, Bologna, Italy, 4 - 9 Jun 2018

2018-09-24
09:46
 Precision Timing with the CMS MIP Timing Detector / Pena, Cristian (Fermilab) /CMS Collaboration The Compact Muon Solenoid (CMS) detector at the CERN Large Hadron Collider (LHC) is undergoing an extensive Phase II upgrade program to prepare for the challenging conditions of the High-Luminosity LHC (HL-LHC). A new timing layer is designed to measure minimum ionizing particles (MIPs) with a time resolution of ~30ps and hermetic coverage up to a pseudo-rapidity of $\vert \eta \vert$ = 3. [...] CMS-CR-2018-168.- Geneva : CERN, 2018 - 9 p. Fulltext: PDF; In : 18th International Conference on Calorimetry in Particle Physics, Eugene, Usa, 21 - 25 May 2018

2018-09-23
21:20
 Jet shapes of isolated photon-tagged jets in PbPb and pp collisions at ${\sqrt {\smash [b]{s_{_{\mathrm {NN}}}}}} =$ 5.02 TeV The modification of jet shapes in PbPb collisions, relative to those in pp collisions, is studied for jets associated with an isolated photon. [...] CERN-EP-2018-249 ; CMS-HIN-18-006-004. - 2018. Additional information for the analysis - CMS AuthorList - Fulltext

2018-09-23
20:40
 Search for single production of vector-like quarks decaying to a top quark and a W boson in proton-proton collisions at $\sqrt{s} =$ 13 TeV A search is presented for the single production of vector-like quarks in proton-proton collisions at $\sqrt{s} =$ 13 TeV. [...] CERN-EP-2018-230 ; CMS-B2G-17-018-003. - 2018. Additional information for the analysis - CMS AuthorList - Fulltext

2018-09-22
04:01
 Detecting a Boosted Diboson Resonance / Agashe, Kaustubh ; <NAME>. ; <NAME> ; <NAME> ; <NAME> ; <NAME>. New light scalar particles in the mass range of hundreds of GeV, decaying into a pair of $W/Z$ bosons can appear in several extensions of the SM. [...] arXiv:1809.07334 ; UMD-PP-018-05 ; CERN-TH-2018-194. - 33 p. Fulltext

Search also:


text:
# Math Help - two elementary number theory problem:

1. ## two elementary number theory problem:

problem 1:
show that for every positive integer $n$, 7 divides $3^{2n+1}+2^{n+2}$

problem 2:
show that if $n$ is any odd integer greater than 1 ,then $n^{5}-n$ is divisible by 80

2. Problem 2, as you have it written, is incorrect. For example, for n=2, $n^5-n=2^5-2=32-2=30$,
and for n=4,
$n^5-n=4^5-4=1024-4=1020$,
neither of which is divisible by 80.
Now, if you consider odd n greater that 1...

--<NAME>.

3. thank you!
sorry! for writing the question incorrect.i have edited the question :-)

4. Hello, earthboy!

$\text{[1] Show that for every positive integer }n\text{, 7 divides }3^{2n+1}+2^{n+2}$

We have: / $3^{2n+1} + 2^{n+2} \;\;=\;\;3\cdot3^{2n} + 2^2\cdot 2^n \;\;=\;\;3(3^2)^n + 4(2^n)$

. . . . . . $=\;3\cdot9^n + 4\cdot2^n \;\;=\;\;3\cdot(7+2)^n + 4\cdot2^n$

. . . . . . $=\;3\bigg(7^n + {n\choose1}7^{n-1}\!\cdot\!2 + {n\choose2}7^{n-2}\!\cdot\!2^2 + \hdots + {n\choose1}7\!\cdot\!2^{n-1} + 2^n\bigg) + 4\!\cdot\!2^n$

. . . . . . $=\;3\bigg(7^n + {n\choose1}7^{n-1}\!\cdot\!2 + {n\choose2}7^{n-2}\!\cdot\!2^2 + \hdots + {n\choose1}7\!\cdot\!2^{n-1}\bigg) + 3\!\cdot\!2^n + 4\!\cdot\!2^n$

. . . . . . $=\;3\bigg(7^n + {n\choose1}7^{n-1}\!\cdot\!2 + {n\choose2}7^{n-2}\!\cdot\!2^2 + \hdots + {n\choose1}7\!\cdot\!2^{n-1}\bigg) + 7\!\cdot\!2^n$

. . . . . . $=\;3\!\cdot\!7\bigg(7^{n-1} + {n\choose1}7^{n-2}\!\cdot\!2 + {n\choose2}7^{n-3}\!\cdot\!2^2 + \hdots + {n\choose1}2^{n-1}\bigg) + 7\!\cdot\!2^n$

. . . . . . $=\;7\!\cdot\!\bigg[3\bigg(7^{n-1} + {n\choose1}7^{n-2}\!\cdot\!2 + {n\choose2}7^{n-3}\!\cdot\!2^2 + \hdots + {n\choose1}2^{n-1}\bigg) + 2^n\bigg]$

There!

5. Originally Posted by Soroban

We have: / $3^{2n+1} + 2^{n+2} \;\;=\;\;3\cdot3^{2n} + 2^2\cdot 2^n \;\;=\;\;3(3^2)^n + 4(2^n)$

. . . . . . $=\;3\cdot9^n + 4\cdot2^n \ldots$
It's a bit easier if you use congruence arithmetic starting from this point

$3\cdot9^n+4\cdot2^n\equiv3\cdot2^n+4\cdot2^n\equiv 7\cdot2^n\equiv0\pmod{7}$

6. Originally Posted by earthboy
problem 2:
show that if $n$ is any odd integer greater than 1 ,then $n^{5}-n$ is divisible by 80

Here's one thoughtless but valid approach

Pari/GP:
Code:
for(i=1,79,if(i%2==1&&(i^5-i)%80!=0,print(i)))
In fact the restriction "greater than 1" is unnecessary.

7. When n = 2k -1 for some integer, $n^5 - n$ can be written as $(2k-1)(4k^2 + 4k + 2)(2k)(2k-2)$. The last three factors are even and 4 divides either 2k or 2k-2. So 16 divides the product. If 5 does not divide any among 2k-1 and 2k-2 and 2k, then it must leave remainder 2 or 3 when it divides n. The second factor is $(n^2 + 1)$. If n=5m+2 or 5m+3, then $(n^2 + 1)$ is $25m^2 + 20m + 5$ and $25m^2 + 30m + 10$ respectively.

8. problem 2:
show that if n is any odd integer greater than 1 ,then $n^5-n$ is divisible by 80
Actually in a more closer look $n^5-n$ is divisible by 240 (for any odd n).

9. Or a proof by induction on n: when n= 0, $3^{2n+1}+ 2^{n+2}= 3^1+ 2^2= 3+ 4= 7$ which is divisible by 7.

Assume that, for some k, $3^{2k+1}+ 2^{k+2}$ is divisible by 7. That is, $3^{2k+1}+ 2^{k+2}= 7j$ for some integer j.

Then $3^{2(k+1)+ 1}+ 2^{(k+1)+ 2}= 3^{2k+ 1+ 2}+ 2^{k+2+ 1}= 9(3^{2k+1})+ 2(2^{k+1})$ $= 2(3^{2k+1}+ 2^{2k+1}+ 7(3^{2k+1})= 2(7j)+ 7(3^{2k+1})= 7(2j+ 3^{2k+1})$ is divisible by 7.

By induction on n, then, $3^{2k+1}+ 2^{k+ 2}$ is divisible by 7 for all n.


text:
# Simplify the following expression: 101-{[(110 -: 2)-: 11]xx(10+4xx2) +7}+ [8xx(20 -: 5-1)-3xx3] -: 5?

Take your time and methodically go through each bracket and you'll eventually get to $7$

#### Explanation:

Wow... that's one big equation. Let's take this step by step.

$101 - \left\{\left[\left(110 \div 2\right) \div 11\right] \times \left(10 + 4 \times 2\right) + 7\right\} + \left[8 \times \left(20 \div 5 - 1\right) - 3 \times 3\right] \div 5$

Before we dive into this thing, let's look at the structure - there is $101$ - big brackets + smaller brackets$\div 5$. PEDMAS has us work things in brackets (Parentheses) first and since the big brackets and the smaller brackets are separated by the $+$, we can work them separately. I'm going to simplify the big brackets first:

$\left\{\left[\left(110 \div 2\right) \div 11\right] \times \left(10 + 4 \times 2\right) + 7\right\}$

There are brackets (and brackets within brackets) in this, so I'm going to work those first. There are 2 sets here and I'll work them side by side. In this first step, let's do the division and in the second set we have both addition and multiplication - so we'll do the multiplication first:

$\left\{\left[55 \div 11\right] \times \left(10 + 8\right) + 7\right\}$

I can now do the next division in the first bracket and do the addition in the second:

$\left\{5 \times 18 + 7\right\}$

We'll finish this up with the multiplication first, then the addition:

$90 + 7 = 97$ which I'll substitute back into our original:

$101 - 97 + \left[8 \times \left(20 \div 5 - 1\right) - 3 \times 3\right] \div 5$

Let's now work that second bracket:

$\left[8 \times \left(20 \div 5 - 1\right) - 3 \times 3\right]$

There's a bracket in here that we need to work first. Within that bracket there is both division and subtraction - we'll divide first:

$\left[8 \times \left(4 - 1\right) - 3 \times 3\right]$

and now the subtraction:

$\left[8 \times 3 - 3 \times 3\right]$

We now have 2 multiplications and a subtraction, so we'll do the multiplications first:

$\left[24 - 9\right] = 15$

Let's substitute that into the original:

$101 - 97 + 15 \div 5$

Almost there! We have subtraction, addition, and division. We'll do the division first:

$101 - 97 + 3$

and now the subtraction and addition:

$4 + 3 = 7$

Jul 31, 2016

=$\textcolor{m a \ge n t a}{101} \textcolor{g r e e n}{+ 3} \textcolor{b l u e}{- 87}$

=$7$

#### Explanation:

Count the number of terms and work through each one carefully.
Each term must give a number answer.

There are only 3 terms in this expression:

$\textcolor{m a \ge n t a}{101} \textcolor{b l u e}{- \left\{\left[\left(110 \div 2\right) \div 11\right] \times \left(10 + 4 \times 2\right) + 7\right\}} \textcolor{g r e e n}{+ \left[8 \times \left(20 \div 5 - 1\right) - 3 \times 3\right] \div 5}$

Let's handle one at a time.
The first is easy. it is $\textcolor{m a \ge n t a}{101}$.

$\textcolor{b l u e}{- \left\{\left[\textcolor{red}{\left(110 \div 2\right)} \div 11\right] \times \left(10 + \textcolor{red}{4 \times 2}\right) + 7\right\}}$

$\text{parentheses first, but remember to do the multiplication }$
$\text{and division before addition and subtraction}$

$\textcolor{b l u e}{- \left\{\left[\textcolor{red}{55} \div 11\right] \times \left(10 + \textcolor{red}{8}\right) + 7\right\}}$

color(blue)(-{[color(red)(5]xx(color(red)(18))+7})

color(blue)(-[color(red)(90+7)] = -97

Now for the third term:

$\textcolor{g r e e n}{+ \left[8 \times \left(20 \div 5 - 1\right) - 3 \times 3\right] \div 5}$

$\textcolor{g r e e n}{+ \left[8 \times \textcolor{red}{\left(20 \div 5 - 1\right)} - \textcolor{\mathmr{and} a n \ge}{3 \times 3}\right] \div 5}$

$\textcolor{g r e e n}{+ \left[8 \times \textcolor{red}{\left(4 - 1\right)} - \textcolor{\mathmr{and} a n \ge}{9}\right] \div 5}$

$\textcolor{g r e e n}{+ \left[8 \times \textcolor{red}{3} - \textcolor{\mathmr{and} a n \ge}{9}\right] \div 5}$

+[color(red)(24)-color(orange)(9)]-:5)

$+ \textcolor{g r e e n}{15 \div 5} = \textcolor{g r e e n}{3}$

the whole expression simplifies to
$\textcolor{m a \ge n t a}{101} \textcolor{b l u e}{- 97} \textcolor{g r e e n}{+ 3}$

=$\textcolor{m a \ge n t a}{101} \textcolor{g r e e n}{+ 3} \textcolor{b l u e}{- 97}$

=$7$


text:
# List of non-immediately-repeating permutations

Background: I am trying to design a scientific trial (computer science dissertation) in which participants will answer 8 questions. There are in fact only 4 questions but each is asked in two different ways, so there are 4 unique correct answers, let's call them a, b, c and d. So the set of correct answers will be {a, a, b, b, c, c, d, d}.

The 8 trial questions must appear in a random order however no question with the same correct answer must appear immediately after the other. So e.g. asking a question with answer a means the next question must not also have answer a.

I would like to produce a list of the permutations of {a, a, b, b, c, c, d, d} that do not repeat in this way. I am trying to write an algorithm for this but I'm having a little trouble with the mathematics. Any help would be greatly appreciated.

Could anyone give me some hints on how to either produce this list or how to reduce the list of 2520 permutations of {a, a, b, b, c, c, d, d} to only contain permutations with my condition?

Thanks.

-
P.s. if anyone can suggest software or e.g. a method to do this in Mathematica that would be fine too! – <NAME> Jan 12 '12 at 0:51
UPDATE: I believe I found a tool that does it at users.telenet.be/vdmoortel/dirk/Maths/permutations.html however I do not trust the output. It produces 864 permutations. Can anyone help me prove this is the number of permutations I was looking for? – <NAME> Jan 12 '12 at 1:03
This page answers your question: ken.duisenberg.com/potw/archive/arch04/040714sol.html though a more general solution would be nice – nolion Jan 12 '12 at 1:13
Wonderful! Thanks for that find! – Danny King Jan 12 '12 at 1:29

I know your question as a married couple seating problem: $n$ couples go to the cinema and for some reason spouses do not want to sit next to each other.

The number can be calculated by inclusion-exclusion: you calculate the total number of ways the eight answers can be arranged $8!/2^4$, subtract the number where one pair is stuck together $4\times 7!/2^3$, add the number where two pairs are stuck together ${4 \choose 2}\times 6!/2^2$, subtract ${4 \choose 3}\times 5!/2^1$ and add ${4 \choose 4}\times 4!/2^0$. This gives a result of 864.

So in general you have $$\sum_{i=0}^n (-1)^i {n \choose i} (2n-i)! / 2^{n-i}$$ and in fact the $n=0$ and $n=1$ terms cancel out.

Although there may only be 2520 permutations of your four pairs of answers, there are in fact 40320 permutations of the questions in total ($2^4$ times as many). Similarly there are $2^4$ times as many acceptable permutations of the questions where no identical answers are together, i.e. 13824 and the general term becomes $$\sum_{i=0 }^n (-2)^i {n \choose i} (2n-i)!$$

OEIS A114938 and A007060 give more terms if you need them. It looks as if for a large number of pairs, about 36.7% of permutations meet the required condition, so an easy way to generate one in particular rather than all at once might be to take a random permutation but if it fails choose another until you have one which meets the condition.

-
I just wanted to thank you for your very clear description. You have helped me tremendously to understand the theory enough to feel confident that my trial design is correct. – <NAME> Jan 22 '12 at 15:23
Harry. may I ask how you calculated that about 36.7% of permutations meet my required condition of non-consecutive permutations? – Danny King Apr 20 '12 at 2:50
Henry, not Harry. I took the second expression for large $n$ and divided it by $(2n)!$ [I could have taken the first and divided it by $(2n)!/2^n$] and then looked at what value it tended towards. For example, using the R code sum((-2)^(0:n) * choose(n,0:n) * factorial(2*n - (0:n)) ) / factorial(2*n) for $n=4$ I get 0.3428571 but for $n=64$ I get 0.366434 – Henry Apr 22 '12 at 9:59
By the way - 36.7% is approximately $\frac{1}{e}$, and I'm sure there's a reason why! – <NAME> Jan 17 at 17:14
@<NAME>: see math.stackexchange.com/questions/465318/… for yet another question which converges to $\exp(-1)$. It is a common limit for such questions – Henry Jan 17 at 19:53

In case you do still need code in Mathematica to solve your problem - this should give you exactly what you need.

Characters /@ (Select[#, StringFreeQ[#, RegularExpression["aa|bb|cc|dd"]] &] &@ Map[StringJoin, #, 1] &@Permutations[Characters["aabbccdd"]])

-
do comment if you'd like me to explain the code! – <NAME> Mar 24 '13 at 9:43


text:
Contents

# Contents

## Idea

A multi trace observable in a gauge theory is a polynomial in single trace operators (see there for more background).

## Properties

Under the AdS/CFT correspondence, single trace observables in the gauge theory correspond to single particle/string excitations on the gravity-side, while multi-trace observables correspond to multi-particle/string excitations (Liu 98, p. 6 (7 of 39), Andrianapoli-Ferrara 99, p. 13, Chalmers-Schalm 00, Section 7, Aharony-Gubser-Maldacena-Ooguri-Oz 99, p. 75)

The asymptotic boundary conditions for fields $\Phi$ on the AdS-side

$\Phi(\vec x, r) \overset{r \to 0} \sum_i \alpha_i (\vec x) r^{d -\lambda_i} + \cdots$

that correspond to multi-trace observables $W(\{\mathcal{O}_i\})$ have coefficients given by the derivative of the multi-trace polynomial by its single-trace variables $\mathcal{O}_i$:

$\alpha_i = \partial_{\mathcal{O}_i} W (\{\langle\mathcal{O}_i\rangle\})$

## Examples

### Chord diagrams as multi-trace observables in the BMN matrix model

The supersymmetric states of the BMN matrix model are temporally constant complex matrices which are complex metric Lie representations $\mathfrak{g} \otimes V \overset{\rho}{\to} V$ of $\mathfrak{g}=$su(2) (interpreted as fuzzy 2-sphere noncommutative geometries of giant gravitons or equivalently as fuzzy funnels of D0-D2 brane bound states).

A fuzzy 2-sphere-rotation invariant multi-trace observable on these supersymmetric states is hence an expression of the following form:

Here we are showing the corresponding string diagram/Penrose notation for metric Lie representations, which makes manifest that

1. these multi-trace observables are encoded by Sullivan chord diagrams $D$

2. their value on the supersymmetric states $\mathfral{su}(2) \otimes V \overset{\rho}{\to}V$ is the evaluation of the corresponding Lie algebra weight system $w_{{}_V}$ on $D$.

Or equivalently, if $\widehat D$ is a horizontal chord diagram whose $\sigma$-permuted closure is $D$ (see here) then the values of the invariant multi-trace observables on the supersymmetric states of the BMN matrix model are the evaluation of $w_{V,\sigma}$ on $\widehat D$, as shown here:

But since all horizontal weight systems are partitioned Lie algebra weight systems this way, this identifies supersymmetric states of the BMN matrix model as seen by invariant multi-trace observables as horizontal chord diagrams evaluated in Lie algebra weight systems.

## References

Discussion of multi-trace operators in super Yang-Mills theory and of their AdS-CFT dual gravity/string theory incarnation:

Textbook account:

Last revised on February 5, 2020 at 05:44:50. See the history of this page for a list of all contributions to it.


text:
# <NAME>

View page source on GitHub

# Setting Up PowerShell

This is a post about how to use Powershell, the text-based interface to Windows. Now, why would we want to use Powershell? The biggest reason is automation. A person who knows Powershell can automate repetitive tasks away.

This is Powershell:

The good news is that Powershell is already on your Windows 7+ computer. To open it, click the start button (or press the Windows key), type “powershell”, and it should find it. Go ahead and open it.

We want to do is check the version of Powershell installed. To do this, type

$PSVersionTable.PSVersion  You should see a small text table with your version number. Like this: If the “Major” field in that table is “4”, then you have the most up-to-date version (as of 2015-02-22). If not, and on Windows 7, this is probably the case, you will need to update it. There are a couple ways of updating PowerShell. The most common way is to go through Microsoft’s website, but, in keeping with my prerogative to use the command line for everything, I’m going to show you how to update it through a Powershell utility named Chocolatey. Chocolatey is a third-party command line package manager for Windows. Package manager means it will install applications for you. To install Chocolatey, follow the instructions on their website, which I explain in more detail below. Open an administrative window of Powershell. To do this, search for it in the start menu again, but this time when you see the name, right click it and select Run as Administrator. It will ask you for permission, which you must grant, and open a Powershell window that says “Administrator: Windows Powershell” in the title bar (at the very top left). Most of the tools you install from Powershell require Admin privileges. Type # allow install script Set-ExecutionPolicy Unrestricted  to allow the installation script to run, then copy iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))  into Powershell (you must copy with the mouse instead of keyboard shortcuts) to install chocolatey. One command you should memorize is choco /?, which will list help for Chocolatey. For now, though, let’s update Powershell. choco install powershell4  This makes sure you have Powershell’s dependencies (.Net version 4.5), and installs. Mine is merely telling me I already have v4 installed. Now that there is a modern version of powershell, we can start doing cool things! To enable syntax highlighting and some neat keyboard shortcuts, lets install PSReadline. Before we install PSReadline, though, we need to install PSGet, which lets us download modules to Powershell. In our Admin Powershell, copy (new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1") | iex  and hit enter. Now that it is installed, type Install-Module PSReadline  After typing another command, you’ll immediately realise that it is in a nice shade of yellow now! Very cool. PSRreadline gives you many such tricks and you should explore them all. As soon as you restart Powershell you’ll notice that your fun bag of tricks is gone. Import-Module PSReadline must either be typed into the beginning of every console session, or it must be added to a configuration file. To make a config file that will run at the beginning of every session, type new-item -path$profile -itemtype file -force

which will erase any config file in \Documents\WindowsPowerShell and create a new one, then

notepad $profile  At the beginning of this file, type Import-Module PSReadline  This file is read every time PowerShell is opened, so you get syntax-highlighting automatically. My current$profile looks like:

# edit this file with: npp $profile # reload profile in PowerShell with: .$profile
# get help with (including creation of ) profiles with: Get-Help about_Profiles

# PSReadline goodness (Ctrl + Space makes zsh-style completion guide)

# which from BASH
function which($name) {(Get-Command$name).path}

Finally, I don’t like the default Powershell app. It’s a calming shade of blue, but it’s impossible to resize properly. I use a different app called ConsoleZ. that has no qualms about sharing a screen with another app.

You’ve probably guessed how I’m going to install it.

choco install consolez

When you start up ConsoleZ, it boots to a DOS style shell, not the lovely PowerShell we want. Go to the toolbar on top and click Edit, then Settings to change this. In the Console section of the settings, click the three dots next to “Shell:” and navigate to your PowerShell installation. If you don’t know where that is, use the command

(Get-Command powershell).path

from a PowerShell window to find it. Mine is C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe. Restart the application, and Powershell is now loaded.

Okay! We now have a pretty good setup here. We have a new way to get apps (Chocolatey), a new way to get PowerShell modules (PSGet), syntax highlighting (PSReadline), and a resizeable app to use it all in (ConsoleZ). Not bad at all.


text:
# Angular momentum relative to the origin

## Homework Statement

A 2.4 kg particle-like object moves in a plane with velocity components vx = 25 m/s and vy = 80 m/s as it passes through the point with (x, y)coordinates of (3.0, −4.0) m. (Express your answers in vector form.)
(a) What is its angular momentum relative to the origin at this moment?

L=pxr

## The Attempt at a Solution

I did 2.4*the 3x3 matrix
i j k
25 80 0
3 -4 0
and this gave me 2.4*(-100-240)k = -816k.

[FONT=verdana, geneva, sans-serif]When I entered this in, I got this wrong, but without the minus sign (so 816k), the webassign accepted this as correct. However, this bothers me because isn't the correct sign supposed to be negative? [/FONT]

Related Introductory Physics Homework Help News on Phys.org
PeroK
Homework Helper
Gold Member

## Homework Equations

L=pxr
$\vec{L} = \vec{r} \times \vec{p}$

Surely?

Ah, right... r x p doesn't equal p x r and I memorised the formula the wrong way. Thank you.

PeroK
If you start from a point, the $\vec{r}$ displacement comes first. If you follow this you reach the particle, where you find the momentum $\vec{p}$.


text:
# pressure decay filtering

So, I've been dealing with a series of pressure decay curves from a pressure transducer. Each one has a waterhammer effect as a consequence of shutting down pumps. Here are examples of 3 curves:

I'm using the scipy's signal.irr to obtain the coefficients and signal.filtfilt for filtering. Here are my parameters:

#filter parameters
order = 1 (varied between 1 and 2)
wn_log_log = 0.045 (This value has been adjusted to fit most of the curves, mostly arbitrary)
rs = 0.05
rp=0.5
type = 'bessel' (between bessel and butterworth)

data points were sampled at 1 second.

I've had mixed results so far (in terms of the next calculation step).

Order 2 bessel wn= 0.065

Order 1 bessel wn= 0.045

Since I'm kind of unexperienced on signal processing I think my question will be how be able to intelligently choose a cut off frequency or adjust the filter parameters based on the nature of the signal which I assume is kind of similar.

But just a first pointer on an intelligent way of at least analyze this signal and have a better understanding of it (fourier analaysis, time domain-frequency domain methods, etc..) that would give me an idea of what would be a good cut-off frequency would be great.

Thanks

Update:

So my goal is to be able to calculate the pressure difference from the filtered pressure and the I'll calculate the first and second derivative. My goal is to get three zones using the second derivative change of sign. The filter will need to be able to get a filtered pressure signal to identify these three zones. Some "wigles" will be ok, as long as zone 1 and 2 are clearly defined (sometime using the same filter to different curves doesn't allow me to achieve that)

• What do you want to do with the output of the filter? I assume you're trying to deduce the pressure decay with the water hammer removed -- is that correct? – TimWescott Dec 2 at 21:25
• Hey Tim, yeah the idea is to eliminate as much as I can the water hammer and use the output pressure signal to calculate pressure differences and then with this pressure difference calculate the first and second derivative. – <NAME> Dec 2 at 21:52
• What's still missing are some details about what you're going to do with the information, and when. How precise do you need to be? Are "wiggles" in your second derivative a bad thing, or acceptable as long as they're small enough? Are you doing this on-line (like to trip some safety) or off-line (i.e., after the fact to analyze performance)? – TimWescott Dec 2 at 23:10
• @TimWescott Hi Tim, I made an update to my post. – <NAME> Dec 3 at 1:06
• It looks like the reverberation could be assigned a transfer function $z^n/(z^n + 0.4)$, where $n$ is the number of samples that spans one period of reverberation. Cascading your lowpass filter with one that has transfer function $(z^n + 0.4)/(1.4 z^n)$ should kill a lot of the reverberation (it won't be perfect), leaving your low-pass less to clean up. of course, any change in plumbing will need a new anti-reverb filter, unless you want to get fancy with adaptive processing. – TimWescott Dec 3 at 1:25


text:
# Finding the cutting point of a normal to a curve!

• October 21st 2008, 03:07 AM
struck
Finding the cutting point of a normal to a curve!
I have been trying to solve this by using simultaneous equations but have failed so far.

- Find the point where normal to (2,4) to y = x^2 cuts the curve again.

(1) Since the gradient of y = x^2 = 2x, gradient of the tangent to the curve should be 4. Therefore, the gradient of the normal should -1/4.

Then, y - 4 = -1/4 (x - 2) => y = -1/4x + 9/2

So I think equation of the normal should be: y = -1/4x + 9/2.. Next solving the equations simulatenously, I am left with:

x^2 + 1/4x - 9/2 = 0

But I cannot find the roots of this which would help me reach the final solution by finding two points where these two equations meet. Is there any better way of solving this equation and what am I doing wrong?

P.S. I have just begun on the differentiation.
• October 21st 2008, 03:14 AM
earboth
Quote:

Originally Posted by struck
I have been trying to solve this by using simultaneous equations but have failed so far.

- Find the point where normal to (2,4) to y = x^2 cuts the curve again.

(1) Since the gradient of y = x^2 = 2x, gradient of the tangent to the curve should be 4. Therefore, the gradient of the normal should -1/4.

Then, y - 4 = -1/4 (x - 2) => y = -1/4x + 9/2

So I think equation of the normal should be: y = -1/4x + 9/2.. Next solving the equations simulatenously, I am left with:

x^2 + 1/4x - 9/2 = 0

But I cannot find the roots of this which would help me reach the final solution by finding two points where these two equations meet. Is there any better way of solving this equation and what am I doing wrong?

P.S. I have just begun on the differentiation.

First: All your considerations and calculations are correct! (Clapping)

You can use the quadratic formula to solve this equation for x.

Since you already know one solution (x = 2 must be a solution of this equation because you calculate all intercepts!) you can try to factor out (x-2):

$x^2 + 1/4x - 9/2 = x^2 - 2x + \dfrac94x - \dfrac92 = x(x-2)+\dfrac94(x-2) = (x-2)\left(x+\dfrac94\right)$

• October 21st 2008, 03:40 AM
struck
Thanks :) . But are you sure I am doing it correctly? Because the quadratic formula or completing the square isn't helping me in finding the roots.

Edit: Ohh, but factoring it out like you did gets me the solutions. Weird :S .. Why can't the quadratic formula be applied directly? Or perhaps I did something wrong while applying the formula though I tried it twice.

Edit: but 2, and -9/4 isn't the answer so I did something wrong :(
• October 21st 2008, 08:36 AM
earboth
Quote:

Originally Posted by struck
Thanks :) . But are you sure I am doing it correctly? Yes! Because the quadratic formula or completing the square isn't helping me in finding the roots.

Why can't the quadratic formula be applied directly? Or perhaps I did something wrong while applying the formula
...

The quadratic equation $ax^2 + bx + c = 0$ has the solutions

$x = \dfrac{-b\pm\sqrt{b^2-4ac}}{2a}$

$x = \dfrac{-\frac14 \pm \sqrt{\frac1{16}-4 \cdot 1 \cdot \left(-\frac92\right)}}{2 \cdot 1} = \dfrac{-\frac14 \pm \sqrt{\frac1{16}+\frac{288}{16}}}{2 \cdot 1}$

and you'll get the values I've posted before.

By the way: The second point is of course $Q\left(-\dfrac94~,~\dfrac{81}{16}\right)$
• December 23rd 2008, 06:59 AM
M_O'Loughlin
Cutting point to normal of a curve
Quote:

Originally Posted by struck
I have been trying to solve this by using simultaneous equations but have failed so far.

- Find the point where normal to (2,4) to y = x^2 cuts the curve again.

(1) Since the gradient of y = x^2 = 2x, gradient of the tangent to the curve should be 4. Therefore, the gradient of the normal should -1/4.

Then, y - 4 = -1/4 (x - 2) => y = -1/4x + 9/2

So I think equation of the normal should be: y = -1/4x + 9/2.. Next solving the equations simulatenously, I am left with:

x^2 + 1/4x - 9/2 = 0

But I cannot find the roots of this which would help me reach the final solution by finding two points where these two equations meet. Is there any better way of solving this equation and what am I doing wrong?

P.S. I have just begun on the differentiation.

You are correct so far.
Now multiply both sides by 4 to remove the fractions
4x^2 + x - 9 = 0
Factorise: (4x + 9)(x - 2) = 0
Roots: x = -9/4, x = 2
When x = -9/4, y = 81/16
cutting point (-9/4, 81/16)


text:
# How to Divide by 1000

When you need to divide a number by $1000$, there’s a great trick you can use!

Rule

When you divide a number by $1000$, you move the point in the number three places to the left.

There are three special cases you’ll come across:

1.
If the number is not a decimal number, remember that there is always an invisible point behind the last digit. Then you can move that point three places to the left.
2.
If the number ends in a $0$, moving the point past that makes the $0$ disappear.
3.
If you have to move the point past all the digits of the number, you get empty places at the start of the number that you fill up with $0$.

You’ll use the rule in the box below a lot moving forward. Make sure you understand what it says. Below the box there will be some examples.

Rule

Dividing by $1000$ is the same as multiplying by $0.001$:

 $1÷1000=\frac{1}{1000}=0.001$

The trick of moving the decimal point when dividing by 1000, is similar to a trick you can use when multiplying by 1000.

Example 1

### Dividingby1000

a)
 $61÷1000=\text{}0.061\text{}$
b)
 $\text{}763.4\text{}÷1000=\text{}0.7634\text{}$
c)
 $20÷1000=\text{}0.020\text{}=\text{}0.02\text{}$
d)
 $\text{}0.4\text{}÷1000=\text{}0.0004\text{}$

Example 2

### Multiplyingby$\text{}0.001\text{}$

a)
$\begin{array}{llll}\hfill 61\cdot \text{}0.001\text{}& =61÷1000\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =\text{}0.061\text{}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

 $61\cdot \text{}0.001\text{}=61÷1000=\text{}0.061\text{}$

b)
 $\text{}763.4\text{}\cdot \text{}0.001\text{}=\text{}0.7634\text{}$
c)
$\begin{array}{llll}\hfill 20\cdot \text{}0.001\text{}& =20÷1000\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =\text{}0.02\text{}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

 $20\cdot \text{}0.001\text{}=20÷1000=\text{}0.02\text{}$

d)
$\begin{array}{llll}\hfill \text{}0.4\text{}\cdot \text{}0.001\text{}& =\text{}0.4\text{}÷1000\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =\text{}0.0004\text{}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

 $\text{}0.4\text{}\cdot \text{}0.001\text{}=\text{}0.4\text{}÷1000=\text{}0.0004\text{}$


text:
Home > Margin Of > What Is The Error At The 95 Confidence Level

# What Is The Error At The 95 Confidence Level

## Contents

Previously, we described how to compute the margin of error. Analysts should be mindful that the samples remain truly random as the sampling fraction grows, lest sampling bias be introduced. Basic concept Polls basically involve taking a sample from a certain population. Lane Prerequisites Areas Under Normal Distributions, Sampling Distribution of the Mean, Introduction to Estimation, Introduction to Confidence Intervals Learning Objectives Use the inverse normal distribution calculator to find the value of news

Advertisement Autoplay When autoplay is enabled, a suggested video will automatically play next. Add to Want to watch this again later? The new employees appear to be giving out too much ice cream (although the customers probably aren't too offended). Easton and <NAME>. https://en.wikipedia.org/wiki/Margin_of_error

## Margin Of Error Confidence Interval Calculator

And the uncertainty associated with the confidence interval is specified by the confidence level. But that doesn't seem to be the case and I can't get my head around why that is so. Jossey-Bass: pp. 17-19 ^ Sample Sizes, Margin of Error, Quantitative AnalysisArchived January 21, 2012, at the Wayback Machine.‹The template Wayback is being considered for merging.› ^ Lohr, <NAME>. (1999).

The larger the margin of error, the less confidence one should have that the poll's reported results are close to the true figures; that is, the figures for the whole population. It holds that the FPC approaches zero as the sample size (n) approaches the population size (N), which has the effect of eliminating the margin of error entirely. The true p percent confidence interval is the interval [a, b] that contains p percent of the distribution, and where (100 − p)/2 percent of the distribution lies below a, and Margin Of Error Definition If an approximate confidence interval is used (for example, by assuming the distribution is normal and then modeling the confidence interval accordingly), then the margin of error may only take random

Swinburne University of Technology. Margin Of Error Formula It asserts a likelihood (not a certainty) that the result from a sample is close to the number one would get if the whole population had been queried. A confidence interval gives an estimated range of values which is likely to include an unknown population parameter, the estimated range being calculated from a given set of sample data. (Definition In practice, researchers employ a mix of the above guidelines.

Basic concept Polls basically involve taking a sample from a certain population. Margin Of Error In Polls Normal Distribution Calculator The confidence interval can then be computed as follows: Lower limit = 5 - (1.96)(1.118)= 2.81 Upper limit = 5 + (1.96)(1.118)= 7.19 You should use the t Since we are trying to estimate the mean weight in the population, we choose the mean weight in our sample (180) as the sample statistic. Z Score 5.

## Margin Of Error Formula

<NAME>; <NAME> (2004). "What is a Margin of Error?" (PDF). https://en.wikipedia.org/wiki/Margin_of_error What is a Margin of Error Percentage? Margin Of Error Confidence Interval Calculator View Mobile Version Stat Trek Teach yourself statistics Skip to main content Home Tutorials AP Statistics Stat Tables Stat Tools Calculators Books Help   Overview AP statistics Statistics and probability Matrix Margin Of Error Calculator How to Compute the Margin of Error The margin of error can be defined by either of the following equations.

Margin of error = Critical value x Standard error of the sample. Figure 1 shows that 95% of the means are no more than 23.52 units (1.96 standard deviations) from the mean of 90. At X confidence, E m = erf − 1  ( X ) 2 n {\displaystyle E_{m}={\frac {\operatorname {erf} ^{-1}(X)}{\sqrt {2n}}}} (See Inverse error function) At 99% confidence, E m ≈ For example, a poll might state that there is a 98% confidence interval of 4.88 and 5.26. Margin Of Error Excel

Andale Post authorMarch 7, 2016 at 4:06 pm Thanks for catching that, Mike. This theory and some Bayesian assumptions suggest that the "true" percentage will probably be fairly close to 47%. How to Calculate a Z Score 4. More about the author Confidence level Statistic Margin of error Given these inputs, the range of the confidence interval is defined by the sample statistic + margin of error.

It can be calculated as a multiple of the standard error, with the factor depending of the level of confidence desired; a margin of one standard error gives a 68% confidence Margin Of Error Sample Size These limits were computed by adding and subtracting 1.96 standard deviations to/from the mean of 90 as follows: 90 - (1.96)(12) = 66.48 90 + (1.96)(12) = 113.52 The value For tolerance in engineering, see Tolerance (engineering).

## Although the statistical calculation is relatively simple – the most advanced math involved is square root – margin of error can most easily be determined using the chart below.

Often, however, the distinction is not explicitly made, yet usually is apparent from context. If the statistic is a percentage, this maximum margin of error can be calculated as the radius of the confidence interval for a reported percentage of 50%. ISBN0-534-35361-4. Margin Of Error Vs Standard Error Note the greater the unbiased samples, the smaller the margin of error.

Assume that the weights of 10-year-old children are normally distributed with a mean of 90 and a standard deviation of 36. gives you the standard error. In cases where the sampling fraction exceeds 5%, analysts can adjust the margin of error using a finite population correction (FPC) to account for the added precision gained by sampling close click site Often, however, the distinction is not explicitly made, yet usually is apparent from context.

Figure 1 shows this distribution. Language: English (UK) Content location: United Kingdom Restricted Mode: Off History Help Loading... The standard error can be used to create a confidence interval within which the "true" percentage should be to a certain level of confidence. ME = Critical value x Standard error = 1.96 * 0.013 = 0.025 This means we can be 95% confident that the mean grade point average in the population is 2.7

p.49.


text:
### Attitude matrix and quaternion path for m>1

[latexpage]
I noticed that somehow I did not finish with the case $m>1.$ So today, without further ado, I am posting the algorithm.
We have the body with $I_11/I_2$, where $d$ is, as always, the ratio of the doubled kinetic energy to angular momentum squared.
Then we define

\begin{eqnarray}
A_1&=&\sqrt{\frac{I_1(dI_3-1)}{I_3-I_1}},\\
A_2&=&\sqrt{\frac{I_2 (1-dI_1)}{I_2-I_1}},\\
A_3&=&\sqrt{\frac{I_3 (1-dI_1)}{I_3-I_1}},\\
B&=&\sqrt{\frac{(dI_3-1)(I_2-I_1)}{I_1I_2I_3}},\\
\mu&=&\frac{1}{m}=\frac{(1-dI_1)(I_3-I_2)}{(dI_3-1)(I_2-I_1)}.
\end{eqnarray}
\begin{eqnarray}
L_1(t)&=&A_1\,\dn(Bt,\mu),\\
L_2(t)&=&A_2\,\sn(Bt,\mu),\\
L_3(t)&=&A_3\,\cn(Bt,\mu).
\end{eqnarray}

\alpha=\frac{I_3-I_1}{\sqrt{\frac{I_1(dI_3-1)(I_2-I_1)I_3}{I_2}}},

\nu=\frac{I_3-dI_1I_3}{I_1-dI_1I_3}.

\psi(t)=\frac{t}I_3-\arctan\left((A_2/A_1)\mathrm{sd}(Bt,\mu) \right)+\alpha \Pi(\nu,\am(Bt,\mu),\mu),\

Q_1(t)=\begin{bmatrix}1-\frac{L_1(t)^2}{1+L_3(t)}&-\frac{L_1(t)L_2(t)}{1+L_3(t)}&-L_1(t)\\
-\frac{L_1(t)L_2(t)}{1+L_3(t)}&1-\frac{L_2(t)^2}{1+L_3(t)}&-L_2(t)\\L_1(t)&L_2(t)&L_3(t)\end{bmatrix}.

Q_2(t)=\begin{bmatrix}\cos\psi(t)&-\sin\psi(t)&0\\\sin\psi(t)&\cos\psi(t)&0\\0&0&1
\end{bmatrix}.

Q(t)=Q_2(t)Q_1(t).

\begin{eqnarray}
q_0(t)&=&\sqrt{\frac{1+L_3(t)}{2}}\cos\frac{\psi(t)}{2},\\
q_1(t)&=&\frac{1}{\sqrt{2(1+L_3(t))}}\left(L_2(t)\cos\frac{\psi(t)}{2}+L_1(t)\sin\frac{\psi(t)}{2}\right),\\
q_2(t)&=&\frac{1}{\sqrt{2(1+L_3(t))}}\left(L_2(t)\sin\frac{\psi(t)}{2}-L_1(t)\cos\frac{\psi(t)}{2}\right),\\
q_3(t)&=&\sqrt{\frac{1+L_3(t)}{2}}\,\sin\frac{\psi(t)}{2},\\
q(t)&=&(q_0(t),q_1(t),q_2(t),q_3(t))=q_0(t)+\mathbf{i}\,q_1(t)+\mathbf{j}\,q_1(t)+\mathbf{k}\,q_3(t).
\end{eqnarray}

I use the above formulas to draw a stereographic projection of one particular path. So, I take $I_1=1,I_2=2,I_3=3,d=0.5000001$, and do the parametric plot of the curve $\mathbf{r}(t)$ in $\mathbf{R}^3,$
with
$\mathbf{r}(t)=\left(\frac{q_1(t)}{1-q_0(t)},\frac{q_2(t)}{1-q_0(t)},\frac{q_3(t)}{1-q_0(t)}\right).$
I show below two plots. One with $t\in(-1000,1000),$ and one with $t\in(-10000,10000).$ For this selected value of $d,$ the time between consecutive flips, given by the formula
$$\tau =4\mathrm{EllipticK}(\mu)/B= 116.472.$$
So, for $t\in(-10000,10000)$ we have somewhat less than 200 flips, and the lines are getting rather densely packed in certain regions.
Notice that is just one geodesic line, geometrically speaking the straightest possible line in the geometry determined by the inertial properties of the body.

It is this “geometry”that will become the main subject of the future notes.

How can such a line be “straight”? Well, it is….

### The mysterious paths on the three-sphere

Wherever you are, whatever you do, there is a certain special direction that takes you out of the infinite labyrinth, and leads to the reincarnation cycle getting closer and closer to the ideal path. Ordinary people do not know about it. Warriors do know.

Beyond a certain point there is no return. This point has to be reached.
<NAME>

I am discussing geodesic lines on the three-sphere, geodesics of the left-invariant metric determined by asymmetric rigid body. There is a special, very special class of geodesics there. At every point there is a special direction. If you start the geodesic in this special direction – it has, at both ends, in the future and in the past – a limit cycle/circle. Enough esoteric talk. Let’s go to the math. The following math describes one such geodesic line. Other are obtained by left translations.
[latexpage]
$I_1,I_2,I_3$ are moments of inertia of our rigid body, ordered as $I_1 But there is another possibility, when this uniform rotation along the middle axis is only asymptotic. It happens in the infinite past and in the infinite future. But only approximately with the real life, and excluding the short metamorphosis period. This is the trajectory described by the formulas above. Here is the trajectory for time t from$t=-20000$to$t=20000$: And here is this trajectory together with asymptotic circles. Here the red circle is for the bad past, the blue circle, for the good future. Under microscope it reveals rich structure – infinite mystery. ### Approaching the ultimate answer for m<1 [latexpage] Far out in the uncharted backwaters of the unfashionable end of the Western Spiral arm of the Galaxy lies a small unregarded yellow sun. Orbiting this at a distance of roughly ninety-eight million miles is an utterly insignificant little blue-green planet whose ape-descended life forms are so amazingly primitive that they still think digital watches are a pretty neat idea. This planet has—or rather had—a problem, which was this: most of the people living on it were unhappy for pretty much of the time. Many solutions were suggested for this problem, but most of these were largely concerned with the movements of small green pieces of paper, which is odd because on the whole it wasn’t the small green pieces of paper that were unhappy. And so the problem remained; lots of the people were mean, and most of them were miserable, even the ones with digital watches. So sets <NAME> the scenery in his Hitchhiker’s Guide to the Galaxy. And he is right, neither green pieces of paper nor digital watches will make us happy. But digital computers – that’s another story. Digital computer, with some patience and determination made me happy today (or I made him happy, doesn’t mater which way), and I am going now to share my happiness with you. Because there is no true happiness which is not shared happiness. And no, I am not going to calculate the answer to the Ultimate Question of Life, the Universe and Everything. Though we will be not very far away from obtaining such an answer. But please, don’t panic! In the last post I have perversely asked this question: So, my guess is that the formula (23) in the paper has wrong signs. What to do? Should I write to the authors? Now I admit, I was not completely sincere. I was teasing, I was playing with You, the Reader. Because the truth it that months ago I discovered wrong signs in the formula (20) of this paper. So, being young and naive, I wrote to prof. Zanna announcing my discovery. Here is the reply I got: So, we should not consider the paper as being sacred, typos sometimes happen. But software – that is something different. Software is a serious matter. The software has been thoroughly tested, so if we test our software against something that has been thoroughly tested, that will be even better than through tests of our own code! In The Hitchhiker’s Guide to the Galaxy the answer came as forty two. “I checked it very thoroughly,” said the computer, “and that quite definitely is the answer. We will also check very thoroughly. Our answer will not exactly be forty two. But we will come out with a quaternion, quaternio, quatro – it can explain 4. It remains to explain the last 2. We will be testing example four from the code 903 – you need to read a couple of previous posts if you do not know what I am talking about. Alternatively, you can download the file 903.zip, unzip it, go to the folder 903\Fortran77\Drivers, and contemplate the following three files there: driver_example4.f, init_example4.dat, out_example4.dat. All three with number four. That is what we will be doing now. According to README.txt driver_example3.f (example for FRB integration with many steps of lenght h from 0 to Tfin, using semi-exact methods) To be linked with frb_step.f driver_example4.f (Like driver_example3.f but uses quaternions) To be linked with quat_step.f Both examples have the body with the same moments of inertia, but initial momenta are different. So it is impossible to compare their outputs. We return to this issue later on, for now let us concentrate on example4. The moments of inertia can be read from init_example4.dat. They are \begin{eqnarray} I_1&=&1.0,\\ I_2&=&1.012686988782515,\\ I_3&=&3.306237422473038 \end{eqnarray} So it is the same “future physics” body that we have already met in , when discussing example2. Then comes initial angular momentum (which sometimes I call$\mathbf{m}$and sometimes$\methbf{L}$: \begin{eqnarray} m_1(0)&=&-0.544332842491675,\\ m_2(0)&=&0.729131780907662,\\ m_3(0)&=&-0.414811526666455. \end{eqnarray} As in Spinning Gulliver among giants we have $$1/I_2= 0.987472.$$ We calculate$d$$d =\frac{m_1(0)^2}{I_1}+\frac{m_2(0)^2}{I_2}+\frac{m_3(0)^2}{I_3}=0.873315.$ So$d<1/I_2,$therefore we have$m<1$case. Now I am presenting the complete$m<1$algorithm based on the method introduced in Standing on the shoulders of giants – Reboot. The case$m<1.$\begin{eqnarray} A_1&=&\sqrt{\frac{I_1 (d I_3-1)}{I_3-I_1}},\\ A_2&=&\sqrt{\frac{I_2 (d I_3-1)}{I_3-I_2}},\\ A_3&=&\sqrt{\frac{I_3 (1-d I_1)}{I_3-I_1}},\\ B&=&\sqrt{\frac{(1-d I_1) (I_3-I_2)}{I_1 I_2 I_3}},\\ m&=&\frac{(d I_3-1) (I_2-I_1)}{(1-d I_1) (I_3-I_2)}. \end{eqnarray} The solution$\mathbf{L}(t)$of the Euler's equations has two trajectories: one with$L_3(t)>0$is given by \begin{eqnarray} L_1(t)&=&A_1\, \cn (Bt,m),\\ L_2(t)&=&A_2\, \sn (Bt,m),\\ L_3(t)&=&A_3\, \dn (Bt,m), \end{eqnarray} while the other one, with$L_3(t)<0$is given by \begin{eqnarray} L_1(t)&=&-\,A_1\, \cn (Bt,m),\\ L_2(t)&=&A_2\, \sn (Bt,m),\\ L_3(t)&=&-\,A_3\, \dn (Bt,m). \end{eqnarray} With constants$\alpha$and$\nu$defined as $$\alpha=\frac{I_3-I_1}{\sqrt{\frac{I_1(1-d I_1)(I_3-I_2)I_3}{I_2}}},$$ $$\nu=\frac{I_1-dI_1I_3}{I_3-dI_1I_3}$$ we set the phase variable$\psi(t)$as $$\psi(t)=\frac{t}I_1-\arctan\left((A_2/A_3)\mathrm{sd}(Bt,m) \right)-\alpha \Pi(\nu,\am(Bt,m),m),\$$ where the Jacobi function$\mathrm{sd}$is defined as$\mathrm{sd}(u,m)=\sn(u,m)/\dn(u,m).$Then the quaternionic attitude solution is given by$q(t)=W(t)+\mathbf{i}X(t)+\mathbf{j}Y(t)+\mathbf{k}Z(t),\$ with \begin{eqnarray} W(t)&=&\cos \frac{\psi(t)}{2}\sqrt{\frac{1+L_1(t)}{2}},\\ X(t)&=&\sin \frac{\psi(t)}{2}\sqrt{\frac{1+L_1(t)}{2}},\\ Y(t)&=&\frac{L_3(t)\cos \frac{\psi(t)}{2}+L_2(t)\sin \frac{\psi(t)}{2}}{\sqrt{2(1+L_1(t))}},\\ Z(t)&=&\frac{-L_2(t)\cos \frac{\psi(t)}{2}+L_3(t)\sin \frac{\psi(t)}{2}}{\sqrt{2(1+L_1(t))}} \end{eqnarray}

My original intention was to verify the above with the 903 paper code using Mathematica, and, if there will be differences in the output, to fix the problems.
But now this Sunday is coming to the end, and I am getting tired. And before sleep I want to watch the second half of the movie “Master and Commander”. It fits this post:

<NAME> gave the film 4 stars out of 4, saying that “it achieves the epic without losing sight of the human”


text:
# make AucTeX structure aware?

TeXStudio seems to be aware of the interdependencies of files and internal structure (e.g., blocks for beamer posters shown in example below).

For instance, the left column panel in TeXStudio shows the files included in the master file and the block environments are recognized - it's easy to click and navigate to them.

Is there similar functionality in AucTeX?

AUCTeX has support for multi-file documents, explained in detail in the manual (auctex) Multifile. After opening a 'master' file that includes many other chapter files, the reftex TOC command (bound to C-c = by default) presents me with a complete TOC include all the sections and subsections in the included files. The reftex manual node (reftex) Table of Contents explains all the options.

The TOC comes with support for sectioning commands, and also labels. It doesn't appear to support displaying other environments, such as your BLOCKS, by default, but can apparently be extended to do so:

The section macros recognized by RefTeX are all LaTeX section macros (from ‘\part’ to ‘\subsubparagraph’) and the commands ‘\addchap’ and ‘\addsec’ from the KOMA-Script classes. Additional macros can be configured with the variable ‘reftex-section-levels’. It is also possible to add certain LaTeX environments to the table of contents. This is probably only useful for theorem-like environments. See Defining Label Environments for an example.

Here's what the TOC for one of my multi-file documents looks like, with file boundaries and labels both turned on:

 File master.tex starts here
>               master
File frontmatter.tex starts here
* ACKNOWLEDGEMENTS
>               ack
* Contributions of Authors
>               abstract
File frontmatter.tex ends here
File intro.tex starts here
1 Introduction
>               chap:intro
File intro.tex ends here
File lit_review.tex starts here
2 Literature Review
>               chap:lit_review
2.1 The Species
>               sec:lit_species
2.2 The Niche
>               sec:lit_niche
2.3 \textit{Carex}
>               sec:lit_carex
2.4 Molecular Markers: Amplified Fragment Length Polymorphisms
>               sec:lit_aflp
>               tab:aflp_comp
>               tab:aflp_examp

Note that every line in the TOC is an active link to the appropriate location in a file.


text:
# Robust Z-scores for skewed and long-tails distributions

Hope you can help me with my 2 (or 3) questions here below.

I want to add/sum some variables having different units. I decide to standardize (Z-scores) the values and then, once transformed in Z-scores, I can sum them.

The problem is that all my variables distributions are not approximatively gaussian. I know that my distributions don't need to be gaussian to calculate Z-scores, however, if the distributions are not close to gaussian, I will give more or less weight to unusually high or low values. As I don't want to give more or less weight to some values, I decide, for the distributions that are skewed (and or have some outliers) to use the Sn robust estimator, in the robustbase package like this :

enter code hereA=Dataset$A enter code hereSn(A, constant=1.1926) For the distributions that are not close enough to gaussian (skewed and/or outliers), if I use the MAD (median absolute deviation), I can combine Z-scores from regular and robust estimators, but to make the standard deviation of the robust estimator equivalent to the standard deviation of the regular standard deviation, we need to do the following : (Value – Median) / (1.486 x MAD) However, if my data is skewed using MAD may not be a good idea : MAD would overestimate the variability of my data. That is the reason why I use the Sn robust estimator. 1) If I decide to use the robust Sn estimator, can I calculate a kind of Z-score using this formula : (Value – Median) / Sn ? If not, what would be the formula to get Z-scores ? 2) Now, if my distribution is (slightly) skewed and have long-tailed, what would you use ? MAD ? Sn ? Other robust estimators ? And which formula would you use to calculate the Z-scores ? I build a synthetic indicator of the quality of the educational systems. I have 5 criteria : a) effectiveness of the education system b) efficiency of the education system c) equity of the educations system d) student engagement e) teacher engagement The synthetic indicator of quality is composed of five criteria (here above) themselves consisting each of 6 statistics, a total of 30 statistics. My goal is to sum /add all these 30 statistics to get a score and then to be able to establish a ranking. As all 30 statistics are not of the same units, their aggregation is only possible by using the Z-scores method of removing from each observation the mean of all the observations and dividing the result by the standard deviation. By suming these 6 statistics transformed in Z-scores (so summing 6 Z-scores) for each of the 5 criteria and then by dividing by 6, I will obtain a general score for each of the 5 criteria (I could say an averaged Z-score for effectiveness, for efficiency, for equity, for student engagement and for teacher engagement). Then, I sum these 5 general averaged Z-scores (the averaged Z-score for effectiveness, the averaged Z-score for efficiency, the average Z-score for equity, ...), I will obtain my final Z-scores. So my question is the following : Out of the 30 statistics that are summed/added, some distributions are not so closed to gaussian (at least are not symmetrical enough) and may have outliers and some have long-tailed. I have all kind of weird distributions. Which robust estimators to use to calculate robust Z-scores ? MAD ? Sn ? AO ? Other ? And thus which formula to use to calculate thses Z-scores ? • I would use the AO score instead of the Z score. The AO score is described in equation 3 of this paper. You can start by setting the MC to 0 to simplify the computations --in which case you only need access to a function to a quantile() function --like quickselect-- – user603 Oct 19 '17 at 22:39 • Many thanks for your suggestion. I did not know the AO. After having had a glance at equation (3) as suggested by you, let me know if I am wrong but the AO can not be negative ? – varin sacha Oct 20 '17 at 11:56 • Yes you can! I guess, I mean you can always multiply$AO(x_i, X_n)$by$\text{sign}(x_i-\text{med}(X_n))\$. I'm not quiet so sure about the idea of summing these things though. What are you trying to accomplish is not all that clear to me quiet yet. See, the premise: ''I want to add/sum some variables having different units.'' and I wonder ''but why?'' – user603 Oct 20 '17 at 13:18
• My comment was too long, so I decide to edit my previous question and at the end of my previous question, I precise my ultimate goal. Many thanks for your time. – varin sacha Oct 20 '17 at 14:01


text:
# Using 0 nonce for AES-256 in CTR mode

My question is: I'm using AES with 256 bits key in CTR mode. Will it be less secure if I use a random key and static zero nonce?

key = random;
nonce = 0;

• To TL;DR the main answer here, both of these options are extremely insecure if the key is ever used to encrypt more than one plaintext. CTR mode (and CTR-based modes like GCM) fail catastrophically in this case. It is a trivial exercise to completely reveal plaintexts encrypted this way. If keys are guaranteed to only ever encrypt one single plaintext, then both schemes (fixed-zero IV and fixed random IV) are equivalent. – <NAME> Feb 22 '20 at 18:59

There will no problem with using the nonce as 0 but only for once with the same key as the nonce says number used once. Remember we can generate the nonce randomly and at it has $$1/2^{128}$$ chance to appear.

CTR mode turns a block cipher into a stream cipher. As in all stream cipher, if you use the same stream again it will be vulnerable to crib-dragging attacks. In CTR mode, it is using the same nonce again with the same key.

Never use nonce more than once with the same key. To prevent the reselection of a nonce with a good random number generator, you should stop using the same key much before $$\sqrt{2^{128}} = 2^{64}$$ nonce generation, that comes from the birthday paradox. Alternatively, you can use an LFSR based solution to generate the nonce deterministically as suggested by the NIST.

so, if I use different keys and zero nonce it will be secure?

With the nonces, you can use the same key for a long time, Using always 0 is no more CTR mode. It is completely a new mode of operation. I don't see a problem with that, except as Maarten commented; the Key Check values:

These are often calculated by performing a single block encryption with all zero's. Please make sure that those are not used or published, or you will be exposing the initial part of your key stream.

It is better to use a HKDF to derive a key and a nonce very easily with your randomly generated key using salt and info

Extract:

$$\text{HKDF-Extract}(salt, IKM) \to PRK,$$where PRK is a pseudorandom key, IKM is the input key material. If your random source is good, you may not need Extract.

and

Expand:

$$\text{KDF-Expand}(PRK, info, L) \to OKM,$$where OKM is Output Keying Material. L is the desired key length.

Note: Rogaway, in their seminal work: Evaluation of Some Blockcipher Modes of Operation, in figure 1.2: summaries of their findings — confidentiality modes. CTR:

An IV-based encryption scheme, the mode achieves indistinguishability from random bits assuming a nonce IV. As a secure nonce-based scheme, the mode can also be used as a probabilistic encryption scheme, with a random IV. Complete failure of privacy if a nonce gets reused on encryption or decryption. The parallelizability of the mode often makes it faster, in some settings much faster, than other confidentiality modes. An important building block for authenticated-encryption schemes 1. Overall, usually the best and most modern way to achieve privacy-only encryption.

Therefore stick the expert's findings!

1 : AES-GCM that uses CTR and Even a single AES-GCM nonce reuse can be catastrophic.

• so, if I use different keys and zero nonce it will be secure? – Hersgori Feb 22 '20 at 11:58
• because I use aes-256 for this with 32-bytes key – Hersgori Feb 22 '20 at 13:08
• Only if you use different keys for every plaintext, yes. Honestly though, the consequences of a mistake here are so severe and the benefits in almost all cases so minor that I would virtually never recommend doing this in practice. – <NAME> Feb 22 '20 at 19:01