190Assignment2: Difference between revisions
mNo edit summary |
m 1 revision(s) |
(No difference)
|
Latest revision as of 22:35, 8 March 2008
1. (Mindscape 3, Chapter 4.2 of text). Draw the floor plan of an art gallery that has 10 corners and needs exactly 3 guards. Now draw the floor plan of another gallery with 10 corners that needs fewer than 3 guards. How many guards do you need for a gallery with 12 vertices? With 13 vertices? With 11 vertices?
Building on the museum shown in figure two, the least number of guards a museum with more than 2 vertices needs is only one guard.
2. . (Mindscape 16, Chapter 4.4 of text). Make your own Escher-like tiles that can cover the plane. Begin with the square pattern and deform the top edge a bit. Why does that require that the bottom edge also be modified? How does that change all the tiles? Note how a change to an edge propagates to every tile in the plane. Distort the square tiles to become Escheresque fanciful shapes.
The bottom edge has to be modified as well as the top edge because the top edge of one tile will be the same as the bottom edge of the tile directly above it. A change in one edge will be translated to all corresponding edges along the plane.
3. (Mindscapes 16,17,18, Chapter 2.1 of text). What proportion of the first 1000 natural numbers have a 3 somewhere in them? What proportion of the first 10,000 natural numbers have a 3 somewhere in them? Why do almost all million-digit numbers have a 3?
This problem could be easily and accurately done with a computer program. Thinking through it logically though, for the first 1000;
- There will be 100 three digit numbers starting with three.
- In every other set of 100(of which there are 9x), there will be 10 3's from the "30's".
- There will be 9 other places for each set of 100 where there is a 3.
Adding this up for the first 1000 natural numbers (not including 0), 100 + (9 x 10) + (9 x 9) = 271.
The same logic can be applied to larger ranges.
An example of a simple Java program to solve the same problem is :
int counter = 0; int n=1000; String s = ""; for(int i = 0; i<=n; i++){ s = "" + i; if(s.contains("3")){ counter++; } } System.out.println(counter);
This gives outputs of
Up to: No of digits with 3 proportion 1000 : 271 0.271 10000: 3439 0.3439
As the number of digits making up a number increases, there is an increasing proportion of numbers containing a 3. This can be clearly seen in the first 10 numbers.
For the first 10 numbers there is only one containing a '3'. The first 100 numbers can be thought of similarly where 3 would relate to all the 30's , 4 to all the 40's and so on. There is the same 1/10th of numbers containing a three as well as one three for every other 10. One way of understanding this is; Every time the length of a number increases by one digit, each pure number is split into 10 bits with only 9/10's purity.
4. If you took every hair on your body and laid it end-to-end, how far would it stretch? Would it reach Australia? The moon? The Bombay Hills? The Harbour bridge? How much variation do you think there would be between individuals?
Using estimates taken from "http://www.salonweb.com/chem/", "Human beings have about one million and four hundred thousand hairs on their body". "These hairs include about one hundred thousand hairs on the head".
Measuring the hair on my head to be approximatly 3cm and the hair for the rest of my body to be an average of 0.3cm. This makes 100,000x3 + 1,300,000x0.3 =690,000cm or 6.9km. This would not reach accorss Auckland let alone reach Australia.
There would be a lot of variation in this length. The quantity of hair on a person and the average length of hair for different people can vary to a great degree.