cpsc 121 models of computation
play

CPSC 121: Models of Computation Instructor: Bob Woodham - PowerPoint PPT Presentation

CPSC 121: Models of Computation Instructor: Bob Woodham woodham@cs.ubc.ca Department of Computer Science University of British Columbia Lecture Notes 2009/2010, Section 203 CPSC 121: Models of Computation Menu April 14, 2010 Topics: Final


  1. CPSC 121: Models of Computation Instructor: Bob Woodham woodham@cs.ubc.ca Department of Computer Science University of British Columbia Lecture Notes 2009/2010, Section 203 CPSC 121: Models of Computation

  2. Menu April 14, 2010 Topics: Final Reading List Learning Goals Summary What Next? The End! Reminders: READ the WebCT Vista course announcements board — pickup of marked Assignments 3 and 4 — extended office hours — pre-final exam review session(s) On-line teaching evaluation (until 11:00pm April 17) Final exam Thursday, Apr 29, noon, OSBO A www: http://www.ugrad.cs.ubc.ca/~cs121/ WebCT Vista: http://www.vista.ubc.ca CPSC 121: Models of Computation

  3. Final Exam Coverage Section 203 Lectures 1–35 1 — cumulative [slides] and [with notes] versions provided — supplementary handouts (see Section 203 Handouts) Epp: 2 Chapter 1 Chapter 2 Sections 3.1, 3.6, and 3.7 plus Theorem 3.4.1 and pages 159–163 Section 4.1 (purely as background reading) Sections 4.2–4.4 Sections 5.1–5.3 Section 7.1 and Section 7.2 (excluding “Application: Hash Functions” and “Properties of Exponential and Logarithmic Functions”) Section 12.1–12.2 Labs 0–10 3 CPSC 121: Models of Computation

  4. Learning Goals Evaluate the truth of simple propositional logic statements 1 using truth tables Translate back and forth between simple natural language 2 statements and propositional logic Translate back and forth between propositional logic 3 statements and combinational circuits built using standard logic gates (NOT, AND, OR, XOR, NAND, NOR) Design combinational circuits based on propositional logic 4 expressions and their equivalent logic circuits to solve real problems (e.g., a 7 segment LED numerical display) Evaluate propositional logic as a model of computation for 5 combinational circuits, identifying at least one explicit shortfall (e.g., timing based on gate delays, fan-out, wire length, instabilities, shared sub-circuits, etc.) CPSC 121: Models of Computation

  5. Learning Goals (cont’d) Translate back and forth between simple natural language 6 statements and propositional logic, including conditionals and biconditionals Evaluate the truth of simple propositional logic statements 7 using truth tables, including conditionals and biconditionals Given a propositional logic statement and a logical 8 equivalence rule, apply the rule to create the equivalent statement Transform propositional logic statements by application of 9 logical equivalence rules in order to: — simplify complex statements — prove the logical equivalence of two statements — represent statements in a standard canonical form CPSC 121: Models of Computation

  6. Learning Goals (cont’d) 10 Convert integers from octal or hexadecimal to binary and back 11 Convert positive integers from decimal to binary — by “repeated division” (octal/hex as intermediary) 12 Convert positive integers from binary to decimal 13 Take the 2’s complement of a fixed width binary number 14 Convert signed (either positive or negative) integers to binary and back 15 Add and subtract fixed width, 2’s complement (signed) binary integers 16 Convert decimal fractions (in positional notation) to binary fractions (in positional notation) — by “repeated multiplication” (octal/hex as intermediary) CPSC 121: Models of Computation

  7. Learning Goals (cont’d) 17 Critique different number representations describing their strengths and weaknesses (finite representation, overflow, etc.). Representations include: positional notation (binary, octal, decimal, hexadecimal); binary coded decimal (BCD); fixed-width, 2’s complement (signed) binary; IEEE 754 floating point (single and double precision) 18 Use truth tables to establish or refute the validity of a proposed rule of inference 19 Given a rule of inference and propositional logic statements that correspond to the rule’s premises, apply the rule to infer a new statement implied by the original statements 20 Explore the logical consequences of a set of propositional statements by application of both equivalence and inference rules, especially in order to transform statements into a desired canonical form CPSC 121: Models of Computation

  8. Learning Goals Understand the definition of a predicate and its associated 1 domain of discourse Evaluate the truth of predicates applied to particular values 2 Understand what it means for a predicate to be universally 3 quantified or existentially quantified Show predicate logic statements are true by enumerating 4 examples (i.e., all examples in the domain of discourse for a universally quantified statement or at least one example for an existentially quantified statement) Show predicate logic statements are false by enumerating 5 counterexamples (i.e., one counterexample for a universally quantified statement or all for an existentially quantified statement) CPSC 121: Models of Computation

  9. Learning Goals (cont’d) Translate between statements in formal predicate logic 6 notation and equivalent statements in closely matching informal language (i.e., informal statements with clear and explicitly stated quantifiers) Construct predicate logic statements to capture the 7 relationships between properties of various objects both real-world like and computing related Determine the negation of any quantified statement, 8 including multiply quantified statements, using generalized De Morgan Given a quantified statement and a logical equivalence 9 rule, apply the rule to create an equivalent statement CPSC 121: Models of Computation

  10. Learning Goals (cont’d) 10 Apply additional rules of inference for quantified statements including universal instantiation, universal generalizarion, existential instantiation, existential generalization, universal modus ponens, universal modus tollens, and universal transitivity 11 Prove (or disprove) conjectures involving quantified statements using basic proof techniques, both direct and indirect, including proof by contradiction and proof by contrapositive CPSC 121: Models of Computation

  11. Learning Goals Understand the following basic proof strategies: 1 constructive/nonconstructive proofs of existence (“witness”) disproof by counterexample exhaustive proof generalizing from the generic particular (“WLOG”) direct proof (“antecedent assumption”) proof by contradiction proof by contrapositive proof by cases well enough to identify the strategy when it is encountered in a given proof and well enough to apply it as a strategy in a novel proof CPSC 121: Models of Computation

  12. Learning Goals (cont’d) Devise and attempt multiple different, appropriate proof 2 strategies for a given theorem – including all those listed above – that use definitions, premises, logical equivalences, rules of inference and rules of inference for quantified variables Prove theorems requiring only simple insights beyond 3 choice of proof strategy or for which the necessary insight is given as a hint/suggestion CPSC 121: Models of Computation

  13. Learning Goals Recognize mathematical induction as a proof technique for 1 statements universally quantified over the positive integers, Z + Given a theorem to prove expressed in terms of a variable, 2 n , universally quantified over Z + , write out the template for an inductive proof including: the induction hypothesis, the base case(s) that need to be proved„ and the inductive step that needs to be proved Complete all the steps of a formal proof by induction using 3 either regular (weak) or strong induction, as needed Critique formal inductive proofs to determine whether they 4 are valid or where the error(s) lie if they are invalid CPSC 121: Models of Computation

  14. Learning Goals Specify a DFA formally as a 5-tuple defined using set and 1 function notation Define regular expressions and their associated regular 2 language Identify the regular language recognized by a particular 3 DFA Build a DFA to recognize a particular regular language 4 Connect the graphical (state transition diagram) and formal 5 (5-tuple) representations of DFAs and illustrate how each part works CPSC 121: Models of Computation

  15. Learning Goals To design and analyze simple sequential circuits: circuits 1 that perform sequences of steps and remember information from previous steps To define a Deterministic Finite State Automaton (DFA) 2 (aka a finite state machine (FSM)) both in terms of a state transition diagram and a state transition table To implement any specific DFA (of modest complexity) as a 3 sequential circuit To specify the overall architecture of a (Von Neumann) 4 stored program computer – an architecture that instantiates the principle that both program and data are bits (i.e., state) loaded and stored in (common) memory To interpret the (Von Neumann) stored program computer 5 as a “universal” FSM (i.e., as a FSM that can implement any other FSM via changes to the program and data) CPSC 121: Models of Computation

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend