text:
# Can Mathematica factor out constrained functions when it simplifies? [closed]

For example, distributions in the exponential family take a likelihood function of the form $$f(x)g(\theta)e^{\phi(\theta)^{T}u(x)}$$. Given some ugly algebraic expression, can I tell mathematica to infer $$f(x),g(\theta),\phi(\theta),u(x)$$ To say, show my ugly algebraic expression can be factored into that constrained form? I cannot find any documentation on this subject

Edit 1: Here is an example, but I'm asking if Mathematica can handle this with any ugly expression.

Suppose I want to show that the beta distribution is in fact in the exponential family:

$$\frac{\Gamma(\alpha + \beta)\theta^{\alpha - 1}(1-\theta)^{\beta - 1}}{\Gamma(\alpha)\Gamma(\beta)}$$

Is there a one-liner in mathematica that takes in as input arguments this expression, and the fact that I want to factor it into $$f(x),g(\theta),\phi(\theta),u(x)$$ and have it infer these things intelligently?

• I guess it can, but your question is not clear enough to say for sure. Could you please give a short (simplified) example of your expression. It should be the one that exhibits the main features of your real example, but shorter. Please give it in the form of the Mma code, ready to copy/paste. Please give also the expression that you expect to obtain out of such an example in the end. Then we can be able to help. – Alexei Boulbitch Dec 3 '18 at 10:12
• I added an example. There is no Mma code, as I am not trying to write code to solve anything right now. I am asking a high level question about mathematica's abilities – GradPerson Dec 4 '18 at 6:57
• Code should be added. Otherwise this falls into the category of "off topic because insufficient information was provided" (no code given to reproduce the issue). Such questions tend to get closed. – Daniel Lichtblau Dec 4 '18 at 14:52
• The beta distribution you gave is a function of theta, alpha and beta. There is no x. – Themis Dec 4 '18 at 23:18
• Good eye- in this case, I would want the function to return "unsatisfiable", since there is no x in the constraints. Is there a function that can decide the satisfiability of factorizations given arbitrary constraints? my guess is no. actually, my guess is that no algorithm can do this in the general case either. – GradPerson Dec 7 '18 at 7:54

We need to separate functions according to their argument. Assuming the expression to be in the form of a product and the variables to be x and theta, here is one way to do this:

1. Identify the parts of the expression that contain x (xList) and theta (thetaList). Notice that some parts contain only one variable, others contain both.
2. Identify the parts that contain only x (xListUnique) and only theta (thetaListUnique).
3. Construct f as the product of parts in xListUnique and g as the product of parts in thetaListUnique
4. Isolate the exponential term (divide the original expression by f g) and take its log. Then identify its parts that contain x (xListExp) and the parts that contain theta (thetaListExp).
5. Obtain phi as the product of terms in thetaListExp and u as the product of terms in xListExp.

I only tested it with one case and it works.

Test Case

f = x/(1 + x^2);
g = Sin[\[Theta]] + \[Theta]^2;
\[Phi] = \[Theta];
u = x^2 + Log[x];
myFunction = f g E^(\[Phi] u);

Implementation

(* Identify f and g *)

xList = Part[#, 1] & /@ Position[myFunction, x] // DeleteDuplicates;
\[Theta]List = Part[#, 1] & /@ Position[myFunction, \[Theta]] // DeleteDuplicates;
x\[Theta]List = Intersection[xList, \[Theta]List];
xListUnique = Complement[xList, x\[Theta]List];
\[Theta]ListUnique = Complement[\[Theta]List, x\[Theta]List];

ff = Times @@ (Part[myFunction, #] & /@ xListUnique);
gg = Times @@ (Part[myFunction, #] & /@ \[Theta]ListUnique);

(* Now with the exponential term *)

myExp = myFunction/(ff gg) // Log // PowerExpand;
xListExp = Part[#, 1] & /@ Position[myExp, x] // DeleteDuplicates;
\[Theta]ListExp = Part[#, 1] & /@ Position[myExp, \[Theta]] // DeleteDuplicates;

\[Phi]\[Phi] = Times @@ (Part[myExp, #] & /@ \[Theta]ListExp);
uu = Times @@ (Part[myExp, #] & /@ xListExp);

(* Results *)

{ff, gg, \[Phi]\[Phi], uu}
{ff == f, gg == g, \[Phi]\[Phi] == \[Phi], uu == u}

The result is

{x/(1 + x^2), \[Theta]^2 + Sin[\[Theta]], \[Theta], x^2 + Log[x]}

{True, True, True, True}


text:
# How may I prove this integral inequality?

Prove the following inequality:

$$\frac{\sqrt{\pi}}{2}\le\int_{0}^{1} \left({\log(\csc(x))}\right)^{1/3} dx$$

What should i start with? (it's not a homework but a hobby related activity)

-

Note that $\sqrt{\pi}/2=\Gamma(3/2)$.

For $0<x\le 1$ we have $\csc(x)>1/x$ so $$\int_0^1 (\log(\csc(x)))^{1/3}~dx > \int_0^1(-\log(x))^{1/3}~dx$$ Substitute $y=-\log(x)$ to get $$\int_0^1(-\log(x))^{1/3}~dx = \int_0^\infty y^{1/3}e^{-y}~dy=\Gamma(4/3)$$ So your inequality follows from $\Gamma(4/3)>\Gamma(3/2)$. Unfortunately $\Gamma(4/3)$ does not have a simple expression, so I don't yet see a way to show this last step except by evaluating it numerically.

-
I hope you don't mind that I completed the proof by editing your post rather than saying it in the comments. It would have been too long and belongs as part of the answer anyway. – Ragib Zaman Jul 3 '12 at 14:08
@Zander: thank you for the answer. – user 1618033 Jul 3 '12 at 14:27
@Ragib I don't mind the edit, but I don't think it's correct. $\Gamma(x)$ has its minimum at $x=1.46\ldots<3/2$, e.g. $\Gamma(3/2)-\Gamma(1.45)>0.0005$. Your error is that $\psi(3/2)=\psi(1/2)+2>0$. – Zander Jul 3 '12 at 14:28
@Zander Sorry about that. I just checked now that $\Gamma(4/3)-\Gamma(3/2) \approx 0.007$, which I believe is too close to $0$ to show it is positive without getting things getting messy. I don't think we can avoid it. – Ragib Zaman Jul 3 '12 at 14:49
@Zander: I thought that if $\Gamma'(3/2)\le0$, then since $\Gamma$ is log-convex, we would have $\Gamma'(x)\le0$ for all $x\le3/2$. However, \begin{align} \Gamma'(3/2)/\Gamma(3/2) &=\mathrm{H}(1/2)-\gamma\\ &=H(-1/2)+2-\gamma\\ &=2-\gamma-2\log(2)\\ &\stackrel{.}{=}0.036489973978576520559 \end{align} and \begin{align} \Gamma'(4/3)/\Gamma(4/3) &=\mathrm{H}(1/3)-\gamma\\ &=H(-2/3)+3-\gamma\\ &=3-\gamma-\frac12\left(\frac{\pi}{\sqrt{3}}+3\log(3)\right)\\ &\stackrel{.}{=}-0.13203378002080632300 \end{align} It looks as if computation is necessary. – robjohn Jul 3 '12 at 16:31

Proving such a thing with simple "analytic" inequalities seems hopeless, due to the combination of $\log$, $\csc$ and exponentiation by $1/3$- the integrand just seems too ugly for any simple "trick" to work. So we have to get our hands dirty.

Calculating the derivative gives $\displaystyle \frac{-\cot x}{3 (\log (\csc(x)))^{2/3}}$ and since for $x\in [0,1]$ $\cot x \geq 0$ and $\csc (x) \geq 1$ we see the derivative is always $\leq 0$, i.e the function is decreasing. Thus taking right handed Riemann sums underestimates the integral.

$$\int^1_0 \sqrt[3]{ \log(\csc (x))} dx > \frac{1}{20}\sum_{k=1} \sqrt[3]{ \log \left(\csc \left(\frac{k}{20}\right)\right)} = 0.915...$$

And since $\pi < 3.24 = 1.8^2$, we have $\displaystyle \frac{\sqrt{\pi}}{2} < 0.9$ so the desired inequality is reached.

-
thank you for your solution. However, my aim is to solve it elegantly without using calculator. – user 1618033 Jul 3 '12 at 12:58

format: plain


text:
gemseo / algos / linear_solvers

# linear_problem module¶

Linear equations problem.

class gemseo.algos.linear_solvers.linear_problem.LinearProblem(lhs, rhs=None, solution=None, is_symmetric=False, is_positive_def=False, is_converged=None)[source]

Bases: object

Representation of the linear equations’ system A.x = b.

It also contains the solution, and some properties of the system such as the symmetry or positive definiteness.

Parameters
• lhs (ndarray | spmatrix | LinearOperator) – The left-hand side (matrix or linear operator) of the problem.

• rhs (ndarray | None) –

The right-hand side (vector) of the problem.

By default it is set to None.

• solution (ndarray | None) –

The current solution.

By default it is set to None.

• is_symmetric

Whether to assume that the LHS is symmetric.

By default it is set to False.

• is_positive_def

Whether to assume that the LHS is positive definite.

By default it is set to False.

• is_converged

Whether the solution is converged to the specified tolerance. If False, the algorithm stopped before convergence. If None, no run was performed.

By default it is set to None.

Return type

None

check()[source]

Check the consistency of the dimensions of the LHS and RHS.

Raises

ValueError – When the shapes are inconsistent.

Return type

None

compute_residuals(relative_residuals=True, store=False, current_x=None)[source]

Compute the L2 norm of the residuals of the problem.

Parameters
• relative_residuals

If True, return norm(lhs.solution-rhs)/norm(rhs), else return norm(lhs.solution-rhs).

By default it is set to True.

• store

Whether to store the residuals value in the residuals_history attribute.

By default it is set to False.

• current_x

Compute the residuals associated with current_x, If None, compute then from the solution attribute.

By default it is set to None.

Returns

The residuals value.

Raises

ValueError – If self.solution is None and current_x is None.

Return type

numpy.ndarray

plot_residuals()[source]

Plot the residuals’ convergence in log scale.

Returns

The matplotlib figure.

Raises

ValueError – When the residuals’ history is empty.

Return type

matplotlib.figure.Figure

convergence_info: int | str

The information provided by the solver if convergence occurred or not.

is_converged: bool

If the solution is_converged.

is_lhs_linear_operator: bool

Whether the LHS is symmetric.

is_positive_def: bool

Whether the LHS is positive definite.

is_symmetric: bool

Whether the LHS is symmetric.

lhs: ndarray | LinearOperator | spmatrix

The left-hand side of the equation. If None, the problem can’t be solved and the user has to set it after init.

residuals_history: list[float]

The convergence history of residuals.

rhs: ndarray

The right-hand side of the equation.

solution: ndarray

The current solution of the problem.

solver_name: str

The solver name.

solver_options: dict[str, Any]

The options passed to the solver.


text:
Proof of antisymmetry of the infinitesimal Lorentz parameters

A finite Lorentz transformation satisfies the equation

(1)
\begin{align} \Lambda \cdot \eta \cdot \Lambda^T &= \eta \ . \nonumber \\ {\Lambda^\mu}_\nu \ \eta^{\nu{ \rho}} \ {\Lambda^\sigma}_{ \rho} &= \eta^{\mu\sigma} \end{align}

Remark: Note that in the second equation above, the transposition is implicitly present in the second $\Lambda$.
Expanding $\Lambda$ as follows where $\lambda$ parametrises infinitesimal Lorentz transformations:

(2)
\begin{align} {\Lambda^\mu}_\nu ={\delta^\mu}_\nu +{\lambda^\mu}_\nu + \mathcal{O}(\lambda^2)\ . \end{align}

For instance, for a Lorentz boost with velocity $\mathbf{u}=(u_1,u_2,u_2)$, one has (see here)

(3)
\begin{align} \lambda(\mathbf{u}) = \begin{pmatrix} 0 & -\tfrac{u_1}{c} & -\tfrac{u_2}{c} & -\tfrac{u_3}{c} \\ -\tfrac{u_1}{c} & 0 & 0 & 0 \\ -\tfrac{u_2}{c} & 0 & 0 & 0 \\ -\tfrac{u_3}{c}& 0 & 0 & 0 \end{pmatrix}\ . \end{align}

Exercise: Obtain the matrix ${\Lambda^\mu}_\nu$ for the simple case of a boost in the $x_1$ direction i.e., with $u_2=u_3=0$ by computing the matrix exponential. Hint: Compute $\lambda^2$ and see that it is proportional to the identity matrix.

On substituting Eq.(2) in Eq.(1), to first order in $\lambda$, we get

(4)
\begin{align} {\lambda^\mu}_\nu \ \eta^{\nu\rho} \ {\delta^\sigma}_\rho+{\delta^\mu}_\nu \ \eta^{\nu\rho} \ {\lambda^\sigma}_\rho &= 0\ ,\\ \implies {\lambda^\mu}_\nu \ \eta^{\nu\sigma} \ + \eta^{\mu\rho} \ {\lambda^\sigma}_\rho&=&0\ , \\ \implies \lambda^{\mu\sigma}+\lambda^{\sigma\mu}&=&0\ . \end{align}

We thus see that Eq.(1) implies that $\lambda^{\mu\nu}:={\lambda^\mu}_\rho \eta^{\rho\nu}$ is antisymmetric as claimed in the lecture. In fact, one has the stronger statement:

(5)
\begin{align} {\Lambda^\mu}_\nu =\exp\left({\lambda^\mu}_\nu\right)\ . \end{align}

Back to Lectures


text:
• Create Account

Banner advertising on our site currently available from just \$5!

### #ActualShippou

Posted 29 June 2013 - 07:51 AM

If your dealing with Windows API, wouldn't it be a lot easier to use one of the "Visual Studio" suites ?

msgbox("Can't we all just get along?")

### #1Shippou

Posted 29 June 2013 - 07:44 AM

msgbox("Can't we all just get along ?")

PARTNERS


text:
## Mathematics and Digital Art: Update 2

It’s been about a month since my first update, so it’s time for another status report on my second semester teaching Mathematics and Digital Art.  It really has been a wonderful semester so far!

Later we’ll look at some student work (like Collette’s iterated function system),

but first, I’d like to talk about course content.

The main difference from last semester in terms of topics covered was including a unit on L-systems instead of polyhedra.  You might recall the reasons for this:  first, students didn’t really see a connection between the polyhedra unit and the rest of the course, and second, the little bit of exposure to L-systems (by way of project work) was well-received.

I’ve talked a lot about L-systems on my blog, but as a brief refresher, here is the prototypical L-system, the Koch curve.  The scheme is to recursively follow the sequence of turtle graphics instructions

F  +60  F  +240  F  +60  F.

There is also an excellent pdf available online, The Algorithmic Beauty of Plants.  This is where I first learned about L-systems.  It is a beautifully illustrated book, and I am fortunate enough to own a physical copy which I bought several years ago.

Talking about L-systems is also a great way to introduce Processing, since I have routines for creating L-systems written in Python.  Up to this point, we’ve just explored changing parameters in the usual algorithm, but there will a deeper investigation later.

One main focus, however, was just seeing the fractal produced by the algorithm.  When working in the Sage environment, the system automatically produced a graphic with axes labeled, enabling you to see what fractal image you created.

In Processing, though, you need to specify your screen space ahead of time.  So if your image is drawn off-screen, well, you just won’t see it.  You have to do your own scaling and translating, which is sometimes not a trivial undertaking.

I also decided to introduce both finite and infinite geometric series in conjunction with L-systems.  This had two main applications.

First, we looked at the Sierpinski triangle.  Begin with any triangle, and take out the triangle formed by joining the midpoints of the sides.  Then repeat recursively, creating the Sierpinski triangle.

Now assume your original triangle had an area of 1, and calculate the area of all the triangles you removed.  Since the process is repeated infinitely, this sum is just an infinite geometric series.  Interestingly, the sum of this series is 1, meaning, in some sense, you’ve taken away all the area — but the Sierpinski triangle is still left over!  This illustrates an idea not usually encountered by students before:  infinite sets of points with no area.  Makes for a nice discussion.

Second, we looked at the Koch curve (and similarly defined curves).  Using a geometric sequence, you can look at the length of any iteration of the polygonal path drawn by the recursive algorithm.  And, as expected, these paths get longer each time, and their lengths tend to infinity as the number of iterations increases.  This is another nice way to involve geometric sequences and series.

We’ll be doing more with L-systems in the next few weeks, so I’ll finish this discussion on my next update.

A highlight of the past month was a visit by artist Stacy Speyer.

Having worked with weaving and textiles for some time, Stacy has moved on to an investigation of polyhedral forms.

Stacy’s talk provided a wonderful insight into integrating mathematics and art in ways we did not study in class.  One of the goals of the Bridges papers presentations and the guest speakers is to do precisely this

She writes:

I’m now on a mission to share the fun of making geometric forms with others; I designed Cubes and Things, a 3D coloring book.  These easy-to-make paper constructions have patterns that can be colored which emphasize different kinds of symmetric properties of the polyhedra.  I bring this fun activity to schools and other groups in the form of Polyhedra Parties.  And whenever possible, I still work on making more geometric art and learning more about math.

Visit Stacy’s website to take a look at her book, and view many more examples of her stunning work!

Now we’ll take a look at a few more examples of student artwork.  These pieces were submitted for the assignment on iterated function systems.  Karla created a piece which reminded her of icicles or twinkling lights.

Lainey thought her piece looked like a bolt lightning coming out of a wizard’s staff.

And Peyton’s piece reminder her of flowers.

Finally, as I did last semester, I asked students for some mid-semester comments on how the course was going.  You can see the complete prompt on Day 19 of the course website.  Here are a few of the comments:

I like how it takes a subject that we are all required to take and creates a real, palpable output. Rather than some types of math, where everything is theoretical, it creates a clear chain of events with an even clearer consequence.

[A]fter seeing the kinds of art works there are that involve the kind of math and programming we use, it opened up a new world of artistic possibilities.

What I enjoy most about this course aside from it being small and very interactive in terms of doing labs and having all of our questions answered, is the fact that I would never thought I would be able to create images using programming or math let alone enjoying the satisfaction of the final product.

I was pleased to read these responses, as they suggest the course is fulfilling its intended purpose.  But there were also suggestions for improvement — there was a consensus that the math moved a bit too quickly.  When we start the discussion on number theory for analyzing the Koch curve next week, I’ll make sure to keep an eye on the pace.  I’ll let you know how it goes in my next update in April!

## On Coding VIII: LaTeX II

Today, I’ll conclude my remarks about my passion for using LaTeX.  As I was writing the last installment of On Coding, I realized that I had more to say than would fit in just one post.

Yet another wonderful thing about LaTeX is how many mathematicians and scientists use it — and therefore write packages for it.  You can go to the Comprehensive TeX Archive Network and download packages which make Feynman diagrams for physics, molecular structures for chemistry, musical scores, and even crossword puzzles or chessboards!  There are literally thousands of packages available.  And like LaTeX, it’s all open source.  That is a feature which cannot be overstated.  Arguably the world’s best and most comprehensive computer typesetting platform is absolutely free.

The package I use most often is TikZ — it’s a really amazing graphics package written by Till Tantau.  You can do absolutely anything in TikZ, really.  One extremely important feature is that you can easily put mathematical symbols in any graphic.

This is nice because any labels in your diagram will be in the same font as your text.  I always find it jarring when I’m reading a mathematics paper or book, and the diagrams are labelled in some other font.

There is so much more to say about TikZ.  I plan to talk about it in more detail in a future installment about computer graphics, so I’ll stop here and leave you with one more graphic made with TikZ.

Another package I use fairly often is the hyperref package.  This is especially useful when you’re creating some type of report which relies on information found on the web.  For example, when I request funding for a conference, I need to include a copy of the conference announcement.  So I create a hyperlink (in blue, though you can customize this) in the document which takes you to the announcement online when you click on it.

These hyperlinks can also be linked to other documents in the cloud, so you can have a “master” document which links to all the documents you need.  Now that I’m approaching 100 blog entries, I plan on making an index this way.  I’ll create a pdf (using LaTeX, of course) which lists posts by topic with brief descriptions as well as hyperlinks to the relevant blog posts.

On to the next LaTeX feature!  I learned about this one from a colleague (thanks, Noah!) when I was writing some notes on Taylor series for calculus.  I used it as a text when I taught calculus; the notes are about 100 pages long.

I wanted to share these notes with others, and the style of the notes was such that the exercises weren’t at the end of the sections, but interwoven with the text.  Students are supposed to do the exercises as they encounter them.

But for other calculus teachers, it was helpful to include solutions to the exercises.  The problem in creating a solutions manual was that if I ever edited the notes, I’d have to also edit the solutions manual in parallel.  I knew this was going to happen, since when I gave exams on this material, I added those problems as supplementary exercises to the text.

Enter the ifthen package in LaTeX.  I created an exercise environment, so that every time I included an exercise, I had a block which looked like this:

\begin{exercise}

{….the exercise….}

{….the solution….}

\end{exercise}

Think of this as an exercise function with two arguments:  the text of the exercise, and the text of the solution.

Then I created a boolean variable called teacheredition.  If this variable was true, the exercise function printed the solutions with each exercise.  If false, the solutions were omitted.  This control structure was made easy by some functions in the ifthen package.

And that’s all there was to it!  So every time I created an exercise, I added the solution right after it.  Of course the exercises were automatically numbered as well.  No separate solutions manual.  Everything was all in one place.  If you have ever had to deal with this type of issue before, you’ll immediately recognize how unbelievably useful the ability to do this is!

While not really features of LaTeX itself, there are now places in the cloud where you can work on LaTeX documents with others.  I’d like to talk about the one Nick and I are currently using, called ShareLaTeX.   This is an environment where you can create a project, and then share it with others so they can work on it, too.

So when Nick and I work on a paper together, we do it in ShareLaTeX.  It’s extremely convenient.  We can edit the paper on our own, but most often, we use ShareLaTeX when we’re working together.  Usually, we’re working on different parts of the paper — but when one of us has something we want the other to see, it’s easy to just scroll down (or up) in the document and look at what’s been done.

Also nice is that it’s easy to copy projects — so as we’re about to make a big change (like use different notation, or alter a fundamental definition), our protocol is to make a copy of the current project to work on, and then download the older version of the project (just in case the internet dies).

It’s wonderful to use.  And it actually really came in handy when Nick was working on his Bridges paper for last year.  His computer hard drive seriously crashed.  But since we were working on ShareLaTeX, the draft of his paper was unharmed.

I hope this is enough to convince you that it might be worthwhile to learn a little LaTeX!  I seriously don’t know what I’d do without it.  And — as it bears repeating — it’s all open source, available to anyone.  So, really, why isn’t the whole world using LaTeX?  That’s a mystery for another day….

## What is…Spherical Geometry?

This week, we’ll look at another type of geometry, namely spherical geometry.  Quite simply, this is the geometry of a sphere.  Here, a sphere is a set of points equidistant from a given center.  In other words, throughout this post, you should imagine only a surface, with nothing inside it — think of the rind of an orange, without any of the slices.  I began to describe spherical geometry in my original post, What is a Geometry?, so I’ll briefly summarize the ideas in that post first.  It wouldn’t hurt to review it…

From a Euclidean standpoint, there are points on the sphere, but obviously no straight lines.  In spherical geometry, we define a Point to be a pair of antipodal points on the sphere, and a Line to be a great circle on the sphere.  This results in two nice theorems of spherical geometry:  any two distinct Lines determine (intersect in) a single Point, and any two distinct points determine a single Line.

This is a departure from Euclidean geometry, for this means that there are no parallel Lines in spherical geometry, since distinct Lines always intersect.  But there is something more going on here.

Consider the statement “Any two distinct Lines determine a single Point.”  Now perform the following simple replacement:  change the occurrence of “Line” to “Point,” and vice versa.  This gives the statement “Any two distinct Points determine a single Line,”  and is called the dual of the original statement.

Thus, we have the situation that some statement and its dual are both true.  Now if this is true of some set of statements in spherical geometry — that the dual of each statement is true — and we derive a new result from this set of statements, then the following remarkable thing happens.  Since the dual of any statement we used is true, then the dual of the new result must also be true!  Just replace each statement used to derive the new result with its dual, and you get the dual of the new result as a true statement as well.

This is the principle of duality in mathematics, and is a very important concept.  We will encounter it again when we investigate projective geometry.

Triangles and trigonometry are different on the sphere, as well.  A spherical triangle is composed of three arcs of great circles, as in the image below.

If this were Earth, you could imagine starting at the North Pole, following 0 degrees of longitude to the Equator (shown in yellow), follow the Equator to 30 degrees east longitude, then follow this line of longitude back to the North Pole.

On the sphere, though, sides of a triangle are actually angles.  Sure, you could measure the length of the arcs given the radius of the sphere, but that’s not as useful.  Consider the choice of units on the Earth — kilometers or miles?  We don’t want important  geometrical results to depend on the choice of units.  So a side is specified by the angle subtended by the arc at the center of the sphere.  This makes sense since the sides are arcs of great circles, and the center of any great circle is the center of the sphere.

The angles between the sides are angles, too!  A great circle is just the intersection of a plane passing through the origin and the sphere.  So the angle between any two sides is defined to be the angle between the planes which contain them.

Really nothing from Euclidean trigonometry is valid on the sphere.  For example, if you look at the triangle above, you can see that the angles between the sides are 30, 90, and 90 degrees.  These angles add to 210!  In fact, the three angles of a triangle always add up to more than 180 degrees on a sphere.  (You may notice that the sides of this triangle are also 30, 90, and 90 degrees, but this is just a coincidence.  The sides and angles are usually different.)

If A, B, and C are the angles of a spherical triangle, it turns out that the area of the triangle is proportional to ABC – 180.  This means that the smaller a triangle is, the closer the angle sum is to 180 degrees.

There is no Pythagorean Theorem on the sphere, either.  In addition, if a, b, and c are the sides opposite angles A, B, and C, respectively, then we have formulas like

$\cos c=\cos a\cos b+\sin a\sin b\cos C$

and

$\cos C=-\cos A\cos B+\sin A\sin B\cos c.$

One interesting consequence of the second of these formulas is this.  If you know the angles of a triangle, you can determine the sides.  You can’t do this in Euclidean trigonometry, since the triangles may be similar, but of different sizes.  In other words, there are no similar triangles on the sphere.  Spherical triangles are just congruent, or not. You can’t have two different triangles with the same angles.

For now, we’ve considered our sphere as being embedded in a Euclidean space.  The definition of this surface is easy:  just choose a point as the center of your sphere, and then find all points which are a given, fixed distance — the radius of the sphere — from that point.  Sounds easy enough.

But can you imagine a sphere without thinking of the three-dimensional space around it?  Or put another way, imagine you were a tiny ant, on a sphere of radius 1,000,000 km.  That’s over 150 times the radius of the Earth!  How would you know you were actually on the surface of a sphere?  If you were that small and the sphere were that large, it would seem awfully flat to you….

So how could you determine the sphere was curved?  This is a question for differential geometry, which among other things, is about the geometry of a surface without any reference to a space it’s embedded in.  This is called the surface’s intrinsic geometry.

As an example of looking at the intrinsic geometry of the sphere, consider Lines.  Now you can’t say they’re great circles any more, since this relies on thinking of a sphere as being embedded in three-dimensional space; in other words, its extrinsic geometry.  You need the concept of a geodesic — in other words, the idea of a “shortest path.”

So if you’re the ant crawling between two points on a sphere, and you wanted to take the shortest path, you would have to follow a great circle arc.  So it is possible to define Lines only using properties of the surface itself.  But the mathematics to do this is really extremely challenging.

Lots of new ideas here — but we’ve just scratched the surface of a study of spherical geometry.  You can see how very different spherical geometry is from both Euclidean and taxicab geometry.  Hopefully you’re well on your way to wrapping your head around our original question, What is a Geometry?….

## Art Exhibition: Golden Section 2017

Yesterday, artists from the Golden Section of the Mathematical Association of America contributed to yet another art exhibition!  Each Spring, members of the MAA from Northern California, Nevada, and Hawaii attend a regional conference — this year, at Santa Clara University.

Last year the event was held at the University of California, Davis, and Shirley Yap from California State University, East Bay organized a highly successful exhibit — what we believe to be the first art exhibition ever to be a part of a sectional MAA meeting.  I asked Shirley to say a few words about what motivated her to take on this task.

I exhibited an art piece at the Joint Mathematics Meetings in 2016. It was an interactive piece and I wanted to see how people would experiment with it.  So I just hung around the exhibit for a while and not only saw how people played with my piece, but how they observed other pieces. The kind of delight that came from people’s faces convinced me that the art was really drawing them to math in a way that was different from how I had seen before. Perhaps because one is expected to sit in front of art for a long time to contemplate it, people felt relaxed enough to enjoy it.  Whatever it was I saw, I knew that I wanted to share the experience with others outside of the JMM.

When we put a call for artists out on our Golden Section website, we didn’t get any responses. So I went through years of JMM art exhibit catalogs and looked up each artist to see if they lived in our section.  Then I just started emailing them individually to ask if they were interested in showing their work at a local exhibition.

This year, I offered to help Shirley with organizing the exhibition.  Given what was involved in the second year, I have a new appreciation for Shirley’s dedication to spreading the word about mathematical art.  Such events do not organize themselves — and we are all grateful Shirley took on this huge task to start a new Golden Section tradition.

We didn’t have as many artists participate this year — but that’s part of the ebb and flow of yearly events like these.  But the quality has high, as was the enthusiasm of the artists.  Two of the artists this year were undergraduates — Nick Mendler from the Univiersity of San Francisco, and Juli Odomo from Santa Clara University.  I think of them as future organizers of sectional MAA art exhibits….

In the morning, we had the usual opening remarks and a series of excellent speakers.  The art exhibit took place in parallel with the Student Poster Sessions, which took place after lunch from 1:00-2:30.  This was followed by another series of talks.  You can see the full program here.

I asked the artists to say a few words about their experience about creating or exhibiting mathematical art.  Here a few remarks.

Frank Farris (see artwork above):

I love the idea that we’re entering a golden age of mathematical art. New tools become available all the time and a growing community is finding new creative ways to use them. Can’t wait to see what the next years will bring.

I believe the sentiment in Gwen’s quote resonates very strongly with many mathematical artists.

Gwen Fisher:

The thing that keeps bringing me back to bead weaving is mathematics. Of course, I love colors of glass beads and the way they sparkle, but mostly, I keep returning to my seed beads because I keep finding new ways to use and represent mathematical structures with them.

Nick Mendler (see artwork above):

Since my first sectional meeting last Spring, I’ve continued research into the questions that generated my first mathematical artwork over a year ago.
Recognizing that my projects and thoughts are the most rewarding when realized through an aesthetic process has been not only productive, but has been a fascinating source of guidance to new questions. That focusing on more elegant images brings about more elegant mathematics has been only too clear from the sessions I’ve attended so far; I’m looking forward to seeing and learning from more art pieces!

Interested in organizing an art exhibit in your section?  Since I helped Shirley with the organizational details this year, I can say a bit about what’s involved in putting together an exhibition.

The first step is, clearly, finding artists who want to show their work.  It would be easier to get a student worker to do the search Shirley undertook — but don’t forget about the exhibitions at the Bridges conferences!  Here is a link to both JMM and Bridges galleries.  You can also contact the SIGMAA-ARTS and request that an email blast be sent to members.

As far as the submission process goes, that’s pretty standard.  While it is always nice to accept every submission, sometimes it just isn’t possible.  The works should have some real mathematical content, and be of good quality.

Since not all artists necessarily have business cards (especially student artists), I had the idea of making nametags for those who wanted one.  You can download this nametag template in LaTeX if you would like, then edit and print onto cardstock.  (Note:  WordPress would not let me upload a .tex document, so I saved it as an Open Office document.)

A Fine Mesh We’re In, © dan bach 2016.

It is a good idea to have an assistant or a student helper in the exhibition venue during the conference.  Not all artists attended the meeting, and so brought in their work at various times during the day.

Shirley had the wonderful idea of arranging a dinner for contributing artists after the conference.  Last year we went to an excellent Thai restaurant, and this year, Frank Farris generously offered to host a pot luck dinner (he provided the lasagna) at his house.  These have been very wonderful events, and give artists the opportunity to get to know each other a little better.

Finally, I wanted to mention that I am in the middle of my second time teaching Mathematics and Digital Art at the University of San Francisco.  I say this in the event you are interested in offering such a course at your university.  I have written extensively about this experience on my blog, and also have all course materials as well as a day-by-day outline available on the  Fall 2016 course website.  I would be happy to help you get such a course off the ground if you’re interested.

If you would like more information, or want to get in touch with any of the artists whose work is shown above, please make a comment and I’ll get back to you.  I hope this is just the beginning of a long tradition of having mathematical art exhibits at sectional MAA meetings!


text:
88
Like
20
Love
1
Haha
3
Wow
0
Angry
0

21
How many tests will be uploaded before gate 19?
Will this post be kept updated as new tests become available?

yes

@ ma'am

In this blog post, all test are included, which is present in GO$?$

yes, all test are included

You did really awesome work

Thank you so much, ma'am

What is applied mock??
edited Jan 23, 2019
nice questions
1
Gatebook test series removed
1
yes, they wanted it removed.
How many more tests will be uploaded before Gate 2020???

Can this be updated?

1

@Lakshman Patel RJIT please share all standard book  questions which you already upload on GO in pdf format  which help everyone plz consider

question no.45 in  gate 2018 mock is wrong.


text:
# Inner Product Spaces Coupled with Transformations

Remember that in an inner product space, $T^*$ is such that for all $u,v\in V$: $\langle T^*u,v\rangle=\langle u,Tv\rangle$. Now, integrate by parts.


text:
# Is there a way to use < and > as delimiters to optional command or environment parameters?

Say I want to define an environment like "color description" which would be the same as "description" except that one could add an optional color background to the label: \begin{colordescription}[red] ...

My question is inspired by the following: description (at least with enumitem) also has "normal" optional arguments (e.g. [style=...]) so, to ensure the new "colordescription" environment works the same way, I'd need to place the new optional arguments before (or after) the known ones, like \begin{colordescription}[red][style=...].

I'd like to visually separate the "new" optionals, which is why I thought of syntax like \begin{colordescription}<red>[style=...]: I think there are few occasions where the body of an environment would start with <, so the angle brackets wouldn't be confused with regular text. Maybe there's a way to consume the character after \begin{...} and do a special parse if this character is a <?

• See the documentation of xparse: it enables you to defines commands or environments with various types of arguments, among which the d type (argument with delimiters). – Bernard Mar 12 '20 at 14:25

xparse allows (almost) arbitrary delimiters to commands using the d/D argument type. You can define the environment with:

\NewDocumentEnvironment{colordescription}{ D<>{white} O{} }
{\begin{description}[format=\colorbox{#1},#2]}
{\end{description}}

then the argument #1 will be optional, delimited by <...>, default white, and the argument #2 will be optional, delimited by [...], default empty.

\documentclass{article}
\usepackage{enumitem}
\usepackage{xcolor}
\usepackage{xparse}
\NewDocumentEnvironment{colordescription}{ D<>{white} O{} }
{\begin{description}[format=\colorbox{#1},#2]}
{\end{description}}
\begin{document}

\begin{colordescription}
\item[foo] bar
\end{colordescription}

\begin{colordescription}[style=nextline]
\item[foo] bar
\end{colordescription}

\begin{colordescription}<red>
\item[foo] bar
\end{colordescription}

\begin{colordescription}<red>[style=nextline]
\item[foo] bar
\end{colordescription}

\end{document}

EDITED to hand all 3 arguments directly to final macro, so no expansion is necessary on OP's part.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\makeatletter
\newenvironment{z}[1]{\@ifnextchar<{\zz{#1}}{\zz{#1}<Opt2 default>}}{}
\makeatother
\def\zz#1<#2>{%
\def\argi{#1}
\def\argii{#2}
\zzz
}
\newcommand\zzz[1][Opt 3 default]{
\expandafter\expandafter\expandafter\zzzz\expandafter\expandafter
\expandafter{\expandafter\argi\expandafter}\expandafter{\argii}{#1}
}
\newcommand\zzzz[3]{
First arg is \detokenize{#1}\\
Bracket option is \detokenize{#2}\\
Option argument is \detokenize{#3}
}
\begin{document}
\begin{z}{ABC} \end{z}

\begin{z}{ABC}[\def] \end{z}

\begin{z}{ABC}<hi \mom> \end{z}

\begin{z}{ABC}<hi \mom>[\def] \end{z}
\end{document}

• Oh, no, you have \zz-itis :-) – Phelype Oleinik Mar 12 '20 at 14:32
• @PhelypeOleinik I'm just trolling for David's vote. – Steven B. Segletes Mar 12 '20 at 14:33
• Hehe, had a coworker at one time who named all his files zzz, what ever it was was then determined by the folder name it sat in – daleif Mar 13 '20 at 7:07


text:
# qiskit.algorithms.optimizers.TNC¶

class TNC(maxiter=100, disp=False, accuracy=0, ftol=- 1, xtol=- 1, gtol=- 1, tol=None, eps=1e-08, options=None, max_evals_grouped=1, **kwargs)[código fonte]

Truncated Newton (TNC) optimizer.

TNC uses a truncated Newton algorithm to minimize a function with variables subject to bounds. This algorithm uses gradient information; it is also called Newton Conjugate-Gradient. It differs from the CG method as it wraps a C implementation and allows each variable to be given upper and lower bounds.

Uses scipy.optimize.minimize TNC For further detail, please refer to See https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html

Parâmetros
• maxiter (int) – Maximum number of function evaluation.

• disp (bool) – Set to True to print convergence messages.

• accuracy (float) – Relative precision for finite difference calculations. If <= machine_precision, set to sqrt(machine_precision). Defaults to 0.

• ftol (float) – Precision goal for the value of f in the stopping criterion. If ftol < 0.0, ftol is set to 0.0 defaults to -1.

• xtol (float) – Precision goal for the value of x in the stopping criterion (after applying x scaling factors). If xtol < 0.0, xtol is set to sqrt(machine_precision). Defaults to -1.

• gtol (float) – Precision goal for the value of the projected gradient in the stopping criterion (after applying x scaling factors). If gtol < 0.0, gtol is set to 1e-2 * sqrt(accuracy). Setting it to 0.0 is not recommended. Defaults to -1.

• tol (Optional[float]) – Tolerance for termination.

• eps (float) – Step size used for numerical approximation of the Jacobian.

• options (Optional[dict]) – A dictionary of solver options.

• max_evals_grouped (int) – Max number of default gradient evaluations performed simultaneously.

• kwargs – additional kwargs for scipy.optimize.minimize.

__init__(maxiter=100, disp=False, accuracy=0, ftol=- 1, xtol=- 1, gtol=- 1, tol=None, eps=1e-08, options=None, max_evals_grouped=1, **kwargs)[código fonte]
Parâmetros
• maxiter (int) – Maximum number of function evaluation.

• disp (bool) – Set to True to print convergence messages.

• accuracy (float) – Relative precision for finite difference calculations. If <= machine_precision, set to sqrt(machine_precision). Defaults to 0.

• ftol (float) – Precision goal for the value of f in the stopping criterion. If ftol < 0.0, ftol is set to 0.0 defaults to -1.

• xtol (float) – Precision goal for the value of x in the stopping criterion (after applying x scaling factors). If xtol < 0.0, xtol is set to sqrt(machine_precision). Defaults to -1.

• gtol (float) – Precision goal for the value of the projected gradient in the stopping criterion (after applying x scaling factors). If gtol < 0.0, gtol is set to 1e-2 * sqrt(accuracy). Setting it to 0.0 is not recommended. Defaults to -1.

• tol (Optional[float]) – Tolerance for termination.

• eps (float) – Step size used for numerical approximation of the Jacobian.

• options (Optional[dict]) – A dictionary of solver options.

• max_evals_grouped (int) – Max number of default gradient evaluations performed simultaneously.

• kwargs – additional kwargs for scipy.optimize.minimize.

Methods

 __init__([maxiter, disp, accuracy, ftol, …]) type maxiter int Return support level dictionary gradient_num_diff(x_center, f, epsilon[, …]) We compute the gradient with the numeric differentiation in the parallel way, around the point x_center. optimize(num_vars, objective_function[, …]) Perform optimization. Print algorithm-specific options. Set max evals grouped set_options(**kwargs) Sets or updates values in the options dictionary. wrap_function(function, args) Wrap the function to implicitly inject the args at the call of the function.

Attributes

 bounds_support_level Returns bounds support level gradient_support_level Returns gradient support level initial_point_support_level Returns initial point support level is_bounds_ignored Returns is bounds ignored is_bounds_required Returns is bounds required is_bounds_supported Returns is bounds supported is_gradient_ignored Returns is gradient ignored is_gradient_required Returns is gradient required is_gradient_supported Returns is gradient supported is_initial_point_ignored Returns is initial point ignored is_initial_point_required Returns is initial point required is_initial_point_supported Returns is initial point supported setting Return setting settings The optimizer settings in a dictionary format.
property bounds_support_level

Returns bounds support level

get_support_level()

Return support level dictionary

static gradient_num_diff(x_center, f, epsilon, max_evals_grouped=1)

We compute the gradient with the numeric differentiation in the parallel way, around the point x_center.

Parâmetros
• x_center (ndarray) – point around which we compute the gradient

• f (func) – the function of which the gradient is to be computed.

• epsilon (float) – the epsilon used in the numeric differentiation.

• max_evals_grouped (int) – max evals grouped

Retorna

Tipo de retorno

property gradient_support_level

property initial_point_support_level

Returns initial point support level

property is_bounds_ignored

Returns is bounds ignored

property is_bounds_required

Returns is bounds required

property is_bounds_supported

Returns is bounds supported

property is_gradient_ignored

property is_gradient_required

property is_gradient_supported

property is_initial_point_ignored

Returns is initial point ignored

property is_initial_point_required

Returns is initial point required

property is_initial_point_supported

Returns is initial point supported

optimize(num_vars, objective_function, gradient_function=None, variable_bounds=None, initial_point=None)

Perform optimization.

Parâmetros
• num_vars (int) – Number of parameters to be optimized.

• objective_function (callable) – A function that computes the objective function.

• gradient_function (callable) – A function that computes the gradient of the objective function, or None if not available.

• variable_bounds (list[(float, float)]) – List of variable bounds, given as pairs (lower, upper). None means unbounded.

• initial_point (numpy.ndarray[float]) – Initial point.

Retorna

point, value, nfev

point: is a 1D numpy.ndarray[float] containing the solution value: is a float with the objective function value nfev: number of objective function calls made if available or None

Levanta

ValueError – invalid input

print_options()

Print algorithm-specific options.

set_max_evals_grouped(limit)

Set max evals grouped

set_options(**kwargs)

Sets or updates values in the options dictionary.

The options dictionary may be used internally by a given optimizer to pass additional optional values for the underlying optimizer/optimization function used. The options dictionary may be initially populated with a set of key/values when the given optimizer is constructed.

Parâmetros

kwargs (dict) – options, given as name=value.

property setting

Return setting

property settings

The optimizer settings in a dictionary format.

The settings can for instance be used for JSON-serialization (if all settings are serializable, which e.g. doesn’t hold per default for callables), such that the optimizer object can be reconstructed as

settings = optimizer.settings
# JSON serialize and send to another server
optimizer = OptimizerClass(**settings)

Tipo de retorno

Dict[str, Any]

static wrap_function(function, args)

Wrap the function to implicitly inject the args at the call of the function.

Parâmetros
• function (func) – the target function

• args (tuple) – the args to be injected

Retorna

wrapper

Tipo de retorno

function_wrapper


text:
# Question about polynomial formula of degree $5$.

I understand there is a result that is proved using abstract algebra like Galois theory that there isn't a formula for degree $5$ or higher polynomials.

Does this just apply to polynomials whose coefficients are integers, real numbers, complex numbers or any field?

• I have read the proof that it follows for integers, whence it follows for all supersets. I do not know about the question for finite fields, but then in finite fields you have to seek roots in the algebraic closure of the field right? So I am not aware of the answer. – астон вілла олоф мэллбэрг Mar 17 '17 at 10:59
• Thanks for the comment. I don't like Villa though :( – Ben B Mar 17 '17 at 11:02
• You are welcome (to ask further of me, and to not like Villa). – астон вілла олоф мэллбэрг Mar 17 '17 at 11:03

This result (Abel's theorem) is valid for any field of characteristic $0$, and relies on the following result, proved by Galois:
A polynomial equation over a field of characteristic $0$ is solvable by radicals if and only if its Galois group is solvable.
Now with literal coefficients, the Galois group of a polynomial of degree $n$ is the symmetric group $S_n$, which is not solvable for $n\ge 5$. For details on what is a solvable group, you can see Wikipedia.
The situation is more complex in characteristic $p>0$, because if a root has order divisible to the characteristic, it gives rise to a so-called non-separable extension, i.e. it is not a simple root of its minimal polynomial, contrary to the case of characteristic $0$.
• Re: characteristic $p>0$. Adding the point that over a finite field any finite extension is cyclic, hence solvable. – Jyrki Lahtonen Mar 18 '17 at 7:38


text:
How can I address a column from a record in a plpgsql function dynamically?

In the following snippet I have access to a variable entity.colname that contains the column that should be checked in the IF constrol structure. I'm looking into how I can replace the foobar part in the snippet below with entity.colname. Is that possible in plpgsql?

IF NEW.foobar IS NULL THEN
RAISE EXCEPTION '% cannot be null', foobar;
END IF;

This is something that could but doesn't work.

IF NEW.entity.colname IS NULL THEN
RAISE EXCEPTION '% cannot be null', entity.colname;
END IF;

The example above is just for illustration what I'm looking to achieve, don't judge the functionality. :)

I'm using PostgreSQL 9.1.

• is this in a trigger function? In which case, why NEW.entity.colname rather than just NEW.colname? – Jack Douglas Jul 25 '12 at 14:04
• @JackDouglas: As I understand it, the value of entity.colname is supposed to hold the name of the column. The OP needs dynamic SQL. – Erwin Brandstetter Jul 25 '12 at 14:12

That's tricky, because identifiers cannot be variables in plain SQL. You need to use dynamic SQL with EXECUTE - which is still tricky, because variables are not visible inside EXECUTE.

Here is a demo how to get around this:

CREATE TYPE mytype AS (id int, txt text);

DO
$body$
DECLARE
_val    mytype  := (1, NULL)::mytype;
_name   text    := 'txt';
_isnull boolean;
BEGIN
EXECUTE 'SELECT $1.' || quote_ident(_name) || ' IS NULL' USING _val INTO _isnull; IF _isnull THEN RAISE NOTICE 'Column "%" cannot be null', _name; END IF; END;$body$ Improved with with @Jack's idea in the comment. You cannot use plpgsql built-in FOUND because it is not set by EXECUTE (except for RETURN QUERY EXECUTE - more here). That's why I used GET DIAGNOSTICS ... initially. But finally simplified with @Jack's idea. quote_ident() makes sure the name is syntactically valid and protects against SQLi. • Would this be a more readable using EXECUTE 'SELECT$1.' || quote_ident(_name) || ' IS NULL' into a boolean? – Jack Douglas Jul 25 '12 at 14:20
• @JackDouglas: I think that is the most elegant way. I improved my answer with your idea. – Erwin Brandstetter Jul 25 '12 at 14:28

assuming the question is about triggers (and I'm not 100% sure I understand the question), something along these lines may be the way to go:

begin;
set role dba;
create role stack;
grant stack to dba;
create schema authorization stack;
set role stack;
--
create table t(id serial);
--
create function f() returns trigger language plpgsql set search_path to 'stack' as $$declare s text := 'id'; b boolean; begin execute 'select 1.'||s||' is null' using new into b; if b then raise exception '% cannot be null', s; end if; return new; end;$$;
--
create trigger trig before insert on t for each row execute procedure f();
--
insert into t default values;
--INSERT 0 1
insert into t(id) values (null);
--ERROR:  id cannot be null
--
rollback;

* edited to allow for the case when the column type is unknown (thanks @Erwin!)

• It indeed is a trigger function, in short i'm looking for a way to address the NEW.name property but "name" is stored in the entity.colname variable. So basically i'm trying to do NEW.{entity.colname} where {entity.colname} should be substituted by the value 'name' – ChrisR Jul 25 '12 at 14:19
• SELECT INTO seems more elegant, but raises the problem that the type of the column is unknown - as the column name is a variable. You could get around this by casting the value to text and declare n text - as every type can be cast to text. – Erwin Brandstetter Jul 25 '12 at 14:23
• @Erwin good point, thanks. I've (hopefully) achieved the same thing another way. – Jack Douglas Jul 25 '12 at 14:33
• @Chris the solution is exactly the same whether you are using a simple or compound type, so I've not explicitly used entity.colname - does that make sense to you? – Jack Douglas Jul 25 '12 at 14:35


text:
# Proving that a poset is a lattice

I discovered experimentally that a certain finite poset (sorry, I cannot give its definition here) seems to be in fact a (non-distributive, non-graded) lattice. The covering relations are reasonably simple, but it seems not so easy to find out whether one element is smaller than the other, let alone find the meet (or join) of two elements. However, it is (relatively) easy to see that the poset has a minimum and a maximum.

I wonder whether there are standard techniques for proving that a poset is a lattice, that do not need knowledge about how the meet of two elements looks like. (In fact, any example would be very helpful.)

Some more hints:

1. I don't see a way to embed the poset in a larger lattice...

2. the poset is (in general) not self-dual, but the dual poset is itself a member of the set of posets I am looking at.

3. to get an idea, here is a picture of one example (produced by sage-combinat and dot2tex)

-
What do you mean by "it seems not so easy to find out whether one element is smaller than the other"? In what way is this information not directly provided by the order relation that comes with the poset? (this would normally be a comment and not an answer, but I cannot leave comments yet) –  Niemi Sep 28 '10 at 18:08
As Martin wrote, he understands the cover relations (i.e., when one element is larger than another and nothing lies between them), but this doesn't necessarily convey understanding of order relations among more widely separated elements. –  JBL Sep 28 '10 at 18:26
I see. In this setting, finding out whether an element is smaller than another element basically becomes a well-known graph theory problem: You can interpret the pairs from the convering relation as a directed edge in a graph and look for a path from one element to another. There should be several techniques to solve this problem efficiently. In fact, the whole problems seems to me more like a problem that should be tackled with graph theory. –  Niemi Sep 28 '10 at 18:43
@Bjorn: why the tag rings and algebras? –  Martin Rubey Oct 10 '10 at 10:07

I have often found the following lemma of Bjorner, Eidelman and Ziegler to be useful:

Let $P$ be a bounded poset of finite rank such that, for any $x$ and $y$ in $P$, if $x$ and $y$ both cover an element $z$, then the join $x \vee y$ exists. Then $P$ is a lattice.

See Lemma 2.1 "Hyperplane arrangements with a lattice of regions", Discrete and Computational Geometry, Volume 5, Number 1, 263--288.

The hypothesis that $P$ is bounded means that $P$ has a minimal and maximal element. In fact, this hypothesis is slightly stronger than necessary: One can show that if $P$ has a minimal element and the other hypotheses hold then $P$ has a maximal element.

-
This is awesome! Namely, if x and y cover a common element, it turns out to be relatively easy to describe the (conjectural) join. Thus, it "only" remains to prove that all other common upper bounds of x and y are larger. I'm curious whether I'll be able to do it... –  Martin Rubey Sep 29 '10 at 6:50
I just discovered yet another local criterion, by Günther Ziegler, in "a new local criterion for the lattice property" (Algebra Universalis, Volume 31, Number 4, 608-610, 1994): if x1, x2 cover x and y1, y2 are covered by y, and x1, x2 <= y1, y2, then there is a z such that x1, x2 < z < y1, y2. (unfortunately, I still didn't manage to prove the lattice property in the problem at hand) –  Martin Rubey Oct 11 '10 at 20:21

Since you seem at heart to be asking a question about how to compute things with your partial order, let me offer several observations from the perspective of computability theory and computable model theory. I recognize, however, that you may find this perspective unhelpful, and in this case I apologize.

• First, the order relation in any lattice is computable from either the join or meet operations, since $x\leq y$ if and only if $x\wedge y = x$ if and only if $x\vee y = y$. Thus, the order relation can be no harder to compute than the lub and glb's.

• Second, the converse is not generally true in infinite lattices, and one cannot generally expect to compute the meet and join operations nor the cover relation from the order relation itself. For example, there is a lattice order on the natural numbers whose order relation is a computable relation, but whose meet function and cover relation is not computable. To construct this example, one arranges a lattice of height $4$ in which a Turing machine program $e$ has meet $0$ with a fixed element $1$ if program $e$ does not halt on trivial input, but otherwise the meet is a code for the halting computation. In this way, the order relation is computable in the sense that given $x$ and $y$ one can compute whether $x\leq y$, but there is in general no way to compute $x\wedge y$, since from this function one could solve the halting problem. Similarly, program $e$ covers $0$ if and only if $e$ does not halt, so the covering relation is also not decidable. Such a kind of model arises commonly in the subject known as computable model theory.

• Third, you mentioned that your order is finite, but any finite structure is of course computable. That is, whatever your relation and operations are, they are definitely computable functions. From this perspective, the exact content of your question becomes somewhat murky, and one would request a greater clarity about what you are asking. It sounds like you might have a uniform presentation of infinitely many different partial orders, and you want to know whether you can compute whether the $n^{\rm th}$ such order is a lattice, or how to uniformly compute the relations or the meets and joins. In this case, we would need more details about what the orders are. For example, one can easily construct examples of an infinite sequence of partial orders, whose order relations are uniformly computable, but the question of whether the $n^{\rm th}$ order is a lattice is undecidable. In contrast, if the $n^{\rm th}$ order is necessarily a finite order of computable size, then this question is always decidable by brute force searching.

• Fourth, you mention that the covering relation is easy. In this case, the order relation should be low degree polynomial time computable (in the size of the order), since one can first compute the covering relation of all pairs, and then successively compute the relation as the transitive closure of this relation.

• Finally, fifth, in response to item 1, every partial $(P,\leq)$ embeds order-preservingly into a lattice, since one may consider the set of downward closed subsets of $P$. This collection is closed under unions and intersections, and if one identifies a point in $P$ with its lower cone, then one obtains an order-preserving map into a lattice. This embedding preserves meets when they exist, since the intersection of the cone below $x$ and the cone below $y$ is the cone below $x\wedge y$, when this meet exists. But unions will not generally preserve $\vee$ for this map. There are other possible completions that are appropriate when the lattice exhibits certain other nice properties. For example, when the lattice minus its minimal element is separative, then it has a completion as a complete Boolean algebra, the regular open algebra.

-

If you have a handle on the join operator, then you can try to show that your poset is a complete join semi-lattice. This shows that your poset is also a complete meet semi-lattice, and hence a complete lattice.

This is certainly way more useful in the infinite setting, but the point is you only have to do half the work. For example let $L$ be the poset of subspaces of a vector space $V$ (ordered by inclusion). It is almost trivial that the intersection of an arbitrary collection of subspaces is a subspace. So, $L$ is a complete meet semi-lattice and hence a lattice.

-
It was careless of myself to omit the knowledge about existing minimum and maximum - sorry. –  Martin Rubey Sep 28 '10 at 18:04


text:
# Moving camera along generated terrain?

I'm generating my terrain on the GPU, using diamond square subdivision (no height map involved). How can I anchor the camera's position to always be on top of the generated terrain?

Thanks

• You'll have to use the inputs for the terrain data to generate a heightmap or algorithm for finding the height at a specific location. – MichaelHouse May 12 '13 at 1:41

The most expeditious way to extract height information might be to draw it:

1. Set draw parameters to an orthographic projection directly down toward the terrain.
2. Draw to a render target with a depth-map shader.
3. Store render target contents to a 2D array, sample it for heights, and save it for as long as it is useful (no need to reproduce every frame).

I think this method will give you everything you need. It won't require a non-GPU implementation of your algorithm. It can be re-run if your camera moves to a new area of terrain. It can be low resolution; allowing you to interpolate between its "pixels".

cameraPos_Y = desiredDistanceFromGround + currentTerrainVertex_Y.

As the camera moves, keep updating cameraPosY checking the height of which vertex the camera is over or closest to. Use the the camera's X and Z coordinates to help single out which vertex the camera is over.

In case you you have big faces for your terrain, you may have to use a bounding box and get the average height of all vertices detected.

cameraPos_Y = desiredDistanceFromGround + ((vertex1 + vertex2 + vertex3) / 3).

Lets say your bounding box for your camera at whatever current position detects 3 vertices with heights of 3.5, 4.2 and 2.9. You also want to camera to stay at a distance of 2 off the ground. The average height will be 3.53, so roughly, cameraPosY = 2.0 + 3.53.

From here, you may need to incorporate change in height smoothly.

• Since the geometry is generated on the GPU I don't have the vertexes stored on the CPU side of things, so I cannot locate something like this. – Afiefh May 12 '13 at 12:55


text:
1 like 0 dislike
142 views
$\mathrm{f}(x)=x^{3}-\frac{7}{x}+2, \quad x>0$
Taking $1.45$ as a first approximation to $\alpha$, apply the Newton-Raphson procedure once to $\mathrm{f}(x)=x^{3}-\frac{7}{x}+2$ to obtain a second approximation to $\alpha$, giving your answer to 3 decimal places.
| 142 views

1 like 0 dislike
\begin{aligned}
&\mathrm{f}(1.4)=\ldots \text { and } \mathrm{f}(1.5)=\ldots \\
&\mathrm{f}(1.4)=-0.256 \text { (or }-\frac{32}{125} \text { ), } \mathrm{f}(1.5)=0.708 \ldots \text { (or } \frac{17}{24} \text { ) } \\
&\text { Change of sign, } \therefore \text { root } \\
&\text { Alternative method: } \\
&\text { Graphical method could earn M1 if } 1.4 \text { and } 1.5 \text { are both indicated } \\
&\text { A1 then needs correct graph and conclusion, i.e. change of sign } \therefore \text { root } \\
&\text { Note } \\
&\text { M1: Some attempt at two evaluations } \\
&\text { A1: needs accuracy to } 1 \text { figure truncated or rounded and conclusion } \\
&\text { including sign change indicated (One figure accuracy sufficient) } \\
&\mathrm{f}(1.45)=0.221 \ldots \quad \text { or } 0.2 \quad[\therefore \text { root is in }[1.4,1.45]] \\
&\mathrm{f}(1.425)=-0.018 \ldots \text { or }-0.019 \text { or }-0.02 \\
&\therefore \text { root is in }[1.425,1.45] \\
&\text { Note } \\
&\text { M1: See } \mathrm{f}(1.45) \text { attempted and positive } \\
&\text { M1: See } \mathrm{f}(1.425) \text { attempted and negative } \\
&\text { Al: is cso }-\text { any slips in numerical work are penalised here even } \\
&\text { if correct region found. } \\
&\text { Answer may be written as } 1.425 \leq \alpha \leq 1.45 \text { or } 1.425<\alpha<1.45 \text { or }
\end{aligned}

$(1.425,1.45)$ must be correct way round. Between is sufficient. There is no credit for linear interpolation.
by Platinum (131,840 points)

1 like 0 dislike
1 like 0 dislike
1 like 0 dislike
1 like 0 dislike
1 like 0 dislike
1 like 0 dislike
1 like 0 dislike
1 like 0 dislike
2 like 0 dislike


text:
Estimating AutoAntibody Signatures to Detect Autoimmune Disease Patient Subsets

Zhenke Wu, Livia Casciola-Rosen, Ami A. Shah, Antony Rosen, Scott Zeger (2017). Biostatistics
Full text
Supplement
Slides
DOI
URL:
Source code
Share
tweet

# Abstract

Autoimmune diseases are characterized by highly specific immune responses against molecules in self-tissues. Different autoimmune diseases are characterized by distinct immune responses, making autoantibodies useful for diagnosis and prediction. In many diseases, the targets of autoantibodies are incompletely defined. Although the technologies for autoantibody discovery have advanced dramatically over the past decade, each of these techniques generates hundreds of possibilities, which are onerous and expensive to validate. We set out to establish a method to greatly simplify autoantibody discovery, using a pre-filtering step to define subgroups with similar specificities based on migration of radiolabeled, immunoprecipitated proteins on sodium dodecyl sulfate (SDS) gels and autoradiography [Gel Electrophoresis and band detection on Autoradiograms (GEA)]. Human recognition of patterns is not optimal when the patterns are complex or scattered across many samples. Multiple sources of errors—including irrelevant intensity differences and warping of gels—have challenged automation of pattern discovery from autoradiograms.

In this article, we address these limitations using a Bayesian hierarchical model with shrinkage priors for pattern alignment and spatial dewarping. The Bayesian model combines information from multiple gel sets and corrects spatial warping for coherent estimation of autoantibody signatures defined by presence or absence of a grid of landmark proteins. We show the pre-processing creates more clearly separated clusters and improves the accuracy of autoantibody subset detection via hierarchical clustering. Finally, we demonstrate the utility of the proposed methods with GEA data from scleroderma patients.

# Bibtex

@Article{wu2019gelpre,
author        = {Wu, Zhenke and Casciola-Rosen, Livia and Shah, Ami A and Rosen, Antony and Zeger, Scott L},
title         = {Estimating autoantibody signatures to detect autoimmune disease patient subsets.},
journal       = {Biostatistics (Oxford, England)},
year          = {2019},
volume        = {20},
pages         = {30--47},
month         = jan,
issn          = {1468-4357},
country       = {England},
doi           = {10.1093/biostatistics/kxx061},
issn-linking  = {1465-4644},
issue         = {1},
nlm-id        = {100897327},
owner         = {NLM},
pii           = {4622596},
pmid          = {29140482},
revised       = {2019-06-10},
}


text:
# Terms allowed in Lagrangian density

+ 5 like - 0 dislike
856 views

I never fully understood why the Lagrangian density (let's say for a scalar field) was restricted to have only first order derivatives of the field in time and space in QFT. One reason I can think of is to ensure locality. But that doesn't restrict one from having a finite number of higher-order derivatives of the field, does it? Thanks!

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user user34801

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user Neuneck
Possible duplicates: physics.stackexchange.com/q/4102/2451 , physics.stackexchange.com/q/18588/2451 and links therein.

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user Qmechanic

+ 4 like - 0 dislike

First, it's not true that the Lagrangian density is restricted to have first-order space and time derivatives. The example of the scalar field, \begin{align} \mathcal{L}=\tfrac{1}{2}\partial_\mu\phi\partial^\mu\phi - \tfrac{1}{2}m^2\phi^2 + \mathcal{L}_{int}(\phi) \end{align} is a clear counterexample.

Now, following Weinberg, QFT I, section 10.7 on the Kallen-Lehmann representation, we can show (I won't reproduce the full derivation here) that inclusion of higher-order derivatives in the $\mathcal{L}-\mathcal{L}_{int}$ (the free Lagrangian) is inconsistent with the positivity postulate of quantum mechanics. The mathematical statement is that the exact two-point function -- the $\phi$-propagator -- must behave as \begin{align} \Delta'(p) \underset{p^2\to\infty}\longrightarrow \frac{1}{p^2}. \end{align}

From the perspective of effective field theory, however, it is possible to have derivative couplings of any finite order in a local theory (infinite orders are inherently non-local), as long as we introduce a dimensional (usually mass) scale of the appropriate dimension at each order. (See Motl's answer to Why are differential equations for fields in physics of order two? for a full explanation.)

The answers given earlier are all incorrect for one or more reasons. See the comments.

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user MarkWayne
answered Jun 13, 2013 by (270 points)
I suppose, that, by "inconsistent with the positivity postulate of quantum mechanics", you mean that the Hamiltonian may have a negative spectrum. If so, it is not a coherent quantization... Now, it seems maybe that a distinction must be done between fundamental theories and effective theories. But fundamental theories certainly suffer from this problem (it is also known as Ostrogradski instability , which has a classical part and a quantum part )

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user Trimok
Thanks for the response! I understand the problem better now. I read Motl's answer and while I understand everything he says from a mathematical perspective, I'm still confused about the physical grounds for his argument. Is it always true that the distance-scale "L" in Motl's answer that appears in the coefficients of the derivative terms is a microscopic scale that can be neglected when you raise it to an integer power? Thanks!

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user user34801
No, Trimok, that is not what "positivity postulate" means. Consider having a look at the reference to Weinberg that I provided. user34801: The higher-order terms are always associated with a heavy, unmeasured particle (think, roughly speaking, of the W boson in Fermi's 4-fermion theory of the weak interaction). The more derivatives, the more inverse powers of this heavy mass must appear at the vertex. In this way, the higher-order terms are strongly suppressed with order.

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user MarkWayne
@user34801: it's self-serving to point this out now but if you are helped by one answer in way that is clearly more useful than others, you should accept that answer.

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user MarkWayne
thanks for pointing that out!

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user user34801
+ 1 like - 0 dislike

This is a quantum problem.

People don't know how to quantize fields in Lagrangian densities wich appears with a total derivative order greater than 2, while keeping a coherent theory.

For instance, the term $\partial_i \Phi \partial^i \Phi$ has a total derivative order of 2, and we know how to quantize this field, and get a coherent theory.

But it is no more true with higher total derivative orders.

In fact, the Euler-Lagrange equations are more complex, so the definition of the canonical momenta associated to $\Phi$ (in our example) is more complex too.

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user Trimok
answered Jun 12, 2013 by (955 points)
-1: Effective field theory is a completely consistent way of quantizing higher order fields.

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user MarkWayne
Are you able to explicitely exhibit a Lagrangian density with higher-order derivatives, and a coherent quantization ?

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user Trimok
The chiral effective theory of mesons is an obvious example (see work by Meissner and collaborators). General relativity may be quantized as an effective theory (Holstein and others have worked this out.)

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user MarkWayne
Well, Ok, effective field theory is a special case, see this ref especially page 28,29. But my caveat is correct about fundamental theories. Of corse, if you begin with the initial Lagrangian (without higher-order derivatives), and integrate out some heavy fields then use a pseudo-lagrangian (with higher-order derivatives) which reproduces, at low energy, the same scattering amplitudes, I concede it is an other context. It is a very particular process.

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user Trimok
I'll have to disagree again. There is no distinction between "fundamental" and "effective" theories. All realistic modern theories are "effective," the standard model in particular. So EFT is not a special case, at all. The only special cases are the renormalizable theories. Perhaps this is what you mean by "fundamental."

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user MarkWayne
You can see the point I'm making regarding the generality of EFT's if you look at the reference to Meissner's talk you supplied above. In particular, pages 16 & 17.

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user MarkWayne
The standard model is renormalizable. And there is certainly always a gap between a fundamental theory, and a realistic theory. More technically, in the effective Lagrangian with high-order derivatives, there is no "standard quantization", because it would involve a conjugate moment which would be too complex because or the high-order derivatives. So, I see always a difference between a "pure" Quantum Field Theory, and an effective field theory. Nethertheless, I have learned something, and it is the most important...

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user Trimok
+ 1 like - 0 dislike

In classical physics there is no particular reason why higher derivatives of the fields cannot be used. One example is general relativity where the Einstein-Hilbert action has first and second derivatives of the metric field.

In quantum field theory the range of Lagrangians that can be quantised consistently is quite limited and does not include anything with higher derivatives, but it is not sure that this is an unsurmountable limitation.

Text books probably only treat the first derivatives because it keeps the analysis simple and covers most basic example.

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user Philip Gibbs
answered Jun 12, 2013 by (650 points)
This is true as long as the higher-order terms are included in the interaction part of the Lagrangian.

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user MarkWayne
+ 0 like - 1 dislike

This is an assumption.
For instance, in classical mechanics Lagrangian depends only on velocities (first derivatives of position) of particles, thus you have second order diff. equation of motion (Newton's law). Likely, you get second order partial diff. equations from Lagrangian [pedantic mode] if high-order derivatives in Lagrangian are not an exact divergence [/pedantic mode].

You can get equations based on this assumption and check it experimentally, so far they do agree.

This post imported from StackExchange Physics at 2014-07-13 04:40 (UCT), posted by SE-user xaxa
answered Jun 12, 2013 by (-10 points)
 Please use answers only to (at least partly) answer questions. To comment, discuss, or ask for clarification, leave a comment instead. To mask links under text, please type your text, highlight it, and click the "link" button. You can then enter your link URL. Please consult the FAQ for as to how to format your post. This is the answer box; if you want to write a comment instead, please use the 'add comment' button. Live preview (may slow down editor)   Preview Your name to display (optional): Email me at this address if my answer is selected or commented on: Privacy: Your email address will only be used for sending these notifications. Anti-spam verification: If you are a human please identify the position of the character covered by the symbol $\varnothing$ in the following word:p$\hbar$ysicsOve$\varnothing$flowThen drag the red bullet below over the corresponding character of our banner. When you drop it there, the bullet changes to green (on slow internet connections after a few seconds). To avoid this verification in future, please log in or register.


text:
Mohsen Ghaffari · Juho Hirvonen · Fabian Kuhn · Yannic Maus · Jukka Suomela · Jara Uitto

Improved distributed degree splitting and edge coloring

DISC 2017 · 31st International Symposium on Distributed Computing, Vienna, Austria, October 2017 ·

Abstract

The degree splitting problem requires coloring the edges of a graph red or blue such that each node has almost the same number of edges in each color, up to a small additive discrepancy. The directed variant of the problem requires orienting the edges such that each node has almost the same number of incoming and outgoing edges, again up to a small additive discrepancy. We present deterministic distributed algorithms for both variants, which improve on their counterparts presented by Ghaffari and Su [SODA'17]: our algorithms are significantly simpler and faster, and have a much smaller discrepancy. This also leads to a faster and simpler deterministic algorithm for $(2+o(1))\Delta$-edge-coloring, improving on that of Ghaffari and Su.

Publication

Andréa W. Richa (Ed.): 31st International Symposium on Distributed Computing (DISC 2017), volume 91 of Leibniz International Proceedings in Informatics (LIPIcs), pages 19:1–19:15, Schloss Dagstuhl–Leibniz-Zentrum für Informatik, 2017

ISBN 978-3-95977-053-8

This material is presented to ensure timely dissemination of scholarly and technical work. Copyright and all rights therein are retained by authors or by other copyright holders. All persons copying this information are expected to adhere to the terms and constraints invoked by each author’s copyright. In most cases, these works may not be reposted without the explicit permission of the copyright holder.


text:
💬 👋 We’re always here. Join our Discord to connect with other students 24/7, any time, night or day.Join Here!

# How close to -3 do we have to take $x$ so that$$\frac{1}{(x + 3)^4} > 10,000$$

## $$\frac{1}{(x+3)^{4}}>10,000 \Leftrightarrow(x+3)^{4}<\frac{1}{10,000} \Leftrightarrow|x+3|<\frac{1}{\sqrt[4]{10,000}} \Leftrightarrow|x-(-3)|<\frac{1}{10}$$

Limits

Derivatives

### Discussion

You must be signed in to discuss.
##### Heather Z.

Oregon State University

##### Kristen K.

University of Michigan - Ann Arbor

##### Samuel H.

University of Nottingham

Lectures

Join Bootcamp

### Video Transcript

this problem forty one of this tour calculus In addition, section two point four How close to negative three Do we have to take X so that one divided by the quantity X plus three to the fourth power is greater than ten thousand? First we'Ll solve this algebraic lee we'LL divide by ten thousand on about science while also multiplying by the quantity Extra story to thie fourth power They won't take the forth route on both sides Here we'LL have X plus three that quantity to the fourth to the one fourth power Right, So we're doing one fourth power to vote science so that we can cancel out forthe here on the left We should be really able to reduce system into one tent because ten to the fourth power is ten thousand on the red side. We want to assure that this quantity as illustrious positive So we write it as the absolute value of X mystery. This specifically is the distance between value's X and negative three. And when we see that it must be values Liston one ten toe or point one And so that's how close we have to be and we can also do this graphically. Take this function one over the quantity X plus three to the fourth power and plotted against ten thousand to see where this across the function. And we see in this case that our heartbreak solution is correct within a point one anything less guarantees a value greater than ten thousand on exactly as zero point one is where I won't get the exact value of ten thousand. So the answer is that we have to be closer than zero point one in order for the statement to be true.

#### Topics

Limits

Derivatives

##### Heather Z.

Oregon State University

##### Kristen K.

University of Michigan - Ann Arbor

##### Samuel H.

University of Nottingham

Lectures

Join Bootcamp


text:
### Ab Surd Ity

Find the value of sqrt(2+sqrt3)-sqrt(2-sqrt3)and then of cuberoot(2+sqrt5)+cuberoot(2-sqrt5).

### Absurdity Again

What is the value of the integers a and b where sqrt(8-4sqrt3) = sqrt a - sqrt b?

### Em'power'ed

Find the smallest numbers a, b, and c such that: a^2 = 2b^3 = 3c^5 What can you say about other solutions to this problem?

# Bina-ring

##### Age 16 to 18 Challenge Level:

The set of numbers of the form $a + b\sqrt 2$ where $a$ and $b$ are integers form a mathematical structure called a ring . It is easy to show that $R$ is closed for addition, that 0 belongs to $R$ and is the additive identity and that every number in $R$ has an additive inverse which is in $R$. Also addition of numbers in $R$ is associative so this is an additive group .

Again it is easy show that $R$ is closed for multiplication, that 1 belongs to $R$ and is the multiplicative identity and that multiplication of numbers in $R$ is associative. However it is also easy to find a counter example to show that not every number in $R$ has a multiplicative inverse which is in $R$
(Try this for youself, for example look for an inverse for $(2 + 3\sqrt 2)$ and you will find that it would have to be $({-1\over 7} + {3\sqrt 2\over 14})$ but this number is not in $R$. NB. $R$ is the set of numbers $a + b\sqrt 2$ where $a$ and $b$ are integers ).

So we can add, subtract and multiply these numbers. If $u, v$ and $w$ are in the set $R$ it is easy to show that the distributive property holds: $u(v + w) = uv + uw$. So we have some of the same structure as the arithmetic of real numbers but without division. This structure is called a ring .


text:
# Can I use the method-of-moments estimator to get the adjustment factor for a generic transformation of the regressand?

When the regressand is in logarithmic form, the model looks like this:

$$log(y)=X\beta+u$$

When we are ultimately interested in predicting $y$, we cannot simply use $exp(X_0\hat\beta)$ as a predictor. Rather, we have to solve the following expression:

\begin{align} E(y|X) &= E(exp(X\beta+u)|X) \\ &=E(exp(X\beta)*exp(u)|X) \\ &=exp(X\hat\beta)*E(exp(u)|X) \end{align}

Thus, all we need is an estimator for $E(exp(u)|X)$. There are two ways of going about it:

• If $u$ is normally distributed, $exp(u)$ will follow a log normal distribution. We know that the mean of a log normal distribution is $exp(\mu+\sigma^2/2)$. In our case, we know that $E(u)=0$ because the model includes an intercept, hence $\mu=0$. Thus, we can use $exp(\hat\sigma^2/2)$ as an estimator for $E(exp(u)|X)$.
• If $u$ is not normally distributed, the following method-of-moments estimator for $E(exp(u)|X)$ will be consistent: $n^{-1}\sum{exp(\hat u_i)}$.

See Wooldridge's "Introductory Econometrics: A Modern Approach", 5th edition, p. 212-215 for more details on the above.

My question is: can I use the method-of-moments estimator for generic transformations of the regressand?

In my specific case, $y$ represents stock market returns over a multi-year horizon: $y=p_{t+w}/p_t$. As before, the model looks like this:

$$log(y)=X\beta+u$$

However, I am ultimately interested in predicting annualized returns. Thus, I try to solve the following expression:

\begin{align} E(y^{1/w}-1|X) &= E(y^{1/w}|X)-1 \\ &=E(exp(X\beta+u)^{1/w}|X)-1 \\ &=E((e^{X\beta+u})^{1/w}|X)-1 \\ &=E(e^{(X\beta+u)*1/w}|X)-1 \\ &=E(exp(1/w*X\beta+1/w*u)|X)-1 \\ &=exp(X\hat\beta/w)*E(exp(u/w)|X)-1 \end{align}

Thus, all we need is an estimator for $E(exp(u/w)|X)$. Remember, $w$ is simply the number of years over which the returns ($y$) are measured, i.e. a constant.

Will the following method-of-moments estimator for $E(exp(u/w)|X)$ be consistent?

$$\hat\alpha=n^{-1}\sum{exp(\hat{u_i}/w)}$$


text:
# Using SysTick_Handler in mbed LPC1768 project

I'm trying to use SysTick_Handler in a project which uses the mbed libraries and RTOS, however on compilation, the following error is returned: Error: Symbol SysTick_Handler multiply defined (by ../../build/mbed-os/rtos/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_ARM/TARGET_M3/irq_cm3.LPC1768.o and ../../build/main.LPC1768.o).

This leads me to believe that SysTick_Handler is used somewhere in the mbed library. Does this mean I cannot use it, and I have to resort to using the LPC1768s Timers?

The other definition appears to be in irq_cm3.0

Boiled down version of code:

#include "mbed.h"
#include "EthernetInterface.h"

extern "C" void SysTick_Handler()
{

}

// Socket demo
int main()
{
SysTick_Config(SystemCoreClock / 1000);

}

• The compiler should tell you exactly where the two definitions occur...in which files. Look at the entire error message. You also need to show us your code. – Elliot Alderson Apr 4 '19 at 18:54
• It seems likely to me that the mbed libraries will provide you with a callback/hook to allow you to link your own handler to the existing one. – brhans Apr 4 '19 at 18:58
• @ElliotAlderson, please see updated question. – 19172281 Apr 4 '19 at 19:02
• Looks like you need to either put your code in the existing function, call your code from the existing function, or remove that and substitute your own. Any of these may break compatibility with future MBED versions so you'll need to do something like use a version control system to keep careful track of what changes you make on top of the upstream. That said, it's not entirely convincing that you have found the code in use; one would expect a counter to be incremented and likely some pumping of the RTOS scheduler, unless it is operating off a different timer. – Chris Stratton Apr 4 '19 at 19:08
• For the record, it is the linker which would notice multiple definition, not the compiler. – Chris Stratton Apr 4 '19 at 19:09

As said in the comments, the SysTick timer is indeed in use by the RTOS and you should not muck with this. Use the Ticker class if you need to tick regularly, it will drive the underlying high-precision timer on the platform (and is portable code). An additional benefit is that multiple Tickers can be created and they'll all use the same hardware timer.
void tick() {


text:
# All The Digits - 2

Number Theory Level pending

$$A x + B = C$$
$$D y - E = F$$

If $$A, B, C, D, E$$ and $$F$$ are distinct positive digits such that we have integer solutions to the above system of equations, what is the largest possible value of $$x + y$$?

×