This document provides an overview of discrete structures for computer science. It discusses topics like:
- Logic and propositions - Expressing statements that are either true or false using logical operators like negation, conjunction, disjunction etc.
- Truth tables - Using tables to show the truth values of compound propositions formed by combining simpler propositions with logical operators.
- Logical equivalence - When two statement forms will always have the same truth value no matter the values of the variables.
- Essential topics covered in discrete structures like functions, relations, sets, graphs, trees, recursion, proof techniques and basics of counting.
Logic is important for mathematical reasoning, program design and electronic circuitry. Proposition
বিসিএস , ব্যাংক জব ও যে কোন সরকারি চাকরির এমসিকিউ ম্যাথ অংশের পরীক্ষার জন্য খুভ গুরুত্বপূর্ণ একটা বই ...
এখানে প্রায় ১৫০০+ এমসিকিউ প্রশ্ন দেওয়া আছে ...
এবং গনিতে প্রয়োজনীয় ব্যসিক ও শর্টকাট সূত্র দেওয়া আছে ...
كتاب الانياني: كتاب الادعية والصلوات والتسبيحات والتراتيل والاناشيد والترانيم وصلوات الأوقات والايام في دين الصابئة المندائيين
تم تحميل الكتاب من موقع موسوعة العيون المعرفية
www.MandaeanNetwork.com
The document consists of a single sentence repeated over 200 times. It states "Download from www.MandaeanNetwork.com" and provides a website for downloading materials but gives no other context or information.
كتاب كنزا ربا : الكنز العظيم كتاب ديانة الصابئة المندائيين المقدس القسم الأيمن
جميع الحقوق محفوظة لمكتبة الصابئة المندائيين موسوعة العيون المعرفية
www.MandaeanNetwork.com
বিসিএস , ব্যাংক জব ও যে কোন সরকারি চাকরির এমসিকিউ ম্যাথ অংশের পরীক্ষার জন্য খুভ গুরুত্বপূর্ণ একটা বই ...
এখানে প্রায় ১৫০০+ এমসিকিউ প্রশ্ন দেওয়া আছে ...
এবং গনিতে প্রয়োজনীয় ব্যসিক ও শর্টকাট সূত্র দেওয়া আছে ...
كتاب الانياني: كتاب الادعية والصلوات والتسبيحات والتراتيل والاناشيد والترانيم وصلوات الأوقات والايام في دين الصابئة المندائيين
تم تحميل الكتاب من موقع موسوعة العيون المعرفية
www.MandaeanNetwork.com
The document consists of a single sentence repeated over 200 times. It states "Download from www.MandaeanNetwork.com" and provides a website for downloading materials but gives no other context or information.
كتاب كنزا ربا : الكنز العظيم كتاب ديانة الصابئة المندائيين المقدس القسم الأيمن
جميع الحقوق محفوظة لمكتبة الصابئة المندائيين موسوعة العيون المعرفية
www.MandaeanNetwork.com
The document provides information on the Arabic alphabet, greetings and introductions, nationalities, professions, basic grammar structures, and useful websites for learning Arabic. It includes the Arabic alphabet with letters color coded, common Arabic phrases with English translations and transliterations, gender forms of professions, examples of attached pronouns, feminine formation, and websites for learning Arabic vocabulary, dialogues and the alphabet.
Non-linear optimization applications in finance including volatility estimation with ARCH and GARCH models, line search methods, Newton's method, steepest descent method, golden section search method, and conjugate gradient method.
This document presents an introduction to rules of inference. It defines an argument and valid argument. It then explains several common rules of inference like modus ponens, modus tollens, addition, and simplification. Modus ponens and modus tollens are based on tautologies that make the conclusions logically follow from the premises. It also discusses two common fallacies - affirming the conclusion and denying the hypothesis - which are not valid rules of inference because they are not based on tautologies. Examples are provided to illustrate each rule of inference and fallacy.
Book of John Baptist - Drasha id yahia - Mandaic
كتاب دراشا اد يهيا كتاب تعاليم ومواعظ النبي يحيى بن زكريا عليه السلام باللغة المندائية
تم تحميل هذا الكتاب من موقع مكتبة موسوعة العيون المعرفية
www.MandaeanNetwork.com
This document discusses quantification in logic. Quantification transforms a propositional function into a proposition by expressing the extent to which a predicate is true. There are two main types of quantification: universal quantification and existential quantification. Universal quantification expresses that a predicate is true for every element, while existential quantification expresses that a predicate is true for at least one element. The document provides examples and pros and cons of each type of quantification and notes that quantification operators like ∀ and ∃ take precedence over logical operators.
1. The document discusses mathematical logic and proofs. It introduces logic operators such as NOT, AND and OR and how they are used to construct truth tables and logical formulas.
2. Conditional statements like "if P then Q" are explained along with their contrapositive and negation. Logical equivalences between statements are important.
3. The concept of an argument is introduced, where valid arguments are those where the conclusion follows logically from the assumptions. Specific argument forms like modus ponens and modus tollens are discussed.
This slide is a revised version of my slide entitled "Introduction to Quantum Computer" shared about 5 months ago. It starts from a basic explanation between Bit and Qubit. It then follows with a brief history behind Quantum Computing and Engineering, current trends, and update with concerns to make the quantum tech practically useful.
This document provides an overview of quantum computing, including:
- The current state of quantum computing technology, which involves noisy intermediate-scale quantum computers with 10s to 100s of qubits and moderate error rates.
- The difference between quantum and classical information, noting that quantum information uses superposition and entanglement, exponentially increasing computational power.
- An example quantum algorithm, Bernstein-Vazirani, which can solve a problem in one query that classical computers require n queries to solve, demonstrating quantum computing's potential computational advantages.
আজকাল বেশ কিছু বাংলা শব্দে ভুল বানানের প্রচলন লক্ষ করা যায়। এই ভুলগুলো যারা করেন তারা দীর্ঘদিন ধরে এটাকে শুদ্ধ হিসেবে গণ্য করে আসছেন। কেউ কেউ ভুল বানানটি নিয়ে এতটাই আত্মবিশ্বাসী যে, কখনো কখনো তার বানানটির শুদ্ধতা নিয়ে চ্যালেঞ্জ ছুড়ে দেন। যেমন- কোনো আবেদনের শুরুতে সম্মান জানাতে 'যথাবিহিত' শব্দটিকে ভুল করে লেখা হয় 'যথাবিহীত'- যা মোটেও সঠিক নয়। কেউ কেউ 'ভুল' শব্দটিকে 'ভূল' লিখে ভুল করেন। আবার অনেকেই 'উল্লিখিত' শব্দটিকে 'উল্লেখিত' লিখে সঠিক লিখেছেন বলে মনে করেন। এমন আরো অনেক শব্দ রয়েছে যেগুলোর সঠিক বানানের ব্যাপারে অনেকেই উদাসীন।
The document describes sparse matrix reconstruction using a matrix completion algorithm. It begins with an overview of the matrix completion problem and formulation. It then describes the algorithm which uses soft-thresholding to impose a low-rank constraint and iteratively finds the matrix that agrees with the observed entries. The algorithm is proven to converge to the desired solution. Extensions to noisy data and generalized constraints are also discussed.
Asfer mulwasha - Mandaic
كتاب اسفار ملواشا - كتاب اسفار الأسماء - باللغة المندائية
تم تحميل هذا الكتاب من موقع مكتبة موسوعة العيون المعرفية
www.MandaeanNetwork.com
This document provides an overview of nanotechnology and nanocomputing. It discusses how nanotechnology involves manipulating matter at the nanoscale level between 1-100 nanometers. Nanocomputing uses quantum dots and cellular automata as promising nanoscale computing components. The document also outlines some ethical considerations and risks of nanotechnology, as well as research being done in nanotechnology at the University of Central Florida.
The document outlines an agenda for a Tensorflow basics workshop. It includes an opening speech on Tesla AI, an introduction to key concepts like neural networks and machine learning workflows. The bulk of the workshop involves coding sessions where participants will build a classification model in Tensorflow and get help from instructors. It concludes with information on continuing self-directed learning through online resources and a preview of an upcoming computer vision lesson.
Una ileostomía es una abertura quirúrgica en la pared abdominal que conecta el intestino delgado al exterior. Puede usarse temporalmente mientras sana el intestino o permanentemente si se extirpa todo el intestino grueso. Tras la cirugía, el estoma se cubre con una bolsa adhesiva que recolecta los desechos, y el paciente debe cuidar cuidadosamente la piel alrededor para prevenir irritaciones.
Tammam Azzam is a Syrian artist who creates digital artworks expressing his views on the Syrian conflict. He was interviewed by the Burnet News Club to discuss his artwork depicting experiences from the war in Syria and being a refugee. Through his art, Tammam tells the stories of his family and others affected by the crisis in order to show the human impact and bring emotional understanding to the issues. He believes that storytelling through art can communicate the real nature and emotional truth of events more powerfully than other forms of media.
The document provides information on the Arabic alphabet, greetings and introductions, nationalities, professions, basic grammar structures, and useful websites for learning Arabic. It includes the Arabic alphabet with letters color coded, common Arabic phrases with English translations and transliterations, gender forms of professions, examples of attached pronouns, feminine formation, and websites for learning Arabic vocabulary, dialogues and the alphabet.
Non-linear optimization applications in finance including volatility estimation with ARCH and GARCH models, line search methods, Newton's method, steepest descent method, golden section search method, and conjugate gradient method.
This document presents an introduction to rules of inference. It defines an argument and valid argument. It then explains several common rules of inference like modus ponens, modus tollens, addition, and simplification. Modus ponens and modus tollens are based on tautologies that make the conclusions logically follow from the premises. It also discusses two common fallacies - affirming the conclusion and denying the hypothesis - which are not valid rules of inference because they are not based on tautologies. Examples are provided to illustrate each rule of inference and fallacy.
Book of John Baptist - Drasha id yahia - Mandaic
كتاب دراشا اد يهيا كتاب تعاليم ومواعظ النبي يحيى بن زكريا عليه السلام باللغة المندائية
تم تحميل هذا الكتاب من موقع مكتبة موسوعة العيون المعرفية
www.MandaeanNetwork.com
This document discusses quantification in logic. Quantification transforms a propositional function into a proposition by expressing the extent to which a predicate is true. There are two main types of quantification: universal quantification and existential quantification. Universal quantification expresses that a predicate is true for every element, while existential quantification expresses that a predicate is true for at least one element. The document provides examples and pros and cons of each type of quantification and notes that quantification operators like ∀ and ∃ take precedence over logical operators.
1. The document discusses mathematical logic and proofs. It introduces logic operators such as NOT, AND and OR and how they are used to construct truth tables and logical formulas.
2. Conditional statements like "if P then Q" are explained along with their contrapositive and negation. Logical equivalences between statements are important.
3. The concept of an argument is introduced, where valid arguments are those where the conclusion follows logically from the assumptions. Specific argument forms like modus ponens and modus tollens are discussed.
This slide is a revised version of my slide entitled "Introduction to Quantum Computer" shared about 5 months ago. It starts from a basic explanation between Bit and Qubit. It then follows with a brief history behind Quantum Computing and Engineering, current trends, and update with concerns to make the quantum tech practically useful.
This document provides an overview of quantum computing, including:
- The current state of quantum computing technology, which involves noisy intermediate-scale quantum computers with 10s to 100s of qubits and moderate error rates.
- The difference between quantum and classical information, noting that quantum information uses superposition and entanglement, exponentially increasing computational power.
- An example quantum algorithm, Bernstein-Vazirani, which can solve a problem in one query that classical computers require n queries to solve, demonstrating quantum computing's potential computational advantages.
আজকাল বেশ কিছু বাংলা শব্দে ভুল বানানের প্রচলন লক্ষ করা যায়। এই ভুলগুলো যারা করেন তারা দীর্ঘদিন ধরে এটাকে শুদ্ধ হিসেবে গণ্য করে আসছেন। কেউ কেউ ভুল বানানটি নিয়ে এতটাই আত্মবিশ্বাসী যে, কখনো কখনো তার বানানটির শুদ্ধতা নিয়ে চ্যালেঞ্জ ছুড়ে দেন। যেমন- কোনো আবেদনের শুরুতে সম্মান জানাতে 'যথাবিহিত' শব্দটিকে ভুল করে লেখা হয় 'যথাবিহীত'- যা মোটেও সঠিক নয়। কেউ কেউ 'ভুল' শব্দটিকে 'ভূল' লিখে ভুল করেন। আবার অনেকেই 'উল্লিখিত' শব্দটিকে 'উল্লেখিত' লিখে সঠিক লিখেছেন বলে মনে করেন। এমন আরো অনেক শব্দ রয়েছে যেগুলোর সঠিক বানানের ব্যাপারে অনেকেই উদাসীন।
The document describes sparse matrix reconstruction using a matrix completion algorithm. It begins with an overview of the matrix completion problem and formulation. It then describes the algorithm which uses soft-thresholding to impose a low-rank constraint and iteratively finds the matrix that agrees with the observed entries. The algorithm is proven to converge to the desired solution. Extensions to noisy data and generalized constraints are also discussed.
Asfer mulwasha - Mandaic
كتاب اسفار ملواشا - كتاب اسفار الأسماء - باللغة المندائية
تم تحميل هذا الكتاب من موقع مكتبة موسوعة العيون المعرفية
www.MandaeanNetwork.com
This document provides an overview of nanotechnology and nanocomputing. It discusses how nanotechnology involves manipulating matter at the nanoscale level between 1-100 nanometers. Nanocomputing uses quantum dots and cellular automata as promising nanoscale computing components. The document also outlines some ethical considerations and risks of nanotechnology, as well as research being done in nanotechnology at the University of Central Florida.
The document outlines an agenda for a Tensorflow basics workshop. It includes an opening speech on Tesla AI, an introduction to key concepts like neural networks and machine learning workflows. The bulk of the workshop involves coding sessions where participants will build a classification model in Tensorflow and get help from instructors. It concludes with information on continuing self-directed learning through online resources and a preview of an upcoming computer vision lesson.
Una ileostomía es una abertura quirúrgica en la pared abdominal que conecta el intestino delgado al exterior. Puede usarse temporalmente mientras sana el intestino o permanentemente si se extirpa todo el intestino grueso. Tras la cirugía, el estoma se cubre con una bolsa adhesiva que recolecta los desechos, y el paciente debe cuidar cuidadosamente la piel alrededor para prevenir irritaciones.
Tammam Azzam is a Syrian artist who creates digital artworks expressing his views on the Syrian conflict. He was interviewed by the Burnet News Club to discuss his artwork depicting experiences from the war in Syria and being a refugee. Through his art, Tammam tells the stories of his family and others affected by the crisis in order to show the human impact and bring emotional understanding to the issues. He believes that storytelling through art can communicate the real nature and emotional truth of events more powerfully than other forms of media.
This document summarizes the August 30, 2013 issue of the Business Council of Mongolia NewsWire. It provides highlights on business, economic, and political news in Mongolia. Some of the top business stories include Mongolia granting pre-mining agreements to SouthGobi, a Chinese company eyeing Turquoise Hill's Inova Resources, and Wolf Petroleum raising funds for oil and gas exploration. On the economic front, the Premier attempts to cool fears about the economy while the agriculture sector receives funding. Politically, Mongolia plans to scrap its controversial foreign investment law and a delegation is set to discuss the Oyu Tolgoi mine in London. The newsletter also recaps the latest BCM monthly meeting and new members.
If n and m are odd integers, then n + m is an even integer.
1. Suppose n and m are odd integers but n + m is odd.
2. Since n and m are odd, we can write n = 2p + 1 and m = 2q + 1, where p and q are integers.
3. Then n + m = (2p + 1) + (2q + 1) = 2p + 2q + 2 = 2(p + q + 1), which is even.
4. This contradicts the assumption that n + m is odd.
5. Therefore, if
11 app ideas that will help you learn current technologies. All ideas should practically take less than 2 months if development happens regularly. Feel free to contact me in case you are stuck in making any of these ideas.
The document discusses the benefits of peer editing for improving writing. It notes that writers often know their topics too well to judge whether their writing is clear to new readers. Peer editing allows writers to get feedback from others on whether their writing is appropriate, organized, and easy to understand. The document also states that peer editing helps prepare writers for having their work reviewed in professional settings. It provides tips for both peer editors and writers, emphasizing the importance of honest but constructive feedback to strengthen writing.
The newyork times paywall case solution - Shubham Parsekar - PGDMShubham Parsekar
The document discusses the paywall system adopted by The New York Times, which allows up to 20 free articles per month before requiring a subscription fee. As print revenue declined due to the shift to digital, online advertising was not sufficient to replace the lost income. The Times had to decide between a "leaky paywall" that allows some free access or a "bulletproof paywall" with no free access. It was determined that a leaky paywall would be better initially to attract more subscribers and generate website traffic through social media. Both print and online newspapers are needed, as online versions are more convenient for today's mobile lifestyles.
The document discusses propositional logic, including:
- The basic components of propositional logic like propositions, connectives, truth tables, and logical equivalences
- Applications such as translating English sentences to propositional logic, system specifications, logic puzzles
- Representing logical relationships using truth tables and showing logical equivalences
- Using propositional logic to represent an electrical system and diagnose faults
The document discusses truth tables and logical connectives such as conjunction, disjunction, negation, implication and biconditionals. It provides examples of truth tables for compound propositions involving multiple variables. De Morgan's laws are explained, which state that the negation of a conjunction is the disjunction of the negations, and the negation of a disjunction is the conjunction of the negations. The concepts of tautologies, contradictions and logical equivalence are also covered.
The document provides an overview of knowledge representation and logic. It discusses knowledge-based agents and how they use a knowledge base to represent facts about the world through sentences expressed in a knowledge representation language. It then covers different knowledge representation schemas including propositional logic, first-order logic, rules, networks, and structures. The document also discusses inference, different types of logic, and knowledge representation languages.
This document covers a lecture on compound propositions and logical operators in discrete structures. It defines logical operators such as negation, conjunction, disjunction, exclusive or, implication, and biconditional. It provides truth tables for each operator and examples of how to write compound propositions using the operators. De Morgan's laws and their applications are discussed. The concepts of tautology, contradiction, logical equivalence and various laws of logic are also introduced.
This section discusses applications of propositional logic, including translating English sentences to propositional logic, system specifications, and logic puzzles. It provides an example of translating the English sentence "You can access the Internet from campus only if you are a computer science major or you are not a freshman" to the propositional logic statement a→(c ∨ ¬f). It also gives an example of expressing the system specification "The automated reply cannot be sent when the file system is full" in propositional logic as p → ¬q.
This document provides an overview of propositional logic including:
- The basic components of propositional logic like propositions, connectives, truth tables
- Applications such as translating English sentences to logic, system specifications, puzzles
- Logical equivalences and showing equivalence through truth tables
- Sections cover propositions, connectives, truth tables, and applications including translation, specifications, puzzles
The document provides an overview of topics in discrete mathematics including logic, sets, and functions. It outlines the following content: introduction to logic and logical operators; propositions and logical equivalences; predicates and quantifiers; sets and set operations; and functions. For each topic, it provides definitions, examples, and truth tables to illustrate key concepts in propositional and predicate logic, and sets. It also includes examples, explanations and review questions to help explain the material.
This document summarizes Chapter 1, Part I of a textbook on propositional logic. It introduces key concepts in propositional logic, including propositions, logical connectives like negation, conjunction, disjunction, implication, biconditional, and truth tables. It provides examples of applying propositional logic to represent English sentences, system specifications, logic puzzles and logic circuits. It also briefly describes representing knowledge about an electrical system in propositional logic for fault diagnosis in artificial intelligence.
- Logic is the study of principles of reasoning and determining valid inferences. Propositional logic deals with propositions that can be either true or false.
- A propositional calculus defines rules for combining propositions using logical operators like conjunction, disjunction, negation, implication, and biconditional.
- Truth tables define the meanings of logical operators by listing their truth values under all combinations of true and false propositions.
- Natural deduction is a system to derive logical consequences through inference rules like introduction and elimination rules for logical operators. It mimics natural patterns of reasoning.
1) Logic is the study of reasoning and is the foundation of computer science and mathematics.
2) A proposition is a statement that is either true or false, such as "Islamabad is the capital of Pakistan." Logical operators combine propositions using connectives like AND, OR, and NOT.
3) Truth tables define the truth values of compound propositions based on the truth values of the component propositions.
L03 ai - knowledge representation using logicManjula V
The document discusses knowledge representation using predicate logic. It begins by reviewing propositional logic and its semantics using truth tables. It then introduces predicate logic, which can represent properties and relations using predicates with arguments. It discusses representing knowledge in predicate logic using quantifiers, predicates, and variables. It also covers inferencing in predicate logic using techniques like forward chaining, backward chaining, and resolution. An example problem is presented to illustrate representing a problem and solving it using resolution refutation in predicate logic.
Laws of Logic in Discrete Structures and their applicationsZenLooper
The document discusses laws of logic and logical equivalences. It provides examples of applying logical laws such as DeMorgan's law, double negative law, and distributive law to simplify logical statements. Conditional statements are introduced and their truth tables are shown. Different logical equivalences involving implications are proven using truth tables. The inverse, converse, and contrapositive of conditional statements are defined and examples are given.
The document discusses valid and invalid arguments in propositional logic. It defines arguments and their forms, and validity. It explains how to test an argument form for validity using a truth table. It then discusses several rules of inference for propositional logic including modus ponens, modus tollens, generalization, simplification, disjunctive syllogism, hypothetical syllogism, and provides examples of applying these rules. Finally, it discusses arguments with quantified statements and the rules of universal instantiation, universal modus ponens, and universal modus tollens.
This document summarizes a lecture on discrete structures. It discusses logical equivalences, De Morgan's laws, tautologies and contradictions. It also covers laws of logic like distribution, identity and negation. Conditional propositions are defined as relating two propositions with "if-then". Truth tables are used to check logical equivalence and interpret conditionals. The contrapositive and biconditional are also introduced.
UGC NET Computer Science & Application book.pdf [Sample]DIwakar Rajput
This document provides an overview of propositional logic and logical connectives. It defines key terms like proposition, logical connectives, truth tables, and normal forms. It describes the five basic logical connectives - negation, conjunction, disjunction, conditional, and bi-conditional. It provides truth tables and examples to explain each connective. It also discusses logical equivalences, precedence of operators, logic and bit operations, tautologies/contradictions, and normal forms. The document is a lesson on propositional logic from Diwakar Education Hub that covers basic concepts and terminology.
1) The document discusses foundational concepts in propositional logic, including logical form, statements, connectives, and truth tables.
2) It introduces common logical operators such as negation, conjunction, disjunction, implication, equivalence, and explains how to translate sentences between English and symbolic logic.
3) Conditional statements and their contrapositives, converses and inverses are defined. It is shown that a conditional statement is logically equivalent to its contrapositive using truth tables.
The document discusses valid and invalid arguments. It defines an argument as a sequence of statements ending in a conclusion. The validity of an argument depends on its logical form, not its content. Various argument forms like modus ponens and modus tollens are introduced as valid rules of inference. Truth tables are presented as a way to test if an argument form is valid. The document also discusses translating arguments into symbolic logic and the valid rules of inference for quantified statements.
The document discusses propositional logic including:
- Propositional logic uses propositions that can be either true or false and logical connectives to connect propositions.
- It introduces syntax of propositional logic including atomic and compound propositions.
- Logical connectives like negation, conjunction, disjunction, implication, and biconditional are explained along with their truth tables and significance.
- Other concepts discussed include precedence of connectives, logical equivalence, properties of operators, and limitations of propositional logic.
- Examples are provided to illustrate propositional logic concepts like truth tables, logical equivalence, and translating English statements to symbolic form.
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDr. Khaled Bakro
Discrete Mathematics chapter 2 covers propositional logic. A proposition is a statement that is either true or false. Propositional logic uses propositional variables and logical operators like negation, conjunction, disjunction, implication and biconditional. Truth tables are used to determine the truth value of compound propositions formed using these operators. Logical equivalences between compound propositions can be shown using truth tables or by applying equivalence rules.
The document defines accounting and discusses its key concepts and principles. It then discusses the components and types of accounting information systems. Finally, it explains the accounting cycle and key financial statements like the balance sheet through examples. The document provides a comprehensive overview of introductory financial accounting concepts.
A set is an unordered collection of objects that can be defined by listing elements or describing properties that elements satisfy. Sets are used to build discrete structures like counting, combinations, relations, and graphs. A function from a set X to a set Y is a relation where each element of X is mapped to an element of Y, and no element of X is mapped to more than one element of Y. A function is one-to-one if different elements of the domain map to different elements of the codomain, and onto if every element of the codomain is mapped to by some element of the domain.
Sequences represent ordered lists of elements and can be defined as a function from a subset of natural numbers to a set. There are two main types of sequences: arithmetic sequences, where each term is obtained by adding a common difference to the previous term, and geometric sequences, where each term is obtained by multiplying the previous term by a common ratio. Mathematical induction can be used to prove properties are true for all terms in a sequence by showing the base case holds and the inductive step follows from the assumption.
Recursion is a process where an object is defined in terms of smaller versions of itself. It involves a base case, which is the simplest definition that cannot be further reduced, and a recursive case that defines the object for larger inputs in terms of smaller ones until the base case is reached. Examples where recursion is commonly used include defining mathematical functions, number sequences, data structures, and language grammars. While recursion can elegantly solve problems, iterative algorithms are generally more efficient.
The document discusses queues and their implementation and operations. It provides the names and roll numbers of group members working on a presentation about queues. It then defines a queue as a first-in first-out (FIFO) data structure where items can be inserted at one end and removed from the other. Various examples of queue applications are given. Implementation of queues using arrays is described, including tracking the front and rear indexes and how elements are added and removed. Pseudocode for queue insertion and removal algorithms is also provided.
1. The document discusses universal quantification and quantifiers. Universal quantification refers to statements that are true for all variables, while quantifiers are words like "some" or "all" that refer to quantities.
2. It explains that a universally quantified statement is of the form "For all x, P(x) is true" and is defined to be true if P(x) is true for every x, and false if P(x) is false for at least one x.
3. When the universe of discourse can be listed as x1, x2, etc., a universal statement is the same as the conjunction P(x1) and P(x2) and etc., because this
This document discusses different types of proofs in mathematics including direct proofs, existence proofs, and disproving statements with counterexamples. It provides examples of direct proofs showing that the sum of two even integers is even and that the square of an odd integer is odd. It also gives an example of an existence proof showing there is an even number that can be written as the sum of two prime numbers. Finally, it discusses how to disprove universal statements by finding a counterexample.
The document discusses proofs by contraposition. It explains that a statement of the form "if p then q" can be proven by showing its contrapositive "if not q then not p" is true. It provides examples of proofs using this method, including proving if n^2 is even then n is even, if m + n is even then m and n have the same parity, and if 3n + 2 is odd then n is odd. Homework exercises are provided applying this proof technique.
This document outlines several laws of propositional logic, including:
- Domination laws which define the relationships between a proposition and true or false.
- Idempotent laws which state a proposition is equal to itself repeated.
- Commutative laws which allow rearranging order of propositions joined by ∧ or ∨.
- Double negation law which states a double negation equals the original proposition.
- Associative laws which allow grouping propositions joined by ∧ or ∨.
- Distributive laws which define the relationship between ∧ and ∨ when applied to propositions.
- De Morgan's laws which define relationships between negated conjunctions and disjunctions.
- Negation
The document discusses converse, inverse, and contrapositive statements of conditional (if-then) statements. It provides examples of converting statements to their converse, inverse, and contrapositive forms. It also discusses determining the truth value of predicates by substituting values for predicate variables.
Constructing circuits for boolean expressions(gate)Abdur Rehman
This document discusses the application of propositional logic to digital circuits. It describes how digital circuits use basic logic gates like NOT, AND and OR gates to process input signals and produce output signals. Complicated digital circuits can be constructed by combining these basic gates. The document also provides rules for building combinational circuits and techniques for simplifying circuits, such as constructing truth tables and using Boolean algebraic identities.
This document discusses different number systems including decimal, binary, hexadecimal, and how to convert between them. It covers:
- Decimal numbers express a number as digits multiplied by powers of 10
- Binary uses only two digits (0,1) and powers of 2
- Converting a binary number to decimal involves summing place value terms
- Negative integers in computing are represented using two's complement notation by flipping bits and adding 1
- Hexadecimal uses 16 digits (0-9 and A-F) and powers of 16
- Converting between number systems involves grouping bits or digits and converting place values
This document discusses the topic of discrete structures which are composed of distinct, separable parts arranged in a definite pattern. Discrete structures are important as they provide the mathematical foundation for computer science topics like data structures and algorithms. They also help develop abstract thinking skills. Some essential topics covered in discrete structures include functions, relations, sets, logic, proof techniques, counting, graphs and trees, and recursion. Logic is crucial for mathematical reasoning and important for applications like program design and circuitry. Truth tables are used to show how logical operators like negation, conjunction, disjunction, exclusive or, implication, and biconditional can combine propositions.
Aristotle was born in northern Greece and orphaned at a young age. He studied under Plato at Plato's Academy for 20 years before establishing his own school called the Lyceum in Athens. Aristotle wrote on many topics including logic, philosophy, psychology, physics, and natural history. When Alexander the Great died, Aristotle fled Athens to avoid prosecution and died a year later.
Leveraging Generative AI to Drive Nonprofit InnovationTechSoup
In this webinar, participants learned how to utilize Generative AI to streamline operations and elevate member engagement. Amazon Web Service experts provided a customer specific use cases and dived into low/no-code tools that are quick and easy to deploy through Amazon Web Service (AWS.)
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...TechSoup
Whether you're new to SEO or looking to refine your existing strategies, this webinar will provide you with actionable insights and practical tips to elevate your nonprofit's online presence.
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...EduSkills OECD
Andreas Schleicher, Director of Education and Skills at the OECD presents at the launch of PISA 2022 Volume III - Creative Minds, Creative Schools on 18 June 2024.
How to Download & Install Module From the Odoo App Store in Odoo 17Celine George
Custom modules offer the flexibility to extend Odoo's capabilities, address unique requirements, and optimize workflows to align seamlessly with your organization's processes. By leveraging custom modules, businesses can unlock greater efficiency, productivity, and innovation, empowering them to stay competitive in today's dynamic market landscape. In this tutorial, we'll guide you step by step on how to easily download and install modules from the Odoo App Store.
2. 1Discret Structure for BSCS…… Prepared by Abdur-Rehman
Why is it
o “Discrete” (≠ “discreet”!) - Composed of distinct, separable parts.
o “Structures” - objects built up from simpler objects according to a definite pattern.
Why it is important
o Provides mathematical foundation for computer science courses such as
o data structures, algorithms, relational database theory, automata theory and
o formal languages, compiler design, and cryptography,
o Mathematics courses such as linear and abstract algebra, probability, logic and set
theory, and number theory.
What it does
o Describes processes that consist of a sequence of individual steps.
o Helps students to develop the ability to think abstractly.
ESSENTIAL TOPICS TO BE COVERED:
o Functions, relations and sets
o Basic logic
o Proof techniques
o Basics of counting
o Graphs and trees
o Recursion
Logic
o Crucial for mathematical reasoning
o Important for program design
o Used for designing electronic circuitry
o (Propositional )Logic is a system based on propositions.
o A proposition is a (declarative) statement that is either true or false (not both).
o We say that the truth value of a proposition is either true (T) or false (F).
3. 2Discret Structure for BSCS…… Prepared by Abdur-Rehman
o Corresponds to 1 and 0 in digital circuits
The Statement/Proposition Game
“Elephants are bigger than mice.”
Is this a statement? Yes
Is this a proposition? yes
What is the truth value
of the proposition? true
The Statement/Proposition Game
“520 < 111”
Is this a statement? yes
Is this a proposition? yes
What is the truth value
of the proposition? False
The Statement/Proposition Game
“y > 5”
Is this a statement? yes
Is this a proposition? no
Its truth value depends on the value of y, but this value is not specified.
We call this type of statement a propositional function or open sentence.
The Statement/Proposition Game
“Today is January 27 and 99 < 5.”
Is this a statement? yes
Is this a proposition? yes
What is the truth value
of the proposition? False
The Statement/Proposition Game
“Please do not fall asleep.”
4. 3Discret Structure for BSCS…… Prepared by Abdur-Rehman
Is this a statement? no
It’s a request.
Is this a proposition? no
Only statements can be propositions.
The Statement/Proposition Game
“If the moon is made of cheese,
then I will be rich.”
Is this a statement? yes
Is this a proposition? yes
What is the truth value
of the proposition? probably true
The Statement/Proposition Game
“x < y if and only if y > x.”
Is this a statement? yes
Is this a proposition? yes
… because its truth value does not depend on specific values of x and y.
What is the truth value
of the proposition? true
Combining Propositions
As we have seen in the previous examples, one or more propositions can be combined
to form a single compound proposition.
We formalize this by denoting propositions with letters such as p, q, r, s, and introducing
several logical operators or logical connectives.
Logical Operators (Connectives)
We will examine the following logical operators:
• Negation (NOT, )
• Conjunction (AND, )
5. 4Discret Structure for BSCS…… Prepared by Abdur-Rehman
• Disjunction (OR, )
• Exclusive-or (XOR, )
• Implication (if – then, )
• Biconditional (if and only if, )
Truth tables can be used to show how these operators can combine propositions to
compound propositions.
Negation (NOT)
Unary Operator, Symbol:
P P
true (T) false (F)
false (F) true (T)
Conjunction (AND)
Binary Operator, Symbol:
P Q P Q
T T T
T F F
F T F
F F F
Disjunction (OR)
Binary Operator, Symbol:
6. 5Discret Structure for BSCS…… Prepared by Abdur-Rehman
P Q P Q
T T T
T F T
F T T
F F F
Connectives
Let p=“It rained last night”,
q=“The sprinklers came on last night,”
r=“The lawn was wet this morning.”
Translate each of the following into English:
≦p = “It didn’t rain last night.”
r ∧ ¬p =“The lawn was wet this morning,
and it didn’t rain last night.”
¬ r ∨ p ∨ q =“Either the lawn wasn’t wet this morning, or it rained last night, or the sprinklers
came on last night.”
Connectives:
Let p= “It is hot”
q=““It is sunny”
1. It is not hot but it is sunny.
2. It is neither hot nor sunny.
Solution
1. ⌐p∧q
2. ⌐p∧ ⌐q
Exclusive Or (XOR)
7. 6Discret Structure for BSCS…… Prepared by Abdur-Rehman
Binary Operator, Symbol:
p = “I will earn an A in this course,”
q = “I will drop this course,”
p ⊕ q = “I will either earn an A in this course, or I will drop it (but not both!)”
True when exactly one of p and q is true and is false otherwise.0
P Q PQ
T T F
T F T
F T T
F F F
8. 7Discret Structure for BSCS…… Prepared by Abdur-Rehman
Truth Table
o The truth value of the compound proposition depends only on the truth value of the component
propositions. Such a list is a called a truth table.
Example
o (pq) ¬(pq)
p q pq pq ¬(pq) (pq) ¬(pq)
T T T T F F
T F T F T T
F T T F T T
F F F F T F
Example
o (p q) ¬r
P q r pq ¬r (pq)¬r
T T T
T T F
T F T
T F F
F T T
F T F
F F T
9. 8Discret Structure for BSCS…… Prepared by Abdur-Rehman
Implication (if - then)
o The conditional statement p → q is the proposition “if p, then q.”
o The conditional statement p → q is false when p is true and q is false, and true otherwise.
o p is called the hypothesis and q is called the conclusion.
Implication (if - then)
p = “You study hard.”
q = “You will get a good grade.”
p → q = “If you study hard, then you will get a good grade.”
P Q PQ
T T T
T F F
F T T
F F T
Biconditionals (if and Only If)
p = “Sharif wins the 2012 election.”
q = “Sharif will be prime minister for five years.”
p ↔ q = “If, and only if, Sharif wins the 2012 election, Sharif will be prime minister for five years.”
p ↔ q does not imply that p
and q are true, or that
either of them causes the other, or that they have a
common cause.
10. 9Discret Structure for BSCS…… Prepared by Abdur-Rehman
Precedence of Logical Connectives
o ~ highest
o Ʌ second highest
o V third highest
o → fourth highest
o ↔ fifth highest
Logical Equivalence
1. 6 is greater than 2
2. 2 is less than 6
two different ways of saying the same thing.
both be true or both be false.
logical form of the statements is important.
3. p ∧ q is true when, and only when, q ∧ p is true.
4. The statement forms are called logically equivalent
Logical Equivalence
11. 10Discret Structure for BSCS…… Prepared by Abdur-Rehman
o Two statement forms are called logically equivalent if, and only if, they have identical truth values for
each possible substitution of statements for their statement variables.
o P ≡ Q.
o Negation of the negation of a statement is logically equivalent to the statement.
o ∼(∼p) ≡ p
o ∼(p ∧ q) and ∼p ∧ ∼q are not logically equivalent
o p =“0 < 1” and let q =“1 < 0.”
Logical Equivalence
12. 11Discret Structure for BSCS…… Prepared by Abdur-Rehman
De Morgan’s Laws
o The negation of the conjunction of two statements is logically equivalent to the disjunction of their
negations.
o ∼(p ∧ q) and ∼p ∨ ∼q are logically equivalent i.e. ∼(p ∧ q) ≡ ∼p ∨ ∼q.
De Morgan’s Laws
o Negation of the disjunction of two statements is logically equivalent to the conjunction of their negations:
o Write negations for each of the following statements:
o John is 6 feet tall and he weighs at least 200 pounds.
o The bus was late or Tom’s watch was slow.
o Negation of these statements
o John is not 6 feet tall or he weighs less than 200 pounds.
o The bus was not late and Tom’s watch was not slow(/“Neither was the bus late nor was
Tom’s watch slow.”)
o Negation of a disjunction is formed by taking the conjunction of the negations of the component
propositions.
o Negation of a conjunction is formed by taking the disjunction of the negations of the component
propositions.
qpqp
qpqp
)(
)(
13. 12Discret Structure for BSCS…… Prepared by Abdur-Rehman
o Frequently used in writing computer programs.
o For instance, suppose you want your program to delete all files modified outside a certain range
of dates, say from date 1 through date 2 inclusive.
o ∼(date1 ≤ file_modification_date ≤ date2)
o is equivalent to
o ( file_modification_date < date1) or (date2 < file_modification_date).
14. 13Discret Structure for BSCS…… Prepared by Abdur-Rehman
Tautologies and Contradictions
A tautology is a statement that is always true.
Examples:
R(R)
(PQ) (P)( Q)
A contradiction is a statement that is always false.
Examples:
R(R)
((P Q) (P) (Q))
The negation of any tautology is a contradiction, and the negation of any contradiction is a tautology.
Equivalence
Definition: two propositional statements S1 and S2 are said to be (logically) equivalent, denoted S1 S2 if
They have the same truth table, or
S1 S2 is a tautology
Equivalence can be established by
Constructing truth tables
Using equivalence laws (Table 5 in Section 1.2)
Equivalence laws
Identity laws, P T P,
Domination laws, P F F,
Idempotent laws, P P P,
Double negation law, ( P) P
Commutative laws, P Q Q P,
Associative laws, P (Q R) (P Q) R,
Distributive laws, P (Q R) (P Q) (P R),
De Morgan’s laws, (PQ) ( P) ( Q)
Law with implication P Q P Q
15. 14Discret Structure for BSCS…… Prepared by Abdur-Rehman
Associative Laws
(p ∨ q) ∨ r ≡ p ∨ (q ∨ r)
(p ∧ q) ∧ r ≡ p ∧ (q ∧ r)
Simplifying Statement Forms
o ∼(∼p ∧ q) ∧ (p ∨ q) ≡ p
P q r pq (p ∧ q) ∧ r q ∧ r p ∧ (q ∧ r)
T T T T T T T
T T F T F F F
T F T F F F F
T F F F F F F
F T T F F T F
F T F F F F F
F F T F F F F
16. 15Discret Structure for BSCS…… Prepared by Abdur-Rehman
CONVERSE, CONTRAPOSITIVE, INVERSE
o The proposition q → p is called the converse of p → q.
o A conditional statement and its converse are NOT logically equivalent.
o The proposition ¬p →¬q is called the inverse of p → q.
o A conditional statement and its inverse are NOT logically equivalent.
o If a conditional statement is true, then its converse and inverse must also be true. This is not correct!
o If Howard can swim across the lake, then Howard can swim to the island.
o Converse:
o If Howard can swim to the island, then Howard can swim across the lake.
o Inverse:
o If Howard cannot swim across the lake, then Howard cannot swim to the island.
o If today is Easter, then tomorrow is Monday.
o Converse: If tomorrow is Monday, then today is Easter.
o Inverse: If today is not Easter, then tomorrow is not Monday.
o The contrapositive of p → q is the proposition ¬q →¬p.
o A conditional statement is logically equivalent to its contrapositive!
17. 16Discret Structure for BSCS…… Prepared by Abdur-Rehman
o If Howard can swim across the lake, then Howard can swim to the island.
o If today is Easter, then tomorrow is Monday.
o If Howard cannot swim to the island, then Howard cannot swim across the lake.
o If tomorrow is not Monday, then today is not Easter.
o The contrapositive of p → q is the proposition ¬q →¬p.
o A conditional statement is logically equivalent to its contrapositive!
o If Howard can swim across the lake, then Howard can swim to the island.
o If today is Easter, then tomorrow is Monday.
o If Howard cannot swim to the island, then Howard cannot swim across the lake.
o If tomorrow is not Monday, then today is not Easter.
Negations of If-Then Statements
If my car is in the repair shop, then I cannot get to class.
If Sara lives in Athens, then she lives in Greece.
o Negation
My car is in the repair shop and I can get to class.
Sara lives in Athens and she does not live in Greece.
o The negation of an if-then statement does not start with the word if.
18. 17Discret Structure for BSCS…… Prepared by Abdur-Rehman
Simplifying Statement
“you are hardworking and the sun shines, or you are hardworking and it rains.”
p=“ you are hardworking “.
q=“the sun shines”
r= “it rains”
(p q) (p r) p (q r) using distributive law
“you are hardworking and the sun shines or it rains”
Translating English Sentences
“If the moon is out and it is not snowing, then Sam goes out for a walk.”
p=“Phyllis goes out for a walk”.
q=“The moon is out”
r= “It is snowing”
If the moon is out and it is not snowing, then Sam goes out for a walk.
“If it is snowing and the moon is not out, then Sam will not go out for a walk.”
“You can access the Internet from campus only if you are a computer science major or you are not a freshman.”
a=“You can access the Internet from campus“.
c=“You are a computer science major”
pqr )(
prq )(
19. 18Discret Structure for BSCS…… Prepared by Abdur-Rehman
f= “You are a freshman”
a → (c ∨¬f ).
o Let p, q, and r be the propositions:
p = “you have the flu”
q = “you miss the final exam”
r = “you pass the course”
o Express the following propositions as an English sentence.
o p → q
If you have flu, then you will miss the final exam.
o ~q → r
If you don’t miss the final exam, you will pass the course.
o ~p → ~q → r
If you neither have flu nor miss the final exam, then you will pass the course.
BICONDITIONALS
o If it is hot outside you buy an ice cream cone, and if you buy an ice cream cone it is hot outside.
You buy an ice cream cone if and only if it is hot outside.
o For you to win the contest it is necessary and sufficient that you have the only winning ticket.
You win the contest if and only if you hold the only winning ticket.
o If you read the news paper every day, you will be informed and conversely.
You will be informed if and only if you read the news paper every day.
o It rains if it is a weekend day, and it is a weekend day if it rains.
It rains if and only if it is a weekend day.
o The train runs late on exactly those days when I take it.
The train runs late if and only if it is a day I take the train.
o This number is divisible by 6 precisely when it is divisible by both 2 and 3.
This number is divisible by 6 if and only if it is divisible by both 2 and 3.
Predicate
o p=“is a student at Bedford College”
o q =“is a student at.”
• p & q are predicate symbols
20. 19Discret Structure for BSCS…… Prepared by Abdur-Rehman
• p(x)=“x is a student at Bedford College.
• q(x,y) =“x is a student at y.”
x and y are predicate variables that take values in appropriate sets.
• When concrete values are substituted in place of predicate variables, a statement results.
o A predicate is a predicate symbol together with suitable predicate variables.
o A predicate is a sentence that contains a finite number of variables and becomes a statement when
specific values are substituted for the variables.
o The domain of a predicate variable is the set of all values that may be substituted in place of the variable.
o Also referred as propositional functions or open sentences
Predicate(Example)
o Person(x), which is true if x is a person
o Person(Socrates) = T
o Person(dolly-the-sheep) = F
o Let U = Z, the integers = {. . . -2, -1, 0 , 1, 2, 3, . . .}
• P(x): x > 0 is the predicate. It has no truth value until the variable x is bound.
o Examples of propositions where x is assigned a value:
• P(-3) is false,
• P(0) is false,
• P(3) is true.
Truth Values of a Predicate
o P(x)=“x2 > x”
o Domain = set R of all real numbers
o Find truth values of P(2), P( 1/2 ), and P(−1/2 )
• P(2): 2
2
> 2, or 4 > 2. True
• P(1/2):(1/2)
2
<1/2 or (1/4) <1/2 False
• P(-1/2):(-1/2)
2
>-1/2 or (1/4) >-1/2 True
o If P(x) is a predicate and x has domain D, the truth set of P(x) is the set of all elements of D that make P(x)
true when they are substituted for x. The truth set of P(x) is denoted
{x ∈ D | P(x)}
“the set of all x in D such that P(x).”
o Let R be the three-variable predicate R(x, y z): x + y= z
21. 20Discret Structure for BSCS…… Prepared by Abdur-Rehman
o Find the truth value of
R(2, -1, 5), R(3, 4, 7), R(x, 3, z)
Universal Quantification
o To change predicates into statements is to assign specific values to all their variables.
if x represents the number 35, the sentence “x is divisible by 5” is a true statement since 35 = 5·
7.
o Another way is to add quantifiers.
Quantifiers are words that refer to quantities such as "some" or "all" and tell for how many
elements a given predicate is true.
o Let P(x) be a predicate (propositional function).
o Universally quantified sentence:
For all x in the universe of discourse P(x) is true.
o Using the universal quantifier :
" x ϵ D,Q(x).“ universal statement
It is defined to be true if, and only if, Q(x) is true for every x in D.
It is defined to be false if, and only if, Q(x) is false for at least one x in D.
A value for x for which Q(x) is false is called a counterexample to the universal statement.
o When all the elements in the universe of discourse can be listed —say x1, x2, ..., xn — it follows that the
universal quantification
o ∀x P(x) is the same as the conjunction
P(x1) ∧ P(x2) ∧ · · · ∧ P(xn)
o because this conjunction is true if and only if P(x1), P(x2), ...,P(xn) are all true.
o Example: Let the universe of discourse be U = {1,2,3}. Then
o ∀x P(x) ≡ P(1)∧ P(2)∧ P(3).
Truth and Falsity of Universal Statements
Sentence:
o All UAJ&K students are smart.
o Assume: the domain of discourse of x are UAJ&K students
o Translation:
o ∀ x Smart(x)
o Assume: the universe of discourse are students (all students):
22. 21Discret Structure for BSCS…… Prepared by Abdur-Rehman
o ∀ x at(x, UAJ&K) Smart(x)
o Assume: the universe of discourse are people:
o ∀ x student(x) Λ at(x, UAJ&K) Smart(x)
o Let D = {1, 2, 3, 4, 5}, and consider the statement
∀x ∈ D, x
2
≥ x.
Show that this statement is true.
Check that “x
2
≥ x” is true for each individual x in D.
1
2
≥ 1, 2
2
≥ 2, 3
2
≥ 3, 4
2
≥ 4, 5
2
≥ 5.
Hence “∀x ∈ D, x
2
≥ x” is true.
The Existential Quantifier: ∃
o The symbol ∃ denotes “there exists” and is called the existential quantifier.
o “There is a student in Math 140” can be written as
∃ a person p such that p is a student in Math 140,
or, more formally,
∃p ∈ P such that p is a student in Math 140,
where P is the set of all people.
o At least one member of the group satisfy the property
o Let Q(x) be a predicate and D the domain of x. An existential statement is a statement of the form “∃x ∈ D
such that Q(x).” It is defined to be true if, and only if, Q(x) is true for at least one x in D. It is false if, and
only if, Q(x) is false for all
o x in D:
o Let T(x) denote x > 5 and x is from Real numbers.
o What is the truth value of ∃ x T(x)?
o Answer:
o Since 10 > 5 is true. Therefore, it is true that ∃ x T(x).
o Consider the statement
∃m ∈ Z+ such that m
2
= m.
Show that this statement is true.
Observe that 1
2
= 1. Thus “m
2
= m” is true for at least one integer m. Hence “∃m ∈ Z
such that m
2
= m” is true.
o Assume two predicates S(x) and P(x)
23. 22Discret Structure for BSCS…… Prepared by Abdur-Rehman
o Universal statements typically tie with implications
o All S(x) is P(x)
o ∀x ( S(x) P(x) )
o No S(x) is P(x)
o ∀x( S(x) ¬P(x) )
o Existential statements typically tie with conjunctions
o Some S(x) is P(x)
o ∃x (S(x) P(x) )
o Some S(x) is not P(x)
o ∃x (S(x) ¬P(x) )
Quantifiers:Example
o There exist an x such that x is black
o ∃xb(x) where b(x):x is black.
o |x|={
1. (∀x)(x
2
0) 2. (∀x)(|x| 0)
Nested quantifiers
o More than one quantifier may be necessary to capture the meaning of a statement in the predicate logic.
o Example:
Every real number has its corresponding negative.
Translation:
Assume:
a real number is denoted as x and its negative as y
A predicate P(x,y) denotes: “x + y =0”
Then we can write:
(∀x)(∃y)P(x,y)
o Translate the following English sentence into logical expression
“There is a rational number in between every pair of distinct rational numbers”
Use predicate Q(x), which is true when x is a rational number
x,y (Q(x) Q (y) (x < y) u (Q(u) (x < u) (u < y)))
24. 23Discret Structure for BSCS…… Prepared by Abdur-Rehman
Understanding Multiply Quantifiers
A college cafeteria line has four stations: salads, main courses, desserts, and beverages.
1. The salad station offers a choice of green salad or fruit salad.
2. The main course station offers spaghetti or fish;
3. The dessert station offers pie or cake;
4. The beverage station offers milk, soda, or coffee.
Three students, Uta, Tim, and Yuen, go through the line and make the following choices:
o Uta: green salad, spaghetti, pie, milk
o Tim: fruit salad, fish, pie, cake, milk, coffee
Yuen: spaghetti, fish, pie, soda
Understanding Multiply Quantifiers
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 .
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 .
25. 24Discret Structure for BSCS…… Prepared by Abdur-Rehman
e) There is an item that was chosen by every student. This is true; every student chose pie.
f) There is a student who chose every available item. This is false; no student chose all nine items.
g) 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.
h) Every student chose at least one item from every station. This is false; Yuen did not choose a salad.
Order of quantifiers
o The order of nested quantifiers matters if quantifiers are of different type
1. ∀ people x, ∃ a person y such that x cares y.
2. ∃ a person y such that ∀ people x, x cares y.
o ∀ x ∃ y C(x,y) is not the same as ∃y ∀ x C(x,y)
1. Given any person, it is possible to find someone whom that person cares,
2. whereas the second means that there is one amazing individual who is cared by all people.
o If one quantifier immediately follows another quantifier of the same type, then the order of the
quantifiers does not affect the meaning.
o Let Q(x, y, z) be the predicate:“x + y = z.”
o ∀x ∀y ∃z Q(x, y, z) True
1. “For all real numbers x and for all real numbers y there is a real number z such that x + y = z,”
o ∃z ∀x ∀y Q(x, y, z) False
1. “There is a real number z such that for all real numbers x and for all real numbers y it is true that
x + y = z,”
2. because there is no value of z that satisfies the equation x + y = z for all values of x and y.
26. 25Discret Structure for BSCS…… Prepared by Abdur-Rehman
Bound and Free Variables
o Definitions: If a quantifier is used on the variable x, then this variable is bound.
o An occurrence of a variable that is not bound by a quantifier or set equal to a particular value is said to be
free.
o When all the variables that occur in a propositional function are bound or set to a particular value, then
the propositional function is a proposition.
Bound and Free Variables-Example
o Let P(x, y), the propositional function “x + y = 0”.
o The logical variables x and y are free and we cannot evaluate the truth value of P(x, y).
o If the value 3 is set to x, then x is no longer a free variable, but P(3, y) is still a propositional function
because y is still a free variable.
o If we apply the universal quantification to the variable y, the propositional function ∀y P(3, y) is now a
proposition. Both variables x and y are no longer free and the truth value of the proposition is false.
Negation of quantifiers
o ∼(∀x, if P(x) then Q(x)) ≡ ∃x such that P(x) and ∼Q(x).
1. ∀ people p, if p is blond then p has blue eyes.
∃ a person p such that p is blond and p does not have blue eyes.
1. If a computer program has more than 100,000 lines, then it contains a bug.
There is at least one computer program that has more than 100,000 lines and does not contain a bug.
27. 26Discret Structure for BSCS…… Prepared by Abdur-Rehman
o ∼(∃x ∈ D such that Q(x)) ≡ ∀x ∈ D,∼Q(x).
o The negation of an existential statement (“some are”) is logically equivalent to a universal statement
(“none are” or “all are not”).
1. Some computer hackers are over 40.
No computer hackers are over 40 Or: All computer hackers are 40 or under
1. ∃ a triangle T such that the sum of the angles of T equals 200◦.
∀ triangles T, the sum of the angles of T does not equal 200◦.
o English statement:
It is not the case that all dogs are fleabags.
Translation: ¬ ∀ x Dog(x) Fleabag(x)
o Another way to express the same meaning:
There is a dog that is not a fleabag.
o Translation: ∃ x Dog(x) ¬ Fleabag(x)
Logically equivalent to:
∃ x ¬ ( Dog(x) Fleabag(x) )
o Conclusion: ¬ ∀ x P (x) is equivalent to ∃ x ¬ P(x)
(a) rewrite the statement formally
using quantifiers
and variables, and (b) write a
negation for the statement.
28. 27Discret Structure for BSCS…… Prepared by Abdur-Rehman
.
Valid & Invalid Arguments
o Argument is a sequence of statements ending in a conclusion.
o Determination of validity of an argument depends only on the form of an argument, not on its content.
“If you have a current password, then you can log onto the network.”
p=“You have a current password”
q=“You can log onto the network.”
p → q
p
∴ q where ∴ is the symbol that denotes “therefore.”
o An argument is a sequence of statements, and an argument form is a sequence of statement forms(have
proposition var.).
o All statements in an argument and all statement forms in an argument form, except for the final one, are
called premises (or assumptions or hypotheses).
o The final statement or statement form is called the conclusion. The symbol ∴, which is read “therefore,” is
normally placed just before the conclusion.
o To say that an argument form is valid means that no matter what particular statements are substituted for
the statement variables in its premises, if the resulting premises are all true, then the conclusion is also
true. Conclusion q is valid, when (p1 ∧ p2 ∧ · · · ∧ pn) → q is a tautology.
o To say that an argument is valid means that its form is valid.
o The truth of its conclusion follows necessarily or by logical form alone from the truth of its premises.
o When an argument is valid and its premises are true, the truth of the conclusion is said to be
inferred or deduced from the truth of the premises.
o If a conclusion “ain’t necessarily so,” then it isn’t a valid deduction.
Testing an Argument Form for Validity
1. Identify the premises and conclusion of the argument form.
2. Construct a truth table showing the truth values of all the premises and the conclusion.
3. A row of the truth table in which all the premises are true is called a critical row.
If there is a critical row in which the conclusion is false, then it is possible for an argument of the
given form to have true premises and a false conclusion, and so the argument form is invalid.
If the conclusion in every critical row is true, then the argument form is valid.
Testing an Argument Form for Validity
29. 28Discret Structure for BSCS…… Prepared by Abdur-Rehman
o p →q ∨ ∼r
o q → p ∧ r
o ∴ p →r
“If 101 is divisible by 3, then 101
2
is divisible by 9. 101 is divisible by 3. Consequently, 101
2
is divisible by 9.”
Although the argument is valid, its conclusion is incorrect, because one of the hypotheses is false (“101 is divisible
by 3.”).
If in the above argument we replace 101 with 102, we could correctly conclude that 102
2
is divisible by 9.
Rules of Inference for Propositional Logic
o An argument form consisting of two premises and a conclusion is called a syllogism.
o The first and second premises are called the major premise and minor premise, respectively.
o The most famous form of syllogism in logic is called modus ponens.
Modus Ponens
o The modus ponens argument form has the following form(“method of affirming”):
If p then q.
p
∴ q
If the sum of the digits of 371,487 is divisible by 3, then 371,487 is divisible by 3.
The sum of the digits of 371,487 is divisible by 3.
∴ 371,487 is divisible by 3.
o if a conditional statement and the hypothesis of this conditional statement are both true, then the
conclusion must also be true.
30. 29Discret Structure for BSCS…… Prepared by Abdur-Rehman
Modus Tollens
o Modus tollens(“method of denying” (the conclusion is a denial)) has the following form:
If p then q.
∼q
∴ ∼p
If Zeus is human, then Zeus is mortal.
Zeus is not mortal.
∴ Zeus is not human.
1) If Zeus is human, then Zeus is mortal; and
(2) Zeus is not mortal.
Must Zeus necessarily be nonhuman?
Yes!
Because, if Zeus were human, then by (1) he would be mortal.
But by (2) he is not mortal.
Hence, Zeus cannot be human.
Translating Propositions
Rules of Inference for Propositional Logic
o When an argument form involves 10 different propositional variables, to use a truth table to show this
argument form is valid requires 2
10
= 1024 different rows.
o Rules of inference.
First establish the validity of some relatively simple argument forms.
31. 30Discret Structure for BSCS…… Prepared by Abdur-Rehman
A rule of inference is a form of argument that is valid.
Thus modus ponens and modus tollens are both rules of inference.
o Generalization
The following argument forms are valid:
a. p b. q
∴ p ∨ q ∴ p ∨ q
if p is true, then, more generally, “p or q” is true for any other statement q.
Anton is a junior.
∴ (more generally) Anton is a junior or Anton is a senior.
o At some places with the name Addition
It is below freezing now. Therefore, it is below freezing or raining snow.
o Specialization
The following argument forms are valid:
a. p ∧ q b. p ∧ q
∴ p ∴ q
These argument forms are used for specializing.
Ana knows numerical analysis and Ana knows graph algorithms.
∴ (in particular) Ana knows graph algorithms.
o At some places with the name simplification
It is below freezing and snowing. Therefore it is below freezing.
o Elimination
The following argument forms are valid:
a. p ∨ q b. p ∨ q
∼q ∼p
∴ p ∴ q
o These argument forms say that when you have only two possibilities and you can rule one out, the other
must be the case.
32. 31Discret Structure for BSCS…… Prepared by Abdur-Rehman
x − 3 =0 or x + 2 = 0.
If you also know that x is not negative, then x ≠ −2, so
x + 2 ≠ 0.
By elimination, you can then conclude that
∴ x − 3 = 0.
o At some places with the name Disjunctive Syllogism
o Transitivity
o The following argument form is valid:
p →q
q →r
∴ p →r
If 18,486 is divisible by 18, then 18,486 is divisible by 9.
If 18,486 is divisible by 9, then the sum of the digits of 18,486 is divisible by 9.
∴ If 18,486 is divisible by 18, then the sum of the digits of 18,486 is divisible by 9.
o At some places with the name Hypothetical Syllogism
o Proof by Division into Cases
The following argument form is valid:
p ∨ q
p →r
q →r
∴ r
o If you can show that in either case a certain conclusion follows, then this conclusion must also be true.
x is positive or x is negative.
If x is positive, then x
2
> 0.
If x is negative, then x
2
> 0.
∴ x
2
> 0.
o Conjunction
p
q
∴ p ∧ q
o Resolution
33. 32Discret Structure for BSCS…… Prepared by Abdur-Rehman
p ∨ q
¬p ∨ r
∴ q ∨ r
Rules of Inference for Propositional Logic-Example
o “If it rains today, then we will not have a barbeque today. If we do not have a barbeque today, then we
will have a barbeque tomorrow.
Therefore, if it rains today, then we will have a barbeque tomorrow.”
p: “It is raining today.”
q: “We will not have a barbecue today.”
r: “We will have a barbecue tomorrow.”
So the argument is of the following form:
o “If it rains today, then we will not have a barbeque today. If we do not have a barbeque today, then we
will have a barbeque tomorrow.
Therefore, if it rains today, then we will have a barbeque tomorrow.”
p: “It is raining today.”
q: “We will not have a barbecue today.”
r: “We will have a barbecue tomorrow.”
So the argument is of the following form:
o “It is not sunny this afternoon and it is colder than yesterday,” “We will go swimming only if it is sunny,”
“If we do not go swimming, then we will take a canoe trip,” and “If we take a canoe trip, then we will be
home by sunset” lead to the conclusion “We will be home by sunset.”
p: “It is sunny this afternoon ”
q: “It is colder than yesterday.”
34. 33Discret Structure for BSCS…… Prepared by Abdur-Rehman
r: “We will go swimming .”
s:” we will take a canoe trip”
t: “We will be home by sunset”
Step Reason
1. ¬pΛq Premise
2. ¬p Simplification using (1)
3. r → p Premise
4. ¬r Modus tollens using (2) and (3)
5. ¬r → s Premise
6. s
7. s→t
Modus ponens using (4) and (5)
Premise
8. t Modus ponens using (6) and (7)
Fallacies
o A fallacy is an error in reasoning that results in an invalid argument.
1. Using ambiguous premises, and treating them as if they were unambiguous.
2. Circular reasoning (assuming what is to be proved without having derived it from the premises)
3. Jumping to a conclusion (without adequate grounds).
o An argument is invalid means that there is an argument of that form whose premises are all true and
whose conclusion is false.
o A fallacy is an error in reasoning that results in an invalid argument.
1. Using ambiguous premises, and treating them as if they were unambiguous.
2. Circular reasoning (assuming what is to be proved without having derived it from the premises)
3. Jumping to a conclusion (without adequate grounds).
o An argument is invalid means that there is an argument of that form whose premises are all true and
whose conclusion is false.
o Inverse Error
1. The conclusion of the argument would follow from the premises if the premise p →q were
replaced by its inverse. Such a replacement is not allowed, however, because a conditional
statement is not logically equivalent to its inverse. Inverse error is also known as the fallacy of
denying the antecedent.
2. “A cow eats grass. This animal is not a cow, so it won't eat grass.“
35. 34Discret Structure for BSCS…… Prepared by Abdur-Rehman
3. “An odd number is prime, 15 is odd, so 15 is prime" is not fallacious| it is a logically correct
argument based on an incorrect hypothesis.”
Rules of Inference for Propositional Logic
In logic, the words true and valid have very different meanings. A valid argument may have a false
conclusion, and an invalid argument may have a true conclusion.
Example
Arguments with Quantified Statements
All men are mortal.
valid by modus ponens. But its major premise is
false, and so is its conclusion.
The argument is invalid by the converse error, but it has a true
conclusion.
36. 35Discret Structure for BSCS…… Prepared by Abdur-Rehman
Socrates is a man.
∴ Socrates is mortal.
o Universal Instantiation
If some property is true of everything in a set, then it is true of any particular thing in the set.
For all real numbers x, x
1
= x. universal truth
r is a particular real number. particular instance
∴ r
1
= r.
Universal Modus Ponens
o Could be written as “All things that make P(x) true make Q(x) true,” in which case the conclusion would
follow by universal instantiation alone.
If an integer is even, then its square is even.
k is a particular integer that is even.
∴ k
2
is even.
o Major premise can be written as ∀x, if x is an even integer then x
2
is even.
o Let E(x) be “x is an even integer,” let S(x) be “x
2
is even,” and let k stand for a particular integer that is
even. Then the argument has the following form:
∀x, if E(x) then S(x).
E(k), for a particular k.
∴ S(k).
o This argument has the form of universal modus ponens and is therefore valid.
Universal Modus Tollens
37. 36Discret Structure for BSCS…… Prepared by Abdur-Rehman
All human beings are mortal.
Zeus is not mortal.
∴ Zeus is not human.
Solution The major premise can be rewritten as ∀x, if x is human then x is mortal.
Let H(x) be “x is human,” let M(x) be “x is mortal,” and let Z stand for Zeus. The argument becomes
∀x, if H(x) then M(x)
∼M(Z)
∴ ∼H(Z).
This argument has the form of universal modus tollens and is therefore valid.