Probabilistic search heuristics such as simulated annealing (SA) are very useful when the search space is extremely large or when the search landscape is non-convex such that basic hill climbing algorithms will tend to get stuck in a local minima.

Whilst SA works well for a variety of problems which are non-convex, quantum annealing can prove to be better for problems where the search landscape is extremely jagged with high variance of values. As SA depends on the temperature of the system to determine transition probabilities to a worse solution, this can be problematic for search spaces where there may be extreme variance in energy between neighboring inputs.

A good example of such a problem is in finding the value of D in minimal solutions of X for which the largest X is generated as a solution to Pell’s equation (specialised quadratic Diophantine equations for which c = 1 in this case). To give an example of the jaggedness of the energy landscape for maximising X, consider the minimal X solution for D equal to 61 and 62. For D = 61, X = 1766319049, while for D = 62, X is only 63. This extremely large variance would even prove troublesome for SA’s transition probabilities function. The key benefit of quantum annealing is that its transition probability function also factors in the width of hill in addition to its height. If the hill is thin enough (in this case it is), the idea is that simulated quantum fluctuations could bring the system out of a shallow local minima.

Below is a barebones implementation in Python for finding the maximum X in minimal solutions for D ≤ 1000. Further improvements could be made to the annealing schedule or adapting the field strength decay rate with respect to the number of iterations run.

Very interesting problem from Project Euler (59), made easier by the fact that the key is lowercase and 3 letters long. The encrypted message by cyclically repeating the 3 letter key through the message. Assuming spaces have not been removed in the plaintext message, a simple frequency analysis of the 3 batches of letters XOR’d with different letters in the key decrypts the cipher text quite quickly. Implementation in Python:

It has been four months since I first arrived in Santiago, Chile. Up until Chile, I had never been to South America. It was always a continent that was relegated to my imaginations which drew inspiration from the rugged landscapes of the region I had seen from National Geographic as a child. Needless to say, my time spent in Chile and in other LatAm countries have been very fruitful in drawing personal lessons.

Never Stop Learning & Adapting

I have always been fascinated by the formation and downfall of great nations, more concretely the decisions and events which contributed to their predicaments. Though there are certain events in history which may have acted as a tipping point for the relative ascendancy of one nation to another, an Epicurean view of the world doesn’t do the power of human initiative and free will justice. Luck is an element, but moreover I believe it is specific human attitudes and decisions which play a much greater role in the fate of nations.

Travelling affords one an unbiased view into the formation process of nations, why some thrive and others stagnate. So the biggest reward for me when I travel is in drawing valuable lessons by viewing the history of the places I visit. Chile is one of those countries which throughout its more contemporary history has been gifted with natural resource discoveries, but in past instances have opted to squander them versus planning for the future. It is a country littered with examples of when a stable, isolated system is disrupted by an unstoppable external force.

Valparaiso

Valparaiso, a port city on the coast of Chile is a favorite destination for me, given its relaxed atmosphere and its quaint similarities to San Francisco. But more importantly it is an anecdote for the continuous growth-and-decline cycle of companies, cities and nations.

Back in the 19th century, Valparaiso gained prominence as a major stopover port for ships rounding South America via the Strait of Magellan en route to the west coast of the U.S. or Asia. The economic prosperity of trade brought about Latin America’s first stock exchange and numerous other firsts in civil services. Yet the good times wouldn’t last long as the opening of the Panama Canal in 1914 dealt a severe blow for Valparaiso’s shipping volume. What is interesting is why Valparaiso never planned for the disruption given that the first construction attempt of the Panama Canal began in 1881. Why Valparaiso never adapted or made preparations for disruption is something I’m not prepared to answer at this stage, but the city does serve as a living reminder of the consequences when imagination fails and complacency takes over.

In some respects the influx of foreign entrepreneurs brought in by the Start-Up Chile program is at the very least a good external wake up call for Chile. Chilean society is still highly stratified with family name and where you live being a crude gauge of your position and power in society. As a foreigner, I was very much ignorant to this undercurrent of classism nor do I care much for it. It is my hope that myself and the other foreign entrepreneurs here can really catalyse the process of hacking away at this form of neo-serfdom.

The Chilean entrepreneurial scene is still very much a work in progress and a big hindrance to its long term success is the inherent classism that currently exists. In shifting the factors behind success and achievement in Chilean society from indeterminate probabilistic factors (e.g. family heritage, genetic luck) to determinate ones (hardwork, hustle, talent etc.), Chile can move one step closer to building a tech hub that contributes original and innovative companies. Otherwise it is highly likely to go down the road of 1-n globalisation, where companies are largely clones of existing and working ones in other parts of the world.

The World Is Truly Converging – In The Economic Sense

Vina del Mar

My first two month in South America were spent in Chile and to be quite honest, it didn’t feel like “South America”. The normal amenities of Starbucks, large shopping malls and Western brands are ever present in Chile to the extent that it becomes hard to distinguish the unique characteristics of the country.

I’ve had many instances in Chile, where I felt I could’ve just as easily been in San Francisco, New York, Hong Kong or any other major international hubs. Looking back at my childhood in the 90s, there was this real sense that the world was opening up, people were embracing multiculturalism and that the world was beginning to converge. During my time in Chile, I would still say that the convergence theory of globalisation still holds true, but only loosely in the economic sense.

On one hand it is nice to have the amenities that I’m used to be readily available in Chile, but it is also sad to see that my generation is all converging to the same brand of Western culture with little differentiation apart from the native tongue they speak. Whether this is a good thing or not really depends on the individual, but for me it is a little sad to see that we are losing the distinct characteristics that define who we are and our heritage.

Up until now I haven’t experienced much of Chilean culture, it is a country rushing to modernise and in some ways move on quickly from its ugly recent history. The country has done well economically with its free market policies and its large copper reserves, but whether it avoids another resource dependent boom-and-bust cycle really hinges on how well it plans for the future.

Between May and October 1648, a series of treaties were signed in Osnabruck and Munster respectively which ended the Thirty Years’ War in the Holy Roman Empire and the Eighty Years’ War between Spain and the Dutch Republic. What made the treaties of Westphalia important and notable was the establishment of the concept of a territorial sovereignty.

The introduction of the sovereign state signaled the end of perennial warfare in mainland Europe but also the triumph of sovereignty over empire. These set of treaties would lay the foundations for a large of modern international law. If one distills the fundamental change brought about from the Westphalia treaty to governance, one can see the coalescence of power as defined according to geographical bounds. In essence, Westphalia was a key force in demarcating the various peoples of Europe into territorial regions. It transferred governance from sovereignty over all those whom share similar ethnic traits to a more rigid system bound by defined geographical boundaries. Citizenship was no longer necessarily decreed based on ethnic lines, but now also in terms of the geographical location of the individuals.

Pre-Westphalia: Fluid territories and national boundaries defined as a function of settlement areas

The centralized power held by various ethnic rulers and emperors over all subjects of the same ethnic group was now controlled and tightly bound by pre-determined geographical bounds. Thus, Westphalia brought about a relative decentralization of the power held by rulers. As a result individuals free to determine the system of power and control they were subjected to, because mobility and emigration was made possible under the sovereign state framework.

Fast forward to today, the right to self-determination of the set of laws one is subjected to is all around us. Globalization and modern interracial societies (United States, United Kingdom) arguably trace their roots back to this legal framework. In paving the way for greater human mobility, Westphalia brought about a massive decentralization of political power, shifting it from traditional high priests and hereditary rulers to the general population.

Post-Westphalia: Concept of sovereign state established, fixed boundaries. More conducive for immigration

A clear analogue to the decentralization of power by brought about by the Peace of Westphalia is the internet today. Traditional industries such as media which had held a monopoly on information are now being disrupted one by one by the power of the internet to connect and leverage the collective resources of a vast number of individuals. Think for a moment about the way in which the news industry has changed. Twenty years ago, news was very much top down. Breaking events were covered by news outlets, edited and then delivered to individual consumers. The power to collect and disseminate information lay in the hands of a small group of individuals. These individuals should they choose to had the ability to censor and manipulate given the lack of competition. Today, the advent of social platforms like Twitter and Facebook has given everyday users a channel to voice their opinions and their own observations of the world around them. The proliferation of mobile devices coupled with software and internet solutions has enabled many more individuals to publish and share their stories. By harnessing the collective power of localized reporters, the beauty in the current internet structure is the way in which it has created far more competition to the traditional news agencies.

The vast wealth of information stored online and the ability to connect with another individual across the world is hugely empowering. A couple of decades ago, formal education was largely the domain of the government and private universities, but the rise of MOOCs today threatens this traditional top-down one-size fits all structure of instruction. Whereas previous generation had a much more localized social experience, today we are able to connect and befriend individuals from the across the world. It is also a safe bet that we know someone half way across the world better than we know our neighbors.

It has been more than three centuries since the Peace of Westphalia. The internet today draws many parallels to the ways in which the peace treaty shaped civil liberties and individual freedoms. The internet has and will continue to chip away at the hegemony of traditional power structures in many areas from media to education.

At the core of the internet is its ability to decentralize power and offer tailored experiences to the individual. As more of the world comes online, the internet’s ability to connect and share ideas is incredibly exciting as a framework for how we should be re-evaluating the current legal framework that governs us. What does the ability to define identity and create groups of association via the web mean for definitions of citizenship? Could our current legal framework simply be a model for interfacing with the physical world, whilst a parallel framework develops on the internet? Or could the current legal framework be completely revamped?

Sometimes one takes on problems not for their practical purposes, but just for the sake of solving it. Since there is a limit on the number of digits that can be represented in a language like Javascript, I wanted to compute the actual output for two to a very large exponent.

One effective means of doing so is to compute 2^n and store the resulting digits in a list. The Javascript below completes this action: