SlideShare a Scribd company logo
1 of 19
Knight’s Tour Explanation and Algorithms
GROUP MEMBERS Hassan Tariq (2008-EE-180) ZairHussainWani (2008-EE-178)
Introduction
What is ‘Knight’s Tour’? Chess problem involving a knight Start on a random square Visit each square exactly ONCE according to rules Tour called closed, if ending square is same as the starting
Constraints A closed knight’s tour is always possible on an  m x n chessboard, unless:  m and n are both odd, but not 1  m is either 1, 2 or 4  m = 3, and n is either 4, 6 or 8
m and n are both odd, but not 1
Knight moves either from black square to white, or vice versa In closed tour knight visits even squares If m and n are odd i.e. 3x3,  total squares are odd so tour doesn`t exist
m = 1, 2, or 4; m and n are not both 1
for m = 1 or 2, knight will not be able to reach every square for m = 4, the alternate pattern of white and black square is not followed so tour not closed
m = 3; n = 4, 6, or 8
Have to be verified for each case For n > 8, existence of  closed tours can be proved by induction
Algorithms Neural Network Solutions Warnsdorff’s Algorithm
Neural Network Solutions Every move represented by neuron Each neuron initialized to be active or inactive  ( 1 or 0 ) Each neuron having state function initialized to 0
Neural Network Solutions (contd.) Ut+1 (Ni,j) = Ut(Ni,j) +2 –    Vt(N) NG(Ni,j)                            1                Ut+1(Ni,j) > 3 Vt+1(Ni,j) =    0                Ut+1(Ni,j) < 0 Vt(Ni,j)       otherwise
Neural Network Solutions (contd.) The network ALWAYS converge Solution: ,[object Object]
 Series of two or more open tours,[object Object]
Warnsdorff's Algorithm (contd.) Set P to be a random initial position on the board Mark the board at P with the move number "1"  For each move number from 2 to the number of squares on the board: ,[object Object]
Set P to be the position in S with minimum accessibility
Mark the board at P with the current move numberReturn the marked board – each square will be marked with the move number on which it is visited.

More Related Content

What's hot

Automata theory - NFA ε to DFA Conversion
Automata theory - NFA ε to DFA ConversionAutomata theory - NFA ε to DFA Conversion
Automata theory - NFA ε to DFA ConversionAkila Krishnamoorthy
 
Greedy Algorithm
Greedy AlgorithmGreedy Algorithm
Greedy AlgorithmWaqar Akram
 
Presentation on Heap Sort
Presentation on Heap Sort Presentation on Heap Sort
Presentation on Heap Sort Amit Kundu
 
3.8 quick sort
3.8 quick sort3.8 quick sort
3.8 quick sortKrish_ver2
 
Dijkstra's algorithm
Dijkstra's algorithmDijkstra's algorithm
Dijkstra's algorithmgsp1294
 
Breadth First Search & Depth First Search
Breadth First Search & Depth First SearchBreadth First Search & Depth First Search
Breadth First Search & Depth First SearchKevin Jadiya
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notationsNikhil Sharma
 
Graph traversal-BFS & DFS
Graph traversal-BFS & DFSGraph traversal-BFS & DFS
Graph traversal-BFS & DFSRajandeep Gill
 
Shortest path algorithm
Shortest path algorithmShortest path algorithm
Shortest path algorithmsana younas
 
Turing machine seminar report
Turing machine seminar reportTuring machine seminar report
Turing machine seminar reportYashwant Dagar
 
All pairs shortest path algorithm
All pairs shortest path algorithmAll pairs shortest path algorithm
All pairs shortest path algorithmSrikrishnan Suresh
 
linear search and binary search
linear search and binary searchlinear search and binary search
linear search and binary searchZia Ush Shamszaman
 
LR(1) and SLR(1) parsing
LR(1) and SLR(1) parsingLR(1) and SLR(1) parsing
LR(1) and SLR(1) parsingR Islam
 

What's hot (20)

Brute force method
Brute force methodBrute force method
Brute force method
 
Automata theory - NFA ε to DFA Conversion
Automata theory - NFA ε to DFA ConversionAutomata theory - NFA ε to DFA Conversion
Automata theory - NFA ε to DFA Conversion
 
Branch and bound
Branch and boundBranch and bound
Branch and bound
 
A* Algorithm
A* AlgorithmA* Algorithm
A* Algorithm
 
Greedy Algorithm
Greedy AlgorithmGreedy Algorithm
Greedy Algorithm
 
Presentation on Heap Sort
Presentation on Heap Sort Presentation on Heap Sort
Presentation on Heap Sort
 
3.8 quick sort
3.8 quick sort3.8 quick sort
3.8 quick sort
 
Dijkstra's algorithm
Dijkstra's algorithmDijkstra's algorithm
Dijkstra's algorithm
 
Breadth First Search & Depth First Search
Breadth First Search & Depth First SearchBreadth First Search & Depth First Search
Breadth First Search & Depth First Search
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
Backtracking
BacktrackingBacktracking
Backtracking
 
Graph traversal-BFS & DFS
Graph traversal-BFS & DFSGraph traversal-BFS & DFS
Graph traversal-BFS & DFS
 
AI Lecture 4 (informed search and exploration)
AI Lecture 4 (informed search and exploration)AI Lecture 4 (informed search and exploration)
AI Lecture 4 (informed search and exploration)
 
Shortest path algorithm
Shortest path algorithmShortest path algorithm
Shortest path algorithm
 
Turing machine seminar report
Turing machine seminar reportTuring machine seminar report
Turing machine seminar report
 
SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS
 
All pairs shortest path algorithm
All pairs shortest path algorithmAll pairs shortest path algorithm
All pairs shortest path algorithm
 
Tower of Hanoi
Tower of HanoiTower of Hanoi
Tower of Hanoi
 
linear search and binary search
linear search and binary searchlinear search and binary search
linear search and binary search
 
LR(1) and SLR(1) parsing
LR(1) and SLR(1) parsingLR(1) and SLR(1) parsing
LR(1) and SLR(1) parsing
 

Viewers also liked

Chessboard Puzzles Part 3 - Knight's Tour
Chessboard Puzzles Part 3 - Knight's TourChessboard Puzzles Part 3 - Knight's Tour
Chessboard Puzzles Part 3 - Knight's TourDan Freeman
 
Chessboard Puzzles Part 4 - Other Surfaces and Variations
Chessboard Puzzles Part 4 - Other Surfaces and VariationsChessboard Puzzles Part 4 - Other Surfaces and Variations
Chessboard Puzzles Part 4 - Other Surfaces and VariationsDan Freeman
 
Chessboard Puzzles Part 2 - Independence
Chessboard Puzzles Part 2 - IndependenceChessboard Puzzles Part 2 - Independence
Chessboard Puzzles Part 2 - IndependenceDan Freeman
 
Introduccion a prolog
Introduccion a prologIntroduccion a prolog
Introduccion a prologJeffoG92
 
Prolog Code [Family Tree] by Shahzeb Pirzada
Prolog Code [Family Tree] by Shahzeb PirzadaProlog Code [Family Tree] by Shahzeb Pirzada
Prolog Code [Family Tree] by Shahzeb PirzadaShahzeb Pirzada
 
Prolog programming
Prolog programmingProlog programming
Prolog programmingHarry Potter
 
Chessboard Puzzles Part 1 - Domination
Chessboard Puzzles Part 1 - DominationChessboard Puzzles Part 1 - Domination
Chessboard Puzzles Part 1 - DominationDan Freeman
 
A biased random-key genetic algorithm for the Steiner triple covering problem
A biased random-key genetic algorithm for the Steiner triple covering problemA biased random-key genetic algorithm for the Steiner triple covering problem
A biased random-key genetic algorithm for the Steiner triple covering problemgomgcr
 
Chessboard Puzzles Part 2 - Independence
Chessboard Puzzles Part 2 - IndependenceChessboard Puzzles Part 2 - Independence
Chessboard Puzzles Part 2 - IndependenceDan Freeman
 
Chessboard Puzzles Part 1 - Domination
Chessboard Puzzles Part 1 - DominationChessboard Puzzles Part 1 - Domination
Chessboard Puzzles Part 1 - DominationDan Freeman
 
Chessboard Puzzles Part 3 - Knight's Tour
Chessboard Puzzles Part 3 - Knight's TourChessboard Puzzles Part 3 - Knight's Tour
Chessboard Puzzles Part 3 - Knight's TourDan Freeman
 
Logic Programming and Prolog
Logic Programming and PrologLogic Programming and Prolog
Logic Programming and PrologSadegh Dorri N.
 
Introduction to graph theory (All chapter)
Introduction to graph theory (All chapter)Introduction to graph theory (All chapter)
Introduction to graph theory (All chapter)sobia1122
 
Chess camp 3. checkmates with many pieces
Chess camp 3. checkmates with many piecesChess camp 3. checkmates with many pieces
Chess camp 3. checkmates with many piecesNelson ruiz
 
Graph theory short presentation
Graph theory short presentationGraph theory short presentation
Graph theory short presentationmjr989
 

Viewers also liked (20)

Chessboard Puzzles Part 3 - Knight's Tour
Chessboard Puzzles Part 3 - Knight's TourChessboard Puzzles Part 3 - Knight's Tour
Chessboard Puzzles Part 3 - Knight's Tour
 
Chessboard Puzzles Part 4 - Other Surfaces and Variations
Chessboard Puzzles Part 4 - Other Surfaces and VariationsChessboard Puzzles Part 4 - Other Surfaces and Variations
Chessboard Puzzles Part 4 - Other Surfaces and Variations
 
Chessboard Puzzles Part 2 - Independence
Chessboard Puzzles Part 2 - IndependenceChessboard Puzzles Part 2 - Independence
Chessboard Puzzles Part 2 - Independence
 
Introduccion a prolog
Introduccion a prologIntroduccion a prolog
Introduccion a prolog
 
Prolog Code [Family Tree] by Shahzeb Pirzada
Prolog Code [Family Tree] by Shahzeb PirzadaProlog Code [Family Tree] by Shahzeb Pirzada
Prolog Code [Family Tree] by Shahzeb Pirzada
 
Ch10 Recursion
Ch10 RecursionCh10 Recursion
Ch10 Recursion
 
Prolog programming
Prolog programmingProlog programming
Prolog programming
 
ESTRATEGIA
ESTRATEGIAESTRATEGIA
ESTRATEGIA
 
The Queen’s Movement
The Queen’s MovementThe Queen’s Movement
The Queen’s Movement
 
Chessboard Puzzles Part 1 - Domination
Chessboard Puzzles Part 1 - DominationChessboard Puzzles Part 1 - Domination
Chessboard Puzzles Part 1 - Domination
 
A biased random-key genetic algorithm for the Steiner triple covering problem
A biased random-key genetic algorithm for the Steiner triple covering problemA biased random-key genetic algorithm for the Steiner triple covering problem
A biased random-key genetic algorithm for the Steiner triple covering problem
 
Chessboard Puzzles Part 2 - Independence
Chessboard Puzzles Part 2 - IndependenceChessboard Puzzles Part 2 - Independence
Chessboard Puzzles Part 2 - Independence
 
Chessboard Puzzles Part 1 - Domination
Chessboard Puzzles Part 1 - DominationChessboard Puzzles Part 1 - Domination
Chessboard Puzzles Part 1 - Domination
 
Chessboard Puzzles Part 3 - Knight's Tour
Chessboard Puzzles Part 3 - Knight's TourChessboard Puzzles Part 3 - Knight's Tour
Chessboard Puzzles Part 3 - Knight's Tour
 
Logic Programming and Prolog
Logic Programming and PrologLogic Programming and Prolog
Logic Programming and Prolog
 
Introduction to graph theory (All chapter)
Introduction to graph theory (All chapter)Introduction to graph theory (All chapter)
Introduction to graph theory (All chapter)
 
Chess camp 3. checkmates with many pieces
Chess camp 3. checkmates with many piecesChess camp 3. checkmates with many pieces
Chess camp 3. checkmates with many pieces
 
Chaps 1-3-ai-prolog
Chaps 1-3-ai-prologChaps 1-3-ai-prolog
Chaps 1-3-ai-prolog
 
Network &amp; graph theory
Network &amp; graph theoryNetwork &amp; graph theory
Network &amp; graph theory
 
Graph theory short presentation
Graph theory short presentationGraph theory short presentation
Graph theory short presentation
 

Similar to Knight’s tour algorithm

Order-Picking-Policies.ppt
Order-Picking-Policies.pptOrder-Picking-Policies.ppt
Order-Picking-Policies.pptTaspiyaAfroz
 
Circle drawing algo.
Circle drawing algo.Circle drawing algo.
Circle drawing algo.Mohd Arif
 
01-05-2023, SOL_DU_MBAFT_6202_Dijkstra’s Algorithm Dated 1st May 23.pdf
01-05-2023, SOL_DU_MBAFT_6202_Dijkstra’s Algorithm Dated 1st May 23.pdf01-05-2023, SOL_DU_MBAFT_6202_Dijkstra’s Algorithm Dated 1st May 23.pdf
01-05-2023, SOL_DU_MBAFT_6202_Dijkstra’s Algorithm Dated 1st May 23.pdfDKTaxation
 
Backtracking-N Queens Problem-Graph Coloring-Hamiltonian cycle
Backtracking-N Queens Problem-Graph Coloring-Hamiltonian cycleBacktracking-N Queens Problem-Graph Coloring-Hamiltonian cycle
Backtracking-N Queens Problem-Graph Coloring-Hamiltonian cyclevarun arora
 
2 cooper
2 cooper2 cooper
2 cooperYandex
 
CSE680-07QuickSort.pptx
CSE680-07QuickSort.pptxCSE680-07QuickSort.pptx
CSE680-07QuickSort.pptxDeepakM509554
 
EC8352-Signals and Systems - Laplace transform
EC8352-Signals and Systems - Laplace transformEC8352-Signals and Systems - Laplace transform
EC8352-Signals and Systems - Laplace transformNimithaSoman
 
Nyquist Stability Criterion
Nyquist  Stability CriterionNyquist  Stability Criterion
Nyquist Stability CriterionHussain K
 

Similar to Knight’s tour algorithm (20)

Order-Picking-Policies.ppt
Order-Picking-Policies.pptOrder-Picking-Policies.ppt
Order-Picking-Policies.ppt
 
Shortest path
Shortest pathShortest path
Shortest path
 
Circle drawing algo.
Circle drawing algo.Circle drawing algo.
Circle drawing algo.
 
Optimisation random graph presentation
Optimisation random graph presentationOptimisation random graph presentation
Optimisation random graph presentation
 
01-05-2023, SOL_DU_MBAFT_6202_Dijkstra’s Algorithm Dated 1st May 23.pdf
01-05-2023, SOL_DU_MBAFT_6202_Dijkstra’s Algorithm Dated 1st May 23.pdf01-05-2023, SOL_DU_MBAFT_6202_Dijkstra’s Algorithm Dated 1st May 23.pdf
01-05-2023, SOL_DU_MBAFT_6202_Dijkstra’s Algorithm Dated 1st May 23.pdf
 
Heuristic search
Heuristic searchHeuristic search
Heuristic search
 
Graph
GraphGraph
Graph
 
Graph
GraphGraph
Graph
 
Backtracking-N Queens Problem-Graph Coloring-Hamiltonian cycle
Backtracking-N Queens Problem-Graph Coloring-Hamiltonian cycleBacktracking-N Queens Problem-Graph Coloring-Hamiltonian cycle
Backtracking-N Queens Problem-Graph Coloring-Hamiltonian cycle
 
Unit 3 daa
Unit 3 daaUnit 3 daa
Unit 3 daa
 
rahul.ppt
rahul.pptrahul.ppt
rahul.ppt
 
Stochastic Process Exam Help
Stochastic Process Exam HelpStochastic Process Exam Help
Stochastic Process Exam Help
 
Stochastic Process Assignment Help
Stochastic Process Assignment HelpStochastic Process Assignment Help
Stochastic Process Assignment Help
 
2 cooper
2 cooper2 cooper
2 cooper
 
1. Random walk.pdf
1. Random walk.pdf1. Random walk.pdf
1. Random walk.pdf
 
CSE680-07QuickSort.pptx
CSE680-07QuickSort.pptxCSE680-07QuickSort.pptx
CSE680-07QuickSort.pptx
 
EC8352-Signals and Systems - Laplace transform
EC8352-Signals and Systems - Laplace transformEC8352-Signals and Systems - Laplace transform
EC8352-Signals and Systems - Laplace transform
 
DIJKSTRA_123.pptx
DIJKSTRA_123.pptxDIJKSTRA_123.pptx
DIJKSTRA_123.pptx
 
Nyquist Stability Criterion
Nyquist  Stability CriterionNyquist  Stability Criterion
Nyquist Stability Criterion
 
Ch15 transforms
Ch15 transformsCh15 transforms
Ch15 transforms
 

Recently uploaded

Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 

Recently uploaded (20)

Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 

Knight’s tour algorithm

  • 2. GROUP MEMBERS Hassan Tariq (2008-EE-180) ZairHussainWani (2008-EE-178)
  • 4. What is ‘Knight’s Tour’? Chess problem involving a knight Start on a random square Visit each square exactly ONCE according to rules Tour called closed, if ending square is same as the starting
  • 5. Constraints A closed knight’s tour is always possible on an m x n chessboard, unless: m and n are both odd, but not 1 m is either 1, 2 or 4 m = 3, and n is either 4, 6 or 8
  • 6. m and n are both odd, but not 1
  • 7. Knight moves either from black square to white, or vice versa In closed tour knight visits even squares If m and n are odd i.e. 3x3, total squares are odd so tour doesn`t exist
  • 8. m = 1, 2, or 4; m and n are not both 1
  • 9. for m = 1 or 2, knight will not be able to reach every square for m = 4, the alternate pattern of white and black square is not followed so tour not closed
  • 10. m = 3; n = 4, 6, or 8
  • 11. Have to be verified for each case For n > 8, existence of closed tours can be proved by induction
  • 12. Algorithms Neural Network Solutions Warnsdorff’s Algorithm
  • 13. Neural Network Solutions Every move represented by neuron Each neuron initialized to be active or inactive ( 1 or 0 ) Each neuron having state function initialized to 0
  • 14. Neural Network Solutions (contd.) Ut+1 (Ni,j) = Ut(Ni,j) +2 –  Vt(N) NG(Ni,j) 1 Ut+1(Ni,j) > 3 Vt+1(Ni,j) = 0 Ut+1(Ni,j) < 0 Vt(Ni,j) otherwise
  • 15.
  • 16.
  • 17.
  • 18. Set P to be the position in S with minimum accessibility
  • 19. Mark the board at P with the current move numberReturn the marked board – each square will be marked with the move number on which it is visited.
  • 20. Comparison Neural networks Warnsdorff's Algorithm Complex algorithm (a lot of variables to be monitored) Longer run-time NOT always gives a complete tour Simple algorithm Linear run-time Always gives a CLOSED tour