SlideShare a Scribd company logo
Algorithmic Foundations
1
.Usingthe laws of logical equivalence show:
(a) ¬ (p∨ (q∨¬r)) ∧q≡ ((¬p ∧ q) ∧ R)
solution…………………………………………………………………………………………………………………
………………………………………………………………
Hence the proof that ¬ (p∨ (q∨¬r)) ∧q is equivalent to ((¬p ∧ q) ∧ R)
(b)(p→r)∨ (q→r) ≡ (p∧q) →r
p q r ((p → r) ∨ (q → r)) p q r ((p ∧ q) → r)
0 0 0 1 0 0 0 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
0 1 1
Call +25479
Call +254791410785
for the
Call
+254791410785
for the solution
for the solution
1
0 1 1 1
1 0 0 1 1 0 0 1
1 0 1 1 1 0 1 1
1 1 0 0 1 1 0 0
1 1 1 1 1 1 1 1
Hence the proof that (p→r) ∨ (q→r) ∧q is equivalent to (p∧q) →r
(c) (∀×∈⋃ (P(x) →¬Q(x)) ≡ ¬∃×∈⋃. (P(x) ∧Q(x))
P(x) P(x)
0 0
Call/WhatsApp
+254791410785
1
P(x) =
Q(x) =
(P(x) ∧Q(x) =……………………………………………………………………………………………....
Now looking at the truth table P(x) is equivalent Q(x) and (∀×∈⋃ (P(x) →¬Q(x)) is equivalent to ¬∃×∈⋃.
(P(x) ∧Q(x)) hence the proof.
2. Assuming thefollowing predicates:
•L(x, y):x is strictly less than y (x<y);
•E(x):x is even;
•P(x): x is a prime number;
•EQ(x, y):x equals y (x=y);
•G(x):x isgreater than zero (x>O);
•D(x, y): x divides y exactly;
Determine which of the followingformulae are true (in your answer include an expression of
the formula inconcise (good) English without variables).
(a) ∀×∈N. (D(2, x) →E(x))
Given that x/2= is an integer____________________hence x is even hence the proof.
(b) ∃y ∈N. ∀×∈N.L(x, y)
(c) ∃×∈Z+.∀y ∈Z+.(G(x) →(P(y) ∧L(x, y)))
Next,usingtheabove predicates and quantifiers were necessary, express the followingEnglish
statements inlogic.
(d) "Any non-zero integer divides itself"
(e) "Aprime number's only positive factors are 1and itself."
3. Provethat (BA) ⋃ (CA) =(B ⋃C)A using:
(a) A containment proof.
(b) Using set builder notation and logical equivalences.
4. For each of the following functions find the inverse or explain why no inverse exists.
a. f :N→ Nwhere f(x) =4·x2
+ 1
b. g : Z→ Z where g(x) = x + 7
Call/WhatsApp
+254791410785 for customized
the
for customized
the1
Ad

More Related Content

Similar to Algorithmic foundations.docx (20)

C2.0 propositional logic
C2.0 propositional logicC2.0 propositional logic
C2.0 propositional logic
Melaku Bayih Demessie
 
Probability Formula sheet
Probability Formula sheetProbability Formula sheet
Probability Formula sheet
Haris Hassan
 
Approximate Nearest Neighbour in Higher Dimensions
Approximate Nearest Neighbour in Higher DimensionsApproximate Nearest Neighbour in Higher Dimensions
Approximate Nearest Neighbour in Higher Dimensions
Shrey Verma
 
Unit 1-logic
Unit 1-logicUnit 1-logic
Unit 1-logic
raksharao
 
L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logic
Manjula V
 
Kumera2.docx
Kumera2.docxKumera2.docx
Kumera2.docx
AraarsooJaallataa
 
lecture03.ppsxlecture03.ppsxlecture03.ppsxlecture03.ppsx
lecture03.ppsxlecture03.ppsxlecture03.ppsxlecture03.ppsxlecture03.ppsxlecture03.ppsxlecture03.ppsxlecture03.ppsx
lecture03.ppsxlecture03.ppsxlecture03.ppsxlecture03.ppsx
sangyoon11
 
Talk at CIRM on Poisson equation and debiasing techniques
Talk at CIRM on Poisson equation and debiasing techniquesTalk at CIRM on Poisson equation and debiasing techniques
Talk at CIRM on Poisson equation and debiasing techniques
Pierre Jacob
 
Discrete Mathematics - All chapters
Discrete Mathematics - All chapters Discrete Mathematics - All chapters
Discrete Mathematics - All chapters
Omnia A. Abdullah
 
Truth, deduction, computation lecture c
Truth, deduction, computation   lecture cTruth, deduction, computation   lecture c
Truth, deduction, computation lecture c
Vlad Patryshev
 
Discrete mathematics
Discrete mathematicsDiscrete mathematics
Discrete mathematics
M.Saber
 
Discrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order LogicDiscrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order Logic
IT Engineering Department
 
1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt
TejasAditya2
 
Discreate structure presentation introduction
Discreate structure presentation introductionDiscreate structure presentation introduction
Discreate structure presentation introduction
yashirraza123
 
chapter9.ppt
chapter9.pptchapter9.ppt
chapter9.ppt
Praveen Kumar
 
Truth, deduction, computation lecture a
Truth, deduction, computation   lecture aTruth, deduction, computation   lecture a
Truth, deduction, computation lecture a
Vlad Patryshev
 
Resolution method in AI.pptx
Resolution method in AI.pptxResolution method in AI.pptx
Resolution method in AI.pptx
Abdullah251975
 
Predicates
PredicatesPredicates
Predicates
BindhuBhargaviTalasi
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inference
asimnawaz54
 
Some properties of two-fuzzy Nor med spaces
Some properties of two-fuzzy Nor med spacesSome properties of two-fuzzy Nor med spaces
Some properties of two-fuzzy Nor med spaces
IOSR Journals
 
Probability Formula sheet
Probability Formula sheetProbability Formula sheet
Probability Formula sheet
Haris Hassan
 
Approximate Nearest Neighbour in Higher Dimensions
Approximate Nearest Neighbour in Higher DimensionsApproximate Nearest Neighbour in Higher Dimensions
Approximate Nearest Neighbour in Higher Dimensions
Shrey Verma
 
Unit 1-logic
Unit 1-logicUnit 1-logic
Unit 1-logic
raksharao
 
L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logic
Manjula V
 
lecture03.ppsxlecture03.ppsxlecture03.ppsxlecture03.ppsx
lecture03.ppsxlecture03.ppsxlecture03.ppsxlecture03.ppsxlecture03.ppsxlecture03.ppsxlecture03.ppsxlecture03.ppsx
lecture03.ppsxlecture03.ppsxlecture03.ppsxlecture03.ppsx
sangyoon11
 
Talk at CIRM on Poisson equation and debiasing techniques
Talk at CIRM on Poisson equation and debiasing techniquesTalk at CIRM on Poisson equation and debiasing techniques
Talk at CIRM on Poisson equation and debiasing techniques
Pierre Jacob
 
Discrete Mathematics - All chapters
Discrete Mathematics - All chapters Discrete Mathematics - All chapters
Discrete Mathematics - All chapters
Omnia A. Abdullah
 
Truth, deduction, computation lecture c
Truth, deduction, computation   lecture cTruth, deduction, computation   lecture c
Truth, deduction, computation lecture c
Vlad Patryshev
 
Discrete mathematics
Discrete mathematicsDiscrete mathematics
Discrete mathematics
M.Saber
 
1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt
TejasAditya2
 
Discreate structure presentation introduction
Discreate structure presentation introductionDiscreate structure presentation introduction
Discreate structure presentation introduction
yashirraza123
 
Truth, deduction, computation lecture a
Truth, deduction, computation   lecture aTruth, deduction, computation   lecture a
Truth, deduction, computation lecture a
Vlad Patryshev
 
Resolution method in AI.pptx
Resolution method in AI.pptxResolution method in AI.pptx
Resolution method in AI.pptx
Abdullah251975
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inference
asimnawaz54
 
Some properties of two-fuzzy Nor med spaces
Some properties of two-fuzzy Nor med spacesSome properties of two-fuzzy Nor med spaces
Some properties of two-fuzzy Nor med spaces
IOSR Journals
 

Recently uploaded (20)

Antepartum fetal surveillance---Dr. H.K.Cheema pdf.pdf
Antepartum fetal surveillance---Dr. H.K.Cheema pdf.pdfAntepartum fetal surveillance---Dr. H.K.Cheema pdf.pdf
Antepartum fetal surveillance---Dr. H.K.Cheema pdf.pdf
Dr H.K. Cheema
 
Aerospace Engineering Homework Help Guide – Expert Support for Academic Success
Aerospace Engineering Homework Help Guide – Expert Support for Academic SuccessAerospace Engineering Homework Help Guide – Expert Support for Academic Success
Aerospace Engineering Homework Help Guide – Expert Support for Academic Success
online college homework help
 
How to Change Sequence Number in Odoo 18 Sale Order
How to Change Sequence Number in Odoo 18 Sale OrderHow to Change Sequence Number in Odoo 18 Sale Order
How to Change Sequence Number in Odoo 18 Sale Order
Celine George
 
PUBH1000 Slides - Module 10: Health Promotion
PUBH1000 Slides - Module 10: Health PromotionPUBH1000 Slides - Module 10: Health Promotion
PUBH1000 Slides - Module 10: Health Promotion
JonathanHallett4
 
GENERAL QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 4 MARCH 2025 .pdf
GENERAL QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 4 MARCH 2025 .pdfGENERAL QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 4 MARCH 2025 .pdf
GENERAL QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 4 MARCH 2025 .pdf
Quiz Club of PSG College of Arts & Science
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
Peer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docx
Peer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docxPeer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docx
Peer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docx
19lburrell
 
UNITED_KINGDOM.pptUNITED_KINGDOM.pptUNITED_KINGDOM.ppt
UNITED_KINGDOM.pptUNITED_KINGDOM.pptUNITED_KINGDOM.pptUNITED_KINGDOM.pptUNITED_KINGDOM.pptUNITED_KINGDOM.ppt
UNITED_KINGDOM.pptUNITED_KINGDOM.pptUNITED_KINGDOM.ppt
lsitinova
 
materi 3D Augmented Reality dengan assemblr
materi 3D Augmented Reality dengan assemblrmateri 3D Augmented Reality dengan assemblr
materi 3D Augmented Reality dengan assemblr
fatikhatunnajikhah1
 
The Pedagogy We Practice: Best Practices for Critical Instructional Design
The Pedagogy We Practice: Best Practices for Critical Instructional DesignThe Pedagogy We Practice: Best Practices for Critical Instructional Design
The Pedagogy We Practice: Best Practices for Critical Instructional Design
Sean Michael Morris
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
Capitol Doctoral Presentation -May 2025.pptx
Capitol Doctoral Presentation -May 2025.pptxCapitol Doctoral Presentation -May 2025.pptx
Capitol Doctoral Presentation -May 2025.pptx
CapitolTechU
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
Statement by Linda McMahon on May 21, 2025
Statement by Linda McMahon on May 21, 2025Statement by Linda McMahon on May 21, 2025
Statement by Linda McMahon on May 21, 2025
Mebane Rash
 
Dastur_ul_Amal under Jahangir Key Features.pptx
Dastur_ul_Amal under Jahangir Key Features.pptxDastur_ul_Amal under Jahangir Key Features.pptx
Dastur_ul_Amal under Jahangir Key Features.pptx
omorfaruqkazi
 
Peer Assesment- Libby.docx..............
Peer Assesment- Libby.docx..............Peer Assesment- Libby.docx..............
Peer Assesment- Libby.docx..............
19lburrell
 
ITI COPA Question Paper PDF 2017 Theory MCQ
ITI COPA Question Paper PDF 2017 Theory MCQITI COPA Question Paper PDF 2017 Theory MCQ
ITI COPA Question Paper PDF 2017 Theory MCQ
SONU HEETSON
 
A report on the county distress rankings in NC
A report on the county distress rankings in NCA report on the county distress rankings in NC
A report on the county distress rankings in NC
Mebane Rash
 
Module_2_Types_and_Approaches_of_Research (2).pptx
Module_2_Types_and_Approaches_of_Research (2).pptxModule_2_Types_and_Approaches_of_Research (2).pptx
Module_2_Types_and_Approaches_of_Research (2).pptx
drroxannekemp
 
Rebuilding the library community in a post-Twitter world
Rebuilding the library community in a post-Twitter worldRebuilding the library community in a post-Twitter world
Rebuilding the library community in a post-Twitter world
Ned Potter
 
Antepartum fetal surveillance---Dr. H.K.Cheema pdf.pdf
Antepartum fetal surveillance---Dr. H.K.Cheema pdf.pdfAntepartum fetal surveillance---Dr. H.K.Cheema pdf.pdf
Antepartum fetal surveillance---Dr. H.K.Cheema pdf.pdf
Dr H.K. Cheema
 
Aerospace Engineering Homework Help Guide – Expert Support for Academic Success
Aerospace Engineering Homework Help Guide – Expert Support for Academic SuccessAerospace Engineering Homework Help Guide – Expert Support for Academic Success
Aerospace Engineering Homework Help Guide – Expert Support for Academic Success
online college homework help
 
How to Change Sequence Number in Odoo 18 Sale Order
How to Change Sequence Number in Odoo 18 Sale OrderHow to Change Sequence Number in Odoo 18 Sale Order
How to Change Sequence Number in Odoo 18 Sale Order
Celine George
 
PUBH1000 Slides - Module 10: Health Promotion
PUBH1000 Slides - Module 10: Health PromotionPUBH1000 Slides - Module 10: Health Promotion
PUBH1000 Slides - Module 10: Health Promotion
JonathanHallett4
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
Peer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docx
Peer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docxPeer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docx
Peer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docx
19lburrell
 
UNITED_KINGDOM.pptUNITED_KINGDOM.pptUNITED_KINGDOM.ppt
UNITED_KINGDOM.pptUNITED_KINGDOM.pptUNITED_KINGDOM.pptUNITED_KINGDOM.pptUNITED_KINGDOM.pptUNITED_KINGDOM.ppt
UNITED_KINGDOM.pptUNITED_KINGDOM.pptUNITED_KINGDOM.ppt
lsitinova
 
materi 3D Augmented Reality dengan assemblr
materi 3D Augmented Reality dengan assemblrmateri 3D Augmented Reality dengan assemblr
materi 3D Augmented Reality dengan assemblr
fatikhatunnajikhah1
 
The Pedagogy We Practice: Best Practices for Critical Instructional Design
The Pedagogy We Practice: Best Practices for Critical Instructional DesignThe Pedagogy We Practice: Best Practices for Critical Instructional Design
The Pedagogy We Practice: Best Practices for Critical Instructional Design
Sean Michael Morris
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
Capitol Doctoral Presentation -May 2025.pptx
Capitol Doctoral Presentation -May 2025.pptxCapitol Doctoral Presentation -May 2025.pptx
Capitol Doctoral Presentation -May 2025.pptx
CapitolTechU
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
Statement by Linda McMahon on May 21, 2025
Statement by Linda McMahon on May 21, 2025Statement by Linda McMahon on May 21, 2025
Statement by Linda McMahon on May 21, 2025
Mebane Rash
 
Dastur_ul_Amal under Jahangir Key Features.pptx
Dastur_ul_Amal under Jahangir Key Features.pptxDastur_ul_Amal under Jahangir Key Features.pptx
Dastur_ul_Amal under Jahangir Key Features.pptx
omorfaruqkazi
 
Peer Assesment- Libby.docx..............
Peer Assesment- Libby.docx..............Peer Assesment- Libby.docx..............
Peer Assesment- Libby.docx..............
19lburrell
 
ITI COPA Question Paper PDF 2017 Theory MCQ
ITI COPA Question Paper PDF 2017 Theory MCQITI COPA Question Paper PDF 2017 Theory MCQ
ITI COPA Question Paper PDF 2017 Theory MCQ
SONU HEETSON
 
A report on the county distress rankings in NC
A report on the county distress rankings in NCA report on the county distress rankings in NC
A report on the county distress rankings in NC
Mebane Rash
 
Module_2_Types_and_Approaches_of_Research (2).pptx
Module_2_Types_and_Approaches_of_Research (2).pptxModule_2_Types_and_Approaches_of_Research (2).pptx
Module_2_Types_and_Approaches_of_Research (2).pptx
drroxannekemp
 
Rebuilding the library community in a post-Twitter world
Rebuilding the library community in a post-Twitter worldRebuilding the library community in a post-Twitter world
Rebuilding the library community in a post-Twitter world
Ned Potter
 
Ad

Algorithmic foundations.docx

  • 1. Algorithmic Foundations 1 .Usingthe laws of logical equivalence show: (a) ¬ (p∨ (q∨¬r)) ∧q≡ ((¬p ∧ q) ∧ R) solution………………………………………………………………………………………………………………… ……………………………………………………………… Hence the proof that ¬ (p∨ (q∨¬r)) ∧q is equivalent to ((¬p ∧ q) ∧ R) (b)(p→r)∨ (q→r) ≡ (p∧q) →r p q r ((p → r) ∨ (q → r)) p q r ((p ∧ q) → r) 0 0 0 1 0 0 0 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 1 Call +25479 Call +254791410785 for the Call +254791410785 for the solution for the solution 1 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 1 1 1 0 0 1 1 0 0 1 1 1 1 1 1 1 1 Hence the proof that (p→r) ∨ (q→r) ∧q is equivalent to (p∧q) →r (c) (∀×∈⋃ (P(x) →¬Q(x)) ≡ ¬∃×∈⋃. (P(x) ∧Q(x)) P(x) P(x) 0 0 Call/WhatsApp +254791410785 1
  • 2. P(x) = Q(x) = (P(x) ∧Q(x) =…………………………………………………………………………………………….... Now looking at the truth table P(x) is equivalent Q(x) and (∀×∈⋃ (P(x) →¬Q(x)) is equivalent to ¬∃×∈⋃. (P(x) ∧Q(x)) hence the proof. 2. Assuming thefollowing predicates: •L(x, y):x is strictly less than y (x<y); •E(x):x is even; •P(x): x is a prime number; •EQ(x, y):x equals y (x=y); •G(x):x isgreater than zero (x>O); •D(x, y): x divides y exactly; Determine which of the followingformulae are true (in your answer include an expression of the formula inconcise (good) English without variables). (a) ∀×∈N. (D(2, x) →E(x)) Given that x/2= is an integer____________________hence x is even hence the proof. (b) ∃y ∈N. ∀×∈N.L(x, y) (c) ∃×∈Z+.∀y ∈Z+.(G(x) →(P(y) ∧L(x, y))) Next,usingtheabove predicates and quantifiers were necessary, express the followingEnglish statements inlogic. (d) "Any non-zero integer divides itself" (e) "Aprime number's only positive factors are 1and itself." 3. Provethat (BA) ⋃ (CA) =(B ⋃C)A using: (a) A containment proof. (b) Using set builder notation and logical equivalences. 4. For each of the following functions find the inverse or explain why no inverse exists. a. f :N→ Nwhere f(x) =4·x2 + 1 b. g : Z→ Z where g(x) = x + 7 Call/WhatsApp +254791410785 for customized the for customized the1
  翻译: