TAILIEUCHUNG - Lecture Discrete structures: Chapter 7 - Amer Rasheed
This chapter examine code to determine the run time of various operations. We will introduce machine instructions, we will calculate the run times of: operators +, -, =, +=, ++, etc; control statements if, for, while, do-while, switch; functions; recursive functions. | (CSC 102) Lecture 7 Discrete Structures Previous Lectures Summary Predicates Set Notation Universal and Existential Statement Translating between formal and informal language Universal conditional Statements Equivalence Form Implicit Qualification Negations Predicates and Quantified statements II Today's Lecture Statements containing “∀ ” and “∃” Nested Quantifiers Relations Universal Instantiation statement Universal Modus Ponens Universal Modus Tollens Quantified form of Converse and Inverse error Interpreting Multiply-Quantified Statements A college cafeteria line has four stations: salads, main courses, desserts, and beverages. The salad station offers a choice of green salad or fruit salad; the main course station offers spaghetti or fish; the dessert station offers pie or cake; and the beverage station offers milk, soda, or coffee. Three students, Uta, Tim, and Yuen, go through the line and make the following choices: Uta: green salad, spaghetti, pie, milk Tim: fruit salad, fish, pie, cake, milk, coffee Yuen: spaghetti, fish, pie, soda These choices are illustrated in Figure Interpreting Multiply-Quantified Statements Write each of following statements informally and find its truth value. a. ∃ an item I such that ∀ students S, S chose I . b. ∃ a student S such that ∀ items I, S chose I . c. ∃ a student S such that ∀ stations Z, ∃ an item I in Z such that S chose I . d. ∀ students S and ∀ stations Z, ∃ an item I in Z such that S chose I . Solution There is an item that was chosen by every student. This is true; every student chose pie. b. There is a student who chose every available item. This is false; no student chose all nine items. c. There is a student who chose at least one item from every station. This is true; both Uta and Tim chose at least one item from every station. d. Every student chose at least one item from every station. This is false; Yuen did not choose a salad. Interpreting Multiply-Quantified Statements Multiple Quantified Statements .
đang nạp các trang xem trước