Question

How to solve this ? 3. (30 pts) Consider a hypothetical floor plan such that the area is organized in hexagonal cells as shown in Figure 3. We be

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution :-

In this question we initially begin at the cell called start and want to go till the cell marked end. We want to find the shortest path from the start to the end minimizing the steps. Each step is counted as 1 when we traverse from one cell to the another if they share an edge.

The algorithm follows the following steps :-

1. The start cell is considered as visited and the number 0 is written on the cell.

2. We can visit from one cell (written n on it) to another (written n + 1 on it), if and only if the neighbouring cell has not been visited earlier or the neighbouring cell has been visited before and holds the number m such that m > n+1.

That means is the destination cell is visited earlier and the number written on it is greater than n+1, that directly means, the new distance of the node is less than the previously calculated distance.

3. We stop when we no longer execute, that means all the cells in the given diagram has been traversed.

NOTE - This algorithm corresponds to the Breadth First Search algorithm of graph theory and it capable of finding the shortest path from the source node to the destination node.

In BFS (breadth-first search), we traverse all the node according to it's level with respect to the source nodeand this algorithm does the same.

Let's answer the question based on the given knowledge of the algorithm.

1. Fristly, as suggested in the question, the start is taken as 0. Now, when applying the algorithm, we will surround all the cells that share a single side with the starting cell with number 1 as n + 1 = 0 + 1 = 1.

Similarly, all the cells that share a side with all the cells numbered 1 will be numbered 2 and this process will continue till we number all the cells present in the diagram.

Hence, following the algorithm, we numbered all the cells and the resulted floor plan is shown in the below diagram.

The floor plan with all the cells numbered is shown below.

5 5 6 7 33 3 2 22 2 1 1 2 4 5 8 3 67 1 1 N 7 7 8 2 7 8 9 12 3 start 6 17 56 10 11 12 4 4 11 11 12 5 5 6 12 12 13 end

Here, in the above diagram, all the numbers are written on the cell by executing the algorithm.

So, we need to take 12 steps from the starting cell to reach the ending cell.

2. Yes, the algorithm always finds the shortest path, and is correct.

3. The worst floor plan can be shown below,

end start

With this floor plan, it will take N number of steps, that is the total number of cells present in the floor plan, to reach from the start to the end which is the maximum.

Because with each step towards right (from start to end), we cover every cell before reaching the end cell.

Hence a linear floor planing is the worst.

Add a comment
Know the answer?
Add Answer to:
How to solve this ? 3. (30 pts) Consider a hypothetical floor plan such that the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • computer networking help 4. 120 points) Consider a network with the following topology (1) Use Djikistra shortest...

    computer networking help 4. 120 points) Consider a network with the following topology (1) Use Djikistra shortest path algorithm to find the spanning tree which contains all form router A to the rest of the routers the network. Show the first 4 steps of the results of the algorithm. (Note that unless specified in figure, all link metrics are 1.) Answer: Step N LA 3.A 2.A (2) Assume that RIP is used as the routing protocol and all link metrics...

  • 2 pts Consider a state space where the start state is number 1 and the successor...

    2 pts Consider a state space where the start state is number 1 and the successor function for state n returns two states, numbers 2n and 2n+1 Draw the portion of the state space for states 1 to 15 (1 pt) Suppose the goal state is 11. List the order in which nodes will be visited for depth-limited search with limit 3 (0.5 pt), and iterative deepening search. (0.5 pt Figure 1 Set all nodes to "not visited" q new...

  • In this question, we will think about how to answer shortest path problems where we have more than just a single sourc...

    In this question, we will think about how to answer shortest path problems where we have more than just a single source and destination. Answer each of the following in English (not code or pseudocode). Each subpart requires at most a few sentences to answer. Answers significantly longer than required will not receive full credit You are in charge of routing ambulances to emergency calls. You have k ambulances in your fleet that are parked at different locations, and you...

  • 8. (Extra Credits: You can get up to 60% more!) A grid in Cartesian coordinates with...

    8. (Extra Credits: You can get up to 60% more!) A grid in Cartesian coordinates with size 6 x 4 is shown in Figure 2a. We start from the original point (0,0) and repeat moving 1 unit length to the next grid point by either moving up (denoted as U-action or right (denoted as R-action), until we reach the destination point (6,4). Each sequence of such R- and U-actions forms a path. Figure 2b shows an example path of this...

  • ***** running late, mere 3 hours left for due time, please help ** #needed in c++...

    ***** running late, mere 3 hours left for due time, please help ** #needed in c++ #inputfile MinPath2.txt 0   SF 1   LA 2   DALLAS 3   CONCORD 4   PHOENIX 5   CHICAGO 6   ST LOUIS 7   BOSTON 8   NY 9   LONDON 10   PARIS 11   TOKYO 12   BANGKOK 13   MEXICO CITY 14   MONTREAL -1   0   1   40 0   2   100 0   4   130 0   8   200 0   9   800 0   10   900 1   2   50 1   3   80 1   4   70 1   8  ...

  • In this question, you will test, using a backtracking algorithm, if a mouse can escape from...

    In this question, you will test, using a backtracking algorithm, if a mouse can escape from a rectangular maze. To ensure consistency of design, start your solution with maze_start.c. The backtracking algorithm helps the mouse by systematically trying all the routes through the maze until it either finds the escape hatch or exhausts all possible routes (and concludes that the mouse is trapped in the maze). If the backtracking algorithm finds a dead end, it retraces its path until it...

  • The Problem A robot is asked to navigate a maze. It is placed at a certain...

    The Problem A robot is asked to navigate a maze. It is placed at a certain position (the starting position) in the maze and is asked to try to reach another position (the goal position). Positions in the maze will either be open or blocked with an obstacle. Positions are identified by (x,y) coordinates. At any given moment, the robot can only move 1 step in one of 4 directions. Valid moves are: ● Go North: (x,y) -> (x,y-1) ●...

  • 3. (30 pts.) Implement the following ASM: Func(x, Y. Z, start, U, done) Input XIO:71, YIO:7. start: Output U[0:71 d...

    3. (30 pts.) Implement the following ASM: Func(x, Y. Z, start, U, done) Input XIO:71, YIO:7. start: Output U[0:71 done: A[O:7], Registers B[0:7], C[0:7); i: If start' goto Si S2: A -XII BYI1C-(00000000)11 done c-0 S3: A <" Add (A, B) 11 C <" Inc (C); .S4: IE A' 71 goto S3 S5:U- CIl done <1 11 goto $1 end Func Design a datapath subsystem that is adequate to execute the algorithm. i. Use a table to list the instructions...

  • 3. (30 pts.) Implement the following ASM Func (X, Y, Z, start, U, done) X[O:7], Y[0:7], input start; .Output U[0:7...

    3. (30 pts.) Implement the following ASM Func (X, Y, Z, start, U, done) X[O:7], Y[0:7], input start; .Output U[0:7], done Registers A(0:7], B[0:7], C[0:7); . Si: If start' goto S1; S2: A <= X 11 B <= Y 11 C <= (00000000) 11 done <= 0; S3: A <= Add (A, B) 11 C Inc (C); <= .S4: If A' [7] goto S3; · SS: U <= C 11 done <= 1 11 goto S1; end Func Design a...

  • 3. [Total: 30 pts] Later this semester, in our studies of Faraday's Law in electrodynamics, we...

    3. [Total: 30 pts] Later this semester, in our studies of Faraday's Law in electrodynamics, we will consider an infinitely long solenoid as example. To get prepared, we revise in this problem the calculation of the magnetic field inside such a solenoid generated by a constant current. a) [10 pts] Determine the magnetic field of a circular ring of current along the axis of the ring b) 10 pts Use the result from part a) to calculate the magnetic field...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT