analytics

Sunday, September 29, 2013

Graph Isomorphism matrix

If you have a graph like:
Note that some of the edges are weighted, one vertex connects to itself, and one connection can cross another.
We can associate a connectivity matrix M with this graph like so:
Here, there is a in cell (x,y) if x and y are connected and the weight if any replaces the 1. 
Also a permutation matrix of the same size can be defined as any matrix that has one 1 in every row and every column, for example:

A nice theorem about these matrices is that if two graphs are isomorphic we can write:
P*M*P = N
where M is the connectivity matrix of graph M, and N is the connectivity matrix of graph N, and P is any permutation matrix. 
Proof:
P*M*P is the matrix you get when you first permute any number of rows of the matrix, and then do the same permutation on the columns. And this is exactly the same as taking the graph associated with the connectivity matrix and permuting the labeling any way. And of course two graphs are isomorphic if there is a way to permute the labeling so that you generate the same connectivity matrix. 
This isn't an if and only if because I found two non-isomorphic graphs that are related in this way by a permutation matrix. 




Friday, September 27, 2013

maybe spacetime under gravity?

I found this nice relationship between the unit circle and a distribution I name in the picture...

In words it is a distribution that is tangent to the circle at 0*, and has the same area as the circle from -infinity to infinity. So it's pretty interesting on it's own but I found it thinking about how relativity is always explained as how mass warps spacetime like a ball on a rubber sheet. I had the idea that maybe a unit mass of a unit area displaces a unit area of spacetime from minus infinity to infinity. I don't know enough differential geometry to say whether this fits with the very complex relativity formulas or not but it was just a thought.

IMPORTANT NOTE:
The area of the formula for the green region from minus infinity to infinity is pi, but subtracting the bottom half of the circle's area of pi/2 gives pi/2. As I'm considering it as a displacement it makes sense this way.

* Dr. Rose helped me with this part I originally though it stayed tangent to the circle over an interval...

Monday, September 23, 2013

Rough modeling of rows of Pascal's triangle as a distribution

I found a rough correspondence between the formula under the Consider: and Pascal's triangle...


I tried a few different rows and it was always close, I'm not sure whether it becomes a better approximation for a row of Pascal's triangle for larger rows but I think it does get closer...

Also, one can solve for the middle number approximately:
for r = 11

the right answer is 252 so pretty close. 

One practical reason for this approach is for example finding the middle number of row r of pascal's triangle, ordinarily you would use the combinatoric formula r!/((r-1!)*(r!)) but eventually the factorial involves numbers too large for Maple to calculate, but using my integral formula for the middle number only involves calculating 2^r which it can do more easily.


Sunday, September 22, 2013

Friday, September 20, 2013

different unit circle

Maple surprised me when I asked it to graph this:
It's provable pretty easily from Euler's formula:
e^(pi*i)=-1
(e^(pi*i))^x = (-1)^x
(-1)^x = e^(pi*i*x)

I think it's kind of a nice notation for the unit circle on the complex plane because you don't have to write all the e's,pis, and i's everywhere. And it's easier to work in then radians, for example (-1)^(22.4) is obviously the same as (-1)^(.4) when you mod it by 2 which is .4 of the way to the left of the circle after going around 11 times.. But e^(22.4*i) you would have to think modulo 2*pi which might not be that obvious. It ends up that is 3 times around the circle and .5 of the way to the left of the circle....
I

Wednesday, September 18, 2013

Integration-Sum relationship

This substitution for x in an integral:
which has a graph of:


Makes this relationship true:



For example say f(x) was 1/x and we are interested in bounds from 1 to 10.. substituting in the expression for t in for x in 1/x and plotting shows:
You can see that the integral over this region is going to be related to the sum trivially.
Alternatively, x(t) can be written as an infinite Fourrier series which sums to a complex exponential function:
x(t)
as a check a plot of this bottom function:





So in particular the zeta function can be rewritten as an integral by substituting the complex exponential formula into the integral/sum relationship first mentioned and simplifying:





Unfortunately Maple didn't know what this integral evaluates to! :)



Monday, September 16, 2013

mirror lens

This shows how to get a lens effect from mirrors, they're shown as straight lines but they would actually be slightly concave so rays other than the 3 I show would also focus on the point. Also there would be more mirrors similar to these between the ones shown to get better coverage of the incoming light.
It's a lot like a fresnel lens except instead of thicknesses of transparent medium you use mirrors to change the direction of the light.

the big advantage is that it can scale up very large which is expensive for a fresnel lens and if the reflectors were made out of say, aluminum, it could reflect a wider range of frequencies than just visible light... maybe the arrangement could even be used to direct air or exhaust

exponential mirror

This graphic shows how to make a mirror out of something like mylar to focus a large area onto a small volume, which could be a canister of water or similar at the base of the reflector put basically where the y axis is now. . This curve would be rotated around the y axis in a circle to form the 3 dimensional version. 

Tuesday, September 10, 2013

Network testing for a vertical line matrix

Consider the following network:
The red arrow indicates that that node accepts an input, which is a 4x4 binary matrix. I was using 5 steps for evaluating the networks, where a step is each node taking it's input, doing a certain operation on it (indicated by the label), and then sending it to the nodes it's attached to. Then after 5 steps, see the node with the red arrow, if that node has [[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,1,1]] then the network is said to return True on the particular input. Note that some of the nodes connect to themselves and others connect more than once to another node.
The numbers represent certain basic operations on a matrix as follows:
0: simply XOR the input matrices
1: simply OR the input matrices
2: XOR the input then invert the result
3: OR the input then invert the result
4: XOR the input then transpose the resulting matrix
5 OR the input then transpose the resulting matrix
6 XOR the input then shift the result so the left half and the right half of the matrix are exchanged
7 OR "
8 XOR the input then flip the result vertically
9 OR "

With these elementary operations and this network configuration:

So this network works pretty well for detecting whether the input matrix is one of the two in the picture above, and doesn't return True very often for any input matrix other than those two.

Now this was a simple problem that you probably wouldn't solve this way but would instead solve directly checking for the particular two inputs, but I see it as a proof of concept and I will be trying to use this method to solve over more complicated input, like non-binary or more complex patterns to return True on.


Wednesday, September 4, 2013

solar panel reflector

I tried to solve for a reflector that puts the most light on a solar panel from the most directions, this is what I came up with...
It assumes a 2x1 panel spreads the incoming light pretty evenly over the panel. 
The materials I might use are:
The aluminum wire is for making the frame of the reflector and then cover it with the mylar. This solar panel is 14"x7".

Sunday, September 1, 2013

archimedes screw engine

An idea for an engine:
The idea is that fuel and air comes in at the left, and compresses and moves towards the ignition point as the screw turns on its axis, then the ignition lights the fuel and explodes forcing the screw to keep turning in the same direction. Eventually it has expanded fully and exits on the right as exhaust.

**Edit**

It doesn't work by the principle that I was thinking, I posted it on a science/math site and someone pointed out that you can actually pass a thread through from one end to the other... I was relying on compression and then expansion along the x-axis so my bad.