How to draw a graph that represent this problem? Using a $5$-liter bottle and a $3$-liter bottle to arrive at...












2












$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.











share|cite|improve this question











$endgroup$

















    2












    $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.











    share|cite|improve this question











    $endgroup$















      2












      2








      2





      $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.











      share|cite|improve this question











      $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






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Dec 16 '18 at 19:34









      Blue

      49k870156




      49k870156










      asked Dec 16 '18 at 19:27









      SatSat

      283




      283






















          3 Answers
          3






          active

          oldest

          votes


















          2












          $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.



          enter image description here






          share|cite|improve this answer











          $endgroup$





















            1












            $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$$






            share|cite|improve this answer









            $endgroup$





















              1












              $begingroup$

              I couldn't find an ideal graphical representation, but this is what I got:



              attempt at graph






              share|cite|improve this answer









              $endgroup$













                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
                });


                }
                });














                draft saved

                draft discarded


















                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









                2












                $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.



                enter image description here






                share|cite|improve this answer











                $endgroup$


















                  2












                  $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.



                  enter image description here






                  share|cite|improve this answer











                  $endgroup$
















                    2












                    2








                    2





                    $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.



                    enter image description here






                    share|cite|improve this answer











                    $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.



                    enter image description here







                    share|cite|improve this answer














                    share|cite|improve this answer



                    share|cite|improve this answer








                    edited Dec 17 '18 at 6:46

























                    answered Dec 17 '18 at 6:37









                    Misha LavrovMisha Lavrov

                    47.4k657107




                    47.4k657107























                        1












                        $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$$






                        share|cite|improve this answer









                        $endgroup$


















                          1












                          $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$$






                          share|cite|improve this answer









                          $endgroup$
















                            1












                            1








                            1





                            $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$$






                            share|cite|improve this answer









                            $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$$







                            share|cite|improve this answer












                            share|cite|improve this answer



                            share|cite|improve this answer










                            answered Dec 16 '18 at 19:44









                            hamam_Abdallahhamam_Abdallah

                            38.2k21634




                            38.2k21634























                                1












                                $begingroup$

                                I couldn't find an ideal graphical representation, but this is what I got:



                                attempt at graph






                                share|cite|improve this answer









                                $endgroup$


















                                  1












                                  $begingroup$

                                  I couldn't find an ideal graphical representation, but this is what I got:



                                  attempt at graph






                                  share|cite|improve this answer









                                  $endgroup$
















                                    1












                                    1








                                    1





                                    $begingroup$

                                    I couldn't find an ideal graphical representation, but this is what I got:



                                    attempt at graph






                                    share|cite|improve this answer









                                    $endgroup$



                                    I couldn't find an ideal graphical representation, but this is what I got:



                                    attempt at graph







                                    share|cite|improve this answer












                                    share|cite|improve this answer



                                    share|cite|improve this answer










                                    answered Dec 16 '18 at 19:53









                                    T. FoT. Fo

                                    471311




                                    471311






























                                        draft saved

                                        draft discarded




















































                                        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.




                                        draft saved


                                        draft discarded














                                        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





















































                                        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







                                        Popular posts from this blog

                                        Bundesstraße 106

                                        Verónica Boquete

                                        Ida-Boy-Ed-Garten