# Computer Algorithms > - https://algorithmviewer.com/# Some algorithms/problems have already been mathematically solved - don’t try to further optimize/simplify something that is already the best it can be ## Properties of Algorithms ### Computational Determinism & Uncertainty 1. **Deterministic:** Where outcomes are entirely predictable from the initial state and inputs. --- 2. **Probabilistic:** Where outcomes are influenced by chance or probability, and uncertainty is explicitly modeled using probability distributions. In a [[Probability Theory|probabilistic algorithm]], instead of always following the same steps when given the same input, as a deterministic algorithm does, the algorithm makes one or more random choices, which may lead to different output. - While these models do involve uncertainy & probabilities, they can still be deterministic (and deterministic models can be embedded within them). --- 3. **Non-deterministic:** Where outcomes may vary even with the same initial conditions, introducing variability, often due to stochastic elements or external factors. - algorithm tags: related: - "[[Computer Science.canvas|Computer Science]]" - "[[Algorithm Analysis]]" - "[[Dynamic Programming]]" - "[[Greedy Algorithms]]" --- # Computer Algorithms https://algorithmvisionknights-v3.web.app/ Some algorithms/problems have already been mathematically solved - don’t try to further optimize/simplify something that is already the best it can be ## Algorithm Design Techniques - Greedy Algorithms - Probabilistic Algorithms - aka approximate, > [!NOTE] > > - [[Sorting Algorithms]] > - [[Searching Algorithms]] > - [[Backtracking Algorithms]] **Algorithmic Techniques** - [[Dynamic Programming]] - [[Greedy Algorithms]] - [[Backtracking Algorithms]] ## Properties of Algorithms ### Heuristics In some cases, it’s worth sacrificing accuracy/optimality for increased efficiency. This can be achieved through the use of **heuristics**. ### Uncertainty & Approximations Sometimes it is far too computationally taxing to attempt to find the exact solution to a problem. Many types of **approximate algorithms** have been developed which seek to find #### Deterministic Where outcomes are entirely predictable from the initial state and inputs. #### Probabilistic Where outcomes are influenced by chance or probability, and uncertainty is explicitly modeled using probability distributions. In a [[Probability Theory|probabilistic]] algorithm, instead of always following the same steps when given the same input, as a deterministic algorithm does, the algorithm makes one or more random choices, which may lead to different output. - While these models do involve uncertainy & probabilities, they can still be deterministic (and deterministic models can be embedded within them). #### Approximate Algorithms > See also: > - [[Sampling Techniques]] There are two major families of approximate algorithms: - *Variational:* Formulates inference as an optimization problem - *Sampling:* Produces answers by repeatedly generating random numbers (samples) from a distribution of interest Sampling methods can be used to perform both marginal and maximum a posteriori (MAP) inference queries ## Optimizing Algorithms In addition to employing efficient design strategies, there are several considerations you can make during the actual implementation of an algorithm. ### Vectorization ### Heuristics In some cases, it’s worth sacrificing accuracy/optimality for increased efficiency. This can be achieved through the use of **heuristics**. ## Common Types of Algorithms > [!NOTE] > > - [[Sorting Algorithms]] > - [[Searching Algorithms]] > - [[Backtracking Algorithms]] **Algorithmic Techniques** - [[Dynamic Programming]] - [[Greedy Algorithms]] - [[Backtracking Algorithms]] - Divide and Conquer