How to get from one room of a one-story building

Assignment Help Computer Engineering
Reference no: EM132110201

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.

Reference no: EM132110201

Questions Cloud

Discuss the trade-offs between sharing and security : Provide an instance that comes close to your ideal balance between resource sharing and protection against unauthorized resource access.
Design a local area network for the given case study : MN621 Advanced Network Design Report Assignment - Local Area Network Design and Setup, MIT Australia. Design a local area network for the given case study
How large a problem can be solved in 1 second using an algo : Determine how large a problem can be solved in 1 second using an algorithm that requires f(n) operations, where each operation is carried out.
How to prove that a connected graph g without cycles : How to prove that a connected graph G without cycles has n-1 edges, where n > 0 is the number of nodes of G, using induction?
How to get from one room of a one-story building : If we attempt to go to a room that does not have a ringing phone, the program should not produce any output.
Prove by boolean algebraic manipulation : Prove by Boolean algebraic manipulation that the following expressions are valid. (a) z+y+x =x+y+z (b) ab +b +bc+ d=b+ d.
Create a blank sheet where you can enter your circuit : Create a blank sheet where you can enter your circuit. The "iDoc circuit should output according to the following formula.
Create a client-server connection using java code : Create a client-server connection using Java code that we've practiced in the Activities this semester.
Forensic challenges of umapolophous encryption : CSI6116 Network Security - Edith Cowan University - The forensic challenges of umapolophous encryption - What challenges stakeholders face due to offensive

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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