Skip to content

Latest commit

 

History

History
75 lines (57 loc) · 4.23 KB

README.md

File metadata and controls

75 lines (57 loc) · 4.23 KB
Logo

Discrete Mathematics


➕ Tools, Visualisations and Code for Understanding the concepts of Discrete Mathematics

Warning

Under active development ⚠️

This repository contains the codes for Visualisations and Application of various discrete mathematics concepts. Great for those who wants to learn how various concepts of discrete mathematics are applied and visualised programmatically.

This repository (as of now) contains python code - making it a bit easier to read and understand the underlying programmatically knowledge of discrete mathematics.

TOC

TOC

Tower of Hanoi

The Tower of Hanoi is a classic mathematical puzzle that involves three rods and a set of disks of different sizes. The challenge is to move all the disks from one rod to another, following a specific set of rules. Here’s a breakdown of the puzzle and its rules:

Objective

The goal of the Tower of Hanoi is to transfer the entire stack of disks from the starting rod to a designated target rod.

Rules

To solve the puzzle, you must adhere to the following rules:

  • Single Disk Movement: You can only move one disk at a time. This means that you cannot move multiple disks simultaneously.
  • Uppermost Disk Movement: Each move consists of taking the disk that is on the top of one stack (the uppermost disk) and placing it on top of another stack. A disk can only be moved if it is the topmost disk of its current stack.
  • Size Constraint: You cannot place a larger disk on top of a smaller disk. This rule ensures that the disks are always arranged in descending order on each rod.
Tower Of Hanoi
Movement of Discs to solve the puzzle. (Credit: geeksforgeeks)