von Neumann Machine Processing Unit: Arithmetic Logical Unit (ALU) and Processor Registers Control Unit: Instruction Register and Program Counter Memory - Stores data and instructions External Mass Storage Input and Output mechanisms (I/O) Data Flow Through a von Neumann Machine
Basic properties of sets Two characteristics of a set There are no repeated occurrences of elements There is no particular order or arrangement of the elements How do you show A is a subset of B? If A and B are sets and every element of A is also an element of B, then A is a subset of B. How do you show A = B? A is a subset of B, and B is a subset of A Operations on sets Union - A union B = set of x s.t. x is an element of A or x is an element of B Intersection - A intersect B = set of x s.t. x is an element of A and x is an element of B Complement Cardinality Inclusion-Exclusion principle | A ∪ B | = | A | + | B | − | A ∩ B |. Inclusion-Exclusion for 3 sets | A ∪ B ∪ C | = | A | + | B | + | C | − | B ∩ C | − | A ∩ B | − | A ∩ C | + | A ∩ B ∩ C | Difference rule | A − B | = | A | − | A ∩ B |.
Inductively Defined Sets Steps needed to define a set inductively 1. There is a starting element 2. There is a construction operation to build new elements from existing elements 3. There is a statement that no other elements are in the set. Basis: Specify one or more elements of S Induction: Give one or more rules to construct new elements of S from existing elements of S Closure: State that S consists exactly of the elements obtained by the basis and induction steps. (usually assumed, not states explicitly) Note: The basis elements and the induction rules are called constructors . Example. Find an inductive definition for S = {3, 16, 29, 42, …}. Solution : Basis : 3 Î S . Induction : If x Î S then x + 13 Î S . Recursive Functions and Procedures Constructing a Recursively Defined Procedure [or function P(x) = f(x)] If S is an inductively defined set, we...
Comments
Post a Comment