Need help simplifying this Boolean expression

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












From my textbook, by using distributive law, its able to simplify:



$[(p land lnot q) lor (p land q)] land q$



To:



$[p land (lnot q lor q)] land q $



I don't know how to get to this step, and here is how I've tried by distributing the first expression :



$[(p lor p) land (p lor q) land (lnot q lor p) land (lnot q lor q)] land q$



If I try continue to expand this, it will become very complex. I think I'm doing this in the wrong way and I will appreciate it very much if anyone can explain how the textbook got the simplified answer.



Thanks










share|cite|improve this question



























    up vote
    1
    down vote

    favorite












    From my textbook, by using distributive law, its able to simplify:



    $[(p land lnot q) lor (p land q)] land q$



    To:



    $[p land (lnot q lor q)] land q $



    I don't know how to get to this step, and here is how I've tried by distributing the first expression :



    $[(p lor p) land (p lor q) land (lnot q lor p) land (lnot q lor q)] land q$



    If I try continue to expand this, it will become very complex. I think I'm doing this in the wrong way and I will appreciate it very much if anyone can explain how the textbook got the simplified answer.



    Thanks










    share|cite|improve this question

























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      From my textbook, by using distributive law, its able to simplify:



      $[(p land lnot q) lor (p land q)] land q$



      To:



      $[p land (lnot q lor q)] land q $



      I don't know how to get to this step, and here is how I've tried by distributing the first expression :



      $[(p lor p) land (p lor q) land (lnot q lor p) land (lnot q lor q)] land q$



      If I try continue to expand this, it will become very complex. I think I'm doing this in the wrong way and I will appreciate it very much if anyone can explain how the textbook got the simplified answer.



      Thanks










      share|cite|improve this question















      From my textbook, by using distributive law, its able to simplify:



      $[(p land lnot q) lor (p land q)] land q$



      To:



      $[p land (lnot q lor q)] land q $



      I don't know how to get to this step, and here is how I've tried by distributing the first expression :



      $[(p lor p) land (p lor q) land (lnot q lor p) land (lnot q lor q)] land q$



      If I try continue to expand this, it will become very complex. I think I'm doing this in the wrong way and I will appreciate it very much if anyone can explain how the textbook got the simplified answer.



      Thanks







      logic propositional-calculus






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Sep 9 at 0:16









      amWhy

      190k26221433




      190k26221433










      asked Sep 8 at 23:52









      IhavelowIQ

      616




      616




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          The Distributive law goes both ways, because it is an equivalence.



          That is, using the Distributive Law you can go from $p land (neg q lor q)$ to $(p land neg q) lor (p land q)$, but you can use that same Distributive Law to go from the latter to the former, and that is what they did here.



          I believe the name is somewhat to blame for the fact that so many students, like you, only think of the Distributive Law going one way, because going from $(p land neg q) lor (p land q)$ to $p land (neg q lor q)$ does not feel like Distribution, but rather as a kind of 'Un-Distribution' or 'Reverse Distribution', or maybe even 'Taking out a common Factor' ... but it is still called Distribution in logic.






          share|cite|improve this answer






















          • @Bram28 ahh I see, thank you. I've tried to test the result on truth table, and the two expression are indeed equivalent, however, is there a way to prove their equivalency without using truth table? Is it possible to use the distributive law on [(p∧¬q)∨(p∧q)] and arrive at [p∧(¬q∨q)] ? It seems it just goes on forever with the expansion.
            – IhavelowIQ
            Sep 9 at 0:07










          • @IhavelowIQ Yes. This is what I tried to say in my Answer: going from $[(p land neg q) lor (p land q)]$ to $[p land (neg q lor q)]$ is using the Distributive Law.
            – Bram28
            Sep 9 at 0:11










          • @IhavelowIQ All these laws in Boolean algebra go both ways. For example, using DeMorgan you can go from $neg (p lor q)$ to $neg p land neg q$, but going from $neg p land neg q$ to $neg (p lor q)$ is also using the DeMorgan's law, since the DeMorgan's law is an equivalence. So you can go back and forth using the same law. Same for Distribution.
            – Bram28
            Sep 9 at 0:14










          • Oh sorry, I missed your edited message. You are right, I was only thinking of going one way (taught in the book), and [(p∧¬q)∨(p∧q)] to [p∧(¬q∨q)] was definitely not apparent for me. But thanks for clarifying this.
            – IhavelowIQ
            Sep 9 at 0:15











          • @IhavelowIQ ok, glad I could help! :)
            – Bram28
            Sep 9 at 0:16

















          up vote
          5
          down vote













          $$[(colorbluep land lnot q) lor (colorbluep land q)] land q equiv [colorbluep land (colorredlnot q lor q)] land qtagdistributivity$$



          $$ equiv (colorbluep land colorred top) land q$$



          $$equiv colorbluep land q$$



          That is, the distributive law declares that $$[pland (lnot q lor q)] equiv [(p land lnot q) lor (p land q)]$$ That means that it is the same law when we write it: $$[(p land lnot q) lor (p land q)] equiv [pland (lnot q lor q)]$$




          Addendum



          enter image description here



          enter image description here



          enter image description here






          share|cite|improve this answer






















          • and if one wants to see why the law is true, truth tables can be really helpful
            – The Great Duck
            Sep 9 at 4:31











          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',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          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%2f2910203%2fneed-help-simplifying-this-boolean-expression%23new-answer', 'question_page');

          );

          Post as a guest






























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          The Distributive law goes both ways, because it is an equivalence.



          That is, using the Distributive Law you can go from $p land (neg q lor q)$ to $(p land neg q) lor (p land q)$, but you can use that same Distributive Law to go from the latter to the former, and that is what they did here.



          I believe the name is somewhat to blame for the fact that so many students, like you, only think of the Distributive Law going one way, because going from $(p land neg q) lor (p land q)$ to $p land (neg q lor q)$ does not feel like Distribution, but rather as a kind of 'Un-Distribution' or 'Reverse Distribution', or maybe even 'Taking out a common Factor' ... but it is still called Distribution in logic.






          share|cite|improve this answer






















          • @Bram28 ahh I see, thank you. I've tried to test the result on truth table, and the two expression are indeed equivalent, however, is there a way to prove their equivalency without using truth table? Is it possible to use the distributive law on [(p∧¬q)∨(p∧q)] and arrive at [p∧(¬q∨q)] ? It seems it just goes on forever with the expansion.
            – IhavelowIQ
            Sep 9 at 0:07










          • @IhavelowIQ Yes. This is what I tried to say in my Answer: going from $[(p land neg q) lor (p land q)]$ to $[p land (neg q lor q)]$ is using the Distributive Law.
            – Bram28
            Sep 9 at 0:11










          • @IhavelowIQ All these laws in Boolean algebra go both ways. For example, using DeMorgan you can go from $neg (p lor q)$ to $neg p land neg q$, but going from $neg p land neg q$ to $neg (p lor q)$ is also using the DeMorgan's law, since the DeMorgan's law is an equivalence. So you can go back and forth using the same law. Same for Distribution.
            – Bram28
            Sep 9 at 0:14










          • Oh sorry, I missed your edited message. You are right, I was only thinking of going one way (taught in the book), and [(p∧¬q)∨(p∧q)] to [p∧(¬q∨q)] was definitely not apparent for me. But thanks for clarifying this.
            – IhavelowIQ
            Sep 9 at 0:15











          • @IhavelowIQ ok, glad I could help! :)
            – Bram28
            Sep 9 at 0:16














          up vote
          2
          down vote



          accepted










          The Distributive law goes both ways, because it is an equivalence.



          That is, using the Distributive Law you can go from $p land (neg q lor q)$ to $(p land neg q) lor (p land q)$, but you can use that same Distributive Law to go from the latter to the former, and that is what they did here.



          I believe the name is somewhat to blame for the fact that so many students, like you, only think of the Distributive Law going one way, because going from $(p land neg q) lor (p land q)$ to $p land (neg q lor q)$ does not feel like Distribution, but rather as a kind of 'Un-Distribution' or 'Reverse Distribution', or maybe even 'Taking out a common Factor' ... but it is still called Distribution in logic.






          share|cite|improve this answer






















          • @Bram28 ahh I see, thank you. I've tried to test the result on truth table, and the two expression are indeed equivalent, however, is there a way to prove their equivalency without using truth table? Is it possible to use the distributive law on [(p∧¬q)∨(p∧q)] and arrive at [p∧(¬q∨q)] ? It seems it just goes on forever with the expansion.
            – IhavelowIQ
            Sep 9 at 0:07










          • @IhavelowIQ Yes. This is what I tried to say in my Answer: going from $[(p land neg q) lor (p land q)]$ to $[p land (neg q lor q)]$ is using the Distributive Law.
            – Bram28
            Sep 9 at 0:11










          • @IhavelowIQ All these laws in Boolean algebra go both ways. For example, using DeMorgan you can go from $neg (p lor q)$ to $neg p land neg q$, but going from $neg p land neg q$ to $neg (p lor q)$ is also using the DeMorgan's law, since the DeMorgan's law is an equivalence. So you can go back and forth using the same law. Same for Distribution.
            – Bram28
            Sep 9 at 0:14










          • Oh sorry, I missed your edited message. You are right, I was only thinking of going one way (taught in the book), and [(p∧¬q)∨(p∧q)] to [p∧(¬q∨q)] was definitely not apparent for me. But thanks for clarifying this.
            – IhavelowIQ
            Sep 9 at 0:15











          • @IhavelowIQ ok, glad I could help! :)
            – Bram28
            Sep 9 at 0:16












          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          The Distributive law goes both ways, because it is an equivalence.



          That is, using the Distributive Law you can go from $p land (neg q lor q)$ to $(p land neg q) lor (p land q)$, but you can use that same Distributive Law to go from the latter to the former, and that is what they did here.



          I believe the name is somewhat to blame for the fact that so many students, like you, only think of the Distributive Law going one way, because going from $(p land neg q) lor (p land q)$ to $p land (neg q lor q)$ does not feel like Distribution, but rather as a kind of 'Un-Distribution' or 'Reverse Distribution', or maybe even 'Taking out a common Factor' ... but it is still called Distribution in logic.






          share|cite|improve this answer














          The Distributive law goes both ways, because it is an equivalence.



          That is, using the Distributive Law you can go from $p land (neg q lor q)$ to $(p land neg q) lor (p land q)$, but you can use that same Distributive Law to go from the latter to the former, and that is what they did here.



          I believe the name is somewhat to blame for the fact that so many students, like you, only think of the Distributive Law going one way, because going from $(p land neg q) lor (p land q)$ to $p land (neg q lor q)$ does not feel like Distribution, but rather as a kind of 'Un-Distribution' or 'Reverse Distribution', or maybe even 'Taking out a common Factor' ... but it is still called Distribution in logic.







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Sep 9 at 0:02

























          answered Sep 8 at 23:56









          Bram28

          55.5k33982




          55.5k33982











          • @Bram28 ahh I see, thank you. I've tried to test the result on truth table, and the two expression are indeed equivalent, however, is there a way to prove their equivalency without using truth table? Is it possible to use the distributive law on [(p∧¬q)∨(p∧q)] and arrive at [p∧(¬q∨q)] ? It seems it just goes on forever with the expansion.
            – IhavelowIQ
            Sep 9 at 0:07










          • @IhavelowIQ Yes. This is what I tried to say in my Answer: going from $[(p land neg q) lor (p land q)]$ to $[p land (neg q lor q)]$ is using the Distributive Law.
            – Bram28
            Sep 9 at 0:11










          • @IhavelowIQ All these laws in Boolean algebra go both ways. For example, using DeMorgan you can go from $neg (p lor q)$ to $neg p land neg q$, but going from $neg p land neg q$ to $neg (p lor q)$ is also using the DeMorgan's law, since the DeMorgan's law is an equivalence. So you can go back and forth using the same law. Same for Distribution.
            – Bram28
            Sep 9 at 0:14










          • Oh sorry, I missed your edited message. You are right, I was only thinking of going one way (taught in the book), and [(p∧¬q)∨(p∧q)] to [p∧(¬q∨q)] was definitely not apparent for me. But thanks for clarifying this.
            – IhavelowIQ
            Sep 9 at 0:15











          • @IhavelowIQ ok, glad I could help! :)
            – Bram28
            Sep 9 at 0:16
















          • @Bram28 ahh I see, thank you. I've tried to test the result on truth table, and the two expression are indeed equivalent, however, is there a way to prove their equivalency without using truth table? Is it possible to use the distributive law on [(p∧¬q)∨(p∧q)] and arrive at [p∧(¬q∨q)] ? It seems it just goes on forever with the expansion.
            – IhavelowIQ
            Sep 9 at 0:07










          • @IhavelowIQ Yes. This is what I tried to say in my Answer: going from $[(p land neg q) lor (p land q)]$ to $[p land (neg q lor q)]$ is using the Distributive Law.
            – Bram28
            Sep 9 at 0:11










          • @IhavelowIQ All these laws in Boolean algebra go both ways. For example, using DeMorgan you can go from $neg (p lor q)$ to $neg p land neg q$, but going from $neg p land neg q$ to $neg (p lor q)$ is also using the DeMorgan's law, since the DeMorgan's law is an equivalence. So you can go back and forth using the same law. Same for Distribution.
            – Bram28
            Sep 9 at 0:14










          • Oh sorry, I missed your edited message. You are right, I was only thinking of going one way (taught in the book), and [(p∧¬q)∨(p∧q)] to [p∧(¬q∨q)] was definitely not apparent for me. But thanks for clarifying this.
            – IhavelowIQ
            Sep 9 at 0:15











          • @IhavelowIQ ok, glad I could help! :)
            – Bram28
            Sep 9 at 0:16















          @Bram28 ahh I see, thank you. I've tried to test the result on truth table, and the two expression are indeed equivalent, however, is there a way to prove their equivalency without using truth table? Is it possible to use the distributive law on [(p∧¬q)∨(p∧q)] and arrive at [p∧(¬q∨q)] ? It seems it just goes on forever with the expansion.
          – IhavelowIQ
          Sep 9 at 0:07




          @Bram28 ahh I see, thank you. I've tried to test the result on truth table, and the two expression are indeed equivalent, however, is there a way to prove their equivalency without using truth table? Is it possible to use the distributive law on [(p∧¬q)∨(p∧q)] and arrive at [p∧(¬q∨q)] ? It seems it just goes on forever with the expansion.
          – IhavelowIQ
          Sep 9 at 0:07












          @IhavelowIQ Yes. This is what I tried to say in my Answer: going from $[(p land neg q) lor (p land q)]$ to $[p land (neg q lor q)]$ is using the Distributive Law.
          – Bram28
          Sep 9 at 0:11




          @IhavelowIQ Yes. This is what I tried to say in my Answer: going from $[(p land neg q) lor (p land q)]$ to $[p land (neg q lor q)]$ is using the Distributive Law.
          – Bram28
          Sep 9 at 0:11












          @IhavelowIQ All these laws in Boolean algebra go both ways. For example, using DeMorgan you can go from $neg (p lor q)$ to $neg p land neg q$, but going from $neg p land neg q$ to $neg (p lor q)$ is also using the DeMorgan's law, since the DeMorgan's law is an equivalence. So you can go back and forth using the same law. Same for Distribution.
          – Bram28
          Sep 9 at 0:14




          @IhavelowIQ All these laws in Boolean algebra go both ways. For example, using DeMorgan you can go from $neg (p lor q)$ to $neg p land neg q$, but going from $neg p land neg q$ to $neg (p lor q)$ is also using the DeMorgan's law, since the DeMorgan's law is an equivalence. So you can go back and forth using the same law. Same for Distribution.
          – Bram28
          Sep 9 at 0:14












          Oh sorry, I missed your edited message. You are right, I was only thinking of going one way (taught in the book), and [(p∧¬q)∨(p∧q)] to [p∧(¬q∨q)] was definitely not apparent for me. But thanks for clarifying this.
          – IhavelowIQ
          Sep 9 at 0:15





          Oh sorry, I missed your edited message. You are right, I was only thinking of going one way (taught in the book), and [(p∧¬q)∨(p∧q)] to [p∧(¬q∨q)] was definitely not apparent for me. But thanks for clarifying this.
          – IhavelowIQ
          Sep 9 at 0:15













          @IhavelowIQ ok, glad I could help! :)
          – Bram28
          Sep 9 at 0:16




          @IhavelowIQ ok, glad I could help! :)
          – Bram28
          Sep 9 at 0:16










          up vote
          5
          down vote













          $$[(colorbluep land lnot q) lor (colorbluep land q)] land q equiv [colorbluep land (colorredlnot q lor q)] land qtagdistributivity$$



          $$ equiv (colorbluep land colorred top) land q$$



          $$equiv colorbluep land q$$



          That is, the distributive law declares that $$[pland (lnot q lor q)] equiv [(p land lnot q) lor (p land q)]$$ That means that it is the same law when we write it: $$[(p land lnot q) lor (p land q)] equiv [pland (lnot q lor q)]$$




          Addendum



          enter image description here



          enter image description here



          enter image description here






          share|cite|improve this answer






















          • and if one wants to see why the law is true, truth tables can be really helpful
            – The Great Duck
            Sep 9 at 4:31















          up vote
          5
          down vote













          $$[(colorbluep land lnot q) lor (colorbluep land q)] land q equiv [colorbluep land (colorredlnot q lor q)] land qtagdistributivity$$



          $$ equiv (colorbluep land colorred top) land q$$



          $$equiv colorbluep land q$$



          That is, the distributive law declares that $$[pland (lnot q lor q)] equiv [(p land lnot q) lor (p land q)]$$ That means that it is the same law when we write it: $$[(p land lnot q) lor (p land q)] equiv [pland (lnot q lor q)]$$




          Addendum



          enter image description here



          enter image description here



          enter image description here






          share|cite|improve this answer






















          • and if one wants to see why the law is true, truth tables can be really helpful
            – The Great Duck
            Sep 9 at 4:31













          up vote
          5
          down vote










          up vote
          5
          down vote









          $$[(colorbluep land lnot q) lor (colorbluep land q)] land q equiv [colorbluep land (colorredlnot q lor q)] land qtagdistributivity$$



          $$ equiv (colorbluep land colorred top) land q$$



          $$equiv colorbluep land q$$



          That is, the distributive law declares that $$[pland (lnot q lor q)] equiv [(p land lnot q) lor (p land q)]$$ That means that it is the same law when we write it: $$[(p land lnot q) lor (p land q)] equiv [pland (lnot q lor q)]$$




          Addendum



          enter image description here



          enter image description here



          enter image description here






          share|cite|improve this answer














          $$[(colorbluep land lnot q) lor (colorbluep land q)] land q equiv [colorbluep land (colorredlnot q lor q)] land qtagdistributivity$$



          $$ equiv (colorbluep land colorred top) land q$$



          $$equiv colorbluep land q$$



          That is, the distributive law declares that $$[pland (lnot q lor q)] equiv [(p land lnot q) lor (p land q)]$$ That means that it is the same law when we write it: $$[(p land lnot q) lor (p land q)] equiv [pland (lnot q lor q)]$$




          Addendum



          enter image description here



          enter image description here



          enter image description here







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited 2 days ago

























          answered Sep 9 at 0:07









          amWhy

          190k26221433




          190k26221433











          • and if one wants to see why the law is true, truth tables can be really helpful
            – The Great Duck
            Sep 9 at 4:31

















          • and if one wants to see why the law is true, truth tables can be really helpful
            – The Great Duck
            Sep 9 at 4:31
















          and if one wants to see why the law is true, truth tables can be really helpful
          – The Great Duck
          Sep 9 at 4:31





          and if one wants to see why the law is true, truth tables can be really helpful
          – The Great Duck
          Sep 9 at 4:31


















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2910203%2fneed-help-simplifying-this-boolean-expression%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          What does second last employer means? [closed]

          List of Gilmore Girls characters

          Confectionery