Tower of Hanoi consists of three pegs or towers with n disks placed one over the other. The objective of the puzzle is to move the stack to another peg following these simple rules. Only one disk can be moved at a time. No disk can be placed on top of the smaller disk. In […]
Author: giuricrocodile
Sometimes Geometry Just Needs Smart Calculations
In the figure, suppose AB = 14, BC = 12, CA = 10. AD is the angle bisector of A, intersecting the circumcircle of ABC at E. The circle with diameter DE intersects the circumcircle of ABC again at F. Find the measure of AF squared. To solve this problem, I used a theorem named […]
Two Examples For The Box Principle
The box principle is a pretty simple yet so useful mathematical principle which asserts: If there are n+1 objects to put into n boxes, then 2 objects must be in the same box. This makes us think that usually we just have to divide our set of possibilities in mutually exclusive boxes and prove that […]
A Random Forest For The Iris Dataset
Yesterday we talked about a Decision Tree Classifier making a prediction on the Iris dataset, now let’s see how an ensemble of decision trees can help each other making a more accurate prediction. The main fact about ensemble methods is that each model is trained on a different subset of the training set. If the […]
A Tree For The Iris Dataset
The iris dataset is widely renown among machine learning enthusiasts. It contains three species of flowers (setosa, versicolor, virginica) with 4 relative attributes: petal length, petal width, sepal length, sepal width. What we’re going to do is try to predict the species of flower knowing its attributes. Today I’ve decided to show how to train […]
Nice Post-Dinner Diophantine
Today after dinner, I really wanted to do a geometry problem but this diophantine equation just suddenly appeared in front of my eyes and, because it’s been a while since the last number theory problem, I decided to give it a shot. Prove that has no integer solutions. First we notice that the former equation […]
An Old Problem Came To Mind
Two years ago I participated in an online math competition and the problem which was considered as the most difficult was this one: Find Now the trick is finding upper and lower bounds for such quantity. Notice: Similarly If we sum up this relationship for all values we’ll found out it’s telescoping, so we’re left […]
Ellipses And Dilations
I found this problem in the last phase of a team championship I am participating in. We have an ellipse of equation A line through the origin intercepts the ellipse in two points. We draw the tangents to the ellipse at these points and complete the rectangle in such a way that its sides are […]
An Insight Into Generating Functions
The technique of using a generating function is widely used in combinatorics: you have a polynomial where the coefficient of the term of degree n represents how many times n appears in your counting problem. Let’s see a simple example to make it clearer. Let’s say we have 2 standard dice, we roll both and […]
Python Sudoku Solver
Writing a sudoku solver is a great example to show how recursion works in Python. This particular technique is called ‘Backtracking’. Let’s see a possible implementation. How Sudoku Works There are 3 rules you have to follow when solving a sudoku: All the numbers in a row must be different; All the numbers in a […]