This document discusses analysis of algorithms and time complexity. It explains that analysis of algorithms determines the resources needed to execute algorithms. The time complexity of an algorithm quantifies how long it takes. There are three cases to analyze - worst case, average case, and best case. Common notations for time complexity include O(1), O(n), O(n^2), O(log n), and O(n!). The document provides examples of algorithms and determines their time complexity in different cases. It also discusses how to combine complexities of nested loops and loops in algorithms.
Algorithms Lecture 1: Introduction to AlgorithmsMohamed Loey
We will discuss the following: Algorithms, Time Complexity & Space Complexity, Algorithm vs Pseudo code, Some Algorithm Types, Programming Languages, Python, Anaconda.
PPT on Analysis Of Algorithms.
The ppt includes Algorithms,notations,analysis,analysis of algorithms,theta notation, big oh notation, omega notation, notation graphs
Algorithms Lecture 1: Introduction to AlgorithmsMohamed Loey
We will discuss the following: Algorithms, Time Complexity & Space Complexity, Algorithm vs Pseudo code, Some Algorithm Types, Programming Languages, Python, Anaconda.
PPT on Analysis Of Algorithms.
The ppt includes Algorithms,notations,analysis,analysis of algorithms,theta notation, big oh notation, omega notation, notation graphs
This slides contains assymptotic notations, recurrence relation like subtitution method, iteration method, master method and recursion tree method and sorting algorithms like merge sort, quick sort, heap sort, counting sort, radix sort and bucket sort.
Algorithm Complexity presentation slides. Time Complexity and Space Complexity analysis using Big-O notation with examples that demonstrates how a function complexity effects to algorithm efficiency.
Design and Analysis of Algorithm help to design the algorithms for solving different types of problems in Computer Science. It also helps to design and analyze the logic of how the program will work before developing the actual code for a program.
We will discuss the following: Sorting Algorithms, Counting Sort, Radix Sort, Merge Sort.Algorithms, Time Complexity & Space Complexity, Algorithm vs Pseudocode, Some Algorithm Types, Programming Languages, Python, Anaconda.
We will discuss the following: Graph, Directed vs Undirected Graph, Acyclic vs Cyclic Graph, Backedge, Search vs Traversal, Breadth First Traversal, Depth First Traversal, Detect Cycle in a Directed Graph.
Deep Learning - Overview of my work IIMohamed Loey
Deep Learning Machine Learning MNIST CIFAR 10 Residual Network AlexNet VGGNet GoogleNet Nvidia Deep learning (DL) is a hierarchical structure network which through simulates the human brain’s structure to extract the internal and external input data’s features
This slides contains assymptotic notations, recurrence relation like subtitution method, iteration method, master method and recursion tree method and sorting algorithms like merge sort, quick sort, heap sort, counting sort, radix sort and bucket sort.
Algorithm Complexity presentation slides. Time Complexity and Space Complexity analysis using Big-O notation with examples that demonstrates how a function complexity effects to algorithm efficiency.
Design and Analysis of Algorithm help to design the algorithms for solving different types of problems in Computer Science. It also helps to design and analyze the logic of how the program will work before developing the actual code for a program.
We will discuss the following: Sorting Algorithms, Counting Sort, Radix Sort, Merge Sort.Algorithms, Time Complexity & Space Complexity, Algorithm vs Pseudocode, Some Algorithm Types, Programming Languages, Python, Anaconda.
We will discuss the following: Graph, Directed vs Undirected Graph, Acyclic vs Cyclic Graph, Backedge, Search vs Traversal, Breadth First Traversal, Depth First Traversal, Detect Cycle in a Directed Graph.
Deep Learning - Overview of my work IIMohamed Loey
Deep Learning Machine Learning MNIST CIFAR 10 Residual Network AlexNet VGGNet GoogleNet Nvidia Deep learning (DL) is a hierarchical structure network which through simulates the human brain’s structure to extract the internal and external input data’s features
PMP Lecture 1: Introduction to Project ManagementMohamed Loey
https://mloey.github.io/courses/pmp2017.html
https://www.youtube.com/watch?v=XUoEr6kee6k&list=PLKYmvyjH53q13_6aS4VwgXU0Nb_4sjwuf&index=1&t=2s
We will discuss the following: History of Project Management, Project Management, Program Management, Portfolio Management, Project Management Office, PMBOK, PMI.
We will discuss the following: RSA Key generation , RSA Encryption , RSA Decryption , A Real World Example, RSA Security.
https://www.youtube.com/watch?v=x7QWJ13dgGs&list=PLKYmvyjH53q13_6aS4VwgXU0Nb_4sjwuf&index=7
Algorithms Lecture 3: Analysis of Algorithms IIMohamed Loey
We will discuss the following: Maximum Pairwise Product, Fibonacci, Greatest Common Divisors, Naive algorithm is too slow. The Efficient algorithm is much better. Finding the correct algorithm requires knowing something interesting about the problem
Measuring the performance of algorithm, in terms of Big(O), theta, and Omega notation with respect to their Scientific notation like Worst, Average, Best, cases
Basics of Algorithms and Analysis of algorithm is in there, which includes Time complexity , space complexity, three cases ( best, average, worst) and analysis of Insertion sort.
*For knowledge purpose only*
*Hope you'll come up with better one*
best time to money ratio converter .. ha ha money making machine .
Time complexity is defined as the amount of time taken by an algorithm to run, as a function of the length of the input. It measures the time taken to execute each statement of code in an algorithm. It is not going to examine the total execution time of an algorithm
Similar to Algorithms Lecture 2: Analysis of Algorithms I (20)
Lecture 4: How it Works: Convolutional Neural NetworksMohamed Loey
We will discuss the following: Filtering, Convolution, Convolution layer, Normalization, Rectified Linear Units, Pooling, Pooling layer, ReLU layer, Deep stacking, Fully connected layer.
We will discuss the following: Deep vs Machine Learning, Superstar Researchers, Superstar Companies, Deep Learning, Deep Learning Requirements, Deep Learning Architectures, Convolution Neural Network, Case studies, LeNet,AlexNet, ZFNet, GoogLeNet, VGGNet, ResNet, ILSVRC, MNIST, CIFAR-10, CNN Optimization , NVIDIA TITAN X.
We will discuss the following: Artificial Neural Network, Perceptron Learning Example, Artificial Neural Network Training Process, Forward propagation, Backpropagation, Classification of Handwritten Digits, Neural Network Zoo.
Design of an Intelligent System for Improving Classification of Cancer DiseasesMohamed Loey
The methodologies that depend on gene expression profile have been able to detect cancer since its inception. The previous works have spent great efforts to reach the best results. Some researchers have achieved excellent results in the classification process of cancer based on the gene expression profile using different gene selection approaches and different classifiers
Early detection of cancer increases the probability of recovery. This thesis presents an intelligent decision support system (IDSS) for early diagnosis of cancer-based on the microarray of gene expression profiles. The problem of this dataset is the little number of examples (not exceed hundreds) comparing to a large number of genes (in thousands). So, it became necessary to find out a method for reducing the features (genes) that are not relevant to the investigated disease to avoid overfitting. The proposed methodology used information gain (IG) for selecting the most important features from the input patterns. Then, the selected features (genes) are reduced by applying the Gray Wolf Optimization algorithm (GWO). Finally, the methodology exercises support vector machine (SVM) for cancer type classification. The proposed methodology was applied to three data sets (breast, colon, and CNS) and was evaluated by the classification accuracy performance measurement, which is most important in the diagnosis of diseases. The best results were gotten when integrating IG with GWO and SVM rating accuracy improved to 96.67% and the number of features was reduced to 32 feature of the CNS dataset.
This thesis investigates several classification algorithms and their suitability to the biological domain. For applications that suffer from high dimensionality, different feature selection methods are considered for illustration and analysis. Moreover, an effective system is proposed. In addition, Experiments were conducted on three benchmark gene expression datasets. The proposed system is assessed and compared with related work performance.
We will discuss the following: Classical Security Methods, AAA, Authentication, Authorization, Accounting, AAA Characteristic, Local Based AAA, Server Based AAA, TACACS+ and RADIUS.
We will discuss the following: CCNAS Overview, Threats Landscape, Hackers Tools, Tools. Kali Linux Parrot Linux Cisco Packet Tracer Wireshark Denial of Service
Distributed DoS
Man In The Middle
Phishing
Vishing
Smishing
Pharming
Sniffer
Password Attack
Computer Security Lecture 4.1: DES Supplementary MaterialMohamed Loey
We will discuss the following: Data Encryption Standard, DES Algorithm, DES Key Creation
https://www.youtube.com/watch?v=1-lF4dePpts&list=PLKYmvyjH53q13_6aS4VwgXU0Nb_4sjwuf
https://mloey.github.io/
We will discuss the following: Develop Project Charter, Develop Project Management Plan, Direct and Manage Project Work, Monitor and Control Project Work, Perform Integrated Change Control, Close Project or Phase.
Computer Security Lecture 4: Block Ciphers and the Data Encryption StandardMohamed Loey
We will discuss the following: Stream Ciphers and Block Ciphers, Data Encryption Standard, DES Algorithm, DES Key Creation, DES Encryption, The Strength Of DES.
https://www.youtube.com/watch?v=1-lF4dePpts&list=PLKYmvyjH53q13_6aS4VwgXU0Nb_4sjwuf
https://mloey.github.io/courses/security2017.html
https://www.youtube.com/watch?v=td_8AM80DUA&list=PLKYmvyjH53q13_6aS4VwgXU0Nb_4sjwuf&index=2&t=37s
We will discuss the following: Symmetric Encryption, Substitution Techniques, Caesar Cipher, Monoalphabetic Cipher, Playfair Cipher, Hill Cipher
https://mloey.github.io/courses/security2017.html
We will discuss the following: Cryptography, Computer Security, OSI Security Architecture, Security Structure Scheme, Key Properties, Symmetric Encryption, Asymmetric Encryption, finally Our Book
https://mloey.github.io/courses/pmp2017.html
We will discuss the following: Project Management Processes, Initiating Process, Planning Process, Executing Process, Monitoring and controlling Process, Closing Process, Knowledge Areas, Project Management Process and Knowledge Area Mapping
https://mloey.github.io/courses/pmp2017.html
We will discuss the following: Organization, Organizational Structures, Functional Organization, Projectized Organization, Matrix Organization, Influence of Organizational Structures on Projects.
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
What is the purpose of the Sabbath Law in the Torah. It is interesting to compare how the context of the law shifts from Exodus to Deuteronomy. Who gets to rest, and why?
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
We all have good and bad thoughts from time to time and situation to situation. We are bombarded daily with spiraling thoughts(both negative and positive) creating all-consuming feel , making us difficult to manage with associated suffering. Good thoughts are like our Mob Signal (Positive thought) amidst noise(negative thought) in the atmosphere. Negative thoughts like noise outweigh positive thoughts. These thoughts often create unwanted confusion, trouble, stress and frustration in our mind as well as chaos in our physical world. Negative thoughts are also known as “distorted thinking”.
2. Analysis and Design of Algorithms
Analysis of Algorithms
Time complexity
Asymptotic Notations
Big O Notation
Growth Orders
Problems
3. Analysis and Design of Algorithms
Analysis of Algorithms is the determination of the
amount of time, storage and/or other resources necessary
to execute them.
Analyzing algorithms is called Asymptotic Analysis
Asymptotic Analysis evaluate the performance of an
algorithm
5. Analysis and Design of Algorithms
time complexity of an algorithm quantifies the amount of time taken
by an algorithm
We can have three cases to analyze an algorithm:
1) Worst Case
2) Average Case
3) Best Case
6. Analysis and Design of Algorithms
Assume the below algorithm using Python code:
7. Analysis and Design of Algorithms
Worst Case Analysis: In the worst case analysis, we calculate upper
bound on running time of an algorithm.
8. Analysis and Design of Algorithms
Worst Case Analysis: the case that causes maximum number of
operations to be executed.
For Linear Search, the worst case happens when the element to be
searched is not present in the array. (example : search for number
8)
2 3 5 4 1 7 6
9. Analysis and Design of Algorithms
Worst Case Analysis: When x is not present, the search() functions
compares it with all the elements of arr one by one.
10. Analysis and Design of Algorithms
The worst case time complexity of linear search would be O(n).
11. Analysis and Design of Algorithms
Average Case Analysis: we take all possible inputs and calculate
computing time for all of the inputs.
12. Analysis and Design of Algorithms
Best Case Analysis: calculate lower bound on running time of an
algorithm.
13. Analysis and Design of Algorithms
The best case time complexity of linear search would be O(1).
14. Analysis and Design of Algorithms
Best Case Analysis: the case that causes minimum number of
operations to be executed.
For Linear Search, the best case occurs when x is present at the first
location. (example : search for number 2)
So time complexity in the best case would be Θ(1)
2 3 5 4 1 7 6
15. Analysis and Design of Algorithms
Most of the times, we do worst case analysis to analyze algorithms.
The average case analysis is not easy to do in most of the practical
cases and it is rarely done.
The Best case analysis is bogus. Guaranteeing a lower bound on an
algorithm doesn’t provide any information.
16. Analysis and Design of Algorithms
1) Big O Notation: is an Asymptotic Notation for the worst case.
2) Ω Notation (omega notation): is an Asymptotic Notation for the
best case.
3) Θ Notation (theta notation) : is an Asymptotic Notation for the
worst case and the best case.
18. Analysis and Design of Algorithms
1) O(1)
Time complexity of a function (or set of statements) is considered as
O(1) if it doesn’t contain loop, recursion and call to any other non-
constant time function. For example swap() function has O(1) time
complexity.
19. Analysis and Design of Algorithms
A loop or recursion that runs a constant number of times is also
considered as O(1). For example the following loop is O(1).
20. Analysis and Design of Algorithms
2) O(n)
Time Complexity of a loop is considered as O(n) if the loop
variables is incremented / decremented by a constant amount. For
example the following loop statements have O(n) time complexity.
23. Analysis and Design of Algorithms
3) O(nc)
Time complexity of nested loops is equal to the number of times the
innermost statement is executed. For example the following loop
statements have O(n2) time complexity
26. Analysis and Design of Algorithms
4) O(Logn)
Time Complexity of a loop is considered as O(Logn) if the loop
variables is divided / multiplied by a constant amount.
28. Analysis and Design of Algorithms
5) O(LogLogn)
Time Complexity of a loop is considered as O(LogLogn) if the loop
variables is reduced / increased exponentially by a constant.
30. Analysis and Design of Algorithms
How to combine time complexities of consecutive loops?
Time complexity of above code is O(n) + O(m) which is O(n+m)
34. Analysis and Design of Algorithms
Find the complexity
of the below
program:
35. Analysis and Design of Algorithms
Solution: Time
Complexity O(n).
Even though the
inner loop is
bounded by n, but
due to break
statement it is
executing only once.
36. Analysis and Design of Algorithms
Find the complexity of the below program: