analytics

Saturday, June 28, 2014

Electric Game Grid

The board is constructed as follows, a grid of wires runs across vertically and horizontally, but anywhere two lines intersect is insulated between the wires so they are not electrically connected.
A game piece is constructed like so:
The base of the piece is a square with four metal strips on the top and bottom and sides with insulation at the corners. And two resistors connect the top to the left side and the bottom to the right side. 
For example let's say this piece had resistors both with values 1k ohms. It is placed on one of the black dots in the above game board. 

Before the resistance between C and 3 was practically infinite because the wires were insulated from each other, but now the resistance between C and 3 is around 1k or the value of the game piece because electricity can travel from C to the game piece's metal strip and then across the 1k resistor and up to 3. 
So if we make several types of game piece with resistances far apart, like say 1k 10k 100k 1000k, we can use algebra to determine where the pieces are on the game board even when there are multiple pieces and some are on the same vertical or horizontal row as long as the resistor values are far enough apart. For example maybe there are only 5 1k pieces, 6 10k,  7 100k, and 8 1000k. A computer could tell by checking the resistance between every pair of wires with one wire from the top and the corresponding wire from the left side where all of the pieces are on the game grid after solving some equations (simple for the computer).  
** A game piece can also be constructed so that it uses two different resistors inside of it so the computer can solve for which way each piece is facing as well but then you would have to also check between bottom and right side wires**
the amount of electricity needed to read the resistances is pretty negligible, so it's not dangerous to have the game board wires exposed where they could accidentally be touched. 
**EDIT**
Maybe the easiest way to implement this would be if each game piece had a spring loaded contact so you press down on each piece as you set them down and only that piece completes a circuit and only while you are pressing down and the computer keeps track of all their positions and type in memory. Then the computer doesn't have to solve any equations, it just checks horizontal wire/vertical wire pairs and captures when the value of the resistance goes from infinite to say 1k, and then it knows where the pressed game piece is and it's value. Also it would probably be better to have every piece in the whole set have a different resistance even if they are of the same type, so you can pick one up without pressing the switch and set it down somewhere and press and the computer would know from it's value exactly which one was moved.

The part I like the most is the main game board could just be a flexible plastic mat, and the wires are flexible so the board could be big and roll up to make it more portable!

Thursday, June 26, 2014

Algebraically solving for musical canon features

To make a simple musical canon I had to decide first what features I wanted. I decided that I wanted an 8 note melody for voice 1, voice 2 to play offset of voice 1 by a measure, and voice 3 to play the same melody backwards. and I wanted all 3 playing together to form major or minor chords. So I made this schematic to see what notes would play at the same time, with m(n) n=1..8 the notes of the melody.

So at some point in the song the notes in any column will be playing at the same time. I decided to make the top voice be the middle note in any resultant chord, and for it to be major or minor means that voice 2 is either 4 half tones down or 4 up and and voice 3 is 3 up if voice 2 is 4 down and 3 down if voice 2 is 4 up. I can encode this information mathematically by saying the absolute value of the difference between voice 2 and voice 1 is 4 and the absolute value of the difference between voice 3 and voice 2 is 7. I also set the first note to C or 1. So I get a set of equations:
When I solve these equations for integer solutions with the isolve command and throw out any with negative values for a note it turns out there are 4 solutions all with a free variable that Maple writes as _Z1:
I decided I want my canon to be in C major which is the same as having integers 1,3,5,6,8,10,12 so that eliminates the solution with a 7 for a value. Then narrow it down by deciding I want the melody to be in one octave hence no value over 12. This gives only 3 possible melodies:

The middle one is the one I find the most interesting musically so I made the canon with that...


Wednesday, June 11, 2014

Integral equal to sum in the limit with a focus on the zeta function

Consider this formula:
First consider the function inside the integrand without the f(x) as 2*n increases:
See that as 2*n gets larger this function becomes more and more narrow around the integers. It ends up that there is an exact formula for the area over an interval like 1/2..3/2, which is:
for example:
So to see what the formula I first posted does, first consider this subformula:
This should equal f(1) as n increases, because the narrow spike of the sin function multiples with f(x) mostly in the neighborhood of x=1 and the area of that spike is normalized to 1 by dividing by it's actual area using the 4^n/binomial(2*n, n)
So for example if f(x) is 1/x^2 and we look at the area around x=3:
Let's look at when n = 10:
So we can find expressions like this for n = 20:


which says that 1/x^3 or zeta(3) should be roughly equal to 1.217707604... summed to infinity via these Ci functions which are equal to:
Unfornutaely I don't know exactly how maple figures these integrals as n gets larger but it looks like there will be a way to write a generalized sum for any n. 

Sunday, June 8, 2014

Application of the integral version of a sum I found to the zeta function

In the last post I showed this formula relating integrals and sums:

I found as an application of this formula that it can be used with a slight modification (moving the f(0) to f(1)) to investigate the Riemann sums of the form 1/(n^c) giving the zeta function like so for the case of c = 3:

This gives:
And:

And in general:
** Edit, the integrals aren't quite evaluating right so I'll have to revisit this and see if I made a typo or what...

Tuesday, June 3, 2014

A relationship between sums and integrals

I found this nice formula relating sums and integrals:

For example, with f(i) = 1/(2^i)
To see why consider this plot for the function inside the rightmost integrand:
This function is scaled by a factor to make it so the integral from x-1/2 to x+1/2 for a particular x=i is equal to the value of the sum at i. This is done by dividing by the integral from -1/2 to 1/2. to make it 1 then rescaling by f(0).