Introduction-to-Analysis-of-Algorithms-2
Introduction-to-Analysis-of-Algorithms-2
Types of analysis:-
Worst-case − The maximum number of steps taken on any instance of size a.
Best-case − The minimum number of steps taken on any instance of size a.
Average case − An average number of steps taken on any instance of size a.
Amortized − A sequence of operations applied to the input of size a averaged over time.
1.Manufacturing: Algorithms are used to optimize production processes and supply chain
management, reducing waste and increasing efficiency.
2.Finance: Algorithms are used to analyze financial data and make predictions, enabling traders
and investors to make informed decisions.
3.Healthcare: Algorithms are used to process and analyze medical images, assist in diagnosing
diseases, and optimize treatment plans.4Retail: Algorithms are used for customer relationship
management, personalized product recommendations, and pricing optimization.
4.Transportation: Algorithms are used to optimize routes for delivery and transportation,
reducing fuel consumption and increasing delivery speed.
5.Energy: Algorithms are used to optimize energy generation, distribution, and consumption,
reducing waste and increasing efficiency.
6.Security: Algorithms are used to detect and prevent security threats, such as hacking, fraud, and
cyber-attacks.
In these and many other industries, algorithms play a crucial role in automating tasks,
improving decision-making, and enhancing overall performance and efficiency. Algorithms are
fundamental to computing and play a crucial role in many aspects of the field. Some of the key
needs and applications of algorithms in computing include:
1.Data processing: Algorithms are used to process and analyze large amounts of data, such as
sorting and searching algorithms.
2.Problem solving: Algorithms are used to solve computational problems, such as mathematical
problems, optimization problems, and decision-making problems.
3.Computer graphics: Algorithms are used to create and process images and graphics, such as
image compression algorithms and computer-generated graphics algorithms.
4.Artificial Intelligence: Algorithms are used to develop intelligent systems, such as machine
learning algorithms, natural language processing algorithms, and computer vision algorithms.
5.Database management: Algorithms are used to manage and organize large amounts of data in
databases, such as indexing algorithms and query optimization algorithms.
6.Network communication: Algorithms are used for efficient communication and data transfer
in networks, such as routing algorithms and error correction algorithms.
7.Operating systems: Algorithms are used in operating systems for tasks such as process
scheduling, memory management, and disk management.
Algorithm of Efficiency:-
There are some circumstances where the space/memory used must be analyzed. For
example, for large quantities of data or for embedded systems programming.
*******************************
ALGORITHM F(n)
//Computes n! recursively
if n = 0 return 1
*******************************
M(n-1) = M(n-2) + 1;
M(n-2) = M(n-3)+1
M(n) = [M(n-2)+1] + 1
= M(n-2) + 2
= [M(n-3)+1+2]
= M(n-3) + 3
=M(n-n) + n
=n
Overall time Complexity: O(n)
IC: M(1) = 1
...
...
M(n) = 2n-1 M(n-(n-1)) + 2n-1 -1 = 2n-1 M(1) + 2n-1 -1 = 2n-1 + 2n-1 -1 = 2n -1
M(n) ε Θ(2n)
Empirical analysis requires evidence to prove any theory. An empirical approach gathers
observable data and sets out a repeatable process to produce verifiable results. Empirical analysis
often requires statistical analysis to support a claim.
1. Observation. Initial observations of a phenomena are made. This sparks an idea or a
line of inquiry. Initial empirical data and research into existing information can be
done.
4. Testing. Quantitative and qualitative empirical data are gathered. The data is
examined, often with statistical analysis. The results can support, refute or be neutral
to the hypothesis. Because of the limits of empirical data and human perception, it is
not said that the results prove or disapprove the hypothesis, only that they support or
don't support it.
5. Evaluation. The reasoning, methodology and findings of the experiment are written
down, and the conclusions of the researcher are presented. Information relating to any
difficulties, challenges and limits of the test are also included. It may also include
further possible avenues of research.