A real world example for the divide and conquer methodIntroducing A* Search AlgorithmExplaining how the Internet and the World Wide Web workClear example of the Object-Relational MismatchHow to avoid misconceptions about while loop when using null loopWhat are the pedagogical methods for teaching programming?Exercise or example to reinforce idea of functions?Is the algorithm-recipe analogy a good or a bad one?Is it a good idea to teach algorithm courses using pseudocode instead of a real programming language?What is the closest pair problem useful for?

What's an "add" chord?

Does poking yourself with a needle with the intent to do damage require the Attack action, or can it be done as a (free) object interaction?

What are standard cryptographic assumptions?

Why does Smaug have 4 legs in the 1st movie but only 2 legs in the 2nd?

50% portfolio in single stock, JPM - appropriate for 80 year old?

Is there any point in having more than 6 months' runway in savings?

Speaking German abroad and feeling condescended to when people speak English back to me

Why did the Bohr Model Successfully calculate some of the energy levels in hydrogen?

Need Good OOP Design For World and Countries Problem

Is it sportsmanlike to waste opponents' time by giving check at the end of the game?

Why rounding odd font sizes to even?

Is current (November 2019) polling about Democrats lead over Trump trustworthy?

On a naked chicken (no coating,batter) is there any benefit of double frying?

Why use [FormalN]?

What are these criss-cross patterns close to Cambridge Airport (UK)?

What is the "opposite" of a random variable?

Making Sandwiches

Total I/O cost of a process

What to do with a bent but not broken aluminum seat stay

"Chess is 90% tactics" - should a player focus more on tactics in order to improve?

Create virtual block device which writes to /dev/null

Why might SHA-384 throughput be lower than SHA-512 throughput in hashcat?

What is the source for pushing away the convert three times?

Why did a shuttle astronaut have an open book during ascent?



A real world example for the divide and conquer method


Introducing A* Search AlgorithmExplaining how the Internet and the World Wide Web workClear example of the Object-Relational MismatchHow to avoid misconceptions about while loop when using null loopWhat are the pedagogical methods for teaching programming?Exercise or example to reinforce idea of functions?Is the algorithm-recipe analogy a good or a bad one?Is it a good idea to teach algorithm courses using pseudocode instead of a real programming language?What is the closest pair problem useful for?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









3














$begingroup$


Can someone give a real world example for the divide and conquer method? For example, I've heard the boomerang used to explain the idea of a loop back address. What is a real world example we can use to teach students about the divide and conquer method before going to more complex algorithms?










share|improve this question












$endgroup$










  • 5




    $begingroup$
    You will have to enlighten us on “boomerang”.
    $endgroup$
    – ctrl-alt-delor
    Jul 21 at 22:45






  • 1




    $begingroup$
    Divide and Conquer was originally a military term. You can look for example at the British conquest of India.
    $endgroup$
    – njzk2
    Jul 21 at 23:23










  • $begingroup$
    Related: stackoverflow.com/questions/14415881/…
    $endgroup$
    – Reinstate Monica
    Jul 22 at 1:01






  • 2




    $begingroup$
    My teacher used the way we look for a word in a dictionary.
    $endgroup$
    – Jimbot
    Jul 22 at 12:40






  • 1




    $begingroup$
    My mother taught me binary search for finding words in a dictionary in the 1950's.
    $endgroup$
    – Patricia Shanahan
    Jul 22 at 13:43

















3














$begingroup$


Can someone give a real world example for the divide and conquer method? For example, I've heard the boomerang used to explain the idea of a loop back address. What is a real world example we can use to teach students about the divide and conquer method before going to more complex algorithms?










share|improve this question












$endgroup$










  • 5




    $begingroup$
    You will have to enlighten us on “boomerang”.
    $endgroup$
    – ctrl-alt-delor
    Jul 21 at 22:45






  • 1




    $begingroup$
    Divide and Conquer was originally a military term. You can look for example at the British conquest of India.
    $endgroup$
    – njzk2
    Jul 21 at 23:23










  • $begingroup$
    Related: stackoverflow.com/questions/14415881/…
    $endgroup$
    – Reinstate Monica
    Jul 22 at 1:01






  • 2




    $begingroup$
    My teacher used the way we look for a word in a dictionary.
    $endgroup$
    – Jimbot
    Jul 22 at 12:40






  • 1




    $begingroup$
    My mother taught me binary search for finding words in a dictionary in the 1950's.
    $endgroup$
    – Patricia Shanahan
    Jul 22 at 13:43













3












3








3


1



$begingroup$


Can someone give a real world example for the divide and conquer method? For example, I've heard the boomerang used to explain the idea of a loop back address. What is a real world example we can use to teach students about the divide and conquer method before going to more complex algorithms?










share|improve this question












$endgroup$




Can someone give a real world example for the divide and conquer method? For example, I've heard the boomerang used to explain the idea of a loop back address. What is a real world example we can use to teach students about the divide and conquer method before going to more complex algorithms?







teaching-analogy algorithms






share|improve this question
















share|improve this question













share|improve this question




share|improve this question








edited Jul 31 at 18:16









heather

4,0339 silver badges36 bronze badges




4,0339 silver badges36 bronze badges










asked Jul 21 at 9:03









happyhappy

161 silver badge2 bronze badges




161 silver badge2 bronze badges










  • 5




    $begingroup$
    You will have to enlighten us on “boomerang”.
    $endgroup$
    – ctrl-alt-delor
    Jul 21 at 22:45






  • 1




    $begingroup$
    Divide and Conquer was originally a military term. You can look for example at the British conquest of India.
    $endgroup$
    – njzk2
    Jul 21 at 23:23










  • $begingroup$
    Related: stackoverflow.com/questions/14415881/…
    $endgroup$
    – Reinstate Monica
    Jul 22 at 1:01






  • 2




    $begingroup$
    My teacher used the way we look for a word in a dictionary.
    $endgroup$
    – Jimbot
    Jul 22 at 12:40






  • 1




    $begingroup$
    My mother taught me binary search for finding words in a dictionary in the 1950's.
    $endgroup$
    – Patricia Shanahan
    Jul 22 at 13:43












  • 5




    $begingroup$
    You will have to enlighten us on “boomerang”.
    $endgroup$
    – ctrl-alt-delor
    Jul 21 at 22:45






  • 1




    $begingroup$
    Divide and Conquer was originally a military term. You can look for example at the British conquest of India.
    $endgroup$
    – njzk2
    Jul 21 at 23:23










  • $begingroup$
    Related: stackoverflow.com/questions/14415881/…
    $endgroup$
    – Reinstate Monica
    Jul 22 at 1:01






  • 2




    $begingroup$
    My teacher used the way we look for a word in a dictionary.
    $endgroup$
    – Jimbot
    Jul 22 at 12:40






  • 1




    $begingroup$
    My mother taught me binary search for finding words in a dictionary in the 1950's.
    $endgroup$
    – Patricia Shanahan
    Jul 22 at 13:43







5




5




$begingroup$
You will have to enlighten us on “boomerang”.
$endgroup$
– ctrl-alt-delor
Jul 21 at 22:45




$begingroup$
You will have to enlighten us on “boomerang”.
$endgroup$
– ctrl-alt-delor
Jul 21 at 22:45




1




1




$begingroup$
Divide and Conquer was originally a military term. You can look for example at the British conquest of India.
$endgroup$
– njzk2
Jul 21 at 23:23




$begingroup$
Divide and Conquer was originally a military term. You can look for example at the British conquest of India.
$endgroup$
– njzk2
Jul 21 at 23:23












$begingroup$
Related: stackoverflow.com/questions/14415881/…
$endgroup$
– Reinstate Monica
Jul 22 at 1:01




$begingroup$
Related: stackoverflow.com/questions/14415881/…
$endgroup$
– Reinstate Monica
Jul 22 at 1:01




2




2




$begingroup$
My teacher used the way we look for a word in a dictionary.
$endgroup$
– Jimbot
Jul 22 at 12:40




$begingroup$
My teacher used the way we look for a word in a dictionary.
$endgroup$
– Jimbot
Jul 22 at 12:40




1




1




$begingroup$
My mother taught me binary search for finding words in a dictionary in the 1950's.
$endgroup$
– Patricia Shanahan
Jul 22 at 13:43




$begingroup$
My mother taught me binary search for finding words in a dictionary in the 1950's.
$endgroup$
– Patricia Shanahan
Jul 22 at 13:43










5 Answers
5






active

oldest

votes


















12
















$begingroup$

Back around 1985, Susan Merritt created an Inverted Taxonomy of Sorting Algorithms. The idea is that to sort an array you have two phases, the split phase and the join phase. She divided the various algorithms into two types easy split/hard join and hard split/easy join varieties. Merge sort is of the former type. Quick sort is the latter.



But all sorts, envisioned in this way are divide and conquer. Her original paper (part of her doctoral work) is a wonder and worth exploring by any CS teacher.






share|improve this answer










$endgroup$






















    7
















    $begingroup$

    The simplest example that still bears enough complexity to show what's going on is probably merge sort. It's no coincidence that this algorithm is the classical example to begin explaining the divide and conquer technique.



    I am not sure at what level you teach, but your students should be comfortable with both recursion and inductive proofs before venturing far into this territory.



    Coincidentally, there is a list of divide and conquer algorithms found here. It's a pretty long list, and might have cast too wide a net. I'm not convinced that I agree that all of the algorithms are genuinely divide and conquer. However, it could be that upon closer inspection, they are.



    In any case, it's a great starting point to find algorithms to present to your students. Just be sure that you can clearly explain the central divide/conquer/combine throughline for any algorithms you choose to bring to your students. This area of algorithms is full of traps for unwary beginners, so your students will benefit greatly from thought and care put into your presentation.






    share|improve this answer










    $endgroup$






















      3
















      $begingroup$

      These sorts of patterns are a bit tricky in real life. In nice easy computer-science land, every step is the same, just smaller. Merge sort is clearly the ultimate easy example of this.



      In real life, we tend to break things up along useful lines. If we're sorting change, we first divide the coins up by denominations, then total up each denomination before adding them together. When we put together a puzzle, we divide out the edge pieces first, put them together, then build the rest of the puzzle on that. In war, we divide an opponent into pieces which cannot work as a cohesive unit, then crush them.



      We see this in real life more often than blind divisions because we, as humans, know we can divide along useful lines. The closest I know of that is quicksort's attempt to find a middle index to partition with.



      One thing I find tricky about these divide and conquer algorithms is that they look like an infinite regression. You keep proving you can sort lists as long as you can sort smaller lists.... which you know you can do because you can sort smaller lists... so on and so forth. Infinite regression is a serious faux pas in modern logic, so I think people may get confused by that. Showing that "if I can sort a list of length n, I can sort a list of length 2n" would be the more traditional mathematical induction approach.



      Then again, all may be for naught, for it is quite clear the best use for divide an conquer in real life is to put together a thrilling Hungarian dance.






      share|improve this answer










      $endgroup$










      • 2




        $begingroup$
        +1 for the Hungarian dance example :)
        $endgroup$
        – DavidPostill
        Jul 22 at 12:41


















      1
















      $begingroup$

      If you want to divide a long loaf of bread in 8 or 16 equal pieces, generally people cut it into two equal halves first and then cut each half into two equal halves again, repeating the process until you get as many pieces as you want - 8, 16, 32, or whatever. Almost nobody tries to divide the loaf into 8 pieces all at once - people can guess halves much better than eighths.






      share|improve this answer












      $endgroup$














      • $begingroup$
        Hello, and welcome to Computer Science Educators SE! While your example is good, you may want to add some explanation of why your example appropriately addresses the question. Thanks!
        $endgroup$
        – heather
        Jul 31 at 18:14


















      1
















      $begingroup$

      MergeSort is fairly easy to implement in Python and it's a straightforward divide-and-conquer algorithm. You keep splitting the collection in half until it is in trivial-to-sort pieces. This splitting reduces sorting from O(n^2) to O(nlog(n)).



      Second example: computing integer powers. if the power is even, square base and integer divide exponent by 2. If it's odd, do the same and multiply by a factor of the base. This algorithm is O(log(n)) instead of O(n), which would come from computing an integer power with a simple loop.






      share|improve this answer












      $endgroup$














      • $begingroup$
        Would you mind providing a bit more explanation for why you think merge sort is a good example to use for teaching divide and conquer? Not every divide and conquer algorithm will be useful for teaching the concept of divide and conquer, so why do you think merge sort is?
        $endgroup$
        – thesecretmaster
        Sep 10 at 17:17












      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "678"
      ;
      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: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      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/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );














      draft saved

      draft discarded
















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcseducators.stackexchange.com%2fquestions%2f5826%2fa-real-world-example-for-the-divide-and-conquer-method%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown


























      5 Answers
      5






      active

      oldest

      votes








      5 Answers
      5






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      12
















      $begingroup$

      Back around 1985, Susan Merritt created an Inverted Taxonomy of Sorting Algorithms. The idea is that to sort an array you have two phases, the split phase and the join phase. She divided the various algorithms into two types easy split/hard join and hard split/easy join varieties. Merge sort is of the former type. Quick sort is the latter.



      But all sorts, envisioned in this way are divide and conquer. Her original paper (part of her doctoral work) is a wonder and worth exploring by any CS teacher.






      share|improve this answer










      $endgroup$



















        12
















        $begingroup$

        Back around 1985, Susan Merritt created an Inverted Taxonomy of Sorting Algorithms. The idea is that to sort an array you have two phases, the split phase and the join phase. She divided the various algorithms into two types easy split/hard join and hard split/easy join varieties. Merge sort is of the former type. Quick sort is the latter.



        But all sorts, envisioned in this way are divide and conquer. Her original paper (part of her doctoral work) is a wonder and worth exploring by any CS teacher.






        share|improve this answer










        $endgroup$

















          12














          12










          12







          $begingroup$

          Back around 1985, Susan Merritt created an Inverted Taxonomy of Sorting Algorithms. The idea is that to sort an array you have two phases, the split phase and the join phase. She divided the various algorithms into two types easy split/hard join and hard split/easy join varieties. Merge sort is of the former type. Quick sort is the latter.



          But all sorts, envisioned in this way are divide and conquer. Her original paper (part of her doctoral work) is a wonder and worth exploring by any CS teacher.






          share|improve this answer










          $endgroup$



          Back around 1985, Susan Merritt created an Inverted Taxonomy of Sorting Algorithms. The idea is that to sort an array you have two phases, the split phase and the join phase. She divided the various algorithms into two types easy split/hard join and hard split/easy join varieties. Merge sort is of the former type. Quick sort is the latter.



          But all sorts, envisioned in this way are divide and conquer. Her original paper (part of her doctoral work) is a wonder and worth exploring by any CS teacher.







          share|improve this answer













          share|improve this answer




          share|improve this answer










          answered Jul 21 at 14:34









          BuffyBuffy

          26k9 gold badges44 silver badges88 bronze badges




          26k9 gold badges44 silver badges88 bronze badges


























              7
















              $begingroup$

              The simplest example that still bears enough complexity to show what's going on is probably merge sort. It's no coincidence that this algorithm is the classical example to begin explaining the divide and conquer technique.



              I am not sure at what level you teach, but your students should be comfortable with both recursion and inductive proofs before venturing far into this territory.



              Coincidentally, there is a list of divide and conquer algorithms found here. It's a pretty long list, and might have cast too wide a net. I'm not convinced that I agree that all of the algorithms are genuinely divide and conquer. However, it could be that upon closer inspection, they are.



              In any case, it's a great starting point to find algorithms to present to your students. Just be sure that you can clearly explain the central divide/conquer/combine throughline for any algorithms you choose to bring to your students. This area of algorithms is full of traps for unwary beginners, so your students will benefit greatly from thought and care put into your presentation.






              share|improve this answer










              $endgroup$



















                7
















                $begingroup$

                The simplest example that still bears enough complexity to show what's going on is probably merge sort. It's no coincidence that this algorithm is the classical example to begin explaining the divide and conquer technique.



                I am not sure at what level you teach, but your students should be comfortable with both recursion and inductive proofs before venturing far into this territory.



                Coincidentally, there is a list of divide and conquer algorithms found here. It's a pretty long list, and might have cast too wide a net. I'm not convinced that I agree that all of the algorithms are genuinely divide and conquer. However, it could be that upon closer inspection, they are.



                In any case, it's a great starting point to find algorithms to present to your students. Just be sure that you can clearly explain the central divide/conquer/combine throughline for any algorithms you choose to bring to your students. This area of algorithms is full of traps for unwary beginners, so your students will benefit greatly from thought and care put into your presentation.






                share|improve this answer










                $endgroup$

















                  7














                  7










                  7







                  $begingroup$

                  The simplest example that still bears enough complexity to show what's going on is probably merge sort. It's no coincidence that this algorithm is the classical example to begin explaining the divide and conquer technique.



                  I am not sure at what level you teach, but your students should be comfortable with both recursion and inductive proofs before venturing far into this territory.



                  Coincidentally, there is a list of divide and conquer algorithms found here. It's a pretty long list, and might have cast too wide a net. I'm not convinced that I agree that all of the algorithms are genuinely divide and conquer. However, it could be that upon closer inspection, they are.



                  In any case, it's a great starting point to find algorithms to present to your students. Just be sure that you can clearly explain the central divide/conquer/combine throughline for any algorithms you choose to bring to your students. This area of algorithms is full of traps for unwary beginners, so your students will benefit greatly from thought and care put into your presentation.






                  share|improve this answer










                  $endgroup$



                  The simplest example that still bears enough complexity to show what's going on is probably merge sort. It's no coincidence that this algorithm is the classical example to begin explaining the divide and conquer technique.



                  I am not sure at what level you teach, but your students should be comfortable with both recursion and inductive proofs before venturing far into this territory.



                  Coincidentally, there is a list of divide and conquer algorithms found here. It's a pretty long list, and might have cast too wide a net. I'm not convinced that I agree that all of the algorithms are genuinely divide and conquer. However, it could be that upon closer inspection, they are.



                  In any case, it's a great starting point to find algorithms to present to your students. Just be sure that you can clearly explain the central divide/conquer/combine throughline for any algorithms you choose to bring to your students. This area of algorithms is full of traps for unwary beginners, so your students will benefit greatly from thought and care put into your presentation.







                  share|improve this answer













                  share|improve this answer




                  share|improve this answer










                  answered Jul 21 at 10:36









                  Ben I.Ben I.

                  19.5k7 gold badges45 silver badges112 bronze badges




                  19.5k7 gold badges45 silver badges112 bronze badges
























                      3
















                      $begingroup$

                      These sorts of patterns are a bit tricky in real life. In nice easy computer-science land, every step is the same, just smaller. Merge sort is clearly the ultimate easy example of this.



                      In real life, we tend to break things up along useful lines. If we're sorting change, we first divide the coins up by denominations, then total up each denomination before adding them together. When we put together a puzzle, we divide out the edge pieces first, put them together, then build the rest of the puzzle on that. In war, we divide an opponent into pieces which cannot work as a cohesive unit, then crush them.



                      We see this in real life more often than blind divisions because we, as humans, know we can divide along useful lines. The closest I know of that is quicksort's attempt to find a middle index to partition with.



                      One thing I find tricky about these divide and conquer algorithms is that they look like an infinite regression. You keep proving you can sort lists as long as you can sort smaller lists.... which you know you can do because you can sort smaller lists... so on and so forth. Infinite regression is a serious faux pas in modern logic, so I think people may get confused by that. Showing that "if I can sort a list of length n, I can sort a list of length 2n" would be the more traditional mathematical induction approach.



                      Then again, all may be for naught, for it is quite clear the best use for divide an conquer in real life is to put together a thrilling Hungarian dance.






                      share|improve this answer










                      $endgroup$










                      • 2




                        $begingroup$
                        +1 for the Hungarian dance example :)
                        $endgroup$
                        – DavidPostill
                        Jul 22 at 12:41















                      3
















                      $begingroup$

                      These sorts of patterns are a bit tricky in real life. In nice easy computer-science land, every step is the same, just smaller. Merge sort is clearly the ultimate easy example of this.



                      In real life, we tend to break things up along useful lines. If we're sorting change, we first divide the coins up by denominations, then total up each denomination before adding them together. When we put together a puzzle, we divide out the edge pieces first, put them together, then build the rest of the puzzle on that. In war, we divide an opponent into pieces which cannot work as a cohesive unit, then crush them.



                      We see this in real life more often than blind divisions because we, as humans, know we can divide along useful lines. The closest I know of that is quicksort's attempt to find a middle index to partition with.



                      One thing I find tricky about these divide and conquer algorithms is that they look like an infinite regression. You keep proving you can sort lists as long as you can sort smaller lists.... which you know you can do because you can sort smaller lists... so on and so forth. Infinite regression is a serious faux pas in modern logic, so I think people may get confused by that. Showing that "if I can sort a list of length n, I can sort a list of length 2n" would be the more traditional mathematical induction approach.



                      Then again, all may be for naught, for it is quite clear the best use for divide an conquer in real life is to put together a thrilling Hungarian dance.






                      share|improve this answer










                      $endgroup$










                      • 2




                        $begingroup$
                        +1 for the Hungarian dance example :)
                        $endgroup$
                        – DavidPostill
                        Jul 22 at 12:41













                      3














                      3










                      3







                      $begingroup$

                      These sorts of patterns are a bit tricky in real life. In nice easy computer-science land, every step is the same, just smaller. Merge sort is clearly the ultimate easy example of this.



                      In real life, we tend to break things up along useful lines. If we're sorting change, we first divide the coins up by denominations, then total up each denomination before adding them together. When we put together a puzzle, we divide out the edge pieces first, put them together, then build the rest of the puzzle on that. In war, we divide an opponent into pieces which cannot work as a cohesive unit, then crush them.



                      We see this in real life more often than blind divisions because we, as humans, know we can divide along useful lines. The closest I know of that is quicksort's attempt to find a middle index to partition with.



                      One thing I find tricky about these divide and conquer algorithms is that they look like an infinite regression. You keep proving you can sort lists as long as you can sort smaller lists.... which you know you can do because you can sort smaller lists... so on and so forth. Infinite regression is a serious faux pas in modern logic, so I think people may get confused by that. Showing that "if I can sort a list of length n, I can sort a list of length 2n" would be the more traditional mathematical induction approach.



                      Then again, all may be for naught, for it is quite clear the best use for divide an conquer in real life is to put together a thrilling Hungarian dance.






                      share|improve this answer










                      $endgroup$



                      These sorts of patterns are a bit tricky in real life. In nice easy computer-science land, every step is the same, just smaller. Merge sort is clearly the ultimate easy example of this.



                      In real life, we tend to break things up along useful lines. If we're sorting change, we first divide the coins up by denominations, then total up each denomination before adding them together. When we put together a puzzle, we divide out the edge pieces first, put them together, then build the rest of the puzzle on that. In war, we divide an opponent into pieces which cannot work as a cohesive unit, then crush them.



                      We see this in real life more often than blind divisions because we, as humans, know we can divide along useful lines. The closest I know of that is quicksort's attempt to find a middle index to partition with.



                      One thing I find tricky about these divide and conquer algorithms is that they look like an infinite regression. You keep proving you can sort lists as long as you can sort smaller lists.... which you know you can do because you can sort smaller lists... so on and so forth. Infinite regression is a serious faux pas in modern logic, so I think people may get confused by that. Showing that "if I can sort a list of length n, I can sort a list of length 2n" would be the more traditional mathematical induction approach.



                      Then again, all may be for naught, for it is quite clear the best use for divide an conquer in real life is to put together a thrilling Hungarian dance.







                      share|improve this answer













                      share|improve this answer




                      share|improve this answer










                      answered Jul 22 at 2:48









                      Cort AmmonCort Ammon

                      8112 silver badges7 bronze badges




                      8112 silver badges7 bronze badges










                      • 2




                        $begingroup$
                        +1 for the Hungarian dance example :)
                        $endgroup$
                        – DavidPostill
                        Jul 22 at 12:41












                      • 2




                        $begingroup$
                        +1 for the Hungarian dance example :)
                        $endgroup$
                        – DavidPostill
                        Jul 22 at 12:41







                      2




                      2




                      $begingroup$
                      +1 for the Hungarian dance example :)
                      $endgroup$
                      – DavidPostill
                      Jul 22 at 12:41




                      $begingroup$
                      +1 for the Hungarian dance example :)
                      $endgroup$
                      – DavidPostill
                      Jul 22 at 12:41











                      1
















                      $begingroup$

                      If you want to divide a long loaf of bread in 8 or 16 equal pieces, generally people cut it into two equal halves first and then cut each half into two equal halves again, repeating the process until you get as many pieces as you want - 8, 16, 32, or whatever. Almost nobody tries to divide the loaf into 8 pieces all at once - people can guess halves much better than eighths.






                      share|improve this answer












                      $endgroup$














                      • $begingroup$
                        Hello, and welcome to Computer Science Educators SE! While your example is good, you may want to add some explanation of why your example appropriately addresses the question. Thanks!
                        $endgroup$
                        – heather
                        Jul 31 at 18:14















                      1
















                      $begingroup$

                      If you want to divide a long loaf of bread in 8 or 16 equal pieces, generally people cut it into two equal halves first and then cut each half into two equal halves again, repeating the process until you get as many pieces as you want - 8, 16, 32, or whatever. Almost nobody tries to divide the loaf into 8 pieces all at once - people can guess halves much better than eighths.






                      share|improve this answer












                      $endgroup$














                      • $begingroup$
                        Hello, and welcome to Computer Science Educators SE! While your example is good, you may want to add some explanation of why your example appropriately addresses the question. Thanks!
                        $endgroup$
                        – heather
                        Jul 31 at 18:14













                      1














                      1










                      1







                      $begingroup$

                      If you want to divide a long loaf of bread in 8 or 16 equal pieces, generally people cut it into two equal halves first and then cut each half into two equal halves again, repeating the process until you get as many pieces as you want - 8, 16, 32, or whatever. Almost nobody tries to divide the loaf into 8 pieces all at once - people can guess halves much better than eighths.






                      share|improve this answer












                      $endgroup$



                      If you want to divide a long loaf of bread in 8 or 16 equal pieces, generally people cut it into two equal halves first and then cut each half into two equal halves again, repeating the process until you get as many pieces as you want - 8, 16, 32, or whatever. Almost nobody tries to divide the loaf into 8 pieces all at once - people can guess halves much better than eighths.







                      share|improve this answer















                      share|improve this answer




                      share|improve this answer








                      edited Jul 31 at 18:13









                      heather

                      4,0339 silver badges36 bronze badges




                      4,0339 silver badges36 bronze badges










                      answered Jul 23 at 9:20









                      sparsh sharmasparsh sharma

                      112 bronze badges




                      112 bronze badges














                      • $begingroup$
                        Hello, and welcome to Computer Science Educators SE! While your example is good, you may want to add some explanation of why your example appropriately addresses the question. Thanks!
                        $endgroup$
                        – heather
                        Jul 31 at 18:14
















                      • $begingroup$
                        Hello, and welcome to Computer Science Educators SE! While your example is good, you may want to add some explanation of why your example appropriately addresses the question. Thanks!
                        $endgroup$
                        – heather
                        Jul 31 at 18:14















                      $begingroup$
                      Hello, and welcome to Computer Science Educators SE! While your example is good, you may want to add some explanation of why your example appropriately addresses the question. Thanks!
                      $endgroup$
                      – heather
                      Jul 31 at 18:14




                      $begingroup$
                      Hello, and welcome to Computer Science Educators SE! While your example is good, you may want to add some explanation of why your example appropriately addresses the question. Thanks!
                      $endgroup$
                      – heather
                      Jul 31 at 18:14











                      1
















                      $begingroup$

                      MergeSort is fairly easy to implement in Python and it's a straightforward divide-and-conquer algorithm. You keep splitting the collection in half until it is in trivial-to-sort pieces. This splitting reduces sorting from O(n^2) to O(nlog(n)).



                      Second example: computing integer powers. if the power is even, square base and integer divide exponent by 2. If it's odd, do the same and multiply by a factor of the base. This algorithm is O(log(n)) instead of O(n), which would come from computing an integer power with a simple loop.






                      share|improve this answer












                      $endgroup$














                      • $begingroup$
                        Would you mind providing a bit more explanation for why you think merge sort is a good example to use for teaching divide and conquer? Not every divide and conquer algorithm will be useful for teaching the concept of divide and conquer, so why do you think merge sort is?
                        $endgroup$
                        – thesecretmaster
                        Sep 10 at 17:17















                      1
















                      $begingroup$

                      MergeSort is fairly easy to implement in Python and it's a straightforward divide-and-conquer algorithm. You keep splitting the collection in half until it is in trivial-to-sort pieces. This splitting reduces sorting from O(n^2) to O(nlog(n)).



                      Second example: computing integer powers. if the power is even, square base and integer divide exponent by 2. If it's odd, do the same and multiply by a factor of the base. This algorithm is O(log(n)) instead of O(n), which would come from computing an integer power with a simple loop.






                      share|improve this answer












                      $endgroup$














                      • $begingroup$
                        Would you mind providing a bit more explanation for why you think merge sort is a good example to use for teaching divide and conquer? Not every divide and conquer algorithm will be useful for teaching the concept of divide and conquer, so why do you think merge sort is?
                        $endgroup$
                        – thesecretmaster
                        Sep 10 at 17:17













                      1














                      1










                      1







                      $begingroup$

                      MergeSort is fairly easy to implement in Python and it's a straightforward divide-and-conquer algorithm. You keep splitting the collection in half until it is in trivial-to-sort pieces. This splitting reduces sorting from O(n^2) to O(nlog(n)).



                      Second example: computing integer powers. if the power is even, square base and integer divide exponent by 2. If it's odd, do the same and multiply by a factor of the base. This algorithm is O(log(n)) instead of O(n), which would come from computing an integer power with a simple loop.






                      share|improve this answer












                      $endgroup$



                      MergeSort is fairly easy to implement in Python and it's a straightforward divide-and-conquer algorithm. You keep splitting the collection in half until it is in trivial-to-sort pieces. This splitting reduces sorting from O(n^2) to O(nlog(n)).



                      Second example: computing integer powers. if the power is even, square base and integer divide exponent by 2. If it's odd, do the same and multiply by a factor of the base. This algorithm is O(log(n)) instead of O(n), which would come from computing an integer power with a simple loop.







                      share|improve this answer















                      share|improve this answer




                      share|improve this answer








                      edited Sep 12 at 23:46

























                      answered Sep 9 at 23:59









                      ncmathsadistncmathsadist

                      1,8433 silver badges14 bronze badges




                      1,8433 silver badges14 bronze badges














                      • $begingroup$
                        Would you mind providing a bit more explanation for why you think merge sort is a good example to use for teaching divide and conquer? Not every divide and conquer algorithm will be useful for teaching the concept of divide and conquer, so why do you think merge sort is?
                        $endgroup$
                        – thesecretmaster
                        Sep 10 at 17:17
















                      • $begingroup$
                        Would you mind providing a bit more explanation for why you think merge sort is a good example to use for teaching divide and conquer? Not every divide and conquer algorithm will be useful for teaching the concept of divide and conquer, so why do you think merge sort is?
                        $endgroup$
                        – thesecretmaster
                        Sep 10 at 17:17















                      $begingroup$
                      Would you mind providing a bit more explanation for why you think merge sort is a good example to use for teaching divide and conquer? Not every divide and conquer algorithm will be useful for teaching the concept of divide and conquer, so why do you think merge sort is?
                      $endgroup$
                      – thesecretmaster
                      Sep 10 at 17:17




                      $begingroup$
                      Would you mind providing a bit more explanation for why you think merge sort is a good example to use for teaching divide and conquer? Not every divide and conquer algorithm will be useful for teaching the concept of divide and conquer, so why do you think merge sort is?
                      $endgroup$
                      – thesecretmaster
                      Sep 10 at 17:17


















                      draft saved

                      draft discarded















































                      Thanks for contributing an answer to Computer Science Educators 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%2fcseducators.stackexchange.com%2fquestions%2f5826%2fa-real-world-example-for-the-divide-and-conquer-method%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

                      Tamil (spriik) Luke uk diar | Nawigatjuun

                      Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

                      Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?