Marwan Eleskandarani

# Data Science Lessons in Philosophy, Should You Live Optimally or Expeditiously?

**How the shortest path finder algorithms solve life’s greatest questions**

Humans are strange – they seem to be inherently driven to seek the easiest solutions. A trait evident since ancient times and amplified by the rise of the internet. Search queries such as “how to make money fast?”, “how to get promoted quicker?”, or even “how to lose fat, & fast?” are pervasive. While there are very rare instances in which man’s search is on the other end of the spectrum, the fact remains that the ‘shortcut’ trend highlights that our shared, collective consciousness is more powerful than we thought.

It begins in Physics, where through tedious and seemingly never-ending lessons, we learn that electricity, or current in particular, follows the path of least resistance (if we recall our Physics classes properly!). It would then seem reasonable to extend this concept and believe that nature always finds that fastest and most optimal way to design its constituents.

Despite the naturalisation and integration of the principle of ‘optimality’ within our genetic code, our DNA, our lizard brain, human innovation and its resulting inventions do not inherit the same genetic code – this intrinsic efficiency. In nature, everything tunes and refines itself through its own miraculous processes, yet our creations seem to lack the same seamless optimization that has propelled humans to their current state.

In fact, it is clearly seen in our day to day busy-ness that some of the greatest scientists, artists, and business moguls are some of the worst teachers to ever exist. This is especially apparent in scientists’ inability to embed their common sense and idiosyncrasies into their technologies. This, in turn, has driven scientists (of the data variety) to work tirelessly through copious amounts of coffee and increasingly long nights to develop ways of introducing simple heuristic concepts into the very applications, machines, and monstrosities that they’ve created.

As the world becomes more connected, as resources become more scarce, and costs soar with modern inflation, humans must constantly find ways of optimising the journey from a starting point to an ending point.

Physicists have then asked, “How do we really find the shortest path from point A to point B?”

Of course, scientists realised that the question is not so easily answered and there are countless ways to solve it using modern data science algorithms.

The results of extensive research into the most viable algorithmic solutions to the problem reveal some golden nuggets of philosophical knowledge buried deep within the findings, namely, answering the question: “Should we live optimally or expeditiously?”

Some individuals might consider this philosophical debate a stretch in logic. Rest assured, as you near the end of this text, you will find that your perspective on daily decisions will shift to more “Eskandarani-an” tendencies.

**The Algorithmic Solutions**

Let’s start with definitions, specifically, definitions regarding what it means to be optimal vs to be expeditious:

- The standard dictionary definition of ‘Optimal’ is to be in maximal efficiency

- The standard dictionary definition of ‘Expeditious’ is to be in maximal speed

The contenders of this philosophical debate should also be introduced, our 2 gladiators in our metaphorical colosseum are Dijkstra’s algorithm and the A* algorithm. Both vicious contenders that are able to find the shortest path from one point to another. However, Dijkstra’s algorithm is greedy and meticulous in its search for the shortest path On the other hand, A* is free-flowing and uses common sense to embody a heuristic approach in its search to find the shortest path. Dijkstra’s algorithm includes a graph search algorithm with a single source on the graph that doesn’t have a negative side cost, whereas A* is designed to solve problems more quickly by train accuracy, optimality, completeness, and precious for speed.

The gladiators stand face to face surrounded by cheering crowds in the stands of the colosseum awaiting bloodshot, violence, and the final victor to raise his trembling hands as if demanding the ancient Roman Gods to look and marvel at his power. The gladiators prepare for battle through armour and weaponry to go into their modelling stages - problem identification, construction of a mathematical model, determining a mathematical solution from the model, and the interpretation of these solutions into real points of view.

The battle is unfolding.

The combatants swing, strike, slash, parry, and clash as the battle rages on.

Let's translate this video to English. The first swing (step) is to set the beginning and end destination points on a map (a graph). In this example, researchers selected the path from the University of Sumatera Utara at Jl. Universitas No. 9-A (starting point) to Wisma Benteng Restaurant at Jl. Kapt. Maulana Lubis No. 6 (1st destination point) and from the University of Sumatera Utara at Jl. Universitas No. 9-A (starting point) to the State University of Medan at Jl. William Iskandar Ps. V (2nd destination point).

The second block (step) is to generate points or nodes that represent the intersection between 2 or more roads and find the distance between them (representing the node edge).

[Figure 2] & [Figure 3] below represents the previous steps using Google Maps or Geographic Information System (GIS).

Sparks shimmer off the blades as each slash and block ensues to complete the third and fourth step.

Sparks shimmer off the blades as each slash and block ensues to complete the third and fourth step.

The third dodge (step) is to calculate the distances between the point edges and the destinations and the final blow is to run the numbers within algorithms.

The dust settles, the crowd mutes itself, and the only tangible chord to reality is the time-passing.

The victor steps forth as the results are in and the calculations are complete.

The battle is complete.

To the crowd’s amazement, a bizarre image presents itself, a chimaera of both gladiators is the only remaining force standing at the very centre of the colosseum, waiting for the onlookers to understand.

**Evidently, the Dijkstra model performs slightly better in local and smaller distances, while the A* model performs much better at a large scale distance as evident by the hybrid contestant.**

**The Philosophical Takeaway**

Finally, it dawns on the crowd, the philosophical lesson, a lesson that is clear as day, a lesson that shows how to live one’s life, how to make decisions, how to look at the future, and how to approach matters related to life’s greatest questions.

Just as the Djikstra model performs better as a smaller scale, one should plan life and approach current matters and day to day components with a much more detailed, precise, optimal, and calculated angle; however, on the grander scheme of life, life’s biggest problems, questions, and non-problems, one should only consider that which is expedient as to not go through forms of analysis paralysis.

Since the future is rarely forecasted well or guaranteed, live with purpose, use your intuition, and* bon voyage*.

## Comments