Java code for learning stuff about Pulmonary embolism

java-coffee-14303

Pulmonary-Embolism program:

Below I present a program I wrote that examines your knowledge about pulmonary embolisms. It also includes an exercise to calculate a wells-score of a randomized patient.

I am especially proud on the randomization aspect:

You can use the site: ‘ http://browxy.com/ ‘ to run the program if you don’t have a compiler yourself. If you have suggestions to improve the program, I would be very glad to hear.

70495w

The code:
import java.util.Random;
import java.util.Scanner;

public class PulmoneryEmbolism {

public static void main(String[] args) {

Scanner input = new Scanner(System.in);

System.out.println(“Type in the symptoms of Pulmonary embolism”);

input.nextLine();

System.out.println(“Symptoms: Notoriously mild! Rapid dyspnea at rest or with exertion (73 percent), Pleuritic pain (44 percent), Cough (37 percent) , Orthopnea (28 percent),  “);
System.out.println(“Symptoms: Calf or thigh pain and/or swelling (44 percent), Wheezing (21 percent), Hemoptysis (13 percent)”);
System.out.println();
System.out.println(“Type in clinical findings of pulmonery embolism”);

input.nextLine();

System.out.println(“Low specificity, ++JVP, tachypneu, tachycardia, leg-swelling, abnormal lung sounds, hypotension  “);

System.out.println(“Differential diagnosis”);

input.nextLine();

System.out.println(“Pneumonia, pneumothorax, pleuritis, rib fracture, pleural effusions (blood), pulmonary vascular disease such as vasculitis, interstitial lung disease, congential heart, COPD exacerbation “);

System.out.println(“Type in diagnostics of pulmonery embolism”);

input.nextLine();

System.out.println(“Diagnostics: sat%, CBC, ABG, D-dimer, X-thorax (for other findings), CTPA, V/Q, contrast ct, leg-echo “);

System.out.println(“Type in at risk populations”);

input.nextLine();

System.out.println(“Malignancy, pregnatn, stroke, hospitalized patients, surgery, neurological disease, thrombotic disorders (obesity,smoking,hypertension)”);

System.out.println(“Type in treatment of stable PE”);

input.nextLine();

System.out.println(“Treatment: O2, hemodynamically stable, anticoagulation (heparin), “);

System.out.println(“Type in treatment of unstable PE”);

input.nextLine();

System.out.println(“Treatment: O2, hemodynamically stable, anticoagulation (heparin), “);

System.out.println(“Complications”);

input.nextLine();

System.out.println(“Right-sided heart failure, “);

System.out.println(“What is the goal of testing D-dimer”);

input.nextLine();

System.out.println(“You can only exclude”);

System.out.println(“Type in the Wellscriteria”);

input.nextLine();

System.out.println(“You score the Wells-criteria according to the following rules”);
System.out.println();
System.out.println(“For clinical symptoms of DVT: +3”);
System.out.println(“For PE is #1 Diagnosis: +3 “);
System.out.println(“If heartrate >100: +1.5”);
System.out.println(“If immobilisation for at least 3 days: +1.5”);
System.out.println(“For surgery in previous 4 weeks: +1.5”);
System.out.println(“For previous DVT: +1.5”);
System.out.println(“For hemoptysis: +1”);
System.out.println(“Malignancy in last 6 months: +1”);
System.out.println(“These are the 8 wells criteria”);
System.out.println();
System.out.println(“Are you ready for the patient? “);

String yesorno = input.nextLine();
System.out.println();

if (yesorno.equalsIgnoreCase(“YES”)) {

Random a = new Random();
Random b = new Random();
Random c = new Random();
Random d = new Random();
Random e = new Random();
Random f = new Random();
Random g = new Random();
Random h = new Random();

int aa = a.nextInt(2);
int bb = b.nextInt(2);
int cc = c.nextInt(2);
int dd = d.nextInt(2);
int ee = e.nextInt(2);
int ff = f.nextInt(2);
int gg = g.nextInt(2);
int hh = h.nextInt(2);

double aaa = 3.0 * aa;
double bbb = 3.0 * bb;
double ccc = 1.5 * cc;
double ddd = 1.5 * dd;
double eee = 1.5 * ee;
double fff = 1.5 * ff;
double ggg = 1.0 * gg;
double hhh = 1.0 * hh;

double score = aaa+bbb+ccc+ddd+eee+fff+ggg+hhh;

System.out.println(“The patient has the following: “);
if (aa == 0) {System.out.print(“No clinical symptoms of DVT. “);}                             else {System.out.print(“Clinical symptoms of DVT. “);}
if (bb == 0) {System.out.print(“PE is not #1 in the differential diagnosis. “);}             else {System.out.print(“PE is #1 Diagnosis in differential diagnosis. “);}
if (cc == 0) {System.out.println(“Heartrate is under 100. “); }                             else {System.out.println(“Heartrate is above 100. “);}
if (dd == 0) {System.out.print(“No immobilisation. “); }                                     else {System.out.print(“Immobilisation for at least 3 days. “);}
if (ee == 0) {System.out.print(“No surgery in previous 4 weeks. “);}                         else {System.out.print(“Surgery in previous 4 weeks. “);}
if (ff == 0) {System.out.print(“No previous DVT. “);}                                         else {System.out.print(“There is previous DVT. “);}
if (gg == 0) {System.out.println(“No hemoptysis. “);}                                         else {System.out.println(“Hemoptysis. “);}
if (hh == 0) {System.out.print(“No malignancy in last 6 months. “);}                         else {System.out.print(“Malignancy in last 6 months. “);}
System.out.println();
System.out.println();
System.out.println(“What is the score?”);

double answer = input.nextDouble();

if (score == answer) {System.out.println(“Well done”);} else
{System.out.println(“Try again”); double answer2 = input.nextDouble();
if (score == answer2) {System.out.println(“Well done”); } else { System.out.println(“Again wrong, the score was ” + score);
}
}

} else {System.out.println(“Lame”);

}
}

}

 

Finding Fictitious Forces

I suggest to first read ‘The Story of the Fake Forces’ before reading this blogpost.

General approach to finding Fictitious Forces. 

If there is no force on an object, it either stays at rest or it will move at the constant velocity in a straight line. This is basically in other words: If nothing happens, nothing will change. If there is no cause, there is no effect. That is the first law of Newton. This means that if you see an object going at a constant velocity along a straight line, you may conclude that there is no force acting on it… Or can you?

image
On which object is acting a force?

 

Fictitious forces

Fake forces arise in accelerating experiments. If the experimenter is (unknowingly) undergoing an acceleration, he will see curved inertial paths.

image2
Performing the same experiment as above, but while accelerating.

So if your data are curved paths, are the samples or is the experiment being accelerated?

Mass Independence

Most important clue to take away: If different mass doesn’t change the acceleration, there is a fictitious force. I will make another post stressing this last statement. Try to make yourself convinced why this is the case in the mean time. Because it is central in a jaw-dropping insight about that which holds the solar system together.

hcvgegs
A fictitious force (inertia) is pushing the vehicles against the wall.

The central essence:

Observing a curved path would make you conclude that the object is being accelerated and thus has a force acting on it. However, this is only the case if you make sure the observer is not being accelerated. If you are being accelerated, even inertial paths (no-force paths) will be curved.

An accelerating observer will only see straight lines if that object has the same acceleration as the observer. The new straight lines are being made by that which is accelerated at the exact same rate as the observer. In an accelerating frame a curved path can be an acceleration and thus a force, OR an inertial path.

How do you differentiate between these two? Check if these paths are independent of mass! The acceleration caused by a force is always dependent on the mass. This sounds a bit theoretical, but try to accelerate a car versus a shopping cart. The same forces produces different accelerations. This is obvious everyday physics.

 

Algorithm
Algorithm in finding a force

Statistics: Random Variables

coloreddice
Random variables

Random variables are at the core of statistics. I had a hard time truly understanding what these are, since they are not at all like normal variables e.g. in ‘y=ax’.

I now see them as ‘dices’. A random variable X does not have a value, but has

  1. Multiple possible values &
  2. A probability distribution

In that sense I think the name Random Variable feels wrong. Some books say that Random Variables are actually ‘functions’. They ‘assign’ numbers to ‘events. Maybe, but even as a function it still feels wrong. Functions have something deterministic about them and random variables not. A better name would be the Random Set X.

img45
Visualisation what a Random Variable does (X is Random Variable)

For example, the ‘Random Variable’ of a coin is:

random-variable-1

Its distribution would be:

image-1-heads-1-coin-toss
Surprising probability distribution of a coin toss.

So as I said, random variables are at the core of statistics. We measure them, we want to know their probability distributions and their values in different circumstances.

Another example is dice. It has:

  1. As possible values: 1,2,3,4,5,6
  2. As a probability distribution:

central-limit-theorem

One dice has as probability distribution that is somewhat constant. If you add dices you see that something interesting happens: it converges toward a ‘gaussian’ curve. This is called the ‘Central Limit Theorem’ and is very important for statistics. I will make another post about this interesting statistical concept. If you play ‘Settlers of Catan’ you will probably recognize the second probability distribution. Satan himself created ‘The Robber’-rule when you throw 7.

kewadin20casino20floor20pano20cr20and20res
A common place where humans like to play with Random Variables.

The four essential Random Variables in common statistics are:

  1. The Z-variable with the standard normal distribution.
  2. The t-variable with its t-distributions.
  3. The χ2-variable (Chi-square), with it’s χ2-distributions.
  4. The F-variable with its F-distributions.

I will make posts about each of them in detail. Here I quickly gloss over the details:

The t-, χ2– and F are all derived from the Z-variable.

The χ2-Random Variable is a sum of squared Z-variables

The F-variable is a ratio of χ2-variables.

The t-variables is a special case of the F-variable.

cat
Schrödingers cat is a Random Variable!

What’s the point?

So what is the point of these theoretical variables? Measuring in science is inherently random. Examples are, percentage females in a bus, the length of the next customer, the amount of money in someones wallet. In modeling this, we use appropriate versions of the above four Random Variables and more. They are utilized in so called ‘parametric testing’, which makes assumptions about the distribution of the variable.

Example

Measuring the length of a person is a random variable. It has certain values (between 10 cm to 230 cm) and it has a distribution. The distribution is approximately normal and so this random variable can be modeled with the z-variable, which also has the normal distribution.

 

The story of the Fake Forces

Mysterious mine shaft force.

Some miners noticed that when they dropped an object down the mine shaft, it never reached the bottom. This confused them, where did these objects go? Careful examination revealed that the objects were stuck in the mud somewhere along the side of the mineshaft.

The miners made sure that they gave the dropped objects no push. Still the material ended up in the muddy side of the mine shaft. What mysterious force is pushing the objects into the wall?

Someone noticed a peculiar thing. The weight of the objects didn’t affect the place where they would get stuck in the muddy wall. In fact, everything usually got stuck in the same place. What was causing these objects to end up there? What was preventing them of reaching the ground?

Maybe air currents in the mine pushed these objects into the muddy wall. But the miners didn’t notice strong winds. And more importantly, heavy objects would be less affected by these air currents. Heavy stuff is harder to blow away than lighter stuff. The heavy objects ended up in the same exact place in the mud…

Mineshaft
Shitty explanatory gif

The miners concluded two things:

  1. The object followed a curved path for unknown reason, instead of the straight path downward.
  2. The paths followed were independent of the mass of the object.

What is this mysterious force? Before answering this question, consider the following related story:

Curious Cannon force

An Italian general was head of the artillery in the 19th century. He became very skilled at hitting targets, accounting in his deadly calculations for distance, wind etcetera. However, no matter what, there was always a slight deflection towards the west. Even correcting for wind, this deflection was still there.

And just like in the mine, no matter what the weight of the bomb was, the deflection remained the same. This again ruled out the wind as a possible pushing force, since wind pushes lighter objects farther than heavier objects.

Cannon
Shitty explanatory gif

He also concluded two important things in his calculations:

  1. The object followed a curved path for unknown reason, instead of the straight path downward.
  2. The paths followed were independent of the mass of the object.

The same conclusions of the miners! So are there truly mysterious forces on these bowling balls and bombs? Or is there something else going on here?

The clue to this problem lies in the second conclusion!

So every object followed the same path. However, this was independent of the mass of the object. Think about it, this is ridiculous. There can be no force causing these curved paths because of this independence.

If you apply the same force on masses of differing objects, they will follow different paths. Pushing an obese person and a kid will result in different paths of these people. Mass resists force. So if there was a force on the falling objects, there needed to be less curvature of that path. The mass of the objects would resist the mysterious forces.

So what is the reason?

The object in the mine shaft wás falling straight down. And the earth is rotating. This means that the walls are rotated towards the ball!

So what áctually is a straight path through space appears to be curved!

There is no force, because there is the curved path only appears so! It is an illusion!

The walls are just moving towards the object. Only on the exact north pole the object would fall straight down, because the walls would just be rotating around the object instead of towards it. This is exactly the same case with the castle, it is rotating away from the bomb!

This is a great example of a ‘Fake Force’, ‘Fictitious force’ or ‘Inertial force’. Not noticing the rotation of the earth makes it seems like objects falling have a weird force on them. The force in these examples is better known as the Coriolis Force. 

Mass Independence

Most important clue to take away: If a different mass doesn’t change the acceleration, there is a fictitious force. I will make another post stressing this last statement. Try to make yourself convinced why this is the case in the mean time. Because it is central in a jaw-dropping insight about that which holds the solar system together.

 

coriolis
Trying to shoot the atlantic ocean from the North Pole leads to accidently bombing of South America because of a ‘fake force’ or actually the rotation of the Earth.

Video:

In the next video, people are sitting in a centrifuge. The rotation will create fictitious forces. Two effects can be noticed: They are being pressed into the wall, and the balloons starting ‘orbiting’ around the middle point. They are pushed into the wall because of the ‘Centrifugal’-force and the apparent rotational force is the ‘Coriolis’-force. They are both fake.

The video is not working anymore..

Dimensions, Ikea and Interstellar.

“The non-mathematician is seized by a mysterious shuddering when he hears of ‘four-dimensional’ things, by a feeling not unlike that awakened by thoughts of the occult.”- quote from a smart person.

I’m quite annoyed with how frequently people misinterpret the word ‘dimensions’. It seems that all lot of people think that ‘dimensions’ are some mysterious and profound thing. Popscience and the counter intuitive theories of relativity are to blame, I think. However, it is not at all deep and profound. It has a plain definition.

What are dimensions? It is the least amount of information to locate an object.

lansdown-oak-1400mm-dining-table-dimensions
Observing mysterious dimensions at IKEA

Definition in the dictionary

Now it can be that this word just has two meanings, but if I look in the Oxford Dictionary then it just has the scientifically used definition. Oxford dictionary: ‘A measurable extent of a particular kind, such as length, breadth, depth, or height’. 

The etymology of the word is that it comes from the latin word ‘dimensio’ meaning ‘to measure.’

500_f_81379667_jknonqpmxfw8a6wozclncyvddb7pqmca
Two mysterious dimensions

Popscience usage of the word ‘Dimensions’:

But according to television and other popscience it is about exiting this world and going to alternate realities. Alternate realites are not dimensions. Far from it. They are just that, ‘alternate realities’. Alternate realities are very interesting fiction-wise. It has the allure of leaving Plato’s cave.

The original idea in fiction was to travel through an another Ikea-dimension (that we cannot see) to an alternate reality. But it just became synonym for the alternate reality. It is a great and often used plotdevice in science-fiction.

23
Portal to another ‘dimension’.

Fourth dimension

Saying this out loud is hard to say without sounding hand-wavy mysterious. But there is no actual ‘fourth dimension’. Here is a great video clearing this misconception. There are four dimensions, or better said: three spatial and one temporal dimension. The three spatial dimensions are exactly equal and interchangeable, the temporal dimension and a spatial dimension are alike but not exactly equal. 

The idea of Minkowski was that the temporal and spatial coordinates are part of the same thing, spacetime coordinates. That different observers see different manifestations of the actual spacetime trajectory (in space and time coordinates). This has nothing to do with alternate realities. It is analogies to using different ‘units’. Going 75 mph is an exactly the same description of a speed as 120 kmh. You just use different measurements (miles/km) as a starting point. Not using the metric system has been found to heighten your chances of mental retardation, though.

In 1846 the German philosopher and psychologist Gustav Fechner published a very interesting short story named “Space has Four Dimensions”, under the pseudonym “Dr. Mises”. It is about a protagonist who is a shadow and trapped on a two-dimensional surface. According to Fechner, this shadow-person would concieve  the third dimension as one being of time. It has a strong similarity with the Plato’s Allegory of the Cave’.

An interesting chronology I found about the ‘fourth’ dimension. 

  • 370 BC: Plato’s cave allegory of shadows on the wall used analogies between 2D (shadows) and 3D objects. (Book VII of the Republic)
  • 1659-1671: Henry More suggests that spirits should be four-dimensional (have spissitude). First serious acceptance of a fourth dimension!
  • 1747: Immanuel Kant speculates on the philosophical implications of higher-dimensional spaces in his thesis.
  • 1754: D’Alembert (and Lagrange in 1797) view time as a fourth dimension.
  • 1827: August Möbius discovers that a 3-D object can be turned into it’s mirror opposite by a 4-D rotation. First mathematical use of a fourth dimension!
  • 1846: Gustav Fechner writes story “Space Has Four Dimensions” in Vier Paradoxe under pseudonym “Dr. Mises”. Cayley uses four-dimensional geometry.
  • 1851: Sylvester discusses tangent and polar forms in n-dimensional geometry.
  • 1854: Bernhard Riemann (1854) develops the differential geometry for (curved) spaces of any dimension in his doctoral thesis The Hypotheses Which Underlie Geometry.
  • 1876: Trial of Henry Slade sparks interest in the “notorious” 4th Dimension.
  • 1880: Charles H. Hinton writes influential article “What is the Fourth Dimension?” in the Cheltenham Ladies College Magazine and Dublin University Magazine.

Ascending in dimensions. 

Another point I frequently get frustrated with is the notion of ‘ascending’ in dimensions. It already occurs in the story of ‘Dr. Mises’. ‘Flatland’ also introduced such a thing, where a circle elevates the square out of his two-dimensional surface and introduces him to the third dimension. The circle turns out to be a sphere. The square asks if there are more dimensions, which makes the sphere mad and he returns the square to his two-dimensional world. The square basically ‘ascended’ in dimensions. The concept of Interstellar is basically a retelling of Flatland. And I strongly feel that the ‘ascension’ doesn’t make sense to our world.

I thought that Interstellar, a great movie, at its core has a rubbish ‘ascending in dimensions’ concept. It horribly showed what the theory of relativity was about and instead implanted or confirmed the viewer with wrong understandings of the concept ‘dimension’.

nl8kjbo_-_imgur
MUUUURPH I’M TRAPPED IN ANOTHER DIMENSION MUUURPH

Interstellar

So the premise of Interstellar is in short: Earth is failing to provide food for humanity. Suddenly a wormhole opens near Saturn and astronauts get send through the wormhole, looking for new planets for humanity. Cooper checks out these planets with his sidechick but somehow ends up near a black hole in a ‘tesseract’. While in the ‘tesseract’ he communicates with the past and gives them new technology based on his pet robot TARS findings about the black hole.

The idea is that the ‘Tesseract’ allowed Cooper to freely move in the temporal dimension. The temporal dimension basically became a spatial dimension. The ‘Tesseract’ and the ‘Wormhole’ both were created by fifth-dimensional beings. It is implied that these fifth-dimensional beings are ‘ascended’ humans helping humanity in the past, just like Cooper is helping his daughter in the past.

Flatland and Interstellar

Like the three-dimensional sphere pulled the square out of his two-dimensional world in ‘Flatland’, the fifth-dimensional beings pulled Cooper out of his three spatial – one temporal dimension to a four spatial – one temporal dimension. There he moves through the temporal dimension just like we can move through our spatial dimensions: at will. Another temporal dimension is somehow added, or else he had no time to move in the ‘tesseract’.

My problem here is that the idea you can’t somehow ‘ascend’ in dimensions. I think it propagates the concepts of this viral and completely wrong video about imagining the tenth dimension. There are no ten dimensions and the ones we know are not on equal footing! String theory supposes ten dimensions (or more), but this has no experimental evidence yet. Also string theory supposes that there are nine spátial and one temporal dimension.

Technical endnote:

The problem lies in wrongly assessing the metrics. A metric is how you measure distances. The Minkowski-metric has signature (-,+,+,+) which means that the temporal dimension is not on the exact same footing as spatial dimension. They are related, but not ‘exactly’ the same. The sign of the metric is different. I hope to explain this in a different post.

 

 

Statistics: How to test if your data follows the ‘Normal Distribution’.

To do parametric tests, you need to test your data for normality. Parametric testing needs a smaller sample size for drawing conclusions than non-parametric testing. I use three main tests to check for normality: ‘Eyeballing’, statistical tests and looking at the skewness and kurtosis values.

How to test for normality:

  • The ‘Eyeball’-test. Make a histogram of the frequencies, add a Normal Curve with the found mean and S.D. of the data. Then check how good it overlaps the data. This is appropriate for n>50. Q-Q-plots can also help you.
histogram-and-probability-plot
Eye-ball method
  • Tests of Normality. There are two tests, each appropriate for certain sample sizes. Shapiro-Wilk< n=50 < Kolmogorov-Smirnov < 300. If the test is significant, the data is not-normal. These tests are notoriously easy to become significant.
normality-7
Tests of Normality-table in SPSS
  • Using ‘skewness’ and ‘kurtosis’.

For n < 50, if the z values of the skewness and kurtosis are greater than 1,96, reject the hypothesis that the data is normal.

For 50 < n < 300, if the z values are greater than 3,29, reject the hypothesis that the data is normal.

For n > 300, look at the absolute skew and kurtosis levels. If the skew value is larger than 2 or kurtosis is larger than 7, reject the null hypothesis.

Reference: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3591587/

normal-not-always-the-norm
Skewness and kurtosis

How to test in SPSS?

  1. Histogram + Normal curve: Analyze/Descriptive Statistics/Frequencies.
  2. Normality tests: Analyze/Descriptive Statistics/Explore (check ‘Normality plots with test’-box at the ‘Plots’-menu.
  3. Skewness and kurtosis: Analyze/Descriptive Statistics/Frequencies

 

The story of the parallel postulate

300 BC

In Alexandria, Euclid wrote down five statements that, if taken at face value, lead to the propositions of everyday geometry. These statements are called postulates or axioms. They are relatively simple and it is very hard to imagine them not to be true. But they are not possible to deduce from something! Nothing implies their truth, they only imply propositions. You have to take a (small) leap of faith in accepting these axioms and the truthfulness of the rest of the Elements follows. I always see the Elements as the equal and opposite book of truths of the Bible. The difference lies in the leap of faith required.

euclids-postulates
Image of the postulates of Euclid.
  1. A straight line may be drawn from any given point to any other.
  2. A straight line may be extended to any finite length.
  3. A circle may be described with any given point as its center and any distance as its radius.
  4. All right angles are equivalent.
  5. If a straight line intersects two other straight lines, and so makes the two interior angles on one side of it together less than two right angles, then the other straight lines will meet at a point if extended far enough on the side on which the angles are less than two right angles.

5′. At most one line parallel to a given line can be drawn through a given point.

From these five postulates Euclid derived books full of theorems. Having the least amount of postulates was a must, because these have to be taken at face value and a mathematician prefers much rather a proof.

Hilbert actually said that a ‘geometry’ is simply the collection of the theorems that follow from its axiom system. This by definition makes the geometry of Euclid just one case of many. However, the geometry of Euclid seems the only one applicable in everyday life. The postulates (or axioms) are like the ingredients of a meal, but then the ‘ingredients of a proof’. Or the ingredients of a geometry.

Fifth postulate

The fifth one sounds so complicated that maybe it can be derived from the other four. This is what mathematicians have tried for centuries, but no one succeeded. Ultimately it was shown that if you leave out the fifth postulate two other geometries can be derived!

But how can there be more than one line through a given point that doesn’t intersect with a given line? This is a preposterous idea.

Imagine a line and a point. Euclid said that through that point there is only one ‘non-intersecting’ line (NIL) possible to create. But Riemann found in his ‘elliptical’ geometry that no ‘non-intersecting’ lines are possible to create. Lobachevski found the opposite, that there are infinite amount of lines to create that will not intersect the first line.

comparison_spaces
Creating ‘non-intersecting lines’ through a given point with a given line.

So the essential difference lies in the amount of ‘non-intersecting’ lines possible to create. On a piece of paper you can create only one, the parallel line. On a sphere (such as a globe or football) it is impossible to create ‘non-intersecting’ lines. On a horse saddle you can create however many as you like!

The ‘curvature’ of the plane you are drawing on is correlated with the amount of ‘non-intersecting’ lines you can create.

We are familiar with elliptical geometry, which describes the surface of the earth.

p20006cdfg82001
The three famous geometries.

Summarizing: If the number of NIL’s is defined as the integer ‘n’:

In euclidean geometry,      n=1                      (parallel and no curvature)

In hyperbolic geometry,   n>1              (convergence and positive curvature)

In spherical geometry,    n<1 (n=0)       (divergence and negative curvature)

Below is a great video explaining the story:

 

 

The big bang: A droplet of something in a sea of nothing.

The big bang model

The big bang model is pretty cool. It is proposed by catholic priest and physicist Lemaitre and it simultaneously gave a solution to an important physics, religious and spiritual problem.

The big bang model says that at some point in history the universe had an extreme high density, extremely low entropy and an extremely high temperature at every single point in space. It does not say what the reason for this was, or what preceded this state of the universe. This is still a mystery. Some say that asking what before the Big Bang was, is like asking what is North of the North pole. This analogy is meant to show that from the start of time, there is no way but to the future. Just like there is only the south direction on on the north pole.

However, a lot of people have problems with something coming out of nothing. Officially the Big Bang theory is a model about the earliest moments in time and its subsequent evolution. So it predicts nothing about the time before that hypothesized condition in the past and does not say in itself that something came from nothing. It just models the condition of the universe the farthest back in time we can see and guess.

Now if we assume the ‘Big Bang’ came from nothing, this actually would mean that we are in a sphere of something surrounded by nothing with the big bang at the border. So the Big Bang is the hard shell of our universe egg. This means that if you look up at the sky, look past all the galaxies, you see the moment of creation. Nothing will lie beyond that.

This is because the farther away you look with a telescope in space, the farther away you look back in time because of the finite speed of light.

For example, if you look at the sky, the sun will be 8 minutes old and the Pole Star (which is actually comprised of three stars) around 400 years old. The nearest galaxy is 2,5 million years old and the farther we look the earlier in time we see. The farthest we ever looked was the Hubble Ultra Deep Field. This means we could theoretically check out the time of creation, the border between something and nothing. This sounds superscifi, but it actually already happened, back in 1964. The researchers first thought the signal they were receiving came from birdpoop on the antenna, but it was actually the signal of creation itself.

the-universe

From low entropy to high entropy and back.

Poincaré proved with his Recurrence Theorem that a system that is randomly evolving and has finite states will have recurring complete states after finite time. An example is a deck of cards. It has been shown that because of the large number of possibilities from shuffling a 52 card deck, it is probable that no two fair card shuffles have ever yielded exactly the same order of cards.

However, if you would keep shuffling for infinite amount of time, you will get the perfect ordering again at some point. This reminds me of the infinite monkey theorem.

Now that is not to say if there aren’t states being added. In other words, if you keep adding cards that probability is lowered again. I don’t know what rate of adding cards will determine if the beginning state will not reached anymore.

5-2
After sufficient shuffling of the universe, it will return to the Big Bang state.

How will the universe go? What is the ultimate fate of the universe? Maybe eternal recurrence. Nietzsche would have liked that. A big bang, a period inhabited by stars that eventually collapse and explode, then a black hole period which leads to an evaporation period. Eventually the cosmic background radiation is stretched so thin it is barely above zero. Maybe ultimately there are only photons of the same energy, with a temperature just above zero. This sounds already quite low entropy. What if the formed Boson-Einstein condensate suddenly collapses out of sheer chance to an extremely low entropy state? This will then result in a new universe. Out a Big freeze a Big bang.

Will information about our universe die in that period? If a being would visit this big freeze or heat death of the universe, could he theoretically find in the ashes how that this website existed?

What if the universe we are now inhabiting has traces of former universes? In this way, we do not live in nothing with the Big Bang as a hard shell, but merely in a huge bose-einstein condensate with an extremely low temperature that created the Big bang and ultimately our universe.

5e28f6f1795b2728d0f7cf03426c0231
The calendar of the universe

But what if the accelerating expansion is supplying enough ‘new states’ that this is not possible? But if the expansion of the universe is correlated with the temperature of the universe, surely the expansion will stop at one point.

In an infinite string of random information, there are beautiful stories to discover. Is our universe one of those stories in random information?

This ted-ed movie is also abit about finding order in disorder.

What is logic?

Deductive logic (Math): All premises are assumed true.

Inductive logic (Science): The premises have a probability of truth.

What is logic, what is the purpose of doing it (proving theorems out of postulates) and why is something logical true only if its postulates are true?

Are theorems located inside the postulates? Ofcourse it is silly to think of a location of a theorem. By proving we gain information, are the theorems a priori true? Are they determined and we merely calculate it? How many theorems do certain postulates imply? Perhaps infinite?

Why is the world inherently logical?

It feels like logic ‘flows’, but it is obviously not.

eyereuclidtree
The logic ‘flow’ of Euclid’s Elements

A great site showing a node graph of Euclid’s elements

A combination of axioms puts instantly constraints on what you are allowed to state as truth. If the axioms are the law, logic is the police that keeps propositions obeying the law.

It feels to me like a venn diagram. The postulates create bubbles of possible propositions that border with propositions that can’t be true anymore after the postulate is assumed true. In this way the overlap of the venn diagram with the other postulates is where the allowable math lies.

3-circle-venn
Axioms A, B and C together allow the propositions in the geometry ABC.

 

templa1
Postulates are like the ingredients for a geometry.

 

 

Cooking: 20 tips to eat cheap

eat-for-cheap

  1. Buy in bulk.
  2. Buy at cheap supermarkets.
  3. Buy when the product is in sales.
  4. Keep dishes simple.
  5. Make condiments yourself (tastes even better!).
  6. Buy canned and frozen products.
  7. Chicken with bones, use the bones for stock.
  8. Use eggs and beans as cheaper meat replacements, meat is expensive.
  9. Use the freezer to your advantage, never let something spoil!
  10. Keep the supermarketwebsites in your bookmarks to easily check what is in sales.
  11. Have a good set of containers to keep leftovers in.
  12. It is rarely necessary to buy the expensive versions of products. Budgetversions are not that bad.
  13. Plan a weekly menu.
  14. Don’t go hungry, it lowers your willpower.
  15. Have a nice stock of products in the fridge, freezer and cabin.
  16. Keep receipts to check what prices were.
  17. Never buy lunch at your work, make it at home.
  18. Regularly clean the fridge, freezer and cabin to check your stock and keep things tidy.
  19. Read a basic cooking book to utilize ingredients better.
  20. Know how to store food properly.

Basics of a dish follow this: Meat, Carbs, Vegetables, Condiment, Spices. Use this to make your own simple recipes, it is fun and cheap!