analytics

Friday, January 17, 2014

Guass's circle problem revisited for about the tenth time

Gauss's circle problem is asking how does the number of lattice points inside or on a circle centered at the origin for a certain radius relate to pi*r^2, namely to find a bound in terms of r on how much must be added to pi*r^2.. Here for example is a radius 11 circle on a lattice...
My thought was to draw two polygons, they both have 2 sides along the radius of the circle ,the black  and green polygon starts 2 grid points below the blue at the top of the circle, moves only right or down (starting with right from 1 point below the top of the circle) and visits the nearest points inside the circle, and the blue polygon does the same but only visits points outside the circle starting from 1 unit outside the circle. ...

The black section will have a perimeter of 2*(radius-1) grid points and the blue will have 2*(radius+1) gridpoints. Remember for example the black border has to have the same perimeter as the green because they have to move the same amount moving only down and right no matter the order they do so in. From here I will consider the full polygons around and inside the circle which would be 4 times as large as each of these quarter arcs and then subtract 4 for the 4 overlapping points. . 
Pick's theorem says the enclosed area of a polygon: A is related to the interior grid points i, and the number of points around the border b in the above way. I will use two different versions of this formula one for the blue polygon around the circle (variables sub b) and one for the black polygon (variables sub l ) and average the two formulas together to get a third. 



To make some substitutions to the bottom formula, I will suppose that the average value of the area of the (A[b]+A[l])/2 is (pi*r^2) because the outer is seemingly just as much outside the area of the circle as the inner one is inside.And I'll use 8*(radius+1)-4 for the b[b] and 8*(radius-1)-4 for b[l], and get:


Now, in our example r = 11. But see how i[b] should be all the interior points for r=11 and i[l] would be the interior points for a circle 2 units smaller in radius or r=9. So we might figure the average of i[b] and i[l] should be something close to the interior of a circle with r=10.  So substituting G[r] for the average interior and r+1 for r we get:
This figure is always too high because I took G[r] to be halfway between i[b] and i[l] but it will be actually closer to i[l] because i[b] and i[l] grow quadratically with respect to the radius of the circle.  

The question was how much more than pi*r^2 is this expression so subtract pi*r^2 from the above to get:



So it's roughly 1/4 the size of the upper bound Gauss found as r gets larger and dominates the expression.  

Beyond the part of the wikipedia article discussing Gauss's upper bound I don't understand the modern work that's been done on the subject so I don't know if this is the best that's been found or not. 




Thursday, January 16, 2014

Low Kolmorogov complexity but never repeating series?

I'm looking at the series generated by starting with n=1 and make r equal to the remainder of the sum of the digits of n when divided by 5, plus 1. Finally make n = n+r.  So n goes:
1
then the sum of the digits of 1 is 1, and the remainder when divided by 5 is 1, plus 1 is 2. n  becomes n+2 = 3.

3
7
10
12
the sum of the digits of 12 is 3 so the remainder of when divided by 5 is 3 plus 1 is 4, n+4 = 16.
16
19
20
23
24
...
[1, 3, 7, 10, 12, 16, 19, 20, 23, 24, 26, 30, 34, 37, 38, 40, 45, 50, 51, 53, 57, 60, 62, 66, 69, 70, 73, 74, 76, 80, 84, 87, 88, 90, 95, 100, 102, 106, 109, 110, 113, 114, 116, 120, 124, 127, 128, 130, 135, 140, 141, 143, 147, 150, 152, 156, 159, 160, 163, 164, 166, 170, 174, 177, 178, 180, 185, 190, 191, 193, 197, 200, 203, 204, 206, 210, 214, 217, 218, 220, 225, 230, 231, 233, 237, 240, 242, 246, 249, 250, 253, 254, 256, 260, 264, 267, 268, 270, 275, 280, 281]
Just looking at r each time gives:
[2, 4, 3, 2, 4, 3, 1, 3, 1, 2, 4, 4, 3, 1, 2, 5, 5, "1", 2, 4, 3, 2, 4, 3, 1, 3, 1, 2, 4, 4, 3, 1, 2, 5, 5, "2", 4, 3, 1, 3, 1, 2, 4, 4, 3, 1, 2, 5, 5, 1, (2, 4, 3, 2, 4, 3, 1, 3, 1, 2, 4, 4, 3, 1, 2, 5, 5, 1, 2, 4, 3, 3), 1, 2, 4, 4, 3, 1, 2, 5, 5, 1, 2, 4, 3, 2, 4, 3, 1, 3, 1, 2, 4, 4, 3, 1, 2, 5, 5, 1]
See the first 18 numbers in r almost repeat but the 18th number is "1" and the 36th number is "2", then in parenthesis is the first 22 numbers but the last number is different.

These runs of repeating numbers get longer and longer but the series as a whole doesn't repeat. For example, looking at the first 51,000 numbers the first 1,000 repeat starting at:
repeats

1800,5040,8280,11520,13320,14760,16560,18000,19800,23040,26280,29520,31320,32760,34560,37440,40680,43920,45720,47160,48960,50400
There doesn't seem to be a consistent long range pattern of these numbers repeating. But there are many interesting patters, such as if we look at when the first 10,000 numbers repeat we find:
18000, 50400, 82800,... basically 10x as spread out as the repetition of 1000 numbers, so there is a sort of fractal arrangement of runs of numbers.

Of the first 1,000,000 numbers in the series, the distribution of 1's, 2's,3's, 4's, and 5's are:
[222,223, 222,222, 222,223, 222, 222, 111,110]
So there are almost exactly as many of every number but 5, which there are almost exactly half as many.

I say this series has low kolmogorov complexity because series with lots of runs of the same numbers can be written shortly by saying when these long runs occur and writing it once, and it works on every scale on this series, but I think it never does repeat exactly which makes it interesting as well.

Here's a picture of the first million terms of r, the first 1000 on the bottom row, the next 1000 on the next row up from left to right, with 1 as black, 2 as red, 3 as green, 4 as blue and 5 as white.
Zooming in somewhere near the middle:
and zooming about 8 times further in somewhere near the middle:

Tuesday, January 14, 2014

Maps can be rectangularized maintaining borders

You can take any map, say this one of the southeast U.S....
And do what I call rectangularizing it maintaining borders. So the first step is to draw every border including the ones with the blank area of the map as straight lines. A peninsula such as Florida is made into a triangle. 
The distinct regions, in this case states can be labeled or numbered and removed from the original map. 
Now imagine you draw an infinite number of lines across this map from north to south, and group together any infinite collection of lines that cross through the same regions in the same order. For example one group will be:
Every line drawn between these two north south lines (they're supposed to be parallel but I was drawing by hand) passes through region 11, then 7, then 3, then 1. So doing this all the way across the map...
These are supposed to be parallel but I think you get the idea...
And now the next step is to do the same thing but with horizontal lines...
In this case you end with a 5x12 grid where each cell contains a part of 1 region or none at all or it is split by a diagonal line in which case you can draw extra lines and give the left half to one region and the right half to the other region. So This can be translated to a grid...

This is the rectangularized version. You can see that for instance from a part of the 8 region you can go north to get to 11 from another part you can only get to 10 from going north, etc... And I think every map can have this done to it. I'm not sure if it could lead to an easier proof of the four colour theorem or not...

Saturday, January 11, 2014

driveby

I took a video of driving past these five houses, an individual frame of the video looked like:
And I took the single middle column from each frame and put them together into one image to get:
So the individual column on the far right was actually taken a minute later after driving down the street than the one on the far left.

Wednesday, January 1, 2014

Bearing/Distance curve

Suppose a curve C has a certain starting point in a chosen coordinate system. For example -3, 2 in Cartesian coordinates.
My idea was that you could have a Bearing/Distance plot that for a curve without discontinuities takes the form of another smooth curve Bd

The distance is an amount d that is the arclength of the curve C, and the bearing varies mod 2 between 0 and 2 and indicates the direction the tangent line to the curve C is pointing when the arclength equals d.
The bearing direction is mapped as follows.
 But any direction within the range -inf..inf is valid the direction is mod 2, but a value of 6 might indicate that you've turned a full circle 3 times. So Bd generates a curve C as shown.


See the red curve C starts heading in direction 0 (also direction 2) but rapidly turns it's bearing until it is facing in the 1 direction, stays heading in that direction for about 3 arclength and then gradually turns until it is not quite facing in the 0 or 2 direction.

I think that one nice thing about this setup is that because straight lines in the Bd plot generate circles of varying diameter, the curvature of the C plot at a certain point is the slope of the Bd plot at the corresponding point, with decreasing curvature in the C plot corresponding to a flatter line in the Bd plot.

Tuesday, December 24, 2013

Gas law cooler

I was thinking of a setup like this:
Basically a pump, it could be run with an engine but I show it here with a foot pump, connected through an insulative container and to an array of very thin thermally conductive tubing. there is an opening on the top of this tubing so water can fill it, but it is thin enough that when air is pumped into it the air replaces the water in the tubing without forming bubbles. It was hard to diagram but the tubing has to be arranged so when no air is coming out of the pump water can fill the tubing, so it would be more horizontal and on a slant. The volume of the tubing is the same as one cycle of the pump, let's say 1 Liter.
The operation is that the pump presses one time, forcing air to fill the tubing, which forces the water out, then as the pump is refilling with air from the outside water drains into the tubing and the air that was in the tubing exits from the exhaust tube. Then this repeats. This gradually cools the water.
The reason it cools the water is the pump has 1 liter of air and the tubing also holds 1 liter of air. But there is much more surface area over the tubing so the pressure of the air drops as it fills the tube. This is because pressure is a force per area and the force doesn't change and the area increases so the pressure drops.
by the ideal gas law:
 Since n and R on the right side are constant, and the volume remains constant, if the pressure drops the temperature also has to drop. I figure for the shape of the pump and tubing the pressure could drop 1/20th so it should be efficient in it's cooling.

**Edit**
I think maybe an even better design would be with a motorized pump that's fast enough to keep the tubing from filling with water, and have the exhaust pipe connected back to entry of the pump so the same air is cooled over and over, the pump would be built so it could radiate heat well to the outside air when it pressurizes the air coming into it.

Tuesday, December 3, 2013

Minimum amount of energy burned to break a sweat

Looking on the internet, the specific heat of the body is about 3470 Joules/ kg*C and the body raises temperature by approximately 1 degree Celsius as you raise your core temperature through exercise to the point where you are sweating. There are also 4184 joules per dietary calorie. And there are 2.2 pounds per kilogram. So the amount of dietary calories you burn by raising your body temperature to the point where you sweat is:
3470 (Joules / kg*C) * (1 calorie/4184 Joules)(1 kg / 2.2 pounds)*(1 degree Celsius delta temperature)  =
.37 (calories/pound)

So a 200 pound man burns .37*200 or 74 calories going from resting temperature to a sweat at the minimum. Really it will be higher because some of the heat generated is radiated away from the body and doesn't go towards raising the temperature of the body. Also there is an efficiency to burning calories and doing work in the physics sense, this 74 calories is just the waste heat, you will be using some calories to propel your body if your running or moving a weight if your lifting weights. Also there may be a caloric cost for the body to initiate the sweating process, I'm not sure if it's significant though.

So I believe this is why interval training works so well for losing weight, because if this 200 pound person over a period exercised to the point of sweating then let himself cool back down to normal and then repeated 10 times that would be at a minimum 740 calories. This could probably be done over an hour where you jog or run fast enough to break a sweat 10 times alternating with cooling down. Compare this to continually jogging for an hour only burns 640 calories for a 200 pound man.


I think an analogy might be to think of boiling water, it takes a very high heat to get water to a boil, but once it's boiling the heat can be turned down to maintain a boil. It may be that the body expends a lot less energy to maintain a sweat and keep the body temperature up than it does to get to that temperature in the first place. So to use the most energy you would heat the water to a boil, then cool it off, then repeat. And it seems to actually be the same for exercising that getting to a sweat through exercise then allowing your body to cool and repeating actually seemingly paradoxically uses more energy than solidly exercising over the same interval. And of course it takes a lot less effort because you are resting a good percentage of the time.