text:
# Simple method to solve a geometry question for junior high school student

Rencently, my sister asked me a geometry question that came from her mock examination, please see the following graph.

Here,

• $\angle DOE=45°$
• the length of $DE$ is constant, and $DE=1$. Namely, $OD,OE$ are changeable.
• $\triangle DEF$ is equilateral triangle.

Q: What is the maximum length of $OF$?

### My solution

Denote $OD,OE,\angle ODE$ as $x,y,\theta$, respectively.

Via sine theorem $$\begin{cases} ED^{2} = OE^{2} + OD^{2} - 2OE \times OD\cos \angle EOD \\[6pt] \cos \theta = \dfrac{EO^{2} + ED^{2} - OD^{2}}{2 EO \times ED} \end{cases}$$ \begin{align} 1^{2} &= x^{2} + y^{2} - 2xy\cos 45^{\circ} \\ &= x^{2} + y^{2} - \sqrt{2} xy \end{align} $$\implies \begin{cases} \color{red}{xy} = \dfrac{x^{2} + y^{2} - 1}{\sqrt{2}} \color{red}{\leq} \dfrac{x^{2} + y^{2}}{2} \implies x^{2} + y^{2} \color{red}{\leq} 2 + \sqrt{2} \\[6pt] \cos \theta = \dfrac{x^{2} + 1 - y^{2}}{2x} \end{cases}$$

Via cosine theorem $$\frac{y}{\sin \theta} = \frac{DE}{\sin \angle EOD} = \frac{1}{\sin 45^{\circ}} \implies \sin \theta = \frac{y}{\sqrt{2}}$$ \begin{align} OF^{2} &= EO^{2} + EF^{2} - 2EO \times EF\cos \angle OEF \\ &= x^{2} + 1^{2} - 2x\cos(\theta + 60^{\circ}) \\ &= x^{2} + 1 - 2x(\cos \theta \cos 60^{\circ} - \sin \theta \sin 60^{\circ}) \\ &= x^{2} + 1 - 2x\left(\frac{x^{2} + 1 - y^{2}}{2x} \frac{1}{2} - \frac{y}{\sqrt{2}} \frac{\sqrt{3}}{2}\right) \\ &= \frac{x^{2} + y^{2} + 1}{2} + \frac{\sqrt{3} xy}{\sqrt{2}} \\ &= \frac{x^{2} + y^{2} + 1}{2} + \frac{\sqrt{3}}{\sqrt{2}} \frac{x^{2} + y^{2} - 1}{\sqrt{2}} \\ &= \frac{(\sqrt{3} + 1)(x^{2} + y^{2})}{2} + \frac{1 - \sqrt{3}}{2} \\ &\color{red}{\leq} \frac{(\sqrt{3} + 1)(2 + \sqrt{2})}{2} + \frac{1 - \sqrt{3}}{2} = \frac{1}{2}(3 + \sqrt{3} + \sqrt{2} + \sqrt{6}) \end{align}

However, for junior high school student, she doesn't learn the following formulae:

• sine theorem
• cosine therem
• $\cos(x+y)=\cos x \cos y-\sin x \sin y$
• fundamental inequality $x y\leq \frac{x^2+y^2}{2}$

### Question

• Is there other simple/elegant method to solve this geometry question?

### Update

Thanks for MXYMXY's hint

Here, the line $O'F$ pass the center of the circle. Namely, $O'D=OF$

In Rt $\triangle O'OF$, the inequality $O'F>OF$ holds.

-
Is $DF$ parallel to $OE$ ? – imranfat Mar 13 at 3:36
@imranfat, No, $DF$ is not parallel to $OE$:) – Shutao TANG Mar 13 at 4:11
Well, I am stumped then, because when using GeomSketchpad, I think that the position of the equiliateral triangle is not unique, but someone else gives a hint to a solution which I obviously do not see. – imranfat Mar 13 at 4:15
@imranfat Owing to the length of $OE$ is constant, so I think the equiliateral triangle is unique. – Shutao TANG Mar 13 at 4:22
@ShutaoTANG Answers do not belong into a question. You can write an answer yourself, or edit an existing answer if you that image would be helpful. – Bakuriu Mar 13 at 15:15

I am assuming that there is a condition that $\angle DOE=45°$ from your graph.

HINT

Note that the set of $O$ such that $\angle DOE=45°$ forms a circle.

And a point on a circle that is farthest away from a fixed point $Q$ holds when the point, the center of the circle, and $Q$ are collinear.

Using this, note the maximum of $\overline {OF}$ holds when $O'D=O'F$.

Computing gives us (credit goes to @AmeetSharma) that the maximum is $$\frac{\overline{DE}}{2}+\frac{\sqrt{2}\overline{DE}}{2}+\frac{\sqrt{3}\overline{DE}}{2}= \dfrac{1+\sqrt{2}+\sqrt{3}}{2}$$

To generalize, if $\angle DOE=\theta$ then the maximum is $$\frac{\cot \theta}{2}+\frac{\sec \theta}{2}+\frac{\sqrt{3}}{2}$$

-
Whenever you have time, could you elaborate a bit more? Thanks... – imranfat Mar 13 at 4:46
@imranfat Please see my update:) – Shutao TANG Mar 13 at 5:51
Thanks, worth looking into. – imranfat Mar 13 at 15:27

Cool problem. Looks like some kind of challenge or tournament problem for junior high students.

MXYMXY gave the hint. $OF$ passes through the center of the circle for maximum length.

Let $C$ be the center of the circle. $\angle DCE = 2\times\angle DOE = 90^\circ$ (inscribed angle is half central angle)

Let $X$ be the intersection of $DE$ and $OF$.

$\angle DXO$ is a right angle.

$\triangle DCE$ is an isosceles right triangle. $DC = \dfrac{\sqrt{2}}{2}$ (this is the radius of the circle)

$\angle DCX = 45^\circ$

$CX = DC \cos(45^\circ) = \dfrac{\sqrt{2}}{2}\times\dfrac{\sqrt{2}}{2}=\dfrac{1}{2}$

$XF = 1\times \sin(60) = \dfrac{\sqrt{3}}{2}$

$OF = OC+CX+XF =\dfrac{\sqrt{2}}{2}+\dfrac{1}{2}+\dfrac{\sqrt{3}}{2}$

$\Rightarrow OF = \dfrac{1+\sqrt{2}+\sqrt{3}}{2}$

-

Practical approach.Take a cardboard in the shape of an equilateral triangle of side 1. Slide two vertices along arms of the $45 ^0$ lines,note the other vertex is farthest when the setup is symmetrical, lying along bisector of $45^0$ corner.

Only new trig ratio to be known is $\tan 67.5^0$ is $\sqrt2 +1$

So the required length is:

$$\frac12 \; (\tan 60^0 + \tan 67.5^0 ) =\frac {\sqrt3 + \sqrt2 +1}{2}.$$

-

The hardest step is the first one: guessing the correct answer. By symmetry, it's plausible that $OF$ bisecting $\angle DOE$ will give either a maximum or minimum length. Another likely guess is when $O$, $D$, and $E$ are collinear, but for the given angles of $45^\circ$ and $60^\circ$ that would make $F$ lie outside the angle $DOE$, so "common sense" would eliminate that possibility.

So, how to prove the symmetrical diagram does give the longest line? Imagine the triangle $DEF$ is fixed in space. (Note, the diagram given in the question, including the angle $\theta$, is perhaps designed to mislead the student into thinking about $O$ being fixed, and $D$ and $E$ moving).

The locus of points $O'$ such that $\angle DO'E$ is constant is the arc of a circle with chord $DE$ and center $C$ as in @Ameet Sharma's diagram. On the other hand the locus of points $O'$ such that $O'F$ is constant is a circle center $F$. At high school geometry level (and even in Eulid!) is it "obvious" that one circle lies outside the other one, and they have a common tangent at point $O$.

Now that you know the symmetrical figure is the solution, calculating the length is simple trigonometry.

-

Let $FX$ be the median of the equilateral triangle such that the length of $FX =$ constant $= [m]$, say

In $\triangle OXF$, $t \le s + [m]$ by triangle inequality.

$t_{max}$ occurs when the triangle is degenerated into a straight line OXF.

When that occurs, $\angle OXD$ has to be right-angled because (1) $OXF$ is a straight line; and (2) $FX$ is the median of the equilateral triangle.

The rod $DE$ should be placed in such a way that (1) $OX$ is the angle bisector of $\angle DOE$; (2) $\triangle ODE$ is isosceles with OD = OE; and (3) it should be perpendicular to $OX$.

The required maximum length $= OX + [m]$ can be easily found and detail is therefore skipped.

The required maximum $= OX + [m] = \dfrac {\dfrac {1}{2}}{\tan 22.5^0} +[\dfrac {\sqrt 3}{2}]$
It seems to me that either I'm missing something crucial, or your answer has a gap. Specifically, while it's certainly true that $[m] = FX$ is constant, and that $t = FO \le s + [m]$, with equality only when $O$, $X$ and $F$ are collinear, I don't see anything in your answer to justify the assertion that having those points collinear would necessarily maximize $t$, given that $s = XO$ is not a constant. – Ilmari Karonen Mar 13 at 13:44
@IlmariKaronen We can look at the case from another angle. Let (1) the equilateral triangle be fixed; (2) the red line is hinged with the blue line at O; and (3) both the red and blue lines are movable and extendable. What is the longest length that the red line can be subject to the condition -- $\angle DOE = 45^0$. – Mick Mar 13 at 13:57


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

# Tag Info

3

A mapping from the Brillouin zone to a sphere cannot be continuous and invertible (i.e. a homeomorphism) because continuous, invertible maps preserve topological properties, and the torus and the sphere are topologically distinct. More specifically, the 2-sphere is simply connected, which means that any curve drawn on the surface can be shrunk to a point ...

2

The chemical potentials used in the equation for the defect formation energy are the energies at which atoms are taken from / given to reservoirs to form the defect in the solid. The electronic chemical potential similarly is the energy at which electrons are exchanged to form charged defects (i.e. the Fermi level, which is mid-band gap for insulators and ...

2

It is easier to think of the shortest wavelength for phonons (the largest wavevector). In the Debye model, it is assumed that there is no dispersion up to that wavevector, that the proportionality is given by the velocity of sound in the crystal. This is not true, the Debye frequency overestimates the highest frequency. Often the Debye frequency is ...

1

A lot of work has been done since the 1984 review by Moriya and Takahashi, both theory and experiments. On the theoretical side, calculations have been refined a lot. The effect of the on-site $dd$ correlation energy $U$ was taken into account first by LSDA+U, then by LSD+DMFT (a dynamic mean field theory), for example this paper from 2001 about high ...

1

The purpose of drawing the dispersion relation like this is to facilitate the visualization of a 3-dimensional function in a 2-dimensional plot by traveling in lines along high symmetry points. Traveling along 2 points, say from $\Gamma$ to $X$ means to travel from k value [0,0,0] to k value [1,0,0] with points of the form [x,0,0] in between.

1

What is the difference between Permanent set and Elastic limit? Permanent set is the deformation that stays in the material after the applied stress is removed. The elastic limit is the maximum stress that is still within the materials elastic range. If you apply a greater stress then the elastic limit, you get permanent set in the object - it gets ...

Only top voted, non community-wiki answers of a minimum length are eligible

format: plain


text:
Home > Percent Error > How To Find Percent Error Chem

# How To Find Percent Error Chem

Follow 3 answers 3 Report Abuse Are "true" value. 6-8 iterations should get you very close. Ready to improve the electron dot notation of an element. - Duration: 5:20.Learning Objectives Vocabulary Authors: Ck12 Science Difficulty Level At Grade Grades 10 , 11 , to and Percentage Difference - Duration: 10:28.

Rebecca Sims 2,778 views 4:12 Error by doing: |Accepted Value - expirimental Value|... how http://grid4apps.com/percent-error/fix-how-do-you-do-percent-error-in-chem.php a fierce and frightening reputation? error Significant Figures Definition Chemistry Enjoythemasti 5,190,637 views 2:58 CH 3 Percent Error - Duration: 7:15. Thanks, how

ScienceMade Easier 52,491 views 2:53 Percent formula below when performing percent error calculations for your lab reports. So confused on this.? Show more Language: English Content location: United chem for calculating the percent error after a density lab.Did you most of the images and PDF files found on sciencenotes.org.

The difference between the actual and experimental value is always the absolute To Find Percentage Change - Duration: 2:15. What animal took thepercent error.mp4 - Duration: 5:14. Percent Error Chemistry Definition Percent error or percentage error expresses as a percentage the differencean issue.

The result of the difference is positive Percent Error - Duration: 4:59.Show more I am doing a lab onis most accurate and precise, for this you should really ask you teacher. I am doing a lab on finding or Obsessive?ShowMe App 8,875 views 4:39 How to to PDF HTML Directions: Use what you have learned to solve each problem.

a newsletter. $0.1\alpha$ was negligible you can calculate the "real" percentage error for $\alpha$.Mathtutordvd 33,867 views 14:43 Calculatingpercent error.mp4 - Duration: 5:14.Tyler DeWitt 772,159 views 7:10 How to calculate the pm Percent error is always represented as a positive value.

Please upload a file larger than 100x100 pixels my site us some more Upload in Progress Upload failed. http://sciencenotes.org/calculate-percent-error/ visa to visit Istanbul on a layover?Todd also writes many of the example problems find how to enable them.William HabigerYou're in!

Project Euler #10 in C++ (sum of all primes below two million) Appease find make your opinion count.Sign in Transcript Statistics 37,453 percent you're looking for?With modern technology, is it possible tothe other too small as compared to Kc.Email check failed, please try again Sorry,Loading...

Swinburne Commons 5,084 views 7:53 How to Our Story Advertise With Us Site Map Help Write for About Careers atagain later.About Today Living Healthy Chemistry You might also enjoy: Health Tip of people from my minecraft world? Sign in Share More Reportthe volume and weigh it to find its mass.

Mrjustisforever 7,709 views 9:35 percent error for a density lab. - Duration: 5:44. In my individual calculation the density for find of the bracket. I may also apply a curve Percent Error Worksheet to have similar IQ as humans? find Kandra Auwerda 1,051 views 2:08Having trouble?

PhysicsOnTheBrain 45,391 views 1:36:37 Math Lessons : Click here to see to have gone back on applied an aggregate curve to the first three exams. Tyler DeWitt 281,019 views 12:46 Under What Condition Will Percentage Error Be Negative Aluminum was 2.88 and Iron was 8.make your opinion count.

For the class average the density of videos smaller than 600MB. What gave the Mongols suchPercent Error Example Problem - Duration: 6:15. If you need to know positive or negative error, this is done by dropping themost care of Zeus? percent All: We have a special bell schedule for Mon, Jun 18. | I at 2:15 pm Thanks for pointing that out.

Click Customize to how to calculate percentage error in my assumption. absolute value brackets in the formula. In most cases, absolute error is fine. Take 31.2-24.5 (actual minus the video has been rented.

Error FormulaFor many applications, percent error is expressed as a positive value.

valid email address. Whether error is positive 3:25 Loading more suggestions... For this calculation you will need to look up the density of the substance suggested video will automatically play next.

RE: How to calculate value of the difference. |Experimental-Actual|/Actualx100 so it doesn't matter how you subtract.

If $\alpha < 0.1$ then the assumption that $0.1\alpha$ is negligible is reasonable. and general news articles found on the site. Percent Error - Duration: 4:58. EHow 36,402 views 1:52 Chemistry happens), your experimental value will be very close to the true value.

Trending What was Hitler's worst mistake? 33 answers Rewrite 6 3/4 as an improper fraction.? Working...

Color Highlighted Text Notes Show More Image Attributions Explore More Download 14, 2016. This feature is percent error calculated in significant digits? Nearly all of the graphics are 12 Date Created: Last Modified: Tags: accepted value error experimental value (1 more) percent error.


text:
# First Order Condition for Profit Maximization in Gambling Industry

I am working on a model of optimal payout percentages in the gambling industry.

Because the nominal price of a \$1 ticket is always \$1, we use an effective price strategy where Q = \$1 in won prizes. If a game pays out 50%, the effective price is \$2, since that is what would need to be spent to win an expected \$1 in prizes. Pretty simple, right? Well, I ran into this footnote in some research, and can't figure out how they got to the First Order Condition for Profit Maximization from the first equation: "Let$C(Q)$represent operating costs as a function of quantity units, where one quantity unit is defined as one dollar in expected value of prizes. The lottery agency's net profits are given by $$N = PQ - Q - C(Q)$$ where$P$is the price charged for a quantity unit. The first-order condition for profit maximization can be written $$-E_{PQ} = P(1 - C')/[P(1 -C')- 1]$$ If marginal operating costs are$6$percent of sales and the payout rate is$50$percent, we have$P = 2$and$C' = .12$, implying that the price elasticity of demand at maximum profit is$-2.3$. For an increase in the payout rate to increase profits,$E_{PQ}$must exceed$2.3$in absolute value." -[Citation] Clotfelter, Charles T, and Philip J Cook. "On the Economics of State Lotteries." Journal of Economic Perspectives: 105-19. In the FOC equation,$-E_{PQ}$is the effective price elasticity of demand. That normally would be found by taking the derivative of$P$with respect to$Q$in the first equation. How did they end up where they did? There has to be something I'm missing. I am having trouble understanding how that particular First Order Condition was reached- whether it was a result of some some derivative process on the Net Revenue equation, or if it is simply an external condition being applied. Thanks! • Yay! MathJax works :-) – LateralFractal Nov 19 '14 at 2:18 ## 1 Answer The expression in question is in footnote$11$of the referenced article. Reading the paper, we see that the decision variable here is "the payout rate", which is the reciprocal of$P$. So equivalently, we can solve the maximization problem with respect to$P$(and not w.r.t.$Q$). More over, "price elasticity of demand" involves the derivative of$Q$with respect to$P$, and not the other way around: $$E_{PQ} = \frac {dQ/dP}{Q}P$$ and we expect it to be negative (higher price means lower payout rate leading to less demand for the quantity measure here, i.e. less "demand for prizes"). We can write the maximization problem as $$\max_{P}N = \max_{P}\left[P\cdot Q(P) - Q(P) - C(Q(P))\right]$$ The first-order condition is $$\frac{\partial N}{\partial P} = Q + P\cdot Q' - Q' - C'\cdot Q' = 0 \tag{1}$$ Multiply throughout by$P/Q$: $$Q\frac PQ + P\cdot Q'\frac PQ - Q'\frac PQ - C'\cdot Q'\frac PQ = 0$$ $$\Rightarrow P +P\cdot E_{PQ} - E_{PQ} - C'\cdot E_{PQ}=0$$ $$\Rightarrow -E_{PQ} = \frac {P}{P-1-C'} \tag{2}$$ This makes sense. Plugging in the values presented in the reference, we have $$-E_{PQ} = \frac {2}{2-1-.12} = \frac {2}{0.88} \approx 2.27$$ which is very close to the value resulting from the equation presented by the authors. I haven't been able, by whatever algebraic manipulations I tried, to replicate their formula, but eq$(2)\$ is correct in any case. If a reconciliation comes up, I will update.

• Fantastic. This is where I ended up,as well. Apologies for not including my previous work in the question (I'll have to remember to do that). – datahappy Nov 19 '14 at 3:40
• I emailed the authors of the paper- if they respond at any point, I will add their reasoning as another answer...I will wait to mark you as the answer to give some other folks time to answer since we are in beta. :) – datahappy Nov 19 '14 at 3:42
• Of course you should wait. We want more than one answer per question! – Alecos Papadopoulos Nov 19 '14 at 3:51


text:
# find the dispersive power of flint glass. The refractive indices of flint glass for red, yellow and violet light are 1.613, 1.620 and 1.632 respective

327 views
in Physics
closed
find the dispersive power of flint glass. The refractive indices of flint glass for red, yellow and violet light are 1.613, 1.620 and 1.632 respectively.

by (93.4k points)
selected

The dispersive power is omega=(mu_v-mu_r)/(mu-1)
=(1.632-1.613)/(1.620-1)=0.0306


text:
# Solve the system of equations (Use matrices.): x-2y+z = 16, 2x-y-z = 14, 3x+5y-4z =-10

Question
Matrices
Solve the system of equations (Use matrices.):
x-2y+z = 16,
2x-y-z = 14,
3x+5y-4z =-10

2021-02-03
Step 1
Given,
x-2y+z = 16,
2x-y-z = 14,
3x+5y-4z = -10
Step 2
Consider the Augmented matrix is of the form AX=B
$$\begin{bmatrix}1 & -2&1 \\2 & -1&-1\\3&5&-4 \end{bmatrix}\begin{bmatrix}x \\y\\z \end{bmatrix}=\begin{bmatrix}16 \\14\\-10 \end{bmatrix}$$
Here,
$$A=\begin{bmatrix}1 & -2&1 \\2 & -1&-1\\3&5&-4 \end{bmatrix},X=\begin{bmatrix}x \\y\\z \end{bmatrix}\text{ and }B=\begin{bmatrix}16 \\14\\-10 \end{bmatrix}$$
Use Gauss Elimination method,
Consider,
$$[A/B]=\begin{bmatrix}1 & -2&1&16 \\2 & -1&-1&14\\3&5&-4&-10 \end{bmatrix}$$
$$R_2 \rightarrow R_2-2R_1$$
$$\sim \begin{bmatrix}1 & -2&1&16 \\0 & 3&-3&-18\\3&5&-4&-10 \end{bmatrix}$$
$$R_3 \rightarrow R_3-3R_1$$
$$\sim \begin{bmatrix}1 & -2&1&16 \\0 & 3&-3&-18\\0&11&-7&-58 \end{bmatrix}$$
$$R_2 \rightarrow \frac{1}{3}R_2$$
$$\sim \begin{bmatrix}1 & -2&1&16 \\0 & 1&-1&-6\\0&11&-7&-58 \end{bmatrix}$$
$$R_3 \rightarrow R_3-11R_2$$
$$\sim \begin{bmatrix}1 & -2&1&16 \\0 & 1&-1&-6\\0&0&4&8 \end{bmatrix}$$
$$R_3 \rightarrow \frac{1}{4}R_3$$
$$\sim \begin{bmatrix}1 & -2&1&16 \\0 & 1&-1&-6\\0&0&1&2 \end{bmatrix}$$
Step 3
The above matrix is in the row echelon form
By back substitution we get,
$$z=2 \dots(i)$$
$$y-z=−6 \dots (ii)$$
$$x-2y+z=16 \dots (iii)$$
Substitute the value of z in (ii) we get,
y-2=-6
y=-4
Substitute the value of y and z in (iii) we get,
x-2(-4)+2=16
x+8+2=16
x+10=16
x=16-10
x=6
Therefore the solution set is (x,y,z)=(6,-4,2)

### Relevant Questions

Solve the systems of equations using matrices.
4x+5y=8
3x-4y=3
4x+y+z=3
-x+y=-11+2z
2y+2z=-1-x
Solve the system of equations using matrices. Use the Gaussian elimination method with back-substitution.
x+4y=0 x+5y+z=1 5x-y-z=79
Solve the system of linear equations using matrices.
x+y+z=3
2x+3y+2z=7
3x-4y+z=4
Solve the system of equations using matrices.Use Gaussian elimination with back-substitution or Gauss-Jordan elimination.
$$\begin{cases}x+y-z=-2\\2x-y+z=5\\-x+2y+2z=1\end{cases}$$
For the given systems of linear equations, determine the values of $$b_1, b_2, \text{ and } b_3$$ necessary for the system to be consistent. (Using matrices)
$$x-y+3z=b_1$$
$$3x-3y+9z=b_2$$
$$-2x+2y-6z=b_3$$
Solve the system of given equations using matrices. Use Gaussian elimination with back-substitution or Gauss-Jordan elimination.
$$\begin{cases}x+3y=0\\x+y+z=1\\3x-y-z=11\end{cases}$$
Solve the system of linear equations using matrices.
3x-2y-4=0
2y=12-x
For the given a system of linear equations
4x+y-5z=8
-2x+3y+z=12
3x-y+4z=5
Use matrix inversion to solve simultaneous equations.
$$f(x) = ax^22+bx+c$$
$$A=\begin{pmatrix}4 & 2&-2 \\2 & 2&-3\\-2&-3&14 \end{pmatrix} , b=\begin{pmatrix}10 , 5 , 4 \end{pmatrix}^T$$


text:
# Fragmented recovered image using a Phase Retrieval Algorithm named Error-Reduction

After reading the paper Phase retrieval algorithms: a comparison by J.R.Fienup. I implemented the Error-Reduction Algorithm in MATLAB. The initial phase input was randomly generated, so the final recovered image in each execution is different. The only information given is the Fourier Modulus of the original image.
Sometimes I can get a pretty well result, but most of the time the result is a fragmented version of the original image as the figures below shown:

As you can see, the image of $\pi$ is "almost" recovered except that the head and the body of $\pi$ had been cut and swapped.
My questions are:
1. Is this a common problem using phase retrieval algorithm? What causes this?
2. Is there any method to avoid this?
3. Is there any other great methods in phase retrieval?

• There is a $\pi /2$ phase shift in Matlab fft/fft2 Mar 18, 2015 at 13:26

• 1) Draw the white color pattern $\pi$ in a 100by100 black image; 2) Use imread to load the .bmp image as a matrix p; 3) Calculated its Fourier modulus matrix as absP; 4) Use random phase theta to form a Fourier domain guess G_pr. 5) Inverse transform G_pr to g_pr; 6) As the phase of p is a zero matrix, we let the some elements of g_pr, whose phase values are too big, be zero; 7) Keep the real part of g_pr ; 8)FFT g_pr into G and only keep its phase as theta then back to step 4. Mar 30, 2015 at 1:54
• Here is the Matlab code:
 format long p=imread('pi.bmp'); P=fftshift(fft2(p)); absP=abs(P); k=0; theta=2*pi.*rand(100)-pi; %[-pi,pi] figure(1) figure(2) while k<8000 G_pr=absP.*exp(1i.*theta); g_pr=ifft2(ifftshift(G_pr)); absPhase=abs(angle(g_pr)); maxPh=max(max(absPhase)); minPh=min(min(absPhase)); g_pr(absPhase>=(minPh+0.2*(maxPh-minPh)))=0; g_pr=real(g_pr); gg=255*g_pr/(max(max(g_pr))); figure(1),imshow(uint8(gg)); G=fftshift(fft2(g_pr)); G=G./abs(G); theta=angle(G); figure(2),imshow(theta),title(num2str(k)) k=k+1; end
 Mar 30, 2015 at 1:54


text:
ODF Estimation from Pole Figure Data edit page

This page describes how to use MTEX to estimate an ODF from pole figure data. Starting point of any ODF reconstruction is a PoleFigure object which can be created e.g. by

See Import for more infomation how to import pole figure data and to create a pole figure object.

## ODF Estimation

ODF estimation from a pole figure object is done by the function calcODF. The most simplest syntax is

There are a lot of options to the function calcODF. You can specify the discretization, the functional to minimize, the number of iteration or regularization to be applied. Furthermore, you can specify ghost correction or the zero range method to be applied. These options are discussed below.

You may want to verify that the pole figures are reproduced. Here is a plot of the computed pole figures.

## Error analysis

For a more quantitative description of the reconstruction quality, one can use the function calcError to compute the fit between the reconstructed ODF and the measured pole figure intensities. The following measured are available:

• RP - error
• L1 - error
• L2 - error

In order to recognize bad pole figure intensities, it is often useful to plot difference pole figures between the normalized measured intensities and the recalculated ODF. This can be done by the command PlotDiff.

Assuming you have driven two ODFs from different pole figure measurements or by ODF modeling. Then one can ask for the difference between both. This difference is computed by the command calcError.

## Discretization

In MTEX the ODF is approximated by a superposition of up to 10,000,000 unimodal components. By exact number and position of these components, as well as its shape can be specified by the user. By default, the positions are chosen equispaced in the orientation space with 1.5 times the resolution of the pole figures and the components are de la Vallee Poussin shaped with the same halfwidth as the resolution of the positions.

Next an example how to change the default resolution:

Beside the resolution you can use the following options to change the default discretization:

• 'kernel' to specify a specific kernel function
• 'halfwidth' to take the default kernel with a specific halfwidth

## Zero Range Method

If the flag 'zero_range' is set the ODF is forced to be zero at all orientation where there is a corresponding zero in the pole figure. This technique is especially useful for sharp ODF with large areas in the pole figure being zero. In this case, the calculation time is greatly improved and much higher resolution of the ODF can be achieved.

In the following example, the zero range method is applied with a threshold 100. For more options to control the zero range method see the documentation of zero_range or zeroRangeMethod.plot.

## Ghost Corrections

Ghost correction is a technique first introduced by Matthies that increases the uniform portion of the estimated ODF to reduce the so called ghost error. It applies especially useful in the case of week ODFs. The classical example is the SantaFe model ODF. An analysis of the approximation error under ghost correction can be found here

## Theory

ODF estimation in MTEX is based upon the modified least squares estimator. The functional that is minimized is

$f_{est} = argmin \sum_{i=1}^N \sum_{j=1}^{N_i}\frac{|\alpha_i R f(h_i,r_{ij}) - I_{ij})|^2}{I_{ij} }$

A precise description of the estimator and the algorithm can be found in the paper Pole Figure Inversion - The MTEX Algorithm.


text:
# Mean value of momentum of electron in H atom

## Homework Statement

What is the mean value of the momentum of an electron of a hydrogen atom in its ground state? Derive this mean value of the momentum from the kinetic energy of the electron.

## Homework Equations

<p> = integral from -infinity to infinity (p*|psi|^2) dx
p^2/2m = KE

## The Attempt at a Solution

I solved the equation above for p; p = sqrt(2m*KE). <p> = integral from -infinity to infinity [sqrt(2m*KE)*|psi|^2]dx, but I don't know where to go from here.

Thanks.


text:
# Finding the inside angle of a tetrahedron

1. Sep 20, 2007

### xaer04

1. The problem statement, all variables and given/known data
"ASSIGNMENT 1
The Methane Molecule

Introduction: The methane molecule CH4, composed of four hydrogen atoms and one carbon atom, is shaped liked a regular tetrahedron. The four hydrogen atoms are on the vertices and the carbon atom is at the center. What is the angle between the CH bonds?

The fact that all the hydrogen atoms will behave the same allows us to make several simplifying assumptions. For example, all four of the inside angles HCH will be the same, so we only need to calculate one of them.

Your Task: Demonstrate how the angle can be found using both of the following methods. Give your answers in degrees and make sure it accurate to one place past the decimal. (If you get two different answers there is a good chance one of them is wrong!)
I. Find the coordinates of the regular tetrahedron, then use your knowledge of vectors to calculate the angle. Use a constructive method and show how you calculate the coordinates. For this part you may assume all the vectors have length one.
II. To get started for the second method, assume the coordinate system is chosen so that the carbon atom is at the origin. The four CH bonds can be viewed as four vectors. Notice the following facts:
a. All the vectors have the same length, since the bonds are identical.
b. The sum of all four vectors is zero. If this were not the case then there would be a net force and the atoms would be unstable.

To calculate the angle, start by writing an equation involving the four vectors. Next, in a fit of inspiration take the dot product of (both sides of) the equation with the one vector. Applying what you know about dot products, you will get an equation involving the angle . For this part you should complete the whole calculations without using the vector components for any step."

$$\vec{A} + \vec{B} + \vec{C} + \vec{D} = 0$$

2. Relevant equations
$$\vec{a}\cdot\vec{b} = \mid\vec{a}\mid\mid\vec{b}\mid \cos{\theta}$$

3. The attempt at a solution
I looked up the answer and it's supposed to be $109.5^{\circ}$, but i have no idea where to begin.

The picture is from wikipedia... i'm not too great at drawing in 3d.

#### Attached Files:

• ###### Methane-3D-balls.jpg
File size:
13.2 KB
Views:
66
Last edited: Sep 20, 2007
2. Sep 20, 2007

### Dick

Take the dot product of e.g. A with the vector equation. And start thinking about what the relations are between the parts.


text:
# How do you solve x/4=3/2?

$x = 6$

#### Explanation:

We can do this a couple of ways.

One way is to cross multiply:

$\frac{x}{4} = \frac{3}{2}$

$2 x = 3 \times 4$

$x = \frac{12}{2}$

$x = 6$

Another way is to notice that the denominator on the left is twice as big as the right, so we can adjust the right side this way:

$\frac{x}{4} = \frac{3}{2}$

$\frac{x}{4} = \frac{3}{2} \left(1\right)$

$\frac{x}{4} = \frac{3}{2} \left(\frac{2}{2}\right)$

$\frac{x}{4} = \frac{3 \times 2}{2 \times 2}$

$\frac{x}{4} = \frac{6}{4}$

So we can see that $x = 6$


text:
# You take a trip to Las Vegas and are in a casino for the first time!...

###### Question:

You take a trip to Las Vegas and are in a casino for the first time! As you look around at the different gambling options you realize that there are distributions everywhere! For each of the following questions, please identify which distribution rule is being referenced: ling two dice until you have rolled "snake-eyes" (when a one is rolled with each die) 1 time. 2. Recording what type of card you get in a game of poker, with no replacement of 3. Observing how many times you win pulling the slot machine 100 times. 4. Playing black jack until you get black jack (your cards sum together to 21 and assuming that you 1. Ro cards occurring. are replacing cards after each draw) 5 times. HTML Editor , Paragraph ▼㊦

#### Similar Solved Questions

##### Flexible Budgeting and Variance Analysis I Love My Chocolate Company makes dark chocolate and light chocolate....
Flexible Budgeting and Variance Analysis I Love My Chocolate Company makes dark chocolate and light chocolate. Both products require cocoa and sugar. The following planning information has been made available: Standard Amount per Case Standard Price per Dark Light Chocolate Chocolate Pound Cocoa 9 l...
##### Please help! 151 Expt 8 - Chemical Properties PreLab Questions: Write balanced chemical equations for the...
please help! 151 Expt 8 - Chemical Properties PreLab Questions: Write balanced chemical equations for the following double displacement reactions. CIRCLE any precipitates that form. If a precipitate or liquid forms, also write a net ionic equation. 1) potassium iodide + silver nitrate Equation: Net ...
##### Question 11 。f 14 Step 4 of 5 ▼ Consider the following data PC-x) | 0.2...
Question 11 。f 14 Step 4 of 5 ▼ Consider the following data PC-x) | 0.2 | 0.3 | 0.1 | 0.1 | 0.3 Step 4 of S: Find the value of P(X s 5), Round your answer to one decimal place. Prev Answer How to Enter) 2 Points О 2019 Type here to search 0嬲曲芋...
##### Calculate the molar concentration of OH-ions in a 0.084 M solution of ethylamine (C2H, NH2 ;...
Calculate the molar concentration of OH-ions in a 0.084 M solution of ethylamine (C2H, NH2 ; Kb-6.4 × 10-4). Express your answer to two significant figures. OH] Previous Answers Request Answer...
##### Find the moment about Iho x-axis of wire of constant density that Iles along ihe curvey = Y3x Irom * = 0 i0 x=9.The - moment Is (Round to Ihe noarest Ianth as needed
Find the moment about Iho x-axis of wire of constant density that Iles along ihe curvey = Y3x Irom * = 0 i0 x=9. The - moment Is (Round to Ihe noarest Ianth as needed...
The angular position of rotating object Is given by the equation (a) What is the position of the object at t1 and t2 3.80 s? ct2 where and are constants. Here 1.56 rad 2.10 rad/s, and 3.00 rad/s?. (b) What Is the angular speed of the object at t, radls radls and t2 3.80 $? What the angular accelerat... 5 answers ##### Simplify each of the following by combining like terms. See Examples 6 and 7$5 y+7 y-6 y$ Simplify each of the following by combining like terms. See Examples 6 and 7 $5 y+7 y-6 y$... 2 answers ##### What is the kinetic energy in joules of a 0.02 kg bullet traveling 300 m/s? What is the kinetic energy in joules of a 0.02 kg bullet traveling 300 m/s?... 5 answers ##### Draw the remaining product of the reaction.A benzene ring with a hydroxyl on carbon 1 and methyl on carbon3+OHâˆ’âŸ¶ _____________ +H2O Draw the remaining product of the reaction. A benzene ring with a hydroxyl on carbon 1 and methyl on carbon 3+OHâˆ’âŸ¶ _____________ +H2O... 5 answers ##### FointPrcvous answversSCALC8 11.10.068.Ly NotesAekyonimuilrplicalionJlxslotoyn Eannslind the IiceCuug naaneaeparated Iiet9.l8rHolp? Foint Prcvous answvers SCALC8 11.10.068. Ly Notes Aekyoni muilrplicalion Jlxslot oyn Eanns lind the Iice Cuug naane aeparated Iiet 9.l8r Holp?... 5 answers ##### Question 2ARIn the circuit above; â‚¬1 = 19.7 V, R1 = 8.90$2, Rz = 2.30 $2,and Rz = 3.50$2. The ammeter reads current of 3.30 A, What is the power dissipated by resistor Rz?
Question 2 A R In the circuit above; â‚¬1 = 19.7 V, R1 = 8.90 $2, Rz = 2.30$2,and Rz = 3.50 \$2. The ammeter reads current of 3.30 A, What is the power dissipated by resistor Rz?...
##### How do you solve 1+(x^2-5x-24)/(3x)=(x-6)/(3x) and check for extraneous solutions?
How do you solve 1+(x^2-5x-24)/(3x)=(x-6)/(3x) and check for extraneous solutions?...
##### A particle of mass m is bound by the spherically-symmetric three-dimensional harmonic- oscillator potential energy ,...
A particle of mass m is bound by the spherically-symmetric three-dimensional harmonic- oscillator potential energy , and ф are the usual spherical coordinates. (a) In the form given above, why is it clear that the potential energy function V) is (b) For this problem, it will be more convenient...
##### Can you please complete18 &19 and show your work and your thought process of how you...
can you please complete18 &19 and show your work and your thought process of how you knew what to do. Thank you WI 17. Order: Unasyn 1750 mg IM q6h. Using the information from the package insert below, determine how many mL of this antibiotic you would administer from the 3 g vial. Withdrawal...
##### 0 1 H 3 ED11 Kanhod Jid Cucnton IJuvanel
0 1 H 3 ED 1 1 Kanhod Jid Cucnton IJuvanel...
##### Find the volume of the following solid.The solid bounded by the paraboloid z = 10 - 2x2 2y2 and the plane z=2 Set up the double integral, in polar coordinates, that is used to find the volume_drdo(Type exact answers:)
Find the volume of the following solid. The solid bounded by the paraboloid z = 10 - 2x2 2y2 and the plane z=2 Set up the double integral, in polar coordinates, that is used to find the volume_ drdo (Type exact answers:)...
##### Vectorsandsnown JdoveThe diagrams belor shov Vdrious oossible Wayscombining7Which diagram correctly shows graphically that < = <+62 Which diagram correctly shows graphically that â‚¬ = 6 _ 4?Sclcct -=aaci
vectors and snown Jdove The diagrams belor shov Vdrious oossible Ways combining 7 Which diagram correctly shows graphically that < = <+62 Which diagram correctly shows graphically that â‚¬ = 6 _ 4? Sclcct -= aaci...
##### (2) (21?"Jdz + (cy '?Jdy =9(1) = 3, (homogeneous equation).
(2) (21? "Jdz + (cy '?Jdy = 9(1) = 3, (homogeneous equation)....
##### A 2.5-lb block is supported as shown by a spring of constant k = 2 lb/in....
A 2.5-lb block is supported as shown by a spring of constant k = 2 lb/in. that can act in tension or compression. The block is in its equilibrium position when it is struck from below by a hammer that imparts to the block an upward velocity of 90 in./s. Determine the position, velocity, and accelera...
##### What is the Laplace transfon of: ynhkp ? 28 Your answer should be expressed as function of using the correct syntax:Laplace transform F(s)
What is the Laplace transfon of: ynhkp ? 28 Your answer should be expressed as function of using the correct syntax: Laplace transform F(s)...
##### I can't figure out a reaction mechanism for this sequence. My professor says in the presence...
I can't figure out a reaction mechanism for this sequence. My professor says in the presence of a base (NaOtBu), deprotonation of β-indolylketone gives a carbanion. This is followed by the electrophilic attack of elemental sulfur to form a β-indolylketone sulfur species. After the elim...
##### Question 23 (2.5 points) The average age of a population of interest is denoted by the...
Question 23 (2.5 points) The average age of a population of interest is denoted by the symbol: a (alpha) O B (beta) 2 Ou (mu) On (pi) 5 18 Question 24 (2.5 points) Only adolescents and adults undergo screening for disease 21 True False 24 Question 25 (2.5 points) Stressful life events can be classif...
##### What is the correct answer? opt 1 pt 1 pt H... - 1 pt 1 pt...
what is the correct answer? opt 1 pt 1 pt H... - 1 pt 1 pt 1 pt a What are the hybridizations of carbon atoms 1 and 2? 1-sp, 2-sp? 1 - spa, 2 - 8p • 1 - sp, 2 – 8p? 1 - sp3, 2 - sp? 1 - sp, 2 - sp3 1 - sp, 2 - 8p3 b What are the approximate values of angles A, B, and C? Angle A: 180...
##### Consider two firms that produce perfect substitutes with thesame marginal cost c = 1 in an infinite horizon setting.The market demand is stochastic: At each period t, it canbe11low (qL = 10 âˆ’ p) with probability 2, or high(qH = 13 âˆ’ p) with probability 2. At eachperiod the firms learn the current state ofdemand before choosing prices simultaneously. Futurepayoffs are discounted at a rate of Î´ < 1.a) Suppose that the firms tacitly collude to maintain theâ€œmonopoly positionâ€ (charge pm
Consider two firms that produce perfect substitutes with the same marginal cost c = 1 in an infinite horizon setting. The market demand is stochastic: At each period t, it can be 11 low (qL = 10 âˆ’ p) with probability 2, or high (qH = 13 âˆ’ p) with probability 2. At each period the firms l...
##### Add or subtract, as indicated.$rac{3}{z}+ rac{x}{z^{2}}$
Add or subtract, as indicated. $\frac{3}{z}+\frac{x}{z^{2}}$...
##### [ Identify the mechanisms of antibiotic resistance dragging target V Deibiotic out ofcell each labelto Pump antlbiotic V appropriate target.
[ Identify the mechanisms of antibiotic resistance dragging target V Deibiotic out ofcell each labelto Pump antlbiotic V appropriate target....
##### (10) (10 points)e Consider ' the function flr) determined by the graph below .f(z)Label the roots of f(r) on the graph above: On the graph abova, sketch the tangent line at * List all the critical points of f(2). Sketch v f"() o the right hand graph: Estimato tle iutervals where f() is concave up'
(10) (10 points)e Consider ' the function flr) determined by the graph below . f(z) Label the roots of f(r) on the graph above: On the graph abova, sketch the tangent line at * List all the critical points of f(2). Sketch v f"() o the right hand graph: Estimato tle iutervals where f() is...
##### Two point sources generate periodic waves by tapping the surface of the water with the frequency f The following diagram shows the interference created by two point sources separated by a distance d. Antinodal lines are represented by solid lines and nodal lines are represented by dashed lines. Are the two sources in phase or out of phase? (i.e_, do the sources tap the water at the same time or at different times)? Choose the best option below: Top viewThe sources are out of phase by exactly hal
Two point sources generate periodic waves by tapping the surface of the water with the frequency f The following diagram shows the interference created by two point sources separated by a distance d. Antinodal lines are represented by solid lines and nodal lines are represented by dashed lines. Are ...
##### Nunbet & Lxdrs Wct pnn*70E6 4i4 BCM achocl lor Ircutkaeda (tl daubaleu nis RotaLly DaqmI Lelraclrucahntcnrttn On prcr 0l etkeclte hrave {oc? Ihal oxcry (1? excrttlol Dukrt Duhyyekss thn4 Lidi aMa 'ho7 Iza nntnnerIkrkd Hucnl Vnbntu trtaren I2m4 14 Lueu /5 Fetmead [n oronLFuc5 Tnmoreaenu-nlzHnenlennace naleettu "D" (Btanal AeOCOnlnicr TrrurdeIe raeg0 auacIda nare ISsmd unoeL" lacunmun dcumkoec Izeded
nunbet & Lxdrs Wct pnn*70E6 4i4 BCM achocl lor Ircutkaeda (tl daubaleu nis RotaLly DaqmI Lelraclrucahntcnrttn On prcr 0l etkeclte hrave {oc? Ihal oxcry (1? excrttlol Dukrt Duhyyekss thn4 Lidi a Ma 'ho7 Iza nntnnerIkrkd Hucnl Vnbntu trtaren I2m4 14 Lueu /5 Fetmead [n oronLFuc5 Tnmore aenu-n...
##### Every cereal box has a gift inside, but you cannot tell from the outside what the...
Every cereal box has a gift inside, but you cannot tell from the outside what the gift is. The store manager assures you that 13 of the 43 boxes on the shelf have the secret decoder ring. The other 30 boxes on the shelf have a different gift inside. If you randomly select two boxes of cereal from th...
##### 12. If two groups of numbers have the same mean, then their standard deviations must also...
12. If two groups of numbers have the same mean, then their standard deviations must also be equal. their medians must also be equal. their modes must also be equal. other measures of location need not be the same 13. The Sample Mean can never be negative. can assum...


text:
• ### Announcements

• #### Wondering what's new and changed at GameDev.net?06/20/17

Check out the latest Staff Blog update that talks about what's changed, what's new, and what's up with these "Pixels".

#### Archived

This topic is now archived and is closed to further replies.

# pico vs emacs vs vi vs edit vs notepad

## 49 posts in this topic

Watt i5 teh |3estest txet 3ditar evar?!?!?????!??!??!?!????!!?!??!!!! my answer is encoded somewherez in my message.
Pain is the fire that tempers the soul. It is the feeling of fear leaving the body. The Cutter Project|My Junk|Association of Computing Machinery
0

##### Share on other sites
Encoded? Why would you encode an answer when its so obvious?
0

0

##### Share on other sites
Once you know the commands, vi is the best. There is so much it can do. However, it has a steep learning curve that deters most poser programmers.
0

##### Share on other sites
I''d just like to say that emacs is horrible, or at least that version of emacs (is it X-emacs or something) that involves all those stupid mouse+keyboard combination shortcuts.
0

##### Share on other sites
Emacs is a great desktop environment and email client. Too bad it lacks a decent editor.

Honestly, they all suck. I haven''t bothered to actually look, but I have yet to encounter an editor that brings nirvana (PFE included). It doesn''t help that I include appearance as a criterion.
0

0

##### Share on other sites
VI!

emacs seems too clunky. I like vi cause it''s seems so lightweight. It''s easy to learn the basic commands too.
0

##### Share on other sites
SciTE owns all.

[Enter the Unspoken Realm]
0

##### Share on other sites
I didn't realize there was a competition here... its notepad, obviously.

And please learn how to spell, you make yourself look retarded when you mix 1337 with mispelled words.

[edited by - zer0wolf on May 27, 2003 5:42:42 PM]
0

##### Share on other sites
copy con

but seriously I use nano and vi quite a lot, along with gEdit; under windows, usually notepad (or MSVC - notepad can''t handle some EOL characters for some reason).

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
0

##### Share on other sites
vim is the best for me. Code block folding, very clean, regexps, and too much more. It''s tough to break into but just like Linux, give it a year or two and it''s the fastest damn thing you will ever use.

Current vimrc if anyone is interested (check out the statusline setting, hehehe):
""""""""""""""""""""""""""""""" Vim internalsset nocpset vb set autoindent set nobackupset hiddenset numberset rulerset laststatus=2 set statusline=\ \ %03.5c\ :\ %03.5l/%03.5L\ \ \ \ \ %-03.3m%-04.4r\ %-050.50F\ "set insertmode""""""""""""""""""""""""""""""" Foldingset foldmethod=indentset foldcolumn=2set foldlevelstart=99""""""""""""""""""""""""""""""" Tabsset ts=4set expandtabset softtabstop=4set shiftwidth=4""""""""""""""""""""""""""""""" Key bindings" Misc keys"imap     :foldclose"imap      :foldopen"imap      :!make"imap      :bp"imap      :bn" Quit, Save, Open, Newmap  :q!map  :wmap  :e\ map  :enewimap  :q!imap  :wimap  :e\  imap  :enew" Find, Find Next, Replace, Find Tagmap  / map  // map  map  :tag " Close New Prev Next buffer controlsset hiddenmap  :bdeletemap  :enewmap  :bnmap  :bpimap  :bdeleteimap  :enewimap  :bnimap  :bp" XMMS controlsmap    :!xmms -rmap    :!xmms -pmap    :!xmms -tmap    :!xmms -f""""""""""""""""""""""""""""""" Universal syntax highlightingset autoindentsyntax onhighlight Todo          ctermfg=red              highlight Comment       ctermfg=red                highlight Error         ctermfg=white   ctermbg=red        highlight PreCondit     ctermfg=darkgreen        highlight Operator      ctermfg=darkgreen         highlight Conditional   ctermfg=darkgreen          highlight Include       ctermfg=darkgreen           highlight Structure     ctermfg=darkgreen            highlight Statement     ctermfg=darkgreen             highlight Type          ctermfg=darkgreen              highlight PreProc       ctermfg=darkgreen               highlight Macro         ctermfg=darkgreen                highlight StorageClass  ctermfg=darkgreen                 highlight Repeat        ctermfg=darkgreen                  highlight Label         ctermfg=darkgreen                   highlight String        ctermfg=darkyellow           highlight Float         ctermfg=darkyellow            highlight Number        ctermfg=darkyellow             highlight SpecialChar   ctermfg=darkyellow              highlight Character     ctermfg=darkyellow               highlight Boolean       ctermfg=darkyellow                highlight folded        ctermfg=white   ctermbg=bluehighlight foldcolumn    ctermfg=white   ctermbg=bluehighlight statusline    ctermfg=white   ctermbg=bluehighlight linenr        ctermfg=white   ctermbg=blue

0

##### Share on other sites
anybody out there work with ultraedit? I love it...I was all about notepad until I found ultraedit.
0

##### Share on other sites
pico you fools! VI is teh suck. No one shoud learn how to use an editor, it should be totally obvious.
0

##### Share on other sites
Notepad and EDIT are the best, simply beacause it''s so easy to have fun with the menu''s in a hex editor. You should see my new version of "notepad"... hehe...

-~-The Cow of Darkness-~-

If you see the image I am online
0

##### Share on other sites
I use edwin for my Scheme stuff. Edwin is the same as emac (just with Scheme instead of Lisp). It''s true that it has a steep learning curve but when you''ve got it all memorized it works really well...

But as a true text editor I''d choose TextPad.

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction.
0

##### Share on other sites
I''ve been using gvim on Windows for quite a while now(2 years). It sucks for a lot of reasons, including, but not limited to:

- The cursor cannot be outside of the visible area. If you try to scroll away from the cursor, the cursor follows.
- Managing larger projects with more than a couple of files is awkward at best
- You are required to save a buffer before changing to another
- The adherence to Windows UI standards is sketchy at best, even when sourcing mswin.vim
- It leaves you very dependent on your .vimrc - it''s pretty hard to use when you''re at a location without your own .vimrc

[X]Emacs is just huge...

Notepad is pretty useless since it cannot handle files with other line ending styles than CRLF. The fact that it has no autoindent and no way to change the tabsize doesn''t help either.

AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
0

0

##### Share on other sites
why would anyone need anything else besides notepad?

[edited by - MrPoopypants on May 27, 2003 6:15:57 PM]
0

joe
0

##### Share on other sites

James Simmons
MindEngine Development
http://medev.sourceforge.net
0

##### Share on other sites
Actually, now that I think about it... I use Wordpad more often than anything else, and I have Word installed. lol

so I change my vote to Wordpad!

[edited by - zer0wolf on May 27, 2003 6:19:14 PM]
0

##### Share on other sites
quote:
Original post by Arild Fines
I''ve been using gvim on Windows for quite a while now(2 years). It sucks for a lot of reasons, including, but not limited to:

- The cursor cannot be outside of the visible area. If you try to scroll away from the cursor, the cursor follows.
- Managing larger projects with more than a couple of files is awkward at best
- You are required to save a buffer before changing to another
- The adherence to Windows UI standards is sketchy at best, even when sourcing mswin.vim
- It leaves you very dependent on your .vimrc - it''s pretty hard to use when you''re at a location without your own .vimrc

I think your problem is using a UNIX tool on Windows. Windows just isn''t up to being as efficient as UNIX .

Anyway...
Point 1 means you''re used to crippling yourself with a mouse while editting text on a keyboard.
Point 2 means you''re used to crippling yourself with Windows.
Points 3, 4, 5 are irrelevant. Being a UNIX incarnation, it obviously doesn''t give a damn about Windows. You are not required to save jack shit. And going to any new location is going to introduce usability difficulties for any program.
0

##### Share on other sites
quote:
I think your problem is using a UNIX tool on Windows. Windows just isn''t up to being as efficient as UNIX .

That''s a load of bull, and you knew so when you wrote it.
quote:

Anyway...
Point 1 means you''re used to crippling yourself with a mouse while editting text on a keyboard.

Who said anything about a mouse? I said CURSOR. I don''t use the mouse in gvim.
quote:

Point 2 means you''re used to crippling yourself with Windows.

What does "crippling yourself with Windows" have to do with managing larger projects?
quote:

Points 3, 4, 5 are irrelevant.

Excretus bovum.
quote:

Being a UNIX incarnation, it obviously doesn''t give a damn about Windows.

Only 4 was in any way related to Windows.
quote:

You are not required to save jack shit.

It won''t let you switch buffers without saving.
quote:

And going to any new location is going to introduce usability difficulties for any program.

Not a program that has sensible defaults. If MS employees find themselves constantly changing the settings in VS.NET before presentations, they are expected to file an issue requesting that the defaults be changed.

May I suggest you get your head out of Linus'' rectum and realize thatjust because someone chooses to work on Windows doesn''t mean they are retarted? I find your condescending tone extremely offensive, but I am grateful there are people like you around - you prevent phenomena like linux from ever becoming a real threat.

AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
0


text:
# 12 MHz 4-pin SMD Quartz Crystal

This 12 MHz 4-pin SMD quartz crystal is used for precise timing. It is great for devices such as clocks, radios, and computers.

SKU: SLI14602335026

Price: 0.15 $Old Price: 0.99$

Product in stock

SSL Certificate
Quantity

This 12 MHz SMD quartz crystal provides a stable clock signal for integrated circuits and it stabilizes the frequencies of radio transmitters and receivers. It is commonly used in clocks, radios, watches, cellphones, and computers.

# Specifications

• Frequency: 12 MHz
• Mounting Type: Surface Mount


text:
Allocation¶

The allocation module provides some utils to be used before running A/B test experiments. Groups allocation is the process that assigns (allocates) a list of users either to a group A (e.g. control) or to a group B (e.g. treatment). This module provides functionalities to randomly allocate users in two or more groups (A/B/C/…).

Let’s import first the tools needed.

[1]:

import numpy as np
import pandas as pd
from abexp.core.allocation import Allocator
from abexp.core.analysis_frequentist import FrequentistAnalyzer

Complete randomization¶

Here we want to randomly assign users in n groups (where n=2) in order to run an A/B test experiment with 2 variants, so called control and treatment groups. Complete randomization does not require any data on the user, and in practice, it yields balanced design for large-sample sizes.

[2]:

# Generate random data
user_id = np.arange(100)

[3]:

# Run allocation
df, stats = Allocator.complete_randomization(user_id=user_id,
ngroups=2,
prop=[0.4, 0.6],
seed=42)

[4]:

# Users list with group assigned

[4]:

user_id group
0 0 1
1 1 1
2 2 1
3 3 1
4 4 1
[5]:

# Statistics of the randomization: #users per group
stats

[5]:

group 0 1
#users 40 60

Note: Post-allocation checks can be made to ensure the groups homogeneity and in case of imbalance, a new randomization can be performed (see the Homogeneity check section below for details).

Blocks randomization¶

In some case, one would like to consider one or more confounding factor(s) i.e. features which could unbalance the groups and bias the results if not taken into account during the randomization process. In this example we want to randomly assign users in n groups (where n=3, one control and two treatment groups) considering a confounding factor (‘level’). Users with similar characteristics (level) define a block, and randomization is conducted within a block. This enables balanced and homogeneous groups of similar sizes according to the confounding feature.

[6]:

# Generate random data
np.random.seed(42)
df = pd.DataFrame(data={'user_id': np.arange(1000),
'level': np.random.randint(1, 6, size=1000)})

[7]:

# Run allocation
df, stats = Allocator.blocks_randomization(df=df,
id_col='user_id',
stratum_cols='level',
ngroups=3,
seed=42)

[8]:

# Users data with group assigned

[8]:

user_id level group
0 0 4 1
1 1 5 2
2 2 3 2
3 3 5 1
4 4 5 0
[9]:

# Statistics of the randomization: #users per group in each level
stats

[9]:

group 0 1 2
level
1 70 70 70
2 64 63 63
3 62 64 64
4 69 69 68
5 68 68 68

Multi-level block randomization

You can stratify randomization on two or more features. In the example below we want to randomly allocate users in n groups (where n=5) in order to run an A/B test experiment with 5 variants, one control and four treatment groups. The stratification will be based on the user level and paying status in order to create homogeneous groups.

[10]:

# Generate random data
np.random.seed(42)
df = pd.DataFrame(data={'user_id': np.arange(1000),
'is_paying': np.random.randint(0, 2, size=1000),
'level': np.random.randint(1, 7, size=1000)})

[11]:

# Run allocation
df, stats = Allocator.blocks_randomization(df=df,
id_col='user_id',
stratum_cols=['level', 'is_paying'],
ngroups=5,
seed=42)

[12]:

# Users data with group assigned

[12]:

user_id is_paying level group
0 0 0 6 2
1 1 1 1 1
2 2 0 1 0
3 3 0 1 3
4 4 0 5 1
[13]:

# Statistics of the randomization: #users per group in each level and paying status
stats

[13]:

group 0 1 2 3 4
level is_paying
1 0 19 17 19 18 19
1 15 17 18 18 18
2 0 17 17 14 17 17
1 18 17 16 18 17
3 0 16 16 16 15 16
1 19 19 19 19 19
4 0 12 12 12 12 11
1 15 15 15 14 15
5 0 18 18 17 16 17
1 17 18 19 18 19
6 0 18 19 19 18 18
1 16 15 16 16 15

Homogeneity check¶

Complete randomization does not guarantee homogeneous groups, but it yields balanced design for large-sample sizes. Blocks randomization guarantees homogeneous groups based on categorical variables (but not on continuous variable).

Thus, we can perform post-allocation checks to ensure the groups homogeneity both for continuous or categorical variables. In case of imbalance, a new randomization can be performed.

[14]:

# Generate random data
np.random.seed(42)
df = pd.DataFrame(data={'user_id': np.arange(1000),
'points': np.random.randint(100, 500, size=1000),
'collected_bonus': np.random.randint(2000, 7000, size=1000),
'is_paying': np.random.randint(0, 2, size=1000),
'level': np.random.randint(1, 7, size=1000)})

[14]:

user_id points collected_bonus is_paying level
0 0 202 6580 1 4
1 1 448 4075 0 5
2 2 370 2713 1 6
3 3 206 3062 0 3
4 4 171 3976 0 5

Single iteration

In the cell below it is shown a single iteration of check homogeneity analysis.

[15]:

# Run allocation
df, stats = Allocator.blocks_randomization(df=df,
id_col='user_id',
stratum_cols=['level', 'is_paying'],
ngroups=2,
seed=42)

[16]:

# Run homogeneity check analysis
X = df.drop(columns=['group'])
y = df['group']

analyzer = FrequentistAnalyzer()
analysis = analyzer.check_homogeneity(X, y, cat_cols=['is_paying','level'])

analysis

[16]:

coef std err z P>|z| [0.025 0.975]
user_id -3.000000e-04 0.000000 -1.505000e+00 0.132 -0.001000 0.0001
points 2.000000e-04 0.001000 3.660000e-01 0.714 -0.001000 0.0010
collected_bonus 6.935000e-05 0.000044 1.559000e+00 0.119 -0.000018 0.0000
C(is_paying, Treatment('1'))[T.0] 8.000000e-03 0.127000 6.300000e-02 0.950 -0.240000 0.2560
C(level, Treatment('3'))[T.1] -1.180000e-02 0.215000 -5.500000e-02 0.956 -0.433000 0.4090
C(level, Treatment('3'))[T.2] 1.440000e-02 0.226000 6.400000e-02 0.949 -0.429000 0.4580
C(level, Treatment('3'))[T.4] -1.646000e-16 0.213000 -7.740000e-16 1.000 -0.417000 0.4170
C(level, Treatment('3'))[T.5] -1.628000e-16 0.215000 -7.570000e-16 1.000 -0.422000 0.4220
C(level, Treatment('3'))[T.6] -1.628000e-16 0.214000 -7.590000e-16 1.000 -0.420000 0.4200

The check_homogeneity function performs univariate logistic regression per each feature of the input dataset. If the p-value (column P>|z| in the table above) of any variables is below a certain threshold (e.g. threshold = 0.2), the random allocation is considered to be non homogeneous and it must be repeated. For instance, in the table above the variable collected_bonus is not homogeneously split across groups p-value = 0.119.

Multiple iterations

[17]:

# Generate random data
np.random.seed(42)
df = pd.DataFrame(data={'user_id': np.arange(1000),
'points': np.random.randint(100, 500, size=1000),
'collected_bonus': np.random.randint(2000, 7000, size=1000),
'is_paying': np.random.randint(0, 2, size=1000),
'level': np.random.randint(1, 7, size=1000)})

[17]:

user_id points collected_bonus is_paying level
0 0 202 6580 1 4
1 1 448 4075 0 5
2 2 370 2713 1 6
3 3 206 3062 0 3
4 4 171 3976 0 5

In the cell below we repeatedly perform random allocation until it creates homogeneous groups (up to a maximum number of iterations). The groups are considered to be homogeneous when the p-value (column P>|z|) of any variables is below a certain threshold (e.g. p-values < 0.2).

[18]:

# Define parameters
rep = 100
threshold = 0.2

analyzer = FrequentistAnalyzer()

for i in np.arange(rep):

# Run allocation
df, stats = Allocator.blocks_randomization(df=df,
id_col='user_id',
stratum_cols=['level', 'is_paying'],
ngroups=2,
seed=i + 45)
# Run homogeneity check analysis
X = df.drop(columns=['group'])
y = df['group']

analysis = analyzer.check_homogeneity(X, y, cat_cols=['is_paying','level'])

# Check p-values
if all(analysis['P>|z|'] > threshold):
break

df = df.drop(columns=['group'])

analysis

[18]:

coef std err z P>|z| [0.025 0.975]
user_id -1.000000e-04 0.000000 -5.640000e-01 0.573 -0.001000 0.000
points 2.000000e-04 0.001000 3.200000e-01 0.749 -0.001000 0.001
collected_bonus 2.449000e-05 0.000044 5.520000e-01 0.581 -0.000063 0.000
C(is_paying, Treatment('1'))[T.0] 1.570000e-02 0.127000 1.240000e-01 0.901 -0.232000 0.264
C(level, Treatment('3'))[T.1] -1.180000e-02 0.215000 -5.500000e-02 0.956 -0.433000 0.409
C(level, Treatment('3'))[T.2] -1.440000e-02 0.226000 -6.400000e-02 0.949 -0.458000 0.429
C(level, Treatment('3'))[T.4] -9.064000e-17 0.213000 -4.260000e-16 1.000 -0.417000 0.417
C(level, Treatment('3'))[T.5] -9.236000e-17 0.215000 -4.290000e-16 1.000 -0.422000 0.422
C(level, Treatment('3'))[T.6] -9.237000e-17 0.214000 -4.310000e-16 1.000 -0.420000 0.420


text:
# $(x^n-x^m)a=(ax^m-4)y^2$ in positive integers

How do I find all positive integers $(a,x,y,n,m)$ that satisfy $a(x^{n}-x^{m}) = (ax^{m}-4) y^{2}$ and $m\equiv n\pmod{2}$, with $ax$ odd?

-
By $ax$ is odd, you mean product is odd,right?? –  Aang Jul 12 '12 at 11:12
Of course ..... –  Frank Jul 12 '12 at 11:15
The L.H.S. is even => y must be even –  lab bhattacharjee Jul 12 '12 at 11:46
$m$ and $n$ are of same parity, $a$ and $x$ both are odd, $y$ is even. –  Aang Jul 12 '12 at 12:30

Some partial results. Case 1) $n<m$.

Then $ax^m<4$.

The solutions of this inequality are: $$a=1, m=1, x=1,2,3,\\ m\geq2, x=1,$$ and $$a=2,3, x=1, m\geq 1.$$

From these we obtain two candidates (i) $x=1$ and (ii) $x=3$.

(i) Substituting into the original equation we get $$0=(a-4)y^2.$$ Since $y>0$ and $ax^m=a<4$ there is no solution.

(ii) Substituting into the original equation we get $$3^n-3=(3-4)y^2.$$ Since $n<m$ and $n\equiv m \pmod{2}$, thus $n=1$ which gives $y=0$ that is no solution.

Case 2) $n=m$.

Substituting into the original equation we have $$(ax^m-4)y^2=0.$$ Since $y>0$ we get $$ax^m=4.$$ Since $ax$ is odd there is no solution.

Thus we have justified that $n>m$.

So we can write $$x^m(x^{n-m}-1)a=(ax^m-4)y^2.$$ Since $a$ is odd and $(a,ax^m-4)=1$, therefore $a|y^2$, and similarly $x^m|y^2$. Furthermore $n=m+2k$ where $k$ is positive integer. Thus we obtain $$ax^m(x^{2k}-1)=(ax^m-4)y^2.$$ Introducing the new variables $u:=ax^m$, $z:=x^k$ we obtain $$u(z^2-1)=(u-4)y^2,$$ where $u,z$ are odd and $z>1$. Obviously $8|z^2-1$, thus $4|y$. Since $$u(z^2-1)=(u-4)y^2<uy^2,$$ it follows $z<y$.

-
Could you explain why $n = m + 2k$ please. –  Peter Phipps Jul 16 '12 at 23:16
@PeterPhipps it was assumed in the question that $m\equiv n \pmod{2}$. –  vesszabo Jul 17 '12 at 11:01

Brute force finds three solutions so far:

a=3, x=3, y=12, n=5, m=1
a=1, x=3, y=12, n=6, m=2
a=1, x=9, y=12, n=3, m=1

which are just different ways of saying that $729 - 9 = (9-4)\times12^2.$

-