Approach:
Let’s see how much an
electron weighs. Then let’s see how many electrons you can pack into a pixel.
Assumptions: Pixels and
electrons have the same density. Electrons are spherical and exist in a
classical non-quantum state. OK, now we’re getting a bit pretentious.
Electron mass:
Mass: 9.1093897e-28 grams
Volume of an electron:
Radius r = 2.817e-15 meters
r^3 = 2.2354273e-44
Volume v = (4/3)*(22/7)* r^3
V = 9.3675047e-44 m3
Volume of a pixel:
Size of a pixel in meters: 0.0002645833333333 m
Radius of a pixel: 0.00013229166666665 m
Volume of a pixel: 9.7019903768286348566027336666667e-12
Number of electrons in one pixel:
9.7019903768286348566027336666667e-12 / 9.3675047e-44
= 1.0357070199098629602612031426754e+32
Weight of a pixel:
1.0357070199098629602612031426754e+32 * 9.1093897e-28 grams = 94346.588g
This doesn’t make sense. According
to these calculations, a pixel "weighs" 94 kilograms. Or I weigh around 1.21 pixels. Sigh. It’s about the approach anyway. Can you imagine two electrons
being next to each other? No.
PART TWO / Approach TWO:
I really need to get some sleep but here's the deal. A gram of hydrogen weighs 6e23 atomic mass units and has a radius of 53pm (5.2917721092e-11 meters). In other words, each atom of hydrogen:
Or a pixel can contain 15624065939981765942.95081025031 Hydrogen atoms or weighs 2.6 kilos. Well, this is better than 94 kilos.
So where did I go wrong in both approaches
1. Assuming that electrons exist in a non-quantum state and can be a perfect sphere = incorrect.
2. A pixel is a point in a 2-dimensional space (I am going to have nightmares about Bresenham's algorithm tonight). Assuming it's a spherical object is incorrect. So 4/3*pi*r^3 is wrong. I should've stuck to pi*r^2
3. Pixels don't share density with either electrons or hydrogen atoms.
Repeating the exercise (Approach TWO) with the pixel being considered to be a circle (same goes for atoms) will give us another nonsensical answer:
Area of a hydrogen atom: 8.8008963603650623991725714285714e-21 cubic meters
Area of a pixel: 5.5003410218240109126984127857143e-8 cubic meters
Number of hydrogen atoms you can place on a pixel: 6249750930592.5470593805517430065
This just pains me but all those atoms will "weigh": 1.0459170673878267650473372280681e-14 kilograms
Or not a lot actually. This sounds more plausible. Obviously, you won't need these stats but I think it's OK to make a couple mistakes and stumble on to approach two faster than I did. As incredibly ridiculous as the question is, the idea is to take something known and apply it as well as possible to something that's not easily fathomed. Or something.
Now, I can get some sleep. Freaking rasters. And bitmaps. And circles. And Bresenham.
PART TWO / Approach TWO:
I really need to get some sleep but here's the deal. A gram of hydrogen weighs 6e23 atomic mass units and has a radius of 53pm (5.2917721092e-11 meters). In other words, each atom of hydrogen:
- weighs: 1.008u or 1.673534e-27 kilograms
- has a volume of 6.2096450527652839378745400857812e-31 cubic meters.
Or a pixel can contain 15624065939981765942.95081025031 Hydrogen atoms or weighs 2.6 kilos. Well, this is better than 94 kilos.
So where did I go wrong in both approaches
1. Assuming that electrons exist in a non-quantum state and can be a perfect sphere = incorrect.
2. A pixel is a point in a 2-dimensional space (I am going to have nightmares about Bresenham's algorithm tonight). Assuming it's a spherical object is incorrect. So 4/3*pi*r^3 is wrong. I should've stuck to pi*r^2
3. Pixels don't share density with either electrons or hydrogen atoms.
Repeating the exercise (Approach TWO) with the pixel being considered to be a circle (same goes for atoms) will give us another nonsensical answer:
Area of a hydrogen atom: 8.8008963603650623991725714285714e-21 cubic meters
Area of a pixel: 5.5003410218240109126984127857143e-8 cubic meters
Number of hydrogen atoms you can place on a pixel: 6249750930592.5470593805517430065
This just pains me but all those atoms will "weigh": 1.0459170673878267650473372280681e-14 kilograms
Or not a lot actually. This sounds more plausible. Obviously, you won't need these stats but I think it's OK to make a couple mistakes and stumble on to approach two faster than I did. As incredibly ridiculous as the question is, the idea is to take something known and apply it as well as possible to something that's not easily fathomed. Or something.
Now, I can get some sleep. Freaking rasters. And bitmaps. And circles. And Bresenham.
Ok, great answer, that is, for an answer you don't give in an interview.
ReplyDeleteQuestion is, how do you come up with this answer without #1 a calculator #2 without in-depth knowledge of electron weights etc... #3 In less than 4 minutes?
:-)
It's supposed to be an attempt at humor and let the reader think about their own response. A shorter answer would be: How many hydrogen atoms can I fit in a pixel?
DeleteWeight of one hydrogen atom: 1AU
Size of one hydrogen atom: 53pm (round to 50pm).
Approximate how many hydrogen atoms you can fit in a pixel.
How big is a pixel you ask. That's your first question to the interviewer: What size display are we considering and what's the resolution? Or to be safer, you can go in with a "May I use assume a display with X resolution and Y size" and approximate the size.
It's not at all about the numbers but your approach :) God I even forgot I wrote this stuff...
Ok, great answer, that is, for an answer you don't give in an interview.
ReplyDeleteQuestion is, how do you come up with this answer without #1 a calculator #2 without in-depth knowledge of electron weights etc... #3 In less than 4 minutes?
:-)
Pixel is the name of Google phone, so u can come up with an analogy of knowing the dimensions of other phones etc, blah blah blah
ReplyDeletePixel = picture element. This is what you're looking for: https://en.wikipedia.org/wiki/Pixel Not a Google phone.
Delete