View Full Version : In London, you are never more than 5m away from a rat. [warning: maths?]
Paradigm^
03-09-2005, 05:37 PM
www.hungryrats.com gave me that tidbit of information. You may have seen the adverts around the Tube if you live in London and use the Underground every now and then.
Conditioned by a year of University maths (which I will soon be returning to) and the engineer's desire for efficiency, I got to thinking: what would the most efficient spacing distribution of rats in an arbitrary area to ensure that the above statement is true? (God, I'm sad.)
Turning the idea on its head, I figure that each rat has an operating locus of a circle with radius 5m around its centre. Anyone within that circle would be within the required 5m range of that particular rat. Therefore it is simply a case of arranging circles of radius 5m in an arbitrary space to ensure that the entire area is covered with the least overlap possible. Clearly circles do not tesselate so there is no 100% efficient answer, but what is the best way to go about it, geometrically speaking?
Yes, I know. Saddest. Topic. Ever.
mrikasu
03-09-2005, 05:44 PM
Surely this needs to be done in 3D in order to fit with the problem.
Most of the rats are underground, at different levels etc.
Could get exponentially more complex if we add stuff like this but just a thought.
In response to the orginal problem, I think a hexagon is the most circle like shape that tesselates, any larger regular polygons require other shapes in order to tesselate.
Snoon
03-09-2005, 05:44 PM
ah, of course !
Paradigm^
03-09-2005, 05:49 PM
mrikasu: true, but considering I haven't seen any rats hanging in midair in my travels around London, I think it's probably safe to assume 2D.
This page (http://www.7stones.com/Homepage/Publisher/rrRotate.html) details the closest packing of circles in both 2D and 3D, but that's not quite what we want - we want the reverse, minimal overlap as opposed to minimal gaps between the two.
Chassisbot
03-09-2005, 06:10 PM
It says never more than 5m, not exactly 5m. Therefore as long as there are no gaps between the circles, it shall be accurate.
Paradigm^
03-09-2005, 06:14 PM
Oh, read the bloody thread Chassisbot.
renatzu
03-09-2005, 06:22 PM
Sarchasm, I love you. You're just as pathetic as I am.
I'd go with the hexagons, with a rat at every corner and 1 in the center. I am so sad I actually have out my ruler, protractor, and compass and I'm going to figure this out. Be back in a minute.
You are ultimately trying to undo what hungryrats.com already did. They can't actually know the location of rats, so they must have simply evenly spaced them across all of London. This likely shows that they used square metres to equate it, and rats generally stick together, so you are surely far away from a rat in some areas, say a newly renovated/ exterminated apartment. I dont expect you to take my word for it, as I have little experience with rats. I live in Alberta, Canada and rats are outlawed here (seriously). So, mail all of the dead rats you can find to my address and we'll split the procceeds. Don't try to keep the rats from decaying, my postal service deserves it..lazy bastards... Anyway, to understand how many rats hungry rats.com thinks there are in London, simply figure out the size of the city, and so on.
Tiggs
03-09-2005, 06:25 PM
As there are always going to be gaps in between the circles which need to be filled, the most efficent way of doing this would be to make those gaps as big as possible, but no larger than 5 meters radius. This would mean that each extra rat put in to fill a gap would have as large an area to its self as possible.
http://img367.imageshack.us/img367/5277/untitled14ju.png
Paradigm^
03-09-2005, 06:31 PM
Philbob, that's actually a very good way of thinking about it. Your diagram shows a square formation - is that just for example, or are we to believe that that's the most efficient way? If so, why so?
renatzu
03-09-2005, 06:33 PM
I've done it! There should be tesselating hexagons with a rat at each corner and at the center. The distance from the center of the hexagon to each corner should be 5 times the squre root of 3 meters, or approximately 8.66m. The perpindicular distance from the center to a side is 10m. I'm still trying to work out how much area is wasted, I might not be able to.
That could mean there are 2 rats in 5 metres Philbob. Invading the circle!!
Inverse
03-09-2005, 06:40 PM
That could mean there are 2 rats in 5 metres Philbob. Invading the circle!!
Nobody said that 2 rats within 5m of each other would cause some sort or reality imbalance :p
renatzu
03-09-2005, 06:43 PM
The set of hexagons can be broken up into a bunch of equilateral triangles, each with a side length of 8.66m and a rat at each corner. Each of these triangles has an area of 25 times the square root of 3, or 43.3m. I'm trying to figure out how much of each triangle is overlap. That divided by (25 times the square root of 3) and times 100 will get you the percentage of the area that is overlap.
In order to determine the overlap imagine a line 8.66m long. At each end is the center of a circle with a radius of 5m. As you can see, they will intersect. The area of this intersection times 1.5 will get you how much overlap each triangle has. Unfortunately, this is beyond my math skills. Sarchasm or someone else, maybe you'll know how to do it.
Tiggs
03-09-2005, 06:51 PM
Philbob, that's actually a very good way of thinking about it. Your diagram shows a square formation - is that just for example, or are we to believe that that's the most efficient way? If so, why so?
Sorry, I forgot to put in the last bit in. Yes it is a square formation, as that gives the widest spacing I can think of while still having the sides of the circle touching
The set of hexagons can be broken up into a bunch of equilateral triangles, each with a side length of 8.66m and a rat at each corner. Each of these triangles has an area of 25 times the square root of 3, or 43.3m. I'm trying to figure out how much of each triangle is overlap. That divided by (25 times the square root of 3) and times 100 will get you the percentage of the area that is overlap.
In order to determine the overlap imagine a line 8.66m long. At each end is the center of a circle with a radius of 5m. As you can see, they will intersect. The area of this intersection times 1.5 will get you how much overlap each triangle has. Unfortunately, this is beyond my math skills. Sarchasm or someone else, maybe you'll know how to do it.
Wouldn't that still leave some gaps? I've been trying to draw it to visualise it, but no luck so far. Will keep working on it.
Ste150
03-09-2005, 06:58 PM
Going back to the 3D part of the problem mentioned earlier, and how it was dismissed because rats dont float in mid-air:
There are a lot of people in london above ground level. By more than 5 metres. (Think skyscrapers etc)
So are they counted or are we doing a USA government and ignoring information we dont like?
renatzu
03-09-2005, 07:08 PM
Wouldn't that still leave some gaps? I've been trying to draw it to visualise it, but no luck so far. Will keep working on it.
I can't scan in my drawings, but I made a representation in paint. Bear in mind that paint is shit, so it's not exact. Those blue lines are approximately the center of each side. The red dot is approximately the center. The red lines are the circles, however I didn't use the circle tool. I just approximated where they intersect the triangle and used the curve tool. So basically remember it's just a sketch, and not as neat as the real thing I have on paper. However, it should show you what I'm talking about.
http://img366.imageshack.us/img366/4994/triangle0zo.png
The 3 corners are the centers of 3 circles. Each red arc is supposed to be the arc of a circle (in this case it's a 60 degree arc). You might also be able to see from this how I got my formula for determining overlap.
Tiggs
03-09-2005, 07:12 PM
I think you win on this one renatzu
http://img274.imageshack.us/img274/1162/untitled36li.png
I havent bothered to do any calculations, but on visual inspection your's looks to have a lot less overlap than mine
edit: Ignore the red and green lines, they were just for construction and I couldn't be bothered to get rid of them
Midget
03-09-2005, 07:12 PM
this thread is a fucking mind blow :eek:
wikkybikky
03-09-2005, 08:00 PM
wow !! this thread is something else !! i am very impressed by all of you guys...even though it is all pretty much gibberish to me ( maths is certainly not my strong point) it is still an intersesting insight into how you mathematically minded types figure shit out. :notworthy
It becomes very simple once you think about it in a simple way. You must imagin that inside the circle there is a square with the opposing sides the same distance away as the side of the radius. Then you have to line up these with opposing circles, and that will show the minimum distance between circles. In a nutshell there are imaginary corners in a circle that have to meet with the circle next to it. I whipped up something really simple on paint that accurately conveys my idea:
http://x4.putfile.com/9/24514582491.gif (http://www.putfile.com)
Has anyone figured out how many square metres there are in London yet?
Discodoris
03-09-2005, 08:21 PM
I would have intuitively gone for the equilateral triangle/hexagon spacing, mainly because I was aware of this for crop spacing purposes. For those grousing about the 3D aspect, it elegantly transforms into 3D by the use of equilateral pyramids...
Paradigm^
03-09-2005, 08:22 PM
Get with the times, T3-X, it's hexagons that are in now :p
Fade Away
03-09-2005, 08:29 PM
Wtf is going on..
wikkybikky
03-09-2005, 08:33 PM
Wtf is going on..
just smile and nod dude...that got me through 12 years of school and 1 year of business maths in college!
Ste150
03-09-2005, 08:37 PM
The area of london is 625 square miles.
Which sounds a lot to me, but google told me so.
Paradigm^
03-09-2005, 08:37 PM
We're trying to find the most efficient solution to the problem of spacing rats in two or three dimensions such that the distance from any arbitrary point in two or three dimensional space respectively to the nearest rat is always five metres or less.
Duh.
The area of london is 625 square miles.Greater or Central? I would imagine the rat density is lower in the suburbs.
I'll get to work on a calculation of the wasted area.
captain canuck
03-09-2005, 08:42 PM
there should be a simple way to resolve this (in either 2 or 3d) using differential calculus, that would just result in a number, no need for diagrams. but i can't be bothered to try to recall what it was, even though i do have a BSc in Math (Calculus and Applied Calculus mostly).
I'm trying to avoid the geometry of it because I was stronger in non-Euclidean geometry than in the planar form. :p
renatzu
03-09-2005, 08:46 PM
The area of london is 625 square miles.
Which sounds a lot to me, but google told me so.
Well, that would be (roughly, I know London isn't a perfect square) 25 miles * 25 miles. It's been a while since I've been to London, but I remember it being pretty big.
Ste150
03-09-2005, 08:50 PM
25 miles * 25 miles. It's been a while since I've been to London, but I remember it being pretty big.
I hadnt thought about it like that. I think im slighty too tired to be logical.
Paradigm^
03-09-2005, 08:50 PM
At the moment I'm just using straight geometry and I suspect a bit of trig will come into play shortly.
GOT IT! I'll just play with the maths and write it up.
due to sarchasm's cheeky (but respectful) retort to my original design, I have redone the circle into hexagon:
http://x4.putfile.com/9/24515502265.gif (http://www.putfile.com)
There is clearly less overlap space, but in fairness i was using my original model in relation to my first post. I decided to see if more sides would make the sphere more efficient, but the octagon had much more overlap, even more than the square, in some places. The next question is what is the most efficient 3-D shape?
renatzu
03-09-2005, 09:16 PM
due to sarchasm's cheeky (but respectful) retort to my original design, I have redone the circle into hexagon:
http://x4.putfile.com/9/24515502265.gif (http://www.putfile.com)
There is clearly less overlap space, but in fairness i was using my original model in relation to my first post. I decided to see if more sides would make the sphere more efficient, but the octagon had much more overlap, even more than the square, in some places. The next question is what is the most efficient 3-D shape?
Octagons don't work because they don't tesselate perfectly. As for 3-D, you could make the hexagons 3-D by creating equilateral triangle pyramids.
Paradigm^
03-09-2005, 09:30 PM
Right, here goes.
My overall method is to calculate the overlap area per triangle; this means it can just be multiplied up and scaled around easily. Basically, the area wasted per triangle is the area covered by three sixths of a circle (i.e. half, but you can see that it's three 1/6 sectors of different circles that cover each triangle), minus the area of the triangle itself.
This is when the maths gets nasty. I'm going to keep it in terms of pi right up until the final stages, so you can see where I'm going.
Start by calculating the distance between the two points where any two circles overlap. These points are at the centres of the triangles (you can see from Philbob's picture). This bit is easy; the circles are radius 5m, the triangles are equilateral, so the distance from point to point is also 5m. The line between these points intersects the line of the triangle at exactly halfway, so the distance from the centre of any triangle to the centre of an edge is 2.5m.
Now to put to good use a handy fact about triangles: the distance from the centre of an edge to the centre of the triangle is half the distance from the centre of the triangle to the opposite corner. We already have the distance from edge -> centre, so we can deduce that the height of any triangle is 7.5m.
Now we have a right-angled triangle where our 7.5m is the height of the (equilateral) triangle, the base of our RA triangle is half the base of the equi, and the hypoteneuse is one side of an equi (i.e. our RA triangle is just half an equi). From this we can use basic trigonometry to show one side of the equilateral triangle is 7.5/sin60.
From this the area follows by 1/2 ab sin C; thus the area of an equilateral triangle is 28.125/sin 60 m².
Hooray, first part done! Now onto the much easier bit, calculating the area of half a circle (three sixths, remember?) - simply 25π/2 m². So the total area covered by three circles on any triangle is 12.5π m².
Area of a triangle? Check: 28.125/sin 60 m²
Area covered by three separate sixth-sectors of different circles over one triangle? Check: 12.5π m²
Subtract the first from the second and you get the total wastage for one triangle, which is...
*drumroll*
6.793955528m²
This works out to be approximately 21% of each triangle going to wasted overlap.
I'll leave you guys the fun of calculating the number of rats needed to cover London, and the total wastage for London - should be piss easy from here.
I'm going to take a well-earned rest now!
I am just barely grasping onto what he is saying, but for just entering grade 11 math, I supposed I am doing pretty well
also: I dont have my super-calculator on me, so I cannot convert the feet into metres and still maintain laziness. Someone else will have to do this for me, but I got the formula:
a=area (duh)
(a{london}/10m{squared})= the likely way hungryrats.com did it/number of rats in London (assumed) 10m was used in the hungryrats.com calculation, might be 5m
And the way Sarchasm likely wants us to do it:
a{london}/(a{circle}/.79)= fancy number of rats in London/way obsessed people do it.
My brain is still in a jumble from Sarchasm's post, I am rusty from summer, and I tend to screw up a lot in math, despite good intentions, so please feel free to point out any screwups
GorillaBearBear
03-09-2005, 11:15 PM
Sorry, but before I add anything useful here, I just want to say:
• The fleas carried by rats were responsible for causing the Black Death that killed over a quarter of the UK population
That made me lol. It killed over a quater of the British Population OMG! yes, but that was in 1667 (the second time around at least, I think, the first time I think was in the mid 1400s, which is even sillier) When they had no cure, thought it was a plague from God and medicine pretty much consisted of a curious man with a rusty spoon. The bubonic plague is easily recognisable, and pretty easily cured as well. I mean, yes it's nasty, but it's just silly putting that their.
Having said that, that is pretty gross
renatzu
04-09-2005, 05:37 AM
Right, here goes.
<awesome math stuff>
Find the area of the circles and subtract the area of the triangle, I can't believe I didn't see that. I'm pretty rusty.
Mr. Rafson would expect better from me :p
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.