SlideShare a Scribd company logo
T
O
W
E
R
O
F
H
A
N
O
I
SUBMITTED BY:-
NAME:- MD. HALIM
CLASS ROLL:- L18/CS/154
UNIVERSITY ROLL:- 10300118015
SUBJECT:- DESIGN & ANALYSIS OF
ALGOTITHM (CS501)
Haldia Institute Of Technology
ICARE Complex HIT, Haldia (WB)
Tower of Hanoi Method
Introduction
The Tower of Hanoi was invented by the French mathematician
Edouard Lucas and sold as a toy in 1883. It originally bore the name
of ”Prof.Claus” of the college of “LiSou Stain”, but these were soon
discovered to be anagrams for “Prof.Lucas” of the college of “Saint
Loius”, the university where he worked in Paris.
There is a history about an Indian temple in Kashi Vishwanath which contains a
large room with three time-worn posts in it surrounded by 64 golden disks.
Brahmin priests, acting out the command of an ancient prophecy, have been
moving these disks, in accordance with the immutable rules of the Brahma, since
that time. According to the legend, when the last move of the puzzle will be
completed, the world will end.
Objective
The aim of the tower of Hanoi problem is to move the initial n different
sized disks from Tower A to Tower C using a temporary Tower B. The rule is
that no larger disk is to be placed above the smaller disk in any of the
needle while moving or at any time, and only the top of the disk is to be
moved at a time from any Tower to any Tower.
Rules of Puzzle
The Tower of Hanoi is a mathematical game or puzzle. It consists of three rods, and a
number of disks of different sizes which can slide onto any rod. The puzzle starts with
the disks in a neat stack in ascending order of size on one rod, the smallest at the top,
thus making a conical shape. The objective of the puzzle is to move the entire stack to
another rod, obeying the following rules:
 Only one disk must be moved at a time.
 Each move consists of taking the upper disk from one of the rods and sliding it onto
another rod, on top of the other disks that may already be present on that rod.
 No disk may be placed on top of a smaller disk.
Algorithm
Input :- Input of discs in Tower of Hanoi , specification of ORG as
from the piller and DES as to piller,INT as the intemediate piller.
Output :- Steps of moves of N discs from piller ORG to DCS
piller.
Steps 1. if N>0 then
2. move(N-1 ,ORG ,DES ,INT)
3. ORG DES (move from ORG to DES)
4. move(N-1 ,INT ,ORG ,DES)
5. end if
6. stop
Applications
The Tower of Hanoi is frequently used in psychological research on problem solving.
There also exists a variant of this task called Tower of London for neuropsychological
diagnosis and treatment of executive functions.
 The Tower of Hanoi is also used as a Backup rotation scheme when performing
computer data Backups where multiple tapes/media are involved.
 As mentioned above, the Tower of Hanoi is popular for teaching recursive
algorithms to beginning programming students. A pictorial version of this puzzle is
programmed into the emacs editor, accessed by typing M-x hanoi. There is also a
sample algorithm written in Prolog.
 The Tower of Hanoi is also used as a test by neuropsychologists trying to evaluate
frontal lobe deficits.
Conclusion
Reference
 Hofstadter, Douglas R. (1985). Metamagical Themas : Questing for the Essence of Mind and
Pattern. New York: Basic Books. ISBN 978-0-465-04540-2.
 Hinz, Andreas M.; Klavžar, Sandi; Milutinović, Uroš; Petr, Ciril (2013-01-31). The Tower of Hanoi –
Myths and Maths. ISBN 978-3034802369.
 Spitznagel, Edward L. (1971). Selected topics in mathematics. Holt, Rinehart and Winston.
p. 137. ISBN 978-0-03-084693-9.
 Moscovich, Ivan (2001). 1000 playthinks: puzzles, paradoxes, illusions & games.
Workman. ISBN 978-0-7611-1826-8.
 Petković, Miodrag (2009). Famous Puzzles of Great Mathematicians. AMS Bookstore.
p. 197. ISBN 978-0-8218-4814-2.
 Troshkin, M. "Doomsday Comes: A Nonrecursive Analysis of the Recursive Towers-of-Hanoi
Problem". Focus (in Russian). 95 (2): 10–14.
Tower of Hanoi Method

More Related Content

What's hot

Tower of hanoi
Tower of hanoiTower of hanoi
Tower of hanoi
murdhani heena
 
Tower of Hanoi using AI technique - means ends analysis
Tower of Hanoi using AI technique - means ends analysisTower of Hanoi using AI technique - means ends analysis
Tower of Hanoi using AI technique - means ends analysis
Shubham Nimiwal
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
Timbal Mayank
 
A* Algorithm
A* AlgorithmA* Algorithm
A* Algorithm
Dr. C.V. Suresh Babu
 
Two dimensional arrays
Two dimensional arraysTwo dimensional arrays
Two dimensional arrays
Neeru Mittal
 
Insertion sort
Insertion sortInsertion sort
Insertion sort
almaqboli
 
Spanning trees
Spanning treesSpanning trees
Spanning trees
Shareb Ismaeel
 
8 queen problem
8 queen problem8 queen problem
8 queen problem
NagajothiN1
 
AVL Tree
AVL TreeAVL Tree
Trees
Trees Trees
Trees
Gaditek
 
Infix to Postfix Conversion Using Stack
Infix to Postfix Conversion Using StackInfix to Postfix Conversion Using Stack
Infix to Postfix Conversion Using Stack
Soumen Santra
 
Bubble sort
Bubble sortBubble sort
Bubble sort
Rashmi R Upadhya
 
Infix to postfix conversion
Infix to postfix conversionInfix to postfix conversion
Infix to postfix conversion
Then Murugeshwari
 
Fractional Knapsack Problem
Fractional Knapsack ProblemFractional Knapsack Problem
Fractional Knapsack Problem
harsh kothari
 
Backtracking
BacktrackingBacktracking
Backtracking
subhradeep mitra
 
Queue ppt
Queue pptQueue ppt
Queue ppt
SouravKumar328
 
0/1 knapsack
0/1 knapsack0/1 knapsack
0/1 knapsack
Amin Omi
 
Quick sort
Quick sortQuick sort
Quick sort
Afaq Mansoor Khan
 
Turing machine
Turing machineTuring machine
Turing machine
HimanshuSirohi6
 
Priority Queue in Data Structure
Priority Queue in Data StructurePriority Queue in Data Structure
Priority Queue in Data Structure
Meghaj Mallick
 

What's hot (20)

Tower of hanoi
Tower of hanoiTower of hanoi
Tower of hanoi
 
Tower of Hanoi using AI technique - means ends analysis
Tower of Hanoi using AI technique - means ends analysisTower of Hanoi using AI technique - means ends analysis
Tower of Hanoi using AI technique - means ends analysis
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
 
A* Algorithm
A* AlgorithmA* Algorithm
A* Algorithm
 
Two dimensional arrays
Two dimensional arraysTwo dimensional arrays
Two dimensional arrays
 
Insertion sort
Insertion sortInsertion sort
Insertion sort
 
Spanning trees
Spanning treesSpanning trees
Spanning trees
 
8 queen problem
8 queen problem8 queen problem
8 queen problem
 
AVL Tree
AVL TreeAVL Tree
AVL Tree
 
Trees
Trees Trees
Trees
 
Infix to Postfix Conversion Using Stack
Infix to Postfix Conversion Using StackInfix to Postfix Conversion Using Stack
Infix to Postfix Conversion Using Stack
 
Bubble sort
Bubble sortBubble sort
Bubble sort
 
Infix to postfix conversion
Infix to postfix conversionInfix to postfix conversion
Infix to postfix conversion
 
Fractional Knapsack Problem
Fractional Knapsack ProblemFractional Knapsack Problem
Fractional Knapsack Problem
 
Backtracking
BacktrackingBacktracking
Backtracking
 
Queue ppt
Queue pptQueue ppt
Queue ppt
 
0/1 knapsack
0/1 knapsack0/1 knapsack
0/1 knapsack
 
Quick sort
Quick sortQuick sort
Quick sort
 
Turing machine
Turing machineTuring machine
Turing machine
 
Priority Queue in Data Structure
Priority Queue in Data StructurePriority Queue in Data Structure
Priority Queue in Data Structure
 

Similar to Tower of Hanoi Method

Tower of Hanoi presentation
Tower of Hanoi presentationTower of Hanoi presentation
Tower of Hanoi presentation
FahadQaiser1
 
Tower of Hanoi
Tower of HanoiTower of Hanoi
Tower of Hanoi
Dipesh Waghela
 
Tower of hanoi
Tower of hanoiTower of hanoi
Tower of hanoi
AvichalVishnoi
 
ProblemspowerWrite a public static function named power.docx
ProblemspowerWrite a public static function named power.docxProblemspowerWrite a public static function named power.docx
ProblemspowerWrite a public static function named power.docx
leahlegrand
 
Introduction to AI - Third Lecture
Introduction to AI - Third LectureIntroduction to AI - Third Lecture
Introduction to AI - Third Lecture
Wouter Beek
 
Tower of hanoi
Tower of hanoiTower of hanoi
Tower of hanoi
Usr11011
 
Quiz-Scitech random @SASTRA
Quiz-Scitech random @SASTRAQuiz-Scitech random @SASTRA
Quiz-Scitech random @SASTRA
Harish V Manikandan
 
Forca Barca Math's quiz finals
Forca Barca Math's quiz finalsForca Barca Math's quiz finals
Forca Barca Math's quiz finals
sidharth17
 
Have We Missed Half of What the Neocortex Does? by Jeff Hawkins (12/15/2017)
Have We Missed Half of What the Neocortex Does? by Jeff Hawkins (12/15/2017)Have We Missed Half of What the Neocortex Does? by Jeff Hawkins (12/15/2017)
Have We Missed Half of What the Neocortex Does? by Jeff Hawkins (12/15/2017)
Numenta
 
Dynamical Systems Modeling in Neuroscience
Dynamical Systems Modeling in NeuroscienceDynamical Systems Modeling in Neuroscience
Dynamical Systems Modeling in Neuroscience
Yohan John
 
Tower of hanoi algorithm
Tower of hanoi algorithmTower of hanoi algorithm
Tower of hanoi algorithm
WeaamRaed
 
Tower of Hanoi Investigation
Tower of Hanoi InvestigationTower of Hanoi Investigation
Tower of Hanoi Investigation
Writers Per Hour
 
Can computers think
Can computers thinkCan computers think
Can computers think
GTClub
 
Quaternions - Phoenix Bird presentation, v23
Quaternions - Phoenix Bird presentation, v23Quaternions - Phoenix Bird presentation, v23
Quaternions - Phoenix Bird presentation, v23
Herb Klitzner
 
Time series anomaly discovery with grammar-based compression
Time series anomaly discovery with grammar-based compressionTime series anomaly discovery with grammar-based compression
Time series anomaly discovery with grammar-based compression
Pavel Senin
 
The Art of Braincrafting
The Art of BraincraftingThe Art of Braincrafting
The Art of Braincrafting
Nicolas Rougier
 
History of infinity
History of infinityHistory of infinity
History of infinity
Uresha Dias
 
A brief history of mathematics
A brief history of mathematicsA brief history of mathematics
A brief history of mathematics
Alicia Jane
 
List of Famous Mathematicians.docx
List of Famous Mathematicians.docxList of Famous Mathematicians.docx
List of Famous Mathematicians.docx
TinaLegisma
 
nas23-vardi.pptx
nas23-vardi.pptxnas23-vardi.pptx
nas23-vardi.pptx
Moshe Vardi
 

Similar to Tower of Hanoi Method (20)

Tower of Hanoi presentation
Tower of Hanoi presentationTower of Hanoi presentation
Tower of Hanoi presentation
 
Tower of Hanoi
Tower of HanoiTower of Hanoi
Tower of Hanoi
 
Tower of hanoi
Tower of hanoiTower of hanoi
Tower of hanoi
 
ProblemspowerWrite a public static function named power.docx
ProblemspowerWrite a public static function named power.docxProblemspowerWrite a public static function named power.docx
ProblemspowerWrite a public static function named power.docx
 
Introduction to AI - Third Lecture
Introduction to AI - Third LectureIntroduction to AI - Third Lecture
Introduction to AI - Third Lecture
 
Tower of hanoi
Tower of hanoiTower of hanoi
Tower of hanoi
 
Quiz-Scitech random @SASTRA
Quiz-Scitech random @SASTRAQuiz-Scitech random @SASTRA
Quiz-Scitech random @SASTRA
 
Forca Barca Math's quiz finals
Forca Barca Math's quiz finalsForca Barca Math's quiz finals
Forca Barca Math's quiz finals
 
Have We Missed Half of What the Neocortex Does? by Jeff Hawkins (12/15/2017)
Have We Missed Half of What the Neocortex Does? by Jeff Hawkins (12/15/2017)Have We Missed Half of What the Neocortex Does? by Jeff Hawkins (12/15/2017)
Have We Missed Half of What the Neocortex Does? by Jeff Hawkins (12/15/2017)
 
Dynamical Systems Modeling in Neuroscience
Dynamical Systems Modeling in NeuroscienceDynamical Systems Modeling in Neuroscience
Dynamical Systems Modeling in Neuroscience
 
Tower of hanoi algorithm
Tower of hanoi algorithmTower of hanoi algorithm
Tower of hanoi algorithm
 
Tower of Hanoi Investigation
Tower of Hanoi InvestigationTower of Hanoi Investigation
Tower of Hanoi Investigation
 
Can computers think
Can computers thinkCan computers think
Can computers think
 
Quaternions - Phoenix Bird presentation, v23
Quaternions - Phoenix Bird presentation, v23Quaternions - Phoenix Bird presentation, v23
Quaternions - Phoenix Bird presentation, v23
 
Time series anomaly discovery with grammar-based compression
Time series anomaly discovery with grammar-based compressionTime series anomaly discovery with grammar-based compression
Time series anomaly discovery with grammar-based compression
 
The Art of Braincrafting
The Art of BraincraftingThe Art of Braincrafting
The Art of Braincrafting
 
History of infinity
History of infinityHistory of infinity
History of infinity
 
A brief history of mathematics
A brief history of mathematicsA brief history of mathematics
A brief history of mathematics
 
List of Famous Mathematicians.docx
List of Famous Mathematicians.docxList of Famous Mathematicians.docx
List of Famous Mathematicians.docx
 
nas23-vardi.pptx
nas23-vardi.pptxnas23-vardi.pptx
nas23-vardi.pptx
 

Recently uploaded

BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
sachin chaurasia
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
gowrishankartb2005
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
Introduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptxIntroduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptx
MiscAnnoy1
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
amsjournal
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
shadow0702a
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
Madan Karki
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
NazakatAliKhoso2
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 

Recently uploaded (20)

BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
Introduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptxIntroduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptx
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 

Tower of Hanoi Method

  • 1. T O W E R O F H A N O I SUBMITTED BY:- NAME:- MD. HALIM CLASS ROLL:- L18/CS/154 UNIVERSITY ROLL:- 10300118015 SUBJECT:- DESIGN & ANALYSIS OF ALGOTITHM (CS501) Haldia Institute Of Technology ICARE Complex HIT, Haldia (WB) Tower of Hanoi Method
  • 2. Introduction The Tower of Hanoi was invented by the French mathematician Edouard Lucas and sold as a toy in 1883. It originally bore the name of ”Prof.Claus” of the college of “LiSou Stain”, but these were soon discovered to be anagrams for “Prof.Lucas” of the college of “Saint Loius”, the university where he worked in Paris. There is a history about an Indian temple in Kashi Vishwanath which contains a large room with three time-worn posts in it surrounded by 64 golden disks. Brahmin priests, acting out the command of an ancient prophecy, have been moving these disks, in accordance with the immutable rules of the Brahma, since that time. According to the legend, when the last move of the puzzle will be completed, the world will end.
  • 3. Objective The aim of the tower of Hanoi problem is to move the initial n different sized disks from Tower A to Tower C using a temporary Tower B. The rule is that no larger disk is to be placed above the smaller disk in any of the needle while moving or at any time, and only the top of the disk is to be moved at a time from any Tower to any Tower.
  • 4. Rules of Puzzle The Tower of Hanoi is a mathematical game or puzzle. It consists of three rods, and a number of disks of different sizes which can slide onto any rod. The puzzle starts with the disks in a neat stack in ascending order of size on one rod, the smallest at the top, thus making a conical shape. The objective of the puzzle is to move the entire stack to another rod, obeying the following rules:  Only one disk must be moved at a time.  Each move consists of taking the upper disk from one of the rods and sliding it onto another rod, on top of the other disks that may already be present on that rod.  No disk may be placed on top of a smaller disk.
  • 5. Algorithm Input :- Input of discs in Tower of Hanoi , specification of ORG as from the piller and DES as to piller,INT as the intemediate piller. Output :- Steps of moves of N discs from piller ORG to DCS piller. Steps 1. if N>0 then 2. move(N-1 ,ORG ,DES ,INT) 3. ORG DES (move from ORG to DES) 4. move(N-1 ,INT ,ORG ,DES) 5. end if 6. stop
  • 6. Applications The Tower of Hanoi is frequently used in psychological research on problem solving. There also exists a variant of this task called Tower of London for neuropsychological diagnosis and treatment of executive functions.  The Tower of Hanoi is also used as a Backup rotation scheme when performing computer data Backups where multiple tapes/media are involved.  As mentioned above, the Tower of Hanoi is popular for teaching recursive algorithms to beginning programming students. A pictorial version of this puzzle is programmed into the emacs editor, accessed by typing M-x hanoi. There is also a sample algorithm written in Prolog.  The Tower of Hanoi is also used as a test by neuropsychologists trying to evaluate frontal lobe deficits.
  • 8. Reference  Hofstadter, Douglas R. (1985). Metamagical Themas : Questing for the Essence of Mind and Pattern. New York: Basic Books. ISBN 978-0-465-04540-2.  Hinz, Andreas M.; Klavžar, Sandi; Milutinović, Uroš; Petr, Ciril (2013-01-31). The Tower of Hanoi – Myths and Maths. ISBN 978-3034802369.  Spitznagel, Edward L. (1971). Selected topics in mathematics. Holt, Rinehart and Winston. p. 137. ISBN 978-0-03-084693-9.  Moscovich, Ivan (2001). 1000 playthinks: puzzles, paradoxes, illusions & games. Workman. ISBN 978-0-7611-1826-8.  Petković, Miodrag (2009). Famous Puzzles of Great Mathematicians. AMS Bookstore. p. 197. ISBN 978-0-8218-4814-2.  Troshkin, M. "Doomsday Comes: A Nonrecursive Analysis of the Recursive Towers-of-Hanoi Problem". Focus (in Russian). 95 (2): 10–14.