What algorithm ca I use to determinate a path?

P

Piotre Ugrumov

I ahve this map of a musem:


7 -- EXIT(8) -- 3
| | |
6 -- 4 -- 2
| | |
5 -- ENTRY(0)--1

The number are the ID of the room. I must implement a method that takes an
ID and calculates the path to the exit.
I have inserted the map of the museum in a database. I have created a table
the fields of this table are: ID, RoomName, RoomOnLetf, RoomOnRight, RoomUp,
RoomDown.
For example the room 2:
ID RoomName RoomOnLeft RoomOnRight RoomUP RoomDown
2 Room2 4 --
3 1

This method must consult this table and must determinate the path to the
EXIT, this path must be inserted in a string.
What algorithm can I use to do this thing?
Where can I find it?
Thanks.
 
A

Andrew Thompson

"Piotre Ugrumov"..
I ahve this map of a musem:

Please do not multi-post Piotre,
and note that your question has little,
if anything, to do with Java.

Try Google shortest+path+algorithm..
 
D

Drew Volpe

Last time we met said:
This method must consult this table and must determinate the path to the
EXIT, this path must be inserted in a string.
What algorithm can I use to do this thing?
Where can I find it?

Why not ask your teacher for help ?


dv


--
--------------------------------------------------------------------------
The geographical center of Boston is in Roxbury. Due north of the
center we find the South End. This is not to be confused with South
Boston which lies directly east from the South End. North of the South
End is East Boston and southwest of East Boston is the North End.

Drew Volpe, mylastname at hcs o harvard o edu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top