Friday, November 14, 2014

Understanding Algorithms - Resources

https://fiftyexamples.readthedocs.org/en/latest/algorithms.html

Calling something an algorithm means that the following properties are all true:
  • An algorithm is an unambiguous description that makes clear what has to be implemented. In a recipe, a step such as “Bake until done” is ambiguous because it doesn’t explain what “done” means. A more explicit description such as “Bake until the cheese begins to bubble” is better. In a computational algorithm, a step such as “Choose a large number” is vague: what is large? 1 million, 1 billion, or 100? Does the number have to be different each time, or can the same number be used on every run?
  • An algorithm expects a defined set of inputs. For example, it might require two numbers where both numbers are greater than zero. Or it might require a word, or a list of zero or more numbers.
  • An algorithm produces a defined set of outputs. It might output the larger of the two numbers, an all-uppercase version of a word, or a sorted version of the list of numbers.
  • An algorithm is guaranteed to terminate and produce a result, always stopping after a finite time. If an algorithm could potentially run forever, it wouldn’t be very useful because you might never get an answer.
  • Most algorithms are guaranteed to produce the correct result. It’s rarely useful if an algorithm returns the largest number 99% of the time, but 1% of the time the algorithm fails and returns the smallest number instead. [1]
  • If an algorithm imposes a requirement on its inputs (called aprecondition), that requirement must be met. For example, a precondition might be that an algorithm will only accept positive numbers as an input. If preconditions aren’t met, then the algorithm is allowed to fail by producing the wrong answer or never terminating.



http://core.ecu.edu/csci/wirthj/Algorithms/introAlgo-c.html
  An algorithm is a series of specific steps which solve a particular problem.
series
  • The steps must be done in a particular order and each of the steps must be used (unless the algorithm says otherwise).
specific
  • A step must NOT be replaced by a similar step.
steps
  • Like a cooking recipe, an algorithm tells you to do things. Each thing you do is called a step (aka instruction, aka command)
solve
  • An algorithm produces a final result (aka output) which is the solution to a problem.
particular problem
  • The algorithm for one problem will not usually solve a different problem.
  • The details defining the problem must be made available at the start of the algorithm. These details are called givens. (aka parameters).

  • Most algorithms have these basic parts:
  • Description of Problem
  • Set up
  • Parameters
  • Execution
  • Conclusion

http://www.cleveralgorithms.com/


Online Classes

Algorithms
http://theopenacademy.com/content/lecture-1-analysis-algorithms


Logic
https://www.coursera.org/course/intrologic

No comments:

Post a Comment