Back to Business! – The “Square Root Curve,” With a Twist

Hey Everyone!

It’s been a surprisingly long while (week and a half!) since my last post, so I’ve decided to get back to making more awesome content!

This time, I’m going to talk about an important procedure, the “square root curve.” Popular among students and notorious among teachers, it is the function:

f(x)=10\sqrt{x}

where x is the score a student earns and f(x) is the new, inflated score.

But although we know it yields higher scores for x\in\left(0,100\right), what does it do to numbers greater than 100?

Intuitively, I’d say it would decrease the score. But just to confirm, solve x-10\sqrt{x}<0; you end up with x>100.

Now the next question is: if you take infinite square root curves of any positive score, will your value approach to 100? Let’s find the value of a positive score iterated through f(x) infinitely:

s=10\sqrt{\dots10\sqrt{10\sqrt{10\sqrt{x}}}}

Substituting s into itself,

s=10\sqrt{s}

s=100

But note that this only works for positive real numbers. And we know that it won’t work for zero; the square root function just returns zero infinetly. So that means we’ve got the nonnegative values covered for infinite iterations of the squareroot curve.

THIS ISN’T SATISFYING ENOUGH FOR ME THOUGH, and it shouldn’t for you either! What about negative numbers? Negative numbers should be able to withstand the squareroot curve, right? Who cares about rules.

Well it turns out that we can use the complex plane to our advantage in seeing what value negative numbers converge to. Or for that matter, all complex numbers!!! This would be awesome, and would have no practical applications whatsoever! (Unlike my previous posts – but it’s fun, so why not go ahead?)

So thus I restate the question here: Do ALL nonzero, complex-number test scores converge to a final grade of 100+0i under infinite applications of the squareroot curve?

It turns out that this is a relatively simple problem that just isn’t thought about enough. At first, I tried to futilely use derivatives, calculus, and complex analysis to reach an answer. But here’s a more rigorous, simpler, and undeniably beautiful solution:

All numbers x\in\mathbb{C} can be expressed as x=m(\cos{\theta}+i\sin{\theta})=m\textup{cis}(\theta), where \theta\in[0,2\pi) is the angle of a value in the complex plane, and m=|x|. It is well known that \sqrt{m\textup{cis}(\theta)}=\sqrt{m}\textup{cis}(\frac{\theta}{2}). So using this knowledge, it is easy to reason out the answer using our previous finding:

  • The magnitudes converge to 100. That’s because the magnitude of \sqrt{m\textup{cis}(\theta)} is always \sqrt{x} – for ANY complex number. Assuming nonzero-ness, we can use our infinite-square-root solution, since magnitude will ALWAYS be positive, by definition.
  • The angles converge to 0. As you infinitely divide the angle \theta by 2, you soon get to the point where the angle approaches zero.

Thus, we can say that the resultant value approaches to 100\textup{cis}(0)=100+0i!

See how wonderful that solution was? Now we know definitively that any complex nonzero score will approach 100 after infinite applications of the squareroot curve. So we can find solace in the fact that any (non-zero) grade, whether real or complex or earned or imagined, will be brought to 100 if your teacher is generous enough.

Just try not to get a zero, though. If you do, you might have a teeny bit trouble getting your score to change. Not to mention that you have earned the ONLY single score that will not converge towards 100 in the infinite squareroot curve process.

I LEARNED MORSE CODE!

Yesterday and the day-before-yesterday, I spent my valuable time learning how to type in Morse code. Well, now I’m somewhat more accomplished I guess. ^_^

So now my default Android keyboard is Morse Code, and I currently have 9 WPM. Not bad.

As a side note… during math class yesterday I made a Morse Code IME for the TI-84, inspired by the Morse code sequence in a “What Does the Fox Say?” animation (0:53 to 1:06 of this video).

Intro: Degree Distribution of Random Graphs (Side-Investigation on Graphs, Part 1)

A problem I would like to look at first is the “degree distribution” of “random graphs.” Knowing about this is important for understanding how “connected” natural networks are.

But first, what is a “degree distribution”? What is a “degree”?

When you have a graph, each node is connected to other nodes via edges. The “degree” of a node is the number edges a node is connected to. Taking the degrees of all the nodes in the graph, it is possible to find a probability distribution – that is, a “degree distribution.”

Random graphs, on the other hand, can be manufactured in a variety of ways. One of the most intuitive ways is simply taking a node, and randomly adding edges, and adding nodes to those edges. Another intuitive way is to draw a bunch of nodes and connect them randomly.

In “Degree Distribution of Random Graphs,” I will examine the degree distribution of a random “ER graph,” post the code, and marvel at the smooth probability distribution.

Here is a sneak peek at a final plot in the conclusion:

degree distro

But for a more detailed explanation, check out Part 2!

Post 1 – Making a Chinese Numeric Pangram

Recently, one of my friends asked me whether 7-segment optimization is unique to Arabic numerals. I said no. But then he asked, what about Chinese?

The Chinese numerals are a bit of a problem when it comes to optimization: the characters are complicated and are more different from each other than the Arabic numerals. Even take a look at the digits 1 to 10: 一, 二, 三, 四, 五, 六, 七, 八 , 九, and 十. These look simple on the surface, but making a segmented display is a whole different question.

So I’m going to start out with designing the segmented display, and then will post the optimization for it. And I’m going to leave out zero (líng – 零) because that character is quite the challenge to simplify! (Even the computer, with its fine square-pixel resolution, has trouble rendering the numeral clearly.)

Time for inter-linguistic democratization of segmented pixel displays! For world peace, and beyond! (Added benefit – Japanese uses the same numerals!)

The “Rule of 70” – Why Does it Make Sense?

Today I was doing my Economics homework when I came across a section about the “Rule of 70.” The rule states that for a value that has a growth rate of n%, the number of years for the value to double is approximately 70 divided by n.

This was curious to me. Usually, rules like these based on “coincidence” should have some form of mathematical basis! So why 70, of all numbers?

First, I assumed that the rate of growth was x% per year. The final value V of a beginning value P after t years is V=P(1+\frac{x}{100})^t. Solving for t when V=2P (double the initial):

P(1+x/100)^t=2P

\log_{1+\frac{x}{100}}(2)=t

            Using logarithmic base conversion,

t=\frac{\ln2}{\ln(1+\frac{x}{100})}

regular_graph

            The above plot was made with Wolfram Alpha.

Now, let’s say we want to shortcut this expression using a function with similar qualitative properties. What function is easy to use and looks similar to this? That’s right, rational functions of degree -1. In this case, we can use the generic function y=\frac{q}{x}, where q is a number we shall shortly solve for, since it is also asymptotic to both the x and y axes.

The thing is, how do we determine what q is? We can’t just solve it out, since that won’t work out nicely. We can’t take the limit of q to infinity with respect to x, since the error deviates a lot. (Even look at the example of 100% interest – with one method, we get 1 year, and with the other, we get 0.7 year.) But we know that the rule holds pretty well for small numbers, like x=2. So why not take the limit of q to zero with respect to x?

Thus, using some L’Hopital’s rule and other clever devices,

\frac{\ln2}{\ln(1+\frac{x}{100})}=\frac{q}{x}

q=\frac{x\ln2}{\ln(1+\frac{x}{100})}

\lim\limits_{x\to0}q=\lim\limits_{x\to0}\frac{x\ln2}{\ln(1+\frac{x}{100})}=\lim\limits_{x\to0}\frac{\ln2}{\frac{\frac{1}{100}}{1+\frac{x}{100}}}=\lim\limits_{x\to0}\frac{\ln2\cdot\left(1+\frac{x}{100}\right)}{\frac{1}{100}}=\lim\limits_{x\to0}\left(100\ln2\left(1+\frac{x}{100}\right)\right)

            And this, of course, is equal to 100ln2, which is about 69.315, which is about 70!!!!!! So it all makes sense now.

A comparison of the “rigorous” function and the “estimate” function:

compare_graph

And finally, a percent-error graph for values 0 to 100:

error_analysis

But yeah, totally awesome! xD

…And More Calculator Stuff! (Shortcuts FTW)

Well, at least this time it’s math-related.

Basically, after a lot of hard work at the calculator, I discovered the following solutions to huge problems I used to have.

Finding the values of all variables – Just type the following into your (TI-83 or TI-84) calculator:

 seq(expr(sub("ABCDEFGHIJKLMNOPQRSTUVWXYZθ",X,1)),X,1,27)

This gives you a list with 27 elements, which are your variables neatly placed in order.

Converting Binary to Decimal (Without a program) – Just type this into the home screen. Replace number with the string of 0’s and 1’s that make up your binary number. (KEEP THE QUOTATION MARKS!!!! example: “101010”)

 "number":sum(expr(sub(ans,X,1))*2^(length(ans-X),X,1,length(ans)))

Eureka! Now you can convert binary to decimal.

Vector Functionality – Believe it or not, your calculator came with vector functionality! Let L1 and L2 be your vectors, both in the form {Vx,Vy,Vz,...} . Then the following commands will help you out:

sum(L1*L2) #The dot product.
√(sum(L1^2)) #The magnitude of a vector.
L1 - L2 #The difference vector between L1 and L2
L1/√(sum(L1^2)) #The unit vector in the direction of L1

Yaaaaay! ^_^

Not really math… but drawing is fun!

Drawing on TI-84 calculators is a fun and questionably productive way to blow off steam.Click on the picture to see the gif. Yay.

I had to make a less detailed drawing this time because otherwise the gif file would be colossal. But now that I think about it I probably screwed up somewhere in-between – maybe when I edited the .gif in MovieMaker? 😛

yay

Sorry for the terrible quality xD, can someone tell me how to do this right?

Exploring Binary Fractions: What are the Digits?

When looking into this problem, I was initially confused by the “cycles” of remainders when long division is used (until I realized that the cycle is circumscribed by the size of the number). In retrospect, this activity seems kind of unnecessary, but since I spent time on it, I’ll post it here for readers to understand. And stuff.

So to answer this question, I first proposed a statement to prove:

\forall\ i\in\mathbb{P}, \exists \ n\in\mathbb{Z}^{+}\ s.t. \ 10^n\equiv 1,0 \mod i

The reason I chose this problem is because of the phenomenon that fractions brought into the form \frac{x}{10^n} turn out terminating, while fractions that can be brought into the form \frac{x}{10^n-1} end up repeating.

Let’s take a look at this problem for 7. 10^1 \equiv 3, 10^2 \equiv 2, 10^3 \equiv 6, 10^4 \equiv 4, 10^5 \equiv 5, 10^6 \equiv 1 \mod 7. Notice how after 10^6, the pattern repeats itself once again, with 10^7 \equiv 3 \mod 7.

Doing the same for 17 gives the following cycle of values: 10, 15, 14, 4, 6, 9, 5, 16, 7, 2, 3, 13, 11, 8, 12, 1. 16 values. That’s 17-1.

The same for 19: 10, 5, 12, 6, 3, 11, 15, 17, 18, 9, 14, 7, 13, 16, 8, 4, 2, 1. 18 values.

The same for 23: 10, 8, 11, 18, 19, 6, 14, 2, 20, 16, 22, 13, 15, 12, 5, 4, 17, 9, 21, 3, 7, 1. That’s 22 values.

In fact, this phenomenon is true for many numbers that are coprime to the base. I’ll let you think about that one in your free time.

In the meanwhile, I plan to submit these sequences to OEIS; the 17 one is already online. These sequences have been called “remainder orbits” among other names. Apparently, there exists a function called the “Carmichael function” that states that \lambda (n) is the smallest integer m such that a^m \equiv 1 \mod n. The Carmichael function where a = b gives the length of the period, because of this phenomenon.

<< Part 4: Repeating After the Point

Part 6 >>

Exploring Binary Fractions: Repeating After the Point

Life isn’t perfect. Neither is the binary system. Or the decimal system. Or any other practical base system.

One element of investigation is repeating binaries, which are numbers that do not terminate when expressed in binary. To understand them better, let’s take a look at the properties of repeating numbers in decimal.

Suppose we had the number,  0.\bar1. This, we know, is equal to \frac{1}{9}. But the big question, as always, is WHY. Why does the repeating decimal have a “nice” value – a ratio of integers?

Let’s take a look at this example, 0.\bar1. We can express the number as a summation:  S(n)=1\cdot\left(\frac{1}{10}\right)+1\cdot\left(\frac{1}{10}\right)^2+1\cdot\left(\frac{1}{10}\right)^3+\dots. This summation – an infinite series – can be evaluated using S(n) = \frac{a}{1-r} = \frac{1/10}{1-1/10} = \frac{1}{9}. Eureka!

But observant readers may notice that this explanation is completely unsatisfactory in answering the question of why every ratio of integers can be expressed as either a terminating or repeating decimal. Think about it. It’s not trivial – is it just a convenience that any ratio of integers can be expressed “nicely” in our number system?

The answer here may be unsatisfactory, but here is an explanation that will hopefully be plausible. You know long division? That stuff should apply for every integer base. So it should work for binary too. But first, let’s talk about the terminating numbers. Now suppose you are dividing by a “nice” number  – say, a power of 2 and/or 5 multiplied by an integer for base 10 – that has common factors with your base. These should always lead to terminating decimals. To prove this, suppose you had base b and the fraction \frac{c}{d}, where c \in \mathbb{Z} and d\in\left\{i_1^{p_1}\cdot i_2^{p_2}\cdot i_3^{p_3}\cdot i_4^{p_4}\dots\mid i\leq b,i\equiv 0\mod b,p\in\mathbb{Z}\right\}. (Basically that’s the fancy way of saying “d is nice.”) Now, if the fraction is multiplied by a sufficient power of b, then the fraction \frac{c}{d} becomes an integer! Then, the base-b “decimal point” can be moved back the appropriate number of times – the power of b used to manipulate the number.

But what about repeating fractions? Think about long division. Say I’m dividing, say by 29, for example. This has a repeating unit (“period,” in number theory terms) of length 28. As you long-divide, there’s a point where you’re encountering zeros and carrying over values. These values can only range from 0 to 28, since they are remainders. Once that value hits 0, the number terminates. If it never hits 0, then it does not. If it hits a previously-hit number, then it starts a cycle that repeats itself. (Try it yourself!)

To look at the problem of what those digits are, move to the next section! And beyond!

<< Part 3: Terminating Binaries

Part 5: What Are the Digits? >>