In Graph Theory, the diameter of a tree is the largest distance between any two points. The radius is the minimum distance of the maximum distance of any node on the of the diameter to one of the two diameter endpoints. Take the following graph as an example. In this…
Uncategorized
Dijkstra Code
Dijkstra’s algorithm is a method to calculate the shortest path from one node to another with weighted edges. It does not work for negative edge weights, however. Fun fact: it is a main algorithm used in Google Maps. It starts off by setting all the distances of each node to…
Shattered Trust
Here is a random story I did a few years ago when I was bored. The weather forecast had been on the headlines for many days. The citizens of Winnipeg had been warned about the possible storm, but they were ignoring it by thinking about the upcoming Thanksgiving holiday instead….
Watership Down Summary
Watership Down is a novel written by Richard Adams, published in 1972. It tells the story of a group of rabbits and their quest for a new home. The story begins in the British countryside, where a young rabbit named Fiver had a disturbing vision of their warren being destroyed….
The Ebbinghaus Forgetting Curve
Imagine you’re learning something new, like a new language. Have you noticed that after you first learn them, you can remember them quite well, as time goes on, you start forgetting them? This is what the Ebbinghaus forgetting curve is all about. Over a century ago, a psychologist named Hermann…
Holes Summarized
The story begins with Stanley Yelnats, a young boy from a family cursed with bad luck. He is wrongly accused of stealing a pair of sneakers that once belonged to a famous baseball player and is sent to Camp Green Lake, a juvenile detention facility. Despite the name, Camp Green…
Craters
Objects like asteroids and comets in the Solar System can collide with larger planetary bodies, resulting in impact events. When these smaller solar system bodies (SSSBs) strike planets, moons, or other objects, they create a massive explosion similar to a bomb blast. This explosion blows away surface material, leaving behind…
Cybersecurity
Imagine a world without cybersecurity. You open up your bank account to check on your investments – what happened? There is no more money! This is what would happen without cybersecurity, the state of being protected against the criminal or unauthorized use of electronic data. Cyber means anything to…
Random Password Generator
This program generates a random password. The password is at least 10 characters long and includes at least 1 number and special character. You can tell the program how many special characters, numbers, and letters you want. The password has letters, numbers, and other characters randomly dispersed throughout. For example,…
Python Tic Tac Toe Using Tkinter
Copy and paste this code into a python IDE, and you got tic tac toe!
