How to draw a graph that represent this problem? Using a $5$-liter bottle and a $3$-liter bottle to arrive at...
$begingroup$
You have 2 water bottles, a 5l bottle and a 3l bottle.
- If the bottle is empty, You can fill it up fully at the tap.
- If the bottle is full, You can empty the bottle.
- You can transfer the content of one bottle to the other. Ex: if the 5l bottle has 3l of water and you put water from 5l bottle in the 3ml bottle, You will end up with 5l in the biggest and 1l in the smallest.
- All bottles are empty.
- Your goal is to obtain exactly 4l in the biggest bottle.
graph-theory
$endgroup$
add a comment |
$begingroup$
You have 2 water bottles, a 5l bottle and a 3l bottle.
- If the bottle is empty, You can fill it up fully at the tap.
- If the bottle is full, You can empty the bottle.
- You can transfer the content of one bottle to the other. Ex: if the 5l bottle has 3l of water and you put water from 5l bottle in the 3ml bottle, You will end up with 5l in the biggest and 1l in the smallest.
- All bottles are empty.
- Your goal is to obtain exactly 4l in the biggest bottle.
graph-theory
$endgroup$
add a comment |
$begingroup$
You have 2 water bottles, a 5l bottle and a 3l bottle.
- If the bottle is empty, You can fill it up fully at the tap.
- If the bottle is full, You can empty the bottle.
- You can transfer the content of one bottle to the other. Ex: if the 5l bottle has 3l of water and you put water from 5l bottle in the 3ml bottle, You will end up with 5l in the biggest and 1l in the smallest.
- All bottles are empty.
- Your goal is to obtain exactly 4l in the biggest bottle.
graph-theory
$endgroup$
You have 2 water bottles, a 5l bottle and a 3l bottle.
- If the bottle is empty, You can fill it up fully at the tap.
- If the bottle is full, You can empty the bottle.
- You can transfer the content of one bottle to the other. Ex: if the 5l bottle has 3l of water and you put water from 5l bottle in the 3ml bottle, You will end up with 5l in the biggest and 1l in the smallest.
- All bottles are empty.
- Your goal is to obtain exactly 4l in the biggest bottle.
graph-theory
graph-theory
edited Dec 16 '18 at 19:34
Blue
49.1k870156
49.1k870156
asked Dec 16 '18 at 19:27
SatSat
283
283
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
Here is the graph representing the states of the puzzle and the possible ways we can get from one state to another.
A node labeled $(a,b)$ corresponds to a state where the $5$-liter bottle contains $a$ liters and the $3$-liter bottle contains $b$ liters. There are two kinds of edges:
- Edges represented by solid lines describe two-way actions, where we can go from either state to the other. (For example, we can fill an empty bottle from the sink, then pour it out, returning to the original state.)
- Edges represented by dashed lines describe one-way actions, which we cannot undo in one step. (For example, once we solve the puzzle, we can pour out the bottle with $4$ liters of water, and now we have to solve the puzzle all over again.)
This distinction is just to make the graph easier to read, avoiding too many arrows.
$endgroup$
add a comment |
$begingroup$
Here are the steps
$$1) ;;B=0,b=3$$
$$2);; B=3,b=0$$
$$3) ;;B=3,b=3$$
$$4) ;;B=5,b=1$$
$$5) ;;B=0,b=1$$
$$6) ;;B=1,b=0$$
$$7) ;;B=1, b=3$$
$$8) ;;B=4,b=0$$
$endgroup$
add a comment |
$begingroup$
I couldn't find an ideal graphical representation, but this is what I got:
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3043046%2fhow-to-draw-a-graph-that-represent-this-problem-using-a-5-liter-bottle-and-a%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Here is the graph representing the states of the puzzle and the possible ways we can get from one state to another.
A node labeled $(a,b)$ corresponds to a state where the $5$-liter bottle contains $a$ liters and the $3$-liter bottle contains $b$ liters. There are two kinds of edges:
- Edges represented by solid lines describe two-way actions, where we can go from either state to the other. (For example, we can fill an empty bottle from the sink, then pour it out, returning to the original state.)
- Edges represented by dashed lines describe one-way actions, which we cannot undo in one step. (For example, once we solve the puzzle, we can pour out the bottle with $4$ liters of water, and now we have to solve the puzzle all over again.)
This distinction is just to make the graph easier to read, avoiding too many arrows.
$endgroup$
add a comment |
$begingroup$
Here is the graph representing the states of the puzzle and the possible ways we can get from one state to another.
A node labeled $(a,b)$ corresponds to a state where the $5$-liter bottle contains $a$ liters and the $3$-liter bottle contains $b$ liters. There are two kinds of edges:
- Edges represented by solid lines describe two-way actions, where we can go from either state to the other. (For example, we can fill an empty bottle from the sink, then pour it out, returning to the original state.)
- Edges represented by dashed lines describe one-way actions, which we cannot undo in one step. (For example, once we solve the puzzle, we can pour out the bottle with $4$ liters of water, and now we have to solve the puzzle all over again.)
This distinction is just to make the graph easier to read, avoiding too many arrows.
$endgroup$
add a comment |
$begingroup$
Here is the graph representing the states of the puzzle and the possible ways we can get from one state to another.
A node labeled $(a,b)$ corresponds to a state where the $5$-liter bottle contains $a$ liters and the $3$-liter bottle contains $b$ liters. There are two kinds of edges:
- Edges represented by solid lines describe two-way actions, where we can go from either state to the other. (For example, we can fill an empty bottle from the sink, then pour it out, returning to the original state.)
- Edges represented by dashed lines describe one-way actions, which we cannot undo in one step. (For example, once we solve the puzzle, we can pour out the bottle with $4$ liters of water, and now we have to solve the puzzle all over again.)
This distinction is just to make the graph easier to read, avoiding too many arrows.
$endgroup$
Here is the graph representing the states of the puzzle and the possible ways we can get from one state to another.
A node labeled $(a,b)$ corresponds to a state where the $5$-liter bottle contains $a$ liters and the $3$-liter bottle contains $b$ liters. There are two kinds of edges:
- Edges represented by solid lines describe two-way actions, where we can go from either state to the other. (For example, we can fill an empty bottle from the sink, then pour it out, returning to the original state.)
- Edges represented by dashed lines describe one-way actions, which we cannot undo in one step. (For example, once we solve the puzzle, we can pour out the bottle with $4$ liters of water, and now we have to solve the puzzle all over again.)
This distinction is just to make the graph easier to read, avoiding too many arrows.
edited Dec 17 '18 at 6:46
answered Dec 17 '18 at 6:37
Misha LavrovMisha Lavrov
47.6k657107
47.6k657107
add a comment |
add a comment |
$begingroup$
Here are the steps
$$1) ;;B=0,b=3$$
$$2);; B=3,b=0$$
$$3) ;;B=3,b=3$$
$$4) ;;B=5,b=1$$
$$5) ;;B=0,b=1$$
$$6) ;;B=1,b=0$$
$$7) ;;B=1, b=3$$
$$8) ;;B=4,b=0$$
$endgroup$
add a comment |
$begingroup$
Here are the steps
$$1) ;;B=0,b=3$$
$$2);; B=3,b=0$$
$$3) ;;B=3,b=3$$
$$4) ;;B=5,b=1$$
$$5) ;;B=0,b=1$$
$$6) ;;B=1,b=0$$
$$7) ;;B=1, b=3$$
$$8) ;;B=4,b=0$$
$endgroup$
add a comment |
$begingroup$
Here are the steps
$$1) ;;B=0,b=3$$
$$2);; B=3,b=0$$
$$3) ;;B=3,b=3$$
$$4) ;;B=5,b=1$$
$$5) ;;B=0,b=1$$
$$6) ;;B=1,b=0$$
$$7) ;;B=1, b=3$$
$$8) ;;B=4,b=0$$
$endgroup$
Here are the steps
$$1) ;;B=0,b=3$$
$$2);; B=3,b=0$$
$$3) ;;B=3,b=3$$
$$4) ;;B=5,b=1$$
$$5) ;;B=0,b=1$$
$$6) ;;B=1,b=0$$
$$7) ;;B=1, b=3$$
$$8) ;;B=4,b=0$$
answered Dec 16 '18 at 19:44
hamam_Abdallahhamam_Abdallah
38.2k21634
38.2k21634
add a comment |
add a comment |
$begingroup$
I couldn't find an ideal graphical representation, but this is what I got:
$endgroup$
add a comment |
$begingroup$
I couldn't find an ideal graphical representation, but this is what I got:
$endgroup$
add a comment |
$begingroup$
I couldn't find an ideal graphical representation, but this is what I got:
$endgroup$
I couldn't find an ideal graphical representation, but this is what I got:
answered Dec 16 '18 at 19:53
T. FoT. Fo
471311
471311
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3043046%2fhow-to-draw-a-graph-that-represent-this-problem-using-a-5-liter-bottle-and-a%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown