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
What would I need to make the perfect music video
Lera25 [3.4K]
To make the perfect music video, you would need a bunch of b-roll and clips that relate to the song. If it’s a slow, relaxing song, you want things that are slow and represent peace. If it’s about something specific, you should have a story behind it to explain. Hope this helps! :)
4 0
3 years ago
About.com is considered a (an):
Andrei [34K]
About. com that changed its name recently to dotdash is basically a subject directory. It is a colection of blogs articles about various general intrests of writers. Most of the information it contains is not vetted and thus does not qualify as reference point.
7 0
3 years ago
[20 pts] Assume that Bob wants to send a secret message to Alice using RSA encryption. (a) [5pts] (Key generation step) Assume A
Kitty [74]

Answer:

a)Yes Alice can pick 11 has value for her public exponent e

b) The value of d when the public exponent e = 3 is 37

c) The cipher c of the Bob’s message m =2 is 8

d) The cipher c of the Bob’s message m =3 is 18

e) The value of m if c = 3  and the public exponent e = 7 is 16

Explanation:

Find attached the explanation

3 0
3 years ago
Which of the following image file formats uses lossy file compression?
enyata [817]

Answer:

JPEG

Explanation:

5 0
3 years ago
Course Aggregation Many times, departments are only interested with how students have done in courses relative to a specific maj
nadezda [96]

Answer:

def course_grader(student_to_grades, course_prefix):

   student_grades = dict()

   for key, value in student_to_grades.items():

       grade_score = 0

       for course,grade in value.items():  

           if course_prefix == course:  

               grade_score += grade

                student_grades[key] = grade_score / len(value.keys())

   return student_grades

Explanation:

The course_grader function is a python program that accepts two arguments, the student dictionary and the course prefix. The function returns a dictionary of the student id as the key and the average grade of the student as the value.

8 0
2 years ago
Other questions:
  • Classify the given items as belonging to the public domain or protected by copyright law.
    6·2 answers
  • 12. Good digital citizenship includes keeping in mind who has access to the internet and who does not. (1 point)
    15·2 answers
  • An email address is made up of all of the following parts except
    13·2 answers
  • What is the impact of information technology in your daily life?
    12·1 answer
  • Many 12-15 yrs hv access to the internet which cannot be supervised by an adult.i need 5 problems tht this might cause
    5·1 answer
  • Convert the binary number into a hexadecimal number.
    7·1 answer
  • We already know that we can create a lunar lander application of the pipe-and-filter architecture style from three independent J
    6·1 answer
  • Which element appears within the top margin of the document but does not form the part of the body of the text?
    15·1 answer
  • Karl comes across confidential information. What should he do with it? A. Manipulate the information in his favor B. Sell the in
    12·1 answer
  • This is science I just couldn’t find it
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!