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
12.
melisa1 [442]
The correct answer is 1.6
7 0
3 years ago
Which of the following is not a key component of a structure?
valentina_108 [34]
D. Enumerations! Because I know that is NOT a leg compentent of a structure
5 0
2 years ago
Sharing resources.
olya-2409 [2.1K]

Answer:

Explanation:

2- Multitasking Multitasking – Multitasking Multitasking is one among the main advantage of computer. ...

Speed – Now computer isn't just a calculating device. ...

Cost/ Stores huge – Amount of knowledge it's a coffee cost solution. ...

Accuracy – ...

Data Security – ...

Task completer – ...

Communication – ...

Productivity –

More items...•

6 0
2 years ago
I need help with humans need not apply for codeing
vampirchik [111]

Answer:

huge\color{blue}\boxed{The}\huge\color{pink}\boxed{Points

3 0
2 years ago
Read 2 more answers
Do the police check your mobile device during police checks?
Marat540 [252]
it depends............

4 0
3 years ago
Read 2 more answers
Other questions:
  • Very large and very small numbers are easier to write in scientific notation. For example, the number, 0.000000728 would be writ
    7·1 answer
  • For which task is the WordArt gallery most useful?
    15·2 answers
  • The ___________________ Act makes it illegal to deactivate or otherwise disable any antipiracy technologies including DRM techno
    7·1 answer
  • How are economics<br> and scarcity related?
    14·1 answer
  • The piece of hardware that contains the circuitry that processes the information coming in to the computer and tells the other h
    8·1 answer
  • Cloud architects have been largely replaced by ScrumMasters.<br><br> True<br><br> False
    15·2 answers
  • 7.4 Lesson Practice (projectstem): what is output if the user is enters 2?​
    8·1 answer
  • What does a theme contain?
    14·2 answers
  • True of false that the memory of laptop is normally measured in kilobytes
    6·1 answer
  • to provide for ecmascript compatibility in older browsers, you can use group of answer choices javascript shivs javascript shims
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!