Crossing a canyon on a cable bridge

Assignment Help Programming Languages
Reference no: EM13700775

Crossing a Canyon on a Cable Bridge.

Five friends must cross a canyon at night over a cable bridge. The primitive bridge is not very strong and only two people can cross at a time. They have only one lamp to see where they step. Because of this, one of the friends must return the lamp to the starting side for the others to cross.

Furthermore, the friends are not able to cross at the same speed. Thorin is able to cross in one minute, Fili in 3 minutes, Nori in 6 minutes, Bofur in 8 minutes and Balin in 12 minutes. When two friends cross together, they can only cross at the speed of the slower of the two.

They must make the crossing in less than 30 minutes.

Do not forget to count the time to go and return. For example, Fili crossing with Nori takes 6 minutes, and then Filli returning takes another 3 minutes and then Filli crossing with Thorin takes another 3 minutes, etc.

Construct a Prolog program using in-depth research to find a solution to this problem. It must compile with no errors and follow the directions.

 

Reference no: EM13700775

Questions Cloud

Rational class performs operations on fractions : Write a C++ program that, using the rational class performs operations on fractions. Test your class thoroughly.
What compounds result from the reaction : Question- What happens to sodium azide when it is dissolved in water? What compounds result from this reaction?
Design an adt for a two color double stack : Design an adt for a two color double stack adt that consists of two stacks one red and one blue and has its operations color coded versions of the regular stack adt operations.
The oxidation number of chlorine goes from what to what : Question- As the reaction represented above proceeds to the right, the oxidation number of chlorine goes from what to what
Crossing a canyon on a cable bridge : Construct a Prolog program using in-depth research to find a solution to this problem. It must compile with no errors and follow the directions.
Powers of a user specified range of integer numbers : Write a C program to print a table of the powers of a user specified range of integer numbers. The program should also print the sum of the powers of the numbers.
Explain the mixture was gently stirred as the ice melted : The mixture was gently stirred as the ice melted and the lowest temperature reached by the water was recorded. The cup and its contents were weighed again. The purpose of weighing the cup and its contents at the end of the experiment
How it adds flexibility to the operating system : UNIX treats all devices as files. Explain why this is an innovative feature when it was first introduced and how it adds flexibility to the operating system
Determine the molality of the solution : Question- An aqueous solution that is 50.0 percent sulfuric acid (H2SO4) by mass has a density of 1.221 g/ml. Determine the molality of the solution

Reviews

Write a Review

Programming Languages Questions & Answers

  Write if statement to display acceptance messag

Write an if statement that displays an acceptance message for an astronaut candidate if the person's weight is between the values of opt_min.

  Describing program using suiatble printf command

Yyou have to describe all of this to user using suiatble printf() statements.

  Program application to check donation amount

Additionally, program application to check that donation amount and number of donations are positive numbers. If either donation amount or number of donations is not positive value.

  Write program to create n-dimensional array on th runtime

Write a program to create an n-dimensional array on the runtime with the help of pointers. The user will enter on the run time that how many dimensions are required.

  Write program which lets user enter charge account number

Write the program which lets user enter a charge account number. The program must determine if number is valid by checking for it in following list.

  Write a program for a calculator

Write a program for a Calculator that can do two operations, + and -. This calculator should be able to add or subtract two numbers of any size. You may use Recursion if you want.

  Write program which uses while loops to input two integers

Write the program which uses while loops to perform the following steps: prompt the user to input two integers: firstNum and secondNum.(firstNum must be less than secondNum.

  Building airline reservation system

Problem Description The aim of this project is to build airline reservation system. System must give two basic sets of services to an airline: First set of services allows the airline to provision its system.

  Customer ordering mobile app of a pizza house

Application should be adaptive enough to render on multiple devices with various form factors. To make customer experience best advanced capabilities like geo-location, augmented reality and mashups should be used.

  Write program that merges two files

The first programming project involves writing a program that merges two files that contain polynomials. To merge two files, the input files must be in sorted order.

  Write a c function called values that returns void

Write a C function called values that returns void and takes two double precision arguments (called a and b) and one double precision array argument.

  Compute and display total number of votes received

Display the table with appropriate labels for the rows and columns. Compute and display the total number of votes received by each candidate and the percentage of the total votes cast.

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