text:
singular value decomposition of a 2 x 2 complex matrix

This should be easy, but...

I would like to express the singular value decomposition of a 2 x 2 complex matrix $A$ as function of its coefficients $A_{ij}$. In "closed form", no intermediate values, straight up.

What I mean is that if I express the SVD in terms of eigenvalues, say, then I have to write those eigenvalues in terms of the $A_{ij}$'s and substitute. In other words, I don't want to write the solution to SVD in terms of the solution of something else.

Possibly useful background:

In the Wikipedia page on SVD, if you write $A$ as a linear combination of the Pauli matrices (and identity), the singular values are expressed in terms of the corresponding coefficients. But then I don't know how you find those coefficients, so I can't tell if they themselves are in "closed form".

http://en.wikipedia.org/wiki/Singular_value_decomposition

Thanks.

• Have you tried yourself? – sebas Mar 4 '14 at 23:29
• Is this a structure tensor in the form of $[a, b; b, c]$ ? – Tolga Birdal Mar 5 '14 at 17:33

The Pauli matrices and the identity matrix form an orthogonal basis of the space of $2\times 2$ matrices, so finding the expansion coefficients amounts to just a projection onto this basis (i.e., you need to form the inner product of your matrix onto each element of this basis).
But, for $2\times 2$ matrices, the answer is simple enough to write things down right away. The eigenvalues are those values $\lambda$ for which $$\det (A-\lambda I) = \det \begin{pmatrix} a_{11}-\lambda & a_{12} \\ a_{21} & a_{22}-\lambda \end{pmatrix} = 0.$$ This is a quadratic equation in $\lambda$: $$(a_{11}-\lambda)(a_{22}-\lambda)-a_{12}a_{21} = 0$$ for which you can write down the roots immediately as a function of the elements of $A$.


text:
# Finding mimimum of the unique, weak solution to an IVP

PDE Evans, 2nd edition, page 134

Consider the initial-value problem \begin{cases} u_t+\frac 12|Du|^2=0 & \text{in }\mathbb{R}^n \times (0,\infty) \\ \qquad \qquad \, \, \, \, u = |x| & \text{on } \mathbb{R}^n \times \{t=0\} \tag{49} \end{cases} The Hopf-Lax formula for the unique weak solution of $(49)$ is $$u(x,t)=\min_{y \in \mathbb{R}^n} \left\{\frac{|x-y|^2}{2t}+|y| \right\} \tag{50}$$ Assume $|x| > t$. Then \begin{align}D_y \left(\frac{|x-y|^2}{2t} + |y| \right) = \frac{y-x}{t}+\frac{y}{|y|} & (y \not=0)\end{align} and this expression equals $0$ if $x=y+\frac{y}{|y|}t, y=(|x|-t)\frac{x}{|x|} \not=0$. Thus $(x,t)=|x|-\frac t2$ is $|x| > t$. If $|x| > t$, the minimum in $(50)$ is attained at $y=0$. Consequently $$u(x,t)=\begin{cases}|x|-\frac{t}{2} & \text{if }|x| > t \\ \qquad\frac{|x|^2}{2t} & \text{if }|x| \le t \end{cases}$$

Since $(50)$ calls for minimums, we get the $u(x,t)$ to be the formula above. My question pertains only the top formula of the bracket.

If $x > t$, then we are supposed to get $|x|-\frac{t}{2}$. My book doesn't show this, and I have trouble deriving that top formula. How can I verify this? (I understand getting the bottom formula though.) All I have so far:

Substitute $y$ with $(|x|-t)\frac{x}{|x|}$ into $(50)$. Then for all $|x| > t$ \begin{align}u(x,t)&=\min_{y\in\mathbb{R}^n} \left\{\frac{|x-y|^2}{2t} + |y| \right\}\\&=\min_{y\in\mathbb{R}^n} \left\{\frac t2 + (x-t) \right\}\\&=\min_{y\in\mathbb{R}^n}\left\{\frac t2 + |x|-t \right\}\\&=\min_{y\in\mathbb{R}^n}\left\{|x|-\frac t2 \right\} \\&=|x|-\frac t2 \end{align} where $x=|x|$ because $|x|>t\ge0$, and $x-t=|x-t|$ because $|x-t|\ge|x|-|t|>t-|t|=0$.

format: plain


text:
## LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

 Options: Use Forum View Use Monospaced Font Show Text Part by Default Condense Mail Headers Message: [<< First] [< Prev] [Next >] [Last >>] Topic: [<< First] [< Prev] [Next >] [Last >>] Author: [<< First] [< Prev] [Next >] [Last >>]

"William F. Hammond" <[log in to unmask]> writes:

> 1.  "\noblankpars": In using a program to translate another markup to
> LaTeX, if one wants to have a reasonable level of human readability in
...
> blank line as a new-paragraph command under LaTeX is a pass-through to
> "TeX", I do not know whether this could be done.

\catcode\endlinechar=10

> 2.  "\commandend{;}":  LaTeX practice such as
>
>                        "\LaTeX{} is great"
>
> does not always leave quite the right space after the first word.

You are mistaken. It leaves a normal interword space. Unless you are
talking about some macro that you have yourself defined without paying
sufficient attention to spacefactor or something. Try looking at the
LaTeX definition of \TeX (not the plain TeX definition, which is
inferior).

Or unless you are talking about math mode. In math mode the "{}"
should certainly be omitted or it will tend to screw up the standard
of whether it is in math mode or not anyway, since (for example) you
should be translating &ohat; to \^{o} in text but \hat{o} in math.

If you really want a 100% consistent command terminator that you can use
in all contexts I suggest \+:

\def\+{}

... \LaTeX\+ is great ...

That is only for commands that take no arguments. For commands whose
first argument is a mandatory argument the { is a sufficient
terminator; for commands whose first argument is optional (like
\pagebreak or \\) you cannot put anything in there without screwing up
the lookahead. For that I suggest defining your own variants that use
mandatory arguments.

> 3.  "\strictargoptsyntax":  In auto-generating lists, a programmer
> either needs to check that the first character of item content is not
> '[' or else routinely generate "\item[{}]", filling in the braces when
> appropriate.

\item{} will give you the automatic number and ignore any
following "[" character.


text:
Home > Mean Square > Mean Square Error Wikipedia

# Mean Square Error Wikipedia

## Contents

The linear MMSE estimator is the estimator achieving minimum MSE among all estimators of such form. ISBN9780199233991. ^ Cartwright, Kenneth V (Fall 2007). "Determining the Effective or RMS Voltage of Various Waveforms without Calculus" (PDF). For example, when measuring the average difference between two time series x 1 , t {\displaystyle x_{1,t}} and x 2 , t {\displaystyle x_{2,t}} , the formula becomes RMSD = ∑ Minimum Mean Squared Error Estimators "Minimum Mean Squared Error Estimators" Check |url= value (help). http://threadspodcast.com/mean-square/mean-square-error-vs-root-mean-square-error.html

For a zero-mean sine wave, the relationship between RMS and peak-to-peak amplitude is: Peak-to-peak = 2 2 × RMS ≈ 2.8 × RMS {\displaystyle {\mbox{Peak-to-peak}}=2{\sqrt {2}}\times {\mbox{RMS}}\approx 2.8\times {\mbox{RMS}}\,} . Oxford University Press. 2009. This property, undesirable in many applications, has led researchers to use alternatives such as the mean absolute error, or those based on the median. It will be shown that the standard deviation of all possible sample means of size n=16 is equal to the population standard deviation, σ, divided by the square root of the https://en.wikipedia.org/wiki/Mean_squared_error

## Root Mean Square Error Formula

Cengage Learning Business Press. A rectangular pulse wave of duty cycle D, the ratio between the pulse duration ( τ {\displaystyle \tau } ) and the period (T); illustrated here with a = 1. Probability and Statistics (2nd ed.). Other uses of the word "error" in statistics See also: Bias (statistics) The use of the term "error" as discussed in the sections above is in the sense of a deviation

Cambridge: Cambridge University Press. p.229. ^ DeGroot, Morris H. (1980). Because the 5,534 women are the entire population, 23.44 years is the population mean, μ {\displaystyle \mu } , and 3.56 years is the population standard deviation, σ {\displaystyle \sigma } Mean Square Error Definition If that sum of squares is divided by n, the number of observations, the result is the mean of the squared residuals.

It is useful to compare the standard error of the mean for the age of the runners versus the age at first marriage, as in the graph. Root Mean Square Error Interpretation The root-mean-square deviation (RMSD) or root-mean-square error (RMSE) is a frequently used measure of the differences between values (sample and population values) predicted by a model or an estimator and the www.otexts.org. check it out The mean absolute error used the same scale as the data being measured.

It is rare that the true population standard deviation is known. Mean Square Error Calculator Thus, we can combine the two sounds as y = w 1 y 1 + w 2 y 2 {\displaystyle y=w_{1}y_{1}+w_{2}y_{2}} where the i-th weight is given as w i = Statistical decision theory and Bayesian Analysis (2nd ed.). The RMSD of predicted values y ^ t {\displaystyle {\hat {y}}_{t}} for times t of a regression's dependent variable y t {\displaystyle y_{t}} is computed for n different predictions as the

## Root Mean Square Error Interpretation

This is useful when the MVUE does not exist or cannot be found. https://en.wikipedia.org/wiki/Standard_error New York, N.Y: Marcel Dekker. Root Mean Square Error Formula In statistics, the mean squared error (MSE) or mean squared deviation (MSD) of an estimator (of a procedure for estimating an unobserved quantity) measures the average of the squares of the Root Mean Square Error Example Belmont, CA, USA: Thomson Higher Education.

In such case, the MMSE estimator is given by the posterior mean of the parameter to be estimated. news n is the size (number of observations) of the sample. Haykin, S.O. (2013). Likewise, the sum of absolute errors (SAE) refers to the sum of the absolute values of the residuals, which is minimized in the least absolute deviations approach to regression. Mean Absolute Error

Mean squared error From Wikipedia, the free encyclopedia Jump to: navigation, search "Mean squared deviation" redirects here. As a consequence, to find the MMSE estimator, it is sufficient to find the linear MMSE estimator. When normalising by the mean value of the measurements, the term coefficient of variation of the RMSD, CV(RMSD) may be used to avoid ambiguity.[3] This is analogous to the coefficient of http://threadspodcast.com/mean-square/mean-square-error-and-root-mean-square-error.html Prediction and Improved Estimation in Linear Models.

The expressions can be more compactly written as K 2 = C e 1 A T ( A C e 1 A T + C Z ) − 1 , {\displaystyle Mean Square Error Matlab This property, undesirable in many applications, has led researchers to use alternatives such as the mean absolute error, or those based on the median. doi:10.2307/2340569.

## Another special case, useful in statistics, is given in #Relationship to other statistics.

Then the F value can be calculated by divided MS(model) by MS(error), and we can then determine significance (which is why you want the mean squares to begin with.).[2] However, because time (in degrees), showing RMS, peak (PK), and peak-to-peak (PP) voltages. The RMSD represents the sample standard deviation of the differences between predicted values and observed values. Root Mean Square Error Matlab The concept of a sampling distribution is key to understanding the standard error.

Notice that the population standard deviation of 4.72 years for age at first marriage is about half the standard deviation of 9.27 years for the runners. For a cyclically alternating electric current, RMS is equal to the value of the direct current that would produce the same power dissipation in a resistive load.[1] In econometrics the root Let the fraction of votes that a candidate will receive on an election day be x ∈ [ 0 , 1 ] . {\displaystyle x\in [0,1].} Thus the fraction of votes check my blog But this can be very tedious because as the number of observation increases so does the size of the matrices that need to be inverted and multiplied grow.

In statistics the mean squared prediction error of a smoothing or curve fitting procedure is the expected value of the squared difference between the fitted values implied by the predictive function When the observations are scalar quantities, one possible way of avoiding such re-computation is to first concatenate the entire sequence of observations and then apply the standard estimation formula as done For the purpose of hypothesis testing or estimating confidence intervals, the standard error is primarily of use when the sampling distribution is normally distributed, or approximately normally distributed. This often leads to confusion about their interchangeability.

When the true underlying distribution is known to be Gaussian, although with unknown σ, then the resulting estimated distribution follows the Student t-distribution. Note that, although the MSE (as defined in the present article) is not an unbiased estimator of the error variance, it is consistent, given the consistency of the predictor. For a sampled signal x [ n ] = x ( t = n T ) {\displaystyle x[n]=x(t=nT)} , where T {\displaystyle T} is the sampling period, ∑ n = 1 The fourth central moment is an upper bound for the square of variance, so that the least value for their ratio is one, therefore, the least value for the excess kurtosis

CS1 maint: Multiple names: authors list (link) ^ "Coastal Inlets Research Program (CIRP) Wiki - Statistics". Mathematical Methods and Algorithms for Signal Processing (1st ed.).


text:
I’ve been lucky enough to have worked on many interesting and challenging projects throughout my career, especially in the space of detecting “bad” people.

As one can imagine, much focus is placed on detecting persons of interest in the government sector. After all, you can’t ensure national security, for instance, without being able to detect behaviours and profiles of those that mean to create harm.

What you soon realise in this domain is the fact that most of these “baddies” work as part of a network, and detecting those networks is anything but trivial. Picking out one bad person can often be relatively easy, but surfacing the entire network they’re connected to can be a very challenging problem.

To enable detection of such networks, we often must turn to the field of graph analytics, also known as network analysis. It allows us to efficiently solve specific classes of problems that have data arranged in a certain way.

It has far reaching applications, such as in fraud detection, social network analysis, and in physical environments, such as power grids.

Graph analytics is based on a fundamentally important area of mathematics known as Graph Theory.

###### The Theory of Graphs

In this context, graphs are defined as mathematical structures used to study pairwise relationships between objects and entities.

A graph, $$G$$, is defined as follows:

$$G = (V, E)$$

where $$V$$ represent vertices, or nodes, and $$E$$ represent edges, or lines.

In a standard graph, $$E$$ is made up of pairs of elements from $$V$$, and these pairs are unordered ie $$(v_{1}, v_{2}) = (v_{2}, v_{1})$$.

Nodes typically represent people, organisations or cities, and the edges represent relationships between nodes, such as transfer of funds, or person $$A$$ is related to person $$B$$.

Here’s a simple graph showing the transfer of money between some friends, for instance:

Below is a list of the vertices and edges of the graph:

• $$V = \{John, Sarah, Phil, Mary\}$$ ie a list of all the people in the graph
• $$E = \{(John, Sarah), (Sarah, Phil), (Phil, Mary), (Mary, Sarah)\}$$ ie a list of all the transaction relationships between all the people

In order to fully appreciate graph theory, it’s worth stepping back in time and. see where it all started…

###### The Seven Bridges of Königsberg

The city of Königsberg in Prussia, which is now known as Kaliningrad (Russia), was the topic of a famous mathematical puzzle in the early 18th century.

At the time, there were seven bridges connecting two large islands surrounded by the Pregolya river, along with two portions of mainland divided by the river.

Below is a diagrammatic view of the seven bridges:

The problem posed was how could one traverse the city of Königsberg by crossing all seven bridges only once?

Remember, this was during the time before GPS, before the internet even, and even before graph theory existed!

What you’ll soon realise is that it’s impossible to do. It was Leonhard Euler who managed to prove it, and with that proof, graph theory was born.

In order to solve the problem, Euler converted the bridges and graphs into  what we now know as a graph:

This representation should now look familiar, with vertices and edges.

To understand how Euler solved the problem, we need to first calculate the degree of each vertex, ie the number of edges connected to each vertex. To do so, we simply count the number of bridges that are connected to each of the portions of land:

He proved that for such a path around the city to exist, two vertices have to be of odd degree, or all the vertices have to be of even degree.

In the Königsberg case, no such path exists as we do not have exactly two vertices of odd degree (we have four) and nor are all the vertices of even degree, as all four vertices are in fact of odd degree.

Further details on Euler graphs can be found here.

###### The Structure of Graphs

There’s an important distinction between graphs; they can be either directed or undirected.

The distinction lies in whether or not the edges have a direction.

If we consider our first example, of a group of four friends transferring money to one another, then we can see that the graph is in fact directed, as John sending money to Sarah, for instance, doesn’t mean that Sarah is sending any money to John:

Graphs can also be either connected or disconnected:

• Connected: There exists a path between each pair of vertices ie there is no unreachable vertex (The Königsberg graph is connected)
• Disconnected: There does not exist a path between all pairs of vertices ie there is at least one unreachable vertex

A weighted graph is one where each edge is assigned a weight. For instance, weights can represent the value or amount of transactions between people, where high values/numbers can potentially indicate money laundering in the use case of financial crime.

Below are some common definitions:

• If two edges have the same end vertex, then they are parallel
• An edge of the form $$(v, v)$$ is a loop
• A simple graph is one that has no parallel edges or loops
• A graph with only one vertex is a trivial graph
• A graph with no edges is said to be empty
• A graph with no vertices is known as a null graph
• Edges are adjacent if they have a common vertex, and vertices are adjacent if they have a common edge
• The degree of a vertex, $$d(v)$$, is the number of edges with $$v$$ as an end vertex
• A graph is said to be complete if its set of edges contains every possible edge between all vertices
###### Graph Analytics

Some examples of the types of analysis that can be performed on graphs includes:

• Anomaly detection: patterns or relationships that are ‘out-of-the-norm’
• Clustering: used in k-means, a popular Machine Learning clustering algorithm. It aims to identify groups that share a common theme
• Connectedness: Identifying connections between items, such as two or more people. In logistics, the shortest distance between locations is used to optimise routes. One of the most widely used algorithms is Dijkstra’s Algorithm
• Centrality analysis: finding the most influential person in a particular social network, or more generally, identifying the root cause of events. Variations include:
• Betweenness: The number of times a vertex is present in the shortest path between two other vertices
• Degree: The number of edges connected to a vertex
• Closeness: The average length of the shortest path from a vertex to all other vertices
• Community detection: finding cohorts of people in a social network

But Why?

Graphs provide an efficient way to solve various classes of problems, especially ones that involve interactions and relationships. They have the great advantage of offering an intuitive and visual way to represent and tackle such problems.

Graph databases, such as Neo4J, are important alternatives to traditional relational databases, for storing such information, such as relationships between people.

They also offer computational efficiency for some algorithms when data can be arranged in a graph structure as opposed to tabular format.

One very interesting applications of graph analytics is to the area of Entity Resolution. This involves resolving different representations of the same entity (ie individual, organisation etc) across disparate data holdings.  The use of graph analytics enables relational similarity between entities to be used, beyond just string similarity of attributes, that is traditionally used in entity resolution.


text:
## Elementary Algebra

In order to solve, we get all of the terms on one side of the equation, and we then factor out the greatest common factor, $x^2$.


text:
# 2nd order variation of Hilbert-Einstein action + Gibbons-Hawking-York boundary term

While the first order metric variation of Hilbert-Einstein action plus Gibbons-Hawking-York boundary term is well-known and takes the form:

$\delta S_{HE}+\delta S_{GHY}=-\frac{1}{16\pi G}\int d^3x \sqrt{-\gamma}~(K^{\mu\nu}-K\gamma^{\mu\nu})\delta \gamma_{\mu\nu}$

($K_{\mu\nu}$ and $\gamma_{\mu\nu}$ are the extrinsic curvature and the projection metric), does anybody know the second order variation of this combined action? Thanks to anyone who can help me!

-

A long time ago, when I was in graduate school, a friend and I went to Bryce DeWitt with a similar question. He thought about it for a while, and then said to us:

 "Do you know what your problem is? Too much book learning."

He explained that the answer could almost certainly be found in a book or paper, if we looked hard enough, but we would learn much more by working out the answer ourselves. This may be the best advice I ever received as a graduate student.

Why am I telling you this? Because the answer to your question about the first variation of the action (and the notes I linked to) provides you with everything you need to solve this problem. Give it a try! If you get stuck on a specific step in the derivation, come back here and ask about it -- I'll be happy to work through the details with you. But this is a great chance for you to apply what you learned from your last question.

-
Thanks for your advice. Actually I was working on the derivation at the same time I posted this question. It just that I want to confirm my result. Thanks anyway! I'll go on working on it! –  Michael Shaw Jun 8 '11 at 5:38


text:
# Proportionality Constant(k) In Coulomb's Law

1. Jul 30, 2012

### Cetullah

Hello dear Physics Forums members,

My question is about the constant k, in Coulomb's law, which is:

1/4$\pi$ ε0

Can anybody explain me where this constant comes from?

2. Jul 30, 2012

### DennisN

Last edited: Jul 30, 2012
3. Jul 30, 2012

### Cetullah

4. Jul 30, 2012

### Cetullah

Well, I think I started to get some things straight in my head. Well, I may have been using the wrong words, since my learning language is not English, but as I understand, it is about the electric flux. The density of the electric flux(which is electric field) decreases by the area of a mathematical spherical surface around the charge. So, it would make much sense if we wrote the formula as:

(1/4$\pi$R2)*Q1*Q2/ε₀

which R is the distance between two charges, as we take it for the radius of the sphere, instead of d in the old Coulomb's law.

And of course, the whole force will be decreased if the electric permittivity(ε₀) increases, or the other way.

I hope I managed to tell you what I m thinking, and the way I settled it in my mind. Any critics, constructive ideas or other perspectives are welcome.

5. Aug 1, 2012

### DennisN

Hi again, Cetullah! Generally, I'd say it's a good idea to mathematically group constants together like it's originally done in Coulomb's law, it makes it easier for the eye. The charges (q's) and the distance (r) are variables.

Regarding Coulomb's constant and why it is (1/4$\pi$ε₀):

Coulomb's law is related to Gauss's[/PLAIN] [Broken] law. Here's some links for you:

Last edited by a moderator: May 6, 2017
6. Aug 1, 2012

### Cetullah

Yeah, I got what you re saying ;) It just feels better when you get the logic tho :)


text:
WeBWorK Problems

Re: MathObject List answers are displaying the value, not the name, of items in the list

by Davide Cervone -
Number of replies: 0

You can use $G->{correct_ans} for the string, $G->{correct_ans_latex_string} for the TeX version, or \$G->{original_formula} for the Formula() object for the expression.


text:
LaTeX two column layouts and rubber lengths

Today I gave my advisor the draft of the final chapter of my dissertation, which I have been working on fervently for the last week or so. I decided that I deserved a little break before getting back to the grindstone of implementing comments from my advisor. I decided to spend some time working on the two column layout of my dissertation.

Two columns! You may be thinking that I am crazy. Certainly my institution wouldn’t allow me to use a two column layout for my dissertation! That is indeed correct. The requirements set by the University of Michigan produce a pretty ugly document — one-sided, double-spaced (or 1.5), and running headers aren’t allowed. They actually don’t specify if you can use two columns or not, but I didn’t even bother asking, because I am pretty certain the answer is no. Now, just because the official copy that I hand in has to look boring doesn’t mean that I can’t make a nice copy for myself, and for other people I give a copy, like the members of my committee. And with LaTeX, that is relatively easy to do.

original format two column format

Many scholarly journals, especially scientific journals use a two column layout. There are good reasons for this. When reading text, one of the most difficult tasks is to move down a line. Most languages of the world (but not all) are read either right to left or left to right, which means that moving down a line means moving your eyes all the way across the width of the text. As the width of a text gets wider, so does this task. For this reason, many books use relatively small paper. A common novel usually has paper sized about 6in x 8in. This is fine for books which are professionally printed, but the printing of a dissertation is usually restricted to standard 8.5 x 11 inch paper. Having a one column format (with reasonable margins of 0.5 to 1 inch) on 8.5 x 11 inch paper is very hard to read. A two column layout is much easier for readers.

For the most part, making a two column layout in LaTeX is extremely easy. Simply specify twocolumn in the document class definition:
 \documentclass[letterpaper, twosided, twocolumn]{book}

However, one quickly notices that some things need adjusting. First off, equations, figures, and tables which are too wide to fit in one column need to be specified as double column width. For figures and tables, simply use table* and figure* environments. Equations can be a bit trickier, but luckily I didn’t have any really long equations. In addition, using table* in a one-column document doesn’t have any effect, which makes it very easy to switch back and forth between one and two column layouts. (Note that LaTeX only allows two-column floats at the top of the page by default, though some different class files, such as JASAtex, get around this somehow).

Some of the main jobs of LaTeX are:

1. format text into fully justified paragraphs, hyphenating when necessary
2. Break pages at appropriate places (i.e. don’t start a new section at the bottom of a page, or leave one line stranded on an otherwise blank page
3. place tables and figures in appropriate positions

In a two column layout, all of these jobs get a little trickier. LaTeX uses several parameters which controls the behavior of the processes that handle these jobs. LaTeX realizes that hyphenating words at line breaks should be avoided if possible, but sometimes it is necessary in order to have justified text which has approximately equal inter-word spacing. In a two column layout, each column usually has fewer characters than in a one column layout, which means that more words will be hyphenated. If you don’t like this, you can increase the \hypenpenalty, which will cause LaTeX to hyphenate fewer words, and instead be a little sloppier about inter-word spacing
 % don't hyphenate so much - default = 200, max (never hyphenate) = 10,000 \hyphenpenalty=800

You may also wish to alter float placement a bit. By default, LaTeX puts figures and tables on their own page if they take up more than 70% of a page, and says that float pages should be at least 70% full of floats. I would prefer to squeeze a bit more onto a page, so I increase these values a bit:

There are a few more parameters which you can tweak to save a little space. Now that we have big floats on a page, we might need to make a little more room for text, so we can decrease the textfloatsep from the default value of 20pt
 %separation between floats and text \setlength\dbltextfloatsep{9pt plus 5pt minus 3pt } %separation between two column floats and text \setlength\textfloatsep{10pt plus 4pt minus 3pt}

Now those rubber lengths. Notice that the above lengths include plus and minus. What this says is that the dbltextfloatsep should be 9pt, but can be anywhere between 6pt and 14pt. Rubber lengths allow LaTeX to adjust spacing (in this case vertical spacing), to make better page breaks. Looking at the code from the standard book.cls, we will also find rubber lengths in the definition of sectioning commands, e.g.:
 \newcommand\section{\@startsection {section}{1}{\z@}% {-3.5ex \@plus -1ex \@minus -.2ex}% {2.3ex \@plus.2ex}% {\normalfont\Large\bfseries}}

While I still have yet to find exactly what all this means, I am pretty sure that the two middle lines specify how much space should come before and after the section heading. This says that there should be between -4.5ex and -3.3ex before the heading, and 2.3ex to 2.5ex after the heading, before the beginning of the section text. It also says that the font of the heading should be Large and bold. While this looks quite nice by default, I found the spacing too large for a two column layout, so I redefined some of these commands:
Notice that for subsubsection, the lengths seem to be reversed, in that the first length is positive, and the second is negative. This has the effect that the heading is placed on the same line as the text, instead of on a separate line. Paragraphs and subparagraphs are formatted like this, but I wanted it for subsubsection, which is the lowest level of sectioning I use in my dissertation.

I made one additional modification to all these parameters. The default space between columns seems to be about .1in, which is not very much. I increased this to .25in.
 \setlength{\columnsep}{.25in}

With just a little tweaking, I turned the default formatting into a very professional looking document.

Several people have asked about how to handle long equations. There is no great way, and it will depend on your equation. If you absolutely need the whole page, you have to put the equation in a figure* or table* environment, which means that it can only appear at the top of a page. Other options are to split the equation up into multiple lines, make the font a bit smaller, or go into the margins a bit. I used all of these techniques for one equation in my dissertation. Here is the code:

 \hspace*{-.4em}% \begin{minipage}{1.02\columnwidth} {\fontsize{8.7}{10}\selectfont \begin{multline}% \label{E:NPR} p(ID)=\\ \frac{\displaystyle\prod_{i=1}^{n} p(PS_i|PS_i)\cdot Freq_S} {\left\{\left[\displaystyle\prod_{i=1}^{n} p(PS_i|PS_i)\right]\cdot Freq_S\right\} + \displaystyle\sum_{j=1}^{nn} \left\{\left[\displaystyle\prod_{i=1}^{n} p(PN_{ij}|PS_i)\right]\cdot Freq_{Nj}\right\} } \end{multline}% } \end{minipage}
And the resulting output.

screenshot of a long equation that uses the margins a bit, has smaller font, and uses multiple lines

It is not perfect, but I am pretty happy with the results.

55 Replies to “LaTeX two column layouts and rubber lengths”

1. Yiannis says:

Love the article! Great work Rob!

2. [url=http://us.startv.com/synopsis/laughter-ke-phatke-synopsis]hips and thighs diet[/url] ocellaris clownfish diet diet plan for a runner [url=http://us.startv.com/shows/saath-nibhaana-saathiya]eat of blood type diet a[/url] using ensure for a diet liquid shake diets [url=http://us.startv.com/shows/laughter-ke-phatke]dietetics studies[/url] weight loss program for teenagers in mississippi weight watchers how points lose weight [url=http://us.startv.com/gallery/best-mjht-10]diet stalls[/url] balanced diets for athletes articles on dietary supplements [url=http://us.startv.com/shows/behenein]how t olose stomach fat without diet[/url] natural diet recipes consumer reviews best diet pills [url=http://us.startv.com/synopsis/karishma-kapoor-film-festival]song from diet coke with lime commercial[/url] ibs dietary guidelines a healthy diet at [url=http://us.startv.com/synopsis/master-chef-india]urge incontinence diet[/url] braks diet smoothie for weight loss [url=http://us.startv.com/shows/baa]suppressant diet[/url] first national bank of dieterich biliary colic diet [url=http://us.startv.com/gallery/odhani-ep-70]christianity dietary laws[/url] broccoli diet brain mediterranean diet daily menu [url=http://us.startv.com/shows/premjyotish-koffee-karan-3]raquel welchs diet secrets[/url] chinese weight loss on abc change in stool color while on diet [url=http://us.startv.com/character/geet]diet as tolerated for dengue patient[/url] monaslim diet pill no rx order weight loss clinical research [url=http://us.startv.com/gallery/nupur-returns-2]dieta gastrite[/url] diaic diet donts weight gain diet plan for women [url=http://us.startv.com/node/7/shows]post pardom diet[/url] jewish dietary laws origin dietary level [url=http://us.startv.com/character/ye-ajnabbi-characters]la weight loss eating[/url] lo carb diet menstral cycle carol vorderman 30 day cellulite diet
[url=http://dnpig.com/viewtopic.php?f=3&t=8264]healthy mexican diet plans dietetica a [/url]
[url=http://www.cvlocal.com/forum/showthread.php?p=416518#post416518]are there safe diet pills diet mountin dew [/url]
[url=http://zivot.surikata.cz/viewtopic.php?p=9595#9595]loss 10 pound diet n diethyl p phenylenediamine [/url]
[url=http://businessideasprofitable.com/hunts-forum-to-understand-new-lep/comment-page-1#comment-56261]diet food delivered bonita california best lifed diet mag [/url]
[url=http://stjohntravelforum.com/new/viewtopic.php?f=40&t=33&p=2279#p2279]37.5 diet mg phentermine pill modified fat diet [/url]

3. Tele Medicine Coordinator Job Description http://www.stampingallery.com/ – seroquel quetiapine Buy cheap Seroquel (Quetiapine) without a prescription. No hidden fees! [url=http://www.stampingallery.com/]seroquel xr[/url]

4. Thanks for every other informative site. Where else may I am getting that type of information written in such an ideal approach? I’ve a challenge that I’m simply now running on, and I have been at the look out for such information.

5. I loved up to you’ll receive carried out proper here. The sketch is attractive, your authored material stylish. however, you command get bought an nervousness over that you would like be turning in the following. sick unquestionably come further until now again since precisely the same just about very steadily within case you shield this increase.


text:
• 9
• 11
• 9
• 20
• 12

Benefits of a BSP Tree over a simple block (cell?) based system?

This topic is 4574 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

What are the benefits to using a BSP tree intead of a simple, block based system (pseudocode)
int index = FindCell(Scene, Camera);
Render(Scene.Cell[index]);
for(i = 0; i < Scene.Cell[index].VisibleCellIndices.size(); ++i)
{
Render(Scene.Cell[ Scene.Cell[index].VisibleCellIndices ]);
}

forgive the noobish question, but that really got me thinking TIA

Share on other sites
There are many variantions and specific kinds of BSP trees each one better suited to a particular type of operation/setting etc.

To put it simply you can think of

BSP trees Vs Voxel Grids/Cells as along the lines of

Binary Search trees (BSTs) Vs Plain Arrays (not sorted/ordered).

BSP trees are generalization of BSTs for multidimensional data sets while Grids/Cells are essentially multidimensional arrays.

[Edited by - snk_kid on October 9, 2005 6:53:42 AM]

Share on other sites
In a grid, there's no hierarchy, you have to treat each cell individually.
In a tree structure, you can discard a whole subtree in one shot.

Also, a BSP tree stores empty/solid space information. It can be usefull for some operations like CSG.

Share on other sites
Lets say you have one giant outdoor map. First level of bsp is the entire map. Second level is the map split into 4. So, you find out where you are on the bsp's lowest level and only check the blocks in that portion.

Share on other sites
but this could be achieved with this structure, as each cell has a list of cells that should be drawn when the camera is inside it. what gives?

Share on other sites
A cell system is more like a hash table whith O(1) lookup and the '1' is very small. Tiles/Cells are very simple to impliment and very fast, this makes them ideal for alot of situations. A BSP tree can help though in a 3d game with the rendering.

Share on other sites
Quote:
 Original post by robert_pA BSP tree can help though in a 3d game with the rendering.

Isn't BSP more suited to collision detection now that we've pretty much done away with software rendering?

Share on other sites
What you are describing sounds like potentially visible sets, which is another technique. For some purposes one structure may be better than the other. It is even possible to have both a BSP tree and a potentially visible set structure at the same time, and use each of them for different purposes.

Share on other sites
for collision detection, I'm using a physics SDK, so this wont' matter much. how is it beneficial to rendering?


text:
We’re rewarding the question askers & reputations are being recalculated! Read more.

# Help Center > Badges > Custodian

Complete at least one review task. This badge is awarded once per review type.
Awarded 1444 times.
Awarded Feb 14 at 1:40 to
for reviewing Suggested Edits
Awarded Feb 13 at 18:25 to
for reviewing Suggested Edits
Awarded Feb 8 at 20:45 to
for reviewing Suggested Edits
Awarded Feb 8 at 20:15 to
for reviewing First Posts
Awarded Feb 8 at 14:05 to
for reviewing Suggested Edits
Awarded Feb 8 at 12:50 to
for reviewing Suggested Edits
Awarded Feb 7 at 18:10 to
for reviewing Suggested Edits
Awarded Feb 6 at 16:40 to
for reviewing Suggested Edits
Awarded Feb 6 at 12:00 to
for reviewing Suggested Edits
Awarded Feb 6 at 8:00 to
for reviewing Suggested Edits
Awarded Jan 29 at 18:25 to
Awarded Jan 28 at 22:40 to
for reviewing Low Quality Posts
Awarded Jan 26 at 12:05 to
for reviewing Suggested Edits
Awarded Jan 22 at 10:30 to
for reviewing Suggested Edits
Awarded Jan 17 at 14:30 to
for reviewing Suggested Edits
Awarded Jan 15 at 8:25 to
for reviewing Suggested Edits
Awarded Jan 13 at 0:10 to
for reviewing Suggested Edits
Awarded Jan 11 at 9:50 to
for reviewing Suggested Edits
Awarded Jan 11 at 9:45 to
for reviewing Low Quality Posts
Awarded Jan 6 at 9:45 to
Awarded Jan 5 at 19:15 to
for reviewing Suggested Edits
Awarded Jan 3 at 11:45 to
for reviewing First Posts
Awarded Jan 1 at 8:25 to
Awarded Dec 30 '18 at 0:00 to
Awarded Dec 27 '18 at 0:30 to
for reviewing First Posts
Awarded Dec 24 '18 at 19:55 to
for reviewing Suggested Edits
Awarded Dec 20 '18 at 10:40 to
for reviewing Suggested Edits
Awarded Dec 19 '18 at 11:25 to
for reviewing Suggested Edits
Awarded Dec 19 '18 at 11:25 to
for reviewing Suggested Edits
Awarded Dec 19 '18 at 10:20 to
for reviewing Suggested Edits
Awarded Dec 14 '18 at 13:45 to
for reviewing Suggested Edits
Awarded Dec 7 '18 at 13:00 to
for reviewing Suggested Edits
Awarded Dec 5 '18 at 5:50 to
Awarded Dec 4 '18 at 9:55 to
for reviewing Low Quality Posts
Awarded Dec 2 '18 at 22:30 to
for reviewing Suggested Edits
Awarded Dec 1 '18 at 0:35 to
for reviewing First Posts
Awarded Nov 30 '18 at 4:20 to
for reviewing Suggested Edits
Awarded Nov 29 '18 at 20:20 to
for reviewing Suggested Edits
Awarded Nov 27 '18 at 14:45 to
for reviewing Suggested Edits
Awarded Nov 26 '18 at 2:00 to
for reviewing Suggested Edits
Awarded Nov 23 '18 at 9:50 to
for reviewing Suggested Edits
Awarded Nov 22 '18 at 16:35 to
for reviewing Suggested Edits
Awarded Nov 22 '18 at 14:55 to
for reviewing First Posts
Awarded Nov 22 '18 at 12:15 to
for reviewing Suggested Edits
Awarded Nov 21 '18 at 17:25 to
for reviewing First Posts
Awarded Nov 19 '18 at 17:20 to
for reviewing Suggested Edits
Awarded Nov 19 '18 at 17:10 to
for reviewing Suggested Edits
Awarded Nov 19 '18 at 15:15 to
for reviewing Suggested Edits
Awarded Nov 18 '18 at 20:25 to
for reviewing Suggested Edits
Awarded Nov 16 '18 at 17:00 to
for reviewing Suggested Edits
Awarded Nov 15 '18 at 13:10 to
for reviewing First Posts
Awarded Nov 15 '18 at 11:40 to
Awarded Nov 13 '18 at 13:25 to
for reviewing Suggested Edits
Awarded Nov 13 '18 at 9:55 to
for reviewing Suggested Edits
Awarded Nov 12 '18 at 16:15 to
for reviewing Suggested Edits
Awarded Nov 10 '18 at 22:40 to
for reviewing First Posts
Awarded Nov 10 '18 at 17:30 to
for reviewing Suggested Edits
Awarded Nov 10 '18 at 4:05 to
for reviewing Suggested Edits
Awarded Nov 9 '18 at 17:40 to
for reviewing Suggested Edits
Awarded Nov 7 '18 at 17:05 to
for reviewing Low Quality Posts


text:
# Quotient Rule of Logarithms - Problem 4 282 views

The quotient rule can be used to either expand logs that have fractions as input or to condense multiple logs that have the same base. If you're expanding, don't forget to write the base in all of your resulting terms (unless, of course, it's an implied base 10.) Condensing can only be done if the logs have the same base. If there are multiple logs being subtracted, consider factoring out the first subtraction sign so you can see that you are subtracting a sum (that is, you'll have product in your final denominator.)

Transcript Coming Soon!


text:
##### Venue: Department of Mathematics, Lecture Hall I

This work is concerned with two different problems in harmonic analysis, one on the Heisenberg group and other on $\\mathbb{R}^n$, as described in the following two paragraphs respectively.

Contact: +91 (80) 2293 2711, +91 (80) 2293 2265 ;     E-mail: chair.math[at]iisc[dot]ac[dot]in
Last updated: 06 Mar 2020


text:
# Math Help - Find dimensions of box

1. ## Find dimensions of box

When the edges of a cuboid-shaped box are increased by 2cm, 4cm and 5cm respectively, it would become a cube.
The volume would increase by $440cm^3$
Find the dimensions of the original cuboid-shaped box.

I found that the dimensions are 6cmx4cmx3cm by fluke so can anyone please explain how to solve it?
TY

2. Originally Posted by womatama
When the edges of a cuboid-shaped box are increased by 2cm, 4cm and 5cm respectively, it would become a cube.
The volume would increase by $400cm^3$
Find the dimensions of the original cuboid-shaped box.

I found that the dimensions are 6cmx4cmx3cm by fluke so can anyone please explain how to solve it?
TY
You get solvable simultaneous equations.

Just translating the above information into Math:

$V=xyz$ (the definition of the volume of a cuboid)

$V+400 = (x+2)(y+4)(z+5)$ (the changes you said)

$x+2=y+4=z+5$ (since these would make the sides of a cube, which are always equal)

Now simply solve.

Hope that helps

Mathemagister

PS If you need help with solving that, feel free to ask.


text:
Home

Browse
Communities
& Collections

Issue Date
Author
Title
Subject

Sign on to:

My Account
authorized users

Edit Profile

Help
 Please use this identifier to cite or link to this item: http://hdl.handle.net/1807/17907

 Title: The Growth and Development of NGOs in Malawi: Case study of a youth organization in Lilongwe Authors: Wong, Jenika Keywords: Non-governmental organizationMalawian youth Issue Date: 30-Oct-2009 Abstract: Malawi is experiencing a youth bulge. Over half of the country’s population is under the age of 18. In response, a large number of youth-serving organizations (YSOs) have been established to impart resources, skills and knowledge. Their ultimate goal is to provide opportunity. But who defines the terms? My research questions are: Who decides which projects are worth funding and which are not? What happens when in-country fundraising is extremely difficult because the majority of people are poor and the income-earning middle class is very small? And finally, are the needs of young people being properly addressed by YSOs? This paper will explore how international and national political activity influences the agendas of YSOs. The case study will examine how one particular youth group in Lilongwe is successfully navigating this tumultuous landscape. The findings demonstrate a multi-layered success strategy. At the primary level, YSOs were created because external funds were available; without these funds, in-country resources would most likely be unavailable to support the present-level of activity. Inter-organizational competition can be fierce, and success depends on the organization’s ability to adopt to the donor’s needs, the ability to appear professional, fluency in “development speak” and reporting guidelines, and network contacts. The formula, if there is one, to measure organizational success is not straightforward; it is a complex web of actors and value systems that flow in harmony and contradiction. What is commonly understood but rarely communicated in project proposals, however, is that organizations exist first and foremost to provide employment opportunities for staff, and I would argue that they are the primary beneficiary group of most projects. URI: http://hdl.handle.net/1807/17907 Appears in Collections: Senior Students Theses

Files in This Item:

File Description SizeFormat
View/Open


text:
## Precalculus (10th Edition)

$(d)$
$\frac{f(x+h)-f(x)}{h}$ is the difference quotient of the function $f$..


text:
# $\sin$ vs. $sin$ - history and usage

One thing newcomers to TeX or MathJax often get wrong is that they write something like $sin(x)$ instead of $\sin(x)$ - the point being that common mathematical functions with names consisting of several letters are usually typeset in non-italic letters as opposed to the names of variables. So, if you write sin you'll get $sin$ typeset as if you meant to multiply the variables $s$, $i$, and $n$ while with \sin it looks much better.

[In case this is new to you: Should you need something like $\operatorname{diag}$ where \diag is not defined, you can for example use \operatorname{diag}.]

This is for example explained in Knuth's TeX book in the chapter about the "fine points of mathematics typing". However, there are at least two other situations where I think non-italics are also to be used:

• The Leibniz notation should not be used like this: $\frac{{\color{red}d}^2y}{{\color{red}d}x^2}$, but rather like so: $\frac{\mathrm{{\color{red}d}}^2y}{\mathrm{{\color{red}d}}x^2}$, because we're not talking about a variable $d$ but an operator $\mathrm d$.

• Well-known constants should not be typeset in italics because, well, they're not variables. So, Euler's identity is not ${\color{red}e}^{{\color{red}i}\pi}-1=0$ but $\mathrm{\color{red}e}^{\mathrm{\color{red}i}\pi}-1=0$.

[For the record, Knuth's TeX book doesn't agree with this.]

I've already learned from this question that in case of the Leibniz notation there's actually an international standard saying it should be done like this, but that still leaves a couple of questions open for me:

• What is the history of these typographical conventions? (Or maybe one should better ask when and why typesetters started to use italics for variables.)

• Does the ISO-80000-2:2009 standard (which sadly is not accessible to mere mortals) say something about $\mathrm e$ vs. $e$ and $\mathrm i$ vs. $i$?

• How do publishers of mathematical books or papers deal with this? Have you ever encountered one who insisted on getting things like the above "right" one way or the other?

[My apologies for cramming several questions into one, but I think they are all intimately related.]

• I've always found bizarre the imposition that mathematical constants should be upright and physical constants italics. Very few pure mathematicians use upright “e” and “i”, as far as I know. Some publishers insist that “d” for the differential is upright. Whether “d” is an operator is debatable. Sep 17, 2014 at 9:49
• Regarding $sin$, note that also the spacing is different fro sin, to mimic the product of three separate variables $s\cdot i \cdot n$. Sep 17, 2014 at 9:59
• @Frunobulax As far as I know, the speed of light is $c$ (italic). The rationale for this was that physical constants can change their value when more precise measurements are available. So I was told: being a mere mortal, I can't access the ISO secret books without paying a huge amount of money, so I can only speak “second hand”. If the real rationale is that, I'm happy not to follow that convention. Sep 17, 2014 at 10:11
• Yeah, what's the point of a standard when you don't have access to it? Sep 17, 2014 at 10:15
• Perhaps ask in tex.stackexchange.com ?
– lhf
Sep 17, 2014 at 13:05

Then you put something like ddif{q}{t} to get the desired result.

Because the thing has a date in it, and invoked by \usepackage{} then it is more robust to formatting changes &c.

But \operatorname{} is a bit long, and i reassign this to \fn{}, eg \fn{isi}(values).

• I support this idea. I always start writing any paper with redefining these things. Mar 13, 2019 at 10:25

I've just read an article which at least partly answers my questions: https://nickhigham.wordpress.com/2016/01/28/typesetting-mathematics-according-to-the-iso-standard/.

This not about $\TeX$. It is a typographical convention designed to aid in understanding. Remember books have been printed on paper centuries before the computer era.

In any mathematical expression or formula, we use the signs, $+, -, /$ denoting arithmetical operations. But for some reasons (economy?) the symbol for multiplication, $\times$, is omitted. So the high school formula is never written as $(a+b)^2 = a^2 + b^2 + 2\times a\times b$. So when we see $max$ in an expression typographers want to help the readers not to confuse with the product of $m$, $a$, and $x$.

For this purpose all variable names (usually single letters) are written in italics and word-abbreviations such as max, min, deg, tan, log, exp are written in upright fonts. (I am told physicists following Einstein summation convention have to be pre-empt such an assumption in rare situations where no summation is intended).

Now $\TeX$ is smart enough to know that between two variables if there is no arithmetical operator it should be multiplication: that is why when we type spaces between two variables inside dollars that space is ignored by the $\TeX$ engine.


text:
Find all School-related info fast with the new School-Specific MBA Forum

 It is currently 27 Apr 2015, 14:35

GMAT Club Daily Prep

Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History

Events & Promotions

Events & Promotions in June
Open Detailed Calendar

If x is an integer, what is the value of x? (3)

Author Message
TAGS:
Senior Manager
Joined: 12 Oct 2009
Posts: 268
Followers: 2

Kudos [?]: 52 [0], given: 4

If x is an integer, what is the value of x? (3) [#permalink]  17 May 2011, 12:00
00:00

Difficulty:

(N/A)

Question Stats:

62% (01:34) correct 38% (01:02) wrong based on 31 sessions
If √x is an integer, what is the value of √x?
(3) 11<x<17
(4) 2<√x<5
________________________________________________________________
A. Statement (1) ALONE is sufficient, but statement (2) alone is not sufficient.
B. Statement (2) ALONE is sufficient, but statement (1) alone is not sufficient.
C. BOTH statements TOGETHER are sufficient, but NEITHER statement ALONE is
sufficient.
D. EACH statement ALONE is sufficient.
E. Statements (1) and (2) TOGETHER are NOT sufficient.
Math Forum Moderator
Joined: 20 Dec 2010
Posts: 2035
Followers: 135

Kudos [?]: 1100 [0], given: 376

Re: DS - Value of SqRt x [#permalink]  17 May 2011, 12:12
IEsailor wrote:
If √x is an integer, what is the value of √x?
(1) 11<x<17
(2) 2<√x<5
________________________________________________________________
A. Statement (1) ALONE is sufficient, but statement (2) alone is not sufficient.
B. Statement (2) ALONE is sufficient, but statement (1) alone is not sufficient.
C. BOTH statements TOGETHER are sufficient, but NEITHER statement ALONE is
sufficient.
D. EACH statement ALONE is sufficient.
E. Statements (1) and (2) TOGETHER are NOT sufficient.

$$\sqrt{x}$$ is an integer means x is also an integer.
(1)
11<x<17
x can be 12,13,14,15,16.
But, only 16 will incur an integral root.
Thus; x=16 and $$\sqrt{x}=4$$
Sufficient.

(2)
2<$$\sqrt{x}$$<5
$$\sqrt{x}$$ can be either 3 or 4.
Not Sufficient.

Ans: "A"
_________________
Senior Manager
Joined: 12 Oct 2009
Posts: 268
Followers: 2

Kudos [?]: 52 [0], given: 4

Re: DS - Value of SqRt x [#permalink]  17 May 2011, 12:29
From 1
what if sqrt x = -4, even then x is 16
Math Forum Moderator
Joined: 20 Dec 2010
Posts: 2035
Followers: 135

Kudos [?]: 1100 [0], given: 376

Re: DS - Value of SqRt x [#permalink]  17 May 2011, 12:49
IEsailor wrote:
From 1
what if sqrt x = -4, even then x is 16

Here's the rule:
Square root or any positive even root of a positive number will ALWAYS be positive.

$$\sqrt{16}=+4$$
$$\sqrt{36}=+6$$
$$\sqrt[4]{16}=+2$$

But, if $$x^2=16$$
x can be +4 or -4.
_________________
Senior Manager
Joined: 12 Oct 2009
Posts: 268
Followers: 2

Kudos [?]: 52 [0], given: 4

Re: DS - Value of SqRt x [#permalink]  17 May 2011, 12:50
Thanks for that clarification Fluke ...
VP
Status: There is always something new !!
Affiliations: PMI,QAI Global,eXampleCG
Joined: 08 May 2009
Posts: 1360
Followers: 13

Kudos [?]: 160 [0], given: 10

Re: DS - Value of SqRt x [#permalink]  17 May 2011, 20:51
a. 16^(1/2) = 4 here.
b 3 or 4 are possible values.

As, (x^2)^1/2 = |x| meaning 4^(1/2) = 2 so, its always a positive value.
_________________

Visit -- http://www.sustainable-sphere.com/
Promote Green Business,Sustainable Living and Green Earth !!

SVP
Joined: 16 Nov 2010
Posts: 1687
Location: United States (IN)
Concentration: Strategy, Technology
Followers: 31

Kudos [?]: 340 [0], given: 36

Re: DS - Value of SqRt x [#permalink]  18 May 2011, 04:30
(1)

x = 16

Sufficient

(2)
x = 9 or 16

Insufficient

_________________

Formula of Life -> Achievement/Potential = k * Happiness (where k is a constant)

GMAT Club Premium Membership - big benefits and savings

Manager
Status: GMAT in 4 weeks
Joined: 28 Mar 2010
Posts: 185
GPA: 3.89
Followers: 1

Kudos [?]: 69 [0], given: 25

Re: DS - Value of SqRt x [#permalink]  18 May 2011, 10:00
Thanks Fluke for clarification
_________________

If you liked my post, please consider a Kudos for me. Thanks!

Re: DS - Value of SqRt x   [#permalink] 18 May 2011, 10:00
Similar topics Replies Last post
Similar
Topics:
1 if X# = x(x+3), what is the value of X## 3 12 Jan 2015, 06:55
What is the value of 3-digit integer X ? (1) X has exactly 14 02 Jun 2009, 21:35
If x is an integer, what is the value of x? (3) 14 17 Nov 2008, 14:41
what is the largest integer value of x that makes 30!/3^x an 5 19 Aug 2008, 07:33
If sqrt(x) is an integer, what is the value of sqrt(x) (3) 2 23 Sep 2006, 14:51
Display posts from previous: Sort by


text:
Fast search for many patterns
5
2
Entering edit mode
8.7 years ago
sbliven ▴ 30

I have a large number of short patterns (5-10 "letters" or amino acids in this context). I want to search for these in a large database of "texts" (proteins). Are there any existing packages which provide efficient algorithms for this? Ideally they would be

• Handle 140k patterns and 280k texts
• Able to handle ambiguous residues such as 'J' for [IL] (this can be faked by duplicating some patterns)
• python is preferred (I'm already using BioPython, but it is missing this afaik)

I'm currently using a naive O(n^2) search, but it's taking too long. I think this problem is generally solved using keyword trees (Aho-Corasick algorithm), but I'd rather not implement that myself unless I have to.

Update

I should have specified that for output I need both the text and the pattern which matched it. This prevents some of the otherwise great implementations (eg fgrep, ahocorasick) from solving my problem.

algorithm sequence patterns searching python • 4.0k views
0
Entering edit mode

There seems to be a python implementation of the Aho-Corasick algorithm or esmre. Have you tried it? (I discovered this algorithm just now, interesting!)

0
Entering edit mode

@dariober Thanks! I'll try those out. Apparently I should google my problems after I write a question, as I didn't think about Aho-Corasick until I had drafted the question. You should add an answer so I can accept it (if it works).

0
Entering edit mode

This algorithm is also implemented in GNU fgrep btw.

1
Entering edit mode
8.7 years ago
sbliven ▴ 30

I ended up using the esmre library, as suggested by dariober in the comments. It dropped my run time from hours (with a brute force search) to seconds.

Full code is on github, but the important parts are quite simple:

import esmre

vocab = esmre.Index()
for word in patterns:
vocab.enter(word,word)
for text in texts:
matches = vocab.query(text)
for match in matches:
print "Match for %s in %s" % (match, text)

2
Entering edit mode
8.7 years ago
Dan D 7.4k

As Michael Dondrup suggested, a quick solution might be to use fgrep.

Put your patterns in a text file, one per line.

Construct your fgrep command like this to search a large group of text files:

fgrep -f patterns_file.txt /path/to/texts

These options will probably be of interest

• -r recurse into subdirectories
• -l print names only of files with matches
• -H print the file name along with the match
• --include/--exclude use this to filter out files you don't want to search
0
Entering edit mode

also check the -F flag if your search patterns are fixed. This will speed up the processes a lot!

0
Entering edit mode

In my experience, f/grepping large files against large files is extremely slow way to do things, even if you parallelize with gnu parallel or something similar. If you're working in bash, there's usually a orders of magnitude faster solution that involves sort and comm..

0
Entering edit mode

Excellent suggestion, and very fast! It takes less than a second on my system. However, I need to know which patterns match to each text (nearly everything matches some pattern). This does not seem to be an option with fgrep.

1
Entering edit mode
8.7 years ago
brentp 24k

Maybe look into BKTree's, which work for approximate string matching. There are a number of python implementations.

http://en.wikipedia.org/wiki/BK-tree

0
Entering edit mode
8.7 years ago
Phil S. ▴ 700

You have to decide if it is fast enough or not (I scan sequencing data for adapters and barcodes with it) but you might wanna check out this:

awk 'NR==FNR{strings[$0]; next} {for (string in strings) if ( (idx = index($0,string)) > 0 ) print string, FNR, idx }' file1 file2

What it does is it builds an index of strings given in file1 (1 string per line ) and checks for those strings in file2. Reporting is on std.out

something like this:

STRING:LINE_NUMBER:POSITION
.

Maybe this helps.

Best Phil

0
Entering edit mode
8.7 years ago
pld 5.0k

Cant you just use python's subprocess module to make calls to fgrep? This is generally what I end up doing anytime a system command doesn't have enough functionality.

You could make a dictionary and key on patterns and then store text returned from fgrep patterns for each key as values under that key.


text:
# summation of binomial coefficients with squares

What is $$50^2\frac{{n\choose 50}}{{n\choose 49}}+49^2\frac{{n\choose 49}}{{n\choose 48}}...1^2\frac{{n\choose 1}}{{n\choose 0}}$$.

i.e. $$\sum_{k=1}^{50} \frac{k^2\binom n k}{\binom n {k-1}}= ?$$

$$\text{MY ATTEMPT}$$ When I plugged $n=50$ I got $22100$ as the series is wave like, with maximum at $25$ which is $25\times 26$. So I calculated it on a calculator and multiplied the summation till $25\times 26$ and got it. But I want to calculate the general formula for summation. The answer given is $425(3n-98)$. Thanks!

-
It's not clear where that first parenthesis is supposed to close, but do you want an alternating sum? – Thomas Andrews Feb 26 at 13:55
If you'd fix your question so that people can figure out what you are asking, people might be able to help. Help people help you. – Thomas Andrews Feb 26 at 14:03

$$\require{cancel} \sum_{r=1}^{50}r^2\frac{\binom nr}{\binom n{r-1}}\color{lightgrey}{=\sum_{r=1}^{50}r^\bcancel2\frac{\frac{\cancel{n(n-1)\cdots (n-r)}(n-r+1)}{\bcancel{r}\cancel{(r-1)!}}}{\frac{\cancel{n(n-1)\cdots (n-r)}}{\cancel{(r-1)!}}}}=\sum_{r=1}^{50}r(n-r+1)\\ =\sum_{r=1}^{50}nr-r(r-1)=\sum_{r=1}^{50} n\binom r1-2\binom {r}2\\ =n\binom {51}2-2\binom {51}3\\ =\frac 1{52}\binom {52}3(3n-98)\\ =425(3n-98)\quad\blacksquare$$

Note that if $n=50$, this reduces to $\binom {52}3$ as can be seen from above. This can also be proven directly as follows:

$$\sum_{r=1}^n r(n-r+1)=\sum_{r=1}^n\sum_{j=r}^nr=\sum_{j=1}^n\sum_{r=1}^j \binom r1=\sum_{j=1}^n\binom {j+1}2=\binom {n+2}3=\binom {52}3$$

-

If the sum that you're interested in is: $$\sum_{k=1}^{50}\frac{k^2\binom{n}{k}}{\binom{n}{k-1}},$$ Then, $$\sum_{k=1}^{50}\frac{k^2\binom{n}{k}}{\binom{n}{k-1}}=\sum_{k=1}^{50}\frac{k^2(n-k+1)}{k}=\sum_{k=1}^{50}k(n-k+1)=(n+1)\sum_{k=1}^{50}k-\sum_{k=1}^{50}k^2.$$ Then, using the formulas $$\sum_{k=1}^{50}k=\frac{50\cdot 51}{2}=1275$$ and $$\sum_{k=1}^{50}k^2=\frac{50\cdot 51\cdot 101}{6}=42925,$$ you will get the negative of the answer at the end of the post (perhaps due to the negative confusion in the discussion above).

-
which is $1275 n -41650 = 425(3n-98)$ and gives $22100$ when $n=50$. – Henry Feb 26 at 14:18

What to compute is not very clear. Anyway, if you want the value of: $$50^2\frac{\binom{n}{50}}{\binom{n}{49}}+49^2\frac{\binom{n}{49}}{\binom{n}{48}}+\ldots+1^2\frac{\binom{n}{1}}{\binom{n}{0}}=50(n-49)+49(n-48)+\ldots+1(n-0)$$ you just need to recall that $\sum_{k=1}^{m}k = \frac{m(m+1)}{2}$ and $\sum_{k=1}^m k^2 = \frac{m(m+1)(2m+1)}{6}$.

-

Hint:

$$\frac{\binom{n}{p}}{\binom{n}{p-1}}=\frac{1}{p(n-p)}$$

-
Okay but how to deal with $1.50+49.2+48.3+....+26.25)$ – Archis Welankar Feb 26 at 13:47
Can you check the location of the $n-p+1$ term from the $(n-(p-1))!$? – Michael Burr Feb 26 at 14:11
$\frac{\binom{n}{p}}{\binom{n}{p-1}}=\frac{\frac{n!}{p!(n-p)!}}{\frac{n!}{(p-1)!(n-(p-1))!}}= \frac{(p-1)!(n-(p-1))!}{p!(n-p)!}= \frac{(p-1)!(n-p+1)!}{p!(n-p)!}= \frac{n-p+1}{p}$. – Michael Burr Feb 26 at 14:21
perhaps you meant $\frac {\frac np}{\frac n{p-1}}=\frac 1{p(n-p)}$... – hypergeometric Feb 26 at 14:38
I was referring to @Bacon's answer and trying to point that out. – hypergeometric Feb 26 at 14:45

Each term has the form

$$k^2\frac{\binom{n}{k}}{\binom{n}{k-1}}$$

We can simplify this

$$k^2\frac{\binom{n}{k}}{\binom{n}{k-1}} = \frac{k^2\frac{n!}{(n-k)!k!}}{\frac{n!}{(n-k+1)!(k-1)!}} = \frac{k^2*n!(n-k+1)!(k-1)!}{n!*k!(n-k)!} = \frac{k^2(n-k+1)}{k} = k(n-k+1)$$

Thus

\begin{align} \sum_{k=1}^{\hat{K}} k^2\frac{\binom{n}{k}}{\binom{n}{k-1}} &=& \sum_{k=1}^{\hat{K}} k(n-k+1) \\&=& (n+1)\sum_{k=1}^{\hat{K}} k - \sum_{k=1}^{\hat{K}} k^2 \\&=& \frac{\hat{K}(n+1)(\hat{K}+1)}{2} - \frac{\hat{K}(\hat{K}+1)(2\hat{K}+1)}{6} \\&=& \frac{\hat{K}(3n - 2\hat{K} + 2)(\hat{K}+1)}{6} \end{align}

Now, in your specific case, $\hat{K} = 50$, so we get a sum of $425(3n-98)$ by plugging this into the above.

-


text:
# Can a Warforged add his Slam attack damage to a shield bash attack?

Just a thought a friend of mine brought up while working on a Warforged character: since a shield bash attack theoretically has about the same movements as a Warforged slam attack, shouldn't you be able to add your Slam damage to a shield bash? I mean, sure the shield spikes hurt already, but when the force behind it is supplied by an angry 270+lb magical robot, it's bound to be more powerful than an average human carrying equal weight, right?

-
Do the rules work that way? No. Being a 270-lb magical robot is taken into account in the Strength bonus. Can you make a house rule that does that? Yes. Is it a good idea? Likely not, unless you really want to boost shield use and your group is fairly hapless in terms of rules optimization - to hardcore 3.5'ers this is a door to another 100 points of damage... – mxyzplk Sep 9 '13 at 21:39
Also, please read meta.rpg.stackexchange.com/questions/942/… on how to make a constructive house rules question on RPG.SE, it may help. – mxyzplk Sep 9 '13 at 21:40

No, they are separate attacks. A Slam isn’t actually hitting something with your arm so much as body-slamming it, at least for Medium creatures.

Even if you wanted to say they were the same action, the stacking rules would say that then you just deal whichever has the greater damage; they would not stack.

The only way I’m aware of to do this kind of combination is the Beast Strike feat from Dragon magazine, which combines a Slam (or Claw) attack with an Unarmed Strike. Combined with an aptitude shield (aptitude is a special weapon property from Tome of Battle), you could use the shield instead of an Unarmed Strike. But that’s the only way I know of to achieve it.

As for a houserule, a feat à la Beast Strike but for shields+slams wouldn’t be unreasonable; actually, it’d be kind of on the weaker side.

-
Ah, ok then. Besides, if I understand the rules correctly, I think I could still do a slam attack (at penalty) after a full-attack action with normal weapons, so if I get Two-Weapon Fighting I could in theory use all three (primary, shield, slam) at once. – Cobalt Sep 9 '13 at 22:11
@Cobalt That's correct. It would (assuming a light shield) be Primary at -2, Offhand at -2, Slam at -5 (and half Str to damage). – KRyan Sep 9 '13 at 23:35

No, for the same reason running faster doesn't increase your damage on a charge.

A warforged's slam is essentially just a punch that does more damage because its fists are made of metal instead of flesh. Hitting with a shield is no more beneficial. Rules-wise, a slam and a shield bash are just two separate attacks you can't combine.

-


text:
## anonymous 3 years ago integrate x^1/3 (x+3)^2

1. Mimi_x3

$\int x^{1/3}*(x+3)^2dx$??

2. anonymous

yes!

3. Mimi_x3

there's two methods either expand it out or use u-sub

4. anonymous

i would expand because it is easiest

5. Mimi_x3

yeah but it wont look nice..

6. anonymous

is the answer 3/10x^10/3 + 18/7x^7/3 + 27/4x^4/3 + C ? or did i do something wrong? can you show me the working pls? by expanding it @Mimi_x3

7. Mimi_x3

http://www.wolframalpha.com/input/?i=integrate+x%5E1%2F3+%28x%2B3%29%5E2 expanding is easy; just simple algebra then integrate one by one


text:
# ∂^2/(∂^2 y)=∂/∂y (ξ_y ∂/∂ξ+η_y ∂/∂η) second derivative problematic

• December 30th 2013, 07:49 AM
gorkyerdogan
∂^2/(∂^2 y)=∂/∂y (ξ_y ∂/∂ξ+η_y ∂/∂η) second derivative problematic
Hello guys, I'm pretty new here and I have a problem. I couldn't take 2nd derivative of this equation;

∂^2/(∂^2 y)=∂/∂y (ξ_y ∂/∂ξ+η_y ∂/∂η)

Attachment 29969

• December 30th 2013, 09:18 AM
HallsofIvy
Re: ∂^2/(∂^2 y)=∂/∂y (ξ_y ∂/∂ξ+η_y ∂/∂η) second derivative problematic
That's not an equation- you are just saying that those two operators are the same. But I don't understand what it is that you want to take the second derivative of. The second derivative of the left side would be $\frac{\partial^4}{\partial y^4}$ and the second derivative of the right $\frac{\partial^3}{\partial y^3}\left(\xi_y\frac{\partial}{\partial \xi}+ \eta_y\frac{\partial}{\partial \eta}\right)$
but I doubt that is what you are asking.
• December 30th 2013, 09:25 AM
gorkyerdogan
Re: ∂^2/(∂^2 y)=∂/∂y (ξ_y ∂/∂ξ+η_y ∂/∂η) second derivative problematic
Attachment 29970

I couldn't expand the right side of the equation by taking 2nd derivative of it. Is it a bit more clear now?
• December 30th 2013, 10:15 AM
romsek
Re: ∂^2/(∂^2 y)=∂/∂y (ξ_y ∂/∂ξ+η_y ∂/∂η) second derivative problematic
Quote:

Originally Posted by gorkyerdogan
Attachment 29970

I couldn't expand the right side of the equation by taking 2nd derivative of it. Is it a bit more clear now?

just use the product rule for derivatives

$\frac{\partial}{\partial y}\left(\xi_y \frac{\partial}{\partial \xi}+\eta_y \frac{\partial}{\partial \eta}\right)=\frac{\partial \xi_y}{\partial y}\frac{\partial}{\partial \xi}+\xi_y \frac{\partial}{\partial y \partial \xi}+\frac{\partial \eta_y}{\partial y}\frac{\partial}{\partial \eta}+\eta_y \frac{\partial }{\partial y \partial \eta}$

I hope you understand that these are operators.
• December 30th 2013, 11:11 AM
gorkyerdogan
Re: ∂^2/(∂^2 y)=∂/∂y (ξ_y ∂/∂ξ+η_y ∂/∂η) second derivative problematic
Thank you very much mate. This is so helpful for me.


text:
# Determining the limits of integration

1. Jun 29, 2010

### ahmetbaba

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

Use a triple integral to find the volume of the solid bounded by the graphs of the equations;

z=9-x3 y=2-x2 y=0 z=0, x is equal to or bigger than 0

2. Relevant equations

3. The attempt at a solution

Well finding the limits for z and y were simple, they are given, however I'm finding trouble finding the upper limit for x.

0$$\leq z$$$$\ leq9-x^3 0[tex]\leq y$$$$\leq2-x^2 0[tex]\leq x$$$$\leq$$?

This may be trivial and something really easy, but I don't know this particular solution. Thanks for the help

2. Jun 30, 2010

### Staff: Mentor

Fixed your LaTeX below. Click on an expression to see what I did.
If you integrate with respect to x last, I believe that the limits on x are 0 and sqrt(2).

3. Jun 30, 2010

### HallsofIvy

Staff Emeritus
No, your first post said specifically "x is equal to or bigger than 0".


text: I recently had a problem with my Presario R3000 laptop. The battery was completely drained and would not charge. The laptop is still under warranty, so I figured I would contact support and see what my options were. Before doing that thought I checked the Compaq/HP support website to see if there were any updates for my laptop. There was a firmware update that was supposed to fix a problem where if the battery is completely drained, the laptop won't charge it. Hey, that sounds like my problem! So, I flashed my laptop's firmware with the new release. Everything went well, but it didn't seem to help my battery problem. So, I decided to contact HP. I went back to their website and noticed they have an option to do a live chat online with tech support. So, I clicked the link and I was greeted by a tech almost immediately. That was a surprise! He got my details and gave me a procedure to try to "recalibrate" the battery. I was pretty sure this wouldn't work, but I figured I should at least try it. I did the procedure and as I thought, it didn't help. So, the next day I got back on the tech support website and started a new chat. The tech got online right away and I explained my problem and told him what I had done the previous day. He said it sounds like my battery really is dead and that since it is under warranty, they would send me a new one at no charge. HP shipped it FedEx overnight, with a return label for my old battery. I put the new battery in and everything is working great!


text:
# Question 6f862

Jun 27, 2017

$47$ ${\text{g CO}}_{2}$

#### Explanation:

We're asked to find the mass of ${\text{CO}}_{2}$ that forms when $30$ $\text{g CO}$ are burned in excess oxygen.

The equation for this reaction is

$2 {\text{CO" (g) + "O"_2(g) rarr 2"CO}}_{2} \left(g\right)$

Let's first calculate the number of moles of carbon monoxide, using its molar mass, $28.01$ $\text{g/mol}$:

30cancel("g CO")((1color(white)(l)"mol CO")/(28.01cancel("g CO"))) = color(red)(1.07 color(red)("mol CO"

Since $\text{CO}$ and ${\text{CO}}_{2}$ have the same coefficients, the relative number of moles will be the same:

color(red)(1.07)color(white)(l)color(red)("mol CO") = color(green)(1.07)color(white)(l)color(green)("mol CO"_2

Lastly, let's use the molar mass of ${\text{CO}}_{2}$ ($44.01$ $\text{g/mol}$) to calculate the theoretical mass yield of carbon dioxide:

color(green)(1.07)cancel(color(green)("mol CO"_2))((44.01color(white)(l)"g CO"_2)/(1cancel("mol CO"_2))) = color(blue)(47 color(blue)("g CO"_2

rounded to $2$ significant figures.

Thus, for this reaction, if $30$ grams of carbon monoxide are burned in air, color(blue)(47 sfcolor(blue)("grams of CO"_2# can form (this is the theoretical yield, the maximum amount that can form).


text:
# Name of this type of purchase agreement?

As described in a Khan Academy video, Merrill Lynch offloaded some CDOs to an entity called Lone Star Funds in the following way: (1) the purchase price was marked as \$6.7B; (2) Lone Star provided \$1.7B in cash; (3) Merrill Lynch provided a \$5B loan for the rest of the purchase; (4) if Lone Star defaults on the loan, their only exposure is the CDOs themselves. This creates an interesting arrangement where \$6.7B is kind of like a strike price on an option. If the CDOs are worth less, then Lone Star loses all of the \$1.7B and Merrill takes a haircut proportional to how much less. If they are worth more than \$6.7B, Merrill caps out at \\$6.7B and Lone Star receives the profit.

Is this kind of arrangement common (I am completely new to finance)? Does it have a name? At first, it seemed like a way of cooking the books (marking the sale price of the CDOs higher than it was) but when I thought about it, it seemed more like a speculative arrangement on its price.

## 1 Answer

That's not quite right. Lone star essentially pays 1.7bn for a call option on the CDO, struck at 5bn. If the cdos are worth less than 5bn, lone star defaults and Merrill collects the cdos.

This arrangement is called a purchase of cdos using a non recourse loan. Meaning , Merrill has no recourse to any assets of lone star other than the cdos.

A buyer would do this because it's a way to buy cdos using leverage with limited downside. A bank would do this if they desire to get the CDo position off their books ( however , there may be some debate on the accounting treatment , since the bank will own the CDo again if it falls below 5bn).


text:
# Category:Geometry of Complex Plane

This category contains results about Geometry of Complex Plane.

Because a complex number can be expressed as an ordered pair, we can plot the number $x + i y$ on the real number plane $\R^2$:

### Real Axis

Complex numbers of the form $\tuple {x, 0}$, being wholly real, appear as points on the $x$-axis.

### Imaginary Axis

Complex numbers of the form $\tuple {0, y}$, being wholly imaginary, appear as points on the points on the $y$-axis.

## Subcategories

This category has the following 13 subcategories, out of 13 total.


text:
# Completing a Tree solved by 2013

July 11, 2012, midnight by Rosalind Team

Topics: Graph Algorithms, Phylogeny

## The Tree of Life

Figure 1. A phylogeny illustrating proposed evolutionary relationships among the three domains of life: Bacteria, Archaea, and Eukaryota.

"As buds give rise by growth to fresh buds, and these, if vigorous, branch out and overtop on all sides many a feebler branch, so by generation I believe it has been with the great Tree of Life, which fills with its dead and broken branches the crust of the earth, and covers the surface with its ever-branching and beautiful ramifications." Charles Darwin, The Origin of Species

A century and a half has passed since the publication of Darwin's magnum opus, and yet the construction of a single Tree of Life uniting life on Earth still has not been completed, with perhaps as many as 90% of all living species not yet catalogued (although a beautiful interactive animation has been produced by OneZoom).

To get an insight about state-of-art attempts to build this tree, you may take a look at the Tree of Life Web Project - collaborative effort of biologists from around the world to combine information about diversity of life on Earth. It is a peer-reviewed ongoing project started in 1995, now it holds more than 10,000 pages with characteristics of different groups of organisms and their evolutionary history, and tree still grows.

Instead of trying to construct the entire Tree of Life all at once, we often wish to form a simpler tree in which a collection of species have been clumped together for the sake of simplicity; such a group is called a taxon (pl. taxa). For a given collection of taxa, a phylogeny is a treelike diagram that best represents the evolutionary connections between the taxa: the construction of a particular phylogeny depends on our specific assumptions regarding how these evolutionary relationships should be interpreted. See Figure 1.

## Problem

Figure 2. A labeled tree with 6 vertices and 5 edges.

An undirected graph is connected if there is a path connecting any two nodes. A tree is a connected (undirected) graph containing no cycles; this definition forces the tree to have a branching structure organized around a central core of nodes, just like its living counterpart. See Figure 2.

We have already grown familiar with trees in “Mendel's First Law”, where we introduced the probability tree diagram to visualize the outcomes of a random variable.

In the creation of a phylogeny, taxa are encoded by the tree's leaves, or nodes having degree 1. A node of a tree having degree larger than 1 is called an internal node.

Given: A positive integer $n$ ($n \leq 1000$) and an adjacency list corresponding to a graph on $n$ nodes that contains no cycles.

Return: The minimum number of edges that can be added to the graph to produce a tree.

## Sample Dataset

10
1 2
2 8
4 10
5 9
6 10
7 9

## Sample Output

3

## Extra Information

After solving this problem, a standard mathematical exercise for the technically minded is to verify that every tree having 2 or more nodes must contain at least two leaves.


text:
# Show $|\left(e^{-ixt}-1 \right)/t| \le |x|$, $x ,t\ne 0$

Show $$\left|\frac{e^{-ixt}-1}{t}\right| \le |x|$$ for all real $x \ne 0$ and all real $t \ne 0$.

I tried taylor theorem but as the reminder is complex, I don't see how to get the result.

-
First step: denote $\alpha=xt$. You need to prove that $\left|e^{-i\alpha}-1\right|\leq|\alpha|$ for $\alpha\neq0$ –  Dennis Gulko Oct 29 '12 at 19:40

As explained by @Dennis Gulko in a comment, the task is to prove that $|\mathrm e^{-\mathrm is}-1|\leqslant|s|$ for every real number $s$. But the function $u:\mathbb R\to\mathbb C$, $t\mapsto\mathrm e^{-\mathrm it}$, has derivative $u'(t)=-\mathrm i\mathrm e^{-\mathrm it}$, whose modulus is (at most) $1$ everywhere, hence $$|u(s)-u(0)|\leqslant|s-0|\cdot\sup\{|u'(t)|\mid0\leqslant t\leqslant s\}=|s|.$$
\begin{align} \exp(-ixt) - 1 &= \cos(xt) - i \sin(xt) - 1\\ & = -\left(2 \sin^2(xt/2) + 2i \cos(xt/2) \sin(xt/2)\right)\\ &= -2i \sin(xt/2) \left(\cos(xt/2) - i \sin(xt/2)\right)\\ & = -2i \sin(xt/2) \exp(-ixt/2) \end{align} Hence, $$\vert \exp(-ixt) - 1 \vert = \vert -2i \sin(xt/2) \exp(-ixt/2) \vert = 2 \vert \sin(xt/2) \vert$$


text:
### Sidebar

Add a new page:

theories:quantum_mechanics:phase_space

# Phase Space Quantum Mechanics

## Intuitive

Ever since Werner Heisenberg’s 1927 paper on uncertainty, there has been considerable hesitancy in simultaneously considering positions and momenta in quantum contexts, since these are incompatible observables. […] However, they too are wrong. Quantum mechanics (QM) can be consistently and autonomously formulated in phase space, with c-number position and momentum variables simultaneously placed on an equal footing, in a way that fully respects Heisenberg’s principle. […] The net result is that quantum mechanics works smoothly and consistently in phase space, where position coordinates and momenta blend together closely and symmetrically. Thus, sharing a common arena and language with classical mechanics [14], QMPS connects to its classical limit more naturally and intuitively than in the other two familiar alternate pictures, namely, the standard formulation through operators in Hilbert space, or the path integral formulation. […]

Still, as every physics undergraduate learns early on, classical phase space is built out of “c-number” position coordinates and momenta, x and p, ordinary commuting variables characterizing physical particles; whereas such observables are usually represented in quantum theory by operators that do not commute. How then can the two be reconciled? The ingenious technical solution to this problem was provided by Groenewold in 1946, and consists of a special binary operation, the ⋆-product (see Star Product), which enables x and p to maintain their conventional classical interpretation, but which also permits x and p to combine more subtly than conventional classical variables; in fact to combine in a way that is equivalent to the familiar operator algebra of Hilbert space quantum theory. Nonetheless, expectation values of quantities measured in the lab (observables) are computed in this picture of quantum mechanics by simply taking integrals of conventional functions of x and p with a quasi-probability density in phase space, the Wigner function — essentially the density matrix in this picture. But, unlike a Liouville probability density of classical statistical mechanics, this density can take provocative negative values and, indeed, these can be reconstructed from lab measurements [11]. Quantum Mechanics in Phase space by Curtright and Zachos

Classical statistical mechanics is a ' crypto-deterministic' theory, where each element of the probability distribution of the dynamical variables specifying a given system evolves with time according to deterministic laws of motion; the whole uncertainty is contained in the form of the initial distributions. A theory based on such concepts could not give a satisfactory account of such non-deterministic effects as radioactive decay or spontaneous emission (cf. Whittaker (2)). Classical statistical mechanics is, however, only a special case in the general theory of dynamical statistical (stochastic) processes. In the general case, there is the possibility of 'diffusion' of the probability 'fluid', so that the transformation with time of the probability distribution need not be deterministic in the classical sense. In this paper, we shall attempt to interpret quantum mechanics as a form of such a general statistical dynamics.

Quantum Mechanics as a statistical theory by J. E. Moyal

Reading Recommendations

## Concrete

Time Evolution

The time evolution in the phase space formulation of quantum mechanics is described by the vonNeumann equation

$$\frac{\partial f}{\partial t} = -\frac{1}{i \hbar} (f \star H - H \star f ).$$

For the Wigner function, this equation reads

$$\frac{\partial W}{\partial t} = - \{\{ W,H \}\} = \frac{2}{ \hbar} W \left( \frac{\hbar}{2 } ( \overleftarrow \partial_x \overrightarrow \partial_p - \overleftarrow \partial_p \overrightarrow \partial_x)\right) H = - \{ W,H\} + \mathcal{O}(\hbar^2) ,$$

where $\{\{ ,\}\}$ denotes the Moyal bracket and $\{ ,\}$ the Poisson bracket.

In the limit, $\hbar \to 0$ the von Neumann equation reduces to the Liouville equation.

The difference between the von Neumann equation and the Liouville equation is that in the former the density of points in phase space is not conserved. Formulated differently, the probability fluid is diffusive and compressible.

Reading Recommendations

Important Papers

## Abstract

In the phase space formulation, the transition from classical mechanics to quantum mechanics is known as deformation quantization.

The map between function in the phase space formulation of quantum mechanics and the operators in the corresponding Hilbert space is known as Wigner–Weyl transform.

## Why is it interesting?

The chief advantage of the phase space formulation is that it makes quantum mechanics appear as similar to Hamiltonian mechanics as possible by avoiding the operator formalism, thereby "'freeing' the quantization of the 'burden' of the Hilbert space".[5] This formulation is statistical in nature and offers logical connections between quantum mechanics and classical statistical mechanics, enabling a natural comparison between the two (cf. classical limit). https://en.wikipedia.org/wiki/Phase_space_formulation

theories/quantum_mechanics/phase_space.txt · Last modified: 2018/10/11 13:02 by jakobadmin


text:
## Stream: maths

### Topic: By schoolkid

#### Chris Hughes (Nov 13 2019 at 00:57):

A 12 year old just got a prize for proving this.

example : ∀ n : ℕ, 7 ∣ n ↔ 7 ∣ (n / 10 + 5 * (n % 10))

This can be turned into a Presburger formula right? Should omega be able to do it?

I tried turning it into a Presburger formula, but it didn't seem to work.

import tactic.omega
open nat
example (n : ℕ) : 7 ∣ n ↔ 7 ∣ (n / 10 + 5 * (n % 10)) :=
begin
rw [dvd_iff_mod_eq_zero, dvd_iff_mod_eq_zero],
have := nat.mod_lt n (show 0 < 7, by norm_num),
have := nat.mod_lt n (show 0 < 10, by norm_num),
have := nat.mod_lt (n / 10 + 5 * (n % 10)) (show 7 > 0, by norm_num),
have := nat.mod_add_div (n / 10 + 5 * (n % 10)) 7,
repeat { revert this },
generalize : n % 7 = a,
generalize : n / 7 = b,
generalize : n / 10 = c,
generalize : n % 10 = d,
generalize : (c + 5 * d) % 7 = e,
generalize : (c + 5 * d) / 7 = f,
omega -- doesn't work
end

#### Kevin Buzzard (Nov 13 2019 at 07:33):

I would not be surprised if you could find some previous reference to this test in some popular maths book from the 50s, it's very dangerous calling it a new formula. But good on him. It's 7|10x+y iff 7|x+5y. If you apply the test to 14 you get 21.

#### Abhimanyu Pallavi Sudhir (Nov 14 2019 at 19:34):

It's m | a x + b y iff m | (an-br) x + bn y for hcf(m, n) = 1 (or something like that). I think this stuff is taught in high school.

#### Abhimanyu Pallavi Sudhir (Nov 14 2019 at 19:34):

What's omega?

#### Johan Commelin (Nov 14 2019 at 19:34):

A tactic that proves statements in the language of the ordered group of integers

#### Johan Commelin (Nov 14 2019 at 19:35):

So you are allowed to add and compare integers using ≤ but you can only multiply with constants

Last updated: May 14 2021 at 20:13 UTC


text:
## Editorial for DMOPC '20 Contest 3 P5 - Tower of Power

Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.

Submitting an official solution before solving the problem yourself is a bannable offence.

Author: nthistle

Since is at most 3, and is prime, we can just directly use Euler's Theorem along with a standard modpow. That is, given a tower , we can first compute , and then compute . The important thing here is that all exponentiations are done with a modulus, since otherwise, even for small values of , the numbers rapidly blow up in size. As is prime, we can easily compute , and the modular exponentiations are each time (where is the exponent, and bounded by ). In Python, this approach might look something like the following:

n, m = map(int, input().split())
a1, a2, a3 = map(int, input().split())
print(pow(a1, pow(a2, a3, m - 1), m))

Of course, an actual solution needs to account for both , , and the case where (Python will happily evaluate , although here it should be – one of the last test cases for subtask 1 covered this, and a few people got tripped up by it).

Time complexity: (but only works for )

The initial naive approach here is to use the same process as from subtask 1, but simply pass the modulus up the tower by repeatedly taking , , , and then evaluating from the top down. This approach requires a more general method for computing , as the modulus is no longer guaranteed to be prime, and certainly can never be prime, but it also doesn't work because of the requirements we need to use Euler's Theorem: we need the base and the modulus to be coprime. In subtask 1, as the modulus is prime, the only time this isn't the case is when the base is a multiple of the modulus, and the result is trivially 0. However, now we have to deal with the more general case where and share some, not necessarily all, prime factors.

Computing can be done simply by factorizing , which can be done easily in time, and computing , and repeatedly applying makes the modulus shrink relatively quickly (it isn't hard to see that after iterations, the result will be 1), so this isn't an issue (Also note that as we apply , the cost of factorizing goes down substantially, so this bound is not tight).

The intended solution to the non-coprime case was to use Chinese Remainder Theorem, splitting up into prime powers. More formally, let , where are primes that also divide , and is whatever is left over of after dividing out these prime powers. Then, we compute , , , etc., and then "reassemble" the results using CRT:

Computing the first of these is easy, as is by definition now coprime to , so we just continue with the regular approach. For the others, we claim they are usually , and when they aren't, they can be directly evaluated. Consider just one prime that divides both and , and let , and be the highest power of that divides . Also, allow to represent the value of the "rest" of the tower (not modulo anything), which we can't necessarily compute directly. Then, we have

Clearly, if , this whole term is just 0, as the result will be a multiple of . If it isn't, we must compute directly, but then this result is manageable, as , which is at most 30. Thus, we can just check the next 4 terms of the tower (), and see whether the result will be at least or not, which gives us time for computing the results from the prime powers.

The actual process of CRT itself is quite fast, basically only relying on the extended Euclidean algorithm, which is time (depending on how many distinct primes we have in common between the base and the modulus, we might have to do this a few times, but the constant here is small: at most 9 for bounds of ). Naively, this gives us a total runtime of , but we can use the fact that we observed earlier, which is that applying decreases the modulus very rapidly, and we can limit the we need to consider to .

Time complexity:

However, as it turns out, there's a much cleaner solution to write, which doesn't require CRT (and is slightly faster). In the cleaner version, you just ignore the non-coprime issue, but instead when you propagate the modulus up the tower with , you don't reduce it all the way modulo . If the exponent is , when , we leave it alone, but if , we reduce it such that we have , . This abuses the following result:

This result can be proved with the Chinese Remainder Theorem: consider splitting out into prime powers. By CRT, if the statement is true modulo all the prime powers of , it's true modulo . Modulo any prime power coprime to , Euler's Theorem tells us it's true. Modulo any prime power not coprime to , they must be congruent to 0, since is at least the largest exponent of any prime power that divides . Writing this more generally,

As long as we don't remove that last from the exponent, we're fine. One way to look at this is we get to move the Chinese Remainder Theorem from the computations into a proof of an intermediary result, at the cost of our exponents being larger (which costs very little as modular exponentiation is cheap).

Time complexity:


text:
My Math Forum find number by minimum guess

 Number Theory Number Theory Math Forum

December 9th, 2017, 04:49 PM   #1
Member

Joined: Apr 2012

Posts: 72
Thanks: 3

find number by minimum guess

Thanks!
Attached Images
 1.jpg (13.9 KB, 12 views)

Last edited by greg1313; December 9th, 2017 at 05:59 PM.

 December 9th, 2017, 05:10 PM #2 Senior Member   Joined: Feb 2016 From: Australia Posts: 1,739 Thanks: 609 Math Focus: Yet to find out. You might have better luck getting some help if you post the question in full!
 December 9th, 2017, 05:23 PM #3 Member   Joined: Apr 2012 Posts: 72 Thanks: 3 What do you mean?
December 9th, 2017, 05:36 PM   #4
Senior Member

Joined: Feb 2016
From: Australia

Posts: 1,739
Thanks: 609

Math Focus: Yet to find out.
Quote:
 Originally Posted by mathLover What do you mean?
You haven't posted a clear question. Can you explain what you mean by "find number by minimum guess"?

 December 9th, 2017, 05:44 PM #5 Member   Joined: Apr 2012 Posts: 72 Thanks: 3 Sorry, I meant find a positive integer number by minimum guesses Last edited by mathLover; December 9th, 2017 at 05:48 PM.
 December 9th, 2017, 06:01 PM #6 Global Moderator     Joined: Oct 2008 From: London, Ontario, Canada - The Forest City Posts: 7,885 Thanks: 1088 Math Focus: Elementary mathematics and beyond The image displaying mechanism here seems sketchy... but there it is... Thanks from Joppy
 December 9th, 2017, 06:31 PM #7 Senior Member   Joined: Sep 2016 From: USA Posts: 520 Thanks: 293 Math Focus: Dynamical systems, analytic function theory, numerics The follow up question which is a power of 2 kind of gives it away. In case you still need a hint: https://en.wikipedia.org/wiki/Binary_search_algorithm
December 9th, 2017, 06:53 PM   #8
Member

Joined: Apr 2012

Posts: 72
Thanks: 3

Quote:
 Originally Posted by greg1313 The image displaying mechanism here seems sketchy... but there it is...
I fixed the image, but I can't edit the original post. Here is the image:

Last edited by mathLover; December 9th, 2017 at 06:58 PM.

December 9th, 2017, 07:06 PM   #9
Member

Joined: Apr 2012

Posts: 72
Thanks: 3

Quote:
 Originally Posted by SDK The follow up question which is a power of 2 kind of gives it away. In case you still need a hint: https://en.wikipedia.org/wiki/Binary_search_algorithm
I thought to solve this by using binary search algorithm, but the problem is, that according to the question, who you ask him if the number is smaller than ... or greater than ... , he is allowed to lie to tyou once.

Last edited by mathLover; December 9th, 2017 at 07:11 PM.

December 9th, 2017, 08:22 PM   #10
Senior Member

Joined: Sep 2016
From: USA

Posts: 520
Thanks: 293

Math Focus: Dynamical systems, analytic function theory, numerics
Quote:
 Originally Posted by mathLover I thought to solve this by using binary search algorithm, but the problem is, that according to the question, who you ask him if the number is smaller than ... or greater than ... , he is allowed to lie to tyou once.
Correct, but this doesn't matter.

Suppose WLOG that there are $2^n$ numbers and you ask whether it is larger or smaller than $2^{n-1}$ and he says smaller. Your next question is going to be "Is it larger or smaller than $2^{n-2}$? If he answers larger, you wonder if he lied in the previous step. Can you think of a clever way to change the question so that you can distinguish the 4 cases?
1. Truthful last step, smaller
2. Truthful last step, larger
3. Lied on last step, smaller (than $2^{n-1} + 2^{n-2}$
4. Lied on last step, larger than $2^{n-1} + 2^{n-2}$.

 Tags find, guess, minimum, number

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post edrisdolati Math 5 November 3rd, 2017 05:52 AM iulisesq Algebra 2 February 11th, 2016 06:21 AM jbergin Advanced Statistics 3 December 29th, 2014 07:12 PM shalinisharma512 Algebra 2 April 5th, 2009 03:06 PM shalinisharma512 Number Theory 3 April 4th, 2009 01:56 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top


text:
I currently have the following verilog expression...

wire [15:0] address_delta = (rx_address_in * 8 + (rx_eof_in ? rx_len_in : 8)) - (seek_address + OUT_BYTES);

rx_address_in is 13 bits and OUT_BYTES is a parameter which is an integer constant (so I guess 32 bits). I am assuming the 8x multiplication will get optimized into a left shift of 3. If this is a bad assumption to make please let me know. I am using the latest Vivado.

Right now my design is having trouble meeting timing. Although my address_delta is only 16 bits, since I am using 32 bit constants inside the expression which I think might cause the operations to be carried out at a higher precision than necessary. How would you rewrite this expression for efficiency or is it fine the way it is?

I am thinking I could do something like this...

wire [15:0] seek_end = (seek_address + OUT_BYTES);
wire [15:0] address_delta = ((rx_address_in << 2'd3) + (rx_eof_in ? rx_len_in : 4'd8)) - seek_end;

• Have you looked in the timing report to identify the critical path? Synthesis tools are pretty good at discarding logic that isn't needed, so I doubt that you really have identified the problem. – Elliot Alderson Jul 11 '18 at 19:09

HDL languages do not work like C. There still is a continuous timing path from seek_address to address_delta.
To break the path you must e.g. insert a register. But that may stop your design from working as seek_end will arrive one clock cycle later.
You do not tell us how fast your design must be, but as Elliot Alderson already suggest in the comment: three 16 bit adders are rarely critical. (The rx_address_in << 2'd3 does not cause any delay.) Unless this expression is part of a logic cone.
• I think the OP is saying that using wire[15:0] will force the intermediate result to be truncated to 16 bits, which might help meet timing since less stuff is computed. – immibis Jul 12 '18 at 2:06


text:
23/113
\begin{frame}{From Unrestricted Grammars to Turing Machines}
\begin{block}{Theorem}
For every unrestricted $G$ there is a Turing machine $M$ such that
\begin{talign}
L(M) = L(G)
\end{talign}
\end{block}
\pause

\begin{construction}
Input for $M$ is a word $w$ (written on the tape).
\pause\medskip

$M$ can do a \emph{breadth-first search} for a derivation of $w$ from $S$.
\pause\medskip

If a derivation is found, then $w$ is accepted by $M$.
\pause\medskip

Then $L(M) = L(G)$.
\end{construction}
\end{frame}


text:
# qiskit.ignis.verification.postselection_decoding¶

postselection_decoding(results)[código fonte]

Calculates the logical error probability using postselection decoding.

This postselects all results with trivial syndrome.

Parâmetros

results (dict) – A results dictionary, as produced by the process_results method of a code.

Retorna

Dictionary of logical error probabilities for

each of the encoded logical states whose results were given in the input.

Tipo de retorno

dict