This document provides an overview of propositional logic:
1. It defines propositions as statements that can be either true or false, and propositional variables connected by logical connectives like AND and OR.
2. It explains the five main connectives - negation, conjunction, disjunction, implication, and biconditional - and provides their truth tables.
3. It discusses well-formed formulas, tautologies, contradictions, and contingencies. Equivalences between logical statements and duality principles are also covered.
4. Normal forms like CNF and DNF are defined, along with concepts like minterms and maxterms. Rules of inference for building logical arguments are outlined
In this section of the course, we look at the way to use probability to analyze algorithms from the point of view of the worst case analysis.
In order to do this, we will look at:
1. What is the Probability of an Indicator function?
2. How to use the Indicator function to analyze a simple hiring algorithms.
3. How we can enforce the uniform probability property so algorithms based in probability can be simple and efficient.
In this section of the course, we look at the way to use probability to analyze algorithms from the point of view of the worst case analysis.
In order to do this, we will look at:
1. What is the Probability of an Indicator function?
2. How to use the Indicator function to analyze a simple hiring algorithms.
3. How we can enforce the uniform probability property so algorithms based in probability can be simple and efficient.
Proofs Methods and Strategy
CMSC 56 | Discrete Mathematical Structure for Computer Science
September 10, 2018
Instructor: Allyn Joy D. Calcaben
College of Arts & Sciences
University of the Philippines Visayas
These slides gives you information about path testing and data flow testing in software testing. These slides will be helpful for Engineering, CSE students.
Content:
1- Mathematical proof (what and why)
2- Logic, basic operators
3- Using simple operators to construct any operator
4- Logical equivalence, DeMorgan’s law
5- Conditional statement (if, if and only if)
6- Arguments
Proofs Methods and Strategy
CMSC 56 | Discrete Mathematical Structure for Computer Science
September 10, 2018
Instructor: Allyn Joy D. Calcaben
College of Arts & Sciences
University of the Philippines Visayas
These slides gives you information about path testing and data flow testing in software testing. These slides will be helpful for Engineering, CSE students.
Content:
1- Mathematical proof (what and why)
2- Logic, basic operators
3- Using simple operators to construct any operator
4- Logical equivalence, DeMorgan’s law
5- Conditional statement (if, if and only if)
6- Arguments
Introduction, architecture of multimedia, multimedia input and output devices, ADSL, ATM, multimedia database, animation techniques, aliasing and anti-aliasing, morphing, video on demand
Number System, Positional and non-positional number system, conversion number system from binary to another base and vice versa, decimal to another base and vice versa, convert another base than 10 to another base than 10, binary arithmetic operation such as binary addition, subtraction, multiplication, division
Computer Network Notes (Handwritten) UNIT 2NANDINI SHARMA
Data link layer: flow control, error control, line discipline, stop and wait, sliding window protocol, stop and wait arq, sliding window arq, BSC, HDLC, bit stuffing, elemenary data link protocol etc
HEAP SORT ILLUSTRATED WITH HEAPIFY, BUILD HEAP FOR DYNAMIC ARRAYS.
Heap sort is a comparison-based sorting technique based on Binary Heap data structure. It is similar to the selection sort where we first find the minimum element and place the minimum element at the beginning. Repeat the same process for the remaining elements.
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
Online aptitude test management system project report.pdfKamal Acharya
The purpose of on-line aptitude test system is to take online test in an efficient manner and no time wasting for checking the paper. The main objective of on-line aptitude test system is to efficiently evaluate the candidate thoroughly through a fully automated system that not only saves lot of time but also gives fast results. For students they give papers according to their convenience and time and there is no need of using extra thing like paper, pen etc. This can be used in educational institutions as well as in corporate world. Can be used anywhere any time as it is a web based application (user Location doesn’t matter). No restriction that examiner has to be present when the candidate takes the test.
Every time when lecturers/professors need to conduct examinations they have to sit down think about the questions and then create a whole new set of questions for each and every exam. In some cases the professor may want to give an open book online exam that is the student can take the exam any time anywhere, but the student might have to answer the questions in a limited time period. The professor may want to change the sequence of questions for every student. The problem that a student has is whenever a date for the exam is declared the student has to take it and there is no way he can take it at some other time. This project will create an interface for the examiner to create and store questions in a repository. It will also create an interface for the student to take examinations at his convenience and the questions and/or exams may be timed. Thereby creating an application which can be used by examiners and examinee’s simultaneously.
Examination System is very useful for Teachers/Professors. As in the teaching profession, you are responsible for writing question papers. In the conventional method, you write the question paper on paper, keep question papers separate from answers and all this information you have to keep in a locker to avoid unauthorized access. Using the Examination System you can create a question paper and everything will be written to a single exam file in encrypted format. You can set the General and Administrator password to avoid unauthorized access to your question paper. Every time you start the examination, the program shuffles all the questions and selects them randomly from the database, which reduces the chances of memorizing the questions.
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...Amil Baba Dawood bangali
Contact with Dawood Bhai Just call on +92322-6382012 and we'll help you. We'll solve all your problems within 12 to 24 hours and with 101% guarantee and with astrology systematic. If you want to take any personal or professional advice then also you can call us on +92322-6382012 , ONLINE LOVE PROBLEM & Other all types of Daily Life Problem's.Then CALL or WHATSAPP us on +92322-6382012 and Get all these problems solutions here by Amil Baba DAWOOD BANGALI
#vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore#blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #blackmagicforlove #blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #Amilbabainuk #amilbabainspain #amilbabaindubai #Amilbabainnorway #amilbabainkrachi #amilbabainlahore #amilbabaingujranwalan #amilbabainislamabad
Hierarchical Digital Twin of a Naval Power SystemKerry Sado
A hierarchical digital twin of a Naval DC power system has been developed and experimentally verified. Similar to other state-of-the-art digital twins, this technology creates a digital replica of the physical system executed in real-time or faster, which can modify hardware controls. However, its advantage stems from distributing computational efforts by utilizing a hierarchical structure composed of lower-level digital twin blocks and a higher-level system digital twin. Each digital twin block is associated with a physical subsystem of the hardware and communicates with a singular system digital twin, which creates a system-level response. By extracting information from each level of the hierarchy, power system controls of the hardware were reconfigured autonomously. This hierarchical digital twin development offers several advantages over other digital twins, particularly in the field of naval power systems. The hierarchical structure allows for greater computational efficiency and scalability while the ability to autonomously reconfigure hardware controls offers increased flexibility and responsiveness. The hierarchical decomposition and models utilized were well aligned with the physical twin, as indicated by the maximum deviations between the developed digital twin hierarchy and the hardware.
We have compiled the most important slides from each speaker's presentation. This year’s compilation, available for free, captures the key insights and contributions shared during the DfMAy 2024 conference.
Water billing management system project report.pdfKamal Acharya
Our project entitled “Water Billing Management System” aims is to generate Water bill with all the charges and penalty. Manual system that is employed is extremely laborious and quite inadequate. It only makes the process more difficult and hard.
The aim of our project is to develop a system that is meant to partially computerize the work performed in the Water Board like generating monthly Water bill, record of consuming unit of water, store record of the customer and previous unpaid record.
We used HTML/PHP as front end and MYSQL as back end for developing our project. HTML is primarily a visual design environment. We can create a android application by designing the form and that make up the user interface. Adding android application code to the form and the objects such as buttons and text boxes on them and adding any required support code in additional modular.
MySQL is free open source database that facilitates the effective management of the databases by connecting them to the software. It is a stable ,reliable and the powerful solution with the advanced features and advantages which are as follows: Data Security.MySQL is free open source database that facilitates the effective management of the databases by connecting them to the software.
Using recycled concrete aggregates (RCA) for pavements is crucial to achieving sustainability. Implementing RCA for new pavement can minimize carbon footprint, conserve natural resources, reduce harmful emissions, and lower life cycle costs. Compared to natural aggregate (NA), RCA pavement has fewer comprehensive studies and sustainability assessments.
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsVictor Morales
K8sGPT is a tool that analyzes and diagnoses Kubernetes clusters. This presentation was used to share the requirements and dependencies to deploy K8sGPT in a local environment.
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Proposition Logic in Discrete Structure
1. `
1
Definition: Propositional Logic
A proposition is a collection of declarative statements that has either a truth value
"true” or a truth value "false". A propositional consists of propositional variables
and connectives. We denote the propositional variables by capital letters (A, B, C
etc). The connectives connect the propositional variables.
Some examples of Propositions are given below:
• "Man is Mortal", it returns truth value“TRUE” as T.
• "12 + 9 = 3 − 2", it returns truth
value “FALSE” as F.
The following is not a Proposition
• "A is less than 2". It is because unless we give a specific value of A, we
cannot say whether the statement is true orfalse.
Connectives
In propositional logic generally we use five connectives which are OR (), AND
(), Negation/ NOT (¬), Conditional or Implication / if-then (→), Bi conditional or
If and only if ().
Negation (¬) − The negation of a proposition A (written as ¬A) is false when A is true and is true when A
is false.
The truth table is as follows –
A ¬A
True False
False True
AND ( ) − The AND operation of two propositions A and B (written as A B) is
true if both the propositional variable A and B is true.
2. `
2
The truth table is as follows −
A B A B
True True False
True False False
False True False
False False True
OR ()− The OR operation of two propositions A and B (written as A B) is true
if at least any of the propositional variable A or B is true.
The truth table is as follows −
A B A B
T T T
T F T
F T T
F F F
Implication / if-then (→) − An implication A→B is False if A is true and B is false. The rest
cases are true.
3. `
3
The truth table is as follows −
A B A → B
True True True
True False False
False True True
False False True
If and only if ()− A B is bi-conditional logical connective which is true when
p and q are both false or both are true.
The truth table is as follows −
A B A B
True True True
True False False
False True False
False False True
Well Formed Formulas (WFFs)
The well formed formulas (WFFs) or statement formulas or logic formulas are defined
recursively (or inductively) as below.
1. Propositional variables p,q,r,… and propositional constants F,T are well formed
formulas. They are known as primitive WFFs.
4. `
4
2. If P and Q are WFFs then P,Q,P Q,P Q,P → Q and P Q are also WFFs.
3. All WFFs are obtained by the above procedures applied a finite number of times.
For example, the following are WFFs
p, p q, p → q, p (q → r) (p q)→ r, (p → q)→(q → p)
Note: In order to avoid excessive use of parenthesis, we adopt an order of precedence for
logical Operators.
, , , → and
Tautologies
A Tautology is a formula which is always true for every value of its propositional variables.
Example − Prove [(A → B) A] → B is a tautology
The truth table is as follows −
A B A → B (A → B) A [(A → B) A] → B
True True True True True
True False False False True
False True True False True
False False True False True
As we can see every value of [(A → B) A] → B is “True”, it is a tautology.
Contradictions
A Contradiction is a formula which is always false for every value of its propositional
variables.
Example − Prove (A VB) [(¬A) (¬B)] is a contradiction
The truth table is as follows −
5. `
5
A B A
B
¬A ¬B (¬A)
(¬B)
(A V B) [(¬A)
(¬B)]
True True True False False False False
True False True False True False False
False True True True False False False
False False False True True True False
As we can see every value of (A B) [(¬A) (¬B)] is “False”, it is a
Contradiction.
Contingency
A Contingency is a formula which has both some true and some false values for
every value of its propositional variables.
Example − Prove (A B) (¬A) a contingency
The truth table is as follows −
A B A B ¬A (A B) (¬A)
True True True False False
True False True False False
False True True True True
False False False True False
As we can see every value of (A B) (¬A) has both “True” and “False”, it
is a contingency.
Propositional Equivalences
6. `
6
Two statements X and Y are logically equivalent if any of the following two conditions −
• The truth tables of each statement have the same truth values.
• The bi-conditional statement X Y is a tautology.
Example−Prove¬(A B)and[(¬A) (¬B)]are
equivalent Testing by 1st method (Matching truth
table)
A B A
B
¬ (A B) ¬A ¬B [(¬A) (¬B)]
True True True False False False False
True False True False False True False
False True True False True False False
False False False True True True True
Here, we can see the truth values of ¬ (A B) and [(¬A) (¬B)] are same, hence
the statements are equivalent.
Testing by 2nd method (Bi-conditionality)
A B ¬ (A
B)
[(¬A)
(¬B)]
[¬ (A B)] [(¬A)
(¬B)]
True True False False True
True False False False True
False True False False True
False False True True True
As [¬ (A B)] [(¬A) (¬B)] is a tautology, the statements are equivalent.
7. `
8
Laws of Propositional Logic:
S.No Name of Laws Primal Form Dual Form
1 Idempotent Law p p p p p p
2 Identity Law p F p p T p
3 Dominant Law p T T p F F
4 Complement Law p p T p p F
5 Commutative Law p q q p p q q p
6 Associative Law p (q r) (p q) r p (q r) (p q) r
7 Distributive Law p(qr) (p q)(p r) p(q r) (p q)(p r)
8 Absorption Law p (p q) p p (p q) p
9 De Morgan’s Law (p q) p q (p q) p q
10 Double Negation Law (p) p -
Logical Equivalences involving Conditional Statements
Logical Equivalences involving Biconditional Statements
Inverse, Converse, and Contra-positive
A conditional statement has two parts − Hypothesis and Conclusion.
Example of Conditional Statement − “If you do your homework, you will not
be punished.” Here, "you do your homework" is the hypothesis and "you will
8. `
9
not be punished" is the conclusion.
Inverse –An inverse of the conditional statement is the negation of both the
hypothesis and the conclusion. If the statement is “If p, then q”, the inverse will
be “If not p, then not q”. The inverse of “If you do your homework, you will not
be punished” is “If you do not do your homework, you will be punished.”
Converse−The converse of the conditional statement is computed by interchanging the
hypothesis and the conclusion. If the statement is “If p, then q”, the inverse will be “If q,
Then p”. The converse of "If you do your homework, you will not be punished" is "If you
will not be punished, you do not do your homework”.
Contra-positive –The contra-positive of the conditional is computed by
interchanging the hypothesis and the conclusion of the inverse statement. If the
statement is “If p, then q”, the inverse will be “If not q, then not p”. The Contra-
positive of "If you do your homework, you will not be punished” is "If you will
be punished, you do your home work”.
Duality Principle
Duality principle set states that for any true statement, the dual statement
obtained by interchanging unions into intersections (and vice versa) and
interchanging Universal set into Null set (and vice versa) is also true. If dual of
any statement is the statement itself, it is said self-dual statement.
10. `
11
Elementary Product: A product of the variables and their negations in a
formula is called an elementary product. If p and q are any two atomic
variables, then p, p q, q p, p q are some examples of
elementary products.
Elementary Sum: A sum of the variables and their negations in a formula is
called an elementary sum. If P and Q are any two atomic variables, then
p, p q, q p, p q are some examples of elementary sums.
Normal Forms: We can convert any proposition in two normal forms −
1. Conjunctive Normal Form (CNF) 2.Disjunctive Normal Form (DNF)
Conjunctive Normal Form
A compound statement is in conjunctive normal form if it is obtained by
operating AND among variables (negation of variables included) connected
with ORs.
Examples: 1. (p q) (q r)
2. (p q r) (s r)
Disjunctive Normal Form
A compound statement is in disjunctive normal form if it is obtained by
operating OR among variables (negation of variables included) connected with
ANDs.
Example: (p q) (p q) (p q r)
Functionally Complete set
A set of logical operators is called functionally complete if every compound
proposition is logically equivalent to a compound proposition involving only
this set of logical operators. ,, form a functionally complete set of
operators.
Minterms: For two variables p and q there are 4 possible formulas which
consist of conjunctions of p,q or it’s negation given by
p q, p q, p q, p q
11. `
12
Maxterms: For two variables p and q there are 4 possible formulas which
consist of disjunctions of p,q or its negation given by
p q, p q, p q, p q
Principal Disjunctive Normal Form: For a given formula an equivalent
formula consisting of disjunctions of minterms only is known as principal
disjunctive normal form (PDNF).
Principal Conjunctive Normal Form: For a given formula an equivalent
formula consisting of conjunctions of maxterms only is known as principal
conjunctive normal form (PCNF).
Problems:
13. `
14
Rule of inference to build arguments:
RuleP: A premise may be introduced at point in the derivation
Rule T: A formula S may be introduced in a derivation if S is a tautologically
implied by any one or more of the preceeding formulas in the derivation.
Rule CP: If we can derive S from R and a set of premises, then we can derive
R →S from the set of premises alone. Rule CP is also called deduction theoem.
16. `
17
Quantifiers:
The variable of predicates is quantified by quantifiers. There are two types of quantifier in
Predicate logic − Universal Quantifier and Existential Quantifier.
Universal Quantifier:
Universal quantifier states that the statements within its scope are true for every
value of the specific variable. It is denoted by the symbol ∀.
∀x P(x) is read as for every value of x, P(x) is true.
Example: "Man is mortal" can be transformed into the propositional form ∀x
P(x) where P(x) is the predicate which denotes x is mortal and the universe of
discourse is all men.
Existential Quantifier:
Existential quantifier states that the statements within its scope are true for some
values of the specific variable. It is denoted by the symbol ∃.∃x P(x) is read as
for some values of x, P(x) is true.
17. `
18
Example: "Some people are dishonest" can be transformed into the
propositional form ∃x P(x) where P(x) is the predicate which denotes x is
dishonest and the universe of discourse is some people.
Nested Quantifiers:
If we use a quantifier that appears within the scope of another quantifier, it is
called nested quantifier.
18. `
19
Symbolize the following statements:
(a)All men are mortal
(b)All the world loves alover
(c) X is the father of
mother of Y (d)No cats
has atail
(e) Some people who trust others are rewarded
Solution: