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
Investigate the many ways that hardware and software can cause an interrupt to occur. Are ALL interrupts treated equally or do s
slavikrds [6]

Answer:

Following are the responses to the given question:  

Explanation:

This list is based mostly on the processor. Then you'll be ordered. An interrupt of a particular cable (wire) is produced for PC-ish CPUs (IRQ 0 - 31 for some intel processors). The bigger challenge is a lower number.

Strange factors have included a system clock, power business, 0, some reserved for use by CPU testing, serial/parallel/... ports and also some terminated/error/state/new devices requests device Thus a key touch on the keyboards could create an interrupt that was direct on old devices.

3 0
2 years ago
In a stack data structure, the following items are inserted in the following order: Bob, Alice, Charlie, Eve, Zebra. Then an ite
const2013 [10]

Answer:

Zebra.

Explanation:

Stack is LIFO, so Zebra is added in the last so it will be removed first.

6 0
2 years ago
What does an operating system do
3241004551 [841]

Answer: An operating system manages and runs all of the hardware and software installed onto the computer.

Explanation:

It performs basic tasks such as file, memory, and process management, handling input and output, and controlling peripheral devices such as disk drives and printers.

7 0
9 months ago
When you open your word-processing program, it opens in a<br> field<br> menu
stepan [7]
B- menu...... hope this helps
8 0
3 years ago
Read 2 more answers
You are being hired as the director of IT for a small firm that does retail trade business, and you will be the source of knowle
Orlov [11]

Director of IT role is major decision maker or any IT related issue such as network security, database, network issues etc. As policy to one to one end user and it department, which should cover as follows.

1. End-user is not allowed to share files or media files to any user through email or social media.

2. Login password should not be changed without IT approval of pc or   workstation or laptop.  Once changes password should be shared to IT department.

3. Sharing password Wi-Fi or access point to outsiders to be avoided.

4. Connecting usb drive or flash drive to workstation or laptop,

5. Own laptop or smartphone should not be connected to office network.

6. If workstation or desktop or laptop is effected with virus immediately to be reported to IT department.

5 0
3 years ago
Other questions:
  • HELP FOR JAVASCRIPT: 01. What is prototypical inheritance? 02. How can JavaScript be used to improve accessibility on the web? I
    6·1 answer
  • _______ tools enable people to connect and exchange ideas.
    7·2 answers
  • Banks use _____, which are electronic transmissions of account exchange information over private communications’ networks.
    14·1 answer
  • To color the h2 heading, what tag would you use?
    6·1 answer
  • Python 3 (not java)1.Assume that word is a variable of type String that has been assigned a value. Write an expression whose val
    14·1 answer
  • What type of error results from an error in the formatting of the program code?
    13·1 answer
  • What was the purpose of the Internet Architecture Board?
    12·2 answers
  • How many parameters can we use in each function?
    15·1 answer
  • You have received an update package for a critical application you are running on a virtual machine. You have been told to insta
    8·1 answer
  • a cryptarithm is a mathematical puzzle where the goal is to find the correspondence between letters and digits such that the giv
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!