Information of the LO Subject: Data Structures, Algorithms Topic: Maze Routing Education Level: UG Problem Statement: Given a n x n maze, find a path from.

Slides:



Advertisements
Similar presentations
Numbers Treasure Hunt Following each question, click on the answer. If correct, the next page will load with a graphic first – these can be used to check.
Advertisements

AKC Rally Signs These are copies of the 2008 AKC Rally signs, as re-drawn by Chuck Shultz. Use them to print your own signs. Be prepared to use a LOT of.
AP STUDY SESSION 2.
1
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
Objectives: Generate and describe sequences. Vocabulary:
Slide 1 FastFacts Feature Presentation August 28, 2008 We are using audio during this session, so please dial in to our conference line… Phone number:
David Burdett May 11, 2004 Package Binding for WS CDL.
We need a common denominator to add these fractions.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Microsoft Access 2007 Advanced Level. © Cheltenham Courseware Pty. Ltd. Slide No 2 Forms Customisation.
Title Subtitle.
Prepared by: Workforce Enterprise Services For: The Illinois Department of Commerce and Economic Opportunity Bureau of Workforce Development ENTRY OF EMPLOYER.
Local Customization Chapter 2. Local Customization 2-2 Objectives Customization Considerations Types of Data Elements Location for Locally Defined Data.
Process a Customer Chapter 2. Process a Customer 2-2 Objectives Understand what defines a Customer Learn how to check for an existing Customer Learn how.
Custom Statutory Programs Chapter 3. Customary Statutory Programs and Titles 3-2 Objectives Add Local Statutory Programs Create Customer Application For.
Custom Services and Training Provider Details Chapter 4.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt BlendsDigraphsShort.
LIBRARY WEBSITE, CATALOG, DATABASES AND FREE WEB RESOURCES.
1 Advanced Tools for Account Searches and Portfolios Dawn Gamache Cindy Bylander.
1 Click here to End Presentation Software: Installation and Updates Internet Download CD release NACIS Updates.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Windows XP Project An Introduction to Microsoft Windows XP and Office 2003.
Break Time Remaining 10:00.
Turing Machines.
Table 12.1: Cash Flows to a Cash and Carry Trading Strategy.
1. 2 Its almost time to take the FCAT 2.0! Here are some important explanations and reminders to help you do your very best.
PP Test Review Sections 6-1 to 6-6
Bright Futures Guidelines Priorities and Screening Tables
EIS Bridge Tool and Staging Tables September 1, 2009 Instructor: Way Poteat Slide: 1.
Health Artifact and Image Management Solution (HAIMS)
Bellwork Do the following problem on a ½ sheet of paper and turn in.
Exarte Bezoek aan de Mediacampus Bachelor in de grafische en digitale media April 2014.
Sample Service Screenshots Enterprise Cloud Service 11.3.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
Adding Up In Chunks.
FAFSA on the Web Preview Presentation December 2013.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
Note to the teacher: Was 28. A. to B. you C. said D. on Note to the teacher: Make this slide correct answer be C and sound to be “said”. to said you on.
Solving the eValue Rubik’s cube
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
Analyzing Genes and Genomes
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Clock will move after 1 minute
PSSA Preparation.
Chapter 11 Creating Framed Layouts Principles of Web Design, 4 th Edition.
Essential Cell Biology
Immunobiology: The Immune System in Health & Disease Sixth Edition
Chapter 13 Web Page Design Studio
Physics for Scientists & Engineers, 3rd Edition
Energy Generation in Mitochondria and Chlorplasts
Select a time to count down from the clock above
Murach’s OS/390 and z/OS JCLChapter 16, Slide 1 © 2002, Mike Murach & Associates, Inc.
Copyright Tim Morris/St Stephen's School
1.step PMIT start + initial project data input Concept Concept.
Know About E-CTLT Teachers Panel and working area.
Page 1 Orchard Harvest ™ LIS Find a Patient Training.
4/4/2015Slide 1 SOLVING THE PROBLEM A one-sample t-test of a population mean requires that the variable be quantitative. A one-sample test of a population.
How to create Magic Squares
Registry and Referral System HCW/PSW Staff User Manual
Information of the LO Subject: Information Theory
Presentation transcript:

Information of the LO Subject: Data Structures, Algorithms Topic: Maze Routing Education Level: UG Problem Statement: Given a n x n maze, find a path from start to finish by moving either horizontally or vertically without going through the walls. Authors: Mentor: Jasveer Singh T. Jethra Prof. Sachin Patkar Priyadarshan H 1

Pre requisites Before using this LO, the user should know about the following: No prerequisites 2

Learning objectives After interacting with this LO the user should be able to: Find a path in a maze from start to finish. 3

Keywords in this LO These are the keywords and their description in this LO 1.Live Node: This is a node which has been traversed and all possible ways of expansion have not been explored. 2. E-node: E-node or Expansion Node is the current node from which we explore for possible empty nodes in the neighbourhood. There is only one E-node at any instant. 3. Dead Node: If we leave a E-node from the direction in which this node was entered then it becomes a dead node. This node is to be treated as a wall in future. 4. Wall: It is a node (block) which cannot be entered. 4

5. Empty Node: This is a node which is available for traversal. 6. Start Node: It is the node from which we start traversing the maze. This node can never be a wall. 7. Finish Node: It is a node where we intend to reach. This node can never be a wall. 5

Element groups in this LO S. No.Name of the element group and Abbreviation Name of the elements in the group Rank of element group (in terms of the most important element group on the screen that students should focus on) 1: most important, 2: next in importance, … and so on 1Maze1 2Screen text 2 (Will not be available for Interactivity part) 3Interactivity Block 2 (Will not be available for Demo part) 4Legend3 6

Element groups in this LO – Sample template of LO 7 Maze On screen text/Interact ivity block Legend

Write the name of the element group 1 - Maze The title of each column explains contains guidelines on the details required. ) 8 Name of the element AbbreviationReference image Image for using in LO Functional or interactivity details Connected to Maze Explained in next slide Wall # Maze is made of these blocks. Empty Block # Live node# Expansion node E-node# Dead node# Start Node# Finish Node# # Refer Keywords slide No. 4 Start Finish

Functionality of Maze 9 It is a square area of n x n blocks with walls on the four sides of the boundary and walls at some places within the n x n area. In the square area excluding the walls, the (1,1) block represents the start node and (n,n) block represents the finish node. These blocks are always empty. The figure in slide no. 13 shows a maze with all empty blocks surrounded by walls. The fig in slide no. 17 shows a maze with walls within.

Write the name of the element group 3 - Interactivity The title of each column explains contains guidelines on the details required. ) 10 Name of the element Abbreviati on Referenc e image Image for using in LO Functional or interactivity details Wall Style Dropdown box 1.Default 2.Predefined path 3.No path (Refer next slide for functionality of wall styles) Find path Button If a user clicks on the find path button, the algorithm starts executing. (For example of operation refer slides 15 to 42)

Functionality of Wall styles 11 1.Default: When user selects this style, the animator can choose any maze of n x n size which should be legibly displayable on the screen with the only constraint that there should not be any walls in the interior of the wall. 2.Predefined Path: When user selects this style, the animator can choose any maze of n x n size which should be legibly displayable on the screen with the only constraint that there should exist a path from start to finish. For instance, see the maze shown in slide no No Path: When user selects this style, the animator can choose any maze of n x n size which should be legibly displayable on the screen with the only constraint that there should NOT exist any path from start to finish. For instance, in any maze surround the Finish Node with walls.

Write the name of the element group 4 - Legend The title of each column explains contains guidelines on the details required. ) 12 Start Finish Wall Empty Node Live Node Expansion Node (E-node) Dead Node Start Node Finish Node Legend: Interactivity (for both Demo and Interactivity part): When the user places the mouse pointer on top of any of the legend objects, popup a message which defines that particular object. Use the definition as given in the Keywords (Refer Slide no. 4). For instance, if the user places his mouse pointer on Wall object, then popup It is a node (block) which cannot be entered.

Supportive image for step 1 13 Start Finish

Step 1 14 S. No. Description of the action / interactivity Start Time of the action End Time of the action Audio narratio n On screen text 1. Image shows a typical maze of size 6x6 surrounded by walls 010 Problem Statement: Find a path from start to finish by moving either horizontally or vertically without going through the walls.

Maze Routing Algorithm 15 1.Begin from the start node. 2.Start node becomes live node. 3.Now this live node will become the E-node. 4.For start node apply the Precedence Rule no A. If empty node does not exist then Print No path found and jump to step 10. B. Else make the new empty node as live node. 6.A. If this node is the finish node then we have successfully routed the maze. Jump to step 10. B. Else this node becomes our E-node. 7.Apply precedence rule to this E-node. 8.A. If precedence no. 4 is selected then E-node becomes dead node. (This node was already made live node previously). i. If the E-node is start node. then print No path found. Jump to step 10. B. Else make the new empty node live node. 9.Jump to step End. Note: 1. A live node will remain alive unless it becomes dead. 2. There is only one E-node at any instant. 3. For Precedence Rule refer next slide.

Precedence rule 16 Case no. 1 : If the incoming direction is from the left, then precedence for selecting the new empty node is shown in the fig. (a). Case no. 3 : If the incoming direction is from the right, then precedence for selecting the new empty node is shown in the fig. (c). Case no. 2 : If the incoming direction is from the top, then precedence for selecting the new empty node is shown in the fig. (b). Case no. 4 : If the incoming direction is from the bottom, then precedence for selecting the new empty node is shown in the fig. (d). Figure (a) Figure (b) Figure (c) Figure (d)

Supportive image for step 2 (fig. 0) 17 Start Finish

Step 2 - Demo 18 Fig. No. Description of the action / interactivity Start Time of the action End Time of the action Audio narrati on On screen text 0. Display the maze shown in the previous slide and jump to fig 1. 0 sec3 sec Problem Statement: Find a path from start to finish by moving either horizontally or vertically without going through the walls. 1.The Start node becomes Live Node. 3 sec4 sec The Start node becomes Live Node. 2.This node becomes E-node. 3. Choose the next node using Precedence case no. 1. (Slide no. 16) and make it the Live Node. Search for empty node scanning clockwise from the top. (Neglect diagonal nodes). This empty node becomes Live Node. 4. This node becomes E-node. The previous node loses its E-node status. The recent Live Node becomes E- node. The previous node loses its E- node status. 5. The next Live Node is chosen using appropriate precedence rule. The next Live Node is chosen by scanning clockwise from the direction that we entered. 6. This node becomes E-node. The previous node loses its E-node status. Note: The nos. in the Fig. no. column represents the fig. no. mentioned in supportive images for step 2

Supportive image for step 2 (fig. 1) 19 Start Finish

Supportive image for step 2 (fig. 2) 20 Start Finish

Supportive image for step 2 (fig. 3) 21 Start Finish

Supportive image for step 2 (fig. 4) 22 Start Finish

Supportive image for step 2 (fig. 5) 23 Start Finish

Supportive image for step 2 (fig. 6) 24 Start Finish

Step 2 – Demo (contd.) 25 Fig. No. Description of the action / interactivity Start Time of the action End Time of the action Audi o narr ation On screen text 7. Application of Precedence case no. 1 results in direction no. 4. So this node becomes Dead Node. The next node which was Live Node becomes E-node now. For this node the outgoing direction is same as incoming direction so the node becomes Dead Node and the next node which was Live Node becomes E-Node now. 8. The next Live Node is chosen using Precedence Rule case no. 3. The direction no. is 1. Again using the same kind of clockwise scanning starting from the incoming direction the next Live Node is the node below the E-Node. 9. This node becomes E-node. The previous node loses its E-node status. 10. The next Live Node is chosen using Precedence Rule case no. 2. The direction no. is 2. (This step is not shown in the example figures but the animator should show it by making the new live node green first *). This node becomes E-node.(only this step is shown in the figure.) Scanning clockwise from right choose the next Live node which is below the current E-Node Refer to Maze Routing algorithm (slide no. 15) and match it with the fig * Note: This is continued in the next slide as well so please create appropriate intermediate figures for remaining steps.

Supportive image for step 2 (fig. 7) 26 Start Finish

Supportive image for step 2 (fig. 8) 27 Start Finish

Supportive image for step 2 (fig. 9) 28 Start Finish

Supportive image for step 2 (fig. 10) 29 Start Finish

Supportive image for step 2 (fig. 11) 30 Start Finish

Supportive image for step 2 (fig. 12) 31 Start Finish

Supportive image for step 2 (fig. 13) 32 Start Finish

Supportive image for step 2 (fig. 14) 33 Start Finish

Supportive image for step 2 (fig. 15) 34 Start Finish

Supportive image for step 2 (fig. 16) 35 Start Finish

Supportive image for step 2 (fig. 17) 36 Start Finish

Supportive image for step 2 (fig. 18) 37 Start Finish

Supportive image for step 2 (fig. 19) 38 Start Finish

Supportive image for step 2 (fig. 20) 39 Start Finish

Supportive image for step 2 (fig. 21) 40 Start Finish

Supportive image for step 2 (fig. 22) 41 Start Finish

Supportive image for step 2 (fig. 23) 42 Start Finish

Question 1: Can a finish node become a Dead Node? Answers: 1. Yes2. No3. Sometimes Correct answer: 2 Feedback/Justification to be displayed: If user clicks correct answer then display: Correct! As soon as the Finish Node becomes Live Node, the algorithm terminates. If user clicks incorrect answer then display Have a look at the animation and Try again! 43

Question 2:When Start Node becomes a Dead Node then Answers: 1.Path is found 2.No path is found 3.Start Node cannot become a Dead Node Correct answer: 2 Feedback/Justification to be displayed: If user clicks correct answer then display Correct! As soon as the Start Node becomes Dead Node, the algorithm terminates. If user clicks incorrect answer then display Have a look at the animation and Try again! 44

Question 3: Consider the situation as shown in the figure, The next E-node is.. Answers: a)1 b)2 c)3 d)4 Correct answer: a Feedback/Justification to be displayed: If user clicks correct answer then display Correct! Make sure you can explain the reasoning! If user clicks incorrect answer then display Scan Clockwise starting from the incoming direction. The direction is from 2 as it the only Live Node other than the E-node.

Question 4: If no path is found, then select the option which will always stand true.. Answers: a)All blocks are either Dead Nodes or walls. b)All blocks which were Live Nodes are Dead. c)There are no Dead Nodes. d)None of the above Correct answer: b 46 Feedback/Justification to be displayed: If user clicks correct answer then display Correct! A node can become a Dead Node only if it leaves E-node from the direction from which it entered. If user clicks incorrect answer then display Have a look at the animation and Try again!

References Website links: aze.htm Books: Data Structures, Algotithms amd Analysis by Sahni and Sartaj. 47