text:
ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

# Insert Equation

ST3

Equation Editor for Sublime Text 3

Labels latex, math, markdown

## Installs

• Total 1K
• Win 543
• Mac 394
• Linux 194
Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0

## Readme

Source
raw.githubusercontent.com

# Insert Equation plugin for Sublime Text

This plugin for Sublime Text 3 offers a command to input, preview and insert a link to an image displaying a TeX formula.

The Insert Equation as Image command shows an input prompt where you can enter a TeX formula and a preview will be displayed while editing it.

The formulas are rendered using an online renderer that generates an image displaying the formula on the fly. The default rendering engine is http://latex.codecogs.com/gif.latex but this can be changed using the renderer parameter.

When you are happy with the formula, by pressing enter the plugin will create the link pointing to an image showing the formula. The actual format will be determined by the convert_to parameter. If set to "auto" the appropriate target will be determined from the language of the current view. For example when inserting the formula into a Markdown file, the generated code will look like

![formula](http://latex.codecogs.com/gif.latex?%5Csum_%7Bi%3D0%7D%5En%5Cfrac%7B%5Calpha%5Ei%5B%5Ckappa%5D%28w%29%7D%7B%5Csqrt%7B%5Cbeta%7D%5Ccdot%20%5Cgamma_i%7D "\sum_{i=0}^n\frac{\alpha^i[\kappa](w)}{\sqrt{\beta}\cdot \gamma_i}")

that generates

For an alternative renderer, try

"renderer": "http://chart.googleapis.com/chart?cht=tx&chl={query}"

The supported target formats are:

• text for just the url
• md for Markdown
• html for an HTML <img> tag
• tex for the TeX formula wrapped in dollars (the rendering will be done by TeX, the plugin's usefulness is in the preview)
• source for the url in double-quotes
• clipboard for copying the url in the clipboard

## MIT License

Copyright © 2014 Emanuele D'Osualdo

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


text:
# Why does a sheet of paper stick to the end of a vacuum cleaner?

What makes a piece of paper or other material hard to pull away from the end of a vacuum cleaner once it's covering the opening? What force are you acting against when you try to pull it away? Also, why does the end of the vacuum cleaner stick to a wall, floor or other hard surface?

• Because it sucks! – JMac May 15 '17 at 15:53

Suppose the piece of paper sticks to the end of your vacuum cleaner, and for simplicity let's assume no air passes through the sheet or on the sides of it.

The vacuum cleaner proceeds to suck air from the tube as long as it can with its limited capability. What it is effectively doing is reducing amount of air, and therefore the pressure, in the pipe.

This leads to a pressure imbalance: on one side of the sheet, there is air at the usual atmospheric pressure. On the other side, air at a slightly lower pressure. It's this difference in pressure that causes this force, which, in an ideal situation, is equal to the pressure difference times the surface of the part of the sheet attached to the top of the pipe, $F = S\Delta p$.

• so is it effectively the weight of all the air in the atmosphere pushing against the paper, with nothing pushing from the other side to cancel it out? – user987356 May 15 '17 at 15:56
• what about the case where it's against the wall or the floor - in which case it seems like the pressure shouldn't make a difference, because the surface is too solid to be moved by the air pressure? – user987356 May 15 '17 at 15:58
• Yes, I think you can say it's due to the weight of all the rest of the air. In the case of the wall, it's effectively the vacuum cleaner which is pushed against the wall by pressure, in a sense. The pressure of the region of air near the top of the tube, and near the wall, is lower then in the rest of the room. – Bzazz May 15 '17 at 16:00

Like the fish that discovers water last, we don't normally notice the 15 pounds per square inch (psi) of atmospheric pressure that we live in. A vacuum cleaner can help us notice the air pressure without us having to jump out of our fish tank (Earths' atmosphere).

This pressure of 15 psi surrounds us and everything we touch. The vacuum cleaner reduces the pressure a little by constantly removing air from the hose, and this normally causes a focused wind that is useful for cleaning.

When a piece of paper blocks this wind, the pressure in the hose decreases further, down to some maximum pressure difference that the motor is capable of reaching. If it can drop the pressure to 14 psi in the hose, and the hose's nozzle has an opening of one square inch, then there will be one pound of force holding the paper on the nozzle. (I choose 14 psi to keep the math simple.)

This pound of force comes from more air molecules hitting the outside of the paper than the side that is looking into the hose.

As for the wall or the corner, it does not matter that the house has thick walls and that you can not tell where the full 15 psi is being applied. Nature finds it automatically.

Here is another way to look at it: Every part of the vacuum cleaner is exposed to 15 psi all around it except for the nozzle opening. The nozzle opening is only experiencing 14 psi. This is enough to cause the nozzle opening to press against whatever surface is blocking or slowing the airflow.

Another example: If you put a funnel on the opening you can increase the effective size of the nozzle opening. If the wide side of the funnel is round and six inches in diameter, then its area will be about 28 square inches. Unblocked, this will not do much. Now, use a bowling ball to cover this opening. A vacuum cleaner that can drop the pressure to 14 psi when no air is moving will now be able to generate 28 pounds of lifting force, letting you pick up the bowling ball via the suction alone. This fact was used by a vacuum cleaner company to show how strong their vacuum cleaners are, but I believe any other brand of vacuum cleaner could have done it too.

• thanks, i think that was what was counter-intuitive to me - just how strong normal atmospheric pressure is. – user987356 May 17 '17 at 9:03

format: plain


text:
# Chi-squared confidence interval for variance

When constructing, for example, a $$90\%$$ confidence interval for the population variance using the chi-squared distribution, we have:

\begin{align} & P\left(a<\frac{(n-1)S^2}{\sigma^2}

In my course, we then find $$a, b$$ such that $$P(\chi_{n-1}^{2}b)=0.05.$$

My question is, given that the chi-squared distribution is asymmetric for small $$n,$$ why do we pick $$0.05$$ for both sides? Surely we’d have a shorter confidence interval if we weighted more of the $$0.1$$ probability to one of the sides, instead of splitting equally?

Because the chi-squared distribution is skewed, the sample variance is not generally at the center of a 95% CI for the variance (for normal data).

You are correct to say that you can often get a narrower interval by taking something like probability 2% from one tail and 3% from the other, than by taking 2.5% from each tail.

For practical purposes, the narrowest 95% interval may put almost all of the 5% probability in one tail, thus becoming nearly a one-sided interval. This may
or may not be useful.

Thus, it has become more or less standard to use
probability-symmetric intervals in general practice. If you are not showing a probability-symmetric interval, it is a good idea to report that you are not, and to explain why.

Example: Consider a normal sample of size $$n=20$$
with variance $$\sigma^2 = 25.$$

set.seed(2022)
x = rnorm(20, 50, 5)
v = var(x);  v
[1] 25.01484

Seven 2-sided 95% CIs for $$\sigma^2$$ and their widths:

CI.1 = 19*v/qchisq(c(.97, .02), 19)
CI.1; diff(CI.1)
[1] 14.77971 55.47799
[1] 40.69828

CI.2 = 19*v/qchisq(c(.975, .025), 19)
CI.2; diff(CI.2)
[1] 14.46722 53.36339
[1] 38.89617    # probability-symmetric

CI.3 = 19*v/qchisq(c(.98, .03), 19)
CI.3; diff(CI.3)
[1] 14.10859 51.65860
[1] 37.55002

CI.4 = 19*v/qchisq(c(.99, .04), 19)
CI.4; diff(CI.4)
[1] 13.13265 49.00681
[1] 35.87417

CI.5 = 19*v/qchisq(c(.995, .045), 19)
CI.5; diff(CI.5)
[1] 12.31867 47.93333
[1] 35.61466   # shortest on this list

CI.6 = 19*v/qchisq(c(.999, .049), 19)
CI.6; diff(CI.6)
[1] 10.84618 47.16119
[1] 36.31501   # longer than above

CI.7 = 19*v/qchisq(c(.99999, .04999), 19)
CI.7; diff(CI.7)
[1]  8.284141 46.980289
[1] 38.69615   # 'almost' one sided

Note: The relevant one-sided 95% CI would give the upper bound $$46.97848.$$ Depending on the application, that might be exactly what you want.


text:
The guide to installing Strasheela is well-documented, so follow it. A few remarks.

• You'll need g++ and if you want to use the latest snapshot like I do, you'll need Subversion.
• I put the Strasheela source in ~/.strasheela and will use ~/Strasheela for my own files, so set ~/Strasheela/output in ~/.ozrc as a replacement for the /tmp/ output directory.
• Install audacity, cplay, timidity and lilypond (yes, all of it) from the repositories.
• Edit the executables in ~/.ozrc, my suggestion (based on lots of professional experience) would be audacity, cplay, timidity as MIDI player and we'll use evince instead of acroread.
• You'll have to manually install csvmidi and midicsv. Just download the tar.gz and perform the known make, make check, sudo make install cycle.
• The same is true for Fomus, download and install from their website. When compiling from source you'll need libboost-all-dev too (another big one, like Lilypond), from repositories. And lots of memory too. But you'll only need this when you want to export to MusicXML, so you can forget about it for now.
• Add $OZHOME/1.4.99/bin to your $PATH, i.e., ~/.bashrc should contain a line stating export PATH=$PATH:$OZHOME/bin/:\$OZHOME/1.4.99/bin where 1.4.99 is obviously your version of Oz, in case you've followed the installation guide this will be 1.4.99.
• Execute StrasheelaTutorial if you think you're done. If you really want to test your installation (unfortunately not the configuration for some reason), open the tutorial at chapter Output Formats, edit the configuration in File > Settings to match your .ozrc and run the examples.

For reference, here is the relevant part of my .ozrc:

{Init.putStrasheelaEnv csound csound}
{Init.putStrasheelaEnv sndPlayer audacity}
{Init.putStrasheelaEnv cmdlineSndPlayer cplay}
{Init.putStrasheelaEnv csvmidi csvmidi}
{Init.putStrasheelaEnv midicsv midicsv}
{Init.putStrasheelaEnv midiPlayer timidity}
{Init.putStrasheelaEnv lilypond lilypond}
{Init.putStrasheelaEnv 'convert-ly' 'convert-ly'}
{Init.putStrasheelaEnv pdfViewer evince}

I've decided to go for Audacity, if you have another favorite sound editor, pick that. Everything should work now, but I haven't done much with Strasheela at this moment, so if things pop up later, I'll edit these posts accordingly.


text:
# Why is the induced M field proportional to H, instead of the B field?

1. Dec 9, 2013

### burgjeff

The M field is the density of induced or permanent magnetic dipole moments. It is analogous to the P field in electrostatics. In electrostatics, the induced P field in a dielectric is proportional to the applied electric field. This is intuitive to me. Why though, in magnetostatics, is the M field proportional to the Demagnetizing field(the H field).

M=X$_{m}$H=X$_{m}$($\frac{B}{u_{0}}$+M)

I can't seem to wrap my head around this. My text book declares it without any justification. Can anyone provide me some insight into this?

Thank you.

2. Dec 10, 2013

### Meir Achuz

It is the B field in the material that produces M. When magnetization is produced by placing iron in a long solenoid or a torus, the H field in the iron is directly given by nI because H_t is continuous, so engineers like to consider M a function of H. But the iron knows that is is the B field that is producing M. When removed from the long solenoid or torus, end effects become dominant. That is why B and H are in opposite directions near the end of a magnet. At this point mu and chi become irrelevant. The H field is not 'demagnetrizing', although calling it so is a fairly common error of UG texts. It is B, not H, that affects M
You are right, but don't tell your professor, because he/she probably believes the textbook.

3. Dec 10, 2013

### Jano L.

The reason behind the use of $\mathbf H$ in the definition of magnetic susceptibility is the fact that in common situations, $\mathbf H$ field is easily calculated from the electric currents in the wiring, which are easily measured by Am-meter. The field $\mathbf B$ is hard to calculate from the controlled variables such as the applied current; it has to be inferred based on the intensity of induced currents in secondary wiring.

This is similar to definition of electrical susceptibility in electrostatics: there it is defined by

$$\mathbf P = \epsilon_0 \chi_e \mathbf E,$$

because the $\mathbf E$ field is easily calculable from the voltage applied to capacitor, while the $\mathbf D$ field is not.

In macroscopic EM theory, there is not much reason for such assertion. Both fields are only macroscopic fields, describing the physical state in a different way.

Only in microscopic theory we could attempt to identify the basic field that acts on particles and makes them magnetized. The common view is that the macroscopic field $\mathbf B$ is a kind of probabilistic description of the much more complicated microscopic magnetic field $\mathbf b$ actually exerting force on the individual charged particles. So iron responds to the presence of microscopic fields $\mathbf e, \mathbf b$ and magnetizes; but it would be a stretch to say iron feels $\mathbf B$, because $\mathbf B$ is just a simplified concept invented by humans, incapable to account for all the myriads of nuclei and electrons in the material.

4. Dec 10, 2013

### burgjeff

Thanks for the responses guys. After reading them, my understanding is that the M field is defined this way conventionally because it is more convenient. This is allowed because, by rearranging the equation M=X$_{m}$H in order to solve for M, one gets:

M=$\frac{X_{m}}{X_{m}+1}$ $\frac{B}{u_{0}}$

Thus, defining M proportional to H is equivalent to defining M proportional to B, within an arbitrary constant of proportionality.


text:
# wx.GraphicsPath¶

A wx.GraphicsPath is a native representation of a geometric path.

The contents are specific and private to the respective renderer. Instances are reference counted and can therefore be assigned as usual. The only way to get a valid instance is by using wx.GraphicsContext.CreatePath or wx.GraphicsRenderer.CreatePath .

## Class Hierarchy¶

Inheritance diagram for class GraphicsPath:

## Methods Summary¶

 AddArc Adds an arc of a circle. AddArcToPoint Adds an arc (of a circle with radius r) that is tangent to the line connecting current point and (x1, y1) and to the line connecting (x1, y1) and (x2, y2). AddCircle Appends a circle around (x,y) with radius r as a new closed subpath. AddCurveToPoint Adds a cubic bezier curve from the current point, using two control points and an end point. AddEllipse Appends an ellipse fitting into the passed in rectangle as a new closed subpath. AddLineToPoint Adds a straight line from the current point to (x,y). AddPath Adds another path onto the current path. AddQuadCurveToPoint Adds a quadratic bezier curve from the current point, using a control point and an end point. AddRectangle Appends a rectangle as a new closed subpath. AddRoundedRectangle Appends a rounded rectangle as a new closed subpath. CloseSubpath Closes the current sub-path. Contains GetBox Gets the bounding box enclosing all points (possibly including control points). GetCurrentPoint Gets the last point of the current path, (0,0) if not yet set. GetNativePath Returns the native path (CGPathRef for Core Graphics, Path pointer for GDIPlus and a cairo_path_t pointer for cairo). MoveToPoint Begins a new subpath at (x,y). Transform Transforms each point of this path by the matrix. UnGetNativePath Gives back the native path returned by GetNativePath because there might be some deallocations necessary (e.g.

## Class API¶

class wx.GraphicsPath(GraphicsObject)

A GraphicsPath is a native representation of a geometric path.

### Methods¶

AddArc(self, *args, **kw)

Adds an arc of a circle.

The circle is defined by the coordinates of its centre (x, y) or c and its radius r. The arc goes from the starting angle startAngle to endAngle either clockwise or counter-clockwise depending on the value of clockwise argument.

The angles are measured in radians but, contrary to the usual mathematical convention, are always clockwise from the horizontal axis.

If for clockwise arc endAngle is less than startAngle it will be progressively increased by 2pi until it is greater than startAngle. If for counter-clockwise arc endAngle is greater than startAngle it will be progressively decreased by 2pi until it is less than startAngle.

If there is a current point set, an initial line segment will be added to the path to connect the current point to the beginning of the arc.

AddArc (self, x, y, r, startAngle, endAngle, clockwise)

Parameters
• x (wx.Double) –

• y (wx.Double) –

• r (wx.Double) –

• startAngle (wx.Double) –

• endAngle (wx.Double) –

• clockwise (bool) –

AddArc (self, c, r, startAngle, endAngle, clockwise)

Parameters
• c (wx.Point2D) –

• r (wx.Double) –

• startAngle (wx.Double) –

• endAngle (wx.Double) –

• clockwise (bool) –

AddArcToPoint(self, x1, y1, x2, y2, r)

Adds an arc (of a circle with radius r) that is tangent to the line connecting current point and (x1, y1) and to the line connecting (x1, y1) and (x2, y2).

If the current point and the starting point of the arc are different, a straight line connecting these points is also appended. If there is no current point before the call to AddArcToPoint this function will behave as if preceded by a call to MoveToPoint(0, 0). After this call the current point will be at the ending point of the arc.

Parameters
• x1 (wx.Double) –

• y1 (wx.Double) –

• x2 (wx.Double) –

• y2 (wx.Double) –

• r (wx.Double) –

AddCircle(self, x, y, r)

Appends a circle around (x,y) with radius r as a new closed subpath.

After this call the current point will be at ( x+ r , y).

Parameters
• x (wx.Double) –

• y (wx.Double) –

• r (wx.Double) –

AddCurveToPoint(self, *args, **kw)

AddCurveToPoint (self, cx1, cy1, cx2, cy2, x, y)

Adds a cubic bezier curve from the current point, using two control points and an end point.

If there is no current point before the call to AddCurveToPoint this function will behave as if preceded by a call to MoveToPoint(cx1, cy1).

Parameters
• cx1 (wx.Double) –

• cy1 (wx.Double) –

• cx2 (wx.Double) –

• cy2 (wx.Double) –

• x (wx.Double) –

• y (wx.Double) –

Adds a cubic bezier curve from the current point, using two control points and an end point.

If there is no current point before the call to AddCurveToPoint this function will behave as if preceded by a call to MoveToPoint(c1).

Parameters

AddEllipse(self, x, y, w, h)

Appends an ellipse fitting into the passed in rectangle as a new closed subpath.

After this call the current point will be at ( x+ w , y+ h/2 ) .

Parameters
• x (wx.Double) –

• y (wx.Double) –

• w (wx.Double) –

• h (wx.Double) –

AddLineToPoint(self, *args, **kw)

Adds a straight line from the current point to (x,y).

If current point is not yet set before the call to AddLineToPoint this function will behave as MoveToPoint .

Parameters
• x (wx.Double) –

• y (wx.Double) –

Adds a straight line from the current point to p.

If current point is not yet set before the call to AddLineToPoint this function will behave as MoveToPoint .

Parameters

p (wx.Point2D) –

AddPath(self, path)

Adds another path onto the current path.

After this call the current point will be at the added path’s current point. For Direct2D the path being appended shouldn’t contain a started non-empty subpath when this function is called.

Parameters

path (wx.GraphicsPath) –

AddQuadCurveToPoint(self, cx, cy, x, y)

Adds a quadratic bezier curve from the current point, using a control point and an end point.

If there is no current point before the call to AddQuadCurveToPoint this function will behave as if preceded by a call to MoveToPoint(cx, cy).

Parameters
• cx (wx.Double) –

• cy (wx.Double) –

• x (wx.Double) –

• y (wx.Double) –

AddRectangle(self, x, y, w, h)

Appends a rectangle as a new closed subpath.

After this call the current point will be at (x, y).

Parameters
• x (wx.Double) –

• y (wx.Double) –

• w (wx.Double) –

• h (wx.Double) –

AddRoundedRectangle(self, x, y, w, h, radius)

Appends a rounded rectangle as a new closed subpath.

If radius equals 0 this function will behave as AddRectangle , otherwise after this call the current point will be at ( x+ w , y+ h/2 ) .

Parameters
• x (wx.Double) –

• y (wx.Double) –

• w (wx.Double) –

• h (wx.Double) –

CloseSubpath(self)

Closes the current sub-path.

After this call the current point will be at the joined endpoint of the sub-path.

Contains(self, *args, **kw)
Returns

True if the point is within the path.

Contains (self, c, fillStyle=ODDEVEN_RULE)

Parameters
Return type

bool

Contains (self, x, y, fillStyle=ODDEVEN_RULE)

Parameters
Return type

bool

GetBox(self)

Gets the bounding box enclosing all points (possibly including control points).

Return type

wx.Rect2D

GetCurrentPoint(self)

Gets the last point of the current path, (0,0) if not yet set.

Return type

wx.Point2D

GetNativePath(self)

Returns the native path (CGPathRef for Core Graphics, Path pointer for GDIPlus and a cairo_path_t pointer for cairo).

MoveToPoint(self, *args, **kw)

MoveToPoint (self, x, y)

Begins a new subpath at (x,y).

Parameters
• x (wx.Double) –

• y (wx.Double) –

MoveToPoint (self, p)

Begins a new subpath at p.

Parameters

p (wx.Point2D) –

Transform(self, matrix)

Transforms each point of this path by the matrix.

For Direct2D the current path shouldn’t contain a started non-empty subpath when this function is called.

Parameters

matrix (wx.GraphicsMatrix) –

UnGetNativePath(self, p)

Gives back the native path returned by GetNativePath because there might be some deallocations necessary (e.g.

on cairo the native path returned by GetNativePath is newly allocated each time).

Parameters

p

### Properties¶

Box

CurrentPoint

NativePath


text:
# QR algorithm

In numerical linear algebra, the QR algorithm is an eigenvalue algorithm: that is, a procedure to calculate the eigenvalues and eigenvectors of a matrix. The QR algorithm was developed in the late 1950s by John G. F. Francis and by Vera N. Kublanovskaya, working independently.[1][2][3] The basic idea is to perform a QR decomposition, writing the matrix as a product of an orthogonal matrix and an upper triangular matrix, multiply the factors in the reverse order, and iterate.

## The practical QR algorithm

Formally, let A be a real matrix of which we want to compute the eigenvalues, and let A0:=A. At the k-th step (starting with k = 0), we compute the QR decomposition Ak=QkRk where Qk is an orthogonal matrix (i.e., QT = Q−1) and Rk is an upper triangular matrix. We then form Ak+1 = RkQk. Note that

${\displaystyle A_{k+1}=R_{k}Q_{k}=Q_{k}^{-1}Q_{k}R_{k}Q_{k}=Q_{k}^{-1}A_{k}Q_{k}=Q_{k}^{\mathsf {T}}A_{k}Q_{k},}$

so all the Ak are similar and hence they have the same eigenvalues. The algorithm is numerically stable because it proceeds by orthogonal similarity transforms.

Under certain conditions,[4] the matrices Ak converge to a triangular matrix, the Schur form of A. The eigenvalues of a triangular matrix are listed on the diagonal, and the eigenvalue problem is solved. In testing for convergence it is impractical to require exact zeros, but the Gershgorin circle theorem provides a bound on the error.

In this crude form the iterations are relatively expensive. This can be mitigated by first bringing the matrix A to upper Hessenberg form (which costs ${\displaystyle {\begin{matrix}{\frac {10}{3}}\end{matrix}}n^{3}+{\mathcal {O}}(n^{2})}$ arithmetic operations using a technique based on Householder reduction), with a finite sequence of orthogonal similarity transforms, somewhat like a two-sided QR decomposition.[5][6] (For QR decomposition, the Householder reflectors are multiplied only on the left, but for the Hessenberg case they are multiplied on both left and right.) Determining the QR decomposition of an upper Hessenberg matrix costs ${\displaystyle 6n^{2}+{\mathcal {O}}(n)}$ arithmetic operations. Moreover, because the Hessenberg form is already nearly upper-triangular (it has just one nonzero entry below each diagonal), using it as a starting point reduces the number of steps required for convergence of the QR algorithm.

If the original matrix is symmetric, then the upper Hessenberg matrix is also symmetric and thus tridiagonal, and so are all the Ak. This procedure costs ${\displaystyle {\begin{matrix}{\frac {4}{3}}\end{matrix}}n^{3}+{\mathcal {O}}(n^{2})}$ arithmetic operations using a technique based on Householder reduction.[5][6] Determining the QR decomposition of a symmetric tridiagonal matrix costs ${\displaystyle {\mathcal {O}}(n)}$ operations.[7]

The rate of convergence depends on the separation between eigenvalues, so a practical algorithm will use shifts, either explicit or implicit, to increase separation and accelerate convergence. A typical symmetric QR algorithm isolates each eigenvalue (then reduces the size of the matrix) with only one or two iterations, making it efficient as well as robust.

## The implicit QR algorithm

In modern computational practice, the QR algorithm is performed in an implicit version which makes the use of multiple shifts easier to introduce.[4] The matrix is first brought to upper Hessenberg form ${\displaystyle A_{0}=QAQ^{\mathsf {T}}}$ as in the explicit version; then, at each step, the first column of ${\displaystyle A_{k}}$ is transformed via a small-size Householder similarity transformation to the first column of ${\displaystyle p(A_{k})}$ (or ${\displaystyle p(A_{k})e_{1}}$), where ${\displaystyle p(A_{k})}$, of degree ${\displaystyle r}$, is the polynomial that defines the shifting strategy (often ${\displaystyle p(x)=(x-\lambda )(x-{\bar {\lambda }})}$, where ${\displaystyle \lambda }$ and ${\displaystyle {\bar {\lambda }}}$ are the two eigenvalues of the trailing ${\displaystyle 2\times 2}$ principal submatrix of ${\displaystyle A_{k}}$, the so-called implicit double-shift). Then successive Householder transformations of size ${\displaystyle r+1}$ are performed in order to return the working matrix ${\displaystyle A_{k}}$ to upper Hessenberg form. This operation is known as bulge chasing, due to the peculiar shape of the non-zero entries of the matrix along the steps of the algorithm. As in the first version, deflation is performed as soon as one of the sub-diagonal entries of ${\displaystyle A_{k}}$ is sufficiently small.

### Renaming proposal

Since in the modern implicit version of the procedure no QR decompositions are explicitly performed, some authors, for instance Watkins,[8] suggested changing its name to Francis algorithm. Golub and Van Loan use the term Francis QR step.

## Interpretation and convergence

The QR algorithm can be seen as a more sophisticated variation of the basic "power" eigenvalue algorithm. Recall that the power algorithm repeatedly multiplies A times a single vector, normalizing after each iteration. The vector converges to an eigenvector of the largest eigenvalue. Instead, the QR algorithm works with a complete basis of vectors, using QR decomposition to renormalize (and orthogonalize). For a symmetric matrix A, upon convergence, AQ = QΛ, where Λ is the diagonal matrix of eigenvalues to which A converged, and where Q is a composite of all the orthogonal similarity transforms required to get there. Thus the columns of Q are the eigenvectors.

## History

The QR algorithm was preceded by the LR algorithm, which uses the LU decomposition instead of the QR decomposition. The QR algorithm is more stable, so the LR algorithm is rarely used nowadays. However, it represents an important step in the development of the QR algorithm.

The LR algorithm was developed in the early 1950s by Heinz Rutishauser, who worked at that time as a research assistant of Eduard Stiefel at ETH Zurich. Stiefel suggested that Rutishauser use the sequence of moments y0T Ak x0, k = 0, 1, … (where x0 and y0 are arbitrary vectors) to find the eigenvalues of A. Rutishauser took an algorithm of Alexander Aitken for this task and developed it into the quotientdifference algorithm or qd algorithm. After arranging the computation in a suitable shape, he discovered that the qd algorithm is in fact the iteration Ak = LkUk (LU decomposition), Ak+1 = UkLk, applied on a tridiagonal matrix, from which the LR algorithm follows.[9]

## Other variants

One variant of the QR algorithm, the Golub-Kahan-Reinsch algorithm starts with reducing a general matrix into a bidiagonal one.[10] This variant of the QR algorithm for the computation of singular values was first described by Golub & Kahan (1965). The LAPACK subroutine DBDSQR implements this iterative method, with some modifications to cover the case where the singular values are very small (Demmel & Kahan 1990). Together with a first step using Householder reflections and, if appropriate, QR decomposition, this forms the DGESVD routine for the computation of the singular value decomposition.

## References

1. J.G.F. Francis, "The QR Transformation, I", The Computer Journal, 4(3), pages 265271 (1961, received October 1959). doi:10.1093/comjnl/4.3.265
2. Francis, J. G. F. (1962). "The QR Transformation, II". The Computer Journal. 4 (4): 332–345. doi:10.1093/comjnl/4.4.332.
3. Vera N. Kublanovskaya, "On some algorithms for the solution of the complete eigenvalue problem," USSR Computational Mathematics and Mathematical Physics, vol. 1, no. 3, pages 637–657 (1963, received Feb 1961). Also published in: Zhurnal Vychislitel'noi Matematiki i Matematicheskoi Fiziki, vol.1, no. 4, pages 555–570 (1961). doi:10.1016/0041-5553(63)90168-X
4. Golub, G. H.; Van Loan, C. F. (1996). Matrix Computations (3rd ed.). Baltimore: Johns Hopkins University Press. ISBN 0-8018-5414-8.
5. Demmel, James W. (1997). Applied Numerical Linear Algebra. SIAM.
6. Trefethen, Lloyd N.; Bau, David (1997). Numerical Linear Algebra. SIAM.
7. Ortega, James M.; Kaiser, Henry F. (1963). "The LLT and QR methods for symmetric tridiagonal matrices". The Computer Journal. 6 (1): 99–101. doi:10.1093/comjnl/6.1.99.
8. Watkins, David S. (2007). The Matrix Eigenvalue Problem: GR and Krylov Subspace Methods. Philadelphia, PA: SIAM. ISBN 978-0-89871-641-2.
9. Parlett, Beresford N.; Gutknecht, Martin H. (2011), "From qd to LR, or, how were the qd and LR algorithms discovered?" (PDF), IMA Journal of Numerical Analysis, 31 (3): 741–754, doi:10.1093/imanum/drq003, ISSN 0272-4979
10. Bochkanov Sergey Anatolyevich. ALGLIB User Guide - General Matrix operations - Singular value decomposition . ALGLIB Project. 2010-12-11. URL:http://www.alglib.net/matrixops/general/svd.php.%5B%5D Accessed: 2010-12-11. (Archived by WebCite at https://www.webcitation.org/5utO4iSnR)


text:
• Editorial Board +
• For Contributors +
• Journal Search +
Journal Search Engine
ISSN : 1598-7248 (Print)
ISSN : 2234-6473 (Online)
Industrial Engineering & Management Systems Vol.17 No.4 pp.840-849
DOI : https://doi.org/10.7232/iems.2018.17.4.840

# The Use of Bootstrap for Weight Control in Data Envelopment Analysis

Akbar Amiri*, Saber Saati*, Alireza Amirteimoor
Department of Mathematics, Lahijan branch, Islamic Azad University, Lahijan, Iran
Department of Mathematics, North Tehran branch, Islamic Azad University, Tehran, Iran
Department of Mathematics, Rasht branch, Islamic Azad University, Rasht, Iran
* Corresponding Author, E-mail: s_saatim@iau-tnb.ac.ir
February 14, 2018 August 31, 2018 August 31, 2018

## ABSTRACT

Data Envelopment Analysis includes a wide range of mathematical models and is used for assessing the relative efficiency of a set of homogenous Decision Making Units (DMUs). Multiplicative DEA models achieve a set of weights for input and output variables for each DMU. Based on these weights, relative efficiency of each DMU is evaluated. Determining different weights for same factor in a set of homogenous DMUs is not realistic. To solve this problem, Common Set of Weights (CSW) is used. To improve the results of DEA models and reduce the weight flexibility, bootstrap method is used to determine a CSW. The aim of this article is to determine the CSW by finding a confidence interval for weights with bootstrap. By evaluating these intervals, a Probabilistic Common Set of Weights (PCSW) is obtained, which provides flexibility for weights.

## 1. INTRODUCTION

Data envelopment analysis (DEA) was proposed based on the research work by Farrell (1957) to evaluate the efficiency of a set of homogenous decision making units (DMUs). Charnes et al. (1978) were interested in Farrell (1957) and proposed CCR

model in 1978. The model was used for measuring and comparing the relative efficiency of organizational DMUs with multiple inputs and outputs. This method in known as a useful tool for evaluating the performance of organizations. Liu et al. (2013) surveyed the data envelopment analysis (DEA) literature by applying a citation- based approach. and With growth curve analysis hints, the DEA literature’s size eventually grow to at least double the size of the existing literature. In traditional DEA models, each DMU is in the best situation compared to other DMUs. The model is solved to achieve a set of best input and output weights. In these models, the obtained weights in the evaluation of different DMUs are not usually the same. In the other words, the same inputs and outputs have different weights in evaluating different DMUs and this is not realistic. On the other hand, because of the compensatory property of existing models, being with the assign a weight of zero may have some input and output factors are removed, that DMU under evaluation where there is weakness. To fix this problem, a common set of weights (CSW) is used. The idea of a CSW was first introduced by Roll et al. (1991) for using DEA in evaluating DMUs in highway maintenance. Roll et al. (1991) and Roll and Golany (1993) suggested several alternative approaches to generating the common weights, including running a general unbounded DEA model to obtain different sets of weights and then taking their average or weighted average with DEA efficiencies as the weights, maximizing the average efficiency of DMUs, maximizing the number of DEA efficient units, and ranking various factors by some order of importance and then assigning low weights to less important factors and maximal feasible weights to important ones. Sinuany-Stern et al. (1994) proposed a two-step linear discriminant analysis to obtain common weights. Friedman and Sinuany-Stern (1997) used a canonical correlation analysis to provide a single weight vector for inputs and outputs, respectively, common to all DMUs. Sinuany-Stern and Friedman (1998) provided a non-linear discriminant analysis to determine the common weights of DMUs. Liu and Peng (2008) developed a common weight analysis method to find common weights of DMUs. Hashimoto and Wu (2004) proposed a compromise programming model to find the common weights of DMUs by combining DEA and compromise programming model. Kao and Hung (2005) proposed a similar compromise solution approach for generating common weights the DEA framework. Wang et al. (2011) used regression analysis to find a CSW. In this method, the common weights are determined in views of efficiency fitting the DEA efficiencies computed with the most favorable weights to DMUs as their target efficiencies to be achieved, which are best fitted with the efficiencies computed from the common weights. By minimizing their fitting errors, the common weights are optimally estimated. Jahanshahloo et al. (2005) used a non-linear multi-objective fractional programming problem for creating the common weights. Saati et al. (2012) proposed a set of common fuzzy weights using a computationally-efficient virtual ideal units. Omrani (2013) combined uncertainty in the DEA model for the CSW proposed by Zohrehbandian et al. (2010). Omrani (2013) first developed a robust DEA based on optimal robust method proposed by Bertsimas and Sim (2004) to calculate the efficiency of each DMU as the ideal solution and then used ideal planning approximation to find the common weights by minimizing deviation from the ideal solution. Saati (2008) applied bounds on the factors to limit the flexibility of the DEA model in assigning weights to each DMU. Then, by limiting the flexibility, a CSW was proposed for the assessment of all DMUs. Payan et al. (2014) defined ideal DMUs as a criterion for efficient DMUs and obtained a model for finding a CSW.

Bootstrap was first introduced by Efron (1979) in 1979 for confidence intervals of a statistics. It was developed by Efron and Tibshirani (1993). Simar (1992) used bootstrap to estimate the efficiency of panel data in nonparametric models. In the case of unavailability of the analytic sampling distribution of efficiency, they provided a bootstrap method within this framework. Using this method, the statistical significance of estimation was evaluated. Ferrier and Hirschberg (1997) used bootstrap to assess the linear programming efficiency scores. Bootstrap was applied on efficiencies obtained from the DEA model. Using this method, a confidence interval was obtained. The use of bootstrap in nonparametric boundary models backs to a research work by Simar and Wilson (1998). They used bootstrap for the first time for sensitivity analysis of DEA efficiency. They also offered another bootstrap method to remove disadvantages of bootstrap introduced by Efron (1979). Simar and Wilson (2000) developed the algorithm introduced in Simar and Wilson (1998) and proposed a general framework for estimation of the data production process in non-parametric boundary models. Sadjadi and Omrani (2010) used bootstrap to estimate robust efficiency in DEA. Alexander et al. (2010) conducted a two-stage (DEA and regression) analysis of the efficiency of New Zealand secondary schools using bootstrap procedure. For the first time, Song et al. (2013) used the Super-SBM model to measure and calculate the energy efficiency of the BRICS, and then analyzed its development process. The Bootstrap was applied to modify the values based on DEA derived from small sample data, and finally the relationship between energy efficiency and carbon emissions were measured. Wanke et al. (2016) proposed new Fuzzy-DEAα-level models to assess underlying uncertainty. Furthermore, bootstrap truncated regressions with fixed factors are used to measure the impact of each model on the efficiency scores and identify the most relevant contextual variables on efficiency. The proposed models demonstrated using an application on Mozambican banks to handle the underlying uncertainty. Kim et al. (2016) used bootstrap and DEA models to study the efficiency of management, quality of services and quality of market network in the wireless industry. They concluded that distribution of wireless carriers with high management productivity is same as distribution of wireless carriers with high-efficiency network quality.

The above approaches are unable to separate efficient DMUs easily. In this article, a new bootstrap method is proposed to find a CSW. The use of common weights allows comparison DMUs on uniform basis. The new bootstrap method specifies a 95% confidence interval for input and output weights. A Probabilistic Common Set of Weights (PCSW) is obtained using this confidence interval. Using this interval, efficient DMUs are separated from each other.

This paper is organized as follows. The standard bounded CCR model is introduced in Section 2. Section 3 discusses the bootstrap method and confidence interval algorithm to obtain a set of probabilistic common weights. A numerical example is discussed in Section 4. Conclusions are presented in Section 5.

## 2. THE STANDARD BOUNDED CCR MODEL

Consider n DMUs, each with m inputs and s outputs. Suppose that $x i j ( i = 1 , ... , m )$ and $y r j ( r = 1 , ... , s )$ are the inputs and outputs of the $DMU j ( j = 1 , ... , n )$ respectively. Then, the efficiency of $DMU j ( j = 1 , ... , n )$ can be represented as follows:(1)

$θ j = ∑ r = 1 s u r y r j ∑ i = 1 m v i x i j ∀ j .$
(1)

where $v i ( i = 1 , ... , m )$ and $u r ( r = 1 , ... , s )$ are the input and output weights assigned to m inputs and s outputs respectively. Charnes et al. (1978) proposed the CCR model to determine the optimal set of input and output weights as follows:(2)

$M a x θ o = ∑ r = 1 s u r y r o ∑ i = 1 m v i x i o s . t : θ j = ∑ r = 1 s u r y r j ∑ i = 1 m v i x i j ≤ 1 ∀ j , u r , v i ≥ 0 ∀ r , i .$
(2)

Using Charnes and Cooper (1962) conversion, the fractional programming model can be converted to a linear programming problem as follows:

$M a x θ o = ∑ r = 1 s u r y r o s . t : ∑ i = 1 m v i x i o = 1 , ∑ r = 1 s u r y r j − ∑ i = 1 m v i x i j ≤ 0 ∀ j , u r l ≤ u r ≤ u r u ∀ r , v i l ≤ v i ≤ v i u ∀ i .$
(3)

The input and output weights in the DEA models are variable and calculated for each DMU by the model (3). Sometimes a very small or zero weight is assigned to an input or output. This reduces the effect of that factor in the efficiency of DMU under consideration. By applying bounded weights, the model flexibility in assigning weights to each DMU can be limited. The bounded model (4) can be used to control weight flexibility:

$M a x θ o = ∑ r = 1 s u r y r o s . t : ∑ i = 1 m v i x i o = 1 , ∑ r = 1 s u r y r j − ∑ i = 1 m v i x i j ≤ 0 ∀ j , ∑ r = 1 s u r y r j − ∑ i = 1 m v i x i j ≤ 0 ∀ j , u r l ≤ u r ≤ u r u ∀ r , v i l ≤ v i ≤ v i u ∀ i .$
(4)

where $u r l ( r = 1 , ... , s ) , u r u ( r = 1 , ... , s ) , v i l ( 1 , ... , m ) and v i u ( 1 , ... , m )$ are the lower and upper bounds on output and input weights, respectively. When this flexibility is limited to the extent that only one value is obtained for each weight, a common set of weights is obtained for evaluating all DMUs. Researchers have proposed several methods to obtain a common set of weights. In the next section, the bootstrap method is discussed to obtain a probabilistic common set of weights.

## 3. BOOTSTRAP AND COMMON WEIGHT

Bootstrap is a method to approximate sampling distribution and estimator accuracy sizes using existing data resampling. This method was first introduced by Efron (1979) in 1979 and widely used in many fields of science. Bootstrap is a simulation method that the actual data are used in the bootstrap method to obtain an empirical approximation. For this purpose, numerous samples are used to estimate the sampling distribution of a statistics by insertion from an existing sample. By generating many samples, the sample conditions become close to the conditions of population for calculating the average, standard deviation, confidence interval and skewness in statistical inference. Bootstrap in non-parametric boundary models was first introduced by Simar (1992). Simar and Wilson (1998) used bootstrap for sensitivity analysis and confidence intervals of efficiency. In bootstrap method, samples are taken from an existing sample B times with replacement. Then, the parameter is obtained for each sample and their average is considered as a bootstrap estimation.

If ${ v 1 , ... , v m }$ and ${ u 1 , ... , u s }$ are respectively the input and output weights from model (3), the aim is to gain a confidence interval for the input and output weights using bootstrap method. To achieve a common set of weights, bounded weights provides a way to find a common set of weights. In this method, upper and lower bounds are considered for input and output weights. In the present article, these bounds are obtained using the bootstrap method. The bounds are used as probabilistic bounds of input and output weights to achieve a set of probabilistic common weights. Suppose B is the number of samples in the bootstrap, then the bootstrap algorithm for calculating bounds is as follows:

Step 1: The weights and efficiency of all DMUs are obtained by model (3). Then these weights are examined to obtain the following column matrices:

$[ V i j ] n × 1 = 1 ∑ j = 1 n θ j [ θ j v i j ] n × 1 ( i = 1 , ... , m ) , and [ U r j ] n × 1 = 1 ∑ j = 1 n θ j [ θ j u r j ] n × 1 ( r = 1 , ... , s )$

where $θ j ( j = 1 , ... , n )$ is the efficiency, vij the weight of ith input and urj the weight of rth output of DMUj, respectively.

Step 2: By the observed samples $( V 1 j , ... , V m j )$ and $( U 1 j , ... , U s j ) ,$, a bootstrap sample $( V i j * , ... , V m j * )$ and $( U 1 j * , ... , U s j * )$ is obtained by simple random sampling with replacement.

Step 3: The average value of the sample $( V i j * , ... , V m j * )$ and $( U 1 j * , ... , U s j * )$ is calculated.

Step 4: Repeat the steps 2 and 3 B times to obtain B bootstrap statistics ${ V ¯ b * ; b = 1 , ... , B }$ and ${ U ¯ b * ; b = 1 , ... , B } .$ The standard error and estimator distribution are calculated by the following formula:

$U ¯ = 1 B ∑ b = 1 B U ¯ b * , S e = { 1 B − 1 ∑ b = 1 B ( U ¯ b * − U ¯ ) 2 } 1 2 V ¯ = 1 B ∑ b = 1 B V ¯ b * , S e = { 1 B − 1 ∑ b = 1 B ( V ¯ b * − V ¯ ) 2 } 1 2$

Step 5: The empirical cumulative distribution function for B bootstraps, $V 1 j * , ... , V m j *$ and $U 1 j * , ... , U s j * ,$ is respectively calculated as:

$G v ( t ) = P ( V ¯ * ≤ t )$ and $G u ( t ) = P ( U ¯ * ≤ t )$ Hence, $V ¯ b o o t ( t ) = G v − 1 ( α )$ and $U ¯ b o o t ( t ) = G u − 1 ( α ) .$

Step 6: A confidence interval of 100(1−α) % of bootstrap for the mean of input and output weights is obtained from the following equations:

$( V ¯ b o o t ( α 2 ) , V ¯ b o o t ( 1 − α 2 ) ) , ( u ¯ b o o t ( α 2 ) , U ¯ b o o t ( 1 − α 2 ) ) .$

Implementing the above steps and considering α = 0.05, a confidence interval of 95% is obtained as probabilistic bounds for input and output weights. Using the above algorithm, the bounded model (4) can be written as follows:

$M a x θ o = ∑ r = 1 s u r y r o s . t : ∑ i = 1 m v i x i o = 1 , ∑ r = 1 s u r y r j − ∑ i = 1 m v i x i j ≤ 0 ∀ j , ∑ r = 1 s u r y r j − ∑ i = 1 m v i x i j ≤ 0 ∀ j , u r l ≤ u r ≤ u r u ∀ r , v i l ≤ v i ≤ v i u ∀ i . U ¯ r ( b o o t ) ( α 2 ) ≤ u r ≤ U ¯ r ( b o o t ) ( 1 − α 2 ) ∀ r , V ¯ i ( b o o t ) ( α 2 ) ≤ v i ≤ V ¯ i ( b o o t ) ( 1 − α 2 ) ∀ i .$
(5)

where $U ¯ r ( b o o t ) ( α 2 ) ( r = 1 , ... , s ) ,$ $U ¯ r ( b o o t ) ( 1 − α 2 ) ( r = 1 , ... , s ) ,$ $V ¯ i ( b o o t ) ( α 2 ) ( i = 1 , ... , m )$ and $V ¯ i ( b o o t ) ( 1 − α 2 ) ( i = 1 , ... , m )$ are the lower and upper bounds on output and input weights obtained from the bootstrap algorithm respectively.

By the proposed algorithm we be able to design the bounded CCR problem with probabilistic bounds.

Theorem 1. Model (5) is feasible.

Proof. It is evident that the lower bounds of input and output weights obtained from the bootstrap algorithm are greater than or equal to zero.

Now, we have to show that the upper bounds of input and output weights obtained from the bootstrap algorithm are less than or equal to the upper bounds of variables in CCR model.

The upper bound of input and output weights are given by Saati (2008) as follows:(6)

$v i ' = 1 M a x 1 ≤ j ≤ n { x i j } i = 1 , ... , m u r ' = 1 M a x 1 ≤ j ≤ n { y r j } r = 1 , ... , s$
(6)

Since the bounds of the weights obtained by average of the achieved weights by CCR model, the weight intervals are a subset of the $[ 0 , v i ′ ]$ and $[ 0 , u r ′ ]$. That is, Model (5) is always feasible. ■

Bounded weights restrict the flexibility the DEA model in assigning a set of weights to DMUs. If flexibility in the DEA model is not possible, CSW is used to evaluate DMUs. Starting from the bounded model (5), the model (7) is provided to achieve a CSW as follows:

$M a x ϕ s . t : ∑ r = 1 s u r y r j − ∑ i = 1 m v i x i j ≤ 0 ∀ j , U ¯ r ( b o o t ) ( α 2 ) + ϕ ( U ¯ r ( b o o t ) ( 1 − α 2 ) − U ¯ r ( b o o t ) ( α 2 ) ) ≤ u r ≤ U ¯ r ( b o o t ) ( 1 − α 2 ) + ϕ ( U ¯ r ( b o o t ) ( 1 − α 2 ) − U ¯ r ( b o o t ) ( α 2 ) ) ∀ r , V ¯ i ( b o o t ) ( α 2 ) + ϕ ( V ¯ i ( b o o t ) ( 1 − α 2 ) − V ¯ i ( b o o t ) ( α 2 ) ) ≤ v i ≤ V ¯ i ( b o o t ) ( 1 − α 2 ) + ϕ ( V ¯ i ( b o o t ) ( 1 − α 2 ) − V ¯ i ( b o o t ) ( α 2 ) ) ∀ i$
(7)

The role of the variable ϕ in the model (7), minimize the range between the weights variable so that we reach a common weight. It can be easily show that the problem (7) is feasible and its optimal value is bounded and positive.

A PCSW is obtained by solving (7), and the efficiency of each DMU can be evaluated as follows:

$e j = ∑ r = 1 s u r * y r j ∑ i = 1 m v i * x i j , ∀ j$
(8)

where $u r * ( r = 1 , ... , s )$ and $v i * ( i = 1 , ... , m )$ are optimal values of (7).

## 4. NUMERICAL EXAMPLE

In this section two numerical examples are to be examined using the proposed model to test their discrimination capabilities.

Example 1. Consider the data of Kao and Hung (2005) as Table 1.

The efficiency values of these DMUs by CCR model are shown it the second column of Table 2. As seen, According to the results of the CCR model, nine units of the seventeen decision units are efficient. The weights of inputs and outputs are presented in column 3 to 9.These weights are very different for DMUs. For example, the weights of the first input may vary from 0 to 0.036898. The flexibility in selecting weights can cover many shortcomings in the DMUs, falsely displaying inefficient units as efficient. Fourteen items in the third output are associated with zero weight, making this output insignificant in the calculation of efficiency. In other words, the third output is ignored in the calculation of efficiency, showing another problem with the DEA models. In the following, it is attempted to reduce the number of 1 values by using the bounded CCR model. Using the results of Table 2 for weights of inputs and outputs and applying the proposed method, the bounds of factors are calculated as Table 3.

The columns of vi′ and ur′ are the upper bounds of input and output weights, respectively, in the standard CCR model. As seen the obtained probabilistic intervals are a subset of CCR weight intervals. The results of the model (5) are shown in Table 4.

It is evident that the number of efficient units was reduced from nine to five. It means that the efficient DMUs in Table 2, are week efficient. But, this model is also not capable of discriminating the efficient units from one another. Moreover, the weights of the same factors are dissimilar in different DMUs. For example, the weights of the first input may vary from 0 to 0.004856. Despite improvement compared to the Model (3), there is still flexibility in allocating weights in the Model (5). Also, the number of zero weights in the third output is reduced from fourteen to nine. In order to overcome these problem, a confidence interval was obtained for the weights of every input and output using the bootstrap algorithm (Efron and Tibshirani (1993), Davison and Hinkley (1997) and Hall (1986) B = 1000) (Table 3). Applying these constraints to the CCR model, a bounded CCR model is obtained. Then, using the Model (7), a set of Probabilistic Common Set of Weights (PCSW) was obtained and presented in Table 5. The efficiency of the DMUs in the Model (8) was calculated using the PCSW and presented in the seventh column of Table 6.

It is evident from Table 6 that by using the proposed method, all DMUs were discriminated with only one having a value of 1. The results of the CCR efficiency method, the Kao and Hung (2005) methods, and the bounded CCR are also presented in the second through sixth columns, none of which was able to discriminate all DMUs. Meanwhile, the proposed method (seventh column) managed to discriminate all DMUs without allocating a zero weight to any of the inputs or outputs. Moreover, the weights of the same factors are to resemble in different DMUs and the flexibility of the weights has been controlled.

Example 2. Consider the data of (Shang and Sueyoshi, 1995) as Table 7.

The efficiency values of these DMUs by CCR model are shown it the second column of Table 8. As seen, the traditional CCR model evaluates seven of the 12 DMUs as DEA efficient. The weights of inputs and outputs are presented in column 3 to 8.These weights are very different for DMUs. For example, the weights of the first input may vary from 0 to 0.27248.

The flexibility in selecting weights can cover many shortcomings in the DMUs, falsely displaying inefficient units as efficient. In the following, it is attempted to reduce the number of 1 values by using the bounded CCR model. Using the results of Table 8 for weights of inputs and outputs and applying the proposed method, the bounds of factors are calculated as Table 9.

The columns of vi′ and ur′ are the upper bounds of input and output weights, respectively, in the standard CCR model. As seen the obtained probabilistic intervals are a subset of CCR weight intervals. The results of the model (5) are shown in Table 10.

It is evident that the number of efficient units was reduced from nine to four. It means that the efficient DMUs in Table 8, are week efficient. But, this model is also not capable of discriminating the efficient units from one another. Moreover, the weights of the same factors are dissimilar in different DMUs. For example, the weights of the first input may vary from 0.026580 to 0.056370. Despite improvement compared to the Model (3), there is still flexibility in allocating weights in the Model (5). In order to overcome these problem, a confidence interval was obtained for the weights of every input and output using the bootstrap algorithm (B = 1000) (Table 9). Applying these constraints to the CCR model, a bounded CCR model is obtained. Then, using the Model (7), a set of Probabilistic Common Set of Weights (PCSW) was obtained and presented in Table 11. The efficiency of the DMUs in the Model (8) was calculated using the PCSW and presented in the seventh column of Table 12.

It is evident from Table 12 that by using the proposed method, all DMUs were discriminated with only one having a value of 1. The results of the CCR efficiency method, the Kao and Hung (2005) methods, and the bounded CCR are also presented in the second through sixth columns, none of which was able to discriminate all DMUs. Meanwhile, the proposed method (seventh column) managed to discriminate all DMUs without allocating a zero weight to any of the inputs or outputs. Moreover, the weights of the same factors are to resemble in different DMUs and the flexibility of the weights has been controlled.

## 5. CONCLUSION

Inability to separate efficient DMUs is one of the disadvantages of DEA. This issue has received much attention in DEA literature. In this article, bounded models were first used for weight control. By applying bounded weights, the model flexibility in assigning weights to DMUs was limited. Because finding all of the optimal answers is not easy considering the multiple answers of the CCR model, for this reason, we go to the bootstrap algorithm to estimate the probability of intervals. A confidence interval for the input and output weights with one of the standard DEA models was presented using bootstrap model. Using this confidence interval, a probabilistic common set of weights (PCSW) was obtained. This PCSW in the confidence interval removed some drawbacks of standard DEA model in weight control. If at least one of the input and output weights are non-zero, efficient DMUs can be differentiated using the PCSW obtained from the bootstrap method. The efficiencies obtained from the proposed method are probable and the units are efficient or inefficient with a probability of 95%.

## ACKNOWLEDGEMENT

The authors are grateful to the suggestions and comments made by anonymous referees on an earlier version of the paper.

## Table

Input and output data of the 17 DMUs

The results of the model (3) in Table 1

Confidence interval of input and output weights from the bootstrap method

The results of the model (5)

The PCSW obtained from the bootstrap method (B = 1000)

Efficiency and ranking scores from the Kao and Hung (2005) model, bounded CCR and the bootstrap method (proposed method)

Input and output data of the 12 DMUs

The results of the model (3) in Table 7

Confidence interval of input and output weights from the bootstrap method

The results of the model (5)

The PCSW obtained from the bootstrap method (B = 1000)

Efficiency and ranking scores from the Kao and Hung (2005) model, bounded CCR and the Bootstrap method (proposed method)

## REFERENCES

1. Alexander, W. R. J. , Haug, A. A. , and Jaforullah, M. (2010), A two-stage double-bootstrap data envelopment analysis of efficiency differences of New Zealand secondary schools, Journal of Productivity Analysis, 34(2), 99-110.
2. Bertsimas, D. and Sim, M. (2004), The price of robustness, Operations Research, 52(1), 35-53.
3. Charnes, A. and Cooper, W. W. (1962), Programming with linear fractional functionals, Naval Research Logistics (NRL), 9(3-4), 181-186.
4. Charnes, A. , Cooper, W. W. , and Rhodes, E. (1978), Measuring the efficiency of decision making units, European Journal of Operational Research, 2(6), 429-444.
5. Davison, A. C. and Hinkley, D. V. (1997), Bootstrap Methods and Their Application, Cambridge University Press.
6. Efron, B. (1979), Computers and the theory of statistics: thinking the unthinkable, SIAM Review, 21(4), 460-480.
7. Efron, B. and Tibshirani, R. J. (1993), An introduction to the bootstrap, Number 57 in Monographs on statistics and applied probability. Chapman & Hall, New York.
8. Farrell, M. J. (1957), The measurement of productive efficiency, Journal of the Royal Statistical Society. Series A (General), 120(3), 253-290.
9. Ferrier, G. D. and Hirschberg, J. G. (1997), Bootstrapping confidence intervals for linear programming efficiency scores: With an illustration using Italian banking data, Journal of Productivity Analysis, 8(1), 19-33.
10. Friedman, L. and Sinuany-Stern, Z. (1997), Scaling units via the canonical correlation analysis in the DEA context, European Journal of Operational Research, 100(1), 629-637.
11. Hall, P. (1986), On the number of bootstrap simulations required to construct a confidence interval, The Annals of Statistics, 14(4), 1453-1462.
12. Hashimoto, A. and Wu, D. A. (2004), A DEA-compromise programming model for comprehensive ranking, Journal of the Operations Research Society of Japan,47(2), 73-81.
13. Jahanshahloo, G. R. , Memariani, A. , Lotfi, F. H. , and Rezal, H. Z. (2005), A note on some of DEA models and finding efficiency and complete ranking using common set of weights, Applied Mathematics and Computation, 166(2), 265-281.
14. Kao, C. and Hung, H. T. (2005), Data envelopment analysis with common weights: The compromise solution approach, Journal of the Operational Research Society, 56(10), 1196-1203.
15. Kim, C. , Kim, S. W. , and Kang, H. J. (2016), Driving sustainable competitive advantage in the mobile industry: Evidence from US wireless carriers, Sustainability, 8(7), 659-672.
16. Liu, F. H. F. and Peng, H. H. (2008), Ranking of units on the DEA frontier with common weights, Computers & Operations Research, 35(5), 1624-1637.
17. Liu, J. S. , Lu, L. Y. , Lu, W. M. , and Lin, B. J. Y. (2013), Data envelopment analysis 1978-2010: A citationbased literature survey, Omega, 41(1), 3-15.
18. Omrani, H. (2013), Common weights data envelopment analysis with uncertain data: A robust optimization approach, Computers & Industrial Engineering, 66(4), 1163-1170.
19. Payan, A. , Noora, A. A. , and Lotfi, F. H. (2014), A ranking method based on common weights and benchmarkpoint, Applications & Applied Mathematics, 9(1), 318-329.
20. Roll, Y. , Cook, W. D. , and Golany, B. (1991), Controlling factor weights in data envelopment analysis, IIEtransactions, 23(1), 2-9.
21. Roll, Y. and Golany, B. (1993), Alternate methods of treating factor weights in DEA, Omega, 21(1), 99-109.
22. Saati, S. (2008), Determining a common set of weights in DEA by solving a linear programming, Journal of Industrial Engineering International, 4(6), 51-56.
23. Saati, S. , Hatami-Marbini, A. , Agrell, P. J. and Tavana, M. (2012), A common set of weight approach using an ideal decision making unit in data envelopment analysis, Journal of Industrial and Management Optimization, 8(3), 623-637.
24. Sadjadi, S. and Omrani, H. (2010), A bootstrapped robust data envelopment analysis model for efficiency estimating of telecommunication companies in Iran, Telecommunications Policy, 34(4), 221-232.
25. Shang, J. and Sueyoshi, T. (1995), A unified framework for the selection of a Flexible Manufacturing System. European Journal of Operational Research, 85, 297-315.
26. Simar, L. (1992), Estimating efficiencies from frontier models with panel data: a comparison of parametric, non-parametric and semi-parametric methods withbootstrapping, International Applications of Productivity and Efficiency Analysis, Springer, 167-199.
27. Simar, L. and Wilson, P. W. (1998), Sensitivity analysis of efficiency scores: How to bootstrap in nonparametric frontier models, Management Science, 44(1), 49-61.
28. Simar, L. and Wilson, P. W. (2000), A general methodology for bootstrapping in non-parametric frontiermodels, Journal of Applied Statistics, 27(6), 779-802.
29. Sinuany-Stern, Z. and Friedman, L. (1998), DEA and the discriminant analysis of ratios for ranking units, European Journal of Operational Research, 111(3), 470-478.
30. Sinuany-Stern, Z. , Mehrez, A. , and Barboy, A. (1994), Academic departments efficiency via DEA, Computers & Operations Research, 21(5), 543-556.
31. Song, M. L. , Zhang, L. L. , Liu, W. , and Fisher, R. (2013), Bootstrap-DEA analysis of BRICS’ energy efficiency ased on small sample data, Applied Energy, 112, 1049-1055.
32. Wang, Y. M. , Luo, Y. , and Lan, Y. X. (2011), Common weights for fully ranking decision making units by regression analysis, Expert Systems with Applications, 38(8), 9122-9128.
33. Wanke, P. , Barros, C. P. , and Emrouznejad, A. (2016), Assessing productive efficiency of banks using integrated Fuzzy-DEA and bootstrapping: A case of Mozambican banks, European journal of operational research, 249(1), 378-389.
34. Zohrehbandian, M. , Makui, A. , and Alinezhad, A. (2010), A compromise solution approach for finding common weights in DEA: An improvement to Kao and Hung’s approach, Journal of the Operational Research Society, 61(4), 604-610.


text:
# Hamilton's equations arising from a variational principle.

In page 16 of McDuff & Salamon's Introduction to Symplectic Topology they prove that the critical points $$z = (x,y)\colon [a,b] \to \Bbb R^{2n}$$ of the action integral $$\Phi_H(z) = \int_a^b \langle y, \dot{x}\rangle - H(t,x,y)\,{\rm d}t$$satisfy Hamilton's equations $$\dot{x} = \partial_yH$$ and $$\dot{y} = -\partial_xH$$. Namely, they compute the first variation of $$\Phi_H(z)$$ as $$\widehat{\Phi_H}(z) = \int_a^b \langle \eta,\dot{x}-\partial_yH\rangle - \langle \xi, \dot{y}+\partial_xH\rangle\,{\rm d}t,$$where $$(\xi,\eta)$$ is the variational vector field of a variation of $$z$$ with fixed endpoints. I have no problems whatsoever with the proof they present, but I am having trouble formulating a generalization of this statement in the setting of differentiable manifolds. What I have in mind is:

Let $$Q$$ be a differentiable manifold and $$H\colon T^*Q \to \Bbb R$$ a smooth Hamiltonian. Consider the action integral $$\mathscr{A}^H(x,{\sf p}) = \int_a^b \mathbb{F}H(x(t),{\sf p}(t)){\sf p}(t) - H(x(t),{\sf p}(t))\,{\rm d}t,$$where $$(x,{\sf p})\colon [a,b] \to T^*Q$$ is a smooth curve and $$\mathbb{F}H$$ is the fiber derivative of $$H$$, given in coordinates by $$\mathbb{F}H(x,{\sf p}) = \sum_{k=1}^n \frac{\partial H}{\partial p_k}(x,{\sf p})\frac{\partial}{\partial q^k}\bigg|_x.$$Then if $$(x,{\sf p})$$ is a critical point of $$\mathscr{A}^H$$ and we write $$(x(t),{\sf p}(t)) = (q^1(t),\ldots, q^n(t),p_1(t),\ldots, p_n(t)),$$we have Hamilton's equations $$\frac{{\rm d}q^k}{{\rm d}t}(t) = \frac{\partial H}{\partial p_k}(x(t),{\sf p}(t)) \qquad\mbox{and}\qquad \frac{{\rm d}p_k}{{\rm d}t}(t) = -\frac{\partial H}{\partial q^k}(x(t),{\sf p}(t)).$$

However, I'm not entirely sure of this, as a priori there's no relation between $$x(t)$$ and $${\sf p}(t)$$ (except for $${\sf p}(t) \in T_{x(t)}^*Q$$), in contrast with curves $$(x(t),\dot{x}(t))$$ in $$TQ$$, when analyzing the Lagrangian case. In particular, I cannot reproduce the proof given in McDuff & Salamon, since there's no apparent way to use integration by parts, as we have no $$t$$-derivatives in the integrand.

I don't really expect anyone to fix the statement and provide the computation (although it would be nice), but I need help figuring out what sort of relation I am missing here (with that I should be able to run the computation of the first variation myself). In particular, I am not assuming that $$H$$ is hyperregular, and we do not have Legendre transformations at our disposal. What to do?

The action functional in the cotangent bundle is given by $$A_H(x)=\int_{[0,1]} x^* \alpha-\int_{[0,1]} H \circ x,$$ where $$\alpha$$ is the canonical $$1$$-form in the cotangent bundle. You can check that this coincides with your formula in the case of $$\mathbb{R}^{2n}$$.
Differentiating and using Cartan's magic formula yields that the stationary points of the action functional satisfy Hamilton's equations. (Recall that $$d\alpha =\omega$$.)
• I see. So just to confirm, the problem is that my initial guess using $\mathbb{F}H$ was simply wrong? Jul 1 '19 at 5:23
• @IvoTerek I think so. The first term should not involve $H$. Jul 1 '19 at 5:25
• Alright, the math checks out. Indeed, to produce the first term of the integrand without using $H$, there's only one sensible choice: since we start with $(x(t),{\sf p}(t))$ and ${\sf p}(t) \in T_{x(t)}^*Q$, we need to produce an element of $T_{x(t)}Q$ for ${\sf p}(t)$ to act on. Well, we have one: $\dot{x}(t)$. And indeed the pull-back of the tautological form ends up being ${\sf p}(t)\big(\dot{x}(t)\big)$. So we're good. Thanks. Jul 1 '19 at 6:18


text:
# Neural network: Representing weights in code

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

## Recommended Posts

Hi, I'm wondering how to represent the weights of the connections in a multilayer neural network. I've read that a matrix is usually used for this, but I can't find anything specific. For a single layer network it's quite easy of course - IxO - where I = number of inputs, O = number of outputs. What I'm thinking is that since there can only be a direct connection from layer N to layer N+1, having a MxM matrix (where M is the number of nodes in total) is a waste of space, especially if we've got many layers, since then only a few of the cells in the matrix is actually used. I can of course improve this by using a (M-<number of outputs>)x(M-<number of inputs>) since there will never be a connection FROM an output node to any other node, and there will never be a connection TO an input node from any other node. Also I've considered using multiple matrices (one for each pair of layers that has connections to one another), but since all the literature I've read (so far) seems to only use a single matrix I'm guessing this isn't a widely used method? Are the waste of space simply ignored in any practical applications of neural networks? So what is the preferred way of representing the weights in a multilayer neural network? Thanks in advance! :) Best regards, Hallgeir

##### Share on other sites
The natural way to arrange weights is by using one matrix per interface between consecutive layers. The weights don't just form a matrix in the sense that there are NxM of them: If you multiply that matrix between two layers by the vector that has the outputs of the first layer, the result is a vector with the linear combinations for the neurons on the second layer. Now you just need to pass those outputs through the transfer function (typically a sigmoid) and you are done.

For "bias", append a fake neuron to each layer that has constant output 1.

Thanks, alvaro!

Best regards,
Hallgeir

##### Share on other sites
I use ANNs in a game for PC/Xbox. The ANNs in the game require completely arbitrary topology networks, so instead of a matrix I use more of a tree-like system, with a Node class and Connection class. The node class has "activationFunction" and "activationLevel". The connection class has "from", "to", and "weight". All nodes and connections are stored in a flat array. The node array is stored in the order inputs, then outputs, then inner nodes, so you don't need to do any special handling for input or output nodes during activation.

##### Share on other sites
I'm curious, EJH: What do you use the ANN for?

##### Share on other sites
The last time I used NNs, I did it EJH's way. A matrix approach seems like an optimisation rather than a natural representation.

##### Share on other sites
Quote:
 Original post by KylotanThe last time I used NNs, I did it EJH's way. A matrix approach seems like an optimisation rather than a natural representation.

If you need to support arbitrary topologies, you certainly should look at it more like a graph. If you use a multilayer organization (which I think is fairly typical), I have an easier time understanding conceptually what the ANN is doing as a series of linear transforms followed by smoothly capping the results (the sigmoid).

But there are always several ways to look at these things. I guess it depends on your background.

##### Share on other sites
There are really two basic representations for a neural network (or any graph):
2. Weighted incidence matrix.
Either of these can be represented as either a dense matrix (array with zeros for empty places) or a sparse matrix (like what EJH did).

A sparse-matrix representation of an adjacency matrix is also called an adjacency list.

To summarize:
           Dense     SparseIncidence    x         xAdjacency    x         x

To figure out what's best for your application, you only need to do the math: Figure out how much each structure costs you in memory (remember to count pointers; they can take up a majority of your space). The adjacency list article contains some analysis for the unweighted case (when adjacency matrices only need 1 bit per entry).

##### Share on other sites
Cheers folks, all of this has been of great help!

Now I'll just to try put this into practice. ;) Shouldn't be a big problem!

Best regards,
Hallgeir

##### Share on other sites
Quote:
 Original post by alvaroI'm curious, EJH: What do you use the ANN for?

Its a procedural content generation system where the ANNs represent and control particle system weapons. The ANNs are mutated based on player weapon usage data, so a (theoretically) infinite variety of particle weapons evolves based on the preferences of the players.

1. 1
2. 2
Rutin
19
3. 3
4. 4
frob
13
5. 5

• 9
• 16
• 11
• 9
• 17
• ### Forum Statistics

• Total Topics
632603
• Total Posts
3007367

×


text:
# My prime symbol is not superscript

I'm learning math mode and having an issue here with the prime symbol.

$y\in[0,1]^{d\prime}$

In this inline math formula, the prime symbol is supposed to be superscript, but it shows up at the regular text level and size.

-
If you provide a fuller example showing which files and packages you're loading, we could help you better –  A.Ellett Feb 3 '13 at 0:51
Informative (and a little bit related): What is the advantage of using $f^\prime$ instead of $f'$? –  Qrrbrbirlbel Feb 3 '13 at 1:01

It is not clear what you want the output to be

$y\in[0,1]^{d\prime}$

the \prime is in the superscript along with d. If you want the prime to be on d then just use

$y\in[0,1]^{d'}$

which is equivalent to

$y\in[0,1]^{d^{\prime}}$

-
Thank you. I needed the extra explanation as well as the answer. I'm not up to speed on this language. –  Nathan Feb 3 '13 at 0:54
+1 for noting apostrophe (') is, in math mode, the same as ^{\prime} –  Alex Nelson Feb 3 '13 at 16:11

\prime is by default on the same level as normal text. (Just as \circ - used as symbol for degrees for example.) Instead you need to specify that \prime is a superscript:

$y\in[0,1]^{d^\prime}$

EDIT: This might be marginal to the question, but I think it's a useful addition. The ' is a shorthand for ^\prime. Thus, if you type in LaTeX:

$y\in[0,1]^{d^{\circ'}}$

the output will be:

As you can see, LaTeX interprets it as a double superscript. Now suppose you don't want that, but instead something like:

If you try to do it by typing: $y\in[0,1]^{d^{\circ}'}$, you'll summon up an error:

! Double superscript.
l.4 $y\in[0,1]^{d^{\circ}'  To avoid this, \prime comes handy. Just do: $y\in[0,1]^{d^{\circ\prime}}\$ and everything will be fine. :)


text:
Level 1
Find the following values without a calculator.
1. 2 kg = _____ g
2. 3.4 kg = _____ g
3. ______ g = 7.5 kg
4. ______ kg = 2000 g
2 m
Level 2 PSLE
Mrs Lee bought 2 litres of oil and used up 34 of it. How much of the oil is left? Express the answer in mℓ .
2 m
Level 1
Find the following values without a calculator.
1. 2 ℓ = _______ mℓ
2. 2.3 ℓ = _______ mℓ
3. 1230 mℓ = _______ ℓ
4. 1240 mℓ = ______ cm3
2 m
Level 1
Find the following values without a calculator.
1. 1007 mℓ = 1 ℓ _____ mℓ
2. 2067 mℓ = 2 ℓ _____ mℓ
3. 1 ℓ 3 mℓ = _____ ℓ
4. 12 ℓ 45 mℓ = _____ mℓ
2 m
Level 1
Find the following values without a calculator.
1. $3 = ______ ¢ 2. 140 ¢ =$_____
3. $3.20 = ______ ¢ 4.$3 ÷ 5 = ______ ¢
2 m
Level 1 PSLE
Nina used 14 kg of flour to make muffins and 12 kg of flour to make biscuits. After that, she had 200 g of flour left. How many kilograms of flour did she have at first?
2 m
Level 1
Find the following values without a calculator.
1. 125 h = _____ min
2. 234 m = _____ m (Give the answer in decimal.)
3. 814 km = _____ m
4. 738 kg = _____ g
2 m
Level 2
Kim ran 30 minutes at the speed of 10 km/h. She then continued at the speed of 8 km/h for 45 minutes. How far did she run?
2 m
Level 2 PSLE
Andy had 1.4 m of wire. He used some of it to make the figure as shown.
1. How much of the wire did Andy use to make the figure? Leave your answer in the simplest form in terms of x.
2. If x = 15, how much of the wire was not used to make the figure? Leave your answer in metres.
2 m
Level 1 PSLE
Jeremy paid \$15 for 30 identical stickers. What was the cost of each sticker?
1 m


text:
K_Coupled Inductors

Inductive coupling via coupling factor K

 Description The K_Coupled Inductors component models coupling of two inductors. $K$ is the coefficient of coupling which must be greater than or equal to zero and less than one.
 Equations $M=k\sqrt{{L}_{1}{L}_{2}}$ $\mathrm{inductiveCouplePin1.v}=-M\mathrm{inductiveCouplePin2.di}$ $\mathrm{inductiveCouplePin2.v}=-M\mathrm{inductiveCouplePin1.di}$

Variables

 Name Units Description Modelica ID $M$ $H$ Mutual inductance M

Connections

 Name Description Modelica ID $\mathrm{inductiveCouplePin1}$ Couple pin for inductances inductiveCouplePin1 $\mathrm{inductiveCouplePin2}$ Couple pin for inductances inductiveCouplePin2

Parameters

 Name Default Units Description Modelica ID k $0$ Coupling Factor k

 Modelica Standard Library The component described in this topic is from the Modelica Standard Library. To view the original documentation, which includes author and copyright information, click here.


text:
# Implement fractional Laplacian

What is a way to implement the Fractional Laplacian with Mathematica?

How can we apply such implementation to numerically solve the problem

$$(-\Delta)^su = 1 \text{ in } B_1(0), \\ u = 0 \text{ in } \mathbb{R}^2 \setminus B_1(0),$$ where $B_1(0)$ is the unit disk centered at the origin?

• Use momentum space. That is use the Fourier transform Restate boundary conditions as momentum space constraints. At end switch back to coordinate space, I.e. use inverse Fourier transform – user14199 Sep 26 '17 at 19:24
• Jay, what is your application for the Fractional Laplacian? – user21 Sep 26 '17 at 23:15

I can provide an approach by finite elements and an application of the functional calculus of selfadjoint operators.

# Background

The spectrum of the Laplacian on a bounded domain $$\varOmega$$ with sufficiently smooth boundary subject to homogeneous Dirichlet boundary conditions is discrete. By the spectral theorem, there are eigenfunctions $$e_i \in H^1_0(\varOmega)$$ and $$\lambda_i \in \mathbb{R}$$ with $$-\Delta \, e_i = \lambda_i \, e_i$$ and $$0 < \lambda_1 \leq \lambda_2 \leq \dotsc$$ and $$\int_\varOmega e_i(x) \, e_j(x) \, \operatorname{d} x = \delta_{ij}.$$ By functional calculus, the solution $$u \in H^{2s}(\varOmega) \cap H^{s}_0(\varOmega)$$ to $$(-\Delta)^s \,u = f$$ for $$f \in L^2(\varOmega)$$ can be represented by $$u = \sum_{i=1}^\infty \left( \lambda_i^{-s} \, e_i \cdot \int_\varOmega f(x) \, e_i(x) \, \operatorname{d} x \right).$$ Weyl's law states that the eigenvalues behave as $$\lambda_i \sim i^\frac{2}{\operatorname{dim}(\varOmega)}$$ for $$i \to \infty$$. (You can get an idea of the law by performing a $$\sin$$-Fourier transform on the eigenvalue equation $$- \Delta v = \lambda \, v$$ for functions on the square $$[0, 2\pi] \times [0, 2\pi]$$.)

Thus, it is meaningful to use a truncated expansion in order to approximate $$u$$.

Our aim is now to use finite elements to approximate the eigenfunctions $$e_i$$ and the eigenvalues $$\lambda_i$$.

# Implementation

First, we create a nice domain. Disks are boring so I use the following starfish:

R = DiscretizeRegion[
BoundaryMeshRegion[
Map[
t \[Function] (2 + Cos[5 t])/3 {Cos[t], Sin[t]},
Most@Subdivide[0., 2. Pi, 2000]],
Line[Partition[Range[2000], 2, 1, 1]]
],
MaxCellMeasure -> 0.001,
MeshQualityGoal -> "Maximal"
]

Next, we have to set up the finite element method. This is somewhat a mess but we cannot apply NDSolve directly; we need access to mass matrix and stiffness matrix of the system. Note that I use Sin[2 x] + Cos[x + 3 y] as right hand side $$f$$.

 Needs["NDSolveFEM"]
(*Initialization of Finite Element Method*)

Rdiscr = ToElementMesh[R, "MeshOrder" -> 1];
vd = NDSolveVariableData[{"DependentVariables", "Space"} -> {{u}, {x, y}}];
sd = NDSolveSolutionData[{"Space"} -> {Rdiscr}];
cdata = InitializePDECoefficients[vd, sd,
"DiffusionCoefficients" -> {{-IdentityMatrix[2]}},
"MassCoefficients" -> {{1}},
"LoadCoefficients" -> {{Sin[2 x] + Cos[x + 3 y]}}
];
bcdata = InitializeBoundaryConditions[vd, sd, {{DirichletCondition[u[x, y] == 0., True]}}];
mdata = InitializePDEMethodData[vd, sd];

(*Discretization*)
dpde = DiscretizePDE[cdata, mdata, sd];
dbc = DiscretizeBoundaryConditions[bcdata, mdata, sd];
{load, stiffness, damping, mass} = dpde["All"];

Having mass and stiffness matrix, we have to reduce them to the interior degrees of freedom. For FEM of order 1, the Dirichlet boundary conditions are deployed into the stiffness matrix by replacing rows that correspond to boundary vertices by the respective row of an identity matrix. Moreover, we exploit that Mathematica sorts boundary vertices in front.

(*Finding interior degrees of freedom*)

intplist = Min[UpperTriangularize[stiffness, 1]["NonzeroPositions"][[All, 1]]] ;;;

stiffness2 = stiffness[[intplist, intplist]];
mass2 = mass[[intplist, intplist]];

We need eigenvalues and eigenvectors. Since calculating them is expensive, we restrict our attention to the most relevant 5 percent.

(*Spectral decomposition and functional calculus*)
s = 3/4;
reducedmodeldimension = Floor[Length[stiffness2] 0.05];
{Λ, U} = Reverse /@ Eigensystem[{stiffness2, mass2},
-reducedmodeldimension,
Method -> {"Arnoldi", "MaxIterations" -> 4000
}]; // AbsoluteTiming
U = Map[u \[Function] u/Sqrt[u.mass2.u], U];

The last step is necessary to ensure that the row vectors of U (representing the eigenfunctions of $$-\Delta$$) form an $$L^2$$-orthonormal system (the $$L^2$$-inner product being represented by the reduced mass matrix mass2).

For example, we can draw the first 6 eigenfunction like this:

GraphicsGrid[
Partition[
Table[
eigenvec = ConstantArray[0, Dimensions[stiffness][[2]]];
eigenvec[[intplist]] = Flatten[U[[i]]];
eigenfun = ElementMeshInterpolation[{Rdiscr}, eigenvec];
Plot3D[eigenfun[x, y], {x, y} ∈ R],
{i, 1, 6}], 3],
ImageSize -> Large]

For the hidden operator L as defined in the comment below, we can easily optain its $$L^2$$-Moore-Penrose pseudoinverse Lpinv by

(*L=mass2.Transpose[Λ^s U].(U.mass2);*)
Lpinv = b \[Function] Transpose[U].(Λ^-s (U.b));

Next, we solve the reduced equations and write the result into the interior degrees of freedom of a zero vector. Finally, ElementMeshInterpolation provides us with an InterpolatingFunction that can be easily plotted.

solution = ConstantArray[0, Dimensions[stiffness][[2]]];
solfun = ElementMeshInterpolation[{Rdiscr}, solution];
Plot3D[solfun[x, y], {x, y} ∈ R]

As plausibility check: This is the result for $$(-\Delta)^s u = 1$$ (upon revisiting this post, I was puzzled by the solution being assymetric while OP asked for the solution of $$(-\Delta)^s u = 1$$ which ought to have the same symmetries as the domain):

# Discussion

This method is however very slow: It has complexity $$O(N^3)$$, where $$N$$ is the number of interior vertices. Moreover, this method is not very accurate.

Kernel based methods (e.g., convolution with fundamental solution) might be more accurate and might have complexity $$O(N^2)$$, but they might be limited to special domains where the fundamental solutions are known.

Speaking about special domains: For the disk $$B(0;1) \subset \mathbb{R}^2$$, the surface of the sphere $$S^2 \subset \mathbb{R}^3$$, the unit ball $$B(0;1) \subset \mathbb{R}^3$$, the standard tori $$\mathbb{T}^n = (S^1)^n$$, and all cube-like domains like $$Q = \coprod_{i=1}^n [a_i,b_i]$$, the eigenvectors and eigenvalues are well studied. E.g., using FFT will speed up the process tremendously for $$\mathbb{T}^n$$ and $$Q$$.

One could also circumvent the spectral decomposition step by directly assembling the Gagliardo bilinear form $$(u,v) \mapsto \pi^{-(2 s + n/2)}\frac{\Gamma(n/2+s)}{\Gamma(-s)}\int_\varOmega\int_\varOmega \frac{(u(x)-u(y))\,(v(x)-v(y))}{| x-y |^{n + 2 s}}\, \operatorname{d}x \, \operatorname{d}y$$ instead of the Laplacian stiffness matrix ($$n=2$$) (I am not exactly sure about the multiplicative constant in this formula; I got it from Hitchhiker's Guide to Fractional Sobolev Spaces, p. 8). This would require (partially singular) double integrals over $$O(N^2)$$ pairs of triangle elements. Moreover, that matrix is dense and needs $$O(N^3)$$ for factorization. Maybe one can apply FFT on a bounding box of the domain in order to construct a reasonable preconditioner for the conjugate gradient method.

• Thank you for your answer: it is very interesting. However, I'm not familiar with finite elements method (and actually I'm new to numerical analysis in general); would you mind adding some details on mass matrix, stiffness matrix, and the key ideas of your approach? – user52420 Sep 25 '17 at 13:31
• Thanks a lot. Could you point out a reference for the following statement? By functional calculus, the solution $u \in H^{s/2}_0(\varOmega)$ to $(-\Delta)^s \,u = f$ for $f \in L^2(\varOmega)$ can be represented by $$u = \sum_{i=1}^\infty \left( \lambda_i^{-s} \, e_i \cdot \int_\varOmega f(x) \, e_i(x) \, \operatorname{d} x \right).$$ Moreover, it is known that the eigenvalues behave as $\lambda_i \sim i^2$ for $i \to \infty$. – user52420 Sep 26 '17 at 10:24
• I have to confess that the assymptotics are not as good as state before. That is corrected now and I also learnt that this is called Weyl's law. – Henrik Schumacher Sep 26 '17 at 11:09
• Probably you wanted intplist without the Min – user21 Sep 27 '17 at 1:56
• @user21 Thank you for the comment. You see the three semicoli at the end of the line? The first two of them turn the minimum into a Span so that intplist acts indeed as a List when used in combination with Part. – Henrik Schumacher Sep 27 '17 at 5:50


text:
## A community for students. Sign up today

Here's the question you clicked on:

## anonymous 5 years ago 2 absolute value x+1 greater than or equal to 28

• This Question is Closed
1. anonymous

2|x+1|≥28 First divide by 2 to get" |x+1|≥14 Next break it into two parts: x+1≥14 or x+1≤-14 then solve each one separately: x≥13 or x≤-15

2. anonymous

so if I put it in interval notation would it be (-funny eight,-15,]([13,funny eight)

3. anonymous

Right: $(-\infty,-15],[13,\infty)$

#### Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy


text:
GMAT Question of the Day - Daily to your Mailbox; hard ones only

 It is currently 16 Aug 2018, 05:08

### 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

# The population of a bacteria culture doubles every 2 minutes

Author Message
Director
Joined: 10 Feb 2006
Posts: 648
The population of a bacteria culture doubles every 2 minutes  [#permalink]

### Show Tags

Updated on: 25 Jun 2014, 09:49
4
13
00:00

Difficulty:

45% (medium)

Question Stats:

66% (00:59) correct 34% (01:07) wrong based on 355 sessions

### HideShow timer Statistics

The population of a bacteria culture doubles every 2 minutes. Approximately how many minutes will it take for the population to grow from 1,000 to 500,000 bacteria

A. 10
B. 12
C. 14
D. 16
E. 18

OPEN DISCUSSION OF THIS QUESTION IS HERE: the-population-of-a-bacteria-culture-doubles-every-2-minutes-167378.html

_________________

GMAT the final frontie!!!.

Originally posted by alimad on 13 Mar 2008, 20:39.
Last edited by Bunuel on 25 Jun 2014, 09:49, edited 2 times in total.
Renamed the topic, edited the question, added the OA and moved to PS forum.
Intern
Joined: 12 Mar 2008
Posts: 4
Re: The population of a bacteria culture doubles every 2 minutes  [#permalink]

### Show Tags

13 Mar 2008, 22:42
Is not quite that.
min 0 - 1,000
min 2 - 2,000=1,000*2^1
min 4 - 4000=1000*2^2;
min 6 - 8000=1000*2^3

Be careful! It doubles every 2 minutes.

So, 1,000*2^x=500,000
2^x=500. It asks you to approx. You know that 2^9=512, so x=9.
Because the pop doubles every 2 minutes, the result=9*2=18 minutes.
OA?
SVP
Joined: 06 Sep 2013
Posts: 1851
Concentration: Finance
Re: The population of a bacteria culture doubles every 2 minutes  [#permalink]

### Show Tags

11 Sep 2013, 18:13
6
This one's easy.

1000 * 2^t = 500,000
2^t = 500
Now gauging, since 2^8 = 256, then 2^9 = 512
So t = 9

But be careful, 't' is in time intervals of two minutes

So answer is 9*2 = 18 minutes

Math Expert
Joined: 02 Sep 2009
Posts: 47923
Re: The population of a bacteria culture doubles every 2 minutes  [#permalink]

### Show Tags

12 Sep 2013, 02:26
The population of a bacteria culture doubles every 2 minutes. Approximately how many minutes will it take for the population to grow from 1,000 to 500,000 bacteria

A. 10
B. 12
C. 14
D. 16
E. 18

Similar questions to practice:
a-certain-bacteria-colony-doubles-in-size-every-day-for-144013.html
it-takes-30-days-to-fill-a-laboratory-dish-with-bacteria-140269.html
the-number-of-water-lilies-on-a-certain-lake-doubles-every-142858.html
_________________
Math Expert
Joined: 02 Sep 2009
Posts: 47923
The population of a bacteria culture doubles every 2 minutes  [#permalink]

### Show Tags

25 Jun 2014, 09:50
The population of a bacteria culture doubles every 2 minutes. Approximately how many minutes will it take for the population to grow from 1,000 to 500,000 bacteria?

(A) 10
(B) 12
(C) 14
(D) 16
(E) 18

$$1000 * 2^t = 500,000$$ --> $$2^t = 500$$ --> since $$2^9 = 512$$, then $$t\approx{9}$$. Thus, approximately 9 two-minute intervals are needed, whcih is 18 minutes.

Similar questions to practice:
a-certain-bacteria-colony-doubles-in-size-every-day-for-144013.html
it-takes-30-days-to-fill-a-laboratory-dish-with-bacteria-140269.html
the-number-of-water-lilies-on-a-certain-lake-doubles-every-142858.html
the-population-of-locusts-in-a-certain-swarm-doubles-every-90353.html

OPEN DISCUSSION OF THIS QUESTION IS HERE: the-population-of-a-bacteria-culture-doubles-every-2-minutes-167378.html
_________________
Non-Human User
Joined: 09 Sep 2013
Posts: 7719
Re: The population of a bacteria culture doubles every 2 minutes  [#permalink]

### Show Tags

04 Aug 2018, 00:29
Hello from the GMAT Club BumpBot!

Thanks to another GMAT Club member, I have just discovered this valuable topic, yet it had no discussion for over a year. I am now bumping it up - doing my job. I think you may find it valuable (esp those replies with Kudos).

Want to see all other topics I dig out? Follow me (click follow button on profile). You will receive a summary of all topics I bump in your profile area as well as via email.
_________________
Re: The population of a bacteria culture doubles every 2 minutes &nbs [#permalink] 04 Aug 2018, 00:29
Display posts from previous: Sort by

# Events & Promotions

 Powered by phpBB © phpBB Group | Emoji artwork provided by EmojiOne Kindly note that the GMAT® test is a registered trademark of the Graduate Management Admission Council®, and this site has neither been reviewed nor endorsed by GMAC®.


text:
Flows of money are shown by dashed lines with directional arrowheads.

A flow labelled ‘Income’ runs from Firms to Households.

A flow labelled ‘Planned Consumption’ runs from Households to Firms.

A dashed line pointing vertically down from Households is labelled ‘Saving’.

A dashed line pointing vertically up to Firms is labelled ‘Planned Investment’.

2 Planned and actual values