How to model 3 glass problem to graph? The barman gives you three glasses whose sizes are 1000ml, 700ml, and 400ml, respectively. The 700ml and 400ml glasses start out full of beer, but the 1000ml glass is initially empty. You can get unlimited free beer if you win the following game: Game rule: You can keep pouring beer from one glass into another, stopping only when the source glass is empty or the destination glass is full. You win if there is a sequence of pourings that leaves exactly 200ml in the 700ml or 400 ml glass.

cimithe4c 2022-10-20 Answered
How to model 3 glass problem to graph?
The barman gives you three glasses whose sizes are 1000ml, 700ml, and 400ml, respectively. The 700ml and 400ml glasses start out full of beer, but the 1000ml glass is initially empty. You can get unlimited free beer if you win the following game: Game rule: You can keep pouring beer from one glass into another, stopping only when the source glass is empty or the destination glass is full. You win if there is a sequence of pourings that leaves exactly 200ml in the 700ml or 400 ml glass.
You can still ask an expert for help

Expert Community at Your Service

  • Live experts 24/7
  • Questions are typically answered in as fast as 30 minutes
  • Personalized clear answers
Learn more

Solve your problem for the price of one coffee

  • Available 24/7
  • Math expert for every subject
  • Pay only if we can solve it
Ask Question

Answers (1)

bibliothecaqz
Answered 2022-10-21 Author has 12 answers
Step 1
I would model your problem as a rather huge graph with nodes v i j k which correspond to the state where i 100 ml of beer are in the 1000ml glass, i 100 ml of beer are in the 700ml glass, and k 100 ml of beer are in the 400ml glass. Of course, i 10, j 7, and k 4. Two nodes u and v are connected by a directed edge if the state corresponding to u can be transformed to the state corresponding to v by a valid move.
Step 2
As an example, your initial node will be v 0 , 7 , 4 and will be connected to v 7 , 0 , 4 and v 4 , 7 , 0 since you can either pour the full 700ml glass into the 1000ml glass or the 400ml glass into the 1000ml glass.
Inside this graph you have to find a path from v 0 , 7 , 4 to v i , 2 , k or v i , j , 2 for some i 10, j 7, and k 4. To simplify your task you can connect all these possible end nodes to an artifitial node v and look for a v 0 , 7 , 4 -v-path instead.
Did you like this example?
Subscribe for all access

Expert Community at Your Service

  • Live experts 24/7
  • Questions are typically answered in as fast as 30 minutes
  • Personalized clear answers
Learn more

You might be interested in

asked 2021-09-17
The function y=3.5x+2.8 represents the cost y (in dollars) of a taxi ride of x miles.
a. Identify the independent and dependent variables.
b. You have enough money to travel at most 20 miles in the taxi. Find the domain and range of the function.
asked 2021-09-07
A city water department is proposing the construction of a new water pipe, as shown. The new pipe will be perpendicular to the old pipe. Write an equation that represents the new pipe.
asked 2021-09-25
What is a subclass? When is a subclass needed in data modeling?
asked 2021-09-06
The altitude a (in feet) of a plane t minutes after liftoff is given by a=3400t+600. How many minutes after liftoff is the at an altitude of 21.000 feet?
asked 2022-11-13
Modeling differential equation
I am trying to model some differential equation which can explain buying some assets that can increase itself like a virus.
So, let's assume my money is y(t), and number of assets is n(t).
- y(t) to a certain level c, it will increase the n(t) by +1
- n(t) generate profit r %
so I can see something like
d y ( t ) / d t = y 0 + r n ( t ) d n ( t ) / d t = I f   ( y ( t ) c , y ( t ) 20   a n d   n + 1 , n )
However, I have no clue how I can model this discrete-continuous variable differential equation. Is there any way to model the system and get the solution?
asked 2021-09-12

The missing value in the table.
Given: x100104108101.76logx4

asked 2022-10-31
Continuous-time versus discrete-time stochastic models
When modeling a dynamic phenomenon, (from a general point of view) people can use two type of models: (1) continuous-time models, (2) discrete-time models.
To be more precise, assume that we try to model a phenomenon observed in a time series form via dynamical systems. If the stochasticity involved in the system, we can use two type of models: continuous-time stochastic processes or discrete-time stochastic processes. Since the time-series data is discrete, it seems very natural to model the processes in discrete-time. However, in some application domains, like stochastic finance, continuous-time models are of great importance and interest.
Here are my questions:
1) Is there an advantage of continuous-time modeling? Since the calculus is more difficult (continuous-time models require Ito calculus), what is the computational or modeling advantage of continuous-time models?
2) If there is no analytical solution of a continuous-time model, we discretize it and solve it numerically as far as I know. So, is it so different from discrete-time modeling?