Design algorithm and give pseudo code to step through maze

Assignment Help Data Structure & Algorithms
Reference no: EM131373817

Assignment: Algorithmic Design

Given a grid maze similar to the following:

2449_Grid.jpg

design an algorithm and give the pseudo code to step through the maze starting at position (1, 1) and get to position (xMax -1, yMax -1). Remember to keep it generic, so don't use the example's dimensions in favor of xMax and yMax. Show that your algorithm works by tracing its steps, using the example maze for your demonstration.

‘robot' knows x,y position and facing(North, South, East, or West)

Commands given in class:

isWallInFront (abbreviated isWall) returns T if there is a wall in the next space in the facing direction, otherwise F.

atDestination returns T if x,y == position(xMax-1, yMax -1), otherwise F.

turnLeft (abbreviated TL) changes facing 90 degrees counter-clockwise.

turnRight (abbreviated TR) changes facing 90 degrees clockwise.

moveForward (abbreviated Move or Step) changes the x,y position by 1 in the facing direction.

if (condition){} If the condition is true, do what is in the brackets, no loopback.

while (condition) {} If the condition is true, do what is in the brackets and loopback.

Reference no: EM131373817

Questions Cloud

What you plan to accomplish and why : what you plan to accomplish and why, include an overview of the situation or organization and what the situation/problem is that you intend to improve - usually 1-2 pages) Cite and support all content appropriately
Examination of descriptive statistics : Determine the research questions. What statistics will explain your situation - How was the sample collected? What was the probably sampling method and What is the level of measurement - nominal, ordinal, interval, ratio?
What would be the maximum prison sentence : What would be the maximum prison sentence and fines that any individual would face? What would be the maximum fine that the company would face? If you were facing criminal charges under the Act, what would be your best defense
Explain concept of variable air volume in a zoning system : Explain the difference between two-position and modulating damper control.
Design algorithm and give pseudo code to step through maze : Design an algorithm and give the pseudo code to step through maze starting at position (1, 1) and get to position (xMax -1, yMax -1). Remember to keep it generic, so don't use example's dimensions in favor of xMax and yMax.
Describe the business leader development to become a leader : Section 1: Business Leadership Background and Traits. Describe the business leader's development to become a leader. Describe the business leader's views on leadership
Who is more powerful in setting students or instructor : What sources of power are available to the students to effect change in the classroom?- What sources of power are available to the instructor? Who is more powerful in this setting-the students or the instructor?
Discuss the disadvantages of air bypass : Explain the reason zone control systems need a method for handling excess air.
Lower level participants in organizations to mobilize : What does it mean to say that all exercises of power are examples of exchanges? When a supervisor gives an order to a subordinate in an organizational setting, what is being exchanged?

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Design a class that keeps track of a student food purchases

Design a class that keeps track of a student's food purchases at the campus cafeteria. A meal card is assigned to an individual student. When a meal card is first issued, the balance is set to the number of points. If the student does not specify ..

  Describe idea of the algorithm using english language

Describe the overall idea of the algorithm using English language - Then present the algorithm details using pseudo code, be clear of the meaning of each variable, with comments on important steps to explain its purpose.

  Enhance the pseudocode using arrays and loops

Enhance the pseudocode in the attachment by using arrays and loops. Also, instead of hardcoding the product names within the program, ask the user to enter the product names in addition to the prices

  Plot the time complexity according to theoretical bounds.

Be sure to only include the time needed for sorted, excluding the time to generate the random numbers. Plot the results (input size, running time) for BubbleSort and MergeSort.

  Data mining algorithms

Assess the reliability of the data mining algorithms. Decide if they can be trusted and predict the errors they are likely to produce. Analyze privacy concerns raised by the collection of personal data for mining purposes

  Entity relationship diagram

Define context diagram and dfd of a variety store Entity relationship diagram

  2n-1 comparisons are necessary in the worst case

Prove that 2n-1 comparisons are necessary in the worst case to merge two sorted lists containing n elements each.

  Use big-o notation to categorize algorithms

Use big-O notation to categorize traditional grade school algorithms for addition and multiplication. That is, if asked to add two numbers each having N digits, determine individual additions should be performed?

  Question about unix commands

Assume you have a document called records.txt having the list of employee id and workers names. Every line contains a single employee id immediately followed by the employee name in the format Last name, First name.

  Creating sample spreadsheet for household budget

You do not need to put in personal data or actual values if you do not wish, but you must include some information for each of the various categories and income and expense line items.

  Program to convert this temperature in centigrade degree

Temperature of city in Fahrenheit degree is input through the keyboard Draw a flow chart; write an algorithm and program to convert this temperature in centigrade degree.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd