text:
# Math Help - Factoring

1. ## Factoring

im taking an online class and i just wanted to check my answers with someone...

1. (21x to the fifth - 14x to the fourth - 35xsquared) =
7xsquared (3x to the third - 2xsquared - 5)

is that all? or is there more to the answer??

2. (q squared +6q +9) =
(q+3)(q+3)

3. (t squared - 16t +64)=
(t-8) squared

and i have more...

2. Looks good to me, but another thing you can do with #2, is turn $(q+3)(q+3)\rightarrow(q+3)^2$, to be consistent with your #3 answer if you want; but your answers look perfectly fine to me!

3. Thanks :]

1. (x squared -x -20) =0
x=5,-4

2. 2x squared = 7x +15
x= -3/2, 5

3. (2x +1) (x+3) = 42
x= -13/2, 3

4. (x) (x-5) = 66
x= 11, -6

4. 1. (x squared -x -20) =0
x=5,-4
\begin{aligned}
x^2 - x - 20 &= 0 \\
(x - 5)(x + 4) &= 0 \\
x &= 5 \\
x &= -4
\end{aligned}

Correct!

2. 2x squared = 7x +15
x= -3/2, 5
\begin{aligned}
2x^2 = 7x + 15 \\
2x^2 - 7x - 15 &= 0 \\
(2x + 3)(x - 5) &= 0 \\
x &= -3/2 \\
x &= 5
\end{aligned}

Correct!

3. (2x +1) (x+3) = 42
x= -13/2, 3
\begin{aligned}
(2x +1) (x+3) &= 42 \\
2x^2 + 7x + 3 &= 42 \\
2x^2 + 7x - 39 &= 0 \\
(2x^2 + 13)(x - 3) &= 0 \\
x &= -13/2 \\
x &= 3
\end{aligned}

Correct!

4. (x) (x-5) = 66
x= 11, -6
\begin{aligned}
x(x - 5) &= 66 \\
x^2 - 5x &= 66 \\
x^2 - 5x - 66 &= 0 \\
(x - 11)(x + 6) &= 0 \\
x &= 11 \\
x &= -6
\end{aligned}

Correct!

01


text:
# Does the compactified Torelli map extend to a proper map of stacks?

Let $$M_g^{ct}$$ denote the moduli stack of compact type genus $$g$$ stable curves and $$A_g$$ the moduli stack of principally polarized $$g$$-dimensional abelian varieties.

Can someone provide a reference for the fact that the Torelli map extends to a map $$M_g^{ct} \to A_g$$ which is proper?

Here are some comments: This is stated, for example, in Section 1.3 of "The Torelli locus and special subvarieties" by Ben Moonen and Frans Oort. I believe I have found a reference, but am not completely certain if I'm interpreting things correctly. In "Compactified Jacobians and the Torelli Map" by Alexeev http://alpha.math.uga.edu/~valery/preprints/cjtm.pdf Corollary 5.4, it is stated that there are compactifications $$\overline{M}_g$$ and $$\overline{A}_g$$ such that the Torelli map extends to a map of their coarse spaces. I believe the constructed map actually defines a map on stacks (and not just coarse spaces) which would imply the map $$M_g^{ct} \to A_g$$ (which is the restriction of $$\overline{M}_g \to \overline{A}_g$$) is also proper. So it would be enough to answer the following question affirmatively: Is it correct that the map in Corollary 5.4 is actually coming from a map of stacks and not just a map of coarse spaces?

• It should be easy to prove properness using the valuative criterion (for stacks): A curve over a dvr has semi-stable reduction after a base change and then it is easy to see that the special fibre is of compact type iff the Jacobian has good reduction. – ulrich Aug 9 at 4:22
• Thanks! Do you know why there is a map at all? Given the universal family of curves $C \to M_g^{ct}$, we can form $J := Pic^0_{C/M_g^{ct}}$, and we want to construct a polarization on J. So, we want a symmetric map $\phi: J \to \hat{J}$ with $(1, \phi)^* P_J$ ample, for $P_J$ the Poincare bundle on $J \times \hat{J}$. We have a polarization over $M_g \subset M_g^{ct}$ and Martin Olsson explained to me how to extend the isomorphism to $M_g^{ct}$ using finiteness of the components of Hom(J, J^t) via rigidity, Weil's extension theorem, and normality of $M_g^{ct}$. But how do you check ampleness? – Aaron Landesman Aug 9 at 4:52
• The Jacobian of a curve of compact type is the product of the Jacobians of the components, and the polarization is the product of the polarizations. This makes ampleness clear, I think. – Angelo Aug 9 at 8:00
• Ah, thanks so much; the above comments answer the question! What was confusing me about ampleness is that the extension from my previous comment was non-explicit. But I guess you can just explicitly check that effective degree g-1 line bundles in Pic^{g-1} parameterize a relative flat divisor, for example by checking it over DVRs, so it must be the one I was defining. I'm still curious to know whether Alexeev's result mentioned in the question applies to stacks, but I suppose that's more of a curiosity for the purpose of the original question. – Aaron Landesman Aug 10 at 3:22

format: plain


text:
# All Questions

546 views

### Check the validity of a rsa key pair with only the public key? [duplicate]

I am currently developing a messaging application that uses rsa end to end encryption. The client generates permanent rsa keys, and sends the public key to my server for account management. As it ...
76 views

### If $G'(s)=G(s0^{|s|})$ and $G$ is a PRNG, is $G'$ necessarily a PRNG? [closed]

I argue it is because there should be no more correlation between the outputs $G(s0^{|s|})$ than between the outputs $G(s)$. Thus we can say the $G'(s)$ is a PRNG that satisfies $|G'(s)| \geq 4|s|$. ...
113 views

### Which data to share in CTR mode?

Suppose I've got two clients $A$ and $B$. Client $A$ encrypts data in CTR (Counter) mode to get a ciphertext. What information will client $B$ have to receive from $A$ to decrypt the ciphertext? Just ...
133 views

### Need Help Reversing my Encryption Algorithm [closed]

So I wrote a simple encryption algorithm (Not very secure, just a starting point. I don't want criticism on it.) and I have been having trouble finding a way to decrypt the text. The algorithm is here ...
210 views

### File Encryption (EFS method)

I'm implementing (for learning purposes) a file encryptor, which uses the following method (from http://en.wikipedia.org/wiki/Encrypting_File_System). I have 3 kind of keys: RSA public/private, AES ...
255 views

### Derive both MAC and AES keys from same PBKDF2?

When doing password-based encryption, is it OK to create one instance of PBKDF2 from the password, and then use it to create both the AES key and the MAC key? (Or should a new instance of PBKDF2 be ...
15k views

### Where i can find an AES implementation in python?

Where i can find a "reviewed" version of AES implementation in python. Not an API like PyCrypto whereby you can call AES algorithms in a single line.
135 views

### Determine the iteration times using Pollard's rho Method for factoring

Let's say, we have a large number $n=181937053$ and $f(x)=x^2+1$. And also we know that $n=12391 \times 14683$. The problem is that ,using Pollard rho method, can we find the algorithm iteration ...
2k views

### How to calculate the time it'll take to crack RSA or DH?

Sometimes the easiest way to describe security of a type of cryptography is to say that "the time it takes to solve for an x-bit key would be y years". How would one go about doing such a calculation ...
1k views

### Why Elliptic curve cryptography are not popular in practice

RSA and ElGamal can be implemented using the technique of Elliptic curves. I am confused on why the it seems that Elliptic curves are not so popular in cryptographic applications since they provide ...
711 views

### Z*p Generator (Cyclic Group) in java

I am trying to implement ElGamal in java without using the in-built libraries. The problem occurs when I am trying to find the generators of the number(in this case 11). Everything works perfectly ...
910 views

### ElGamal signature without calculating the inverse

I stumbled upon this question in some textbook. Propose a variant of ElGamal signature scheme such that there is no need to calculate the inverse $k^{-1}$ as it is usually done using the EEA. ...
321 views

### ElGamal signature - exploiting fallacious implementation

This question is related to ElGamal signature scheme as defined here ElGamal signature without calculating the inverse Show how one could exploit an implementation ElGamal signature scheme in which ...
402 views

### Mapping between subgroups and the integers

This question is a companion to the equivalent question on elliptic curves. Preliminaries Diffie-Hellman, Elgamal, DSA, etc. are examples of protocols that work in the integers modulus a large prime ...
495 views

### ElGamal message signatures retrieving the secret value x

If the GCD(r, p-1) is small and the value k is used to sign a message using ElGamal is also small. Then the secret value of x can be determined. Why is this true? How would one retrieve x?


text:
# How do you multiply  (-1+2i)(3+2i)  in trigonometric form?

Dec 30, 2017

$- 7 + 4 \iota$

#### Explanation:

$\iota = \sqrt{- 1}$
So, ${\iota}^{2} = - 1$

$\left(- 1 + 2 \iota\right) \left(3 + 2 \iota\right)$

$- 3 - 2 \iota + 6 \iota - 4$

$- 7 + 4 \iota$

Simply multiply as we generally multiply polynomial by polynomial provided the rules of complex must in mind just like ${\iota}^{2} = - 1$.


text:
The Nearsighted Cow Problem: A Calculus Classic.

A rectangular billboard 6 feet in height stands in a field so that its bottom is 10 feet above the ground. A nearsighted cow with eye level at 4 feet above the ground stands $x$ feet from the billboard. Express $\theta$, the vertical angle subtended by the billboard at her eye, in terms of $x$. Then find the distance $x_{0}$ the cow must stand from the billboard to maximize $\theta$.

$\theta(x)$ = $\theta$ is maximized when $x_{0}$ =

( Click on image for a larger view )


text:
## Modern errata done right: a git merge request

June 7, 2019 Uncategorized No comments , ,

All the sources for my book, Geometric Algebra for Electrical Engineers, are available on github.  Theoretically, that means that instead of sending me an email when errors are found (and I’m sure there are many), you can simply fork the repo, fix the error to your satisfaction, and submit a merge request.  I didn’t expect that to actually happen, but it did:

Tim Put gets the credit for the first direct non-Peeter contribution to the GAelectrodynamics repository.

## Thoughts about Ayn Rand’s Anthem

May 26, 2019 Uncategorized No comments , , ,

Many libertarian podcasts talk about Ayn Rand positively, sometimes even lovingly.  On the other hand, Rand seems to invoke the worst venom and hate from some on the left.

I found the book Anthem, by Rand, at the local recycling depot, which has a community take a book, leave a book bookshelf.  That presented an opportunity to see for my self what the Rand fuss was about.

It turned out that Anthem is a really tiny book, more of a pamphlet than a book.  The copy that I now have is a two in one, with the 2nd edition at the front half of the book, and Rand’s marked up version of her first edition at the back.

The book has a very 1984 like spirit, set in a dystopian alternate (presumed future) reality, where collectivism has been taken to the extreme.  Sexual distinctions have been eliminated, men and women aren’t allowed to be attracted to each other, outside of a proscribed annual mating ritual, kids are taken away from parents at an early age and raised by the state, and most of the knowledge of the past has been obliterated.

An amusing aspect of the book is that gender specific pronouns have been eliminated, as have all personal pronouns.  This is amusing given the current trend towards exactly that in our modern time, where there is an annoying trend to use words like “they” used instead of he/she.  I found “they” for he or she annoying because I happen to think there is value distinguishing between singular and plural.

The focus of the book is to highlight the evil of collectivism.  It’s therefore no surprise why Rand is hated so thoroughly by the left.  There wasn’t much more in this book that I’d imagine would be objectionable, other than the fact that it shows what communism might look like in the extreme.  That might make it unappealing to those that insist “communism works in theory” despite the fact that communism obliterated millions of their own people last century.

There is bit of a revolutionary bent to the story as well.  At the end, once our protagonist has discovered himself, he plans to educate a selection of potential compatriots and establish a little cell against the system.

As I read this book, I realized a little bit in that I’d read it already eons ago. I’m wondering if I read this in some sort of dystopian or sci-fi collection.  I think that I read it without any idea of who Ayn Rand was, so in retrospect, I didn’t even know that I’d read anything by her.

I enjoyed the discovery aspect of this book. There’s been many a sci-fi book that I’ve read that had a dystopian context where the characters are in the situation of having to rediscover the mysteries of the previous civilization. It’s fun to imagine oneself in such a context, knowing how much there is to learn, and the idea of being able to share everything that you discover.

## Electromagnetic theory notes

February 19, 2019 Uncategorized No comments

I’ve posted a minor update (tweaking some of the figures) of my PDF notes from electromagnetic theory (ECE1228H), such as they are.  You can also find links to Mathematica notebooks, and instructions for cloning the git repositories to build the PDF.

Despite my love of the subject, this course was mediocre, and I’d rate my notes for it the same way.

## Small update to old notes for phy450, Relativistic Electrodynamics

February 9, 2019 Uncategorized No comments

I’ve updated the pdf for my old phy450 notes (Relativistic Electrodynamics) from the current latex sources.  Also included on that page are a contents listing, and instructions for forking the git repos.  That should allow for building the pdf from the latex, so if somebody had changes they’d like to make, either for themselves or as feedback, they should be able to do so.

## PHY2403H Quantum Field Theory. Lecture 15: Perturbation ground state, time evolution operator, time ordered product, interaction. Taught by Prof. Erich Poppitz

[Click here for a PDF of this post with nicer formatting]

### DISCLAIMER: Very rough notes from class, with some additional side notes.

These are notes for the UofT course PHY2403H, Quantum Field Theory, taught by Prof. Erich Poppitz, fall 2018.

## Review

We developed the interaction picture representation, which is really the Heisenberg picture with respect to $$H_0$$.

Recall that we found
\label{eqn:qftLecture15:20}
U(t, t’) = e^{i H_0(t – t_0)} e^{-i H(t – t’)} e^{-i H_0(t’ – t_0)},

with solution
\label{eqn:qftLecture15:200}
U(t, t’)
=
T \exp{\lr{ -i \int_{t’}^t H_{\text{I,int}}(t”) dt”}},

\label{eqn:qftLecture15:220}
\begin{aligned}
U(t, t’)^\dagger
&=
T \exp{\lr{ i \int_{t’}^{t} H_{\text{I,int}}(t”) dt”}} \\
&=
T \exp{\lr{ -i \int_{t}^{t’} H_{\text{I,int}}(t”) dt”}} \\
&= U(t’, t),
\end{aligned}

and can use this to calculate the time evolution of a field
\label{eqn:qftLecture15:40}
\phi(\Bx, t)
=
U^\dagger(t, t_0)
\phi_I(\Bx, t)
U(t, t_0)

and found the ground state ket for $$H$$ was
\label{eqn:qftLecture15:60}
\ket{\Omega}
=
\evalbar{
\frac{ U(t_0, -T) \ket{0} }
{
e^{-i E_0(T – t_0)} \braket{\Omega}{0}
}
}{T \rightarrow \infty(1 – i \epsilon)}.

### Question:

What’s the point of this, since it is self referential?

### Answer:

We will see, and also see that it goes away. Alternatively, you can write it as
\begin{equation*}
\ket{\Omega} \braket{\Omega}{0}
=
\evalbar{
\frac{ U(t_0, -T) \ket{0} }
{
e^{-i E_0(T – t_0)}
}
}{T \rightarrow \infty(1 – i \epsilon)}.
\end{equation*}

We can also show that
\label{eqn:qftLecture15:80}
\bra{\Omega}
=
\evalbar{
\frac{ \bra{0} U(T, t_0) }
{
e^{-i E_0(T – t_0)} \braket{0}{\Omega}
}
}{T \rightarrow \infty(1 – i \epsilon)}.

Our goal is still toe calculate
\label{eqn:qftLecture15:100}
\bra{\Omega} T \phi(x) \phi(y) \ket{\Omega}.

Claim: the “LSZ” theorem (a neat way of writing this) relates this to S matrix elements.

Assuming $$x^0 > y^0$$

\label{eqn:qftLecture15:120}
\bra{\Omega} \phi(x) \phi(y) \ket{\Omega}
=
\frac{
\bra{0}
U(T, t_0)
U^\dagger(x^0, t^0)
\phi_I(x)
U(x^0, t^0)
U^\dagger(y^0, t^0)
\phi_I(y)
U(y^0, t^0)
U(t_0, -T)
\ket{0}
}
{
e^{-i 2 E_0 T} \Abs{\braket{0}{\Omega}}^2
}

Normalize $$\braket{\Omega}{\Omega} = 1$$, gives

\label{eqn:qftLecture15:140}
\begin{aligned}
1
&=
\frac{\bra{0} U(T, t_0) U(t_0, -T) \ket{0}}
{
e^{-i 2 E_0 T} \Abs{\braket{0}{\Omega}}^2
} \\
&=
\frac{\bra{0} U(T, -T) \ket{0}}
{
e^{-i 2 E_0 T} \Abs{\braket{0}{\Omega}}^2
},
\end{aligned}

so that
\label{eqn:qftLecture15:240}
\bra{\Omega} \phi(x) \phi(y) \ket{\Omega}
=
\frac{
\bra{0}
U(T, t_0)
U^\dagger(x^0, t^0)
\phi_I(x)
U(x^0, t^0)
U^\dagger(y^0, t^0)
\phi_I(y)
U(y^0, t^0)
U(t_0, -T)
\ket{0}
}
{
\bra{0} U(T, -T) \ket{0}
}

For $$t_1 > t_2 > t_3$$
\label{eqn:qftLecture15:280}
\begin{aligned}
U(t_1, t_2) U(t_2, t_3)
&=
T e^{-i \int_{t_2}^{t_1} H_I}
T e^{-i \int_{t_3}^{t_2} H_I} \\
&=
T \lr{
e^{-i \int_{t_2}^{t_1} H_I}
e^{-i \int_{t_3}^{t_2} H_I}
} \\
&=
T(
e^{-i \int_{t_3}^{t_1} H_I}
),
\end{aligned}

with an end result of
\label{eqn:qftLecture15:320}
U(t_1, t_2) U(t_2, t_3) = U(t_1, t_3).

(DIY: work through the details — this is a problem in [1])

This gives
\label{eqn:qftLecture15:300}
\bra{\Omega} \phi(x) \phi(y) \ket{\Omega}
=
\frac{
\bra{0}
U(T, x^0)
\phi_I(x)
U(x^0, y^0)
\phi_I(y)
U(y^0, -T)
\ket{0}
}
{
\bra{0} U(T, -T) \ket{0}
}.

If $$y^0 > x^0$$ we have the same result, but the $$y$$’s will come first.

### Claim:

\label{eqn:qftLecture15:340}
\bra{\Omega} \phi(x) \phi(y) \ket{\Omega}
=
\frac{
\bra{0}
T\lr{
\phi_I(x)
\phi_I(y)
e^{-i \int_{-T}^T H_{\text{I,int}}(t’) dt’}
}
\ket{0}
}
{
\bra{0}
T ( e^{-i \int_{-T}^T H_{\text{I,int}}(t’) dt’} )
\ket{0}
}.

More generally
\label{eqn:qftLecture15:360}
\boxed{
\bra{\Omega}
\phi_I(x_1) \cdots
\phi_I(x_n)
\ket{\Omega}
=
\frac{
\bra{0}
T\lr{
\phi_I(x_1) \cdots
\phi_I(x_n)
e^{-i \int_{-T}^T H_{\text{I,int}}(t’) dt’}
}
\ket{0}
}
{
\bra{0}
T ( e^{-i \int_{-T}^T H_{\text{I,int}}(t’) dt’} )
\ket{0}
}.
}

This is the holy grail of perturbation theory.

In QFT II you will see this written in a path integral representation
\label{eqn:qftLecture15:380}
\bra{\Omega}
\phi_I(x_1) \cdots
\phi_I(x_n)
\ket{\Omega}
=
\frac
{
\int [\mathcal{D} \phi] \phi(x_1) \phi(x_2) \cdots \phi(x_n) e^{-i S[\phi]}
}
{
\int [\mathcal{D} \phi] e^{-i S[\phi]}
}.

## Unpacking it.

\label{eqn:qftLecture15:400}
\begin{aligned}
\int_{-T}^T H_{\text{I,int}}(t)
&=
\int_{-T}^T
\int d^3 \Bx \frac{\lambda}{4} \lr{ \phi_I(\Bx, t) }^4 \\
&=
\int d^4 x
\frac{\lambda}{4} \lr{ \phi_I }^4
\end{aligned}

so we have
\label{eqn:qftLecture15:420}
\frac{
\bra{0}
T\lr{
\phi_I(x_1) \cdots
\phi_I(x_n)
e^{-i \frac{\lambda}{4} \int d^4 x \phi_I^4(x) }
}
\ket{0}
}
{
\bra{0}
T
e^{-i \frac{\lambda}{4} \int d^4 x \phi_I^4(x) }
\ket{0}
}.

The numerator expands as
\label{eqn:qftLecture15:440}
\bra{0} T\lr{ \phi_I(x_1) \cdots \phi_I(x_n) } \ket{0}
-i \frac{\lambda}{4} \int d^4 x
\bra{0} T\lr{ \phi_I(x_1) \cdots \phi_I(x_n) \phi_I^4(x) }
+
\inv{2}
\lr{-i \frac{\lambda}{4}}^2 \int d^4 x d^4 y
\bra{0} T\lr{ \phi_I(x_1) \cdots \phi_I(x_n)
\phi_I^4(x)
\phi_I^4(y)
} \ket{0}
+ \cdots

so we see that the problem ends up being the calculation of time ordered products.

## Calculating perturbation

Let’s simplify notation, dropping interaction picture suffixes, writing $$\phi(x_i) = \phi_i$$.

Let’s calculate $$\bra{0} T\lr{ \phi_1 \cdots \phi_n } \ket{0}$$. For $$n = 2$$ we have

\label{eqn:qftLecture15:n}
\bra{0} T\lr{ \phi_1 \cdots \phi_n } \ket{0}
= D_F(x_1 – x_2) \equiv D_F(1-2)

### TO BE CONTINUED.

The rest of the lecture was very visual, and hard to type up. I’ll do so later.

# References

[1] Michael E Peskin and Daniel V Schroeder. An introduction to Quantum Field Theory. Westview, 1995.

## ECE1505H Convex Optimization. Lecture 7: Examples of convex and concave functions, local and global minimums. Taught by Prof. Stark Draper

[Click here for a PDF of this post with nicer formatting]

### Disclaimer

Peeter’s lecture notes from class. These may be incoherent and rough.

These are notes for the UofT course ECE1505H, Convex Optimization, taught by Prof. Stark Draper, from [1].

### Today

• Local and global optimality
• Compositions of functions
• Examples

### Example:

\label{eqn:convexOptimizationLecture7:20}
\begin{aligned}
F(x) &= x^2 \\
F”(x) &= 2 > 0
\end{aligned}

strictly convex.

### Example:

\label{eqn:convexOptimizationLecture7:40}
\begin{aligned}
F(x) &= x^3 \\
F”(x) &= 6 x.
\end{aligned}

Not always non-negative, so not convex. However $$x^3$$ is convex on $$\textrm{dom} F = \mathbb{R}_{+}$$.

### Example:

\label{eqn:convexOptimizationLecture7:60}
\begin{aligned}
F(x) &= x^\alpha \\
F'(x) &= \alpha x^{\alpha-1} \\
F”(x) &= \alpha(\alpha-1) x^{\alpha-2}.
\end{aligned}

fig. 1. Powers of x.

This is convex on $$\mathbb{R}_{+}$$, if $$\alpha \ge 1$$, or $$\alpha \le 0$$.

### Example:

\label{eqn:convexOptimizationLecture7:80}
\begin{aligned}
F(x) &= \log x \\
F'(x) &= \inv{x} \\
F”(x) &= -\inv{x^2} \le 0
\end{aligned}

This is concave.

### Example:

\label{eqn:convexOptimizationLecture7:100}
\begin{aligned}
F(x) &= x\log x \\
F'(x) &= \log x + x \inv{x} = 1 + \log x \\
F”(x) &= \inv{x}
\end{aligned}

This is strictly convex on
$$\mathbb{R}_{++}$$, where
$$F”(x) \ge 0$$.

### Example:

\label{eqn:convexOptimizationLecture7:120}
\begin{aligned}
F(x) &= e^{\alpha x} \\
F'(x) &= \alpha e^{\alpha x} \\
F”(x) &= \alpha^2 e^{\alpha x} \ge 0
\end{aligned}

fig. 2. Exponential.

Such functions are plotted in fig. 2, and are convex function for all $$\alpha$$.

### Example:

For symmetric $$P \in S^n$$

\label{eqn:convexOptimizationLecture7:140}
\begin{aligned}
F(\Bx) &= \Bx^\T P \Bx + 2 \Bq^\T \Bx + r \\
\spacegrad F &= (P + P^\T) \Bx + 2 \Bq = 2 P \Bx + 2 \Bq \\
\spacegrad^2 F &= 2 P.
\end{aligned}

This is convex(concave) if $$P \ge 0$$ ($$P \le 0$$).

### Example:

A quadratic function

\label{eqn:convexOptimizationLecture7:780}
F(x, y) = x^2 + y^2 + 3 x y,

that is neither convex nor concave is plotted in fig 3.

fig 3. Function with saddle point (3d and contours)

This function can be put in matrix form

\label{eqn:convexOptimizationLecture7:160}
F(x, y) = x^2 + y^2 + 3 x y
=
\begin{bmatrix}
x & y
\end{bmatrix}
\begin{bmatrix}
1 & 1.5 \\
1.5 & 1
\end{bmatrix}
\begin{bmatrix}
x \\
y
\end{bmatrix},

and has the Hessian

\label{eqn:convexOptimizationLecture7:180}
\begin{aligned}
\spacegrad^2 F
&=
\begin{bmatrix}
\partial_{xx} F & \partial_{xy} F \\
\partial_{yx} F & \partial_{yy} F \\
\end{bmatrix} \\
&=
\begin{bmatrix}
2 & 3 \\
3 & 2
\end{bmatrix} \\
&= 2 P.
\end{aligned}

From the plot we know that this is not PSD, but this can be confirmed by checking the eigenvalues

\label{eqn:convexOptimizationLecture7:200}
\begin{aligned}
0
&=
\det ( P – \lambda I ) \\
&=
(1 – \lambda)^2 – 1.5^2,
\end{aligned}

which has solutions

\label{eqn:convexOptimizationLecture7:220}
\lambda = 1 \pm \frac{3}{2} = \frac{3}{2}, -\frac{1}{2}.

This is not PSD nor negative semi-definite, because it has one positive and one negative eigenvalues. This is neither convex nor concave.

Along $$y = -x$$,

\label{eqn:convexOptimizationLecture7:240}
\begin{aligned}
F(x,y)
&=
F(x,-x) \\
&=
2 x^2 – 3 x^2 \\
&=
– x^2,
\end{aligned}

so it is concave along this line. Along $$y = x$$

\label{eqn:convexOptimizationLecture7:260}
\begin{aligned}
F(x,y)
&=
F(x,x) \\
&=
2 x^2 + 3 x^2 \\
&=
5 x^2,
\end{aligned}

so it is convex along this line.

### Example:

\label{eqn:convexOptimizationLecture7:280}
F(\Bx) = \sqrt{ x_1 x_2 },

on $$\textrm{dom} F = \setlr{ x_1 \ge 0, x_2 \ge 0 }$$

For the Hessian
\label{eqn:convexOptimizationLecture7:300}
\begin{aligned}
\PD{x_1}{F} &= \frac{1}{2} x_1^{-1/2} x_2^{1/2} \\
\PD{x_2}{F} &= \frac{1}{2} x_2^{-1/2} x_1^{1/2}
\end{aligned}

The Hessian components are

\label{eqn:convexOptimizationLecture7:320}
\begin{aligned}
\PD{x_1}{} \PD{x_1}{F} &= -\frac{1}{4} x_1^{-3/2} x_2^{1/2} \\
\PD{x_1}{} \PD{x_2}{F} &= \frac{1}{4} x_2^{-1/2} x_1^{-1/2} \\
\PD{x_2}{} \PD{x_1}{F} &= \frac{1}{4} x_1^{-1/2} x_2^{-1/2} \\
\PD{x_2}{} \PD{x_2}{F} &= -\frac{1}{4} x_2^{-3/2} x_1^{1/2}
\end{aligned}

or
\label{eqn:convexOptimizationLecture7:340}
\spacegrad^2 F
=
-\frac{\sqrt{x_1 x_2}}{4}
\begin{bmatrix}
\inv{x_1^2} & -\inv{x_1 x_2} \\
-\inv{x_1 x_2} & \inv{x_2^2}
\end{bmatrix}.

Checking this for PSD against $$\Bv = (v_1, v_2)$$, we have
\label{eqn:convexOptimizationLecture7:360}
\begin{aligned}
\begin{bmatrix}
v_1 & v_2
\end{bmatrix}
\begin{bmatrix}
\inv{x_1^2} & -\inv{x_1 x_2} \\
-\inv{x_1 x_2} & \inv{x_2^2}
\end{bmatrix}
\begin{bmatrix}
v_1 \\ v_2
\end{bmatrix}
&=
\begin{bmatrix}
v_1 & v_2
\end{bmatrix}
\begin{bmatrix}
\inv{x_1^2} v_1 -\inv{x_1 x_2} v_2 \\
-\inv{x_1 x_2} v_1 + \inv{x_2^2} v_2
\end{bmatrix} \\
&=
\lr{ \inv{x_1^2} v_1 -\inv{x_1 x_2} v_2 } v_1 +
\lr{ -\inv{x_1 x_2} v_1 + \inv{x_2^2} v_2 } v_2
\\
&=
\inv{x_1^2} v_1^2
+ \inv{x_2^2} v_2^2
-2 \inv{x_1 x_2} v_1 v_2 \\
&=
\lr{
\frac{v_1}{x_1}
-\frac{v_2}{x_2}
}^2 \\
&\ge 0,
\end{aligned}

so $$\spacegrad^2 F \le 0$$. This is a negative semi-definite function (concave). Observe that this check required checking PSD for all values of $$\Bx$$.

This is an example of a more general result

\label{eqn:convexOptimizationLecture7:380}
F(x) = \lr{ \prod_{i = 1}^n x_i }^{1/n},

which is concave (prove on homework).

### Summary.

If $$F$$ is differentiable in \R{n}, then check the curvature of the function along all lines. i.e. At all locations and in all directions.

If the Hessian is PSD at all $$\Bx \in \textrm{dom} F$$, that is

\label{eqn:convexOptimizationLecture7:400}
\spacegrad^2 F \ge 0 \, \forall \Bx \in \textrm{dom} F,

then the function is convex.

### Example:

Over $$\textrm{dom} F = \mathbb{R}^n$$

\label{eqn:convexOptimizationLecture7:420}
F(\Bx) = \max_{i = 1}^n x_i

i.e.
\label{eqn:convexOptimizationLecture7:440}
\begin{aligned}
F((1,2) &= 2 \\
F((3,-1) &= 3
\end{aligned}

### Example:

\label{eqn:convexOptimizationLecture7:460}
F(\Bx) = \max_{i = 1}^n F_i(\Bx),

where

\label{eqn:convexOptimizationLecture7:480}
F_i(\Bx)
=
… ?

max of a set of convex functions is a convex function.

### Example:

\label{eqn:convexOptimizationLecture7:500}
F(x) =
x_{[1]} +
x_{[2]} +
x_{[3]}

where

$$x_{[k]}$$ is the k-th largest number in the list

Write

\label{eqn:convexOptimizationLecture7:520}
F(x) = \max x_i + x_j + x_k

\label{eqn:convexOptimizationLecture7:540}
(i,j,k) \in \binom{n}{3}

### Example:

For $$\Ba \in \mathbb{R}^n$$ and $$b_i \in \mathbb{R}$$

\label{eqn:convexOptimizationLecture7:560}
\begin{aligned}
F(\Bx)
&= \sum_{i = 1}^n \log( b_i – \Ba^\T \Bx )^{-1} \\
&= -\sum_{i = 1}^n \log( b_i – \Ba^\T \Bx )
\end{aligned}

This $$b_i – \Ba^\T \Bx$$ is an affine function of $$\Bx$$ so it doesn’t affect convexity.

Since $$\log$$ is concave, $$-\log$$ is convex. Convex functions of affine function of $$\Bx$$ is convex function of $$\Bx$$.

### Example:

\label{eqn:convexOptimizationLecture7:580}
F(\Bx) = \sup_{\By \in C} \Norm{ \Bx – \By }

fig. 3. Max length function

Here $$C \subseteq \mathbb{R}^n$$ is not necessarily convex. We are using $$\sup$$ here because the set $$C$$ may be open. This function is the length of the line from $$\Bx$$ to the point in $$C$$ that is furthest from $$\Bx$$.

• $$\Bx – \By$$ is linear in $$\Bx$$
• $$g_\By(\Bx) = \Norm{\Bx – \By}$$ is convex in $$\Bx$$ since norms are convex functions.
• $$F(\Bx) = \sup_{\By \in C} \Norm{ \Bx – \By }$$. Each $$\By$$ index is a convex function. Taking max of those.

### Example:

\label{eqn:convexOptimizationLecture7:600}
F(\Bx) = \inf_{\By \in C} \Norm{ \Bx – \By }.

Min and max of two convex functions are plotted in fig. 4.

fig. 4. Min and max

The max is observed to be convex, whereas the min is not necessarily so.

\label{eqn:convexOptimizationLecture7:800}
F(\Bz) = F(\theta \Bx + (1-\theta) \By) \ge \theta F(\Bx) + (1-\theta)F(\By).

This is not necessarily convex for all sets $$C \subseteq \mathbb{R}^n$$, because the $$\inf$$ of a bunch of convex function is not necessarily convex. However, if $$C$$ is convex, then $$F(\Bx)$$ is convex.

### Consequences of convexity for differentiable functions

• Think about unconstrained functions $$\textrm{dom} F = \mathbb{R}^n$$.
• By first order condition $$F$$ is convex iff the domain is convex and
\label{eqn:convexOptimizationLecture7:620}
F(\Bx) \ge \lr{ \spacegrad F(\Bx)}^\T (\By – \Bx) \, \forall \Bx, \By \in \textrm{dom} F.

If $$F$$ is convex and one can find an $$\Bx^\conj \in \textrm{dom} F$$ such that

\label{eqn:convexOptimizationLecture7:640}
\spacegrad F(\Bx^\conj) = 0,

then

\label{eqn:convexOptimizationLecture7:660}
F(\By) \ge F(\Bx^\conj) \, \forall \By \in \textrm{dom} F.

If you can find the point where the gradient is zero (which can’t always be found), then $$\Bx^\conj$$ is a global minimum of $$F$$.

Conversely, if $$\Bx^\conj$$ is a global minimizer of $$F$$, then $$\spacegrad F(\Bx^\conj) = 0$$ must hold. If that were not the case, then you would be able to find a direction to move downhill, contracting the optimality of $$\Bx^\conj$$.

### Local vs Global optimum

fig. 6. Global and local minimums

Definition: Local optimum
$$\Bx^\conj$$ is a local optimum of $$F$$ if $$\exists \epsilon > 0$$ such that $$\forall \Bx$$, $$\Norm{\Bx – \Bx^\conj} < \epsilon$$, we have

\begin{equation*}
F(\Bx^\conj) \le F(\Bx)
\end{equation*}

fig. 5. min length function

Theorem:
Suppose $$F$$ is twice continuously differentiable (not necessarily convex)

• If $$\Bx^\conj$$ is a local optimum then\begin{equation*}
\begin{aligned}
\spacegrad F(\Bx^\conj) &= 0 \\
\spacegrad^2 F(\Bx^\conj) \ge 0
\end{aligned}
\end{equation*}
• If
\begin{equation*}
\begin{aligned}
\spacegrad F(\Bx^\conj) &= 0 \\
\spacegrad^2 F(\Bx^\conj) \ge 0
\end{aligned},
\end{equation*}then $$\Bx^\conj$$ is a local optimum.

Proof:

• Let $$\Bx^\conj$$ be a local optimum. Pick any $$\Bv \in \mathbb{R}^n$$.\label{eqn:convexOptimizationLecture7:720}
\lim_{t \rightarrow 0} \frac{ F(\Bx^\conj + t \Bv) – F(\Bx^\conj)}{t}
= \lr{ \spacegrad F(\Bx^\conj) }^\T \Bv
\ge 0.

Here the fraction is $$\ge 0$$ since $$\Bx^\conj$$ is a local optimum.

Since the choice of $$\Bv$$ is arbitrary, the only case that you can ensure that $$\ge 0, \forall \Bv$$ is

\label{eqn:convexOptimizationLecture7:740}
\spacegrad F = 0,

( or else could pick $$\Bv = -\spacegrad F(\Bx^\conj)$$.

This means that $$\spacegrad F(\Bx^\conj) = 0$$ if $$\Bx^\conj$$ is a local optimum.

Consider the 2nd order derivative

\label{eqn:convexOptimizationLecture7:760}
\begin{aligned}
\lim_{t \rightarrow 0} \frac{ F(\Bx^\conj + t \Bv) – F(\Bx^\conj)}{t^2}
&=
\lim_{t \rightarrow 0} \inv{t^2}
\lr{
F(\Bx^\conj) + t \lr{ \spacegrad F(\Bx^\conj) }^\T \Bv + \inv{2} t^2 \Bv^\T \spacegrad^2 F(\Bx^\conj) \Bv + O(t^3)
– F(\Bx^\conj)
} \\
&=
\inv{2} \Bv^\T \spacegrad^2 F(\Bx^\conj) \Bv \\
&\ge 0.
\end{aligned}

Here the $$\ge$$ condition also comes from the fraction, based on the optimiality of $$\Bx^\conj$$. This is true for all choice of $$\Bv$$, thus $$\spacegrad^2 F(\Bx^\conj)$$.

# References

[1] Stephen Boyd and Lieven Vandenberghe. Convex optimization. Cambridge university press, 2004.

## New home office and network setup

August 30, 2016 Uncategorized 2 comments

I’ve just bought a nice new desk for my home office:

When I assembled the new desk, I took the opportunity to refine my home network setup.  In this post I’ll walk through that setup.

I’ve got the router in the living room, along with the two NUC6i’s that I use for my lzlabs development work:

I run the NUCs headless, using ssh and command line access for my work.  For those times that I need to refresh the install image and need a display, I also have them HDMI connected to the living room TV, and direct connected with short ethernet cables to the router:

The router is also directly connected to the PS3 (for netflix), and then runs through some ethernet lines that I fished into the basement, before some of the basement finishing work we did just after we moved in.  All the lines I have going into the basement terminate in a patch panel:

Does a patch panel sound like overkill?  Yes, it probably is.  However, I’ve got a pile of roughed in ethernet lines to the kids rooms and the rec room that I’ll eventually fish into the electrical-panel/laundry/network room:

I’d like to also eventually fish some ethernet lines into the upstairs space (i.e. for netflix run off a blue-ray player that sits mostly unused in the master bedroom), but that’s a harder fishing job, and I haven’t done it yet.  From the front of the patch panel things go off to the router:

and from there to a switch:

One line comes from the router (through the patch panel), and then all the rest of the ethernet lines from the switch go to final destinations.  Four of those lines go back to the patch panel and up to the office space.  One is plugged into one of the thunderbolt monitors, so I can use a wired connection while “docked”.  One goes up to the office space and is connected to an Odroid (which can run the Lz stack on aarch64 hardware).  One line goes back to the living room, for optional wired couch surfing, and the last is connected to a voip phone.

I’ve got a lot of finishing touches to do.  I plan to mount the patch panel next to the electrical panel, instead of just placing it on top of the freezer down in the laundry room.  I’ve also got lines that are running through the ceiling, but are hanging loose still.  The wall panel in my office space is currently hanging loose:

I have a low voltage wiring box purchased, but need to cut the hole for it, so I can screw in this little panel and get it nicely out of the way, and do the plastering and painting to fix up the messy fishing holes I made trying to find a route down into the basement.

## Shipping with DHL. They will screw you, but not quite as bad as UPS.

I previously complained about UPS customs clearing charges that I was slammed with receiving back some of my own goods.

Basically, the Canadian government grants shipping companies the right to extort receivers at the point of customs clearing. Canada might add a few cents or a buck or two of tax, but the shipping company is then able to add fees that are orders of magnitude higher than the actual taxes.

I actually stopped buying anything from the United States because of this, and have been buying from Europe and India instead, where I had not yet gotten blasted with customs clearing fees for the items I’ve been buying (usually textbooks).

However, it appears that my luck has run out.  Here’s the newest example, with a $15 dollar clearing fee that DHL added onto about a dollar of tax: Note that I did not pick the shipping company. That was selected by the book seller (one of the abebooks.com resellers). For$1.17 of taxes, DHL has charged me $14.75 of fees, all for the right to allow Canada revenue to steal from me. To add insult to injury, DHL is allowed to charge GST for their extortion service, so I end up paying an additional$3.09 (close to 3x the initial tax amount).  The value of the book + shipping that I purchased was only $23.30! Aside: Why is the GST on$14.75 that high?  I thought that’s a 13% tax, so shouldn’t it be \$1.92?

I’ve found some instructions that explain some of the black magic required to do my own customs clearing:

One of the first steps is to find the CBSA office that I can submit such a clearing form to.  I can narrow that search down to province, but some of these offices are restricted to specific purposes, and it isn’t obvious which of these offices I should use.  For example the one at Buttonville airport appears to be restricted to handling just the cargo that arrives there.

I wonder if there are any local resellers that import used and cheap textbooks in higher quantities and then resell them locally (taking the customs clearing charge only once per shipment)?

## Fishing for wall trout.

April 28, 2016 Uncategorized 1 comment , , ,

Before we finished the kids half of the basement (2 bedrooms, 1 rec room, and a bathroom), I ran a couple cat5 cables through the ceiling alongside the cable modem line.  I didn’t know if I’d ever need them, but it seemed like a good idea at the time.

Now that I want ethernet lines in other parts of the house, I’m really glad I’d done that.  All I had to do was fish the unterminated lines out of the wall and put a couple jack inserts on them.  I bought a cheap non-cutting push down tool from home depot a while ago and finally got to use it:

Because the push down tool didn’t have a blade, I just used an exacto knife to cut the lines before capping the jack inserts.  That worked very nicely since there is a small lip on the jack insert, and you can cut the wires right against that easily.

Next step was terminating the lines in the basement on the patch panel.

That was a bit easier to do since the wiring block for the patch panel keeps all pairs together.  With the jack, it was more random, with some pairs pushed down next to each other, and others opposite.

I used the 568B wiring convention.  It sounds like that is generally preferred for wiring data, although 568A is sometimes used for wiring phone.  I have no intention of ever simultaneously running both phone and data through any single wire, so I don’t think it really matters which of the conventions to use (so long as I do the same thing at both the patch panel and the jack insert).

Next step was testing the connections.  I bought a cheap ethernet cable tester at Sayal a while ago when I saw it on sale, so I got to play with that too.

I saw no red lights at either end as it proceeded with the wire check cycle, and the termination point sequence was monotonic as desired.  With both cables tested, I was ready to put the plate on the wall.  I’ve got speaker wire for the rear surround sound speakers coming out of that too, in a rather ugly fashion.  Eventually, I may try to figure out what to do to pretty that up, but most of the time I don’t think about it, since it hides back there sight unseen.

The next step was the fishing trip.  I thought it was going to be easy to get through the wall into the unfinished section of the basement below, but I wasn’t able to find a route in one try (I kept hitting rafters and other obstructions).  I actually have three holes in the wall now, and have some patching to do (and probably have to pull the trim on that wall and reinstall it, since it is now pushed out).

Once I got my lines in place, I replaced my electric tape “numbering” sequence with some numbers, and started terminating them.

.

Finally, a bit of patch panel work for these new lines, and I am left with something functional.

This gives me wired connections to the two NUCs that I’m going to be using as development boxes (the RHEL7 + linux 4-5 kernel iwlwifi driver is pretty erratic, and has erratic and frequent hangs).

I have a whole bunch of finishing to do for this project.  For example I haven’t even put in the box to attach the wall plate to in the office, and have unsecured lines in the basement, and don’t have the patch panel mounted yet.  I’d also like to run a new RG6 line to the office and put the router in there.  Because I ran lots of lines into the office space, this will allow me to feed other locations in the house through the patch panel.

All that said, I have accomplished the task I set out to do.  Get myself up and running with NUCs and monitor all in the office, and no more flaky wireless to those devices.

## Another aggregation of notes for phy1520, Graduate Quantum Mechanics.

December 15, 2015 phy1520, Uncategorized No comments

I’ve posted a fourth (pre-exam) update of my aggregate notes for PHY1520H Graduate Quantum Mechanics, taught by Prof. Arun Paramekanti. In addition to what was noted previously, this contains the remainder of my lecture notes, more problem set solutions (not posted separately), and additional worked practice problems.

Most of the content was posted individually in the following locations, but those original documents will not be maintained individually any further.


text:
## Photo by Michael Burrows from PexelsWhat is percentage error?

We are bound to make mistakes while measuring anything in an experiment.  Most measurement inaccuracies are unavoidable. This often happens because your equipment is inaccurate, your hands shake, or your instruments cannot measure accurately or because of random errors. After detecting the causes of the first three types of errors, they can be removed, but the random errors remain. It is impossible to assign a specific cause to such errors.

When an experiment is performed numerous times, the random errors might be positive or negative. As a result, the average of many repeated experiment findings is near to the genuine value. However, there is still considerable doubt about how accurate this average is.

The percentage errors inform you how large or small your errors are. Smaller numbers indicate that you are getting nearer to the acceptable or true value. A 1% inaccuracy, for example, suggests that you were exceptionally near to the approved number, but a 48% error indicates that you were fairly far off from the genuine figure.

The percentage error formula will tell you how much these unavoidable mistakes influenced your results.

Percentage error =Absolute error/True value* 100%

## Absolute error

Absolute error is the number of errors that occur during a measurement. It aids us in understanding the level of inaccuracy being measured.

Absolute error is defined mathematically as

Absolute Error = (Measured value - Accepted x)

## Error in Relative Measurement( Relative error)

The relative error of measurement is defined as the ratio of the absolute error to the accepted measurement. The relative error expresses the extent of the absolute inaccuracy in terms of the object's actual measurement. When the true measurement of the object is unknown, the measured value is frequently used to compute the relative error.

The following is the mathematical expression for relative error:

Relative Error =Absolute Error/Accepted Value

Relative Error=measured value - actual value/actual value

### In other words, percent error is the relative error multiplied by 100

Percentage error is calculated by taking the difference between the precise and estimated values of a number, dividing it by the exact value, then multiplying it by 100 to express it as a percentage of the exact value.

## FORMULAS TO CALCULATE PERCENT ERROR

Percentage error = |Approximate value -Exact Value|/|Exact Value|* 100%

OR

Percentage Error= |accepted value -experimental value|/|accepted value| * 100%

Because accepted value is sometimes known as "true" or "theoretical" value, you may see the formula stated in somewhat various ways:

Percentage Error= |true value -experimental value|/|accepted value| * 100%

OR

Percentage Error= |theoratical value-experimental value|/|accepted value| * 100%

In all the above formulas, "|" symbols mean  absolute value, so negatives become positive)

In all versions of the formula, the same thing is meant - it's just that the wording is different.

## What Is The Significance of Calculating The Percentage of Error?

1. A percentage error calculation is used to determine how near a measured value is to an actual value.

2. Percent error is always stated as a positive figure in some sectors. In others, either a positive or negative number is acceptable. The sign can be retained to see if recorded values frequently go above or below predicted values.

3. One sort of error computation is percent error. Other typical estimates include absolute and relative error. A full error analysis consists of a percentage error calculation.

## How To Apply The Percentage Error Formula To Calculate Percentage Error?

### Steps for Calculating Percent Error

1. Subtract one value from another. If you omit the sign (take the absolute value), the order is irrelevant. If you're maintaining negative signs, subtract the theoretical value from the experimental value. This is your "Error."
2. Divide the error by the actual value. This will result in a decimal number.
3. To get the percentage multiple by 100
4. To represent the percentage error value, add a percentage or percentage sign.

## Solved Examples of Percent Error

### Example 1

John measured himself and discovered that he was 5 feet tall. However, after a thorough investigation, he found that his true height was 4.5 ft. Determine the percentage error he made when measuring his height.

Solution:

Before we begin to solve the problem, let us first identify the information:

- Actual value: 4.5 feet, estimated value: 5 feet

Step 1: Subtract one value from the others to obtain the absolute value of the mistake.

|4.5 - 5| = 0.5 Error

Step 2: Subtract the mistake from the actual amount.

0.5/4.5 is 0.1111 (up to 4 decimal places)

Step 3: To represent the answer as a percentage, multiply the number by 100 and add the percent sign.

100 x 0.111 = 11.11

Percent Error = 11.11 %

### Example 2

Helen's Science class yesterday had 36 pupils. She miscounted the number of pupils in the class and entered it as 30. What is Helen's margin of error?

Solution:

The real number of pupils was 36, whereas the recorded number of students was 30.

Absolute Error = 36 - 30 = 6

Percent error =6/36 = 0.167

= 0.25 x 100 = 16.67%

Helen's percent error is 16.67%.

### Example 3

John determines the radius of a circular sheet of paper to be 20 cm long. The packaging label shows that the radius is 24 cm. Calculate the measurement error as a percentage.

Solution:

20 cm is the measured value.

Accepted measurement = 24 cm

Step 1: Subtract the measured value from the acceptable value in step one.

4 cm = 24 cm – 20 cm

Step 2: Determine the absolute value of step 1 |4 cm| = 4 cm.

Step 3: Subtract the answer from the acceptable value.

4/24 = 0.166=0.17 (by rounding off to two significant figures)

Step 4: To represent the answer as a percentage, multiply the number by 100 and add the percentage sign.

0.17 x 100 = 17 %

The measurement's percentage error was 17%.

## CONCLUSION

Now you know what percentage error, relative error, and absolute error are. You may very well be aware that you have a problem where you have the real value and the estimated value. Calculate the percentage error using the formula of percentage error.


text:
# Tag Info

0

First, remember that a Cox model with a time-dependent covariate assumes that the instantaneous value of the covariate at any time determines the hazard at that time. Use your knowledge of the subject matter to consider whether that really is an appropriate way to model the relationship between CEA levels and outcome. With this longitudinal study some ...

4

Two points: Your data are log-log scaled. So why don't you take the logs of them? Since you expect a sigmoid function behind the data, why not trying fitting it to the data? Below, I model your log-transformed data as a (scaled) difference of two softplus functions, $y = log(1+e^x)$, plus a constant term: $$y = log(1 + e^{\alpha_1 + \beta x}) - log(1 + e^... 0 One possibility is to separate your data into 2 variables. One with an indicator of the value is zero or non zero. And the other being value of the variable given a non zero variable. And then apply the transformation. On a separate note you can try using power transform/box Cox transform. 2 If the response is count valued, you should consider using an appropriate modeling strategy that implicitly log-transforms the intensity rather than the count values themselves. Consider that a Poisson process with low intensity is likely to have right skewed results and many 0s, but log-transforms of the data would lead to highly biased estimates of the ... 3 I have nothing to add to whuber's brilliant answer using the Box-Cox transformation. I just wanted to offer an alternative source of the approximation, using the Maclaurin series for the natural logarithm:$$\ln (y+1) = y - \frac{y^2}{2} + \frac{y^3}{3} - \cdots. Ignoring the higher-order terms in the expansion gives the crude first-order approximation: ...

0

The problem you are going through is the same one I had when reading about this topic in most introductory books. Most books indicate that WLS will address heteroskedasticity by "eliminating" it from the model. This is technically done by using weights equal to 1 over the source of the heteroskedasticity. The alternative is to transform all data accordingly. ...

2

You can just run as.data.frame() on the sempreds object to turn it into a data.frame. Note that this isn't actually prediction; you're estimating factor scores. This covered in any SEM textbook (e.g., Bollen 1989). Factor scores are imperfect estimates of the latent variable that can often be used in subsequent analyses or for descriptive purposes. That ...

0

You should be able to calculate the mean absolute error (MAE) using just very basic functions in Python. If y is your target variable and you used your transformed target variable y_trans to train the model, you will get a transformed outcome variable out_trans. To get a meaningful MAE, in housing price e.g., you would have to transform your outcome variable,...

0

You have to say it was "mean-zero standardized." Dividing by the original calculated standard deviation, $\sigma$, results in a standardized variate with a standard deviation of 1. It has mean zero since it was "centered" (the average was subtracted as well). It's also not normalizing since normalizing implies the final range of the feature (variable) is [...

1

As ars' answer states, standardization is the transformation that involves: mean-centering, and rescaling to unit variance. A generalization of standardization is whitening or sphering whereby a set of one or more variables is linearly-transformed (typically after mean-centering) so that the covariance matrix is the identity matrix. A great reference is: ...

Top 50 recent answers are included


text:
Equations!

Algebra Level pending

If the solution set for $$x$$ of $$|kx-3|=402$$ is $${-\frac{133}{4},\frac{135}{4}}$$, find the value of k.

×


text:
This was Terence Tao's first paper. Tao, recipient of the Fields Me...
Here is Euclid's proof that if $2^n−1$ is prime, then $N=2^{n−1} (... If you want to run the this code yourself, Christopher Long upload... If you want to run this program yourself, David Roberts and Christo... Additionally, if you want to learn more about Tao's extraordinary m... PERFECT NUMBERS A perfect number is one such that all its factors, including one but excluding itself, add up to itself. For example, 6 is a perfect number since 6 has factors 1, 2, 3 and 6 and 1 + 2 + 3 = 6. In fact, 6 is the smallest perfect number. Euclid proved in his Elements that a number of the form 2 p1 (2 p 1) is a perfect number if 2 p 1 is a prime number. I used this fact to write a programme in Basic to ﬁnd perfect numbers but ﬁrst we need a programme on prime numbers for checking if 2 p 1 is prime. ready. 10 rem prime numbers 11 rem to calculate prime numbers up to a 20 input a 22 if a=2 then print"2": goto 100 25 print"2 3"; 30 for i=2 to a 40 if i=a then 100 50 for d=2 to int(sqr(i)+2) 60 if i/d=int(i/d) then 90 70 next d 80 printi; 90 next i 100 end So now let us see how we can use lines 40-60 to ﬁnd perfect numbers. 10 rem perfect numbers 15 rem to calculate perfect numbers 20 input n 30 if n<6 then print "none":goto 200 35 if n=6 then print "6 only":goto 200 40 print"6"; 45 for i=3 to 26 Originally published in Trigon (School Mathematics Journal of the Mathematical Asso- ciation of South Australia) 21 (3), Nov. 1983, p. 7. 46 rem limit n to 225*(226-1) 47 let y=2i-1 50 rem next loop is to check if 2i-1 is prime 52 for l=2 to int(sqr(y)) 53 if y/l=int(y/l) then 70 54 if y*2(i-1)>n then 200 55 next l 57 print",";y*2(i-1); 70 next i 200 print 201 print"(this program was written on 26/8/83)" 300 end Unfortunately, line 45 limits us to 2 25 (2 26 1), but then the computer has a limited range of numbers: it will never get to 2 25 (2 26 1) anyway. I have computed perfect numbers up to 10 13 . 6, 28, 496, 8128, 33 550 336, 8.58986906e + 09, 1.37438691e + 11 The last two, of course, are only approximations to the actual perfect num- bers and are unacceptable in this form. 8.58986906e + 09 = 8 589 869 060 when the last two ﬁgures are in doubt. In fact it is 8 589 869 056. Terence Tao If you want to run this program yourself, David Roberts and Christopher Long created a repo on Github with the code: https://github.com/DavidMichaelRoberts/Tao_1983/blob/master/perfect.bas They changed the 'up arrow' notation ↑ in the original code to the modern caret ^. Additionally, if you want to learn more about Tao's extraordinary mathematical abilities at an early age there's a [really good video by Tibees](https://www.youtube.com/watch?v=I_IFTN2Toak). She explores in depth a report by a researcher of mathematically gifted children that studied Tao at the age of 7. This was Terence Tao's first paper. Tao, recipient of the Fields Medal in 2006 and one of the greatest living mathematicians submitted this paper to a students' math journal called Trigon at the age of 8. In this paper, Tao developed a program in BASIC to find perfect numbers. ![](http://static01.nyt.com/images/2015/07/26/magazine/26tao2/26mag-26tao-t_CA0-articleLarge.jpg) David Roberts and Christopher Long converted the original paper published in Trigon to this LaTeX version. Here is Euclid's proof that if$2^n−1$is prime, then$N=2^{n−1} (2n−1)$is perfect. Proof: Clearly the only prime divisors of N are$2^n−1$and 2. Since$2^n−1$occurs as a single prime, we have simply that$σ(2^n−1)=(1+(2n−1))=2^n$, and thus $$σ(N) = σ(2^{n−1})σ(2^n−1) = \frac{2^n−1}{2-1}2^n=2^n(2^n-1)=2N$$ So N is perfect! The task of finding perfect numbers, then, is connected with finding primes of the form$2^n − 1\$, also known as Mersenne primes. Mersenne primes were named after the seventeenth century monk Marin Mersenne, a colleague of Descartes, Fermat and Pascal. Many of the largest known primes are Mersenne primes. If you want to run the this code yourself, Christopher Long uploaded it to Github: https://github.com/DavidMichaelRoberts/Tao_1983/blob/master/primes.bas


text:
# Error while displaying text stimuli in Thai

I’m building a multilingual vocal Stroop experiment, in which the subject should name the ink color in a different language from the stimuli.
My text stimuli include Thai color words, e.g. ขาว แดง เขียว เหลือง ชมพู ม่วง เทา.

While running the experiment, the following errors were reported:

Traceback (most recent call last):
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\text.py", line 373, in setText
setAttribute(self, 'text', text, log)
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\tools\attributetools.py", line 141, in setAttribute
setattr(self, attrib, value)
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\tools\attributetools.py", line 32, in __set__
newValue = self.func(obj, value)
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\text.py", line 364, in text
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\text.py", line 388, in _setTextShaders
multiline=True, width=self._wrapWidthPix)  # width of the frame
File "C:\Program Files\PsychoPy3\lib\site-packages\pyglet\text\__init__.py", line 453, in __init__
multiline, dpi, batch, group)
File "C:\Program Files\PsychoPy3\lib\site-packages\pyglet\text\__init__.py", line 275, in __init__
dpi=dpi, batch=batch, group=group)
File "C:\Program Files\PsychoPy3\lib\site-packages\pyglet\text\layout.py", line 810, in __init__
self.document = document
File "C:\Program Files\PsychoPy3\lib\site-packages\pyglet\text\layout.py", line 919, in _set_document
self._init_document()
File "C:\Program Files\PsychoPy3\lib\site-packages\pyglet\text\layout.py", line 1020, in _init_document
self._update()
File "C:\Program Files\PsychoPy3\lib\site-packages\pyglet\text\layout.py", line 956, in _update
lines = self._get_lines()
File "C:\Program Files\PsychoPy3\lib\site-packages\pyglet\text\layout.py", line 932, in _get_lines
glyphs = self._get_glyphs()
File "C:\Program Files\PsychoPy3\lib\site-packages\pyglet\text\layout.py", line 1059, in _get_glyphs
glyphs.extend(font.get_glyphs(text[start:end]))
File "C:\Program Files\PsychoPy3\lib\site-packages\pyglet\font\base.py", line 385, in get_glyphs
self.glyphs[c] = glyph_renderer.render(c)
File "C:\Program Files\PsychoPy3\lib\site-packages\pyglet\font\win32.py", line 431, in render
ord(text), ord(text), byref(abc)):
TypeError: ord() expected a character, but string of length 2 found

I have tried to change many fonts but always encounter with these errors. Sometimes, the program also generates this error:

TypeError: 'NoneType' object is not subscriptable

Is there anyway to solve this problem? How should I proceed so that PsychoPy could recognize Thai unicodes and/or Thai fonts?
Or could you recommend any font which is compatible with Thai letters?

I have no experiences with programming or with Python. Thus, any help would be really appreciated!

Have you checked whether it works with English words? I can confirm that Thai characters can work with PsychoPy

Yes, I have also created stimuli in English and German using Calibri font. There’s no problem with these two languages while running. The errors seem to occur only when displaying Thai text stimuli.

I have tried using fonts like Angsana New, Noto, Cordia New and such which are generally used with Thai letters, but always no success.

Now I’m not sure whether the problem lies in the source code or whether there is any other issue…

Please try using the newer TextBox stimulus rather than the older Text stimulus. TextBox doesn’t rely on the third-party pyglet package, which is what seems to be causing you grief here.

Thanks for your advice! Now I’m having another question regarding TextBox function.

I tried to insert parameter and conditions from an excel file by putting $color in the color field and$word in the message filed, like when I created text stimuli. It seems to not working though.

Does this function work in the same way as a text stimulus or do I have to apply some more codes in order to connect a TextBox to my parameters and conditions?

Would you please tell me which Thai font you have used at that time for generating your text stimuli?
Maybe I could try it out…

The default - Arial.

Have a look at https://run.pavlovia.org/Wake/miming/ and put t for the language.

The text is in an Excel file with one column for English and one for Thai.

We need a description of the actual problem to be able to make useful suggestions.


text:
How do you factor m^4 - n ^4?

Jun 24, 2018

$\left({m}^{2} - {n}^{2}\right) \left({m}^{2} + {n}^{2}\right)$

Explanation:

Remember the ${a}^{2} - {b}^{2} = \left(a - b\right) \left(a + b\right)$

Note that ${m}^{4}$ is the same as ${\left({m}^{2}\right)}^{2}$ and the same for $n$. So we may write this as:
$\textcolor{w h i t e}{\text{d")a^2color(white)("dd")-color(white)("d")b^2color(white)("dd") ->color(white)("dd}} \left(a - b\right) \left(a + b\right)$

${\left({m}^{2}\right)}^{2} - {\left({n}^{2}\right)}^{2} \to \left({m}^{2} - {n}^{2}\right) \left({m}^{2} + {n}^{2}\right)$

Jun 24, 2018

$\left({m}^{2} + {n}^{2}\right) \left(m + n\right) \left(m - n\right)$

Explanation:

What we have is a difference of squares. Recall that if we have an expression

${\textcolor{s t e e l b l u e}{a}}^{2} - {\textcolor{s t e e l b l u e}{b}}^{2}$

This has an expansion of

$\textcolor{p u r p \le}{\left(a + b\right)} \textcolor{s t e e l b l u e}{\left(a - b\right)}$

Let's rewrite our expression as

${\textcolor{s t e e l b l u e}{\left({m}^{2}\right)}}^{2} - {\textcolor{s t e e l b l u e}{\left({n}^{2}\right)}}^{2}$

Since we have a difference of squares, we can rewrite this as

$\textcolor{p u r p \le}{\left({m}^{2} + {n}^{2}\right)} \textcolor{s t e e l b l u e}{\left({m}^{2} - {n}^{2}\right)}$

What we have in purple is a sum of squares, which can't be factored with real numbers, but we have another difference of squares in blue.

Factoring this, we get

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

Hope this helps!


text:
# Lebesgue integral

let be the Lebesgue integral with a meassure $$\mu$$ then if we call this integral..

$$\int_{X}fd\mu=I$$

my questions are..how would you calculate the integral of f(x)=exp(x) from 1 to 10?..another question let be the lebesgue integral on the interval X=(0,t) would be true that:

$$(\frac{d}{dt}\int_{X}fd\mu=f(t)$$?

thanks...

Last edited:

HallsofIvy
Homework Helper
eljose said:
let be the Lebesgue integral with a meassure $$\mu$$ then if we call this integral..
$$\int_{X}fd\mu=I$$
my questions are..how would you calculate the integral of f(x)=exp(x) from 1 to 10?
The same way you would a Riemann integral. If a function is Riemann integrable on an interval, then it is Lebesque integrable on that interval and the two integrals are the same.

..another question let be the lebesgue integral on the interval X=(0,t) would be true that:
$$(\frac{d}{dt}\int_{X}fd\mu=f(t)$$?
thanks...
Except possibly on a set of measure 0, yes.

mathwonk


text:
### What is the best and easiest software program for machine learning?

I am new for the AI, deep learning and machine learning stuff. I want to learn more about machine learning as fast and efficient as possible. What should I learn from these options: Pytorch, Keras or TensorFlow. P.S.: I don’t use python or any other programming language, but currently I’m learning Matlab.

### What is the most suitable AI technique to use?

So I am making a firetruck using arduino uno with flame sensors and ultrasonic sensors to detect how to move and where to go. As this is a project for my university, I am asked to implement AI in it for path planning. I am not sure whether to use something like A* technique or…

### How can policy gradient fulfill the required action range?

As we often use the gaussian policy for continuous action space, but how can we make it proper for the range. In spiningup’s implementation, I found they just simply used, def mlp_gaussian_policy(x, a, hidden_sizes, activation, output_activation, action_space): act_dim = a.shape.as_list()[-1] mu = mlp(x, list(hidden_sizes)+[act_dim], activation, output_activation) log_std = tf.get_variable(name=’log_std’, initializer=-0.5*np.ones(act_dim, dtype=np.float32)) std = tf.exp(log_std) pi…

### Discussion – Does AGI require a radical new idea?

I read an interesting essay about how far we are from AGI. There were quite a few solid points that made me re-visit the foundation of AI today. A few interesting concepts arose: imagine that you require a program with a more ambitious functionality: to address some outstanding problem in theoretical physics — say the…

### Why can’t LSTMs keep track of the “important parts” of a sequence?

I keep reading about how LSTMs can’t remember the “important parts” of a sequence which is why attention based mechanisms are required. I was trying to use LSTMs to find people name format. For example, “Millie Bobby Brown” can be seen as first_name middle_name last_name format, which I’ll denote as 0, but then there’s “Brown,…

### Training and inference for highly-context-sensitive information

What is the best way to train / do inference when the context matters highly as to what the inferred result should be? For example in the image below all people are standing upright, but because of the perspective of the camera, their location highly affects their skeletal pose. If the 2D inferred skeleton of…

### How can I write out the Real-TIme Recurrent Learning Gradient equations for a network?

This question is about Real-Time Recurrent Learning Gradient on a Recurrent neural network . How can I write out the RTRL equations for a network ? Before present an example give let’s introduce some notation : Notation So the network for which we want to write the RTRL equations is the following : Network A…

### Artificial Neurons affecting others at the same level

Isn’t it the case the the artificial neurons in layer X are only affected by those in layer X-1 (providing inputs), not other neurons in layer X? This is motivate by another recent question.

### How to determine mathematical membership functions and graphs?

How can we determine mathematical membership functions and graphs ? eg Fuzzy sets A, B and C defined on real numbers by the membership functions: $\mu_A(x)=\frac{1}{x+1}, \mu_B(x)=\frac{1}{x^2+10}, \mu_C(x)=\frac{1}{10^x}$ Determine mathematical membership functions and graphs of each of the following ? A $\cup$ B B $\cap$ C A $\cup$ B $\cup$ C A $\cap$ B $\cap$…


text:
• NEW! FREE Beat The GMAT Quizzes
Hundreds of Questions Highly Detailed Reporting Expert Explanations
• 7 CATs FREE!
If you earn 100 Forum Points

Engage in the Beat The GMAT forums to earn
100 points for $49 worth of Veritas practice GMATs FREE VERITAS PRACTICE GMAT EXAMS Earn 10 Points Per Post Earn 10 Points Per Thanks Earn 10 Points Per Upvote Forum Rules ## Problem Solving Topics Posts Last Post ### PLEASE EXPLAIN PROBABILITY WITH AN WITHOUT REPLACENT!!! by: Want to clear this question: Jar contains 3 green, 2 red and 3 blue... 1 Sun Oct 11, 2009 9:03 am ### tricky question - probability by: A 5 meter long wire is cut into two pieces. If the longer piece is... 2 Sun Oct 11, 2009 5:34 am by: agganitk ### Number of revolutions by: The radius of the front wheels of a cart is half that of the rear... 4 Sun Oct 11, 2009 3:26 am by: sanjana ### Planes by: OA - D 1 Sat Oct 10, 2009 1:52 pm by: kishore ### Q-34 by: 34. is the least integer greater than or equal to X, if =0, what is... 4 Sat Oct 10, 2009 10:04 am ### difficult coordinate geometry question by: OA after some replies 3 Sat Oct 10, 2009 9:20 am ### PS General Strategy? by: Hey all, I wanted to see if anyone had a general approach worked out... 0 Sat Oct 10, 2009 8:41 am by: cbenk121 ### Q-30 by: 30.There are 10 marble balls, including 5 green, 3 blue, and 2 red,... 3 Sat Oct 10, 2009 7:08 am ### Q-44 by: 44.A 4-digit telephone number consists of 3, 4, and 5. If 4, 5 can be... 1 Sat Oct 10, 2009 6:38 am by: dmateer25 ### Q-43 by: 43. There are 4 letters and 4 corresponding envelopes. If we put the... 1 Sat Oct 10, 2009 6:36 am by: dmateer25 ### Q-32 by: 32. A person does a job and will gain$336. Actually, he takes 4 more...

1 Sat Oct 10, 2009 6:24 am

by: dmateer25

### Kaplan CAT question

by:
Here is a question from a Kaplan CAT and the solution. I disagree...

2 Fri Oct 09, 2009 3:53 pm

### Factor relashionship

by:
Hi there, Could you help me to resolve this PS and explain the step...

3 Fri Oct 09, 2009 1:59 pm

by: Xbond

### Quant problem from Prep 1

by:
For every Positive integer n, the function h(n) is defined to be...

1 Fri Oct 09, 2009 10:15 am

### manhatan 4

by:
Which of the following is a possible length for side AB of triangle...

10 Fri Oct 09, 2009 8:20 am

by: NikolayZ

### Quite Confusing

by:
Q. If x<0, simplify the given expression in terms of x,...

4 Fri Oct 09, 2009 8:01 am

by:
What is the greatest prime factor of 2^100 - 2^96? A. 2 B. 3 C. 5 D....

12 Fri Oct 09, 2009 7:34 am

by: mp2437

### Prime Numbers problem

by:
Hi Folks, I found this problem in the Advanced GMAT problems...

2 Fri Oct 09, 2009 5:29 am

by: aa2kash

### runners far apart!

by:
On level farmland, two runners leave at the same time from the...

2 Fri Oct 09, 2009 1:45 am

by: sanjana

### Solve this equation..

by:
Which of the following is closest to (998*0.02 + 4.97)}/{(1002*0.02 +...

3 Fri Oct 09, 2009 12:42 am

by: uptowngirl92

### help with a problem - kilograms, cubic meters, etc.

by:
Does anyone know how to solve this? The mass of 1 cubic meter of a...

4 Thu Oct 08, 2009 9:01 pm

### Another problem giving me grief ...help!

by:
Does anyone have any techniques, or "rules of thumb" to...

1 Thu Oct 08, 2009 8:18 pm

### Tough question GMAT prep 1 definately a 700+ level question

by:
A thin piece of wire 40 meters long is cut into two pieces. One piece...

2 Thu Oct 08, 2009 7:03 pm

by: mridul_dave

### PS inequality

by:
If |x| + |y| = -x - y and xy does not equal 0, which of the following...

7 Thu Oct 08, 2009 6:58 pm

by: riteshbindal

### Quick way of solving this??

by:
((8^2)(3^3)(2^4)) / (96^2) not too hard of a math problem.. but i'd...

2 Thu Oct 08, 2009 6:34 pm

by: kguo

by:
Hey guys I tried searching around. I know this is a fairly straight...

7 Thu Oct 08, 2009 8:49 am

by: virtuoso902

### Rounding-off -- Interesting!

by:
try this... interesting problem. Source: MGMAT Test OA and OE after...

1 Thu Oct 08, 2009 4:43 am

by: rohan_vus

### Series

by:
If each term in the sum a1+a2+a3...+an is either 7 or 77 and the sum...

3 Thu Oct 08, 2009 4:10 am

by: sanjana

### GMAT PREP-1 Questions.. help needed

by:
Hi, Can anyone please solve these 4 questions from GMAT PREP test-1...

3 Thu Oct 08, 2009 4:06 am

by: sanjana

### Coordinate + Geometry+ Probability one quest

by:
Q-> Point (x,y) is a point within the triangle. What is the...

1 Thu Oct 08, 2009 3:36 am

by: rohan_vus

### Probability - Please show solution

by:
A basket contains 5 apples of which 1 is spoiled and the rest are...

2 Thu Oct 08, 2009 3:11 am

by: sanjana

### Any idea how we can solve these kind of quest

by:
51. Scale A and B are linear. 24 and 30 in A correspond to 40 and 60...

1 Thu Oct 08, 2009 2:52 am

by: sanjana

### Set consisting of five different elements

by:
Hi All, When one a GMAT question (in statistics) says that set...

2 Thu Oct 08, 2009 1:35 am

by: CrackGMAC

### Mean of two sets

by:
Hi All, When two sets A and B are combined, then mean of set C lies...

0 Thu Oct 08, 2009 12:14 am

### Median of two sets.

by:
Hi All, When two sets A and B are combined, then median of set C lies...

0 Thu Oct 08, 2009 12:12 am

### Mensuration Prob #4

by:
If the curved surface area of a cone is thrice that of another cone...

1 Thu Oct 08, 2009 12:04 am

### Mensuration prob #3

by:
A conical tent is to accomodate 10 persons. Each person must have 6...

2 Wed Oct 07, 2009 10:41 pm

by: papgust

### Mensuration prob #1

by:
Three metal cubes with edges 6cm, 8cm and 10cm respectively are...

2 Wed Oct 07, 2009 10:38 pm

by: papgust

### Reducing factorials

by:
This is just a random factorial question that i picked from...

0 Wed Oct 07, 2009 8:18 pm

by: ern5231

### least possible distance

by:
What is the least possible distance between a point on the circle...

8 Wed Oct 07, 2009 4:03 pm

by: Katrusya

### 170) Interpreting modulus

by:
p = | x - 2 | + | x +2 | Consider the above equation for the...

1 Wed Oct 07, 2009 3:53 pm

by: ChrisHinkle

### 168 find factors

by:
N is a positive integer and 8,9,10 are factors of N. Which of the...

1 Wed Oct 07, 2009 10:38 am

### 164 calculate ratio of birds

by:
In a group of birds 60% were male birds. Certain birds in this group...

3 Wed Oct 07, 2009 10:36 am

### Set quest

by:
9. This semester, each of the 90 students in a certain class took at...

5 Wed Oct 07, 2009 6:23 am

by: aa2kash

### XY Problem #2 OG 12 88

by:
In the xy-coordinate system, if (a,b) and (a+3, b+k) are two points...

7 Wed Oct 07, 2009 5:31 am

by: aa2kash

### Probability + Number sets

by:

3 Wed Oct 07, 2009 1:49 am

by: sanjana

### A quick way to solve this problem

by:
I ran across the problem below and had some trouble with it. I know i...

4 Wed Oct 07, 2009 1:49 am

by: papgust

### 136 work and time

by:
Two machines A and B. In one hour A makes 1000 products, B makes 700...

3 Wed Oct 07, 2009 1:28 am

by: sanjana

### Mensuration prob #2

by:
In a swimming pool measuring 90m by 40m, 150 men take a dip. If the...

1 Tue Oct 06, 2009 11:12 pm

by: sunnyjohn

### power of an engine

by:
If the power of an engine grows by 10% when the number of its...

1 Tue Oct 06, 2009 11:06 pm

by: sunnyjohn

Goto page
• Free Practice Test & Review
How would you score if you took the GMAT

Available with Beat the GMAT members only code

• 5-Day Free Trial
5-day free, full-access trial TTP Quant

Available with Beat the GMAT members only code

• Free Trial & Practice Exam
BEAT THE GMAT EXCLUSIVE

Available with Beat the GMAT members only code

• Get 300+ Practice Questions

Available with Beat the GMAT members only code

• Award-winning private GMAT tutoring
Register now and save up to $200 Available with Beat the GMAT members only code • Magoosh Study with Magoosh GMAT prep Available with Beat the GMAT members only code • 1 Hour Free BEAT THE GMAT EXCLUSIVE Available with Beat the GMAT members only code • Free Veritas GMAT Class Experience Lesson 1 Live Free Available with Beat the GMAT members only code • FREE GMAT Exam Know how you'd score today for$0

Available with Beat the GMAT members only code

• 5 Day FREE Trial
Study Smarter, Not Harder

Available with Beat the GMAT members only code

### Top First Responders*

1 Ian Stewart 43 first replies
2 Brent@GMATPrepNow 35 first replies
3 Scott@TargetTestPrep 33 first replies
4 Jay@ManhattanReview 28 first replies
5 GMATGuruNY 19 first replies
* Only counts replies to topics started in last 30 days
See More Top Beat The GMAT Members

### Most Active Experts

1 Scott@TargetTestPrep

Target Test Prep

149 posts
2 Max@Math Revolution

Math Revolution

93 posts
3 Brent@GMATPrepNow

GMAT Prep Now Teacher

53 posts
4 Ian Stewart

GMATiX Teacher

52 posts
5 GMATGuruNY

The Princeton Review Teacher

32 posts
See More Top Beat The GMAT Experts
• New posts
• New posts [ Popular ]
• New posts [ Locked ]
• No new posts
• No new posts [ Popular ]
• No new posts [ Locked ]
• Announcement
• Sticky


text:
## The MOV Attack

Suppose we are given points $P, xP$ of an elliptic curve and asked to recover $x$. (This is the discrete logarithm problem.)

Let $e()$ be the Weil pairing. Let $m$ be the order of $P$. Let $Q$ be a point of order $m$ that is linearly independent to $P$ (in other words, there is no $n$ such that $Q = n P$).

Then $e(P,Q)$ and $e(x P, Q) = e(P,Q)^x$ can be computed, and are both elements of a finite field. (They are $m$th roots of unity.) Since $P,Q$ are linearly independent, $e(P,Q)$ cannot be unity by the nondegeneracy of the Weil pairing. Thus we have reduced the discrete logarithm problem on the group of points on an elliptic curve to the discrete logarithm on finite fields, where subexponential attacks are known.


text:
# Equality/Equivalence of functions

When we say something like:
$$\frac{dy}{dx} = x$$
we’re describing the way a function $y$ changes with respect to $x$.
To solve the differential equation we integrate both sides. Is there a proper way to do this, or is it simply the case that if have a reliable method to get the correct answer then that’s fine. For example:

Method 1:
$$\int\frac{dy}{dx} dx = \int x \, dx$$
$$\int dy= \int x \, dx$$
$$y + c_1 = \frac{x^2}{2} + c_2$$

Method 2:
$$\frac{dy}{dx} = x$$
$$dy = x \, dx$$
$$\int dy= \int x \, dx$$
$$y + c_1 = \frac{x^2}{2} + c_2$$

This is the thinking that lead me to the question to the title.

1. Why is it okay to integrate both sides of an equation? Are we basing that on the fact that indefinite integration is simply the reverse of differentiation? Will integrating both sides always make sense with continuous, integrable, elementary functions?

2. Can we integrate without respect to a variable? In method 2 I employed the integration operator on both sides without adding a differential (I know it was already there).

3. If I write $y” + 5xy = 2x^2$, is it acceptable to integrate both sides of the equation with respect to y, or x, and get a valid equality as a result?

4. When I write: $xy + y^x = 2x + 3$, maybe this is bad example, but am I stating that the left side is the same as the right side, or am I proposing that there are certain values of x and y that satisfy that equation.

I’m having sort of a fundamental crisis here. I don’t think I was ever properly taught what equality means. If you were, where did you learn it?

#### Solutions Collecting From Web of "Equality/Equivalence of functions"

I think some of the source of your confusion is thinking about “integrating both sides” and in using variables somewhat indiscriminately. There are ways to do both of those things correctly after you’ve developed some intuition, but at the beginning of your study you should concentrate more on the meaning.

The only thing I know about an unknown function $f$ is that $f'(x) = x$, What can I say about $f$?

Well, maybe I’m lucky and can guess one such function: $f(x) = x^2/2$. (That might be more than just luck. I might actually remember something about integration). Then I can invoke a theorem that tells me that any two functions with the same derivative must differ by a constant. That tells me the only possibilities for $f$ are
$$f(x) = x^2/2 + c$$
for some constant $c$.

If I’m not so lucky, and can’t guess or figure out a function whose derivative is what I want, I can still answer the question, but in a different way. For example, I might want to find $f$ when I know
$$f'(x) = e^{-x^2} \text{ or } f'(x) = \cos(x + \sin(x)).$$
(The first of these is very useful. The second is just made up ugly. There is no good “formula” for $f$ in either case.)

The way to proceed then is to define $f$ as a definite integral. In the first example you could let
$$f(x) = \int_0^x e^{-t^2} dt$$
and calculate that value for any particular $x$ numerically: it’s just a well defined area. The derivative of the function defined by tabulating those values is in fact just the given $f'(x) = e^{-x^2}$. That’s (essentially) the fundamental theorem of calculus.

In the other examples you ask about the derivative(s) of the unknown function are mixed up with the function values in much more complicated ways than simply
$$f'(x) = \text{some expression involving just } x.$$
Then you’ve begin the study of differential equations.

Long winded answer. Hope it helps.

Method $2$ would be considered more appropriate and note $\int x dx = \frac{1}{2}x^2 + C$. However, you only need one arbitrary constant in the solution, $y = \frac{1}{2}x^2 + C$ would suffice for a solution since $c_2 – c_1$ would result in a new constant, where we call it $C$.

1) It is okay to integrate both sides of an equation when we have separated our variables. In other words, when we have $f(x,y)dx + g(x,y)dy = h(x,y)$, we manipulate it to look like $\alpha(x)dx = \beta(y)dy$. However, sometimes this is not feasible so the topic of Ordinary Differential Equations (ODEs) is introduced to some of the cases where it is not separable. And yes, integrating both sides will always make sense when the function is Riemann integrable.

2) No, we cannot integrate without respect to variable. This would not make sense. You integrated both sides because you already had it in the form involving a differential. You integrated in order to remove the differential.

3) When given $y” + 5xy = 2x^2$ assuming $y”$ is the second derivative with respect to $x$, you would have to tackle solving this using techniques from ODE, it is not as simple as integrating twice!

4) When you have $xy + y^x = 2x + 3$, you are treating $x$ and $y$ as variables here. You are implying that there may exist solutions, i.e. $x$ and $y$ that satisfy this equation. Clearly, it is not true for every $x$ and $y$, so the right hand side does not equal the left hand side in general. However, there may be certain $x$ and $y$ that make the equality hold true.

I will disagree with some of the earlier answers a little.

The way we usually do mathematics equality is really an overloaded operator that depends on where we are working. This might not be trivially obvious right away but consider the $2\in \mathbb{N}$, the $2\in \mathbb{Z}$, the $2\in \mathbb{Q}$, the $2 \in \mathbb{R}$ and the $2\in \mathbb{C}$ as an example. Each of these will under standard constructions be completely different objects. Yet we usually prefer to think of them as identical. I.e. If I write $2=(+2)=(2/1)=(\sqrt{2})^2=2+0i$, I would guess everyone would agree these are equal. Even though there is a decent chance the first $2=\{\{\},\{\{\}\}\}$ the second $2=\{1,\{1,2\}\}$ the third $2=\{(a,b);\;a=2b\wedge a,b\in\mathbb{Z}\}$ the fourth $2=\{x;x<2\wedge\; x\in \mathbb{Q}\}$ and the fifth $2=\{2,\{2,0\}\}$, where the symbols $2$ on the right hand sides of the equations should be understood as being the ones defined one earlier.

1) If two things are equal and you apply the same function to both of them then the result of the application of the function is still equal. In other words if $a=b$ then $f(a)=f(b)$ whenever $f(a)$ makes sense. Now indefinite integration is not a function (that’s why you get one of those nasty $c$’s whenever you integrate. Thus performing indefinite integration does not (necessarily) preserve equality. But it does preserve equality up to an additive constant. If $a=b$ then $\int a\;dt=\int b\;dt+C$ for some constant $C$. If all of this is done over the real numbers that constant is a real number. That’s why if you write it as you did the last equation holds. The first two don’t hold unless you think of the integrals as representing sets of functions. Here I’m talking about method 1. Method 2 is either a lot of abuse of notation or differential one forms. If the former it’s the same as method 1, if the latter I don’t want to get into that.

2) You can’t really integrate without integrating in respect to a variable. (Well you sort of can since you can integrate with respect to a measure but that’s more complex and you still need to have some understanding of what the variables are.)

3) Yes up to the caveats given above. You might get things that won’t help much but you can integrate.

4) It is not obvious in general from just that equation what you mean. Given no other information than $xy+y^x=2x+3$ there is little we can do with it. It’s sorely underdefined, as are most sentences taken out of context. In all we do we try to fill in context. If I say “Trump beats Hillary,” you are certainly not given enough context to know what I’m talking about, maybe I know a guy who beats wife and his name if Trump and hers Hillary, or there is a game in which hillary is a card value and trumps beat it. But you will most likely assume that I prefer the current US president to his rival in last years race, since it’s the most likely context (I don’t necessarily).

The same is with $xy+y^x=2x+3$ you might be asserting this is an identity in which case it’s just a false statement. But it’s more likely that $x$ and $y$ are variables and you are claiming they have this relationship. It is not obvious what values $x$ and $y$ may take though (is this an equation over the integers? rationals? reals? $\mathbb{Z}_5$?)

To answer your last question I learned what $=$ meant over many years starting in elementary school and mostly having grasped it by the end of my undergrad. Where I went to school I feel there weren’t too many obstacles placed in my way to get to the correct understanding. From what I’ve seen of the US school system it seems to go out of it’s way to make sure the students never get the idea.

1) An equality always means that the “thing” on the left hand side is the same “thing” as the “thing” on the right hand side. There is no difference in any respect whatsoever between the two “things”. If there is some difference, then they are not equal and the equation is incorrect. Therefore, integrating one side of a correct equation must be equivalent to integrating the other side.

2) No. Integration has no meaning at all apart from integrating over some variable.

3) You can write down an integral equation, sure. It won’t tell you much without a further solution because of that term that mixes $x$ and $y$. It will just look like $\int 5xy dx$. You simply cannot say that it equals $5yx^2/2$, just in case that’s what you were thinking.

4) You are saying that the left and right sides are the same, and then you have to admit the logical implication that this can only be true for the correct combination(s) of $x$ and $y$. If it turns out that there are no such combinations, then you have written an incorrect equation.


text:
# Revision history [back]

### Modifying unit tests according to policy.json

I'd like to know what changes need to be made to unit tests when role changes for an action in policy.json.

For example, I made the below change to Neutron policy.json

From: "create_port": "" to "create_port": "role:my_network_role".

Neutron unit test "test_create_port_public_network" fails due to this change. I can make it work by making a code change to get the admin context but my mind tells me this is not the way. The current code generates neutron context the below way which is not admin context...

 port_req.environ['neutron.context'] = context.Context("'', kwargs['tenant_id'])

Can someone help me with it? How do I change the tests to use my newly created role?

Thanks.


text:
Click to Chat

1800-1023-196

+91-120-4616500

CART 0

• 0

MY CART (5)

Use Coupon: CART20 and get 20% off on all online Study Material

ITEM
DETAILS
MRP
DISCOUNT
FINAL PRICE
Total Price: Rs.

There are no items in this cart.
Continue Shopping
• Complete JEE Main/Advanced Course and Test Series
• OFFERED PRICE: Rs. 15,900
• View Details

Chapter 8: Linear Equations in One Variable Exercise – 8.2

Question: 1

x – 3 = 5

Solution:

x – 3 = 5

Adding 3 to both sides, we get

x – 3 + 3 = 5 + 3

x = 8

Verification:

Substituting x = 8 in LHS, we get

LHS = x – 3 and RHS = 5

LHS = 8 – 3 = 5 and RHS = 5

LHS = RHS

Hence, verified.

Question: 2

x + 9 = 13

Solution:

x + 9 = 13

Subtracting 9 from both sides, we get

=> x + 9 – 9 = 13 – 9

=> x = 4

Verification:

Substituting x = 4 on LHS, we get

LHS = 4 + 9 = 13 = RHS

LHS = RHS

Hence, verified.

Question: 3

Solution:

Question: 4

3x = 0

Solution:

3x = 0

Dividing both sides by 3, we get

3x/3 = 0/3

x = 0

Verification:

Substituting x = 0 in LHS = 3x, we get LHS = 3 × 0 = 0 and RHS = 0

LHS = RHS

Hence, verified.

Question: 5

x/2 = 0

Solution:

x/2 = 0

Multiplying both sides by 2, we get

=> (x/2) × 2 = 0 × 2

=> x = 0

Verification:

Substituting x = 0 in LHS, we get

LHS = 0/2 = 0 and RHS = 0

LHS = 0 and RHS = 0

LHS = RHS

Question: 6

Solution:

Question: 7

Solution:

Question: 8

10 – y = 6

Solution:

10 – y = 6

Subtracting 10 from both sides, we get

10 – y – 10 = 6 – 10

-y = -4

Multiplying both sides by -1, we get

-y × -1 = - 4 × - 1

y = 4

Verification:

Substituting y = 4 in LHS, we get

LHS = 10 – y = 10 – 4 = 6 and RHS = 6

LHS = RHS

Hence, verified.

Question: 9

7 + 4y = - 5

Solution:

7 + 4y = -5

Subtracting 7 from both sides, we get

7 + 4y – 7 = -5 -7

4y = -12

Dividing both sides by 4, we get

y = -12/ 4

y = -3

Verification:

Substituting y = -3 in LHS, we get

LHS = 7 + 4y = 7 + 4(-3) = 7 – 12 = -5, and RHS = -5

LHS = RHS

Hence, verified.

Question: 10

Solution:

Question: 11

Solution:

Question: 12

Solution:

Adding 8 to both sides, we get

Question: 13

3(x + 2) = 15

Solution:

3 (x + 2) = 15

Dividing both sides by 3, we get

(x + 2) = 5

Subtracting 2 from both sides, we get

x + 2 – 2 = 5 – 2

x = 3

Verification:

Substituting x = 3 in LHS, we get

LHS = 3 (x + 2) = 3 (3 + 2) = 3(5) = 15, and RHS = 15

LHS = RHS

Hence, verified.

Question: 14

x/4 = 7/8

Solution:

x/4 = 7/8

Multiplying both sides by 4, we get

Question: 15

1/3 - 2x = 0

Solution:

1/3 - 2x = 0

Subtracting 13 from both sides, we get

Multiplying both sides by -1, we get

LHS = RHS

Hence, verified.

Question: 16

3(x + 6) = 24

Solution:

3(x + 6) = 24

Dividing both sides by 3, we get

(x + 6) = 8

Subtracting 6 from both sides, we get

x + 6 – 6 = 8 – 6

x = 2

Verification:

Substituting x = 2 in LHS, we get

LHS = 3(x + 6) = 3(2 + 6) = 24, and RHS = 24

LHS = RHS

Hence, verified.

Question: 17

3(x + 2) - 2(x – 1) = 7

Solution:

3(x + 2) – 2(x – 1) = 7

On expanding the brackets, we get

3× x + 3 × 2 – 2 × x + 2 × 1 = 7

3x + 6 – 2x + 2 = 7

3x – 2x + 6 + 2 = 7

x + 8 = 7

Subtracting 8 from both sides, we get

x + 8 – 8 = 7 – 8

x = -1

Verification:

Substituting x = -1 in LHS, we get

LHS = 3 (x + 2) -2(x -1) = 3 (-1 + 2) -2(-1-1) = (3×1) – (2×-2) = 3 + 4 = 7, and RHS = 7

LHS = RHS

Hence, verified.

Question: 18

8(2x – 5) - 6(3x – 7) = 1

Solution:

8(2x – 5) – 6(3x – 7) = 1

On expanding the brackets, we get (8 × 2x) – (8 × 5) – (6 × 3x) + (-6) × (-7) = 1

16x – 40 – 18x + 42 = 1

16x – 18x + 42 – 40 = 1

-2x + 2 = 1

Subtracting 2 from both sides, we get

-2x+ 2 – 2 = 1 -2

-2x = -1

Multiplying both sides by -1, we get

-2x × (-1) = -1× (-1)

2x = 1

Dividing both sides by 2, we get

Verification:

Substituting x = 1/2 in LHS, we get

= 8(1 – 5) – 6(32 – 7)

= 8× (-4) – (6 × 32) + (6 × 7) = -32 – 9 + 42 = – 41 + 42 = 1= RHS

LHS = RHS

Hence, verified.

Question: 19

6(1 – 4x) + 7(2 + 5x) = 53

Solution:

6(1 – 4x) + 7(2 + 5x) = 53

On expanding the brackets, we get (6 ×1) – (6 × 4x) + (7 × 2) + (7 × 5x) = 53

6 – 24x + 14 + 35x = 53

6 + 14 + 35x – 24x = 53

20 + 11x = 53

Subtracting 20 from both sides, we get 20 + 11x – 20 = 53 – 20

11x = 33

Dividing both sides by 11, we get

11x/11 = 33/11

x = 3

Verification:

Substituting x = 3 in LHS, we get

= 6(1 – 4 × 3) + 7(2 + 5 × 3)

= 6(1 – 12) + 7(2 + 15)

= 6(-11) + 7(17)

= - 66 + 119

= 53 = RHS

LHS = RHS

Hence, verified.

Question: 20

5(2 – 3x) - 17(2x – 5) = 16

Solution:

5(2 – 3x) -17(2x – 5) = 16

On expanding the brackets, we get (5 × 2) – (5 × 3x) – (17 × 2x) + (17 × 5) = 16

10 – 15x – 34x + 85 = 16

10 + 85 – 34x – 15x = 16

95 – 49x = 16

Subtracting 95 from both sides, we get – 49x + 95 – 95 = 16 – 95

-49x = -79

Dividing both sides by – 49, we get

LHS = RHS

Hence, verified.

Question: 21

Solution:

Adding 2 to both sides, we get

Question: 22

5(x – 2) +3(x + 1) = 25

Solution:

5(x – 2) + 3(x + 1) = 25

On expanding the brackets, we get

(5 × x) – (5 × 2) +3×  x + 3× 1 = 25

5x – 10 + 3x + 3 = 25

5x + 3x – 10 + 3 = 25

8x – 7 = 25

Adding 7 to both sides, we get

8x – 7 + 7 = 25 + 7

8x = 32

Dividing both sides by 8, we get

8x/8 = 32/8

x = 4

Verification :

Substituting x = 4 in LHS, we get

= 5(4 – 2) + 3(4 + 1) = 5(2) + 3(5) = 10 + 15 = 25 = RHS

LHS = RHS

Hence, verified.

### Course Features

• 728 Video Lectures
• Revision Notes
• Previous Year Papers
• Mind Map
• Study Planner
• NCERT Solutions
• Discussion Forum
• Test paper with Video Solution


text:
# Homotopy connectedness

I am trying to prove the following statement:

Let $X,Y$ be two homotopy equivalent topological spaces. If $X$ is connected then $Y$ is connected.

So far, this is my attempt: If $X,Y$ are homotopy equivalent then exist a continuous function $f: X \rightarrow Y$ (homotopy equivalence). For the principal theorem of connectedness then $f(X)$ is connected in $Y$. Suppose $Y$ is not connected, then exists a separation (namely a couple of nonempty open sets $\{U,V \}$ of $Y$) such that $Y=U \cup V$ (disjoint union). $f(X)$ is connected in $Y$ means that $f(X) \subset U$ or $f(X) \subset V$. Now I want to use the fact that exist unique map called homotopy inverse $g:Y \rightarrow X$ such that $g \circ f \sim id_X$ (where $\sim$ stands for homotopy equivalent) and I want to find a contradiction, but nothing comes into my mind at the moment. Any hint? thank you in advance

• Think about the composition $fg \sim id_Y$ instead. What has to happen to the points you know exist in $U, V$ when you apply this homotopy? – Zach L. Apr 23 '16 at 13:38

So $f\circ g \equiv Id_Y$ i.e $H:Y\times I\to Y$ is a continuous map and $H(y,0)=f\circ g (y)$ and $H(y,1)=y$. $Img(f\circ g) \subset U$ (lets say). Then consider the path $\gamma (t)=H(v,t)$. This connect $U$ with a point in $V$. But $U,V$ are disjoint open sets so they cannot be connected by a path. (Contradiction).