Suppose your job is to supervise the loading of two trucks, each of which can carry, at most, fourteen tons. The cargo is a variety of crates whose total weight is twenty-eight tons but whose individual weights vary from crate to crate. The weight of each crate is marked on its side. What heuristic would you use for dividing the crates between the two trucks?
Want to see the full answer?
Check out a sample textbook solutionChapter 11 Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Additional Engineering Textbook Solutions
Java: An Introduction to Problem Solving and Programming (7th Edition)
Concepts of Programming Languages (11th Edition)
C How to Program (8th Edition)
Introduction to Java Programming and Data Structures, Comprehensive Version (11th Edition)
Starting Out with Programming Logic and Design (4th Edition)
Database Concepts (8th Edition)
- PLEASE CODE IN PYTHON Problem Description:In order to ensure peace and prosperity for future generations, the United Nations is creating the world’s largest candy. The ingredients must be taken in railway cars from the top of a mountain and poured into Lake Geneva. The railway system goes steeply from the mountaintop down to the lake, with a T-shaped branch in the middle as shown below. Right now, each of the N ingredients is in its own railway car. Each railway car is assigned a positive integer from 1 to N. The ingredients must be poured into the lake in the order 1, 2, 3, . . . , N but the railway cars are lined up in some random order. The difficulty is that, because of the especially heavy gravity today, you can only move cars downhill to the lake, or sideways on the branch line. Is it still possible to pour the ingredients into the lake in the order 1, 2, 3, . . . , N ? For example, if the cars were in the order 2, 3, 1, 4, we can slide these into the lake in order as described…arrow_forwardytrarrow_forwardyuuyarrow_forward
- INTRODUCTION: Heat conduction from a cylindrical solid wall of a pipe can be determined by the follow T1-T2 q = 2nLk R2 In R. where: q is the computed heat conduction in Watts. k is the thermal conductivity of the pipe material in Watts/°C/m. L is the length of the pipe in cm. Ri is the inner radius of the pipe in cm. R2 is the outer radius of the pipe in cm. Ti is the internal temperature in °C. T2 is the external temperature in °C. ASSIGNMENT: Write a C program that will allow the user to enter the inner and outer radii of the pipe, the the internal and external temperatures. Once the user enters the input values, the programarrow_forwardComputer Science Investing in stocks is a way to create assets that are supposed to provide financial security over time. In solving this problem, we assume that an investor buys several shares of stock at a certain price. These shares are going to be sold later on for a different price. Obviously, if the selling price is higher than the acquisition price, the investor makes a profit, registering capital gain. If the shares are sold at a lower price, the investor has a loss, which marks a negative capital gain. This whole process is done over a period of time, and you are required to create a scenario for buying and selling shares. The assumption is that the investor sells shares in the order in which they were purchased. The goal is to calculate the capital gain over time. Suppose that you buy n shares of stock or mutual fund for d dollars each. Later, you sell some of these shares. If the sale price exceeds the purchase price, you have made a profit—a capital gain. On the other…arrow_forwardThere are two isotopes of an unknown element, X-19 and X-21. The abundance of X-19 is 14.29%. A weighted average uses the percentages of each isotope to scale their contribution to the total mass. Each isotope's contribution is the percentage (in decimal form) multiplied by the mass of the isotope. What is the contribution (in amu) to the weighted average from the X-19 isotope, which has a mass of 19.00 amu?arrow_forward
- In C Programming Language solve the following programarrow_forwardplease. use matlab.arrow_forwardThis must be done using CORAL language. Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go north/south, and evens (like the 10 or 90) go east/west. Auxiliary highways are numbered 100-999, and service the primary highway indicated by the rightmost two digits. Thus, the 405 services the 5, and the 290 services the 90. Given a highway number, indicate whether it is a primary or auxiliary highway. If auxiliary, indicate what primary highway it serves. Also indicate if the (primary) highway runs north/south or east/west. Ex: If the input is: 90 the output is: The 90 is primary, going east/west. Ex: If the input is: 290 the output is: The 290 is auxiliary, serving the 90, going east/west. Ex: If the input is: 0 or any number not between 1 and 999, the output is: 0 is not a valid interstate highway number.arrow_forward
- Fergusonball players are given a star rating based on the number of points that they score and the number of fouls that they commit. Specifically, they are awarded 5 stars for each point scored, and 3 stars are taken away for each foul committed. For every player, the number of points that they score is greater than the number of fouls that they commit. Your job is to determine how many players on a team have a star rating greater than 40. You also need to determine if the team is considered a gold team which means that all the players have a star rating greater than 40. Input Specification The first line of input consists of a positive integer N representing the total number of players on the team. This is followed by a pair of consecutive lines for each player. The first line in a pair is the number of points that the player scored. The second line in a pair is the number of fouls that the player committed. Both the number of points and the number of fouls, are non-negative integers.…arrow_forwardThis is the warning ⚠️. I know you guys are using an AI tool . But if you send me AI generated answer or plagiarised response then I'll reduce your rating and report for sure.arrow_forward1. You need to take a trip by car to another town that you have never visited before. Therefore, you are studying a map to determine the shortest route to your destination. Depending on which route you choose, there are five other towns (call them A, B, C, D, E) that you might pass through on the way. The map shows the mileage along each road that directly connects two towns without any intervening towns. These numbers are summarized in the following table, where a dash indicates that there is no road directly connecting these two towns without going through any other towns. Miles between Adjacent Towns Town A B C D E Destination Origin 40 60 50 A 10 65 B 10 20 55 40 20 50 65 55 10 60 E 40 50 10 80 Formulate this problem as a shortest-route problem and find the shortest path.arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrOperations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks Cole