How To Actually Solve The Königsberg Bridge Problem?
Published on June 9, 2022 by Hemanth
--
The Königsberg bridge problem has its origins in the Russian city of Kaliningrad. Back when the problem originated, it was known as the city of Königsberg (Prussia). This city was cut into several pieces by the waters of river Pregel (Pregolya) flowing through it.
As you can see from the title image, the river Pregel cuts the city of Königsberg into an upper bank, lower bank, Island 1, and Island 2. Island 1 is connected to the upper bank and the lower bank via two bridges each. Island 1 and Island 2 are connected by a bridge. Island 2 is connected to the upper bank and the lower bank via one bridge each. In total, there are seven bridges.
As the residents of Königsberg traversed the tricky bridges in the early 18-th Century, a curious question popped up among them:
Given any starting point, would it be possible for a resident to travel through the city such that each bridge in Königsberg is used only once? If so, how?
Thus, the Königsberg bridge problem was born. It is now your turn to try and solve this little logic problem.
Spoiler Alert:
If you wish to solve this puzzle on your own, I suggest that you pause reading this essay at this point. Once you are done, you may continue reading from here. Beyond this point, I will be explicitly discussing solutions to this problem.
The first thing that I wish to do with this problem is to number the bridges for ease of reference later. Consequently, the city map now looks as follows:
Numbered Bridges — Illustration created by the author
Now that we have numbered bridges, we could refer to various routes using number sequences like: 1–2–4–3. The corresponding route would appear as shown below:
Path 1–2–4–3 (Illustration created by the author)
Now, let us see how far we can proceed along this path.
The Trial-and-Error Approach to the Königsberg Bridge Problem
From 1–2–4–3, we could head to bridge 6 which connects the upper bank with Island 2. From thereon, we have two options, either take bridge 5 to go back to Island 1 or take bridge 7 to go back to the lower bank. Here’s how the path would look if we took 1–2–4–3–6–7:
Path 1–2–4–3–6–7 (Illustration created by the author)
As you can see, we have ended up stuck after traversing a total of six bridges. If we had used bridge 5 instead of bridge 7, we would have ended up stuck as well. The question now is if this is a specific issue with the route we chose or if the puzzle just does not yield to traversing all seven bridges just once.
If you had tried to solve this puzzle on your own, you would have realized that regardless of your starting point, six appears to be the maximum number of bridges that we can use only once. So, gut feeling says that it is impossible to use all seven bridges only once. So, how are we going to know for sure that there isn’t at least one super tricky solution to this problem?
Reducing the Königsberg Bridge Problem
In order to start figuring out if we are up against an impossible task, let us first reduce the problem to see what is going on. To this end, I ask the following question:
What is the minimum number of bridges that we could use only once (each) before we end up stuck?
Take a moment to ponder upon this question. Just by trial-and-error, we could establish that we can never get stuck by traversing two bridges using each only once. So ‘2’ is no problem. However, with ‘3’ combinations start popping up where we do end up stuck! Here is one such example (6–3–1):
Path 6–3–1 (Illustration created by the author)
Based on this insight, let us reconstruct the problem using just three bridges. In this case, I choose to go with bridges 3, 4, and 5 as shown below:
Path 3–4–5 (Illustration created by the author)
There are 3! (3 factorial) combinations of paths that we could choose to traverse this setup:
a) 3–4–5
b) 3–5–4
c) 4–5–3
d) 4–3–5
e) 5–4–3
f) 5–3–4
Regardless of which option you choose, you would end up stuck. Solving this problem involving three bridges is essentially the same as solving the problem with seven bridges. Based on this, we could say for certain that the Königsberg bridge problem is impossible to solve.
Final Remarks
In 1735, famous mathematician Leonhard Euler worked out an elegant way to figure out the mechanics of this problem. He remarked that if we neglect the two bridges featuring the starting point and the ending point, all other bridges we traverse should necessarily feature two terminals (entry and exit).
Based on this, he said that each landmass in the city (upper bank, lower bank, and the two islands) must be a terminal for a total number of bridges twice the number of times the said landmass is traversed during the entire travel.
However, we note that Island 1 has 5 terminals, whereas all other landmasses have 3 terminals each. Based on this, Euler argued that it is impossible to solve the Königsberg bridge problem. His work on this problem and other related problems led to the development of mathematical fields that are known today as topology and graph theory.
Such is the rich history behind the Königsberg bridge problem. Although the seventh bridge eluded us, this problem opened the door for numerous mathematical applications we use and benefit from today!
If you’d like to get notified when interesting content gets published here, consider subscribing.
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duration
Description
cookielawinfo-checkbox-advertisement
1 year
Set by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Advertisement" category .
cookielawinfo-checkbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
CookieLawInfoConsent
1 year
Records the default button state of the corresponding category & the status of CCPA. It works only in coordination with the primary cookie.
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Cookie
Duration
Description
_gat
1 minute
This cookie is installed by Google Universal Analytics to restrain request rate and thus limit the collection of data on high traffic sites.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Cookie
Duration
Description
__gads
1 year 24 days
The __gads cookie, set by Google, is stored under DoubleClick domain and tracks the number of times users see an advert, measures the success of the campaign and calculates its revenue. This cookie can only be read from the domain they are set on and will not track any data while browsing through other sites.
_ga
2 years
The _ga cookie, installed by Google Analytics, calculates visitor, session and campaign data and also keeps track of site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognize unique visitors.
_ga_R5WSNS3HKS
2 years
This cookie is installed by Google Analytics.
_gat_gtag_UA_131795354_1
1 minute
Set by Google to distinguish users.
_gid
1 day
Installed by Google Analytics, _gid cookie stores information on how visitors use a website, while also creating an analytics report of the website's performance. Some of the data that are collected include the number of visitors, their source, and the pages they visit anonymously.
CONSENT
2 years
YouTube sets this cookie via embedded youtube-videos and registers anonymous statistical data.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Cookie
Duration
Description
IDE
1 year 24 days
Google DoubleClick IDE cookies are used to store information about how the user uses the website to present them with relevant ads and according to the user profile.
test_cookie
15 minutes
The test_cookie is set by doubleclick.net and is used to determine if the user's browser supports cookies.
VISITOR_INFO1_LIVE
5 months 27 days
A cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface.
YSC
session
YSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages.
yt-remote-connected-devices
never
YouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
yt-remote-device-id
never
YouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
Comments