Sunday, December 21, 2014

Happy December Solstice!

Today, December 21, 2014, is the December Solstice.  In the Northern Hemisphere, it is the first day of winter.   In the Southern Hemisphere, it is the first day of summer.  As someone who lives in California, I must admit I feel a little jealous of all of you enjoying the long day living around our Tropic of Capricorn,  I love the sunshine

I want to wish everyone a Happy, Healthy, Safe, and Celebratory Solstice, and Happy Holidays (Christmas, Hanukkah, and all the holidays that are being celebrated worldwide). 

I thank everyone who follows this blog, comments, and readers.  Thank you for making this blog the success that it is. 

I'll probably speak to you next week - until then, CHEERS!

Take care of each other.


Eddie

 

Tuesday, December 16, 2014

HP Prime and HP 50g: Using the LSQ Function to find the Moore-Penrose Inverse of a Matrix

HP Prime and HP 50g:  Using the LSQ Function to find the Moore-Penrose Inverse of a Matrix

  
Recall that the Moore-Penrose Inverse of a Matrix A, A^+, with r rows and c columns is:

If r ≤ c and rank(A) = r  (horizontal matrix), then:
A^+ = A^T * (A*A^T)^-1

If r ≥ c and rank(A) = c  (vertical matrix), then:
A^+ = (A^T * A)^-1 * A^T

You can see the blog entry about the Moore-Penrose inverse here:  http://edspi31415.blogspot.com/2014/08/moore-penrose-inverse-of-matrix.html.

On the LSQ (Least Squares Solution Command) function, featured on both the HP Prime and HP 50G, you can find A^+.

Syntax to find A^+ using the LSQ Command

HP Prime:

LSQ(matrix, IDENMAT(r))

Where IDENMAT is the identity matrix command. 

Path to IDENMAT:  Toolbox, Math, 7. Matrix, 4. Create, 2. Identity
Path to LSQ:  Toolbox, Math, 7. Matrix, 7. Factorize, 2. LSQ

HP 50g:

2:  identity matrix of dimension r x r  (R IDN)
1:  matrix
LSQ

Build the identity matrix by entering r, then [Left Shift], [5] (MATRICES), [F1] (CREATE), [F4] (IDN)
Path to LSQ:  [Left Shift], [5] (MATRICES), [F2] (OPER), [NXT], [F2] (LSQ)

Examples (answers are rounded to five decimal places):

Example 1

M =
[[2, 5],
[3, 3],
[4, 5]]  
(3 x 2 matrix, r = 3)

HP Prime:  LSQ(M, IDENMAT(3))
HP 50g:   2:  (3 IDN), 1: M

Result:

M^+ »
[[-0.45026, 0.31579, 0.21579],
[0.35263, -0.15789, -0.05789]]

Example 2

M =
[[4, 0.3, -0.8, 4.8, 2.5],
[-1.8, 3.6, 4.2, 4.4, -7]] 
(2 x 5, r = 2)

HP Prime:  LSQ(M, IDENMAT(2))
HP 50g:   2:  (2 IDN), 1: M

Result:

M^+ »
[[0.0853, -0.01272],
[0.01109, 0.03586],
[-0.01224, 0.04039],
[0.11059, 0.04939],
[0.04594, -0.06586]]

  This blog is property of Edward Shore. 2014. 


Sunday, December 14, 2014

Bingo: Number of Cards and Odds of Winning

Bingo

A standard BINGO board has a 5 x 5 matrix. Each column is dedicated to a letter, mainly B, I, N, G, and O. 75 numbers are assigned to each number as follows:

B: 1 to 15
I: 16 to 30
N: 31 to 45
G: 46 to 60
O: 61 to 75

Each column has 5 of 15 possible numbers, except the N column, which only has 4. The N column has a Free Space.

How Many Different Bingo Cards Are There?

A bingo card has five rows, five columns , and two diagonals. The middle row, middle column, and the two diagonals contain the Free Space.

Each of columns have the following number of arrangements:
B Column: nPr(15,5) = 15!/(15-5)! = 360,360
I Column: 360,360 (see B column)
N Column: nPr(15,4) = 15!/(15-4)! = 32,760 (remember the Free Space!)
G Column: 360,360 (like the B and I columns)
O Column: 360,360 (like the B, I, and G columns)

Note: nPr is the Permutation function n!/(n-r)!, sometimes labeled PERM or (n r) shown vertically. Simply put, permutation means arrangement: "How many ways can we arrange r out of n objects?


Since each of the permutations of B column can have each of the permutations of the I column; which in turn, each of those permutations can contain each permutation of the N column, and so on; the number of total number of bingo boards is:

360,360 * 360,360 * 32,760 * 360,360 * 360,360
= 360,360^4 * 32,760
= 552,446,474,061,128,648,601,600,000
≈ 5.52446 x 10^26

We can get the number of different cards by using rows as well.
1st Row: 15 * 15 * 15 * 15 * 15 = 15^5 =759,375 (15 numbers available per column)
2nd Row: 14 * 14 * 14 * 14 * 14 = 14^5 = 537,824 (14 numbers available per column)
3rd Row: 13 * 13 * 1 * 13 * 13 = 28,561 (don't forget about the Free space)
4th Row: 12 * 12 * 13 * 12 * 12 = 269,568
5th Row: 11 * 11 * 10 * 11 * 11 = 175,692

And the number of cards is:
759,375 * 537,824 * 28,561 * 269,568 * 175,692
= 552,446,474,061,128,648,601,600,000
≈ 5.52446 x 10^26

We arrived at the same destination.

What The Odds of Having a Winning Card in Bingo?

Even though there are 2,0711,126,800 ways to pick 5 numbers out of 75; thus making you very lucky to get a Bingo if the you win after just five draws.

Despite this, we look at the number of cards that are played in the game rather than the numbers themselves when answering this question.

So instead of having a long calculation, which I once thought was the case, the odds of having the winning card boils down to this:

1/(number of cards in play)

This is true if you are playing BINGO by a line or blackout bingo.

Don't forget to you yell BINGO! when you win. :)


Have a great day! Now I am off to errands and maybe wrap some presents.

Eddie


This blog is property of Edward Shore. 2014 


P.S. I am going to make it one of my resolutions to check on the comments timely.  I appreciate and thank everyone who leaves a comment.   - Eddie (12/15/14)



Thursday, December 11, 2014

Annie Jump Cannon


Google dedicated their home page to Annie Jump Cannon today. The Henry Draper Award winner classified and observed 500,000 stars, while breaking ground for women in science.

She also has a crater named after her on our Moon, and her stellar classification is standard (as determined by the IAU).

http://en.m.wikipedia.org/wiki/Annie_Jump_Cannon



Saturday, December 6, 2014

Some Science Stocking Stuffings


Einstein's Time Dilation

Recall that equation for time dilation is:

Δt = Δt0 / √(1 - u^2/c^2)

Where:
Δt = time observed by the person standing still
Δt0 = time observed by the traveler (in the observer's frame of reference)
u = speed of the moving object , which contains the traveler
c = speed of light in a vacuum = 299,792,458 m/s

In short, the traveler will note observe and note that time Δt0 has passed, which the person standing still observes that time Δt has passed. The closer someone goes to the speed of light, that less person she/he experiences. You will need to go super fast. Driving at 65 mph (29.0756 m/s) on the freeway won't cut it and here's why:

For 1 unit of time to pass for the person driving 65 mph (Δt0 = 1), the change of time for the observer (Δt) is:

Δt = 1/√(1 - 29.0756^2/299,792,458^2) ≈ 1.0000000000000047 (that is fourteen zeroes between the decimal point and the 4) (The Wolfram Alpha app was used for this calculation).

Virtually the same time passes.

Same deal regarding observing an airplane flying at 600 mph (268.224 m/s). For the person watching the plane, for a plane's passenger, pilot, or cocktail and peanut server to observe one unit of time, us watchers observe 1.0000000000004 (twelve zeroes) units of time.

If you want to be on an object where the people observing you experience twice the time (Δt = 2) you do (Δt0 = 1), you will need to travel (c*√3)/2 or 259,627,884.491 m/s (580,771,037.247 mph). That is 86% the speed of light!

Archer's Paradox (E.J. Rendtroff, 1913)

In archery, archers aim their arrows slightly to the side, instead of directly at the target. On the surface, that seems crazy. This is where the Archer's Paradox comes into effect.

Basically, when the arrow is shot, it travels in an "S" curve. Drawing a string makes the arrow bend such that he tip is pointed away from the target. As the arrow is fired and the string returns to the bow, the arrow bends the other way, turning the arrow back to the target.

Other factors to making accurate shots include the stiffness of the arrow, brace height, and wind conditions. I found this video by Billgsgate helpful:

http://youtu.be/bNlx6MBlymw

Galactic Coordinates

Galactic Coordinates are spherical coordinates that are set such as:

* The center is our sun.
* The coordinates are (l°, b°), where l is the longitude (0° to 360°, flat angle) and the latitude (-90° to 90°, height).
* Pointing "due east", l = 0° and b = 0° is pointing towards the center of the Milky Way. "Due west", l = 180° and b = 0° points away from the center of the Galaxy.

Using Wolfram Alpha ( http://m.wolframalpha.com ) and an online coordinator converter ( http://ned.ipac.caltech.edu/forms/calculator.html ), here are the 30° longitude markers when latitude is 0° (b = 0°):

* 0° points towards the constellation Sagittarius (as it should, it having the Milky Way center)
* 30° points towards Aquila the Eagle
* 60° points towards the Vulpecula the Fox
* 90° points towards Cygnus the Swan
* 120° points towards Cassiopeia the Vain Queen
* 150° points towards Perseus the Hero
* 180° points towards Auriga the Charioteer
* 210° points towards Monoceros the Unicorn
* 240° points towards Puppis (a ship's poop deck)
* 270° points towards Vela (a ship's sails)
* 300° points towards Crux, The Southern Cross
* 330° points towards Norma (a carpenter's square (measuring tool))

Spherical Lenses (see figure 2 below)

Variables:
P = place of object (with distance s)
P' = place of image (with distance s')
C = center of curvature
V = vertex of the lens

General relations:

tan α = h/(s - δ)
tan β = h/(s' - δ)
tan Φ = h/(R - δ)

However, if α < π/2 ( α < 45° ), we are dealing with paraxial rays:

1/S + 1/S' = 2/R

Surprisingly, the object is far from the vertex.


Forgive me if I repeat things. Instead of going out to clobber everyone last Black Friday for that extra 10% off, I stayed home and cracked open some books that I have been meaning to look at for months. I hope you find this enjoyable and insightful.

The best always,

Eddie


P.S. I was thinking about adding a section (or blog entry) about the age of Aquarius and some of the head scratchers I have about it. I am not sure if this subject would be appropriate for this blog. If you have any thoughts about this, or anything else, go and ahead and comment! - E.S.



This blog is property of Edward Shore. 2014

Wednesday, November 26, 2014

Astronomy: Distance and Midpoint Between Two Celestial Objects

Astronomy: Distance and Midpoint Between Two Celestial Objects


Stars and celestial objects have the equatorial coordinates ( α, δ, R ) where:

α = right ascension in hours, minutes, and seconds
δ = declination in degrees, minutes, and seconds
R = distance to the celestial about (in light years, astronomical units, etc)

Convert α and δ to decimal degrees:

α = (hours + minutes/60 + seconds/3600) * 15
δ = sign(δ) * ( |degrees| + |minutes/60| + |seconds/3600| )

However, calculating distance between two points in space requires that we have cartesian coordinates (x, y, z). The conversion formulas to go from equatorial to cartesian coordinates are:

x = R * cos δ * sin α
y = R * cos δ * cos α
z = R * sin δ

For completeness, here are the conversion formulas to from cartesian to equatorial coordinates:

R = √(x^2 + y^2 + z^2)
δ = asin(z/R)
α = atan(y/x) (pay attention to the quadrant!). Alternatively: α = arg(x + i*y)

The distance formula between two points in space is:

D = √( (x2 - x1)^2 + (y2 - y1)^2 + (z2 - z1)^2 )

Source: http://en.m.wikipedia.org/wiki/Equatorial_coordinate_system

Example

Find the distance between Sagittarius A* (center of the Milky Way Galaxy) and the Andromeda Galaxy (M31).

Equatorial Coordinates:

From Wolfram Alpha: ( http://m.wolframalpha.com )

Sagittarius A*:
R = 24,824 light years
α = 17h45m40s = 266.42°
δ = -29°0'28" = -29.008°

Andromeda Galaxy:
R = 2,571,000 light years
α = 42m40s = 10.68°
δ = 41°16'8" = 41.269°

Converting to the cartesian system:

Sagittarius A*:
x = -21,667.514038
y = -1,355.611275
z = -12,037.945401

Andromeda Galaxy:
x = 358,122.65578
y = 1,898,943.67736
z = 1,695,818.99789

Calculation:

D = √( (-21,667.514038 - 358,122.65578)^2 + (-1,355.611275 - 1,898,943.67736)^2
+ (-12,037.945401 - 1,695,818.99789)^2 ) ≈ 2,583,051.16059

The distance between Sagittarius A* and the Andromeda Galaxy is about 2.583 million light years.

Happy Thanksgiving, or Day of Thanks, wherever you are. Please be safe and use good judgement. We need all the positive we can get on Earth, and in the cosmos. Cheers!

Eddie

This blog is property of Edward Shore. 2014

Tuesday, November 25, 2014

Complex Analysis: Line Integral

Contour Integrals

Let the complex function f(z) be defined as f(z) = u(x,y) + i*v(x,y)

Using the definition of the integral:

∫ f(z) dz = lim n → ∞ [ Σ f(z_k) * Δz_k from k = 1 to n ]
= lim n → ∞ [ Σ ( u(x_k, y_k) + i*v(x_k, y_k) ) * ( Δx_k + i*Δy_k ) from k = 1 to n ]
= lim n → ∞ Σ [ (u(x_k, y_k) * Δx_k - v(x_k, y_k) * Δy_k) + i*(v(x_k, y_k) * Δx_k
+ u(x_k, y_k) * Δy_k) ]
= ( ∫ u(x,y) dx - ∫ v(x,y) dy ) + i*( ∫ u(x,y) dy + ∫ v(x,y) dx )

In summary:


∫ f(z) dz = ( ∫ u(x,y) dx - ∫ v(x,y) dy ) + i*( ∫ u(x,y) dy + ∫ v(x,y) dx )


What is needed:

1. A contour curve f = y(x). This is where you get your end points.

2. We need f(z) to integrate. Separate f(z) into its parametric parts.

Let's look at a couple examples.

Examples

1. Contour: y = x + 1 from (3,4) to (4,5). Integrate ∫ z^2 dz.

Since y = x + 1, x = y - 1

z^2 = (x + i*y)^2 = (x^2 - y^2) + i*(2*x*y)
u = x^2 - y^2
v = 2*x*y

u = x^2 - y^2
u = x^2 - (x + 1)^2
u = -2*x - 1
∫ u dx from 3 to 4 = -8

v = 2 * x * y
v = 2 * (y - 1) * y
∫ v dy from 4 to 5 = 95/3

u = (y - 1)^2 - y^2
u = -2 * y + 1
∫ u dy from 4 to 5 = -8

v = 2 * x * y
v = 2 * x * (x + 1)
∫ v dx from 3 to 4 = 95/3

∫ z^2 dz from (3 + 4*i) to (4 + 5*i) = (-8 - 95/3) + i*(-8 + 95/3) ≈ -39.666667 + 23.666667*i

2. Contour: y = x^2 - 1 from (0, -1) to (2, 1). Integrate ∫ z^2 + 1 dz.

y = x^2 - 1, x = √(y + 1)

z^2 + 1 = (x + i*y)^2 + 1 = x^2 + 2*i*x*y - y^2 + 1
u = x^2 - y^2 + 1
v = 2 * x * y

u = x^2 - y^2 + 1
u = x^2 - (x^2 - 1)^2 + 1
∫ u dx from 0 to 2 = 8/5

v = 2 * x * y
v = 2 * √(y + 1) * y
∫ v dy from -1 to 1 = 8/15 * √2

u = x^2 - y^2 + 1
u = y + 1 - y^2 + 1
u = -y^2 + y + 2
∫ u dy from -1 to 1 = 10/3

v = 2 * x * y
v = 2 * x * (x^2 - 1)
∫ v dx from 0 to 2 = 4

∫ z^2 + 1 dz from -i to 2+i = (8/5 - 8/15 * √2) + i*(4 + 10/3) ≈ 0.845753 + 7.333333*i

This is the basics of line integrals.

Source: Wunsch, A. David. Complex Variables with Applications. 2nd Edition. Addison-Wesley Publishing Company. 1994.

Take care, Eddie

This blog is property of Edward Shore. 2014

Saturday, November 22, 2014

Complex Analysis: Cauchy-Reimann Equations

Continuing my blogging adventures at the Last Drop Cafe in Claremont, CA:

Cauchy-Reimann Equations

Let the complex-valued function f(z), where z = x+i*y, be defined in the parametric form:

f(z) = u(x,y) + i*v(x,y) where u(x,y) = Re(f(z)) and v(x,y) = Im(f(z)).

Then by the definition of the derivative:

f(z) = lim x0 → x [(f(z) + x0) - f(z))/(x - x0)]
= lim x0 → x [(u(x +x0, y) - u(x, y) + i*v(x + x0, y) - i*v(x, y))/(x - x0)]
= du/dx + i*dv/dx (I)

Also:

f(z) = lim y0 → y [(f(z + y0) - f(z))/(i*y - i*y0)]
= lim y0 → y [(u(x, y + y0) - u(x, y) + i*v(x, y + y0) - i*v(x, y))/(i*(y - y0))]
= -i*(lim y0 → y [(u(x, y + y0) - u(x, y) + i*v(x, y + y0) - i*v(x, y))/(y - y0)])
= -i*du/dy + dv/dy (II)

Taking the real and imaginary parts of (I) and (II):

du/dx = dv/dy and -du/dy = dv/dx

The Cauchy-Riemann equations can be used to determine whether f(z) is differentiable and if so, where.

Two Quick Examples

1. z^2 = (x^2 - y^2) + 2*i*x*y

u=x^2 - y^2
v=2*i*x*y

du/dx = 2*x, dv/dy = 2*x
-du/dy = 2*y, dv/dx = 2*y (note the negative sign in front of du/dy!)

Since the Cauchy-Riemann equations hold, and without restriction, then z^2 is differentiable for all z. And:

df/dz = 2*x + 2*i*y = 2*(x+i*y) = 2*z

2. e^z = e^(x+i*y) = e^x*cos y + i*e^x*sin y

u=e^x*cos y
v=e^x*sin y

du/dx = e^x*cos y, dv/dy = e^x*cos y
-du/dy = e^x*sin y, dv/dx = e^x*sin y

Since the Cauchy-Riemann equations hold, and without restriction, then e^z is differentiable for all z. And:

df/dx = e^x*cos y + i*e^x*sin y = e^z

I used (I), but using (II) will garner the same result.

That is the Cauchy-Riemann equations in a nutshell!

Source: Wunsch, A. David. Complex Variables with Applications. 2nd Edition. Addison-Wesley Publishing Company. 1994.

As always, have a great day! Take care. Eddie

This blog is property of Edward Shore. 2014

Complex Analysis: The Conjugate, the Modulus, and its Properties

Blogging today from Last Drop Cafè in Claremont, CA. I think I found a new favorite drink: mint mocha made with soy milk.


Here are some basics of the conjugate and modulus of complex numbers.

Let z = x+i*y, with i=√-1

Conjugate

Usually labeled "z-bar" (z with a line over it), the conjugate is also labeled conj(z) and z*.

conj(z) = x - i*y

Modulus or Absolute Value

Not surprisingly, the modulus, also called the absolute value of the complex number z is defined as:

|z| = √(x^2 + y^2)

Properties

Let's explore some properties of the conjugate and modulus.

z + conj(z) = (x + i*y) + (x - i*y) = 2*x

z - conj(z) = (x + i*y) - (x - i*y) = 2*i*y

(conj(z))^2 = (x - i*y)^2 = x^2 - 2*i*x*y + (i*y)^2 = x^2 - y^2 - 2*i*x*y

conj(z)^2 + z^2 = (x - i*y)^2 + (x + i*y)^2 = x^2 - 2*i*x*y - y^2 + x^2 + 2*i*x*y - y^2
= 2*(x^2 - y^2)

conj(z) * z = (x - i*y) * (x + i*y) = x^2 + i*x*y - i*x*y - i^2*y^2 = x^2 + y^2 = |z|^2

which easily leads to: |z| = √(z * conj(z)) and

|z1 * z2| = √(z1 * conj(z1) * z2 * conj(z2)) = √(z1 * conj(z1)) * √(z2 * conj(z2)) = |z1| * |z2|

and:

|z1/z2| = √((z1 * conj(z1))/(z2 * conj(z2))) = √((z1 * conj(z1))/√((z2 * conj(z2)) = |z1|/|z2|


Source: Wuncsh, David A. Complex Numbers with Applications. 2nd Edition. Addison-Wesley Publishing Company. Reading, MA. 1994

Wednesday, November 12, 2014

Casio fx-9750gII, fx-9860gII, Prizm: Prime and Complex Number Prime (Gaussian Prime)

Let /rtri be the right triangle symbol (display symbol)

Real Number Primes

Program ISPRIME:

“REAL PRIME”
“EWS 2014-11-12”
“N”?->N
Int N->N
For 2->K To S
If Frac (N÷K)=0
Then
“NOT PRIME” /rtri
Stop
IfEnd
Next
“PRIME”

 Examples:
19 is PRIME
36 is NOT PRIME

Complex Number Primes
(Gaussian Primes)


Program CISPRIME:

“COMPLEX PRIME”
“EWS 2014-11-12”
a+bi
“Z”?->Z
(Abs Z)^2->T
If ReP Z=0 or ImP Z=0
Then
Goto 1
IfEnd
For 2->K To Abs Z
If Frac(T÷K)=0
Then Goto 2
IfEnd
Next
Goto 3
Lbl 1
If MOD(Abs Z, 4)≠3
Then Goto 2
IfEnd
Next
Goto 3
Lbl 2
“NOT PRIME” /rtri
Stop
Lbl 3
“PRIME”

Examples:
2+2i is not (complex) prime
7 is (complex) prime
-5+4i is (complex) prime
 
 
This blog is property of Edward Shore.  2014
 
Blog Entry #404

 

 

Tuesday, November 11, 2014

Darts: The Probability of Getting the Best Score

Darts: The Probability of Getting the Best Score

In Darts, players throw darts at circular board.  The closer you are to the center of the circle, the more points you score.  Hitting the center of the circle (or close to it) scores you the bulls-eye.    

Today we will develop formulas that determine the chance of landing a dart in a specific scoring zone.  For this, we will assume that all the darts thrown will land in a specific area.  The dart that hits the cat who are unfortunate to be in its path don’t count.



Area of a Circular Ring

We will be using the area of a circular ring heavily in this blog.  The general formula for it is:

 A =  π * ((outer radius)^2 – (inner radius)^2)



 
Simplified Darts Board



 




This board has a circular area on a square board.  The square board has side length x.  There are three circular scoring areas:

(I)                 Bulls-eye circle with radius R1.  Obviously, this area has the most points.

(II)               Green scoring area, a circular ring with outer radius R2 and inner radius R1. This area is second best in points to the bulls-eye.

(III)             Yellow scoring area, a circular ring with outer radius R3 and inner radius R2. 

A dart that lands outside any of the scoring areas scores no points. 

Assuming all but a negligible of parts hits the square board, the chance that a dart hits the bulls-eye is:

P1 = (area of the bulls eye)/(area of the board) = π*R1^2/x^2

The probability that a dart hits the green scoring area:

P2 = (area of the green scoring area)/(area of the board) = π*(R2^2 – R1^2)/x^2

The probability that a dart hits the yellow scoring area:

P3 = (area of the yellow scoring area)/(area of the board) = π*(R3^2 – R2^2)/x^2

Finally, the probability of scoring anything at all on this board is:

P_any = P1 + P2 + P3 = π*P3^2/x^2

This assumes that the dart board is flat and each point of the dart board has an equal random chance.  Note that these probability formulas do not take into account the skill of the dart thrower. 

Standard Darts Board
 
 

The standard darts board is a circular board with radius R. Going from the inside out, we have:

 
(I)                 Inner Bulls-eye.  In the standard game, the inner bulls-eye is 50 points.  It is a circular area, with radius R1.  

(II)               Outer Bulls-eye – worth 25 points.  It is a circular ring, with outer radius R2 and inner radius R1. 

(III)             Inner Single Ring.  From here on out, the board is divided into 20 zones, with each zone assigned a different amount of points from 1 to 20 (not shown on the diagram).  Here I am only concerned with the circular ring in general.  This ring has the outer radius of R3 and inner radius of R2.

(IV)             Triple Ring.  Each of the zones in the triple ring are worth triple the points of designated zone.   Let’s assign the outer radius of the triple ring R4 and inner radius, R3.

(V)               Outer Single Ring.  With outer radius R5, and inner radius R6.

(VI)             Double Ring.  Each of the zones in the double ring are worth double the points.   This ring has the outer radius R6 and inner radius R5.

 

Here, I am concerned about hitting the general scoring areas. 

Probability of hitting a single scoring area:

P1 = (area of inner single ring + area of outer single ring)/(area of the board)
= (π * (R3^2 – R2^2) + π * (R5^2 – R6^2))/(π *R^2)
= (π * (R3^2 – R2^2 + R5^2 – R6^2)/(π * R^2)
= (R3^2 – R2^2 + R5^2 – R6^2)/R^2

Probability of hitting a double ring:

P2 = (area of the double ring)/(area of the board)
= (π * (R6^2 – R5^2))/(π * R^2)
= (R6^2 – R5^2)/R^2

Probability of hitting a triple ring:

P3 = (area of the triple ring)/(area of the board)
= (π * (R4^2 – R3^2))/(π * R^2)
= (R4^2 – R3^2)/R^2

Probability of hitting the bulls-eye:

PB = (area of the inner bulls-eye + outer bulls-eye)/(area of the board)
= (π * R1^2 + π * (R2^2 – R1^2))/(π * R^2)
= (π * R2^2)/(π * R^2)
= R2^2/R^2

Scoring 60

The highest a single dart can score is 60, hitting the 20 zone in the triple ring.  Note the triple ring is divided into 20 zones of equal area.  The required probability of scoring 60 points is:


P60 = (R4^2 – R3^2)/20 * 1/R^2 = (R4^2 – R3^2)/(20*R^2)

Knowing the area of the circular ring is key to calculating probabilities of hitting areas of the dart board.


Eddie


This entry is property of Edward Shore. 2014.

 

Sunday, November 9, 2014

Two New Videos: Derivatives on the HP Prime, Derivative and Integral of abs(x)

Derivatives on the HP Prime Calculator

Video:  http://youtu.be/LXwLiPlKO2M

Notes:

Derivative Template:  Template Key, template is on the top row, 4th column

Numeric Format:  (d* function)/(d varaible = point), press Enter
In RPN Mode: You also need to press Shift+Comma (Eval)
Symbolic Format (CAS Mode):  (d function)/(d variable)

*d represents the derivative symbol

diff command:
diff(function, variable)


Derivative and Integral of abs(x)

Video:  http://youtu.be/8PikrlA5UlQ

A short derivation of the derivative and integral of absolute value function (abs(x)), and how the signum (sign(x)) function plays a part its calculation. 

Graphs made with the online Desmos calculator.  Please visit and explore at www.desmos.com
(This is NOT a paid endorsement)

Eddie


Blog Entry #403

This blog is property of Edward Shore.  2014

Saturday, November 8, 2014

My Morning at Honnold/Mudd Library: 2014-11-08 (Game Shows, Bravias Lattice, Prime Numbers)

My Morning at Honnold/Mudd Library

Honnold/Mudd Library - Claremont, CA


What I love about visiting the mathematics and science sections in a university library is that there is a feast of information.  Every time, there is something new to learn.   Here are some notes from today’s visit:

Game Shows and Winning

Source:  John Haigh.  “Taking Chances: Winning with Probability”  2nd Edition Oxford Press: 2003

Haigh introduces two central ideas of probability:  exclusive events and independence.  Is it impossible for two events to occur simultaneously?  Does one event have any effect on another?  Let’s explore some popular concepts of probability found in game shows.

“Find the Lady” – also known as the “Monty Hall Problem”.  You have three boxes, two are worthless and one has the prize.  After the contestant selects the box, the host shows one of the boxes that are worthless.  Statistically, if the contestant switches their initial choice, the contestant doubles the chance of winning.  That is, since the contestant initially is incorrect 2/3 of the time, and the host shows one of the incorrect boxes; the contestant who switches has a 2/3 chance of switching from a losing box to the winning box.

“Showcase Showdown” (The Price is Right) – spinning last may not be the most advantageous place to be.  It depends on the scores of the first two spinners, and the chance of getting the best score. 

“Who Wants to be a Millionaire” – In the classic structure of the game, before the time clock and the shuffle format, contestants were offered three lifelines:  Ask the Audience, 50:50, and Phone a Friend.  Haigh suggests using the lifelines in this order: 50:50, Ask the Audience, and Phone a Friend.  The risk between higher level questions increase as the game goes on.  

“Blockbusters”

A two-person team (white) goes against an individual player (blue in the UK, red in the US).  For each question the team has 2/3 chance of getting the question correctly, but will have to answer a minimum of five question correctly, while the individual can win the game as a few as four correct answers.

My calculation:  assuming that there are no blocks, the probability that the team wins with five consecutive answers is (2/3)^5 = .13169 versus (1/3)^4 = .01235. 

Ideal Crystals and Bravais Lattices

Source:  M.G. Cottam and D.R. Tilley  “Introduction to Surface and Superlattice Excitations”  Cambridge University Press:  Cambridge.  1989.

Ideal crystals are described as a basis of atoms (or ions) located on each point of a lattice, which is defined as a regular periodic array in space.  In an ideal crystal, all the lattice points are equivalent.

Each lattice is defined by the non-coplanar vector a1, a2, and a3.  That is, a1, a2, and a3 do not lie on one specific plane.  The space lattice is formed through a collection of vectors, symbolized as R, as:

R = n1*a1 + n2*a2 + n3*a3, where n1, n2, and n3 are integers. 

Since the ideal crystal has translational symmetry, the transition f(r+R)=f(r) is satisfied for all points in space, which such a point is represented by r. 

The reciprocal lattice vector of R, symbolized by Q, takes the form:

Q = v1*b1 + v2*b2 + v3*b3, where v1, v2, and v3 are integers, and

b1 = ((2*π*a2) x a3) / dot(a1, a2 x a3)
b2 = ((2*π*a3) x a1) / dot(a1, a2 x a3)
b3 = ((2*π*a1) x a2) / dot(a1, a2 x a3)

Where x represents the vector cross product and dot(v,u) represents the dot product.
Two-Dimensional Lattices

Let a1 and a2 be two translation vectors and the set R be defined as:

R = n1*a1 + n2*a2, where n1 and n2 are integers

The ends points of R from what is called the Bravais lattice.  There are five Bravais lattices which take the shape of one of these five forms:

1.    Square, |a1| = |a2|, θ = 90°
2.    Primitive Rectangle (general rectangle), |a1| ≠ |a2|, θ = 90°
3.    Centered Rectangle (rhombic), |a1| ≠ |a2|, θ = 90ׄ°
4.    Hexagonal, |a1| = |a2|, θ = 60° or 120°
5.    Oblique, all other cases

Cottam and Tilley illustrates the concept of bulk and surface excitation by using how Rayleigh’s descriptions of waves in a semi-infinite isotropic elastic medium.  In searching for plane-wave solution, in which the wave propagates parallel to the surface with vector q with velocity v and frequency w:

f’’(z) – (q^2 – w^2/v^2)*f(z) = 0

If q^2 < w^2/v^2, we have a bulk wave where

f(z) = B1*e^(i*√(w^2/v^2-q^2)*z) + B2*e^(-i*√(w^2/v^2-q^2)*z) where B1 and B2 are constants.

If q^2 > w^2/v^2, we have a decaying surface wave where

f(z) = B3*e^(√(q^2-w^2/v^2)*z)


Prime Number Goodies

Source:  Richard Carndall and Carl Pomeance.  “Prime Numbers: A Computational Perspective.  Second Edition” Springer.  2005

Twin Primes:  

Two primes that differ by 2.  Examples include 3 and 5, 29 and 31, and 311 and 313.  Is there an upper bound on twin primes, or is there an infinite set of pairs? 

V. Brun showed the upper bound for the number of twin prime sets under the integer x is:

‘π(x) = O(x*(ln ln x/ln x)^2) -> x*(ln x)^-2

Brun also showed that the sum of the reciprocal of the twin primes is finite.  That sum is denoted as the Brun constant which is:

B = (1/3 + 1/5) + (1/5 + 1/7) + (1/11 + 1/13) + …

The Brun constant is at least 1.71077 (using twin primes from 1 to 1,000,000).  As imagined, this series converges slowly.

Formulas to Produce Primes:

Euler used the polynomial x^2 + x + 41 to produce primes, which worked for all integers 0 to 39.  After x = 39, the polynomial continues produce primes at a remarkable probability. 

Mersenne Primes:

Mersenne primes, in the form of 2^q – 1 where q is a prime greater than 2.  It has been proven that if 2^q – 1 is prime, then so is q.  This form does not always produce primes (see q = 11 or q = 23).  In fact, the distribution of Mersenne primes gets scarce quickly as q increases.

Perfect numbers, integers in which the sum of its divisors except itself equals that integer (example: 6 = 1 + 2 + 3), can be characterized by Euler and Euclid:

An even number is perfect if and only if n = 2^(q-1)*(2^q-1) where 2^q-1 is prime.

Quadratic Residues:

The integer a is said to be a quadratic residue of coprime integer m if the congruence

x^2 ≡ a mod m

can be solved such as x is an integer and gcd(a, m) = 1. 

For example, 19 is a quadratic residue mod 5 since 19 mod 5 = 4 = 2^2 and gcd(19,5) = 1.

The next two basic definitions play a role in solving polynomials and equations involving prime numbers.

Legendre Symbol defined as (a/p) [normally written vertically]:

Let p be an odd prime.  Then:

(a/p) = legendresymbol(a,p) =
0 if a ≡ 0 mod p
1 if a is a quadratic residue of p
-1 if a is not a quadratic residue of p

Example:  p = 19.  The Legendre symbols of (4/19), (5/19), and (19/19) are 1, -1, and 0, respectively. (corrected on 2014-11-10 - with apologizes)

Jacobi Symbol defined as (a/m) [normally written vertically]:

Let m be any odd integer and a be any integer.  Then:

(a/m) = jacobisymbol(a, m) =  product( legendresymbol( a, prime factor of m )).

Example:  m = 27 = 3 * 9, a = 55

Jacobisymbol(55, 27) =

Legendresymbol(55, 3) * legendresymbol(55, 9) = 1 * 1 = 1

Is it shown that jacobisymbol(a, m) = 0 if and only if gcd(a, m) > 1.


Enjoy!  

Eddie

Blog Entry # 402

This blog is property of Edward Shore.  2014


Monday, November 3, 2014

Derivative of abs(x) and Integrals of abs(x), abs(e^x), abs(e^(a*x) + e^(a*y))

Derivative of abs(x) and Integrals of abs(x), abs(e^x), abs(e^(a*x) + e^(a*y))

For this blog entry, assume that are functions are in terms of x and a, x, y represent real numbers.

Definition of abs(x) (also symbolized as |x|)

Piecewise definition:

abs(x) = x if x > 0
abs(x) = 0 if x = 0
abs(x) = -x if x < 0

Also:

abs(x) = x * sign(x)

Where the sign(x), sometimes labeled sgn(x), is the sign or signum function. It is defined as:

sign(x) = 1 for x > 0
sign(x) = 0 for x = 0
sign(x) = -1 for x < 0

d/dx sign(x)

We can clearly demonstrate that d/dx sign(x) = 0 since:

d/dx sign(x) = 0 for x > 0
d/dx sign(x) = 0 for x = 0
d/dx sign(x) = 0 for x < 0

d/dx abs(x)

Using the chain rule:
d/dx abs(x)
= d/dx (x * sign(x))
= d/dx (x) * sign(x) + x * d/dx (sign(x))
= sign(x)

This can also be done with the piecewise representation:

d/dx abs(x) = 1 if x > 0
d/dx abs(x) = 0 if x = 0
d/dx abs(x) = -1 if x < 0

∫ abs(x) dx

∫ abs(x) dx
= ∫ x * sign(x) dx

Using integration by parts:
where u = sign(x), dv = x dx
Then: du = 0 dx, v = x^2/2

∫ abs(x) dx
= ∫ x * sign(x) dx
= x^2/2 * sign(x) - ∫ 0 dx
= x^2/2 * sign(x) + C

C is the arbitrary integration constant

With the piecewise representation:

∫ abs(x) dx = x^2/2 if x > 0
∫ abs(x) dx = 0 if x = 0
∫ abs(x) dx = -x^2/2 if x <0

Note that this is x^2/2 * sign(x).

∫ abs(e^(a*x)) dx

∫ abs(e^(a*x)) dx
= ∫ e^(a*x) * sign(e^(a*x)) dx
= 1/a * e^(a*x) * sign(e^(a*x)) - ∫ 0 dx
= 1/a * e^(a*x) * sign(e^(a*x)) + C

∫ abs(e^(a*x) + e^(a*y)) dx

∫ abs(e^(a*x) + e^(a*y)) dx
= ∫ (e^(a*x) + e^(a*y)) * sign(e^(a*x) + e^(a*y)) dx
= (e^(a*x)/a + x*e^(a*y)) * sign(e^(a*x) + e^(a*y)) - ∫ 0 dx
= (e^(a*x) + a*x*e^(a*y))/a * sign(e^(a*x) + e^(a*y)) + C

Eddie

This blog is property of Edward Shore. 2014

(Blog Entry # 401)

HP 20S: Acoustics Programs

HP 20S: Acoustics Programs Program A: Speed of Sound in Dry Air cs = 20.05 × √(273.15 + T°C) Code: 01: 61, 41, A: LBL A 02: ...