#2 formal methods-principles of logic.
These slides are part of a formal class notes prepared for the module "Formal Methods" taught for the students of Software engineering.
#1 formal methods – introduction for software engineeringSharif Omar Salem
formal methods – introduction for software engineering
Part of formal class notes of the module "Formal Methods"
designed for software engineering students of BSc. level.
This lecture talks about parsing. Briefly gives overview on lexicon, categorization, grammar rules, syntactic tree, word senses and various challenges of natural language processing
#1 formal methods – introduction for software engineeringSharif Omar Salem
formal methods – introduction for software engineering
Part of formal class notes of the module "Formal Methods"
designed for software engineering students of BSc. level.
This lecture talks about parsing. Briefly gives overview on lexicon, categorization, grammar rules, syntactic tree, word senses and various challenges of natural language processing
Introduction to Expert Systems {Artificial Intelligence}FellowBuddy.com
FellowBuddy.com is an innovative platform that brings students together to share notes, exam papers, study guides, project reports and presentation for upcoming exams.
We connect Students who have an understanding of course material with Students who need help.
Benefits:-
# Students can catch up on notes they missed because of an absence.
# Underachievers can find peer developed notes that break down lecture and study material in a way that they can understand
# Students can earn better grades, save time and study effectively
Our Vision & Mission – Simplifying Students Life
Our Belief – “The great breakthrough in your life comes when you realize it, that you can learn anything you need to learn; to accomplish any goal that you have set for yourself. This means there are no limits on what you can be, have or do.”
Like Us - https://www.facebook.com/FellowBuddycom
Introduction to Expert Systems {Artificial Intelligence}FellowBuddy.com
FellowBuddy.com is an innovative platform that brings students together to share notes, exam papers, study guides, project reports and presentation for upcoming exams.
We connect Students who have an understanding of course material with Students who need help.
Benefits:-
# Students can catch up on notes they missed because of an absence.
# Underachievers can find peer developed notes that break down lecture and study material in a way that they can understand
# Students can earn better grades, save time and study effectively
Our Vision & Mission – Simplifying Students Life
Our Belief – “The great breakthrough in your life comes when you realize it, that you can learn anything you need to learn; to accomplish any goal that you have set for yourself. This means there are no limits on what you can be, have or do.”
Like Us - https://www.facebook.com/FellowBuddycom
Sections Included:
1. Collection
2. Types of Collection
3. Sets
4. Commonly used Sets in Maths
5. Notation
6. Different Types of Sets
7. Venn Diagram
8. Operation on sets
9. Properties of Union of Sets
10. Properties of Intersection of Sets
11. Difference in Sets
12. Complement of Sets
13. Properties of Complement Sets
14. De Morgan’s Law
15. Inclusion Exclusion Principle
Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfSets.pdf
This pdf tackles about the Mathematical Language and Symbols and the Variables and the Language of Sets.
This presentation contains definitions, tables, illustrations as well as examples.
I hope you'll find this helpful.
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Dr. Vinod Kumar Kanvaria
Exploiting Artificial Intelligence for Empowering Researchers and Faculty,
International FDP on Fundamentals of Research in Social Sciences
at Integral University, Lucknow, 06.06.2024
By Dr. Vinod Kumar Kanvaria
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
5. Preparedby:SharifOmarSalem–ssalemg@gmail.com
Natural language is very ambiguous.
Eric does not believe that Mary can pass any test.
I only borrowed your car.
Tom hates Jim and he likes Mary.
It led to many paradoxes.
“This sentence is a lie.” (The Liar’s Paradox)
4
6. Preparedby:SharifOmarSalem–ssalemg@gmail.com
Mid to late 19th Century.
Attempted to formulate logic in terms of a mathematical
language
Rules of inference were modeled after various laws for
manipulating algebraic expressions.
5
7. Preparedby:SharifOmarSalem–ssalemg@gmail.com
Late 19th to mid 20th Century
Frege proposed logic as a language for mathematics in
1879.
With the rigor of this new foundation, Cantor was able to
analyze the notion of infinity in ways that were previously
impossible. (2N is strictly larger than N)
Russell’s Paradox
T = { S | S ∉ S}
6
8. Preparedby:SharifOmarSalem–ssalemg@gmail.com
In computer science, we design and study systems
through the use of formal languages that can
themselves be interpreted by a formal system.
Boolean circuits
Programming languages
Design Validation and verification
AI, Security. Etc.
7
12. Preparedby:SharifOmarSalem–ssalemg@gmail.com
developed set theory
set theory was not initially accepted
because it was radically different
set theory today is widely accepted and is
used in many areas of mathematics
11
the concept of infinity was expanded by Cantor’s set theory
Cantor proved there are “levels of infinity”
an infinitude of integers initially ending with or
an infinitude of real numbers exist between 1 and 2;
there are more real numbers than there are integers…
13. Preparedby:SharifOmarSalem–ssalemg@gmail.com
John Venn 1834-1923
studied and taught logic and probability theory
articulated Boole’s algebra of logic
devised a simple way to diagram set operations
(Venn Diagrams)
12
George Boole 1815-1864
self-taught mathematician with an interest in logic
developed an algebra of logic (Boolean Algebra)
featured the operators
and
or
not
nor (exclusive or)
14. Preparedby:SharifOmarSalem–ssalemg@gmail.com
developed two laws of negation
interested, like other
mathematicians, in using
mathematics to demonstrate
logic
furthered Boole’s work of
incorporating logic and
mathematics
formally stated the laws of set
theory
13
15. Preparedby:SharifOmarSalem–ssalemg@gmail.com
A set is a collection of elements
An element is an object contained in a set
If every element of Set A is also contained in Set B, then Set A is a
subset of Set B
A is a proper subset of B if B has more elements than A does
The universal set contains all of the elements relevant to a given
discussion
14
17. Preparedby:SharifOmarSalem–ssalemg@gmail.com
Symbol Meaning
Upper case designates set name
Lower case designates set elements
{ } enclose elements in set
or is (or is not) an element of
is a subset of (includes equal sets)
is a proper subset of
is not a subset of
is a superset of
| or : such that (if a condition is true)
| | the cardinality of a set
16
18. Preparedby:SharifOmarSalem–ssalemg@gmail.com
a set is a collection of objects
sets can be defined two ways:
by listing each element
by defining the rules for membership
Examples:
A = {2,4,6,8,10}
A = {x | x is a positive even integer <12}
17
19. Preparedby:SharifOmarSalem–ssalemg@gmail.com
an element is a member of a set
notation: means “is an element of”
means “is not an element of”
Examples:
A = {1, 2, 3, 4}
1 A 6 A
2 A z A
B = {x | x is an even number 10}
2 B 9 B
4 B z B
18
21. Preparedby:SharifOmarSalem–ssalemg@gmail.com
A = {x | x is a positive integer 8}
set A contains: 1, 2, 3, 4, 5, 6, 7, 8
B = {x | x is a positive even integer 10}
set B contains: 2, 4, 6, 8
C = {2, 4, 6, 8, 10}
set C contains: 2, 4, 6, 8, 10
Subset Relationships
A A A B A C
B A B B B C
C A C B C C
20
22. Preparedby:SharifOmarSalem–ssalemg@gmail.com
Two sets are equal if and only if they contain precisely the
same elements.
The order in which the elements are listed is unimportant.
Elements may be repeated in set definitions without increasing
the size of the sets.
Examples:
A = {1, 2, 3, 4} B = {1, 4, 2, 3}
A B and B A; therefore, A = B and B = A
A = {1, 2, 2, 3, 4, 1, 2} B = {1, 2, 3, 4}
A B and B A; therefore, A = B and B = A
21
23. Preparedby:SharifOmarSalem–ssalemg@gmail.com
Cardinality refers to the number of elements in a set
A finite set has a countable number of elements
An infinite set has at least as many elements as the set of natural
numbers
notation: |A| represents the cardinality of Set A
Set Definition Cardinality
A = {x | x is a lower case letter} |A| = 26
B = {2, 3, 4, 5, 6, 7} |B| = 6
A = {1, 2, 3, …} |A| =
22
24. Preparedby:SharifOmarSalem–ssalemg@gmail.com
The universal set is the set of all things pertinent to to a
given discussion
and is designated by the symbol U
Example:
U = {all students at LUCT}
Some Subsets:
A = {all Computer Technology students}
B = {freshmen students}
C = {sophomore students}
23
25. Preparedby:SharifOmarSalem–ssalemg@gmail.com
Any set that contains no elements is called the empty set
the empty set is a subset of every set including itself
notation: { } or
Examples ~ both A and B are empty
A = {x | x is a Proton Civic car}
B = {x | x is a positive number 0}
24
26. Preparedby:SharifOmarSalem–ssalemg@gmail.com
The power set is the set of all subsets that can be
created from a given set
The cardinality of the power set is 2 to the power of the
given set’s cardinality
notation: P (set name)
Example:
A = {a, b, c} where |A| = 3
P (A) = {{a, b}, {a, c}, {b, c}, {a}, {b}, {c}, A, }
and |P (A)| = 8
In general, if |A| = n, then |P (A) | = 2n
25
27. Preparedby:SharifOmarSalem–ssalemg@gmail.com
Z represents the set of integers
Z+ is the set of positive integers and
Z- is the set of negative integers
N represents the set of natural numbers
ℝ represents the set of real numbers
Q represents the set of rational numbers
26
35. Preparedby:SharifOmarSalem–ssalemg@gmail.com
The set difference “A minus B” is the set of elements that are in A,
with those that are in B subtracted out. Another way of putting it is,
it is the set of elements that are in A, and not in B, so
A B A B Ç
34
40. Preparedby:SharifOmarSalem–ssalemg@gmail.com
Symbolic logic is
a collection of languages that use symbols to represent facts,
events, and actions,
and provide rules to symbolize reasoning.
Given the specification of a system and a collection of
desirable properties, both written in logic formulas, we can
attempt to prove that these desirable properties are logical
consequences of the specification.
39
41. Preparedby:SharifOmarSalem–ssalemg@gmail.com
Definition of a statement:
A statement, also called a proposition, is a sentence that is either
true or false, but not both.
Hence the truth value of a statement is T (1) or F (0)
Examples: Which ones are statements?
All mathematicians wear sandals.
5 is greater than –2.
Where do you live?
You are a cool person.
Anyone who wears sandals is an algebraist.
40
42. Preparedby:SharifOmarSalem–ssalemg@gmail.com
An example to illustrate how logic really helps us (3 statements
written below):
All LUCT staff wear Black.
Anyone who wears black is an employee.
Therefore, all LUCT staff are employees.
Logic is of no help in determining the individual truth of these
statements.
Logic helps in concluding fact from another facts (reasoning)
However, if the first two statements are true, logic assures the truth of
the third statement.
Logical methods are used in mathematics to prove theorems and in
computer science to prove that programs do what they are
supposed to do.
41
43. Preparedby:SharifOmarSalem–ssalemg@gmail.com
Usually, letters like A, B, C, D, etc. are used to represent statements.
Logical connectives are symbols such as
Λ , V , , , ’
Λ represents and, V represents or, represents equivalence,
represents implication, ‘ represents negation.
A statement form or propositional form is an expression made up
of statement variables (such as A, B, and C) and logical connectives
(such as Λ, V, , )
Example: (A V B) (B Λ C)
42
44. Preparedby:SharifOmarSalem–ssalemg@gmail.com
Connective # 1:
Conjunction “AND” (symbol Λ)
Symbol Unicode is 8743
If A and B are statement variables, the conjunction of A and B is A Λ B,
which is read “A and B”.
A Λ B is true when both A and B are true.
A Λ B is false when at least one of A or B is false.
A and B are called the conjuncts of A Λ B.
43
A B AΛ B
T T T
T F F
F T F
F F F
45. Preparedby:SharifOmarSalem–ssalemg@gmail.com
Connective # 2:
Disjunction “OR” (symbol V)
Symbol Unicode is 8744
If A and B are statement variables,
the disjunction of A and B is A V B, which is read “A or B”.
A V B is true when at least one of A or B is true.
A V B is false when both A and B are false.
44
A B A V B
T T T
T F T
F T T
F F F
46. Preparedby:SharifOmarSalem–ssalemg@gmail.com
Connective # 3:
Implication (symbol )
Symbol Unicode is 8594
If A and B are statement variables, the symbolic form of “if A then B” is
A B. This may also be read “A implies B” or “A only if B.”
“If A then B” is false when A is true and B is false, and it is true
otherwise.
Note: A B is true if A is false, regardless of the truth of B
45
A B AB
T T T
T F F
F T T
F F T
47. Preparedby:SharifOmarSalem–ssalemg@gmail.com
Connective # 4:
Equivalence (symbol )
Symbol Unicode is 8596
If A and B are statement variables, the symbolic form of “A if, and only if, B”
and is denoted A B.
It is true if both A and B have the same truth values.
It is false if A and B have opposite truth values.
The truth table is as follows:
Note: A B is a short form for (A B) Λ (B A)
46
A B AB BA (A B) Λ (B A)
T T T T T
T F F T F
F T T F F
F F T T T
48. Preparedby:SharifOmarSalem–ssalemg@gmail.com
Connective #5:
Negation (symbol )
Symbol Unicode is 0732
If A is a statement variable, the negation of A is “not A” and is denoted
A.
It has the opposite truth value from A: if A is true, then A is false; if A
is false, then A is true.
Example of a negation:
A: 5 is greater than –2
A : 5 is less than –2
B: She likes butter
B : She dislikes butter / She hates butter
Sometimes we use the symbol ¬ for negation
47
A A
T F
F T
49. Preparedby:SharifOmarSalem–ssalemg@gmail.com
A truth table is a table that displays the truth values of a statement
form which correspond to the different combinations of truth values
for the variables.
48
A A
T F
F T
A B AΛ B
T T T
T F F
F T F
F F F
A B A V B
T T T
T F T
F T T
F F F
A B AB
T T T
T F F
F T T
F F T
A B AB
T T T
T F F
F T F
F F T
50. Preparedby:SharifOmarSalem–ssalemg@gmail.com
Combining letters, connectives, and parentheses can generate an
expression which is meaningful, called a wff.
e.g. (A B) V (B A) is a wff
but A )) V B ( C) is not
To reduce the number of parentheses, an order is stipulated in
which the connectives can be applied, called the order of
precedence, which is as follows:
Connectives within innermost parentheses first and then progress
outwards
Negation ()
Conjunction (Λ), Disjunction (V)
Implication ()
Equivalence ()
Hence, A V B C is the same as (A V B) C
49
51. Preparedby:SharifOmarSalem–ssalemg@gmail.com
The truth table for the wff A V B (A V B) shown below. The main
connective, according to the rules of precedence, is implication.
50
A B B A V B A V B (A V B) A V B (A V B)
T T F T T F F
T F T T T F F
F T F F T F T
F F T T F T T
52. Preparedby:SharifOmarSalem–ssalemg@gmail.com
Definition of tautology (VALIDITY):
A wff that is intrinsically true, i.e. no matter what the truth value of
the statements that comprise the wff.
e.g. It will rain today or it will not rain today ( A V A )
P Q where P is A B and Q is A V B
Definition of a contradiction (Unsatisfy):
A wff that is intrinsically false, i.e. no matter what the truth value of
the statements that comprise the wff.
e.g. It will rain today and it will not rain today ( A Λ A )
(A Λ B) Λ A
Usually, tautology is represented by 1 and contradiction by 0
51
53. Preparedby:SharifOmarSalem–ssalemg@gmail.com
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.
The logical equivalence of statement forms P and Q is denoted by writing P Q
or P Q.
Truth table for (A V B) V C A V (B V C)
52
A B C A V B B V C (A V B) V C A V (B V C)
T T T T T T T
T T F T T T T
T F T T T T T
T F F T F T T
F T T T T T T
F T F T T T T
F F T F T T T
F F F F F F F
54. Preparedby:SharifOmarSalem–ssalemg@gmail.com
The equivalences are listed in pairs, hence they are called duals of
each other.
One equivalence can be obtained from another by replacing V with
Λ and 0 with 1 or vice versa.
Prove the distributive property using truth tables.
53
Commutative A V B B V A AΛ B B Λ A
Associative (A V B) V C A V (B V C) (AΛ B) Λ C AΛ (B Λ C)
Distributive A V (B Λ C) (A V B) Λ (A V C) AΛ (B V C) (AΛ B) V (AΛ C)
Identity A V 0 A AΛ 1 A
Complement A V A 1 AΛ A 0