1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zhenek [66]
3 years ago
14

We have three containers whose sizes are 10 pints, 7 pints, and 4 pints, respectively. The 7-pint and 4-pint containers start ou

t full of water, but the 10-pint container is initially empty. - We are allowed one type of operation: pouring the contents of one container into another, stopping only when the source container is empty or the destination container is full. - We want to know if there is a sequence of pourings that leaves exactly 2 pints in the 7- or 4-pint container.

Computers and Technology
2 answers:
Tpy6a [65]3 years ago
6 0

Answer:

Here’s a way to solve this:

(7/7,4/4,0/10) Æ (7/7, 0/4, 4/10) Æ(1/7, 0/4, 10/10) Æ (1/7, 4/4, 6/10), (5/7, 0/4, 6/10) Æ  

(5/7, 4/4, 2/10) Æ (7/7, 2/4, 2/10), hence we end up with 2 pints in the 4‐pint container .

 To model this as a graph problem, we represent each potential state of the three containers with an ordered pair (A,B), where A represents the amount of water in the 7‐pint container and B represents the amount of water in the 4‐pint container.   

Hence the initial state would be(7,4).  Note that we do not need an ordered triple as we know the total amount of water in all three containers (11 pints). Therefore, the total state is completely determined by water in the 7 and 4 pint containers.  

Hence, we have 5 x 8 = 40 possible states for the system.  We model these states as nodes in a directed graph and draw an edge from one node to another node if we can go from the configuration represented by one node to the configuration represented by another node through one pour.  

For example, there would be an edge from (7,4) to (0,4) but  no edge from (1,3) to (5,1).   

Thus, if we can find a path from one node to another, then we can go from one state to another

through a series of pourings.  The nodes are represented in the attached file (the edges are left out).

Explanation:

Since we want to find a path from (7,4) to one of the nodes contained in one of the rectangles.  Our solution above is depicted in the attached file

Looking at the graph in attachment, we will start at node (7,4) and run DFS to see if we can reach one of the nodes boxed by a rectangle (i.e. has 2 as one of the coordinates).  If we can, then there is a solution.  

Otherwise, there is no way to have two liters in one of the containers through a series of pouring from

the original state of (7/7,4/4,0/10).   

kobusy [5.1K]3 years ago
4 0

Answer:

Yes, there is a sequence, and at the end of the sequence the following arrangement will be in each container;

10-pint container will contain 2 pints of water

7-pint container will contain 7 pints of water

4-pint container will contain 2 pints of water

Explanation:

The 7- and 4-pint containers are full, while the 10-pint container is initially full.

The following steps are followed;

1. pour the content of the 7-pint container into the 10-pint container, and pour 3-pint of water from the 4-pint container to fill up the 10-pint container, leaving the following in the three containers

10-pint container will contain 10 pints of water

7-pint container will contain 0 pints of water

4-pint container will contain 1 pints of water

2. Next, pour the 1 pint of water from the 4-pint container into the 7-pint container, and in turn pour from the 10-pint container into the 4-pint container until it is full, leaving the following in the three containers;

10-pint container will contain 6 pints of water

7-pint container will contain 1 pints of water

4-pint container will contain 4 pints of water

3. next, pour all the content of the 4-pint container into the 7-pint container, and refill the 4-pint container by pouring into it from the 10-pint container, leaving the following in the 3 containers;

10-pint container will contain 2 pints of water

7-pint container will contain 5 pints of water

4-pint container will contain 4 pints of water

4, Finally, pour from the 4-pint container into the 7-pint container until it is full, leaving the following in the 3 containers;

10-pint container will contain 2 pints of water

7-pint container will contain 7 pints of water

4-pint container will contain 2 pints of water.

There you go, this sequence leaves 2-pint of water in the 4-pint container.

You might be interested in
#Electrical Engineering
GrogVix [38]

Answer:

yes

Explanation:

where's our question

5 0
3 years ago
What do we call the two parts of lift that goes down a mine
Blababa [14]
The sheave wheel is a pulley wheel that sits above the mine shaft. The hoist cable passes over the sheave wheel and then down the shaft of the mine.
(copied from google)
4 0
3 years ago
Read 2 more answers
Create the HTML code for this
Marta_Voda [28]

Answer:

index.html:

<!DOCTYPE html>

<html>

 <head>

   <title>Brainly</title>

   <link href="style.css" rel="stylesheet" type="text/css" />

 </head>

 <body>    

   <table id="myTable">

     <caption>Duty Roster for last two days</caption>

     <tr><th>Day</th><th>Morning</th><th>Afternoon</th></tr>

     <tr><td>Monday</td><td colspan="2">John</td></tr>

     <tr><td>Tuesday</td><td rowspan="2">Tom</td><td>Peter</td></tr>

     <tr><td>Wednesday</td><td>simon</td></tr>

   </table>

 </body>

</html>

<u>style.css:</u>

#myTable {

 background-color: Cyan;

 border-collapse: collapse;  

 height: 200px;

 width: 500px;

 font-size: 20px;

}

#myTable td,th {

 border: 2px black solid;

 text-align: center;

}

#myTable td:first-child, th {

 background-color: lightgray;

 font-weight: bold;

}

3 0
2 years ago
Write a method that prints on the screen a message stating whether 2 circles touch each other, do not touch each other or inters
beks73 [17]

Answer:

The method is as follows:

public static void checkIntersection(double x1, double y1, double r1, double x2, double y2, double r2){

    double d = Math.sqrt(Math.pow((x1 - x2),2) + Math.pow((y1 - y2),2));

    if(d == r1 + r2){

        System.out.print("The circles touch each other");     }

    else if(d > r1 + r2){

        System.out.print("The circles do not touch each other");     }

    else{

        System.out.print("The circles intersect");     }

}

Explanation:

This defines the method

public static void checkIntersection(double x1, double y1, double r1, double x2, double y2, double r2){

This calculate the distance

    double d = Math.sqrt(Math.pow((x1 - x2),2) + Math.pow((y1 - y2),2));

If the distance equals the sum of both radii, then the circles touch one another

<em>     if(d == r1 + r2){</em>

<em>         System.out.print("The circles touch each other");     }</em>

If the distance is greater than the sum of both radii, then the circles do not touch one another

<em>    else if(d > r1 + r2){</em>

<em>         System.out.print("The circles do not touch each other");     }</em>

If the distance is less than the sum of both radii, then the circles intersect

<em>    else{</em>

<em>         System.out.print("The circles intersect");     }</em>

}

6 0
2 years ago
Distributed computing is a term that describes the work that autonomous computers can do to achieve a common goal, especially in
Bond [772]

Answer:

To find the solution of Global warming, to find the combination of some drugs and test them, etc.

Explanation:

Distributed computing can be described as when a number of computers connected on the network communicate with each other by passing messages, and these systems are known as distributed systems.

There are various goals that can be accomplished using distributed computing, one of them is to find the solution of Global warming, by coordinating with different areas.  

Another one is to find the combination of some drugs and test them to make new medicine.

7 0
3 years ago
Other questions:
  • "is it important to have a firewall on a home network
    10·1 answer
  • A program to add two numbers in C++
    15·1 answer
  • CompX Inc. is an online retailer of electronic products, including laptops and tablets. The company is known for its unique appr
    15·1 answer
  • What are the ASE special certifications?
    14·2 answers
  • my airpods just do not seem to connect if i try to pair them, reset them, they have this continuous green light, please help me
    12·1 answer
  • Write a program that rolls two dice until the user gets snake eyes. You should use a loop and a half to do this. Each round you
    10·1 answer
  • Code Problem 3 in Python 2.
    5·1 answer
  • What is the difference between php and html?​
    13·2 answers
  • A user logs in to a virtual world and creates an animated character representing themselves, which they then use to move through
    15·2 answers
  • Which of the following is opened when the Find command is clicked? Question 9 options: Navigation Pane Insert Hyperlink dialog b
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!