3

Well, I know that algorithmic paradigms are the templates to create algorithms to solve certain type of computational problems. (correct me if I am wrong) But what I don't understand is, "How do I check if the algorithmic paradigm is suitable for use for a certain type of problem?" and Are there any guidelines to follow while using an algorithmic paradigm to solve a problem? or Are there any guidelines which state, "Where to use a particular algorithmic paradigm and where not to use it?"

Tom Shaw
  • 139
  • 12
  • 1
    For DP, you are looking for optimal substructure (i.e. a perfect solution to the subproblem, is going to be part in constructing the big problem). I am not familiar with guidelines for the rest though. – amit Feb 27 '21 at 11:16
  • 2
    1. "How do I check if the algorithmic paradigm is suitable for use for a certain type of problem?" has a name: https://en.wikipedia.org/wiki/Decision_problem ..and it is (NP)*hard*! :) 2. Study cs! ;) – xerx593 Feb 27 '21 at 11:17
  • 1
    1. Try to write a dynamic program (and then maybe it simplifies, e.g., to a greedy algorithm). 2. Try to write an integer program (and then maybe it's totally unimodular and there's some specialization based on matchings or flows). 3. If those don't work it's going to be something ad hoc. Then, getting a *faster* algorithm once you have a polynomial time one is its own and wilder thing. – David Eisenstat Feb 27 '21 at 14:16
  • I appreciate your comments, but I still don't have an answer. Do you think the way the paradigms divide the problems, in itself is a guideline to use the paradigm and then matching the overall complexities decides which paradigm to work with. – Tom Shaw Feb 27 '21 at 14:28

0 Answers0