## Saturday, June 30, 2012

### Rational function interpolation

My first thought was this was kind of obvious but apparently when people want to find what this finds the answer to they use something called http://en.wikipedia.org/wiki/Pad%C3%A9_approximation. This is a much simpler way that I thought of.

Say you have your unknown function:
The four fractions at the bottom are what the function equals at x=1,2,3,4, you'll notice if you use regular interpolation with these numbers it won't even be close to the unknown function above.

But what you can try is to interpolate the top half of each fraction and bottom half separately, like so (Make sure they are in lowest terms or this won't work):

There that matches the unknown function very well...

### Double noise encryption

Suppose you wanted to send someone a message, M, in binary it might look like:
M= {0,1,1,0,1,0,1,0...}
Before you send it you XOR it with some random noise R1 that happens to look like this (You save this noise pattern for usage one more time later)
R1={1,0,1,1,0,0,1,1...}
Giving
M(R1)={1,1,0,1,1,0,0,1,...}
Then you send it to person 2, anyone seeing the message en route will just see noise.
Then person 2 takes the message and generates some random noise and saves it for later that looks like this:
R2=      {0,0,1,1,0,1,0,0...}
They XOR the message M(R1) they received with their noise to get:
M(R1,R2)= {1,1,1,0,1,1,0,1,...}
Person 2 sends this back to person 1, anyone who intercepts the message would see something like noise:
Person 1 now uses the noise he saved R1 and !XOR's(the opposite of XOR) it with the message he just received to yield:
M(R2)={1,0,1,0,0,0,0,0,1,...}
Now he sends it back to Person 2, and as usual anyone intercepting just sees random noise:
Person 2 now   !XOR's(the opposite of XOR)  the message with his saved noise R2 to get:
M = {0,1,1,0,1,0,1,0}

So you see now person 2 reads the message person 1 sent without it ever being sent as anything that looked other than random noise.
Once the two computers connect this could be done nearly instantaneously.

## Friday, June 29, 2012

### A curve made up of lines

I've seen some yarn art made by stretching the yarn over nails set up like this:

I think people have assumed when you do something like the above that makes a circle, but you can see it goes outside of a perfect circle, though it is close.

Mathematically, the dark blue curve outside the circle results when you connect the points:
[a, c] and [c, c-a] for some c as a varies from 0 to c (pictured is c=5).

Dr. Rose found the parametric equation for the curve:

I tried to find the y=f(x) but it turned out it was 5 pages long!
The graph of the radius in polar coordinates for this function is:

Which looks a lot like a normal distribution but is too short and wide for what would be the standard deviation. You can see the radius is always greater than 5, so it does indeed lie outside the circle of radius 5.

## Thursday, June 28, 2012

### Transforming Polynomials

First consider that you have the basic 2nd degree polynomial:
That can be written as a parametric equation vector:

And you can also consider a linear transformation matrix like so:
Multiplying the vector by the matrix gives a new parametric vector:
Which after solving for t and plugging into the y component is transformed back into a standard polynomial:
So for example if you have a target polynomial (random):
By setting the coefficients equal to the last equation, hat creates 3 equations with 3 unkowns:
These can be solved for a, b, c:
So the transformation matrix is:

This is the linear transformation matrix to convert the parabola x^2+x+1 to 5x^2-2x+3
So it is pretty easy to see that every possible parabola is the basic parabola times a linear transformation matrix that it is possible to solve for.
I believe but I'm not sure that it can apply to polynomials of any degree but you have to add more degrees of  freedom to the transformation matrix; like for cubics:
A transformation matrix like the above should give 4 equations with four unknowns, etc.

## Saturday, June 23, 2012

### Programming syntax for English sentences

I've been mulling this over for the past few days.. if English were written like the Python programming language with a few modifications...

You would have a different class for every noun there is, they would be arranged in a hierarchy, like the class for the noun boy might look like:

class Boy(Human):
self.age = range(0, 18)
self.gender = "male"

Then the human class in turn might look like:

class Human(Mammal):
self.age = range(0, 120)
self.gender=("male", "female", "other")
def walk(..., mode="bipedal")
...
The walk function is mostly the same as for a mammal which is in turn the same as a lot of animals, etc... but in humans it is bipedal type of walking.

A particular boy named Jimmy would derive from Boy:
jim = Boy()
jim.name="Jim Smalls"
jim.age = 13
jim.house=House()
jim.house.location="913 West Oak Blvd, San Diego, California, U.S.A"

Finally, the sentence "Jim walked jauntily to the store from his house yesterday."
jim.walk(from=jim.house, to = store, style="jauntily", time="yesterday")

Of course the store would have to be a particular store or just the generic idea of store from the heirarchy of all the different types of buildings.

It would truly be an endless project but in the end you would have all the concepts and things in the world mapped into the computer and then it would be easier to make an artificial intelligence.

## Friday, June 1, 2012

### Acid-Base Voltage

There is acid in the left beaker (HCL) and a base in the right (NaOH) and a tube connecting the two containers. The tube is filled with the mixing solutions so there is a liquid connection from the left glass to the right beaker. And with the red and black electrodes I'm measuring a voltage of .2V.
I believe the principle is that there is a net positive charge moving from the left glass to the right beaker which pulls electrons through the wire and produces a voltage. The problem is the resistance of the whole circuit is up towards a million ohms so there is not much current flowing at that voltage. I would like to find some acids and bases that conduct electricity much better so there will be more current.
Usually in a battery the principle of it's action is much different, you have two different metals dissolving and plating in acid in both beakers. Actually, to me it is surprising that Google didn't even have results for basic queries like what acid conducts electricity the best which naturally arises from making a battery by this principle. So I think I might be the first one to notice this effect.