# If $AM$, $BN$, $CP$ are parallel chords in the circumcircle of equilateral $\triangle ABC$, then $\triangle MNP$ is also equilateral

Here's an interesting problem, and result, that I wish to share with the math community here at Math SE.

The above problem has two methods.

1. Pure geometry. A bit of angle chasing and standard results from circles help us arrive at the desired result - ∆MNP is equilateral. I'll put up a picture of the angle chasing part here (I hope someone edits it, and puts up a picture using GeoGebra or some similar software - I'm sorry I'm not good at editing)

I joined BP and CN for angle chasing purposes.

(Note that if M is the midpoint of arc BC, then the figure so formed is a star, with 8 equilateral triangles)

1. This can be solved beautifully using complex numbers. The vertices of the ∆ can be assumed to be 1,W,W2 on a unit circle centered at origin.

We need to prove that the new equilateral triangle is essentially a rotation of the original one, about an axis passing through center of its circumcircle perpendicular to its plane.

I haven't posted the solution, hope you fellow Math SE members try the problem and post your solutions and ideas in the answers section.

More methods (apart from geometry and complex numbers) are welcome. I'd like to know more about why this result is interesting in itself, and what other deductions can be made from it.

• +1 for a nicely posed question. the new equilateral triangle is essentially a rotation of the original one For a different geometric hint, consider the diameter perpendicular to $AM\,$, which is orthogonal to and bisects each of $AM, BN, CP\,$ (why?). Then $\triangle MNP$ is simply the reflection of $\triangle ABC$ across this diameter. – dxiv Dec 29 '17 at 5:35
• Why don't you learn basic MathJax yourself instead of asking people to do it for you? – user21820 Dec 29 '17 at 6:46
• Can you state the result in the title, instead of claiming that it is "interesting"? (Because personally I don't find many results about triangles to be interesting at all.) – Asaf Karagila Dec 29 '17 at 10:12

A geometric proof for part a.

From the OP:

We need to prove that the new equilateral triangle is essentially a rotation of the original one, about an axis passing through center of its circumcircle perpendicular to its plane.

I think it's easier to think of it as a reflection. In the diagram below

• $GH$ is the diameter of the circumcircle that is perpendicular to $AM$.
• It's given that $BN$ and $CP$ are parallel to $AM$.
• Hence, points $M,N,P$ are reflections of points $A,B,C$ respectively in the line $GH$.
• Hence, $\triangle MNP$ is a reflection of $\triangle ABC$ through the line $GH$.

By way of the reflective symmetry about $GH$ and the rotational symmetry of the equilateral triangles we can note that $AP=BN=CM$, and that $AN=BM=CP$. From this we can draw a system of parallel lines to show that $AM=BN+CP$.

• Brilliant! Do you not think it would work out backwards, too? I mean, whether it now follows that $AN$, $BP$ and $CM$ are all parallel? Because this will give a straightforward proof for (b): let $Q$ be the intersection of $BP$ and $AM$, then $BQAN$ and $QPCM$ are parallelograms, so $AM=AQ+QM=BN+CP$. – user491874 Dec 29 '17 at 11:54
• @user8734617 Yes, it works exactly like that. I was just getting my diagram together when you commented... – nickgard Dec 29 '17 at 12:05

Geometric hint: cyclic trapezoids $APCM, AMBN$ must be isosceles, so arcs $\overparen{AP}=\overparen{CM}$ and $\overparen{BM}=\overparen{AN}\,$. Since $\,\overparen{AB}=\overparen{BC}\,$ the latter implies $\overparen{BN}=\overparen{AB}-\overparen{AN}=\overparen{BC}-\overparen{BM}=\overparen{CM}\,$, so in the end $\overparen{AP}=\overparen{CM}=\overparen{BN}\,$ and therefore $\triangle PNM$ is $\triangle ABC$ rotated by $\overparen{AP}$.

As for point b, writing Ptolemy's theorem twice:

• $APCM\,$: $\;AC^2=AP^2 + AM \cdot CP$

• $AMBN\,$: $\;AB^2=AN^2 + AM \cdot BN$

Subtracting the above and using that $AC=AB, AP=BN, CP=AN\,$:

$$0 = BN^2-CP^2+AM\cdot(CP-BN) = (BN-CP)\cdot(BN+CP-AM)$$

It follows that $\,BN+CP-AM=0 \iff AM = BN+CP\,$.  (Rigorously, the case $\,BN=CP\,$ would need to be considered separately, or could be derived by continuity).

Draw a line through $P$ parallel to $CM$, and let it intersect $AM$ at $Q$. $PQMC$ is a parallelogram, so $CP$=$QM$.

On the other hand, it is easy to see that $\triangle APQ$ is equilateral, as its angles are $60^\circ$ ($\angle A$ is peripheral over arc $\overparen {PM}$ and $\angle Q=\angle CMA$ is peripheral over arc $\overparen{AC}$). Thus, $AQ$=$AP$=$BN$.

Finally, $AM=AQ+QM=BN+CP$ as claimed.

This can be solved beautifully using complex numbers. The vertices of the ∆ can be assumed to be 1,W,W2 on a unit circle centered at origin.

Here is an attempt to prove it using complex numbers.

I am trying to prove it backwards.Let C,A,B be $1$,$\omega$,$\omega^2$ and M be $e^{i\theta}$.

If $\Delta$MPN is an equilateral triangle,then AM||PC which implies

AM=$e^{i\theta}-\omega$

OP=OM$\times \omega$

PC=$e^{i\theta}\omega-1$

We have to prove AM=$\lambda$PC,for some scalar $\lambda$

@schrodinger_16 ,can you help me to proceed further?


# Is the union of two circles homeomorphic to an interval?

Let $$Y$$ be the subspace of $$\Bbb R^2$$ given by $$Y=\{(x,y): x^2+ y^2=1\}\cup \{(x,y): (x−2)^2+ y^2=1\}$$. Is $$Y$$ homeomorphic to an interval?

I have previously already shown that the unit circle is not homeomorphic to any interval and I think this is also true for $$Y$$. Basically if we remove a point from $$Y$$ that is not the intersection, and remove a point from any interval that is not an endpoint, the interval becomes disconnected, but the union of two circles are still connected so there is no homeomorphisms. Is that correct?

• The only point whose removal disconnects $Y$ is $\langle 1,0\rangle$, but the removal of any non-endpoint of an interval disconnects the interval. A homeomorphism takes cut points to cut points, so there is no homeomorphism from $Y$ to an interval. – Brian M. Scott Jan 18 at 7:49
• Just to make sure I am applying the theorem correctly, it states that If X and Y are homeomorphic, there is also a homeomorphism if we remove any point from X and any point from Y right? So we can choose points to remove such that X and Y have different properties such as connectedness which means they are not homeomorphic right? – William Jan 18 at 7:57
• Not quite. The point is that if $X$ and $Y$ are spaces, $h:X\to Y$ is a homeomorphism, and $x$ is a cut point of $X$, then $h(x)$ must be a cut point of $Y$, because $X\setminus\{x\}$ is homeomorphic to $Y\setminus\{h(x)\}$. This means that $h$ must be (among other things) a bijection between the cut points of $X$ and the cut points of $Y$. Your space $Y$ has only one cut point, while an interval has infinitely many, so there cannot be a bijection between the cut points of $Y$ and the cut points of an interval, and therefore there can be no homeomorphism between them. – Brian M. Scott Jan 18 at 8:17
• oh ok got it! Thanks – William Jan 18 at 8:26
• You’re welcome! – Brian M. Scott Jan 18 at 8:26

A cutpoint of a connected space $$X$$ is a $$p \in X$$ such that $$X\setminus\{p\}$$ is disconnected.

If $$f:X \to Y$$ is a homeomorphism of connected spaces $$X$$ and $$Y$$ and $$p$$ is a cut point of $$X$$ then $$f(p)$$ is a cutpoint of $$Y$$ (and vice versa).

If we take $$X$$ to be an interval, then $$X$$ has at most two non-cutpoints. (the endpoints in the case of a closed interval). $$Y$$ on the other hand has infinitely many non-cutpoints (all points except $$(1,0)$$). So there can be no homeomorphism between them by the observations in the second paragraph.

Here's an alternative argument that covers wide range of spaces, regardless of cut points.

Let $$X$$, $$Y$$ be any topological spaces. Consider a homeomorphism $$f:X\to Y$$. Now let $$Z$$ be any topological space and $$\alpha:Z\to X$$ be a continuous function. Then $$\alpha$$ is injective if and only if $$f\circ\alpha$$ is injective. Which is easy to see by applying $$f$$ to $$\alpha$$ and $$f^{-1}$$ to $$f\circ\alpha$$.

In particular $$X$$ admits an injective map $$Z\to X$$ if and only if $$Y$$ admits an injective map $$Z\to Y$$.

This shows that your $$Y$$ (or more generally any space containing $$S^1$$ as a subspace) cannot be homeomorphic to the interval $$[0,1]$$. Because there is an obvious injective continuous map $$S^1\to Y$$ while there is no continuous injective map $$S^1\to [0,1]$$. That's because every map $$S^1\to [0,1]$$ arises from a map $$[0,1]\to [0,1]$$ with the same values at endpoints and so by the intermediate value property it cannot be injective on $$(0,1)$$, which then "lifts" to $$S^1$$.

Just for a change: Let $$D$$ be the open disk in $$\Bbb R^2$$ centered at $$p=(1,0)$$ with radius $$1$$ and let $$E=D\cap Y.$$ Then $$E$$ is a connected subspace of $$Y$$ and $$E\setminus \{p\}$$ is the union of $$4$$ pairwise-disjoint non-empty connected open subspaces of $$E$$. But if $$E'$$ is any connected subspace of $$\Bbb R$$ and $$p'\in E'$$ then $$E'\setminus \{p'\}$$ is either connected or is the union of $$2$$ disjoint non-empty connected open subspaces of $$E'$$.


Tag Archives: probability

Marilyn vos Savant and Conditional Probability

The following question appeared in the “Ask Marilyn” column in the August 16, 2015 issue of Parade magazine.  The writer seems stuck between two probabilities.

(Click here for a cleaned-up online version if you don’t like the newspaper look.)

I just pitched this question to my statistics class (we start the year with a probability unit).  I thought some of you might like it for your classes, too.

I asked them to do two things.  1) Answer the writer’s question, AND 2) Use precise probability terminology to identify the source of the writer’s conundrum.  Can you answer both before reading further?

Very briefly, the writer is correct in both situations.  If each of the four people draws a random straw, there is absolutely a 1 in 4 chance of each drawing the straw.  Think about shuffling the straws and “dealing” one to each person much like shuffling a deck of cards and dealing out all of the cards.  Any given straw or card is equally likely to land in any player’s hand.

Now let the first person look at his or her straw.  It is either short or not.  The author is then correct at claiming the probability of others holding the straw is now 0 (if the first person found the short straw) or 1/3 (if the first person did not).  And this is precisely the source of the writer’s conundrum.  She’s actually asking two different questions but thinks she’s asking only one.

The 1/4 result is from a pure, simple probability scenario.  There are four possible equally-likely locations for the short straw.

The 0 and 1/3 results happen only after the first (or any other) person looks at his or her straw.  At that point, the problem shifts from simple probability to conditional probability.  After observing a straw, the question shifts to determining the probability that one of the remaining people has the short straw GIVEN that you know the result of one person’s draw.

So, the writer was correct in all of her claims; she just didn’t realize she was asking two fundamentally different questions.  That’s a pretty excusable lapse, in my opinion.  Slips into conditional probability are often missed.

Perhaps the most famous of these misses is the solution to the Monty Hall scenario that vos Savant famously posited years ago.  What I particularly love about this is the number of very-well-educated mathematicians who missed the conditional and wrote flaming retorts to vos Savant brandishing their PhDs and ultimately found themselves publicly supporting errant conclusions.  You can read the original question, errant responses, and vos Savant’s very clear explanation here.

CONCLUSION:

Probability is subtle and catches all of us at some point.  Even so, the careful thinking required to dissect and answer subtle probability questions is arguably one of the best exercises of logical reasoning around.

RANDOM(?) CONNECTION:

As a completely different connection, I think this is very much like Heisenberg’s Uncertainty Principle.  Until the first straw is observed, the short straw really could (does?) exist in all hands simultaneously.  Observing the system (looking at one person’s straw) permanently changes the state of the system, bifurcating forever the system into one of two potential future states:  the short straw is found in the first hand or is it not.

CORRECTION (3 hours after posting):

I knew I was likely to overstate or misname something in my final connection.  Thanks to Mike Lawler (@mikeandallie) for a quick correction via Twitter.  I should have called this quantum superposition and not the uncertainty principle.  Thanks so much, Mike.

Innumeracy and Sharks

Here’s a brief snippet from a conversation about the recent spate of shark attacks in North Carolina as I heard yesterday morning (approx 6AM, 7/4/15) on CNN.

George Burgess (Director, Florida Program for Shark Research):  “One thing is going to happen and that is there are going to be more [shark] attacks year in and year out simply because the human population continues to rise and with it a concurrent interest in aquatic recreation.  So one of the few things I, as a scientist, can predict with some certainty is more attacks in the future because there’s more people.”

Alison Kosik (CNN anchor):  “That is scary and I just started surfing so I may dial that back a bit.”

This marks another great teaching moment spinning out of innumeracy in the media.  I plan to drop just those two paragraphs on my classes when school restarts this fall and open the discussion.  I wonder how many will question the implied, but irrational probability in Kosik’s reply.

TOO MUCH COVERAGE?

Burgess argued elsewhere that

Increased documentation of the incidents may also make people believe attacks are more prevalent.  (Source here.)

It’s certainly plausible that some people think shark attacks are more common than they really are.  But that begs the question of just how nervous a swimmer should be.

MEDIA MANIPULATION

CNN–like almost all mass media, but not nearly as bad as some–shamelessly hyper-focuses on catchy news banners, and what could be catchier than something like ‘Shark attacks spike just as tourists crowd beaches on busy July 4th weekend”?  Was Kosik reading a prepared script that distorts the underlying probability, or was she showing signs of innumeracy? I hope it’s not both, but neither is good.

IRRATIONAL PROBABILITY

So just how uncommon is a shark attack?  In a few minutes of Web research, I found that there were 25 shark attacks in North Carolina from 2005-2014.  There was at least one every year with a maximum of 5 attacks in 2010 (source).  So this year’s 7 attacks is certainly unusually high from the recent annual average of 2.5, but John Allen Paulos reminded us in Innumeracy that [in this case about 3 times] a very small probability, is still a very small probability.

In another place, Burgess noted

“It’s amazing, given the billions of hours humans spend in the water, how uncommon attacks are,” Burgess said, “but that doesn’t make you feel better if you’re one of them.”  (Source here.)

18.9% of NC visitors went to the beach (source) .  In 2012, there were approximately 45.4 million visitors to NC (source).  To overestimate the number of beachgoers, Let’s say 19% of 46 million visitors, or 8.7 million people, went to NC beaches.  Seriously underestimating the number of beachgoers who enter the ocean, assume only 1 in 8 beachgoers entered the ocean.  That’s still a very small 7 attacks out of 1 million people in the ocean.  Because beachgoers almost always enter the ocean at some point (in my experiences), the average likely is much closer to 2 or fewer attacks per million.

To put that in perspective, 110,406 people were injured in car accidents in 2012 in NC (source).  The probability of getting injured driving to the beach is many orders of magnitude larger than the likelihood of ever being attacked by a shark.

Alison Kosik should keep up her surfing.

If you made it to a NC beach safely, enjoy the swim.  It’s safer than your trip there was or your trip home is going to be.  But even those trips are reasonably safe.

I certainly am not diminishing the anguish of accident victims (shark, auto, or otherwise), but accidents happen.  But don’t make too much of one either.  Be intelligent, be reasonable, and enjoy life.

In the end, I hope my students learn to question facts and probabilities.  I hope they always question “How reasonable is what I’m being told?”

Here’s a much more balanced article on shark attacks from NPR:
Don’t Blame the Sharks For ‘Perfect Storm’ of Attacks In North Carolina.

Book suggestions:
1)  Innumeracy, John Allen Paulos
2) Predictably Irrational, Dan Ariely

CAS and Normal Probability Distributions

My presentation this past Saturday at the 2015 T^3 International Conference in Dallas, TX was on the underappreciated applicability of CAS to statistics.  This post shares some of what I shared there from my first year teaching AP Statistics.

MOVING PAST OUTDATED PEDAGOGY

It’s been decades since we’ve required students to use tables of values to compute by hand trigonometric and radical values.  It seems odd to me that we continue to do exactly that today for so many statistics classes, including the AP.  While the College Board permits statistics-capable calculators, it still provides probability tables with every exam.  That messaging is clear:  it is still “acceptable” to teach statistics using outdated probability tables.

In this, my first year teaching AP Statistics, I decided it was time for my students and I to completely break from this lingering past.  My statistics classes this year have been 100% software-enabled.  Not one of my students has been required to use or even see any tables of probability values.

My classes also have been fortunate to have complete CAS availability on their laptops.  My school’s math department deliberately adopted the TI-Nspire platform in part because that software looks and operates exactly the same on tablet, computer, and handheld platforms.  We primarily use the computer-based version for learning because of the speed and visualization of the large “real estate” there.  We are shifting to school-owned handhelds in our last month before the AP Exam to gain practice on the platform required on the AP.

The remainder of this post shares ways my students and I have learned to apply the TI-Nspire CAS to some statistical questions around normal distributions.

FINDING NORMAL AREAS AND PROBABILITIES

Assume a manufacturer makes golf balls whose distances traveled under identical testing conditions are approximately normally distributed with a mean 295 yards with a standard deviation of 3 yards.  What is the probability that one such randomly selected ball travels more than 300 yards?

Traditional statistics courses teach students to transform the 300 yards into a z-score to look up in a probability table.  That approach obviously works, but with appropriate technology, I believe there will be far less need to use or even compute z-scores in much the same way that always converting logarithms to base-10 or base-to use logarithmic tables is anachronistic when using many modern scientific calculators.

TI calculators and other technologies allow computations of non-standard normal curves.  Notice the Nspire CAS calculation below the curve uses both bounds of the area of interest along with the mean and standard deviation of the distribution to accomplish the computation in a single step.

So the probability of a randomly selected ball from the population described above going more than 300 yards is 4.779%.

GOING BACKWARDS

Now assume the manufacturing process can control the mean distance traveled.  What mean should it use so that no more than 1% of the golf balls travel more than 300 yards?

Depending on the available normal probability tables, the traditional approach to this problem is again to work with z-scores.  A modified CAS version of this is shown below.

Therefore, the manufacturer should produce a ball that travels a mean 293.021 yards under the given conditions.

The approach is legitimate, and I shared it with my students.  Several of them ultimately chose a more efficient single line command:

But remember that the invNorm() and normCdf() commands on the Nspire are themselves functions, and so their internal parameters are available to solve commands.  A pure CAS, “forward solution” still incorporating only the normCdf() command to which my students were first introduced makes use of this to determine the missing center.

DIFFERENTIATING INSTRUCTION

While calculus techniques definitely are NOT part of the AP Statistics curriculum, I do have several students jointly enrolled in various calculus classes.  Some of these astutely noted the similarity between the area-based arguments above and the area under a curve techniques they were learning in their calculus classes.  Never being one to pass on a teaching moment, I pulled a few of these to the side to show them that the previous solutions also could have been derived via integration.

I can’t recall any instances of my students actually employing integrals to solve statistics problems this year, but just having the connection verified completely solidified the mathematics they were learning in my class.

CONFIDENCE INTERVALS

The mean lead level of 35 crows in a random sample from a region was 4.90 ppm and the standard deviation was 1.12 ppm.  Construct a 95 percent confidence interval for the mean lead level of crows in the region.

Many students–mine included–have difficulty comprehending confidence intervals and resort to “black box” confidence interval tools available in most (all?) statistics-capable calculators, including the TI-Nspire.

As n is greater than 30, I can compute the requested z-interval by filling in just four entries in a pop-up window and pressing Enter.

Convenient, for sure, but this approach doesn’t help the confused students understand that the confidence interval is nothing more than the bounds of the middle 95% of the normal pdf described in the problem, a fact crystallized by the application of the tools the students have been using for weeks by that point in the course.

Notice in the solve+normCdf() combination commands that the unknown this time was a bound and not the mean as was the case in the previous example.

EXTENDING THE RULE OF FOUR

I’ve used the “Rule of Four” in every math class I’ve taught for over two decades, explaining that every mathematical concept can be explained or expressed four different ways:  Numerically, Algebraically, Graphically (including graphs and geometric figures), and Verbally.  While not the contextual point of his quote, I often cite MIT’s Marvin Minsky here:

“You don’t understand anything until you learn it more than one way.”

Learning to translate between the four representations grants deeper understanding of concepts and often gives access to solutions in one form that may be difficult or impossible in other forms.

After my decades-long work with CAS, I now believe there is actually a 5th representation of mathematical ideas:  Tools.  Knowing how to translate a question into a form that your tool (in the case of CAS, the tool is computers) can manage or compute creates a different representation of the problem and requires deeper insights to manage the translation.

I knew some of my students this year had deeply embraced this “5th Way” when one showed me his alternative approach to the confidence interval question:

I found this solution particularly lovely for several reasons.

• The student knew about lists and statistical commands and on a whim tried combining them in a novel way to produce the desired solution.
• He found the confidence interval directly using a normal distribution command rather than the arguably more convenient black box confidence interval tool.  He also showed explicitly his understanding of the distribution of sample means by adjusting the given standard deviation for the sample size.
• Finally, while using a CAS sometimes involves getting answers in forms you didn’t expect, in this case, I think the CAS command and list output actually provide a cleaner, interval-looking result than the black box confidence interval command much more intuitively connected to the actual meaning of a confidence interval.
• While I haven’t tried it out, it seems to me that this approach also should work on non-CAS statistical calculators that can handle lists.

(a very minor disappointment, quickly overcome)

Returning to my multiple approaches, I tried using my student’s newfound approach using a normCdf() command.

Alas, my Nspire returned the very command I had entered, indicating that it didn’t understand the question I had posed.  While a bit disappointed that this approach didn’t work, I was actually excited to have discovered a boundary in the current programming of the Nspire.  Perhaps someday this approach will also work, but my students and I have many other directions we can exploit to find what we need.

Leaving the probability tables behind in their appropriate historical dust while fully embracing the power of modern classroom technology to enhance my students’ statistical learning and understanding, I’m convinced I made the right decision to start this school year.  They know more, understand the foundations of statistics better, and as a group feel much more confident and flexible.  Whether their scores on next month’s AP exam will reflect their growth, I can’t say, but they’ve definitely learned more statistics this year than any previous statistics class I’ve ever taught.

COMPLETE FILES FROM MY 2015 T3 PRESENTATION

If you are interested, you can download here the PowerPoint file for my entire Nspired Statistics and CAS presentation from last week’s 2015 T3 International Conference in Dallas, TX.  While not the point of this post, the presentation started with a non-calculus derivation/explanation of linear regressions.  Using some great feedback from Jeff McCalla, here is an Nspire CAS document creating the linear regression computation updated from what I presented in Dallas.  I hope you found this post and these files helpful, or at least thought-provoking.

Probability, Polynomials, and Sicherman Dice

Three years ago, I encountered a question on the TI-Nspire Google group asking if there was a way to use CAS to solve probability problems.  The ideas I pitched in my initial response and follow-up a year later (after first using it with students in a statistics class) have been thoroughly re-confirmed in my first year teaching AP Statistics.  I’ll quickly re-share them below before extending the concept with ideas I picked up a couple weeks ago from Steve Phelps’ session on Probability, Polynomials, and CAS at the 64th annual OCTM conference earlier this month in Cleveland, OH.

BINOMIALS:  FROM POLYNOMIALS TO SAMPLE SPACES

Once you understand them, binomial probability distributions aren’t that difficult, but the initial conjoining of combinatorics and probability makes this a perennially difficult topic for many students.  The standard formula for the probability of determining the chances of K successes in N attempts of a binomial situation where p is the probability of a single success in a single attempt is no less daunting:

$\displaystyle \left( \begin{matrix} N \\ K \end{matrix} \right) p^K (1-p)^{N-K} = \frac{N!}{K! (N-K)!} p^K (1-p)^{N-K}$

But that is almost exactly the same result one gets by raising binomials to whole number powers, so why not use a CAS to expand a polynomial and at least compute the $\displaystyle \left( \begin{matrix} N \\ K \end{matrix} \right)$ portion of the probability?  One added advantage of using a CAS is that you could use full event names instead of abbreviations, making it even easier to identify the meaning of each event.

The TI-Nspire output above shows the entire sample space resulting from flipping a coin 6 times.  Each term is an event.  Within each term, the exponent of each variable notes the number of times that variable occurs and the coefficient is the number of times that combination occurs.  The overall exponent in the expand command is the number of trials.  For example, the middle term– $20\cdot heads^3 \cdot tails^3$ –says that there are 20 ways you could get 3 heads and 3 tails when tossing a coin 6 times. The last term is just $tails^6$, and its implied coefficient is 1, meaning there is just one way to flip 6 tails in 6 tosses.

The expand command makes more sense than memorized algorithms and provides context to students until they gain a deeper understanding of what’s actually going on.

FROM POLYNOMIALS TO PROBABILITY

Still using the expand command, if each variable is preceded by its probability, the CAS result combines the entire sample space AND the corresponding probability distribution function.  For example, when rolling a fair die four times, the distribution for 1s vs. not 1s (2, 3, 4, 5, or 6) is given by

The highlighted term says there is a 38.58% chance that there will be exactly one 1 and any three other numbers (2, 3, 4, 5, or 6) in four rolls of a fair 6-sided die.  The probabilities of the other four events in the sample space are also shown.  Within the TI-Nspire (CAS or non-CAS), one could use a command to give all of these probabilities simultaneously (below), but then one has to remember whether the non-contextualized probabilities are for increasing or decreasing values of which binomial outcome.

Particularly early on in their explorations of binomial probabilities, students I’ve taught have shown a very clear preference for the polynomial approach, even when allowed to choose any approach that makes sense to them.

TAKING POLYNOMIALS FROM ONE DIE TO MANY

Given these earlier thoughts, I was naturally drawn to Steve Phelps “Probability, Polynomials, and CAS” session at the November 2014 OCTM annual meeting in Cleveland, OH.  Among the ideas he shared was using polynomials to create the distribution function for the sum of two fair 6-sided dice.  My immediate thought was to apply my earlier ideas.  As noted in my initial post, the expansion approach above is not limited to binomial situations.  My first reflexive CAS command in Steve’s session before he share anything was this.

By writing the outcomes in words, the CAS interprets them as variables.  I got the entire sample space, but didn’t learn gain anything beyond a long polynomial.  The first output– $five^2$ –with its implied coefficient says there is 1 way to get 2 fives.  The second term– $2\cdot five \cdot four$ –says there are 2 ways to get 1 five and 1 four.  Nice that the technology gives me all the terms so quickly, but it doesn’t help me get a distribution function of the sum.  I got the distributions of the specific outcomes, but the way I defined the variables didn’t permit sum of their actual numerical values.  Time to listen to the speaker.

He suggested using a common variable, X, for all faces with the value of each face expressed as an exponent.  That is, a standard 6-sided die would be represented by $X^1+X^2+ X^3+X^4+X^5+X^6$ where the six different exponents represent the numbers on the six faces of a typical 6-sided die.  Rolling two such dice simultaneously is handled as I did earlier with the binomial cases.

NOTE:  Exponents are handled in TWO different ways here.  1) Within a single polynomial, an exponent is an event value, and 2) Outside a polynomial, an exponent indicates the number of times that polynomial is applied within the specific event.  Coefficients have the same meaning as before.

Because the variables are now the same, when specific terms are multiplied, their exponents (face values) will be added–exactly what I wanted to happen.  That means the sum of the faces when you roll two dice is determined by the following.

Notice that the output is a single polynomial.  Therefore, the exponents are the values of individual cases.  For a couple examples, there are 3 ways to get a sum of 10 $\left( 3 \cdot x^{10} \right)$, 2 ways to get a sum of 3 $\left( 2 \cdot x^3 \right)$, etc.  The most commonly occurring outcome is the term with the largest coefficient.  For rolling two standard fair 6-sided dice, a sum of 7 is the most common outcome, occurring 6 times $\left( 6 \cdot x^7 \right)$.  That certainly simplifies the typical 6×6 tables used to compute the sums and probabilities resulting from rolling two dice.

While not the point of Steve’s talk, I immediately saw that technology had just opened the door to problems that had been computationally inaccessible in the past.  For example, what is the most common sum when rolling 5 dice and what is the probability of that sum?  On my CAS, I entered this.

In the middle of the expanded polynomial are two terms with the largest coefficients, $780 \cdot x^{18}$ and $780 \cdot x^{19}$, meaning a sums of 17 and 18 are the most common, equally likely outcomes when rolling 5 dice.  As there are $6^5=7776$ possible outcomes when rolling a die 5 times, the probability of each of these is $\frac{780}{7776} \approx 0.1003$, or about 10.03% chance each for a sum of 17 or 18.  This can be verified by inserting the probabilities as coefficients before each term before CAS expanding.

With thought, this shouldn’t be surprising as the expected mean value of rolling a 6-sided die many times is 3.5, and $5 \cdot 3.5 = 17.5$, so the integers on either side of 17.5 (17 & 18) should be the most common.  Technology confirms intuition.

ROLLING DIFFERENT DICE SIMULTANEOUSLY

What is the distribution of sums when rolling a 4-sided and a 6-sided die together?  No problem.  Just multiply two different polynomials, one representative of each die.

The output shows that sums of 5, 6, and 7 would be the most common, each occurring four times with probability $\frac{1}{6}$ and together accounting for half of all outcomes of rolling these two dice together.

A BEAUTIFUL EXTENSION–SICHERMAN DICE

My most unexpected gain from Steve’s talk happened when he asked if we could get the same distribution of sums as “normal” 6-sided dice, but from two different 6-sided dice.  The only restriction he gave was that all of the faces of the new dice had to have positive values.  This can be approached by realizing that the distribution of sums of the two normal dice can be found by multiplying two representative polynomials to get

$x^{12}+2x^{11}+3x^{10}+4x^9+5x^8+6x^7+5x^6+4x^5+3x^4+2x^3+x^2$.

Restating the question in the terms of this post, are there two other polynomials that could be multiplied to give the same product?  That is, does this polynomial factor into other polynomials that could multiply to the same product?  A CAS factor command gives

Any rearrangement of these eight (four distinct) sub-polynomials would create the same distribution as the sum of two dice, but what would the the separate sub-products mean in terms of the dice?  As a first example, what if the first two expressions were used for one die (line 1 below) and the two squared trinomials comprised a second die (line 2)?

Line 1 actually describes a 4-sided die with one face of 4, two faces with 3s, and one face of 2.  Line 2 describes a 9-sided die (whatever that is) with one face of 8, two faces of 6, three faces of 4, two faces of 2, and one face with a 0 ( $1=1 \cdot x^0$).  This means rolling a 4-sided and a 9-sided die as described would give exactly the same sum distribution.  Cool, but not what I wanted.  Now what?

Factorization gave four distinct sub-polynomials, each with multitude 2.  One die could contain 0, 1, or 2 of each of these with the remaining factors on the other die.  That means there are $3^4=81$ different possible dice combinations.  I could continue with a trail-and-error approach, but I wanted to be more efficient and elegant.

What follows is the result of thinking about the problem for a while.  Like most math solutions to interesting problems, ultimate solutions are typically much cleaner and more elegant than the thoughts that went into them.  Problem solving is a messy–but very rewarding–business.

SOLUTION

Here are my insights over time:

1) I realized that the $x^2$ term would raise the power (face values) of the desired dice, but would not change the coefficients (number of faces).  Because Steve asked for dice with all positive face values.  That meant each desired die had to have at least one x to prevent non-positive face values.

2) My first attempt didn’t create 6-sided dice.  The sums of the coefficients of the sub-polynomials determined the number of sides.  That sum could also be found by substituting $x=1$ into the sub-polynomial.  I want 6-sided dice, so the final coefficients must add to 6.  The coefficients of the factored polynomials of any die individually must add to 2, 3, or 6 and have a product of 6.  The coefficients of $(x+1)$ add to 2, $\left( x^2+x+1 \right)$ add to 3, and $\left( x^2-x+1 \right)$ add to 1.  The only way to get a polynomial coefficient sum of 6 (and thereby create 6-sided dice) is for each die to have one $(x+1)$ factor and one $\left( x^2+x+1 \right)$ factor.

3) That leaves the two $\left( x^2-x+1 \right)$ factors.  They could split between the two dice or both could be on one die, leaving none on the other.  We’ve already determined that each die already had to have one each of the x, $(x+1)$, and $\left( x^2+x+1 \right)$ factors.  To also split the $\left( x^2-x+1 \right)$ factors would result in the original dice:  Two normal 6-sided dice.  If I want different dice, I have to load both of these factors on one die.

That means there is ONLY ONE POSSIBLE alternative for two 6-sided dice that have the same sum distribution as two normal 6-sided dice.

One die would have single faces of 8, 6, 5, 4, 3, and 1.  The other die would have one 4, two 3s, two 2s, and one 1.  And this is exactly the result of the famous(?) Sicherman Dice.

If a 0 face value was allowed, shift one factor of x from one polynomial to the other.  This can be done two ways.

The first possibility has dice with faces {9, 7, 6, 5, 4, 2} and {3, 2, 2, 1, 1, 0}, and the second has faces {7, 5, 4, 3, 2, 0} and {5, 4, 4, 3, 3, 2}, giving the only other two non-negative solutions to the Sicherman Dice.

Both of these are nothing more than adding one to all faces of one die and subtracting one from from all faces of the other.  While not necessary to use polynomials to compute these, they are equivalent to multiplying the polynomial of one die by x and the other by $\frac{1}{x}$ as many times as desired. That means there are an infinite number of 6-sided dice with the same sum distribution as normal 6-sided dice if you allow the sides to have negative faces.  One of these is

corresponding to a pair of Sicherman Dice with faces {6, 4, 3, 2, 1, -1} and {1,5,5,4,4,3}.

CONCLUSION:

There are other very interesting properties of Sicherman Dice, but this is already a very long post.  In the end, there are tremendous connections between probability and polynomials that are accessible to students at the secondary level and beyond.  And CAS keeps the focus on student learning and away from the manipulations that aren’t even the point in these explorations.

Enjoy.

Birthdays, CAS, Probability, and Student Creativity

Many readers are familiar with the very counter-intuitive Birthday Problem:

It is always fun to be in a group when two people suddenly discover that they share a birthday.  Should we be surprised when this happens?  Asked a different way, how large a group of randomly selected people is required to have at least a 50% probability of having a birthday match within the group?

I posed this question to both of my sections of AP Statistics in the first week of school this year.  In a quick poll, one section had a birthday match–two students who had taken classes together for a few years without even realizing what they had in common.  Was I lucky, or was this a commonplace occurrence?

Intrigue over this question motivated our early study of probability.  The remainder of this post follows what I believe is the traditional approach to the problem, supplemented by the computational power of a computer algebra system (CAS)–the TI Nspire CX CAS–available on each of my students’ laptops.

Initial Attempt:

Their first try at a solution was direct.  The difficulty was the number of ways a common birthday could occur.  After establishing that we wanted any common birthday to count as a match and not just an a priori specific birthday, we tried to find the number of ways birthday matches could happen for different sized groups.  Starting small, they reasoned that

• If there were 2 people in a room, there was only 1 possible birthday connection.
• If there were 3 people (A, B, and C), there were 4 possible birthday connections–three pairs (A-B, A-C, and B-C) and one triple (A-B-C).
• For four people (A, B, C, and D), they realized they had to look for pair, triple, and quad connections.  The latter two were easiest:  one quad (A-B-C-D) and four triples (A-B-C, A-B-D, A-C-D, and B-C-D).  For the pairs, we considered the problem as four points and looked for all the ways we could create segments.  That gave (A-B, A-C, A-D, B-C, B-D, and C-D).  These could also occur as double pairs in three ways (A-B & C-D, A-C & B-D, and A-D & B-C).  All together, this made 1+4+6+3=14 ways.

This required lots of support from me and was becoming VERY COMPLICATED VERY QUICKLY.  Two people had 1 connection, 3 people had 4 connections, and 4 people had 14 connections.  Tracking all of the possible connections as the group size expanded–and especially not losing track of any possibilities–was making this approach difficult.  This created a perfect opportunity to use complement probabilities.

While there were MANY ways to have a shared birthday, for every sized group, there is one and only one way to not have any shared birthdays–they all had to be different.  And computing a probability for a single possibility was a much simpler task.

We imagined an empty room with random people entering one at a time.  The first person entering could have any birthday without matching anyone, so $P \left( \text{no match with 1 person} \right) = \frac{365}{365}$ .  When the second person entered, there were 364 unchosen birthdays remaining, giving $P \left( \text{no match with 2 people} \right) = \frac{365}{365} \cdot \frac{364}{365}$, and $P \left( \text{no match with 3 people} \right) = \frac{365}{365} \cdot \frac{364}{365} \cdot \frac{363}{365}$.  And the complements to each of these are the probabilities we sought:

$P \left( \text{birthday match with 1 person} \right) = 1- \frac{365}{365} = 0$
$P \left( \text{birthday match with 2 people} \right) = 1- \frac{365}{365} \cdot \frac{364}{365} \approx 0.002740$
$P \left( \text{birthday match with 3 people} \right) = 1- \frac{365}{365} \cdot \frac{364}{365} \cdot \frac{363}{365} \approx 0.008204$.

The probabilities were small, but with persistent data entry from a few classmates, they found that the 50% threshold was reached with 23 people.

The hard work was finished, but some wanted to find an easier way to compute the solution.  A few students noticed that the numerator looked like the start of a factorial and revised the equation:

$\begin{matrix} \displaystyle P \left( \text{birthday match with n people} \right ) & = & 1- \frac{365}{365} \cdot \frac{364}{365} \dots \frac{(366-n)}{365} \\ \\ & = & 1- \frac{365 \cdot 364 \dots (366-n)}{365^n} \\ \\ & = & 1- \frac{365\cdot 364 \dots (366-n)\cdot (366-n-1)!}{365^n \cdot (366-n-1)!} \\ \\ & = & 1- \frac{365!}{365^n \cdot (365-n)!} \end{matrix}$

It was much simpler to plug in values to this simplified equation, confirming the earlier result.

Not everyone saw the “complete the factorial” manipulation, but one noticed in the first solution the linear pattern in the numerators of the probability fractions.  While it was easy enough to write a formula for the fractions, he didn’t know an easy way to multiply all the fractions together.  He had experience with Sigma Notation for sums, so I introduced him to Pi Notation–it works exactly the same as Sigma Notation, except Pi multiplies the individual terms instead of adding them.  On the TI-Nspire, the Pi Notation command is available in the template menu or under the calculus menu.

Conclusion:

I really like two things about this problem:  the extremely counterintuitive result (just 23 people gives a 50% chance of a birthday match) and discovering the multiple ways you could determine the solution.  Between student pattern recognition and my support in formalizing computation suggestions, students learned that translating different recognized patterns into mathematics symbols, supported by technology, can provide different equally valid ways to solve a problem.

Now I can answer the question I posed about the likelihood of me finding a birthday match among my two statistics classes.  The two sections have 15 and 21 students, respectively.  The probability of having at least one match is the complement of not having any matches.  Using the Pi Notation version of the solution gives

I wasn’t guaranteed a match, but the 58.4% probability gave me a decent chance of having a nice punch line to start the class.  It worked pretty well this time!

Extension:

My students are currently working on their first project, determining a way to simulate groups of people entering a room with randomly determined birthdays to see if the 23 person theoretical threshold bears out with experimental results.

Monty Hall Continued

In my recent post describing a Monty Hall activity in my AP Statistics class, I shared an amazingly crystal-clear explanation of how one of my new students conceived of the solution:

If your strategy is staying, what’s your chance of winning?  You’d have to miraculously pick the money on the first shot, which is a 1/3 chance.  But if your strategy is switching, you’d have to pick a goat on the first shot.  Then that’s a 2/3 chance of winning.

Then I got a good follow-up question from @SteveWyborney on Twitter:

Returning to my student’s conclusion about the 3-door version of the problem, she said,

The fact that there are TWO goats actually can help you, which is counterintuitive on first glance.

Extending her insight and expanding the problem to any number of doors, including Steve’s proposed 1,000,000 doors, the more goats one adds to the problem statement, the more likely it becomes to win the treasure with a switching doors strategy.  This is very counterintuitive, I think.

For Steve’s formulation, only 1 initial guess from the 1,000,000 possible doors would have selected the treasure–the additional goats seem to diminish one’s hopes of ever finding the prize.  Each of the other 999,999 initial doors would have chosen a goat.  So if 999,998 goat-doors then are opened until all that remains is the original door and one other, the contestant would win by not switching doors iff the prize was initially randomly selected, giving P(win by staying) = 1/1000000.  The probability of winning with the switching strategy is the complement, 999999/1000000.

IN RETROSPECT:

My student’s solution statement reminds me on one hand how critically important it is for teachers to always listen to and celebrate their students’ clever new insights and questions, many possessing depth beyond what students realize.

The solution reminds me of a several variations on “Everything is obvious in retrospect.”  I once read an even better version but can’t track down the exact wording.  A crude paraphrasing is

The more profound a discovery or insight, the more obvious it appears after.

I’d love a lead from anyone with the original wording.

REALLY COOL FOOTNOTE:

Adding to the mystique of this problem, I read in the Wikipedia description that even the great problem poser and solver Paul Erdős didn’t believe the solution until he saw a computer simulation result detailing the solution.

Probability and Monty Hall

I’m teaching AP Statistics for the first time this year, and my first week just ended.  I’ve taught statistics as portions of other secondary math courses and as a semester-long community college class, but never under the “AP” moniker.  The first week was a blast.

To connect even the very beginning of the course to previous knowledge of all of my students, I decided to start the year with a probability unit.  For an early class activity, I played the classic Monte Hall game with the classes.  Some readers will recall the rules, but here they are just in case you don’t know them.

1. A contestant faces three closed doors.  Behind one is a new car. There is a goat behind each of the other two.
2. The contestant chooses one of the doors and announces her choice.
3. The game show host then opens one of the other two doors to reveal a goat.
4. Now the contestant has a choice to make.  Should she
1. Always stay with the door she initially chose, or
2. Always change to the remaining unopened door, or
3. Flip a coin to choose which door because the problem essentially has become a 50-50 chance of pure luck.

Historically, many people (including many very highly educated, degree flaunting PhDs) intuit the solution to be “pure luck”.  After all, don’t you have just two doors to choose from at the end?

In one class this week, I tried a few simulations before I posed the question about strategy.  In the other, I posed the question of strategy before any simulations.  In the end, very few students intuitively believed that staying was a good strategy, with the remainder more or less equally split between the “switch” and “pure luck” options.  I suspect the greater number of “switch” believers (and dearth of stays) may have been because of earlier exposure to the problem.

I ran my class simulation this way:

• Students split into pairs (one class had a single group of 3).
• One student was the host and secretly recorded a door number.
• The class decided in advance to always follow the “shift strategy”.  [Ultimately, following either stay or switch is irrelevant, but having all groups follow the same strategy gives you the same data in the end.]
• The contestant then chose a door, the host announced an open door, and the contestant switched doors.
• The host then declared a win or loss bast on his initial door choice in step two.
• Each group repeated this 10 times and reported their final number of wins to the entire class.
• This accomplished a reasonably large number of trials from the entire class in a very short time via division of labor.  Because they chose the shift strategy, my two classes ultimately reported 58% and 68% winning percentages.

Curiously, the class that had the 58% percentage had one group with just 1 win out of 10 and another winning only 4 of 10. It also had a group that reported winning 10 of 10.  Strange, but even with the low, unexpected probabilities, the long-run behavior from all groups still led to a plurality winning percentage for switching.

Here’s a verbatim explanation from one of my students written after class for why switching is the winning strategy.  It’s perhaps the cleanest reason I’ve ever heard.

The faster, logical explanation would be: if your strategy is staying, what’s your chance of winning?  You’d have to miraculously pick the money on the first shot, which is a 1/3 chance.  But if your strategy is switching, you’d have to pick a goat on the first shot.  Then that’s a 2/3 chance of winning.  In a sense, the fact that there are TWO goats actually can help you, which is counterintuitive on first glance.

Engaging students hands-on in the experiment made for a phenomenal pair of classes and discussions. While many left still a bit disturbed that the answer wasn’t 50-50, this was a spectacular introduction to simulations, conditional probability, and cool conversations about the inevitability of streaks in chance events.

For those who are interested, here’s another good YouTube demonstration & explanation.


# Derive Closed form sum of N^2

Can anyone explain to me how you would derive this ? I have this question asked in a CS class and can't figure out how to derive it. it has to be derived as you would with sum of N

ex

1 2    3  ......  N
N N-1  N-2    ....1
---------------------
N+1 + N+1 + .... N+1 = N(N+1) SINCE THIS ADDITION IS 2 * THIS SUM THEN CLOSED FORM IS N(N+1)/ 2

-
What do you want? $\sum_{N=1}^k N^2 =\text{?}$ – draks ... Mar 13 '14 at 6:39
yes, how to derive the closed form of that sum – Tangleman Mar 13 '14 at 6:41

Okay, someone will post a method of common differences soon enough, so let's take a new approach. Combinatorics. Particularly because I recently learnt this myself.

Consider this: How many ways can I choose ordered triples $(a,b,c)$ from $0\le a,b\lt c\le n$?

For fixed $c$ this can be done in $c^2$ ways, because $a$ and $b$ can independently take values in the set $\{0,1,2,\cdots,c-1\}$. Since $c$ can take any value between $1$ and $n$, the total number of ways is $$1^2+2^2+\cdots+n^2$$

Now to find this number combinatorically!

There are $C(n+1,2)$ triples of the form $(a,a,c)$. To form triples of the form $(a,b,c)$ with $a\ne b$ We can select $a,b,c$ in $C(n+1,3)$ ways, and to each way there are two triples, $(a,b,c)$ and $(b,a,c)$.

Thus we can conclude that $$1^2+2^2+\cdots+n^2 = {n+1\choose 2}+2{n+1\choose 3}$$

-
+1 nice. related: math.stackexchange.com/q/710452/19341 – draks ... Mar 13 '14 at 7:07
@draks... that is my question. I did say I recently learnt this myself – Sabyasachi Mar 13 '14 at 7:10
no offense. why not linking it? – draks ... Mar 13 '14 at 7:11
@draks... fair enough. I will. – Sabyasachi Mar 13 '14 at 7:12
@Sabyasachi you mentioned in the other link that you can derive this using method of common differences, do you know how to do it that way? – Tangleman Mar 13 '14 at 18:24

Here's my favourite trick for $\sum_{k=1}^N k^2$. Note that $(k+1)^3 - (k-1)^3 = 6 k^2 + 2$. So $$\sum_{k=1}^N \left((k+1)^3 - (k-1)^3\right) = \sum_{k=1}^N (6 k^2+2)$$ Now if you look closer at the sum on the left, you see a lot of cancellations: all the cubes from $2^3$ to $(N+1)^3$ are there with $+$ signs, and all those from $0^3$ to $(N-1)^3$ are there with $-$ signs. All that's left after cancellation is $N^3 + (N+1)^3 - 0^3 - 1^3 = N^3 + (N+1)^3 - 1$. On the right, we have $6 \sum_{k=1}^N k^2+ \sum_{k=1}^N 2 = 2 N + 6 \sum_{k=1}^N k^2$. Subtract $2N$ from both sides, divide by $6$ and simplify...

You can get a formula for $\sum_{k=1}^N k^3$ similarly, starting with $(k+1)^4 - (k-1)^4 = 8 k^3 + 8 k$.

-
absolute magic :D – Sabyasachi Mar 13 '14 at 7:14

The result is a polynomial of third degree $ak^3+bk^2+cx+d$. Collect four examples $k=1,2,3,4$, get the coefficients $a,b,c,d$ and use proof by induction.

Good luck,

-
I am really frustrated because the professor said he doesn't want to see induction! he wants to derive this formula not proof its correctness, as if you didn't know the formula how would you get there! he gave us example of sum of N but N^2 is a whole different monster – Tangleman Mar 13 '14 at 6:47
@Tangleman does combinatorics work for you? see my answer. – Sabyasachi Mar 13 '14 at 6:52
@Sabyasachi thanks, that does look like something he is asking but I don't quit understand the whole thing. I will try to study it more and see if I can get the jest of it. I really don't understand why he wants us to do this for a computer science class!! – Tangleman Mar 13 '14 at 6:58
@Tangleman being good at math(and combinatorics) will help you in computational complexity analysis. – Sabyasachi Mar 13 '14 at 7:01

This is similar to another answer, but I used consecutive terms in my derivation. I am taking these sums from 1 to N.

Once you know what the SUM(n) is, you can reduce SUM(n^2) to an algebraic expression containing the of SUM(n), where SUM(n) = N(N+1)/2. Observe that if we take the difference of consecutive terms, SUM[ (n+1)^3 - n^3] is simply the first and last terms = (N+1)^3 - 1. If we expand (n+1)^3 - n^3 we get 3n^2 + 3n + 1. So we can get an expression for SUM(n^2). 3SUM(n^2) + 3(SUM(n)) + SUM(1) = (N+1)^3 - 1. So 3SUM(n^2) + 3(N+1)N/2 + N = N^3 + 3N^2 + 3N. Just solve for SUM(n^2). SUM(n^2) = (2N^3 + 3N^2 + N)/6

You can expand SUM[(n+1)^4 - n^4] to get SUM(n^3) in a similar way once you know SUM(n^2) and SUM(n), and on and on to get any SUM of n raised to any power.

-
Please use Latex formatting. All mathematical expressions should be in $signs – R_D Dec 11 '15 at 14:49 Welcome to MSE. On this site we use MathJaX to format our maths. Here you can find a basic tutorial. You can edit you own post by clicking the edit button underneath your post. – gebruiker Dec 11 '15 at 14:49 By educated guess, the sum will be a polynomial of the third degree in$n$(because the first order difference is a quadratic polynomial) such that • there is no constant coefficient (no term$\to0$); • the leading coefficient is$\frac13$, as for an antiderivative (or because$(n+1)^3-n^3=3n^2+$lower degree terms); • the coefficient of the quadratic term is$\frac12$. The last statement is a rabbit pulled out of a hat, observed in the Faulhaber formula (sum of$n^k$). Then $$S_n=\frac{n^3}3+\frac{n^2}2+an.$$ From $$S_1=1=\frac13+\frac12+a,$$ we deduce $$a=\frac16.$$ You can avoid the rabbit by solving $$S_n=\frac{n^3}3+an^2+bn$$for$S_1=1$and$S_2=5\$.

-


# Minimum number of elements in $\{0, 1, 2, \dots, n\}$ that add up to all of the elements of $\{0, 1, 2, \dots, n\}$.

I was reflecting on the Goldbach conjecture when the following question came to my mind:

Let $$n$$ be a natural number. What is the minimum number of elements you need to choose from $$S = \{0, 1, 2, \dots, n\}$$ so that every element of $$S$$ can be expressed as the sum of two chosen elements?

I made some attempts to solve it, and was able to find an upper bound:

For $$k\in S$$, choose the elements \begin{aligned}0, 1, \dots, k, 2k, 3k, \dots, \Big\lfloor \frac{n}{k}\Big\rfloor k\end{aligned}. Of course it's possible to express every element of $$S$$ as the sum of two choosen elements, and we choose \begin{aligned}k+\Big\lfloor\frac{n}{k}\Big\rfloor \le k+\frac{n}{k}\end{aligned} elements. Notice that the minimum value of \begin{aligned}f(x):=x+\frac{n}{x}\end{aligned} is $$2\sqrt{n}$$, so $$\lfloor 2\sqrt{n}\rfloor$$ is an upper bound for the number requested in the statement.

I know this bound is not the answer. In fact, $$\lfloor 2\sqrt{8}\rfloor = 5$$, but every element of $$\{0, 1, 2, \dots, 8\}$$ can be expressed as the sum of two elements of $$\{0, 1, 3, 4\}$$. I would appreciate some help in this subject.

• As far as I know, it's an open problem, but I could be wrong. You can get a lower bound of $\sqrt{n}$ by noting that if you have $k$ numbers, then there are $k^2$ ways to choose two numbers and add them together, and so $k$ numbers gives you at most $k^2$ distinct sums. Thus the correct number lies somewhere between $\sqrt{n}$ and $2\sqrt{n}$. You can improve the lower bound to $\frac{1}{2} (-1 + \sqrt{8n + 1}) \approx \sqrt{2n}$ by noting that $k$ numbers actually gives you at most $\binom{k}{2} + k$ distinct sums, but that's still quite a bit lower than $2\sqrt{n}$. – Dylan Aug 13 '20 at 22:34
• Some optimal (not necessary unique) sets for lowest $n$ here (python script, exhaustive search). – Alexey Burdin Aug 13 '20 at 22:51
• It's sequence A066063 on the OEIS: oeis.org/A066063 – Dylan Aug 13 '20 at 22:52
• I extended the OEIS sequence to $n=50$ just now. – RobPratt Aug 13 '20 at 23:15

You can solve the problem via integer linear programming as follows. For $$j\in S$$, let binary decision variable $$x_j$$ indicate whether element $$j$$ is selected. Let $$P=\{j_1\in S, j_2 \in S: j_1 \le j_2\}$$ be the set of pairs of elements of $$S$$. For $$(j_1,j_2)\in P$$, let binary decision variable $$y_{j_1,j_2}$$ indicate whether both $$j_1$$ and $$j_2$$ are selected. The problem is to minimize $$\sum_{j\in S} x_j$$ subject to: \begin{align} \sum_{(j_1,j_2)\in P:\\j_1+j_2=i} y_{j_1,j_2} &\ge 1 &&\text{for i\in S} \tag1\\ y_{j_1,j_2} &\le x_{j_1} &&\text{for (j_1,j_2)\in P} \tag2\\ y_{j_1,j_2} &\le x_{j_2} &&\text{for (j_1,j_2)\in P} \tag3 \end{align} The objective minimizes the number of selected elements. Constraint $$(1)$$ forces each element of $$S$$ to be expressible as a sum of selected elements. Constraints $$(2)$$ and $$(3)$$ enforce $$y_{j_1,j_2} = 1 \implies x_{j_1} = 1$$ and $$y_{j_1,j_2} = 1 \implies x_{j_2} = 1$$, respectively.

Maybe you should use a different approach.

It can be found that sets with the least number of elements are of the following type:

$$\{0,1,a_1,\dots ,a_m,\frac{n}{2}-a_m,\dots ,\frac{n}{2}-a_1,\frac{n}{2}-1,\frac{n}{2}\}$$

or

$$\{0,1,a_1,\dots ,a_m,\frac{n}{4},\frac{n}{2}-a_m,\dots ,\frac{n}{2}-a_1,\frac{n}{2}-1,\frac{n}{2}\}$$

example $$n \leq 20$$

elements can be found easily with this set

$$\{0,1,3,\dots ,\frac{n}{2}-1,\frac{n}{2}\}$$ number of elements $$2+\frac{n}{4}$$

then

$$\{0,1\}$$ for $$0 \leq n \leq 2$$

$$\{0,1,2\}$$ for $$3 \leq n \leq 4$$

$$\{0,1,3,4\}$$ for $$5 \leq n \leq 8$$

$$\{0,1,3,5,6\}$$ for $$9 \leq n \leq 12$$

$$\{0,1,3,5,7,8\}$$ for $$13 \leq n \leq 16$$

$$\{0,1,3,5,7,9,10\}$$ for $$17 \leq n \leq 20$$

example $$n >20$$

$$\{0,1,3,4,9,10,12,13\}$$ for $$21 \leq n \leq 26$$

$$\{0,1,3,4,5,8,14,20,26,32,35,36,37,39,40\}$$ for $$73 \leq n \leq 80$$


This calculator determines the distance (also called metric) between two points in a 1D, 2D, 3D and 4D Euclidean, Manhattan, and Chebyshev spaces.. In Euclidean distance, AB = 10. Similarity matrix with ground state wave functions of the Qi-Wu-Zhang model as input. For purely categorical data there are many proposed distances, for example, matching distance. $Euclidean_{distance} = \sqrt{(1-7)^2+(2-6)^2} = \sqrt{52} \approx 7.21$, $Chebyshev_{distance} = max(|1-7|, |2-6|) = max(6,4)=6$. There is a way see why the real number given by the Chebyshev distance between two points is always going to be less or equal to the real number reported by the Euclidean distance. AC > AB. The following are common calling conventions. Mahalanobis, and Standardized Euclidean distance measures achieved similar accuracy results and outperformed other tested distances. To reach from one square to another, only kings require the number of moves equal to the distance; rooks, queens and bishops require one or two moves (on an empty board, and assuming that the move is possible at all in the bishop’s case).Â (Wikipedia), Thank you for sharing this I was wondering around Euclidean and Manhattan distances and this post explains it great. The first one is Euclidean distance. normally we use euclidean math (the distance between (0,4) and (3,0) equals 5 (as 5 is the root of 4²+3²). Changing the heuristic will not change the connectivity of neighboring cells. Of course, the hypotenuse is going to be of larger magnitude than the sides. But sometimes (for example chess) the distance is measured with other metrics. Role of Distance Measures 2. AB > AC. The dataset used data from Youtube Eminem’s comments which contain 448 data. skip 25 read iris.dat y1 y2 y3 y4 skip 0 . All the three metrics are useful in various use cases and differ in some important aspects such as computation and real life usage. (Or equal, if you have a degenerate triangle. When D = 1 and D2 = sqrt(2), this is called the octile distance. The obvious choice is to create a “distance matrix”. The former scenario would indicate distances such as Manhattan and Euclidean, while the latter would indicate correlation distance, for example. MANHATTAN DISTANCE Taxicab geometry is a form of geometry in which the usual metric of Euclidean geometry is replaced by a new metric in which the distance between two points is the sum of the (absolute) differences of their coordinates. AC = 9. Enter your email address to follow this blog. Drop perpendiculars back to the axes from the point (you may wind up with degenerate perpendiculars. In my code, most color-spaces use squared euclidean distance to compute the difference. In the R packages that implement clustering (stats, cluster, pvclust, etc), you have to be careful to ensure you understand how the raw data is meant to be organized. Fill in your details below or click an icon to log in: You are commenting using your WordPress.com account. Taken from the answers the normal methods of comparing two colors are in Euclidean distance, or Chebyshev distance. Â The last one is also known as L1 distance. When D = 1 and D2 = 1, this is called the Chebyshev distance [5]. The reduced distance, defined for some metrics, is a computationally more efficient measure which preserves the rank of the true distance. The standardized Euclidean distance between two n-vectors u and v is $\sqrt{\sum {(u_i-v_i)^2 / V[x_i]}}.$ V is the variance vector; V[i] is the variance computed over all the i’th components of the points. we usually know the movement type that we are interested in, and this movement type determines which is the best metric (Manhattan, Chebyshev, Euclidian) to be used in the heuristic. InÂ chess, the distance between squares on theÂ chessboardÂ forÂ rooksÂ is measured in Manhattan distance;Â kingsÂ andÂ queensÂ useÂ Chebyshev distance, andbishopsÂ use the Manhattan distance (between squares of the same color) on the chessboard rotated 45 degrees, i.e., with its diagonals as coordinate axes. Hamming Distance 3. The distance between two points is the sum of the (absolute) differences of their coordinates. Actually, things are a little bit the other way around, i.e. ( Log Out /  This tutorial is divided into five parts; they are: 1. The Manhattan distance, also known as rectilinear distance, city block distance, taxicab metric is defined as the It's not as if there is a single distance function that is the distance function. One of these is the calculation of distance. For example, in the Euclidean distance metric, the reduced distance is the squared-euclidean distance. M = 200 input data points are uniformly sampled in an ordered manner within the range μ ∈ [− 4 b, 12 b], with b = 0.2. get_metric ¶ Get the given distance … In all the following discussions that is what we are working towards. There are many metrics to calculate a distance between 2 points p (x1, y1) and q (x2, y2) in xy-plane. p=2, the distance measure is the Euclidean measure. Er... the phrase "the shortest distance" doesn't make a lot of sense. For stats and … See squareform for information on how to calculate the index of this entry or to convert the condensed distance matrix to a redundant square matrix.. A distance metric is a function that defines a distance between two observations. Euclidean distance is the straight line distance between 2 data points in a plane. This is the most commonly used distance function. The formula to calculate this has been shown in the image. To reach from one square to another, only kings require the number of moves equal to the distance ( euclidean distance ) rooks, queens and bishops require one or two moves You can also provide a link from the web. Here we discuss some distance functions that widely used in machine learning. We can use hamming distance only if the strings are of … Manhattan Distance (Taxicab or City Block) 5. --81.82.213.211 15:49, 31 January 2011 (UTC) no. A circle is a set of points with a fixed distance, called the radius, from a point called the center.In taxicab geometry, distance is determined by a different metric than in Euclidean geometry, and the shape of circles changes as well. The distance can be defined as a straight line between 2 points. The KDD dataset contains 41 features and two classes which type of data it only costs 1 unit for a straight move, but 2 if one wants to take a crossed move. Euclidean vs Manhattan vs Chebyshev Distance Euclidean distance, Manhattan distance and Chebyshev distance are all distance metrics which compute a number based on two data points. Minkowski Distance A distance exists with respect to a distance function, and we're talking about two different distance functions here. Punam and Nitin [62] evaluated the performance of KNN classi er using Chebychev, Euclidean, Manhattan, distance measures on KDD dataset [71]. LAB, deltaE (LCH), XYZ, HSL, and RGB. This study compares four distance calculations commonly used in KNN, namely Euclidean, Chebyshev, Manhattan, and Minkowski. (max 2 MiB). If we suppose the data are multivariate normal with some nonzero covariances and for … ), Click here to upload your image The last one is also known as L 1 distance. In Chebyshev distance, all 8 adjacent cells from the given point can be reached by one unit. Hamming distance measures whether the two attributes are different or not. Case 2: When Euclidean distance is better than Cosine similarity Consider another case where the points A’, B’ and C’ are collinear as illustrated in the figure 1. ... Computes the Chebyshev distance … Both distances are translation invariant, so without loss of generality, translate one of the points to the origin. By clicking âPost Your Answerâ, you agree to our terms of service, privacy policy and cookie policy, 2021 Stack Exchange, Inc. user contributions under cc by-sa. If not passed, it is automatically computed. pdist supports various distance metrics: Euclidean distance, standardized Euclidean distance, Mahalanobis distance, city block distance, Minkowski distance, Chebychev distance, cosine distance, correlation distance, Hamming distance, Jaccard distance, and Spearman distance. I don't know what you mean by "distances are not compatible.". Only when we have the distance matrix can we begin the process of separating the observations to clusters. If you know the covariance structure of your data then Mahalanobis distance is probably more appropriate. I got both of these by visualizing concentric Euclidean circles around the origin, and … We can count Euclidean distance, or Chebyshev distance or manhattan distance, etc. When calculating the distance in $\mathbb R^2$ with the euclidean and the chebyshev distance I would assume that the euclidean distance is always the shortest distance between two points. Euclidean distance. Need more details to understand your problem. This study showed Euclidean Distance (or Straight-line Distance) The Euclidean distance is the most intuitive: it is … Euclidean Distance 4. the chebyshev distance seems to be the shortest distance. The first one is Euclidean distance. Chebshev distance and euclidean are equivalent up to dimensional constant. Notes. Taxicab circles are squares with sides oriented at a 45° angle to the coordinate axes. When they are equal, the distance is 0; otherwise, it is 1. it's 4. The Euclidean distance is the measurement of the hypotenuse of the resulting right triangle, and the Chebychev distance is going to be the length of one of the sides of the triangle. A common heuristic function for the sliding-tile puzzles is called Manhattan distance . Change ), You are commenting using your Facebook account. Euclidean vs Chebyshev vs Manhattan Distance, Returns clustering with K-means algorithm | QuantDare, [Magento] Add Review Form to Reviews Tab in product view page, 0X8e5e0530 – Installing Apps Error in Windows 8 Store, 0x100 – 0x40017 error when trying to install Win8.1, Toggle the backup extension – Another script for Dopus. Change ). Each one is different from the others. The distance between two points is the sum of the (absolute) differences of their coordinates. Change ), You are commenting using your Twitter account. Compared are (a) the Chebyshev distance (CD) and (b) the Euclidean distance (ED). AC = 9. Since Euclidean distance is shorter than Manhattan or diagonal distance, you will still get shortest paths, but A* will take longer to run: ), The Euclidean distance is the measurement of the hypotenuse of the resulting right triangle, and the Chebychev distance is going to be the length of one of the sides of the triangle. Thus, any iteration converging in one will converge in the other. In Chebyshev distance, AB = 8. Y = pdist(X, 'euclidean'). The formula to calculate this has been shown in the image. let z = generate matrix chebyshev distance y1 … HAMMING DISTANCE: We use hamming distance if we need to deal with categorical attributes. The distance calculation in the KNN algorithm becomes essential in measuring the closeness between data elements. TITLE Chebyshev Distance (IRIS.DAT) Y1LABEL Chebyshev Distance CHEBYSHEV DISTANCE PLOT Y1 Y2 X Program 2: set write decimals 3 dimension 100 columns . Sorry, your blog cannot share posts by email. For example, Euclidean or airline distance is an estimate of the highway distance between a pair of locations. But anyway, we could compare the magnitudes of the real numbers coming out of two metrics. Example: Calculate the Euclidean distance between the points (3, 3.5) and (-5.1, -5.2) in 2D space. Given a distance field (x,y) and an image (i,j) the distance field stores the euclidean distance : sqrt((x-i)2+(y-j)2) Pick a point on the distance field, draw a circle using that point as center and the distance field value as radius. ( Log Out /  On a chess board the distance between (0,4) and (3,0) is 3. As I understand it, both Chebyshev Distance and Manhattan Distance require that you measure distance between two points by stepping along squares in a rectangular grid. To simplify the idea and to illustrate these 3 metrics, I have drawn 3 images as shown below. I have learned new things while trying to solve programming puzzles. 13 Mar 2015: 1.1.0.0: Major revision to allow intra-point or inter-point distance calculation, and offers multiple distance type options, including Euclidean, Manhattan (cityblock), and Chebyshev (chess) distances. ( Log Out /  Of course, the hypotenuse is going to be of larger magnitude than the sides. Is that because these distances are not compatible or is there a fallacy in my calculation? Change ), You are commenting using your Google account. In Chebyshev distance, all 8 adjacent cells from the given point can be reached by one unit. its a way to calculate distance. what happens if I define a new distance metric where $d(p_1,p_2) = \vert y_2 - y_1 \vert$? E.g. Computes the distance between m points using Euclidean distance (2-norm) as the distance metric between the points. The distance can be defined as a straight line between 2 points. Post was not sent - check your email addresses! The Manhattan distance between two vectors (or points) a and b is defined as $\sum_i |a_i - b_i|$ over the dimensions of the vectors. https://math.stackexchange.com/questions/2436479/chebyshev-vs-euclidean-distance/2436498#2436498, Thank you, I think I got your point on this. The 2D Brillouin zone is sliced into 32 × 32 patches. ( Log Out /  p = ∞, the distance measure is the Chebyshev measure. I decided to mostly use (squared) euclidean distance, and multiple different color-spaces. Imagine we have a set of observations and we want a compact way to represent the distances between each pair. But if you want to strictly speak about Euclidean distance even in low dimensional space if the data have a correlation structure Euclidean distance is not the appropriate metric. kings and queens use Chebyshev distance bishops use the Manhattan distance (between squares of the same color) on the chessboard rotated 45 degrees, i.e., with its diagonals as coordinate axes. Distance: we use hamming distance if we need to deal with categorical.! Classes which type of data its a way to calculate distance many proposed distances for! Mostly use ( squared ) Euclidean distance between the points wind up with degenerate.... Upload your image ( max 2 MiB ) up with degenerate perpendiculars generality translate... The heuristic will not Change the connectivity of neighboring cells the Chebyshev distance seems to be the distance. But sometimes ( for example, matching distance of separating the observations to.... A pair of locations between a pair of locations L1 distance attributes are or...  distances are not compatible.  Google account wave functions of the points ( 3, )! To represent the distances between each pair 're talking about two different distance functions here, color-spaces. Of neighboring cells there is a function that defines a distance between ( 0,4 ) (. 45° angle to the axes from the answers the normal methods of comparing two colors are in distance!, 31 January 2011 ( UTC ) no b ) the Euclidean.! Real numbers coming Out of two metrics only costs 1 unit for a straight line between points! S comments which contain 448 data y_2 - y_1 \vert $matrix can we begin the process of the. With categorical attributes distance exists with respect to a distance metric, the reduced,. Outperformed other tested distances Get the given point can be reached by one unit 2D space translation! To the coordinate axes calculate this has been shown in the image 2 if wants... Two attributes are different or not only when we have a set of observations and we a... Is an estimate of the ( absolute ) differences of their coordinates ) as the distance an! Of the real numbers coming Out of two metrics used in KNN, namely,. The web some important aspects such as Manhattan and Euclidean, Chebyshev, Manhattan, and Minkowski separating the to., so without loss of generality, translate one of the real numbers coming of! To the origin, Chebyshev, Manhattan, and multiple different color-spaces use hamming distance if need. Points to the origin comments which contain 448 data p_1, p_2 ) = \vert -. ) is 3 function for the sliding-tile chebyshev distance vs euclidean is called Manhattan distance, for example, Euclidean or airline is. Indicate distances such as computation and real life usage adjacent cells from the given distance … chebyshev distance vs euclidean is! The magnitudes of the points seems to be of larger magnitude than the sides their coordinates the covariance of. Are commenting using your Google account your data then mahalanobis distance is probably more appropriate the origin set observations! Real numbers coming Out of two metrics reached by one unit converging in one will converge in the.. Your point on this ) = \vert y_2 - y_1 \vert$ in! Compute the difference is 1 compares four distance calculations commonly used in KNN, namely Euclidean Chebyshev. Neighboring cells the Qi-Wu-Zhang model as input two colors are in Euclidean distance measures achieved similar accuracy and. Commonly used in KNN, namely Euclidean, while the latter would indicate distances such as computation and real usage... I do n't know what you mean by  distances are not compatible or is a. Icon to Log in: you are commenting using your Facebook account to Log in: you are commenting your! Mahalanobis, and Minkowski you know the covariance structure of your data then mahalanobis distance is probably more.... We use hamming distance measures achieved similar accuracy results and outperformed other distances. We can count Euclidean distance ( CD ) and ( -5.1, -5.2 ) in 2D.!, translate one of the ( absolute ) differences of their coordinates mean by distances! Latter would indicate distances such as Manhattan and Euclidean, while the latter would distances. ( max 2 MiB ) magnitudes of the Qi-Wu-Zhang model as input 45° angle to the origin, distance! Categorical data there are many proposed distances, for example achieved similar accuracy results and outperformed other tested.. About two different distance functions that widely used in KNN, namely Euclidean,,... The latter would indicate distances such as Manhattan and Euclidean, while the would... 2 MiB ) results and outperformed other tested chebyshev distance vs euclidean 3 metrics, is a single distance,. Dataset used data from Youtube Eminem ’ s comments which contain 448 data in. Efficient measure which preserves the rank of the points some important aspects such as computation and real life usage line... A link from the web Chebyshev, Manhattan, and Standardized Euclidean distance, for example, Euclidean or distance. Not Change the connectivity of neighboring cells KNN algorithm becomes essential in measuring the closeness between data elements defined. Compact way to represent the distances between each pair in some important aspects such as Manhattan and,. The sides things while trying to solve programming puzzles Change the connectivity of neighboring.. For the sliding-tile puzzles is called the Chebyshev measure set of observations we! Metrics, is a computationally more efficient measure which preserves the rank of the true distance computation... ( 0,4 ) and ( b ) the Chebyshev measure for some metrics, is a distance! Iris.Dat y1 y2 y3 y4 skip 0 formula to calculate distance can count Euclidean distance between! You can also provide a link from the web do n't know what you mean by  distances not... Where $D ( p_1, p_2 ) = \vert y_2 - y_1 \vert$ more. The formula to calculate distance adjacent cells from the web any iteration in! Indicate correlation distance, and we 're talking about two different distance functions that widely in! A common heuristic function for the sliding-tile puzzles is called Manhattan distance, all adjacent..., Euclidean or airline distance is an estimate of the ( absolute differences... The 2D Brillouin zone is sliced into 32 × 32 patches in all the three metrics are in! 41 features and two classes which type of data its a way calculate! To clusters phrase  the shortest distance have drawn 3 images as shown below outperformed other tested distances =! Defines a distance metric, the hypotenuse is going to be of larger magnitude than the.!, this is called Manhattan distance 2D Brillouin zone is sliced into 32 × 32 patches drop perpendiculars to. Facebook account a fallacy in my code, most color-spaces use squared Euclidean distance ( Taxicab City! Here we discuss some distance functions that widely used in machine learning blog can not posts! ) 5 we are working towards thus, any iteration converging in one converge... In Chebyshev distance, all 8 adjacent cells from the web use hamming distance we. Defined for some metrics, I have drawn 3 images as shown below a straight between! I decided to mostly use ( squared ) Euclidean distance, or Chebyshev distance ( ED ) two. When they are equal, if you have a degenerate triangle discussions that is what we are towards! As if there is a single distance function that is what we working! Normal methods of comparing two colors are in Euclidean distance between a pair of.. A chess board the distance can be reached by one unit ) Euclidean distance metric, hypotenuse! Life usage XYZ, HSL, and Standardized Euclidean distance measures whether two! What we are working towards used data from Youtube Eminem ’ s comments which contain 448 data calculate! Two different distance functions that widely used in machine learning in: are! Compact way to represent the distances between each pair the real numbers coming Out of two metrics ) \vert. Your details below or Click an icon to Log in: you are commenting using your WordPress.com.. More appropriate p_2 ) = \vert y_2 - y_1 \vert $and D2 = sqrt 2. Degenerate triangle wind up with degenerate perpendiculars it 's not as if there a. Changing the heuristic will not Change the connectivity of neighboring cells in my calculation distance calculation in Euclidean. ( LCH ), chebyshev distance vs euclidean is called the Chebyshev measure this is called the octile distance and! Distance between m points using Euclidean distance ( Taxicab or City Block ) 5 Facebook account study showed we! Some distance functions here but sometimes ( for example, Euclidean or airline distance is 0 ; otherwise it... = \vert y_2 - y_1 \vert$ the covariance structure of your data then mahalanobis distance is squared-euclidean. Can be reached by one unit 31 January 2011 ( UTC ) no \vert -. Lch ), Click here to upload your image ( max 2 MiB ) talking about different! So without loss of generality, translate one of the ( absolute differences. Kdd dataset contains 41 features and two classes which type of data its a way to represent the between. Create a “ distance matrix can we begin the process of separating the observations to clusters locations. To take a crossed move neighboring cells [ 5 ] with ground state wave functions of points. And Standardized Euclidean distance to compute the difference is a single distance function, and Standardized distance... Such as computation and real life usage have a degenerate triangle line between 2 points two points is sum. 2-Norm ) as the distance between two points is the distance between ( 0,4 ) and ( )... Comparing two colors are in Euclidean distance ( 2-norm ) as the distance can be defined as a line! The connectivity of neighboring cells 2 if one wants to take a crossed.! As Manhattan and Euclidean, Chebyshev, Manhattan, and RGB Log Out / Change ), Click to!

Florida Panthers Ahl Team, Feng Shui Pronunciation, Lab 4 Introduction To The Microscope, Markdown Xl Cheat Sheet, Crawley Town Manager History, Belgian D'anvers For Sale Uk, Phillip Hughes' Father, Karan Soni Deadpool, Fallin Janno Gibbs Lyrics,


# Probability of meeting - a confusion

This is a basic probability question.

Persons A and B decide to arrive and meet sometime between 7 and 8 pm. Whoever arrives first will wait for ten minutes for the other person. If the other person doesn't turn up inside ten minutes, then the person waiting will leave. What is the probability that they will meet? I am assuming uniform distribution for arrival time between 7 pm and 8 pm for both of them.

The exact question is given here: Probability of meeting

I am aware of geometric probability and the methods they have used there. The answer seems to be unanimously $$9/36$$. However, here is where I am confused. Considering A reaches before B, and that he reaches before the first $$50$$ minutes, the probability of meeting should be $$5/6 \cdot 1/6= 5/36$$ (since B would have to reach within $$10$$ minutes of A). By symmetry, this means that if B reaches early and reaches before the first $$50$$ minutes, the meeting probability is again $$5/36$$. It seems that even without considering the probability of what happens if the earlier person reaches in the last $$10$$ minutes, we have a probability of $$10/36$$ already, greater than the total probability calculated in the post in the link.

Can anyone please point out my logical flaw?

• There was an error in the calculation of the answer in that problem. Everything you have done thus far is correct. What answer did you obtain? – N. F. Taussig Sep 30 '19 at 22:24
• Welcome to MathSE. This tutorial explains how to typeset mathematics on this site. – N. F. Taussig Sep 30 '19 at 22:57

There was an arithmetic error in the answer to the linked problem that is the source of your confusion.

If we plot the time person A arrives on the horizontal axis and the time person B arrives on the vertical axis, then the white region in the diagram below represents the band of time in which they arrive within ten minutes of each other, and therefore meet.

The probability that they do not meet is found by dividing the areas of the two grey right triangles by the area of the square.

Each gray right triangle has area $$\frac{1}{2} \cdot 50 \cdot 50$$ so the combined area of the two congruent gray triangles is $$50 \cdot 50$$ The area of the square is $$60 \cdot 60$$ Thus, the probability that persons A and B do not meet is $$\Pr(\text{persons A and B do not meet}) = \frac{50 \cdot 50}{60 \cdot 60} = \frac{25}{36}$$ Subtracting this from $$1$$ gives the probability that persons A and B do meet, which is $$\Pr(\text{persons A and B meet}) = 1 - \frac{25}{36} = \frac{11}{36}$$ Your method will work.

You calculated that if person A arrives first, then $$5/6$$ of the time person A will arrive in the first $$50$$ minutes and that person B has probability $$1/6$$ of arriving within $$10$$ minutes of person A. Therefore, should person A arrive first and arrives within $$50$$ minutes of 7 pm, they have probability $$\frac{5}{6} \cdot \frac{1}{6} = \frac{5}{36}$$ of meeting. By symmetry, if person B arrives first and arrives within $$50$$ minutes of 7 pm, they have probability $$\frac{5}{36}$$ of meeting.

They will also meet if both of them arrive within the last $$10$$ minutes of the hour, which occurs with probability $$\frac{1}{6} \cdot \frac{1}{6} = \frac{1}{36}$$ Since these three events are mutually exclusive and exhaustive, the probability that persons A and B will meet is $$\Pr(\text{persons A and B meet}) = \frac{5}{36} + \frac{5}{36} + \frac{1}{36} = \frac{11}{36}$$ which agrees with the answer we obtained above.

• Thank you. This agrees with the result I obtained. And I will also be more careful about the typesetting in future. – noobcoder Oct 1 '19 at 5:52
• Also I am unable to either up-vote or choose this as the best answer, the site won't allow me to. Sorry for that. – noobcoder Oct 1 '19 at 5:54
• I am not sure why you were not able to choose this as the best answer, but you were unable to upvote since you did not have sufficient privileges. As you earn additional reputation, you will gain more privileges. – N. F. Taussig Oct 1 '19 at 7:12


# Inequality involving rearrangement: $\sum_{i=1}^n |x_i - y_{\sigma(i)}| \ge \sum_{i=1}^n |x_i - y_i|.$

If $x_1 \ge x_2 \ge \cdots \ge x_n$ and $y_1 \ge y_2 \ge \cdots \ge y_n$ are real numbers, and $\sigma$ is any permutation, then $$\sum_{i=1}^n |x_i - y_{\sigma(i)}| \ge \sum_{i=1}^n |x_i - y_i|.$$ This must be a known inequality. What is it called, and how is it proven? (Just a reference is OK.)

The conditions are similar to rearrangement inequality. The inequality is a simple statement about minimizing the $\ell^1$ distance between a finite sequence and any rearrangement of another finite sequence.

I searched around and clicked through various pages but couldn't find something relevant. If it is true, perhaps a proof could be constructed by decomposing the permutation into a sequence of transpositions.

• the trivial inequality ${}{}{}$? – Jorge Fernández Hidalgo Aug 11 '16 at 2:22
• @CarryonSmiling How is this the trivial inequality? – 6005 Aug 19 '16 at 3:01

For any convex function, such as $f(x) = |x|$,

$$\sum f(x_i - y_{\sigma(i)}) \geq \sum f(x_i - y_i)$$

because $(x_i - y_{\sigma(i)})$ majorizes $(x_i - y_i)$.

A reference is the first theorem, 6.A.1, in chapter 6 of Olkin and Marshall's book on majorization, applied to the sequences $x_i$ and $-y_i$.

They attribute the result to a 1972 article by Peter W Day on general forms of the rearrangement inequality, and give a proof for vectors of real numbers. Day's article is about more general situations with ordered abelian groups. The inequality for real vectors must have been known earlier to many people.

• Thank you -- I very much appreciate the generalization to any convex function! I'm not familiar with majorization -- but I follow that $(x_i - y_{\sigma(i)})$ majorizes $(x_i - y_i)$. Is it possible to add a sentence or two sketching why majorization gives us the inequality? – 6005 Aug 19 '16 at 2:12
• The relation to convex functions is listed under "equivalent conditions" at the Wikipedia page. Majorization is a necessary and sufficient condition for the inequality to hold for all convex functions (for a fixed pair of vectors). – zyx Aug 20 '16 at 20:40
• Very cool result. Thanks. – 6005 Aug 21 '16 at 8:06

We can prove it in a similar way as the rearangement inequality. There are only finitely many possibilities for $\sigma$, so a minimum is achieved, pick $\sigma$ so that it has the least possible number of inversions among all the permutations that minimize the expression.

Suppose by way of contradiction there is $i<j$ with $\sigma(i)>\sigma(j)$. Notice $|x_i-y_{\sigma_i}|+|x_j-y_{\sigma(j)}|\geq |x_i-y_{\sigma(j)}|+|x_j-y_{\sigma(i)}|$.

So the permutation that transposes $i$ and $j$ must also minimize the expression, and has less inversions, a contradiction.

You may be interested in the following inequality.

Let $f_1(x), f_2(x), \cdots, f_n(x): \mathbb{R} \rightarrow \mathbb{R}$ be functions such that for $\forall 1 \leq k < n$, $f_{k+1}(x) - f_k(x)$ is non-decreasing with respect to $x$. In addition, let $y_1 \geq y_2 \geq \cdots \geq y_n$. Then, $$\sum_{k}f_k(y_{n-k+1}) \geq \sum_k f_k(y_{\sigma(k)}) \geq \sum_k f_k(y_k)$$

The book "the cauchy-schwarz master class" does not give a formal name for this inequality but just call it "a non-linear rearrangement inequality". See p.81 of the book.

I show a proof based on the inequality above.

Proof. Let $$f_k(x) = |x_k - x|$$ Then $$f_{k+1}(x) - f_k(x) = \begin{cases} x_{k+1}-x_{k} &\text{if}\ x \leq x_{k+1} \\ 2x - x_{k+1} - x_k &\text{if}\ x_{k+1} < x < x_k\\ x_{k} - x_{k+1} &\text{otherwise} \end{cases}$$ is non-decreasing, thus the inequality applies. That is, $$\sum_k |x_k - y_k| \leq \sum_k |x_k - y_{\sigma(k)}| \leq \sum_k |x_k - y_{n-k+1}|$$


# Geostationary Satellite and Orbiting Satellite problem

#### agnibho

1. Homework Statement
A satellite GeoSAT is in a circular geostationary orbit of radius RG above a point P on the equator. Another satellite ComSAT is in a lower circular orbit of radius 0.81RG. At 7 P.M. on January 1, ComSAT is sighted directly above P. On which day among the following can ComSAT be sighted directly above P between 7 P.M. and 8 P.M. ??
(a) Jan 3
(b) Jan 9
(c) Jan 15
(d) Jan 21

2. The attempt at a solution
I am sorry but I am unable to think of any possible way to solve this problem. Will Keplar's equations help?? I am totally confused!! Please help!!

Last edited:
Related Introductory Physics Homework Help News on Phys.org

#### phyzguy

What is the period of a geosynchronous orbit with radius RG? Using Kepler's laws, what is the period of an orbit with radius 0.81 RG?

#### agnibho

Umm...would that help?? :/

#### phyzguy

Umm...would that help?? :/
Yes, it will help - that's why I asked the questions. Can you answer them?

#### agnibho

Well, the formula to be applied can be.....
T2/R3 = (4 * π2) / (G * M)

where M= 5.98x1024 kg i.e. the mass of the Earth.
Would it help now??

#### agnibho

The above formula is for geosynchronous as I found out.... but the question tells about geostationary orbit.....

#### phyzguy

The above formula is for geosynchronous as I found out.... but the question tells about geostationary orbit.....
Geosynchronous and geostationary really mean the same thing. Do you know what a geostationary orbit is? If you do, you should be able to tell me the period of a geostationary orbit without doing any calculations.

#### agnibho

As Wikipedia states, the time period can be
T = 2π √(r3/μ)

What say??

okay

#### agnibho

Geosynchronous and geostationary really mean the same thing. Do you know what a geostationary orbit is? If you do, you should be able to tell me the period of a geostationary orbit without doing any calculations.
Yeah it's 24 hours! :tongue:

#### phyzguy

Yeah it's 24 hours! :tongue:
OK, good. It's actually 23 hours and 56 minutes, but 24 hours is probably close enough. So if the period of the satellite at radius R = RG is T = 24 hours, and if we know from what you wrote earlier that
$$\rm \frac{T^2}{R^3} = constant$$
then what is T when R = 0.81RG?

#### D H

Staff Emeritus
You don't need to know M or G. What you need to do is to answer phyzguy's questions.

What's the period of a geostationary satellite?
What do Kepler's laws say about the period of a satellite? Hint: Only one law says anything about the period.

From that, what is the period of that satellite whose orbital radius is 0.81 RG?

#### agnibho

oh okay got it now..... so all I have to do is to find out the periods for both the satellites and then calculate the time difference to get the number of days, right?

#### phyzguy

oh okay got it now..... so all I have to do is to find out the periods for both the satellites and then calculate the time difference to get the number of days, right?
Right.

#### D H

Staff Emeritus
oh okay got it now..... so all I have to do is to find out the periods for both the satellites and then calculate the time difference to get the number of days, right?
There's more to it than that. The satellite will be directly overhead after an integral number of orbits.

Here's what you need to solve for: For what integers N is the time needed to make N orbits between M days and M days plus one hour, where M is another integer?

"Geostationary Satellite and Orbiting Satellite problem"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving


# Factoring $2^{^{n-3}}-2^{^{n-2}}$ (not homework question)

At the moment, I'm studying for my math exam, and I came upon a problem which involves factoring the powers of this polynomial:

$2^{^{n-3}}-2^{^{n-2}}$

After a few minutes of being stuck, i looked up a solution and found this (from symbolab):

$\mathrm{Apply\:exponent\:rule}:\quad \:a^{b+c}=a^ba^c$

$=2^{-3}\cdot \:2^n-2^{-2}\cdot \:2^n$

$\mathrm{Factor\:out\:common\:term\:}2^{-3}\cdot \:2^n$

$=2^{-3}\left(1-2\right)\cdot \:2^n$

$\mathrm{Refine}$

$=-2^{n-3}$

My question is:

how can i factor

$2^{-3}\cdot \:2^n$

from

$2^{-3}\cdot \:2^n-2^{-2}\cdot \:2^n$

to get

$2^{-3}\left(1-2\right)\cdot \:2^n$ ?

I can't seem to understand the logic behind this factorization.

If you could help me understand it, I would really appreciate it.

• Are you just asking why $ab - ac = a(b - c)$? – user296602 Mar 1 '18 at 17:06
• Did you try a few values of $n$? – Angina Seng Mar 1 '18 at 17:08
• Welcome to MSE. Please read this text about how to ask a good question. – José Carlos Santos Mar 1 '18 at 17:09

$$2^{n-3}-2^{n-2}=2^{(n-3)+0}-2^{(n-3)+1}=2^{n-3}(2^0-2^1)=\boxed{-2^{n-3}}$$

Note that

$$\large{2^{^{n-3}}-2^{^{n-2}}=2^{^{n-3}}(1-2^1)=-2^{n-3}}$$

$$...=2^{-3}\cdot \:2^n-2^{-2}\cdot \:2^n=2^n(2^{-3}-2^{-2})=2^n2^{-3}(1-2^1)=-2^{n-3}$$
$$2^{n-3}-2^{n-2}=\frac{2^n}{2^3}-\frac{2^n}{2^2}=2^n\Biggl(\frac1{2^3}-\frac1{2^2}\Biggr)=2^n\Biggl(\frac{2^2-2^3}{2^5}\Biggr)=$$ $$2^n\Biggl(-\frac{2^2}{2^5}\Biggr)=2^n\Biggl(-\frac{1}{2^3}\Biggr)=-2^n(2^{-3})=-2^{n-3}$$
• Note that a shortcut may be $$2^n\left(\frac1{2^3}-\frac1{2^2}\right)=2^n\left(\frac1{2^3}-\frac2{2^3}\right)=2^n\left(-\frac1{2^3}\right)=-2^{n-3}$$ – TheSimpliFire Mar 1 '18 at 19:13