This document provides an overview of data structures and algorithms analysis. It discusses big-O notation and how it is used to analyze computational complexity and asymptotic complexity of algorithms. Various growth functions like O(n), O(n^2), O(log n) are explained. Experimental and theoretical analysis methods are described and limitations of experimental analysis are highlighted. Key aspects like analyzing loop executions and nested loops are covered. The document also provides examples of analyzing algorithms and comparing their efficiency using big-O notation.
Data structure and algorithm using javaNarayan Sau
This presentation created for people who like to go back to basics of data structure and its implementation. This presentation mostly helps B.Tech , Bsc Computer science students as well as all programmer who wants to develop software in core areas.
Data structure and algorithm using javaNarayan Sau
This presentation created for people who like to go back to basics of data structure and its implementation. This presentation mostly helps B.Tech , Bsc Computer science students as well as all programmer who wants to develop software in core areas.
this is a briefer overview about the Big O Notation. Big O Notaion are useful to check the Effeciency of an algorithm and to check its limitation at higher value. with big o notation some examples are also shown about its cases and some functions in c++ are also described.
Concept and Definition of Data Structures
Introduction to Data Structures: Information and its meaning, Array in C++: The array as an ADT, Using one dimensional array, Two dimensional array, Multi dimensional array, Structure , Union, Classes in C++.
https://github.com/ashim888/dataStructureAndAlgorithm
this is a briefer overview about the Big O Notation. Big O Notaion are useful to check the Effeciency of an algorithm and to check its limitation at higher value. with big o notation some examples are also shown about its cases and some functions in c++ are also described.
Concept and Definition of Data Structures
Introduction to Data Structures: Information and its meaning, Array in C++: The array as an ADT, Using one dimensional array, Two dimensional array, Multi dimensional array, Structure , Union, Classes in C++.
https://github.com/ashim888/dataStructureAndAlgorithm
Unit 1: Fundamentals of the Analysis of Algorithmic Efficiency, Units for Measuring Running Time, PROPERTIES OF AN ALGORITHM, Growth of Functions, Algorithm - Analysis, Asymptotic Notations, Recurrence Relation and problems
Design & Analysis of Algorithms Lecture NotesFellowBuddy.com
FellowBuddy.com is an innovative platform that brings students together to share notes, exam papers, study guides, project reports and presentation for upcoming exams.
We connect Students who have an understanding of course material with Students who need help.
Benefits:-
# Students can catch up on notes they missed because of an absence.
# Underachievers can find peer developed notes that break down lecture and study material in a way that they can understand
# Students can earn better grades, save time and study effectively
Our Vision & Mission – Simplifying Students Life
Our Belief – “The great breakthrough in your life comes when you realize it, that you can learn anything you need to learn; to accomplish any goal that you have set for yourself. This means there are no limits on what you can be, have or do.”
Like Us - https://www.facebook.com/FellowBuddycom
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Welocme to ViralQR, your best QR code generator.ViralQR
Welcome to ViralQR, your best QR code generator available on the market!
At ViralQR, we design static and dynamic QR codes. Our mission is to make business operations easier and customer engagement more powerful through the use of QR technology. Be it a small-scale business or a huge enterprise, our easy-to-use platform provides multiple choices that can be tailored according to your company's branding and marketing strategies.
Our Vision
We are here to make the process of creating QR codes easy and smooth, thus enhancing customer interaction and making business more fluid. We very strongly believe in the ability of QR codes to change the world for businesses in their interaction with customers and are set on making that technology accessible and usable far and wide.
Our Achievements
Ever since its inception, we have successfully served many clients by offering QR codes in their marketing, service delivery, and collection of feedback across various industries. Our platform has been recognized for its ease of use and amazing features, which helped a business to make QR codes.
Our Services
At ViralQR, here is a comprehensive suite of services that caters to your very needs:
Static QR Codes: Create free static QR codes. These QR codes are able to store significant information such as URLs, vCards, plain text, emails and SMS, Wi-Fi credentials, and Bitcoin addresses.
Dynamic QR codes: These also have all the advanced features but are subscription-based. They can directly link to PDF files, images, micro-landing pages, social accounts, review forms, business pages, and applications. In addition, they can be branded with CTAs, frames, patterns, colors, and logos to enhance your branding.
Pricing and Packages
Additionally, there is a 14-day free offer to ViralQR, which is an exceptional opportunity for new users to take a feel of this platform. One can easily subscribe from there and experience the full dynamic of using QR codes. The subscription plans are not only meant for business; they are priced very flexibly so that literally every business could afford to benefit from our service.
Why choose us?
ViralQR will provide services for marketing, advertising, catering, retail, and the like. The QR codes can be posted on fliers, packaging, merchandise, and banners, as well as to substitute for cash and cards in a restaurant or coffee shop. With QR codes integrated into your business, improve customer engagement and streamline operations.
Comprehensive Analytics
Subscribers of ViralQR receive detailed analytics and tracking tools in light of having a view of the core values of QR code performance. Our analytics dashboard shows aggregate views and unique views, as well as detailed information about each impression, including time, device, browser, and estimated location by city and country.
So, thank you for choosing ViralQR; we have an offer of nothing but the best in terms of QR code services to meet business diversity!
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
The Art of the Pitch: WordPress Relationships and Sales
Analysis of algorithms
1. Data Structures & Algorithms
Lecturer: Dr. Muhammad M Iqbal
Ph.D (DCU), M.Phil (GCU)
1
2. Overview
– The concept of algorithm analysis
– Big-Oh notation
– Experimental analysis of algorithms in Java
– Comparing various growth functions
– Efficiency goals
AlgorithmInput Output
2
3. Computational and
Asymptotic Complexity
• Computational Complexity measures the degree of
difficulty of an algorithm
• Indicates how much effort is needed to apply an
algorithm or how costly it is
• To evaluate an algorithm’s efficiency, use logical units
that express a relationship such as:
– The size n of a file or an array
– The amount of time t required to process the data 3
4. Analysis of Algorithms
• Method 1:
• Transform the algorithm into some
programming language and measure the
execution time for a set of input values.
• Method 2:
• Use the Big O notation (mathematical
notation) to analyse the behaviour of the
algorithms. (Independent of software and
hardware).
4
5. • Let us consider two algorithms to solve a problem:
– First algorithm (X) spends 100 * x time units
– Second algorithm (Y) spends 5000 time units
• Which one is better?
– Algorithm X is better if our problem size is small, that is, if x < 50
– Algorithm Y is better for larger problems, with x > 50
• A challenge is to handle the large size of the problems. 5
Complexity of Algorithms
• To understand the performance of an algorithm, it is best to
observe how well or poorly it does for different size of inputs.
• This indicates that the selection of the algorithm for a particular
problem demands analysis based on the input size.
6. Algorithm Analysis
Consider the problem of summing
FIGURE: Three algorithms for computing the sum
1 + 2 + . . . + n for an integer n > 0 6
TimedAlgorithms.java
7. Running Time
• Most algorithms transform input
objects into output objects.
• The running time of an algorithm
typically grows with the input size.
• Average case time is often difficult
to determine.
• We focus on the worst case running
time.
– Easier to analyze
– Crucial to applications such as games,
finance and robotics
0
20
40
60
80
100
120
RunningTime 1000 2000 3000 4000
Input Size
best case
average case
worst case
7
8. Algorithm Efficiency
• The efficiency of an algorithm is usually expressed in
terms of its use of CPU time.
• The analysis of algorithms involves categorizing an
algorithm in terms of efficiency.
• An everyday example: washing dishes.
• Suppose washing a dish takes 30 seconds and drying a
dish takes an additional 30 seconds.
• Therefore, n dishes require n minutes to wash and dry.
8
9. Algorithm Efficiency
• Now consider a less efficient approach that
requires us to redry all previously washed
dishes after washing another one
seconds4515
2
)1(30
30dishes)(time
)30*()wash timeseconds30(*
2
n
1i
nn
nn
nn
in
9
10. Problem Size
• For every algorithm we want to analyze,
we need to define the size of the problem
• The dishwashing problem has a size n –
number of dishes to be washed/dried
• For a search algorithm, the size of the
problem is the size of the search pool
• For a sorting algorithm, the size of the
program is the number of elements to be
sorted
10
11. Growth Functions
• We must also decide what we are trying to
efficiently optimize
i. time complexity – CPU time
ii. space complexity – memory space
• CPU time is generally the focus
• A growth function shows the relationship
between the size of the problem (n) and the
value optimized (time)
11
12. Asymptotic Complexity
• The growth function of the second dishwashing algorithm is
t(n) = 15n2 + 45n
• It is not typically necessary to know the exact growth
function for an algorithm
• We are mainly interested in the asymptotic complexity of an
algorithm – the general nature of the algorithm as n
increases
• Asymptotic complexity helps to explore the performance of
the algorithms 12
13. Asymptotic Complexity
• Asymptotic complexity is
based on the dominant
term of the growth
function – the term that
increases most quickly as
n increases
• The dominant term for
the second dishwashing
algorithm is n2:
13
t(n) = 15n2 + 45n
15. Big-Oh Notation
• The coefficients and the lower order terms
become increasingly less relevant as n
increases
• So we say that the algorithm is order n2,
which is written O(n2)
• This is called Big-Oh notation
• There are various Big-Oh categories
• Two algorithms in the same category are
generally considered to have the same
efficiency, but that doesn't mean they have
equal growth functions or behave exactly
the same for all values of n 15
18. Analyzing Loop Execution
• First determine the order of the body of the
loop, then multiply that by the number of times
the loop will execute
for (int count = 0; count < n; count++)
// some sequence of O(1) steps
• N loop executions times O(1) operations
results in a O(n) efficiency
18
19. Analyzing Loop Execution
• Consider the following loop:
count = 1;
while (count < n)
{
count *= 2;
// some sequence of O(1) steps
}
• The loop is executed log2n times, so the loop is
O(log n)
19
20. Analyzing Nested Loops
• When the loops are nested, we multiply the complexity of the outer loop
by the complexity of the inner loop
for (int count = 0; count < n; count++)
for (int count2 = 0; count2 < n; count2++)
{
// some sequence of O(1) steps
}
• Both the inner and outer loops have complexity of O(n)
• The overall efficiency is O(n2)
20
• The body of a loop may contain a call to a method
• To determine the order of the loop body, the order of the method must be
taken into account
• The overhead of the method call itself is generally ignored
21. Experimental Studies
• Write a program
implementing the algorithm
• Run the program with inputs
of varying size and
composition, noting the time
needed:
• Plot the results 0
1000
2000
3000
4000
5000
6000
7000
8000
9000
0 50 100
Input Size
Time(ms)
21
22. Limitations of Experiments
• It is necessary to implement the algorithm,
which may be difficult
• Results may not be indicative of the running
time on other inputs not included in the
experiment.
• In order to compare two algorithms, the same
hardware and software environments must be
used
22
23. Theoretical Analysis
• Uses a high-level description of the algorithm instead of an implementation
• Characterizes running time as a function of the input size, n
• Takes into account all possible inputs
• Allows us to evaluate the speed of an algorithm independent of the
hardware/ software environment
23
24. Comparison of Two Algorithms
Insertion sort is
n2 / 4
Merge sort is
2 n lg n
sort a million items?
insertion sort takes
roughly 70 hours
while
merge sort takes
roughly 40 seconds
This is a slow machine, but if
100 x as fast then it’s 40 minutes
versus less than 0.5 seconds24
25. More Big-Oh Examples
7n - 2
7n-2 is O(n)
need c > 0 and n0 1 such that 7 n - 2 c n for n n0
this is true for c = 7 and n0 = 1
3 n3 + 20 n2 + 5
3 n3 + 20 n2 + 5 is O(n3)
need c > 0 and n0 1 such that 3 n3 + 20 n2 + 5 c n3 for n n0
this is true for c = 4 and n0 = 21
3 log n + 5
3 log n + 5 is O(log n)
need c > 0 and n0 1 such that 3 log n + 5 c log n for n n0
this is true for c = 8 and n0 = 2
25
26. Prefix Averages 2 (Linear)
The following algorithm uses a running summation to improve
the efficiency
Algorithm prefixAverage2 runs in O(n) time! 26
27. Experimental Study
• A simple mechanism for collecting such running times in Java is based on use
of the currentTimeMillis method of the System class.
long startTime = System.currentTimeMillis( ); // record the starting time
/* (run the algorithm) */
long endTime = System.currentTimeMillis( ); // record the ending time
long elapsed = endTime − startTime; // compute the elapsed time
27
StringExperiment.java
28. Experimental Studies
• A simple mechanism for collecting such running times in Java is
based on use of the currentTimeMillis method of the System
class.
StringExperiment.zip
n
50000
repeat1
1607
repeat2
3
100000 5074 4
200000 11727 5
400000 37939 12
800000 152135 12
1600000 648259 16
28
29. • To analyze the algorithms effectively, a general methodology for analysis
of the running time of algorithms (theoretical analysis)
• In contrast to the "experimental approach", this methodology:
– Uses a high-level description of the algorithm instead of testing one
of its implementations.
– Characterizes running time as a function of the input size, n.
– Takes into account all possible inputs.
– Allows one to evaluate the efficiency of any algorithm in a way that is
independent from the hardware and software environment.
Theoretical Analysis
29
30. Performance Analysis of the
Algorithms
• In order to analyse the algorithms
i. We should calculate the time using some formula based on the input
size.
ii. We should find a method to determine the memory requirement based
on the input size.
• We can choose the “size of input” to be the parameter that most
influences the actual time/space required
– It is usually obvious what this parameter is
• e.g., number of elements in the array you want to sort
– Sometimes we need two or more parameters
• However, the time performs a major role in all evaluations. 30
Time and Space
32. Three-Way Set Disjointness
Suppose we are given three sets, A, B, and C, stored in
three different integer arrays. We will assume that no
individual set contains duplicate values, but that there
may be some numbers that are in two or three of the
sets. The three-way set disjointness problem is to
determine if the intersection of the three sets is empty,
namely, that there is no element x such that x ∈ A, x ∈ B,
and x ∈ C. 32
34. Big-Oh Notation
Statements with method calls
• When a statement involves a method call, the complexity of the
statement includes the complexity of the method call.
f(k); // O(1)
g(k); // O(N)
• When a loop is involved, the same rule applies
for (j = 0; j < N; j++)
g(N);
– It has complexity (N2).
– The loop executes N times
– Each method call g(N) is of complexity O(N). 34
35. Question
• A program’s execution time depends in part on
– the speed of the computer it is running on (time)
– the memory capacity
– the language the algorithm is written in
– all of the above
35
36. Resources/ References
• Introduction to Algorithms, Thomas H. Cormen, Charles E. Leiserson,
Ronald L. Rivest and Clifford Stein 3rd, 2009, MIT Press and
McGraw-Hill.
• Data Structures: Abstraction and Design Using Java, Elliott B.
Koffmann, 2nd, 2010, Wiley.
• Data Structures and algorithm analysis in java, Mark A. Weiss, 3rd,
2011, Prentice Hall.
• Frank M. Carrano, Data Structures and Abstractions with Java™, 3rd
Edition, Prentice Hall, PEARSON, ISBN-10: 0-13-610091-0.
• This lecture used some images and videos from the Google search
repository to raise the understanding level of students.
https://www.google.ie/search?
Dr. Muhammad M Iqbal*