Topics to be Covered
Orders of Growth (Briefly)
Big Oh Notation
Omega Notation
Theta Notation
Master Theorem
Divide-and-Conquer Recurrence Relations
1
Orders of Growth
Complexity: the amount of time a
Topics to be Covered
Master Theorem
General Case
1
Master Theorem Example
3
Solve the following problem using Master Theorem:
T(n) = 2T(n/2) + n log n
Solution
Consider the recurrence:
T(n) = aT(n/b)
Topics to be covered
Pigeonhole Principle
Fibonacci Numbers
Pigeonhole Principle
The Pigeonhole Principle
is
also known as
Dirichlet
Shoe
Drawer Principle
Box Principle
2
Pigeonhole Principle
The Pi
Topics to be covered
Basics of Counting
Tree Diagrams
Lexicographic Order
Tree Diagrams
Counting problems can be solved using Tree
Diagrams.
[A tree consists of a root, and a number of
branches leav
Topics to be Covered
Master Theorem
General Case
1
Master Theorem - Recall
A Generic Recursion Tree
Determining the final T(n)
Summing the expressions (internal nodes and
leaves), we have
log b n 1
T
Topics to be Covered
Sample space and events
Finite probability spaces
Conditional Probability
Independent Events
Introduction to
discrete probability
An experiment is a process that yields an
outcome
Topics to be Covered
Orders of Growth (Briefly)
Big Oh Notation
Omega Notation
Theta Notation
Master Theorem
Divide-and-Conquer Recurrence Relations
1
Orders of Growth
Complexity: the amount of time a
Topics to be Covered
Master Theorem
General Case
1
Master Theorem - Recall
A Generic Recursion Tree
Determining the final T(n)
Summing the expressions (internal nodes and
leaves), we have
log b n 1
T
Topics to be Covered
Probability Tree
Bayes Theorem
The new probability of B, P(B|A) is called the
posterior probability, posterior to A occurring. We
would have information on the prior probability o
Topics to be Covered
Master Theorem
General Case
1
Master Theorem Example
3
Solve the following problem using Master Theorem:
T(n) = 2T(n/2) + n log n
Solution
Consider the recurrence:
T(n) = aT(n/b)
Topics to be covered
Inclusion-Exclusion
Examples
Permutations
Combinations
Principle
Inclusion-Exclusion
Principle
Let Ai be a set
A1 A2 A1 A2 A1 A2
A1 A2 A3 A1 A2 A3 A1 A2 A1 A3 A2 A3 A1 A2 A3
A1 A
Topics to be Covered
Basic Probability Rules (Reminded)
The Law of Total Probability
Bayes Theorem
Basic Rules for Probability Reminder
1.
1.
Range of
of Values
Values 0 P( A) 1
Range
2.
2.
Complement
Topics to be covered
Binomial Theorem
Pascals Triangle
and Combinatorial
Identities
At first glance the expression (a+b)n does not have much to do
with combinations
In fact, we can obtain the formula
Data Modeling
Which data to include in the database
1
Aim of Data Modelling
Form a model of the enterprise so that the data are
accurate and useful.
Yet another form of abstraction.
First and most imp
DISTINCT
DISTINCT is used to make sure that we do not get any
duplicate values.
Example
SELECT DISTINCT cid
FROM Enrol
WHERE grade > 70;
First, find the various course numbers that qualify and
then re
Data Manipulation
Languages Relational
Algebra
How to manipulate data
1
Data Manipulation Languages
In order for a database to be useful, it should be possible
to store and retrieve information from i
Query Optimization
1
Change of Focus
Until now, we have focussed
on high-level issues, such as
database design and highlevel query languages.
The next few weeks, we will
look at some of the inner
work
Decomposition
Recall that having identified undesirable FDs, we now
need to decompose.
Decomposition:
Let U be a relation schema. A set of cfw_R1,.,Rn of the
relation schema is a decomposition of U i
Data Models
How to structure data
1
What is a Data Model?
Having formed a model of the enterprise, we now need to
represent the data.
The data model tells us the structure of the database.
Historicall
Query Languages: How
to build or interrogate a
relational database
Structured Query Language (SQL)
1
SQL
SQL is a query language for relational databases.
Contains:
Data Definition Language to define
Database Design Theory
Which tables to have in a database
Normalization
1
Database Design Theory
Given some body of data to be represented in a
database, as modelled in an E-R diagram, what is the
mos
XML
and
Databases
Introduction
XML stands for Extensible Markup Language.
It is designed to describe data and focus on
what data is.
It is used to structure store and to send
information.
It is easy t
Topics to be covered
Counting
Basic
Principles
Multiplication
Addition
Permutations
Combinations
Basic
principles
Multiplication
principle
If an activity can be performed in k
successive steps,
NOVEMBER 11, 2016
If primary key already exists in data file then you must choose your own primary key
when importing. However, when the data file that youre importing doesnt have the
primary key colu
UNIT 2
LA VIDA UNIVERSITARIA
USEFUL VOCABULARY
Adverbios y expresiones Adverbiales
Adverbs and adverbial expressions
Ahora- now
ms tarde- /later
a tiempo- on time;
temprano - early
tarde- late
a veces
Verbs like
GUSTAR
Remember gustar is not
like a regular verb. We
only use the following
forms of the verb:
Me gusta(n)
Te gusta(n)
Le gusta(n)
Nos gusta(n)
Os gusta(n)
Les gusta(n)
*Remember that me,
Ser y Estar
to be or not to be?
to be or not to be?
1
Ser y Estar en espaol
Both verbs mean
to be
Used in very
different cases
Irregular
conjugations
Cules son las formas?
Ser
Estar
Soy
Eres
Es
Som