2024-12-2618:03 Status: Tags: Proofs Discrete mathematics
Course Learning Outcomes
- Problem modeling
- Modeling formalisms
- Problem-solving
- Communication
- Characterization of algorithms + correctness/efficiency
- Proofs
- Explain how computers work
Modeling
Propositional logic Predicate logic Combinational Circuits DFA’s NFA’s Regular expressions Sequential circuits
Problem-Solving
Making the problem more precise Understanding the problem better Reason about the problem Provide a solution (if possible)
Validating Solutions (Proofs)
“Proving arguments to support solutions”
Constructive/non-constructive proofs of existence
Generalizing from the generic particular
Antecedent assumption
Proof by cases
Proof by contrapositive or other equivalent
Proof by contradiction
Induction
Reasoning about Algorithms
“Reason about simple algorithms” = solutions
Prove solutions are correct for certain inputs
Prove how efficient they are
Compare solutions
Circuits
Discrete mathematics
Math Review
Divisibility
A number is divisible if there is no remainder does not divide , which means that is not divisible by always divide 0, 0 never divides () Odd numbers can be expressed as , where is an integer Even numbers can be expressed as , where is an integer Prime numbers have no factors but itself and 1, e.g. 2, 3, 5, 7, 11 … Composite numbers are not prime numbers 1 is neither a composite number nor a prime number A number is divisible by 2 if it is even A number is divisible by 3 is the sum of the digits are A number is divisible by 5 if it ends with 5 or 0 A number is divisible by 7 if it A number is divisible by 9 if it the sum of the digits are divisible by 9. ()
Exponentiation
The exponentiation is equal to the multiplication of a repeated times. For the expression , is called the base while is the exponent (also called the power). See Binomial Theorem for
Logarithms
The inverse operation of exponentiation is the logarithm. If . is used most often for computer science. Applications for logarithms in CS are proofs that require logarithms, processing/delay time for circuits of an arbitrary size, when comparing varying runtime (Time complexity), Big O Notation. \log _a (x^b) = b \log_a x$$\log _a x = \frac {\log _k x}{\log _k a} In general, the larger the base, the slower it grows. E.g. grows slower than
Inequalities
To evaluate the runtime of algorithms, inequalities are necessary for proofs. An inequality is a relation that makes a comparison between two mathematical expressions. This will be more advanced than high school’s application If then and If then . Imagine flipping building heights across a horizon If then . Take and to see that this is true.
Summation
In order to take the sum of a sequence of numbers, sums are used . Basically a for loop where numbers are added to each other.
Product
Similar to summation, product multiplies all the terms:
Recursive Functions
By using the function in its definition, the function repeats itself to complete the remaining terms. A factorial is an example of this. Fibonacci can be defined as
Floor and Ceiling
To take the floor of a real number, truncate the decimals or round down. (If it’s already an integer it stays the same) , To take the ceiling of a real number, round up to the next integer. (If it’s already an integer is stays the same) ,
Propositional Logic
… True = switch is on, high voltage, 1. False = switch is off, low voltage, 0. Circuits have binary inputs and produce outputs Each logical expression can be represented as a logic gate on a curcuit is a sequence of logic gates connected A circuit can be represented as a proposition and a truth table. Two digital logic circuits are equivalent if and only if their input/output tables are identical. Put brackets all propositional statemtns with an operator except
f f f f is first = 0 0 0 0 = 0 t t t t is last = 1 1 1 1 = 31