The document discusses asymptotic notation and its use in analyzing algorithms. It introduces big-O, big-Theta, and big-Omega notation to describe the asymptotic growth rates of functions. These notations are defined precisely using limits. Examples are given to illustrate how functions can be classified based on their rate of growth. Properties like transitivity and symmetry of the notations are covered. Common functions like polynomials, logarithms, and exponentials are discussed in terms of asymptotic notation.
Whenever we want to perform analysis of an algorithm, we need to calculate the complexity of that algorithm. But when we calculate complexity of an algorithm it does not provide exact amount of resource required. So instead of taking exact amount of resource we represent that complexity in a general form (Notation) which produces the basic nature of that algorithm. We use that general form (Notation) for the analysis process.
Whenever we want to perform analysis of an algorithm, we need to calculate the complexity of that algorithm. But when we calculate complexity of an algorithm it does not provide exact amount of resource required. So instead of taking exact amount of resource we represent that complexity in a general form (Notation) which produces the basic nature of that algorithm. We use that general form (Notation) for the analysis process.
This is the second lecture in the CS 6212 class. Covers asymptotic notation and data structures. Also outlines the coming lectures wherein we will study the various algorithm design techniques.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
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
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
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.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
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.
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
2. Asymptotic Complexity
Running time of an algorithm as a function of
input size n for large n.
Expressed using only the highest-order term in
the expression for the exact running time.
Instead of exact running time, say Θ(n2).
Describes behavior of function in the limit.
Written using Asymptotic Notation.
ymp - 2
Comp 122
3. ymp - 3
Asymptotic Notation
Θ, O, Ω, o, ω
Defined for functions over the natural numbers.
Ex: f(n) = Θ(n2).
Describes how f(n) grows in comparison to n2.
Define a set of functions; in practice used to compare
two function sizes.
The notations describe different rate-of-growth
relations between the defining function and the
defined set of functions.
Comp 122
4. Θ-notation
For function g(n), we define Θ(g(n)),
big-Theta of n, as the set:
Θ(g(n)) = {f(n) :
∃ positive constants c1, c2, and n0,
such that ∀n ≥ n0,
we have 0 ≤ c1g(n) ≤ f(n) ≤ c2g(n)
}
Intuitively: Set of all functions that
have the same rate of growth as g(n).
g(n) is an asymptotically tight bound for f(n).
ymp - 4
Comp 122
5. Θ-notation
For function g(n), we define Θ(g(n)),
big-Theta of n, as the set:
Θ(g(n)) = {f(n) :
∃ positive constants c1, c2, and n0,
such that ∀n ≥ n0,
we have 0 ≤ c1g(n) ≤ f(n) ≤ c2g(n)
}
Technically, f(n) ∈ Θ(g(n)).
Older usage, f(n) = Θ(g(n)).
I’ll accept either…
f(n) and g(n) are nonnegative, for large n.
ymp - 5
Comp 122
6. ymp - 6
Example
Θ(g(n)) = {f(n) : ∃ positive constants c1, c2, and n0,
such that ∀n ≥ n0, 0 ≤ c1g(n) ≤ f(n) ≤ c2g(n)}
10n2 - 3n = Θ(n2)
What constants for n0, c1, and c2 will work?
Make c1 a little smaller than the leading
coefficient, and c2 a little bigger.
To compare orders of growth, look at the
leading term.
Exercise: Prove that n2/2-3n= Θ(n2)
Comp 122
7. ymp - 7
Example
Θ(g(n)) = {f(n) : ∃ positive constants c1, c2, and n0,
such that ∀n ≥ n0, 0 ≤ c1g(n) ≤ f(n) ≤ c2g(n)}
Is 3n3 ∈ Θ(n4) ??
How about 22n∈ Θ(2n)??
Comp 122
8. O-notation
For function g(n), we define O(g(n)),
big-O of n, as the set:
O(g(n)) = {f(n) :
∃ positive constants c and n0,
such that ∀n ≥ n0,
we have 0 ≤ f(n) ≤ cg(n) }
Intuitively: Set of all functions
whose rate of growth is the same as
or lower than that of g(n).
g(n) is an asymptotic upper bound for f(n).
f(n) = Θ(g(n)) ⇒ f(n) = O(g(n)).
Θ(g(n)) ⊂ O(g(n)).
ymp - 8
Comp 122
9. Examples
O(g(n)) = {f(n) : ∃ positive constants c and n0,
such that ∀n ≥ n0, we have 0 ≤ f(n) ≤ cg(n) }
Any linear function an + b is in O(n2). How?
Show that 3n3=O(n4) for appropriate c and n0.
ymp - 9
Comp 122
10. Ω -notation
For function g(n), we define Ω(g(n)),
big-Omega of n, as the set:
Ω(g(n)) = {f(n) :
∃ positive constants c and n0,
such that ∀n ≥ n0,
we have 0 ≤ cg(n) ≤ f(n)}
Intuitively: Set of all functions
whose rate of growth is the same
as or higher than that of g(n).
g(n) is an asymptotic lower bound for f(n).
ymp - 10
f(n) = Θ(g(n)) ⇒ f(n) = Ω(g(n)).
Θ(g(n)) ⊂ Ω(g(n)).
Comp 122
11. Example
Ω(g(n)) = {f(n) : ∃ positive constants c and n0, such
that ∀n ≥ n0, we have 0 ≤ cg(n) ≤ f(n)}
√n = Ω(lg n). Choose c and n0.
ymp - 11
Comp 122
13. Relations Between Θ, Ω, O
Theorem :: For any two functions g(n) and f(n),
Theorem For any two functions g(n) and f(n),
f(n) = Θ(g(n)) iff
f(n) = Θ(g(n)) iff
f(n) = O(g(n)) and f(n) = Ω(g(n)).
f(n) = O(g(n)) and f(n) = Ω(g(n)).
I.e., Θ(g(n)) = O(g(n)) ∩ Ω(g(n))
In practice, asymptotically tight bounds are
obtained from asymptotic upper and lower bounds.
ymp - 13
Comp 122
14. ymp - 14
Running Times
“Running time is O(f(n))” ⇒ Worst case is O(f(n))
O(f(n)) bound on the worst-case running time ⇒
O(f(n)) bound on the running time of every input.
Θ(f(n)) bound on the worst-case running time ⇒
Θ(f(n)) bound on the running time of every input.
“Running time is Ω(f(n))” ⇒ Best case is Ω(f(n))
Can still say “Worst-case running time is Ω(f(n))”
Means worst-case running time is given by some
unspecified function g(n) ∈ Ω(f(n)).
Comp 122
15. ymp - 15
Example
Insertion sort takes Θ(n2) in the worst case, so
sorting (as a problem) is O(n2). Why?
Any sort algorithm must look at each item, so
sorting is Ω(n).
In fact, using (e.g.) merge sort, sorting is Θ(n lg n)
in the worst case.
Later, we will prove that we cannot hope that any
comparison sort to do better in the worst case.
Comp 122
16. ymp - 16
Asymptotic Notation in Equations
Can use asymptotic notation in equations to
replace expressions containing lower-order terms.
For example,
4n3 + 3n2 + 2n + 1 = 4n3 + 3n2 + Θ(n)
= 4n3 + Θ(n2) = Θ(n3). How to interpret?
In equations, Θ(f(n)) always stands for an
anonymous function g(n) ∈ Θ(f(n))
In the example above, Θ(n2) stands for
3n2 + 2n + 1.
Comp 122
17. o-notation
For a given function g(n), the set little-o:
o(g(n)) = {f(n): ∀ c > 0, ∃ n0 > 0 such that
∀ n ≥ n0, we have 0 ≤ f(n) < cg(n)}.
f(n) becomes insignificant relative to g(n) as n
approaches infinity:
lim [f(n) / g(n)] = 0
n→∞
g(n) is an upper bound for f(n) that is not
asymptotically tight.
Observe the difference in this definition from previous
ones. Why?
ymp - 17
Comp 122
18. ω -notation
For a given function g(n), the set little-omega:
ω(g(n)) = {f(n): ∀ c > 0, ∃ n
> 0 such that
∀ n ≥ n0, we have 0 ≤ cg(n) < f(n)}.
0
f(n) becomes arbitrarily large relative to g(n) as n
approaches infinity:
lim [f(n) / g(n)] = ∞.
n→∞
g(n) is a lower bound for f(n) that is not
asymptotically tight.
ymp - 18
Comp 122
19. ymp - 19
Comparison of Functions
f↔g ≈ a↔b
f (n) = O(g(n)) ≈ a ≤ b
f (n) = Ω(g(n)) ≈ a ≥ b
f (n) = Θ(g(n)) ≈ a = b
f (n) = o(g(n)) ≈ a < b
f (n) = ω (g(n)) ≈ a > b
Comp 122
24. Monotonicity
f(n) is
ymp - 24
monotonically increasing if m ≤ n ⇒ f(m) ≤ f(n).
monotonically decreasing if m ≥ n ⇒ f(m) ≥ f(n).
strictly increasing if m < n ⇒ f(m) < f(n).
strictly decreasing if m > n ⇒ f(m) > f(n).
Comp 122
25. Exponentials
Useful Identities:
1
a =
a
(a m ) n = a mn
−1
a m a n = a m+ n
Exponentials and polynomials
ymp - 25
nb
lim n = 0
n→∞ a
⇒ n b = o( a n )
Comp 122
26. Logarithms
x = logba is the
exponent for a = bx.
a = b logb a
log c (ab) = log c a + log c b
log b a = n log b a
n
Natural log: ln a = logea
Binary log: lg a = log2a
lg2a = (lg a)2
lg lg a = lg (lg a)
ymp - 26
log c a
log b a =
log c b
log b (1 / a ) = − log b a
1
log b a =
log a b
a logb c = c logb a
Comp 122
27. Logarithms and exponentials – Bases
If the base of a logarithm is changed from one
constant to another, the value is altered by a
constant factor.
Ex: log10 n * log210 = log2 n.
Base of logarithm is not an issue in asymptotic
notation.
Exponentials with different bases differ by a
exponential factor (not a constant factor).
ymp - 27
Ex: 2n = (2/3)n*3n.
Comp 122
28. Polylogarithms
For a ≥ 0, b > 0, lim n→∞ ( lga n / nb ) = 0,
so lga n = o(nb), and nb = ω(lga n )
Prove using L’Hopital’s rule repeatedly
lg(n!) = Θ(n lg n)
ymp - 28
Prove using Stirling’s approximation (in the text) for lg(n!).
Comp 122
29. Exercise
Express functions in A in asymptotic notation using functions in B.
ymp - 29
A
5n2 + 100n
B
3n2 + 2
A ∈ Θ(B)
A ∈ Θ(n2), n2 ∈ Θ(B) ⇒ A ∈ Θ(B)
log3(n2)
log2(n3)
A ∈ Θ(B)
logba = logca / logcb; A = 2lgn / lg3, B = 3lgn, A/B =2/(3lg3)
A ∈ ω (B)
nlg4
3lg n
alog b = blog a; B =3lg n=nlg 3; A/B =nlg(4/3) → ∞ as n→∞
A ∈ ο (B)
lg2n
n1/2
lim ( lga n / nb ) = 0 (here a = 2 and b = 1/2) ⇒ A ∈ ο (B)
n→∞
Comp 122
31. ymp - 31
Review on Summations
Why do we need summation formulas?
For computing the running times of iterative
constructs (loops). (CLRS – Appendix A)
Example: Maximum Subvector
Given an array A[1…n] of numeric values (can be
positive, zero, and negative) determine the
subvector A[i…j] (1≤ i ≤ j ≤ n) whose sum of
elements is maximum over all subvectors.
1
-2
2
Comp 122
2
32. Review on Summations
MaxSubvector(A, n)
maxsum ← 0;
for i ← 1 to n
do for j = i to n
sum ← 0
for k ← i to j
do sum += A[k]
maxsum ← max(sum, maxsum)
return maxsum
n
n
j
T(n) = ∑ ∑ ∑ 1
i=1 j=i k=i
NOTE: This is not a simplified solution. What is the final answer?
ymp - 32
Comp 122
33. Review on Summations
Constant Series: For integers a and b, a ≤ b,
b
∑1 = b − a + 1
i =a
Linear Series (Arithmetic Series): For n ≥ 0,
n
n(n + 1)
∑ i = 1 + 2 + + n = 2
i =1
n
Quadratic Series: For n 2≥ 0, 2 n(n + 1)(2n + 1)
i 2 = 12 + 2 + + n =
ymp - 33
∑
6
i =1
Comp 122
34. ymp - 34
Review on Summations
Cubic Series: For n ≥ 0,
n 2 (n + 1) 2
i 3 = 13 + 23 + + n 3 =
∑
4
i =1
n
Geometric Series: For real x ≠ 1,
x n+1 − 1
xk = 1+ x + x2 + + xn =
∑
x −1
k =0
n
For |x| < 1,
∞
1
∑ x = 1− x
k =0
k
Comp 122
35. ymp - 35
Review on Summations
Linear-Geometric Series: For n ≥ 0, real c ≠ 1,
n +1
− (n + 1)c + nc
∑ ic = c + 2c + + nc =
(c − 1) 2
i =1
n
i
2
n
Harmonic Series: nth harmonic number, n∈I+,
1 1
1
Hn = 1+ + ++
2 3
n
n
1
= ∑ = ln(n) + O(1)
k =1 k
Comp 122
n+ 2
+c
36. Review on Summations
Telescoping Series:
n
∑a
k =1
k
− ak −1 = an − a0
Differentiating Series: For |x| < 1,
ymp - 36
∞
x
∑ kx = (1 − x ) 2
k =0
k
Comp 122
37. Review on Summations
Approximation by integrals:
For monotonically increasing f(n)
n
∫
m−1
n
n +1
k =m
m
f ( x)dx ≤ ∑ f (k ) ≤
∫ f ( x)dx
For monotonically decreasing f(n)
n +1
∫
m
n
f ( x)dx ≤ ∑ f (k ) ≤
k =m
n
∫ f ( x)dx
m−1
How?
ymp - 37
Comp 122
38. Review on Summations
nth harmonic number
ymp - 38
n
1
∑k ≥
k =1
n+1
∫
1
dx
= ln(n + 1)
x
n
n
1
dx
≤ ∫ = ln n
∑k x
k =2
1
n
1
⇒ ∑ ≤ ln n + 1
k =1 k
Comp 122