In this algorithm, 

Chosen values are used so that the probability of selecting each value is known and controlled.

e.g., Randomize Quick Sort

Probabilistic Algorithm : 

In this algorithm, an answer that is as précised as required in decimal notation is obtained. In other words, it specifies the error we are willing to accept.

Where We're Going : 

Learn general approaches to algorithm design 

  • Divide and conquer 
  • Greedy method 
  • Dynamic Programming
  • Basic Search and Traversal Technique
  • Graph Theory
  • Linear Programming
  • Approximation Algorithm
  • NP Problem

WeStudy this problem with these techniques can be applied to Sorting, Data retrieval, Network routing, Games, etc

What do we analyze about them? 

  • Correctness
  • Does the input/output relation match the algorithm requirement?
  • Amount of work done
  • Basic operations to do finite tasks amount of time 
  • Amount of space used
  • Memory used 

RAM Model

  • Has one processor
  • Executes one instruction at a time
  • Each instruction takes "unit time."
  • It has fixed-size operands, and
  • Has fixed-size storage (RAM and disk). 

Examples of Algorithm

 Classical Multiplication Algorithms

  • English
  • American
  • A la Russe 
  • Divide and Conquer


Running Time


Running time, also known as time complexity, is a measure of the efficiency of an algorithm or computer program. It refers to the amount of time required for an algorithm to complete its execution, usually expressed in terms of the number of operations or steps required by the algorithm.

The running time of an algorithm can vary depending on a number of factors, including the input size, the specific implementation of the algorithm, and the hardware or environment in which it is executed. 

For example, an algorithm with a running time of O(n) means that the number of operations required by the algorithm is proportional to the size of the input (n). An algorithm with a running time of O(n^2) means that the number of operations required by the algorithm is proportional to the square of the input size.

The running time of an algorithm is an important consideration in the design and analysis of computer programs, as it can have a significant impact on the performance and efficiency of the program. In general, algorithms with lower running times are more desirable, as they can complete their execution more quickly and with fewer resources.

There are various techniques and methodologies used to analyze the running time of algorithms, including empirical analysis, mathematical analysis, and experimentation. By understanding the running time of different algorithms, programmers can make informed decisions about which algorithms to use in different contexts, and optimize their programs for better performance and efficiency.

Experimental Studies


Write a program implementing the algorithm. Run the program with inputs of varying sizes and compositions. Use a method like System.currentTimeMillis() to accurately measure the actual running time. Plot the results.

Limitations of Experiments


Experiments are a widely used research method in many fields, including natural sciences, social sciences, and psychology. While experiments are valuable in providing a controlled environment for testing hypotheses, there are also several limitations associated with this research method.

  1. Artificiality: Experiments are often conducted in a controlled environment, which may not reflect the complexity and variability of real-world situations. The artificiality of experiments can limit the generalizability of findings to real-world scenarios.
  2. Ethical concerns: Some experiments may involve manipulating variables to elicit certain responses from participants, which can raise ethical concerns about the treatment of human or animal subjects.
  3. Cost and time constraints: Conducting experiments can be expensive and time-consuming, particularly if large sample sizes are required or if the experiment involves complex procedures or equipment.
  4. Demand characteristics: Participants in experiments may alter their behavior or responses based on their knowledge of the experiment's purpose or expectations, which can bias the results.
  5. Sample bias: The sample of participants in an experiment may not be representative of the broader population, which can limit the generalizability of findings.
  6. Hawthorne effect: Participants in an experiment may change their behavior with simply because they are being observed, which can also bias the results.

Overall, it is important for researchers to acknowledge the limitations of experiments and consider alternative research methods that may be better suited to addressing their research questions. By using a range of research methods and techniques, researchers can gain a more comprehensive understanding of the phenomena they are studying, while minimizing the potential limitations associated with any one method.

Theoretical Analysis

Theoretical Analysis is an approach in research and academic studies that involves the examination and deconstruction of theories, concepts, and ideas. It is a systematic process of critically analyzing and evaluating theoretical frameworks to gain a deeper understanding of a particular subject or phenomenon.

Theoretical Analysis typically involves the following steps:

  1. Identifying the theoretical framework: This involves determining the underlying assumptions, concepts, and ideas that are central to the theory being analyzed.
  2. Critically evaluating the theory: This involves examining the strengths and weaknesses of the theoretical framework, assessing its relevance, and identifying any gaps or limitations.
  3. Analyzing the implications of the theory: This involves exploring the practical implications of the theory, identifying its potential applications, and considering its impact on the field of study.
  4. Synthesizing the findings: This involves bringing together the various elements of the theoretical analysis to develop a comprehensive understanding of the theory being examined.

Theoretical Analysis is a valuable tool in academic research as it provides a means of critically evaluating existing theories and frameworks, identifying areas for further research, and generating new insights and ideas. It is particularly useful in interdisciplinary fields where multiple theoretical frameworks may be used to understand a particular phenomenon.

Overall, Theoretical Analysis plays a critical role in advancing knowledge and understanding in a wide range of fields, from social sciences and humanities to natural sciences and engineering. By critically evaluating and synthesizing existing theories, researchers can develop new insights and ideas that can lead to breakthrough discoveries and innovations.