If we attempt to go to a room that does not have a ringing


Prolog Programming:

For this programming assignment, we will be writing a program in Prolog that will tell us how to get from one room of a one-story building, to any other room in that building (if it's possible), by telling us all of the rooms we must go through to get to the destination room.

In addition to the previous statement, there will be phones ringing in one or more of the rooms.

Our prolog program should ONLY tell us how to get to those rooms.

If we attempt to go to a room that does not have a ringing phone, the program should not produce any output.

There are a couple of conditions that we should think about to help us frame the problem and hopefully help us understand how we should approach this problem.

If I give the program a starting room and an ending room, if there is a phone ringing in the ending room, the program should tell me how to get to that room (which rooms do I need to go through?).

Alternatively, if I give the program a starting room and an ending room, and there is no phone ringing in that room, the program should not return any output (actually, prolog should just print "no").

If I only give the program a starting room. The program should give me every possible sequence of rooms that I could go through, starting from the starting room that I gave it, to reach any room with a phone ringing.

If I only give the program an ending room, if there is a ringing phone in that room, the program should give me every possible sequence of rooms that I could go through (including multiple starting rooms, and all sequences that start with each of those rooms), to reach that room. If there is no phone ringing, it should simply return "no".

Finally, if I don't give the program any starting or ending room, it should simply return every possible sequence of rooms I must go through to reach all of the rooms with phones ringing.

Your program MUST use the room layout provided above. and, must work in GNU prolog.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: If we attempt to go to a room that does not have a ringing
Reference No:- TGS02903656

Expected delivery within 24 Hours