SlideShare a Scribd company logo
MA - 210
Discrete Structures
Introduction
Lecture-1
Overview of this Lecture
• Course Administration
• What is it about?
• Course Themes, Goals, and Syllabus
• Propositional logic
Course Administration
Timings
Lecture Hours:
Monday (α ): 12:00 PM – 03:00 PM
Tuesday (Ω): 12:00 PM – 03:00 PM
Location:
Class Room 5
Lecturer: Mona Waseem
Office: Faculty Office (Room-10), Ground Floor, CPED
Phone: 051-9047
Email: mona.waseem@uettaxila.edu.pk
Assessments
Homework (12%)
Quiz (13%)
Midterm (25%)
Final (50%)
Homework and Quiz
• Homework is very important. It is the best way for you to
learn the material.
• You can discuss the problems with your classmates, but all
work handed in should be original, written by you in
your own words.
• Homework should be handed in in class.
• 20% penalty for each day late.
• Most Probably Quiz will be announced a week
before BUT there will be NO Re-Take for Quiz
in any Case.
Textbook
Discrete Mathematics and Its Applications
by Kenneth H. Rosen, 7th Edition
Reference Book (1)
Discrete Mathematics
by Richard Johnsonbaugh
7th or 8th Edition
Reference Book (2)
Discrete Mathematics
by Edgar Goodaire and Michael Parmenter
3rd Edition.
Course Learning Outcome (CLO’s)
S. No. Course Learning Outcome (CLO’s)
Bloom’s
Learning
Level
1.
Recall the basic concepts of logic and proofs, set theory,
relations in functions and complexity of algorithms.
C1, PLO-1
2.
Demonstrate the fundamental concepts of counting, graphs,
trees, and Mathematical Induction.
C2, PLO-1
3.
Confidently apply the knowledge learnt to solve
mathematical problems in computer science and engineering
disciplines.
C3, PLO-2
Learning Levels (LL): Knowledge (LL1), Comprehension (LL2), Application
(LL3), Analysis (LL4), Synthesis (LL5), Evaluation (LL6)
Overview of this Lecture
Course Administration
What is MA-210 about?
Course Themes, Goals, and Syllabus
Continuous vs. Discrete Math
Why is it computer science/engineering?
Mathematical techniques for DM
What is MA-210 about?
What Are Discrete Structures?
Discrete math is mathematics that deals with discrete objects:
• Discrete Objects are those which are separated from (distinct from)
each other, such as integers, rational numbers, houses, people, etc.
Real numbers are not discrete.
• In this course, we’ll be concerned with objects such as integers,
propositions, sets, relations and functions, which are all discrete.
• We’ll learn concepts associated with them, their properties, and
relationships among them.
Discrete structures are:
– Theoretical basis of computer science
– A mathematical foundation that makes you think logically
– A prerequisite course to understand the fundamentals of programming
Discrete vs. Continuous Mathematics
Continuous Mathematics
It considers objects that vary continuously;
Example: analog wristwatch (separate hour, minute, and second hands).
From an analog watch perspective, between 1 :25 p.m. and 1 :26 p.m.
there are infinitely many possible different times as the second hand moves
around the watch face.
Real-number system --- core of continuous mathematics;
Continuous mathematics --- models and tools for analyzing real-world
phenomena that change smoothly over time. (Differential equations etc.)
Discrete vs. Continuous Mathematics
Discrete Mathematics
It considers objects that vary in a discrete way.
Example: digital wristwatch.
On a digital watch, there are only finitely many possible different times
between 1 :25 P.m. and 1:27 P.m. A digital watch does not show split
seconds: no time between 1 :25:03 and 1 :25:04. The watch moves from one
time to the next.
Integers --- core of discrete mathematics
Discrete mathematics --- models and tools for analyzing real-world
phenomena that change discretely over time and therefore ideal for studying
computer science – computers are digital! (numbers as finite bit strings; data
structures, all discrete! Historical aside: earliest computers were analogue.)
Discrete vs Continuous
Why is it computer science/engineering?
(examples)
What is MA-210 about?
• Computers use discrete structures to represent
and manipulate data.
• is the basic building block for becoming a
Computer Scientist
• Computer Science is not Programming
• Computer Science is not Software Engineering
• Edsger Dijkstra: “Computer Science is no more
about computers than Astronomy is about
telescopes.”
• Computer Science is about problem solving.
Why Discrete Mathematics? (I)
• Mathematics is at the heart of problem solving
• Defining a problem requires mathematical rigor
• Use and analysis of models, data structures,
algorithms requires a solid foundation of
mathematics
• To justify why a particular way of solving a
problem is correct or efficient (i.e., better than
another way) requires analysis with a well-
defined mathematical model.
Why Discrete Mathematics? (II)
• Your boss is not going to ask you to solve
– an MST (Minimal Spanning Tree) or
– a TSP (Travelling Salesperson Problem)
• Rarely will you encounter a problem in an
abstract setting
• However, he/she may ask you to build a rotation
of the company’s delivery trucks to minimize
fuel usage
• It is up to you to determine
– a proper model for representing the problem and
– a correct or efficient algorithm for solving it
Problem Solving requires mathematical rigor
(Accuracy, Objectivity)
Discrete Mathematics in the Real
World
21
 Computers run software and store files.
 The software/files both stored as huge strings of 1s and 0s.
 Binary math is discrete mathematics.
22
23
24
Number Theory:
RSA and Public-key Cryptography
Alice and Bob have never met but they would like to
exchange a message. Eve would like to eavesdrop.
They could come up with a good
encryption algorithm and exchange the
encryption key – but how to do it without
Eve getting it? (If Eve gets it, all security
is lost.)
CS folks found the solution:
public key encryption. Quite remarkable that is feasible.
E.g. between you and the Bank of America.
Number Theory:
Public Key Encryption
RSA – Public Key Cryptosystem (why RSA?)
Uses modular arithmetic and large primes  Its security comes from the computational difficulty
of factoring large numbers.
RSA Approach
• Encode:
• C = Me (mod n)
• M is the plaintext; C is ciphertext
• n = pq with p and q large primes (e.g. 200 digits long!)
• e is relative prime to (p-1)(q-1)
• Decode:
• Cd = M (mod pq)
• d is inverse of e modulo (p-1)(q-1)
The process of encrypting and decrypting a message
correctly results in the original message (and it’s fast!)
Hmm??
What does this all mean??
How does this actually work?
Not to worry. We’ll find out.
Online Shopping
 Encryption and decryption are part of
cryptography, which is part of discrete
mathematics. For example, secure internet
shopping uses public-key cryptography.
28
Analog Clock
 An Analog Clock has gears inside, and the sizes/teeth
needed for correct timekeeping are determined using
discrete math of modular arithmetic.
29
Dijkstra’s Algorithm and Google Maps
 Google Maps uses discrete mathematics to
determine fastest driving routes and times.
30
Railway Planning
 Railway planning uses discrete math: deciding how to
expand train rail lines, train timetable scheduling, and
scheduling crews and equipment for train trips use
both graph theory and linear algebra.
31
32
Computer Graphics
 Computer graphics (such as in video games) use linear
algebra in order to transform (move, scale, change
perspective) objects. That's true for both applications
like game development, and for operating systems.
33
Smarter Phones for All
 Cell Phone Communications: Making efficient use of the
broadcast spectrum for mobile phones uses linear
algebra and information theory. Assigning frequencies
so that there is no interference with nearby phones can
use graph theory or can use discrete optimization.
34
Graphs and Networks
Many problems can be
represented by a graphical network
representation.
•Examples:
– Distribution problems
– Routing problems
– Maximum flow problems
– Designing computer / phone / road networks
– Equipment replacement
– And of course the Internet
Aside: finding the right
problem representation
is one of the key issues
in this course.
Sub-Category Graph
No Threshold
New Science of Networks
NYS Electric
Power Grid
(Thorp,Strogatz,Watts)
Cyber communities
(Automatically discovered)
Kleinberg et al
Network of computer scientists
ReferralWeb System
(Kautz and Selman)
Neural network of the
nematode worm C- elegans
(Strogatz, Watts)
Networks are
pervasive
Utility Patent network
1972-1999
(3 Million patents)
Gomes,Hopcroft,Lesser,Selman
Applications of Networks
Applications
Physical analog
of nodes
Physical analog
of arcs
Flow
Communication
systems
phone exchanges,
computers,
transmission
facilities, satellites
Cables, fiber optic
links, microwave
relay links
Voice messages,
Data,
Video transmissions
Hydraulic systems
Pumping stations
Reservoirs, Lakes
Pipelines
Water, Gas, Oil,
Hydraulic fluids
Integrated
computer circuits
Gates, registers,
processors
Wires Electrical current
Mechanical systems Joints
Rods, Beams,
Springs
Heat, Energy
Transportation
systems
Intersections,
Airports,
Rail yards
Highways,
Airline routes
Railbeds
Passengers,
freight,
vehicles,
operators
Finding Friends on Facebook
 Graph theory can be used in speeding up Facebook
performance.
39
DNA Fragment Assembly
 Graph theory is used in DNA sequencing.
40
Applications Of Discrete Structures
Algorithms can be used in searching for a letter or number in the list.
The study of these sorting algorithms often involves analyzing their time
complexity, space complexity, and other performance characteristics
using discrete mathematics concepts.
Applications Of Discrete Structures
 Set theory can be used to determine number of students enrolled in
discrete structures and number of students enrolled in applied
physics in this semester.
Learning Discrete Mathematics make you
a better Programmer?
 One of the most important competences – that one must
have; as a program developer is to be able to choose the right
algorithms and data structures for the problem that the
program is supposed to solve.
 The importance of discrete mathematics lies in its central role
in the analysis of algorithms and in the fact that many
common data structures – and in particular graphs, trees, sets
and ordered sets – and their associated algorithms come from
the domain of discrete mathematics.
43
Logic and Proofs
 Programmers use logic. All the time. While everyone
has to think about the solution, a formal study of
logical thinking helps you organize your thought
process more efficiently.
44
Logic:
Hardware and software specifications
One-bit Full Adder with
Carry-In and Carry-Out
4-bit full adder
Example 2: System Specification:
–The router can send packets to the edge system only if it supports the new address space.
–For the router to support the new address space it’s necessary that the latest software release be installed.
–The router can send packets to the edge system if the latest software release is installed.
–The router does not support the new address space.
Example 1: Adder
How to write these specifications in a formal way? Use Logic.
Formal: Input_wire_A
value in {0, 1}
Propositional Logic
 System specifications demonstrate the requirements of
a system. These requirements are stated in English
sentences which can be ambiguous. Therefore,
translating these English requirements into logical
expressions removes the ambiguity and check for the
consistency of specifications.
 Compound propositions and quantifiers can be used to
express the specifications and then find an assignment
of truth values that make all the specifications true.
Why Proofs?
 Why proofs? The analysis of an algorithm requires
one to carry out (or at the very least be able to
sketch) a proof of the correctness of the algorithm
and a proof of its complexity
47
Moral of the Story???
 Discrete Math is needed to see mathematical
structures in the object you work with, and
understand their properties. This ability is important
for computer/software engineers, data scientists,
security and financial analysts.
 it is not a coincidence that math puzzles are often
used for interviews.
48
Discrete Mathematics is a Gateway
Course
 Topics in discrete mathematics will be important in
many courses that you will take in the future:
 Computer Science: Computer Architecture, Data
Structures, Algorithms, Programming Languages,
Compilers, Computer Security, Databases, Artificial
Intelligence, Networking, Graphics, Game Design, Theory
of Computation, Game Theory, Network Optimization ……
 Other Disciplines: You may find concepts learned here
useful in courses in philosophy, economics, linguistics,
and other departments.
52
Course Themes, Goals, and Course Outline
Goals of MA-210
Introduce students to a range of mathematical tools from discrete
mathematics that are key in computer science
Mathematical Sophistication
How to write statements rigorously
How to read and write theorems, lemmas, etc.
How to write rigorous proofs
Areas we will cover:
Logic and proofs
Set Theory
Number Theory
Counting and combinatorics
Practice works!
Actually, only practice works!
Note: Learning to do proofs from
watching the slides is like trying to
learn to play tennis from watching
it on TV! So, do exercises!
Tentative Topics MA-210
Logic and Methods of Proof
Propositional Logic --- SAT as an encoding language!
Predicates and Quantifiers
Methods of Proofs
Number Theory
Modular arithmetic
RSA cryptosystems
Sets
Sets and Set operations
Functions
Counting
Basics of counting
Pigeonhole principle
Permutations and Combinations
Topics MA-210
Graphs and Trees
Graph terminology
Example of graph problems and algorithms:
graph coloring
TSP
shortest path
Min. spanning tree
Bart Selman
CS2800
What’s your job?
• Build a mathematical model for each scenario
• Develop an algorithm for solving each task
• Prove that your solutions work
– Termination: Prove that your algorithms terminate
– Completeness: Prove that your algorithms find a
solution when there is one.
– Soundness: Prove that the solution of your algorithms is
always correct
– Optimality (of the solution): Prove that your algorithms
find the best solution (i.e., maximize profit)
– Efficiency, time & space complexity: Prove that your
algorithms finish before the end of life on earth
Bart Selman
CS2800
Discrete Structures
Logic
Bart Selman
CS2800
Logic
• Logic, is the study of reasoning and making
sense of things in a systematic and clear way.
• It helps us figure out if our ideas and
arguments make sense, and it provides a
way to think through problems and come to
reliable conclusions.
• Logic is like having a set of steps to follow to
make good decisions and understand things
better.
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Activity
Which of these sentences are propositions? What are the
truth values of those that are propositions?
• Boston is the capital of Massachusetts.
• Miami is the capital of Florida.
• 2+3=5
• x+7=10
Answer this question
Bart Selman
CS2800
Answers
1. Boston is the capital of Massachusetts.
1. Proposition: Yes
2. Truth Value: True
2. Miami is the capital of Florida.
1. Proposition: Yes
2. Truth Value: False (Miami is not the capital of Florida; it is
Tallahassee)
3. 2 + 3 = 5.
1. Proposition: Yes
2. Truth Value: True (mathematically correct)
4. x + 7 = 10.
1. Not a Proposition (contains a variable; its truth depends on the
value of x)
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Activity
What is the negation of these propositions
• Mei has an MP3 player.
• There is no pollution.
• 2+1=3
• The summer in Maine is hot and sunny.
Bart Selman
CS2800
Answers
1. Mei has an MP3 player:
1. Negation: Mei does not have an MP3 player.
2. Symbolically: ¬p
2. There is no pollution:
1. Negation: There is pollution.
2. Symbolically: ¬q
3. 2+1=3:
1. Negation: 2+1 is not equal to 3.
2. Symbolically: ¬(2+1=3)
4. The summer in Maine is hot and sunny:
1. Negation: The summer in Maine is not hot and sunny (it could be
cold or not sunny).
2. Symbolically: ¬(p∧q)
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Activity
Let p and be the propositions
p: It is below freezing
q: It is snowing
Write these propositions using p and q and logical
connectives
a) It is below freezing and snowing
b) It is below freezing but not snowing
c) It is not below freezing and it is not snowing
d) It is either snowing or below freezing(or both)
Bart Selman
CS2800
Answers
a. It is below freezing and snowing:
p∧q
b. It is below freezing but not snowing:
p∧¬q
c. It is not below freezing and it is not
snowing:
¬p∧¬q
d. It is either snowing or below freezing (or
both):
p∨q
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Activity
Let p and be the propositions
p: It is below freezing
q: It is snowing
Write these propositions using p and q and logical
connectives
a) If it is below freezing, then it is snowing.
b) It is snowing whenever it is below freezing.
c) That it is below freezing is necessary and sufficient for it to be
snowing
Bart Selman
CS2800
Activity
Let p and be the propositions
p: It is below freezing
q: It is snowing
Write these propositions using p and q and logical
connectives
a) If it is below freezing, then it is snowing.
p→q
b) It is snowing whenever it is below freezing.
p→q
c) That it is below freezing is necessary and sufficient for it to be
snowing
p↔q
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Bart Selman
CS2800
Construct a truth table for each of these compound
propositions
• p ∧ ¬p
• p v ¬p
• p ⊕ (p v q)
• (p v q) → (p ∧ q)
• p ⊕ ¬ q
Activity
Bart Selman
CS2800
The end

More Related Content

Similar to DS Lecture-1 about discrete structure .ppt

492 final presentation
492 final presentation492 final presentation
492 final presentation
MaheshWosti
 
rsec2a-2016-jheaton-morning
rsec2a-2016-jheaton-morningrsec2a-2016-jheaton-morning
rsec2a-2016-jheaton-morningJeff Heaton
 
Algorithm & data structures lec1
Algorithm & data structures lec1Algorithm & data structures lec1
Algorithm & data structures lec1Abdul Khan
 
L0.ppt
L0.pptL0.ppt
L0.ppt
lilywatermen
 
Ml ppt at
Ml ppt atMl ppt at
Ml ppt at
pradeep kumar
 
CS3114_09212011.ppt
CS3114_09212011.pptCS3114_09212011.ppt
CS3114_09212011.ppt
Arumugam90
 
Discrete Mathematics Cse131
Discrete Mathematics Cse131Discrete Mathematics Cse131
Discrete Mathematics Cse131
ashikul akash
 
Application of discrete mathematics in IT
Application of discrete mathematics in ITApplication of discrete mathematics in IT
Application of discrete mathematics in IT
ShahidAbbas52
 
MLlecture1.ppt
MLlecture1.pptMLlecture1.ppt
MLlecture1.pptbutest
 
MLlecture1.ppt
MLlecture1.pptMLlecture1.ppt
MLlecture1.pptbutest
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
Aun Akbar
 
lec1.ppt
lec1.pptlec1.ppt
lec1.ppt
SVasuKrishna1
 
Multimodal Learning Analytics
Multimodal Learning AnalyticsMultimodal Learning Analytics
Multimodal Learning Analytics
Xavier Ochoa
 
PPT slides - MACHINE PERCEPTION LABORATORY
PPT slides - MACHINE PERCEPTION LABORATORYPPT slides - MACHINE PERCEPTION LABORATORY
PPT slides - MACHINE PERCEPTION LABORATORYbutest
 
introduction.pdf
introduction.pdfintroduction.pdf
introduction.pdf
rafayqadeer2
 
Lecture 1
Lecture 1Lecture 1
Lecture 1Mr SMAK
 
Matrix_Profile_Tutorial_Part1.pdf
Matrix_Profile_Tutorial_Part1.pdfMatrix_Profile_Tutorial_Part1.pdf
Matrix_Profile_Tutorial_Part1.pdf
Andrea496281
 
Design and analysis of computer algorithms
Design and analysis of computer algorithmsDesign and analysis of computer algorithms
Design and analysis of computer algorithms Krishna Chaytaniah
 
Computational Thinking in the Workforce and Next Generation Science Standards...
Computational Thinking in the Workforce and Next Generation Science Standards...Computational Thinking in the Workforce and Next Generation Science Standards...
Computational Thinking in the Workforce and Next Generation Science Standards...
Josh Sheldon
 

Similar to DS Lecture-1 about discrete structure .ppt (20)

492 final presentation
492 final presentation492 final presentation
492 final presentation
 
rsec2a-2016-jheaton-morning
rsec2a-2016-jheaton-morningrsec2a-2016-jheaton-morning
rsec2a-2016-jheaton-morning
 
Algorithm & data structures lec1
Algorithm & data structures lec1Algorithm & data structures lec1
Algorithm & data structures lec1
 
L0.ppt
L0.pptL0.ppt
L0.ppt
 
Ml ppt at
Ml ppt atMl ppt at
Ml ppt at
 
CS3114_09212011.ppt
CS3114_09212011.pptCS3114_09212011.ppt
CS3114_09212011.ppt
 
Discrete Mathematics Cse131
Discrete Mathematics Cse131Discrete Mathematics Cse131
Discrete Mathematics Cse131
 
Application of discrete mathematics in IT
Application of discrete mathematics in ITApplication of discrete mathematics in IT
Application of discrete mathematics in IT
 
MLlecture1.ppt
MLlecture1.pptMLlecture1.ppt
MLlecture1.ppt
 
MLlecture1.ppt
MLlecture1.pptMLlecture1.ppt
MLlecture1.ppt
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
lec1.ppt
lec1.pptlec1.ppt
lec1.ppt
 
Multimodal Learning Analytics
Multimodal Learning AnalyticsMultimodal Learning Analytics
Multimodal Learning Analytics
 
PPT slides - MACHINE PERCEPTION LABORATORY
PPT slides - MACHINE PERCEPTION LABORATORYPPT slides - MACHINE PERCEPTION LABORATORY
PPT slides - MACHINE PERCEPTION LABORATORY
 
Gate
GateGate
Gate
 
introduction.pdf
introduction.pdfintroduction.pdf
introduction.pdf
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Matrix_Profile_Tutorial_Part1.pdf
Matrix_Profile_Tutorial_Part1.pdfMatrix_Profile_Tutorial_Part1.pdf
Matrix_Profile_Tutorial_Part1.pdf
 
Design and analysis of computer algorithms
Design and analysis of computer algorithmsDesign and analysis of computer algorithms
Design and analysis of computer algorithms
 
Computational Thinking in the Workforce and Next Generation Science Standards...
Computational Thinking in the Workforce and Next Generation Science Standards...Computational Thinking in the Workforce and Next Generation Science Standards...
Computational Thinking in the Workforce and Next Generation Science Standards...
 

Recently uploaded

Using PDB Relocation to Move a Single PDB to Another Existing CDB
Using PDB Relocation to Move a Single PDB to Another Existing CDBUsing PDB Relocation to Move a Single PDB to Another Existing CDB
Using PDB Relocation to Move a Single PDB to Another Existing CDB
Alireza Kamrani
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
enxupq
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization Sample
James Polillo
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
nscud
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Boston Institute of Analytics
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
ewymefz
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
ukgaet
 
How can I successfully sell my pi coins in Philippines?
How can I successfully sell my pi coins in Philippines?How can I successfully sell my pi coins in Philippines?
How can I successfully sell my pi coins in Philippines?
DOT TECH
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Subhajit Sahu
 
Business update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMIBusiness update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMI
AlejandraGmez176757
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
ewymefz
 
Computer Presentation.pptx ecommerce advantage s
Computer Presentation.pptx ecommerce advantage sComputer Presentation.pptx ecommerce advantage s
Computer Presentation.pptx ecommerce advantage s
MAQIB18
 
tapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive datatapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive data
theahmadsaood
 
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
elinavihriala
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
yhkoc
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
enxupq
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
Uber Ride Supply Demand Gap Analysis Report
Uber Ride Supply Demand Gap Analysis ReportUber Ride Supply Demand Gap Analysis Report
Uber Ride Supply Demand Gap Analysis Report
SatyamNeelmani2
 

Recently uploaded (20)

Using PDB Relocation to Move a Single PDB to Another Existing CDB
Using PDB Relocation to Move a Single PDB to Another Existing CDBUsing PDB Relocation to Move a Single PDB to Another Existing CDB
Using PDB Relocation to Move a Single PDB to Another Existing CDB
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization Sample
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
 
How can I successfully sell my pi coins in Philippines?
How can I successfully sell my pi coins in Philippines?How can I successfully sell my pi coins in Philippines?
How can I successfully sell my pi coins in Philippines?
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
 
Business update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMIBusiness update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMI
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
 
Computer Presentation.pptx ecommerce advantage s
Computer Presentation.pptx ecommerce advantage sComputer Presentation.pptx ecommerce advantage s
Computer Presentation.pptx ecommerce advantage s
 
tapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive datatapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive data
 
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
Uber Ride Supply Demand Gap Analysis Report
Uber Ride Supply Demand Gap Analysis ReportUber Ride Supply Demand Gap Analysis Report
Uber Ride Supply Demand Gap Analysis Report
 

DS Lecture-1 about discrete structure .ppt

  • 1. MA - 210 Discrete Structures Introduction Lecture-1
  • 2. Overview of this Lecture • Course Administration • What is it about? • Course Themes, Goals, and Syllabus • Propositional logic
  • 4. Timings Lecture Hours: Monday (α ): 12:00 PM – 03:00 PM Tuesday (Ω): 12:00 PM – 03:00 PM Location: Class Room 5 Lecturer: Mona Waseem Office: Faculty Office (Room-10), Ground Floor, CPED Phone: 051-9047 Email: mona.waseem@uettaxila.edu.pk
  • 6. Homework and Quiz • Homework is very important. It is the best way for you to learn the material. • You can discuss the problems with your classmates, but all work handed in should be original, written by you in your own words. • Homework should be handed in in class. • 20% penalty for each day late. • Most Probably Quiz will be announced a week before BUT there will be NO Re-Take for Quiz in any Case.
  • 7. Textbook Discrete Mathematics and Its Applications by Kenneth H. Rosen, 7th Edition
  • 8. Reference Book (1) Discrete Mathematics by Richard Johnsonbaugh 7th or 8th Edition
  • 9. Reference Book (2) Discrete Mathematics by Edgar Goodaire and Michael Parmenter 3rd Edition.
  • 10. Course Learning Outcome (CLO’s) S. No. Course Learning Outcome (CLO’s) Bloom’s Learning Level 1. Recall the basic concepts of logic and proofs, set theory, relations in functions and complexity of algorithms. C1, PLO-1 2. Demonstrate the fundamental concepts of counting, graphs, trees, and Mathematical Induction. C2, PLO-1 3. Confidently apply the knowledge learnt to solve mathematical problems in computer science and engineering disciplines. C3, PLO-2 Learning Levels (LL): Knowledge (LL1), Comprehension (LL2), Application (LL3), Analysis (LL4), Synthesis (LL5), Evaluation (LL6)
  • 11. Overview of this Lecture Course Administration What is MA-210 about? Course Themes, Goals, and Syllabus
  • 12. Continuous vs. Discrete Math Why is it computer science/engineering? Mathematical techniques for DM What is MA-210 about?
  • 13. What Are Discrete Structures? Discrete math is mathematics that deals with discrete objects: • Discrete Objects are those which are separated from (distinct from) each other, such as integers, rational numbers, houses, people, etc. Real numbers are not discrete. • In this course, we’ll be concerned with objects such as integers, propositions, sets, relations and functions, which are all discrete. • We’ll learn concepts associated with them, their properties, and relationships among them. Discrete structures are: – Theoretical basis of computer science – A mathematical foundation that makes you think logically – A prerequisite course to understand the fundamentals of programming
  • 14. Discrete vs. Continuous Mathematics Continuous Mathematics It considers objects that vary continuously; Example: analog wristwatch (separate hour, minute, and second hands). From an analog watch perspective, between 1 :25 p.m. and 1 :26 p.m. there are infinitely many possible different times as the second hand moves around the watch face. Real-number system --- core of continuous mathematics; Continuous mathematics --- models and tools for analyzing real-world phenomena that change smoothly over time. (Differential equations etc.)
  • 15. Discrete vs. Continuous Mathematics Discrete Mathematics It considers objects that vary in a discrete way. Example: digital wristwatch. On a digital watch, there are only finitely many possible different times between 1 :25 P.m. and 1:27 P.m. A digital watch does not show split seconds: no time between 1 :25:03 and 1 :25:04. The watch moves from one time to the next. Integers --- core of discrete mathematics Discrete mathematics --- models and tools for analyzing real-world phenomena that change discretely over time and therefore ideal for studying computer science – computers are digital! (numbers as finite bit strings; data structures, all discrete! Historical aside: earliest computers were analogue.)
  • 17. Why is it computer science/engineering? (examples) What is MA-210 about?
  • 18. • Computers use discrete structures to represent and manipulate data. • is the basic building block for becoming a Computer Scientist • Computer Science is not Programming • Computer Science is not Software Engineering • Edsger Dijkstra: “Computer Science is no more about computers than Astronomy is about telescopes.” • Computer Science is about problem solving. Why Discrete Mathematics? (I)
  • 19. • Mathematics is at the heart of problem solving • Defining a problem requires mathematical rigor • Use and analysis of models, data structures, algorithms requires a solid foundation of mathematics • To justify why a particular way of solving a problem is correct or efficient (i.e., better than another way) requires analysis with a well- defined mathematical model. Why Discrete Mathematics? (II)
  • 20. • Your boss is not going to ask you to solve – an MST (Minimal Spanning Tree) or – a TSP (Travelling Salesperson Problem) • Rarely will you encounter a problem in an abstract setting • However, he/she may ask you to build a rotation of the company’s delivery trucks to minimize fuel usage • It is up to you to determine – a proper model for representing the problem and – a correct or efficient algorithm for solving it Problem Solving requires mathematical rigor (Accuracy, Objectivity)
  • 21. Discrete Mathematics in the Real World 21
  • 22.  Computers run software and store files.  The software/files both stored as huge strings of 1s and 0s.  Binary math is discrete mathematics. 22
  • 23. 23
  • 24. 24
  • 25. Number Theory: RSA and Public-key Cryptography Alice and Bob have never met but they would like to exchange a message. Eve would like to eavesdrop. They could come up with a good encryption algorithm and exchange the encryption key – but how to do it without Eve getting it? (If Eve gets it, all security is lost.) CS folks found the solution: public key encryption. Quite remarkable that is feasible. E.g. between you and the Bank of America.
  • 26. Number Theory: Public Key Encryption RSA – Public Key Cryptosystem (why RSA?) Uses modular arithmetic and large primes  Its security comes from the computational difficulty of factoring large numbers.
  • 27. RSA Approach • Encode: • C = Me (mod n) • M is the plaintext; C is ciphertext • n = pq with p and q large primes (e.g. 200 digits long!) • e is relative prime to (p-1)(q-1) • Decode: • Cd = M (mod pq) • d is inverse of e modulo (p-1)(q-1) The process of encrypting and decrypting a message correctly results in the original message (and it’s fast!) Hmm?? What does this all mean?? How does this actually work? Not to worry. We’ll find out.
  • 28. Online Shopping  Encryption and decryption are part of cryptography, which is part of discrete mathematics. For example, secure internet shopping uses public-key cryptography. 28
  • 29. Analog Clock  An Analog Clock has gears inside, and the sizes/teeth needed for correct timekeeping are determined using discrete math of modular arithmetic. 29
  • 30. Dijkstra’s Algorithm and Google Maps  Google Maps uses discrete mathematics to determine fastest driving routes and times. 30
  • 31. Railway Planning  Railway planning uses discrete math: deciding how to expand train rail lines, train timetable scheduling, and scheduling crews and equipment for train trips use both graph theory and linear algebra. 31
  • 32. 32
  • 33. Computer Graphics  Computer graphics (such as in video games) use linear algebra in order to transform (move, scale, change perspective) objects. That's true for both applications like game development, and for operating systems. 33
  • 34. Smarter Phones for All  Cell Phone Communications: Making efficient use of the broadcast spectrum for mobile phones uses linear algebra and information theory. Assigning frequencies so that there is no interference with nearby phones can use graph theory or can use discrete optimization. 34
  • 35. Graphs and Networks Many problems can be represented by a graphical network representation. •Examples: – Distribution problems – Routing problems – Maximum flow problems – Designing computer / phone / road networks – Equipment replacement – And of course the Internet Aside: finding the right problem representation is one of the key issues in this course.
  • 36. Sub-Category Graph No Threshold New Science of Networks NYS Electric Power Grid (Thorp,Strogatz,Watts) Cyber communities (Automatically discovered) Kleinberg et al Network of computer scientists ReferralWeb System (Kautz and Selman) Neural network of the nematode worm C- elegans (Strogatz, Watts) Networks are pervasive Utility Patent network 1972-1999 (3 Million patents) Gomes,Hopcroft,Lesser,Selman
  • 37. Applications of Networks Applications Physical analog of nodes Physical analog of arcs Flow Communication systems phone exchanges, computers, transmission facilities, satellites Cables, fiber optic links, microwave relay links Voice messages, Data, Video transmissions Hydraulic systems Pumping stations Reservoirs, Lakes Pipelines Water, Gas, Oil, Hydraulic fluids Integrated computer circuits Gates, registers, processors Wires Electrical current Mechanical systems Joints Rods, Beams, Springs Heat, Energy Transportation systems Intersections, Airports, Rail yards Highways, Airline routes Railbeds Passengers, freight, vehicles, operators
  • 38. Finding Friends on Facebook  Graph theory can be used in speeding up Facebook performance. 39
  • 39. DNA Fragment Assembly  Graph theory is used in DNA sequencing. 40
  • 40. Applications Of Discrete Structures Algorithms can be used in searching for a letter or number in the list. The study of these sorting algorithms often involves analyzing their time complexity, space complexity, and other performance characteristics using discrete mathematics concepts.
  • 41. Applications Of Discrete Structures  Set theory can be used to determine number of students enrolled in discrete structures and number of students enrolled in applied physics in this semester.
  • 42. Learning Discrete Mathematics make you a better Programmer?  One of the most important competences – that one must have; as a program developer is to be able to choose the right algorithms and data structures for the problem that the program is supposed to solve.  The importance of discrete mathematics lies in its central role in the analysis of algorithms and in the fact that many common data structures – and in particular graphs, trees, sets and ordered sets – and their associated algorithms come from the domain of discrete mathematics. 43
  • 43. Logic and Proofs  Programmers use logic. All the time. While everyone has to think about the solution, a formal study of logical thinking helps you organize your thought process more efficiently. 44
  • 44. Logic: Hardware and software specifications One-bit Full Adder with Carry-In and Carry-Out 4-bit full adder Example 2: System Specification: –The router can send packets to the edge system only if it supports the new address space. –For the router to support the new address space it’s necessary that the latest software release be installed. –The router can send packets to the edge system if the latest software release is installed. –The router does not support the new address space. Example 1: Adder How to write these specifications in a formal way? Use Logic. Formal: Input_wire_A value in {0, 1}
  • 45. Propositional Logic  System specifications demonstrate the requirements of a system. These requirements are stated in English sentences which can be ambiguous. Therefore, translating these English requirements into logical expressions removes the ambiguity and check for the consistency of specifications.  Compound propositions and quantifiers can be used to express the specifications and then find an assignment of truth values that make all the specifications true.
  • 46. Why Proofs?  Why proofs? The analysis of an algorithm requires one to carry out (or at the very least be able to sketch) a proof of the correctness of the algorithm and a proof of its complexity 47
  • 47. Moral of the Story???  Discrete Math is needed to see mathematical structures in the object you work with, and understand their properties. This ability is important for computer/software engineers, data scientists, security and financial analysts.  it is not a coincidence that math puzzles are often used for interviews. 48
  • 48. Discrete Mathematics is a Gateway Course  Topics in discrete mathematics will be important in many courses that you will take in the future:  Computer Science: Computer Architecture, Data Structures, Algorithms, Programming Languages, Compilers, Computer Security, Databases, Artificial Intelligence, Networking, Graphics, Game Design, Theory of Computation, Game Theory, Network Optimization ……  Other Disciplines: You may find concepts learned here useful in courses in philosophy, economics, linguistics, and other departments. 52
  • 49. Course Themes, Goals, and Course Outline
  • 50. Goals of MA-210 Introduce students to a range of mathematical tools from discrete mathematics that are key in computer science Mathematical Sophistication How to write statements rigorously How to read and write theorems, lemmas, etc. How to write rigorous proofs Areas we will cover: Logic and proofs Set Theory Number Theory Counting and combinatorics Practice works! Actually, only practice works! Note: Learning to do proofs from watching the slides is like trying to learn to play tennis from watching it on TV! So, do exercises!
  • 51. Tentative Topics MA-210 Logic and Methods of Proof Propositional Logic --- SAT as an encoding language! Predicates and Quantifiers Methods of Proofs Number Theory Modular arithmetic RSA cryptosystems Sets Sets and Set operations Functions Counting Basics of counting Pigeonhole principle Permutations and Combinations
  • 52. Topics MA-210 Graphs and Trees Graph terminology Example of graph problems and algorithms: graph coloring TSP shortest path Min. spanning tree
  • 53. Bart Selman CS2800 What’s your job? • Build a mathematical model for each scenario • Develop an algorithm for solving each task • Prove that your solutions work – Termination: Prove that your algorithms terminate – Completeness: Prove that your algorithms find a solution when there is one. – Soundness: Prove that the solution of your algorithms is always correct – Optimality (of the solution): Prove that your algorithms find the best solution (i.e., maximize profit) – Efficiency, time & space complexity: Prove that your algorithms finish before the end of life on earth
  • 55. Bart Selman CS2800 Logic • Logic, is the study of reasoning and making sense of things in a systematic and clear way. • It helps us figure out if our ideas and arguments make sense, and it provides a way to think through problems and come to reliable conclusions. • Logic is like having a set of steps to follow to make good decisions and understand things better.
  • 58. Bart Selman CS2800 Activity Which of these sentences are propositions? What are the truth values of those that are propositions? • Boston is the capital of Massachusetts. • Miami is the capital of Florida. • 2+3=5 • x+7=10 Answer this question
  • 59. Bart Selman CS2800 Answers 1. Boston is the capital of Massachusetts. 1. Proposition: Yes 2. Truth Value: True 2. Miami is the capital of Florida. 1. Proposition: Yes 2. Truth Value: False (Miami is not the capital of Florida; it is Tallahassee) 3. 2 + 3 = 5. 1. Proposition: Yes 2. Truth Value: True (mathematically correct) 4. x + 7 = 10. 1. Not a Proposition (contains a variable; its truth depends on the value of x)
  • 65. Bart Selman CS2800 Activity What is the negation of these propositions • Mei has an MP3 player. • There is no pollution. • 2+1=3 • The summer in Maine is hot and sunny.
  • 66. Bart Selman CS2800 Answers 1. Mei has an MP3 player: 1. Negation: Mei does not have an MP3 player. 2. Symbolically: ¬p 2. There is no pollution: 1. Negation: There is pollution. 2. Symbolically: ¬q 3. 2+1=3: 1. Negation: 2+1 is not equal to 3. 2. Symbolically: ¬(2+1=3) 4. The summer in Maine is hot and sunny: 1. Negation: The summer in Maine is not hot and sunny (it could be cold or not sunny). 2. Symbolically: ¬(p∧q)
  • 72. Bart Selman CS2800 Activity Let p and be the propositions p: It is below freezing q: It is snowing Write these propositions using p and q and logical connectives a) It is below freezing and snowing b) It is below freezing but not snowing c) It is not below freezing and it is not snowing d) It is either snowing or below freezing(or both)
  • 73. Bart Selman CS2800 Answers a. It is below freezing and snowing: p∧q b. It is below freezing but not snowing: p∧¬q c. It is not below freezing and it is not snowing: ¬p∧¬q d. It is either snowing or below freezing (or both): p∨q
  • 83. Bart Selman CS2800 Activity Let p and be the propositions p: It is below freezing q: It is snowing Write these propositions using p and q and logical connectives a) If it is below freezing, then it is snowing. b) It is snowing whenever it is below freezing. c) That it is below freezing is necessary and sufficient for it to be snowing
  • 84. Bart Selman CS2800 Activity Let p and be the propositions p: It is below freezing q: It is snowing Write these propositions using p and q and logical connectives a) If it is below freezing, then it is snowing. p→q b) It is snowing whenever it is below freezing. p→q c) That it is below freezing is necessary and sufficient for it to be snowing p↔q
  • 92. Bart Selman CS2800 Construct a truth table for each of these compound propositions • p ∧ ¬p • p v ¬p • p ⊕ (p v q) • (p v q) → (p ∧ q) • p ⊕ ¬ q Activity

Editor's Notes

  1. Analog Computers: Characteristics: Analog computers use continuously varying physical quantities, such as electrical voltages or mechanical rotations, to represent and manipulate data. Applications: Analog computers were often used for specific scientific and engineering calculations, simulations, and control systems. Examples: Differential analyzers and slide rules were early examples of analog computing devices.
  2. http://www.mathily.org/dm-rw.html#:~:text=Google%20Maps%20uses%20discrete%20mathematics%20to%20determine%20fastest%20driving%20routes%20and%20times.&text=An%20analog%20clock%20has%20gears,minimum%2Dweight%20spanning%20tree%20problem.
  3. One solution is for Alice and Bob to exchange a digital key, so they both know it, but it's otherwise secret. Alice uses this key to encrypt messages she sends, and Bob reconstructs the original messages by decrypting with the same key. The encrypted messages (ciphertexts) are useless to Eve, who doesn't know the key, and so can't reconstruct the original messages. With a good encryption algorithm, this scheme can work well, but exchanging the key while keeping it secret from Eve is a problem. This really requires a face to face meeting, which is not always practical.
  4. Public key encryption is different, because it splits the key up into a public key for encryption and a secret key for decrpytion. It's not possible to determine the secret key from the public key. In the diagram, Bob generates a pair of keys and tells everybody (including Eve) his public key, while only he knows his secret key. Anyone can use Bob's public key to send him an encrypted message, but only Bob knows the secret key to decrypt it. This scheme allows Alice and Bob to communicate in secret without having to meet. RSA rivest, shamir and adleman
  5. Number theory, one important part of discrete math, allows cryptographers to create and break numerical passwords. Cryptographers must first have a solid background in number theory to show they can provide secure passwords and encryption methods.
  6. https://ima.org.uk/779/internet-shopping-stopping-the-scammers/
  7. http://www.ams.org/publicoutreach/feature-column/fcarc-stern-brocot
  8. https://www.vice.com/en_us/article/4x3pp9/the-simple-elegant-algorithm-that-makes-google-maps-possible There are three major shortest path algorithms: Bellman Ford’s Algorithm, Dijkstra’s Algorithm, and Floyd–Warshall’s Algorithm.
  9. https://ima.org.uk/3414/right-track-optimisation-models-railway-planning/
  10. https://metalbyexample.com/linear-algebra/ https://gamedevelopment.tutsplus.com/tutorials/lets-build-a-3d-graphics-engine-linear-transformations--gamedev-7716
  11. https://ima.org.uk/640/smarter-phones-for-all/ MIMO Systems, Claude Shannon (use a code with some redundancy), Turbo Codes (use pairs of encoders and decoders to boost transmission speeds)
  12. Networked or linked structures are ubiquitous. Examples range from the World Wide Web, large social networks such as the network of board of directors or the network of Hollywood actors, the distribution network of Wal-Mart, the power grid of the US, or even the neurological network of our brain. August 96 - Major power outage that affected the entire west coast of the US from Alaska to California for over 24 hours. This power outage was caused by a single transmission line, That was knowcked down by a tree. More interestingly, the accident Was detected right away and as standard procedure the load of the line Was transferred to the other lines of the set; but they were already overloaded And the extra overload caused the lines to heat up stretch. Well, this was a hot Summer, the trees had grown dramatically and a few lines were knocked down, Causing the domino effect that brought down the entire power grid of The west coast of the US. How did it happened? Key issues: How can we design more robust netwroks? How does disease spread in a ntewrokd of people Graphs that occur in many biological, social, and man-made systems Are often neither completely regular nor completely random – Instead they have a small world topology  nodes are highly clustered And yet the path length between them is small
  13. http://www.ams.org/publicoutreach/mathmoments/mm99-facebook-podcast Facebook has over 700 million users with almost 70 billion connections.
  14. graphs, trees, and strings. DNA sequencing involves determining the order of nucleotides (adenine, thymine, cytosine, and guanine) Graph theory is often employed to model relationships between DNA fragments, helping to identify overlaps and assemble the entire sequence. String matching algorithms, a part of discrete mathematics, are used to find patterns or matches within these sequences.
  15. Bubble Sort: Bubble Sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. The pass through the list is repeated until the list is sorted. The algorithm gets its name because smaller elements "bubble" to the top of the list. Insertion Sort: This algorithm builds the sorted list one element at a time by repeatedly taking elements from the unsorted part and inserting them into their correct position in the sorted part. Selection Sort: This algorithm divides the list into two parts: a sorted and an unsorted region. It repeatedly selects the smallest (or largest) element from the unsorted region and moves it to the sorted region. Merge Sort: Merge Sort is a divide-and-conquer algorithm that divides the list into two halves, recursively sorts each half, and then merges the two sorted halves. Quick Sort: Quick Sort is another divide-and-conquer algorithm that selects a "pivot" element from the array and partitions the other elements into two sub-arrays according to whether they are less than or greater than the pivot. The sub-arrays are then sorted recursively.
  16. Logic gates or circuits are electronic devices that implement Boolean functions, i.e. it does a logic operation on one or more bits of input and gives a bit as an output. The relationship between the input and output is based on a certain propositional logic.
  17. magine you have two friends, Alice and Bob, and you know two things about them: Alice always brings her umbrella when it's raining. Bob only brings his umbrella when it's windy. Now, you wake up in the morning and see that it's raining, but you don't know if it's windy. If you apply logic: Since Alice always brings her umbrella when it's raining, she'll bring it today. Bob, however, only brings his umbrella when it's windy, so you can't be sure if he'll bring it or not. So, based on logic, you can conclude that Alice will bring her umbrella, but you're not sure about Bob because you don't know if it's windy. In this example, logic helps you make reasonable predictions and decisions based on what you know about your friends' habits. It's about using clear and sensible thinking to understand and navigate the world around you.
  18. A propositional statement is a declarative statement that makes a clear assertion or expresses a fact that can be either true or false, but not both. It provides a straightforward, definite piece of information. Here are a few examples of propositional statements: "The sky is blue." (This statement is either true or false.) "2 + 2 equals 4." (This statement is either true or false.) "It is raining outside." (This statement is either true or false.) In each case, the statement is making a clear declaration or assertion, and we can evaluate its truth value. Propositonal statements are fundamental elements in logic and form the basis for reasoning and logical analysis.
  19. Example for OR (||): Sentence: "You can choose either tea or coffee for your beverage." Explanation: In this case, the person can choose either tea or coffee, or even both. The use of "or" implies that either option, or both options, is acceptable. Example for XOR (^): Sentence: "You can either take the bus xor ride your bike to school." Explanation: Here, the use of "xor" (exclusive or) indicates that the person has to choose one option but not both. It's either taking the bus or riding a bike, but not a combination of both.
  20. That it is below freezing is necessary and sufficient for it to be snowing: p↔q