Create a correct way of representing the state of the robot

Assignment Help Data Structure & Algorithms
Reference no: EM13985700

A robot moves around in a confined space (shown in diagram below) which can be represented using a 10 X 10 grid of cells where the cells marked 'X' are unsurpassable walls (thus the diagram shows walls surrounding the space and also a wall inside the space). At any given time the robot is located inside a non-wall cell and faces one of four directions - north, south, east or west. The robot can act in one of two ways - (i) turn to face one of two directions from whichever direction it was facing by rotating 90 degress clockwise or counter-clockwise (i.e. from facing north it can face east or west, from facing east it can face north or south etc.) or (ii) move to the next non-wall cell it is facing. Additionally, as shown in the diagram, the robot starts in the cell labeled 'S' facing East and its goal is to reach the cell labeled 'G' (it does not matter what direction it faces once it lands inside G).

Your task is to -

(a) create a correct way of representing the state of the robot

(b) write down an optimal path (as a sequence of states) from the starting state to goal state assuming that the cost of a turn and a move are both 1

(c) write down an optimal path (as a sequence of states) from the starting state to goal state assuming that the cost of a turn is 2 and the cost of a move is 1.

Reference no: EM13985700

Questions Cloud

What does it mean to view race as a social construction : What does it mean to view race as a social construction? What are some examples? How does this view compare with the traditional, biological view of race
Trade line is equal to average of possible trading prices : The slope of the trade line is equal to the average of all possible trading prices. world price of the good on the horizontal axis. world price of the good on the vertical axis. productivity of labor in producing the good on the horizontal axis. oppo..
What are the benefits and risks of cloud computing : If you refer to ideas on a web site, be sure to include the link to the source. If this is not an electronic source with a link, then list as much information as possible
Deadweight loss from a tariff : Which of the following would be a deadweight loss from a tariff? select one the shift of consumer surplus to government the increase in producer surplus the decrease in consumer surplus
Create a correct way of representing the state of the robot : A robot moves around in a confined space (shown in diagram below) which can be represented using a 10 X 10 grid of cells where the cells marked 'X' are unsurpassable walls (thus the diagram shows walls surrounding the space and also a wall inside ..
Determine the gross income of the beneficiaries : Ben's employer was downsizing and offered employees an amount equal to one year's salary if the employee would voluntarily retire.
Shift of aggregate supply leftward shift of aggregate supply : Economic growth would be illustrated by select one d a rightward shift of aggregate demand a leftward shift of aggregate demand a rightward shift of aggregate supply a leftward shift of aggregate supply
The introduction of a stylish line of toyotas : The introduction of a stylish line of Toyotas makes some consumers prefer foreign cars over domestic cars.
Probability calculation involving random events : Probability calculation Involving Random Events These calculations involve the use of the empirical rule since all elements available for selection have the same chance of being chosen. Quantify the events, the Event to be calculated and he sample sp..

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  What are the different types of query optimization algorithm

Describe three data fragmentation strategies. Give some examples of each.

  Determine effective transfer rate

Assume a network transmits 1024 byte packets having a 128-byte header and a four byte checksum. If a workstation on the network is guaranteed to be able to transmit one packet every x time units,

  Design time randomized monte carlo algorithm

You have to design an O(n) time randomized Monte Carlo algorithm which computes an (1 + o)- approximate ham-sandwich cut with probability 1 - n-c for any given constant c > 0.

  Show how the following values would be stored by machines

Show how the following values would be stored by machines with 32-bit words, using little endian and big endian format. Assume each value starts at address 016. Draw a diagram of memory for each, placing the appropriate values in the correct (and ..

  What is object modeling and what are the alternatives

What is OBJECT modeling. What is involved. What are the alternatives

  Design randomized algorithm for solving decoding problem

The Viterbi algorithm is a deterministic algorithm for solving the Decoding problem. Design a randomized algorithm for solving the Decoding problem.

  What would happen if that information were compromised

What rights to privacy do people have when using the Internet at home? Are their privacy rights limited? Do those same rights and limits exist at work? Explain your answer.

  Short discussion on the concept of cryptography

The answer gives the learner with a short discussion on the concept of cryptography and the different aspects and functions that are provided through using encryption.

  Find the mean number of rounds per contention period

Two CSMA/CD stations are each trying to transmit long documents. After each frame is sent, they contend for the channel using the binary exponential backoff algorithm.

  Write algorithm which divides n objects of u into k clusters

Suggest the algorithm which divides n objects of U into k clusters, making use of MST of a graph. Give a simple argument of correctness and bound on the running time of the algorithm you are proposing.

  Huffmancodes

You will turn in one file: HuffmanCodes.java, which can encode and decode files using Huffman codes. The program has the following command-line interface:

  Two phase routing algorithm

Two Phase Routing Algorithm: use the analysis of the first phase to give a full analysis (no "symmetry" argument) of the second phase.

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