analytics

Friday, May 31, 2013

solving for the graceful tree of a graph

The goal of finding a graceful graph is finding numbers to fill in the letters of this graph:

such that the differences between them (to label the edges) are 1,2,3,4,5. Or for larger graphs following that same pattern. 

First one can observe that one equation can be formed from the information as:


But there are five unknowns and that is only one equation, so the way I found to provide the other equations is simply to raise this basic equation to higher powers. So I use:


This provides many solutions but the first one given is:




This solution does work. There might be other ways to find a set of nonlinearly-related equations using the information given that work even better. 


Sunday, May 26, 2013

Acid/base battery part 2

\
Above is the battery after running for 24 hours. It held between a quarter and a third of an amp for at least a couple hours, and today 24 hours later it is still reading a few milliamps. These readings were taken by simply placing the electrodes of the voltmeter in each beaker.  The jar in the left held a green liquid aluminum chloride and the one on the right held a whitish aluminum hydroxide. These were prepared by dissolving an excess of aluminum foil in HCl and NaOH and decanting each liquid part into a beaker. Then a tube full of water was carefully inserted between them to form a bridge. You might be able to see in the picture above that eventually an unknown to me orange precipitate forms in the one on the right and a dark precipitate forms in the one on the left. 
The trick was finding an acid and a base that conduct electricity well, I found it hard to find information on the internet, but aluminum chloride has about 750 ohms of resistance and aluminum hydroxide has 14,000. So an obvious way to improve the battery would be to find a better base for conducting electricity than aluminum hydroxide. 

Monday, May 13, 2013

Redistribution network

I was thinking to study a network like so: suppose you have a graph, this one is simple but they don't have to be:




Now consider this matrix, the letters on the left are just labeling the rows: 

Now imagine what each cell in the matrix represents is how much of each different variable each node has in its inventory. Here I've started every node off with 1 unit of it's own variable, but they could start in any way.

Then they go through this cycle, every node divides what it has in it's inventory among the nodes it is connected to. For example A in the graph diagram is connected to B,E, and F. and it has in it's inventory A, so it will give (1/3)A to B, (1/3)A to E, and (1/3)A to F. At the same time every node distributes what is in it's inventory to all the other nodes. So after one iteration you have:
So F has 5 connections to A, D, E, G, and H. It gets a share from each of those nodes that depends on the number of nodes those nodes are connected to. Like row F and column E is 1/4 because E is connected to 4 nodes of which F is one, and E had previously just had one E in it's row.

After another iteration (rounded to maximum of 3 decimal places):
[0.261, 0.083, 0.111, 0.113, 0.133, 0.05 , 0.1     , 0.05  , 0.0   ,  0.0    ],
[0.083, 0.305, 0.0    , 0.145, 0.083, 0.116, 0.0    , 0.0    , 0.083, 0.0    ],
[0.111, 0.0    , 0.277, 0.062, 0.145, 0.05  , 0.0    , 0.062, 0.062, 0.125],
[0.15  , 0.194, 0.083, 0.258, 0.05  , 0.05  , 0.1    , 0.113, 0.083, 0.125],
[0.177, 0.11  , 0.194, 0.05  , 0.279, 0.116, 0.1    , 0.05  , 0.063, 0.0    ],
[0.083, 0.194, 0.083, 0.063, 0.145, 0.316, 0.125, 0.125, 0.125, 0.125],
[0.066, 0.0    , 0.0    , 0.05  , 0.05  , 0.05  , 0.225, 0.05  , 0.063, 0.125],
[0.066, 0.0    , 0.083, 0.113, 0.05  , 0.1    , 0.1    , 0.363, 0.125, 0.125],
[0.0    , 0.111, 0.083, 0.083, 0.063, 0.1    , 0.125, 0.125, 0.333, 0.125],
[0.0    , 0.0    , 0.083, 0.063, 0.0    , 0.05  , 0.125, 0.063, 0.063, 0.25  ]

Here row A and column A is .261 because A gets 1/3 of every part of B's inventory but B had 1/3 A so A gets 1/9 from B. And similarly 1/12 and 1/15 from E and F, added together that is .261.

After 100 iterations:

[[0.088, 0.088, 0.088, 0.088, 0.088, 0.088, 0.088, 0.088, 0.088, 0.088],
 [0.088, 0.088, 0.088, 0.088, 0.088, 0.088, 0.088, 0.088, 0.088, 0.088],
[0.088, 0.088, 0.088, 0.088, 0.088, 0.088, 0.088, 0.088, 0.088, 0.088],
[0.118, 0.118, 0.118, 0.118, 0.118, 0.118, 0.118, 0.118, 0.118, 0.118],
[0.118, 0.118, 0.118, 0.118, 0.118, 0.118, 0.118, 0.118, 0.118, 0.118],
[0.147, 0.147, 0.147, 0.147, 0.147, 0.147, 0.147, 0.147, 0.147, 0.147]
[0.058, 0.058, 0.058, 0.058, 0.058, 0.058, 0.058, 0.058, 0.058, 0.058],
[0.118, 0.118, 0.118, 0.118, 0.118, 0.118, 0.118, 0.118, 0.118, 0.118],
[0.118, 0.118, 0.118, 0.118, 0.118, 0.118, 0.118, 0.118, 0.118, 0.118],
 [0.058, 0.058, 0.058, 0.058, 0.058, 0.058, 0.058, 0.058, 0.058, 0.058],
[0.058, 0.058, 0.058, 0.058, 0.058, 0.058, 0.058, 0.058, 0.058, 0.058],

It ends up all of these numbers are approached as limits! 30 Iterations is correct to about 3 decimal places and they get closer and closer.

**EDIT**
I found a way to find these numbers exactly. Imagine that the process iterated until it reached the limits. That would mean in another iteration, the amount going into each node would match the amount going out. That would mean that the new amount in A for example would be 1/3 B, 1/4 E, 1/5 F. So we can write out the equations:
Here there would be 10 equations one for each node, but you remove one or otherwise the solutions would be 0 for all variables. In the removed equations place you put A+B+C+D+E+F+G+H+J+K=1. That's the other constraint on the system. Then the solutions are:

And it appears that the bottom number of these fractions is twice the number of edges in the graph and the top number is the number of edges coming from the vertex.

Monday, May 6, 2013

Concerning isometries

I noticed if you have two graphs labeled any way, like:

You can set up a set of equations like so for each of them, for the graph on the left it is:
a) a+m=b+c+f
b) b+m=a+c+d+e
c) c=m+a+b+d+e+f
d) d=m+b+c+e
e) e=m+b+c+d+f
f)  f=m+a+c+e
Where each lettered equation is a letter for a vertex +m = the vertices that lettered vertex is connected to summed.
The set of equations for the figure on the right in the above image is:
a) a+m=b+e+f
b) b+m=a+c+d+e+f
c) c+m=b+d+e
d) d+m=b+c+f
e) e+m=a+b+c+f
f) f+m=a+b+d+e

Now solving each system respectively gives:


It's not too hard to see that these are the same solutions but with some of the letters having exchanged roles.

The idea is the graph is uniquely identified by the system of equations up to renaming vertices, and the solution for each variable is unique for the system of equations up to renaming variables, so isometrical graphs have the same set of solutions up to renaming variables.

** I did find that it can't always distinguish between a graph and the same graph where a vertex is connected to itself but it seems to work for simple graphs


Friday, April 26, 2013

Clothboard

I made this material in the picture out of dryer lint and Elmer's white glue.
  It took it about a week to dry completely but once it did it is hard as a board and I can't even flex it using all my strength with my hands.
  To make it take the dryer lint and tear it into as small pieces as you can and keep mixing it together until it is as uniform as you can get it, also remove any pieces of any sort of non dryer lint particles that might be in there. Then gradually mix in the glue (I used Elmer's but I might even try some kind of epoxy next time). Knead it like dough, it will absorb a ton of glue, like maybe half of a good size bottle. I'm not sure on the exact amount I kind of had to guess. Then set it out in the sun for about a week, for the first few days it will feel like it gives when you press it, but forms a hard crust on the outside, eventually it will dry all the way through and be hard as a board and not give at all no matter how hard you press.
  I had the idea based on how they make carbon fiber but this uses cotton fiber that's been processed in the dryer, which I think everyone throws away anyway. I think the real useful property of this material is that because it's made out of cotton fiber it won't conduct heat! Like imagine an inch think solid sweater how warm that would be. So my first thought would be as a possible replacement for drywall, that is stronger and doesn't conduct heat to better insulate a house. But also it could be fun to make sculptures or anything else out of it.
  A couple more things, I think it would be fun and safe for kids to use (when you are kneading it is really gushy I think they would like that), and I noticed that it is naturally buoyant, the sample in the picture floats half out of a glass of water longways. I believe that it would also be pretty soundproof, but they would probably have to mix in a flame retardant before they use it in structures.

 

Thursday, April 11, 2013

Payouts in a tournament paying a certain number of places

Suppose you have a tournament and you have a certain amount of money pooled together and you want to pay a certain number of places. I found this fair way to figure the payouts. Consider the Golden Spiral:
Now consider this payout structure:


See the payouts follow the Golden spiral so you follow the spiral until you have the desired number of rectangles one for each person getting the payout.. 
Then you can use this to figure the actual amounts (this is for 3 places):

For a million dollars paying out to 5 places it looks like:

The general formula is:
Where total is the amount of money pooled and n is the number of places to pay out. Instead of 1.618 you can use more accurate values of the golden ratio but you only need to if the number pooled is quite large. 

Or you can use different ratios, but the golden ratio has the nice property that the amount everyone gets is as much as the next two finishers combined.

Sunday, April 7, 2013

Recursive metaprogramming

I was thinking if you have an interpreter that takes a program listing like this:
a(b(c,d,e), f("foo.txt", "sample.png", 1))
But a,b,c,d,e, and f are all stand-alone programs. They can execute by themselves taking certain numbers of arguments and returning something, but this interpreter I'm thinking of can recurse through this structure and feed the outputs from each program to an enclosing program.
For example in the above, f could be a program that writes the text in the first argument on the picture in the second argument if the third argument is 1. c,d, and e could be programs that output images, and b makes a composite image from them. Then A is a program that puts the result of all of those in one big composite picture, displays it and plays a song.
Anyway the idea is that using this interpreted language you could break a big program into a lot of small programs that the operating system can schedule and use all of the available processors of your computer. If instead you made one big program out of each of these small programs as say, functions inside the program, you would have to do a lot of work programming how to distribute the workload across all the cores or how to do the threads and all of that stuff is hard to program. But the operating system already does a good job of this for multitasking the various programs you might have running on your computer, so you just let it do the hard part.
The one I showed was just a one line interpreted program of programs but the language could have a lot more features.