Discrete Mathematics University of Kentucky CS 275 Spring ... - MGNet
Discrete Mathematics University of Kentucky CS 275 Spring ... - MGNet
Discrete Mathematics University of Kentucky CS 275 Spring ... - MGNet
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Notation: Timing, as a function <strong>of</strong> the number <strong>of</strong> elements falls into the field <strong>of</strong><br />
Complexity.<br />
Complexity Terminology<br />
>(1) Constant<br />
>(log(n)) Logarithmic<br />
>(n)<br />
Linear<br />
>(nlog(n)) nlog(n)<br />
>(n k )<br />
Polynomial<br />
>(n k log(n)) Polylog<br />
>(k n ), where k>1 Exponential<br />
>(n!)<br />
Factorial<br />
Notation: Problems are tractable if they can be solved in polynomial time and<br />
are intractable otherwise.<br />
41<br />
Algorithms, Integers, and Matrices<br />
Definition: An algorithm is a finite set <strong>of</strong> precise instructions for solving a<br />
problem.<br />
Computational algorithms should have these properties:<br />
• Input: Values from a specified set.<br />
• Output: Results using the input from a specified set.<br />
• Definiteness: The steps in the algorithm are precise.<br />
• Correctness: The output produced from the input is the right solution.<br />
• Finiteness: The results are produced using a finite number <strong>of</strong> steps.<br />
• Effectiveness: Each step must be performable and in a finite amount <strong>of</strong><br />
time.<br />
• Generality: The procedure should accept all input from the input set, not<br />
just special cases.<br />
42