PROGRAMMING 1 – REPORT ACKNOWLEDGEMENT: THE SLIDES ARE PREPARED FROM SLIDES PROVIDED BY NANCY M. AMATO AND JORY DENNY 1.

Slides:



Advertisements
Similar presentations
CSCE 2100: Computing Foundations 1 Running Time of Programs
Advertisements

the fourth iteration of this loop is shown here
CSC401 – Analysis of Algorithms Lecture Notes 1 Introduction
© 2004 Goodrich, Tamassia 1 Lecture 01 Algorithm Analysis Topics Basic concepts Theoretical Analysis Concept of big-oh Choose lower order algorithms Relatives.
Introduction to Analysis of Algorithms
Analysis of Algorithms Algorithm Input Output. Analysis of Algorithms2 Outline and Reading Running time (§1.1) Pseudo-code (§1.1) Counting primitive operations.
Complexity Analysis (Part I)
Analysis of Algorithms (Chapter 4)
Complexity Analysis (Part I)
Analysis of Algorithms1 Estimate the running time Estimate the memory space required. Time and space depend on the input size.
Analysis of Algorithms
Analysis of Algorithms (pt 2) (Chapter 4) COMP53 Oct 3, 2007.
Fall 2006CSC311: Data Structures1 Chapter 4 Analysis Tools Objectives –Experiment analysis of algorithms and limitations –Theoretical Analysis of algorithms.
Analysis of Performance
Analysis of Algorithms Algorithm Input Output © 2014 Goodrich, Tamassia, Goldwasser1Analysis of Algorithms Presentation for use with the textbook Data.
Chapter 1 Algorithm Analysis
Lecture 8. How to Form Recursive relations 1. Recap Asymptotic analysis helps to highlight the order of growth of functions to compare algorithms Common.
Analysis Tools Jyh-Shing Roger Jang ( 張智星 ) CSIE Dept, National Taiwan University.
Analysis of Algorithms1 The Goal of the Course Design “good” data structures and algorithms Data structure is a systematic way of organizing and accessing.
Algorithm Input Output An algorithm is a step-by-step procedure for solving a problem in a finite amount of time. Chapter 4. Algorithm Analysis (complexity)
Analysis of Algorithms These slides are a modified version of the slides used by Prof. Eltabakh in his offering of CS2223 in D term 2013.
1 7.Algorithm Efficiency What to measure? Space utilization: amount of memory required  Time efficiency: amount of time required to process the data.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
1 Dr. J. Michael Moore Data Structures and Algorithms CSCE 221 Adapted from slides provided with the textbook, Nancy Amato, and Scott Schaefer.
Program Efficiency & Complexity Analysis. Algorithm Review An algorithm is a definite procedure for solving a problem in finite number of steps Algorithm.
Big Oh CS 244 Brent M. Dingle, Ph.D. Game Design and Development Program Department of Mathematics, Statistics, and Computer Science University of Wisconsin.
Chapter 10 Algorithm Analysis.  Introduction  Generalizing Running Time  Doing a Timing Analysis  Big-Oh Notation  Analyzing Some Simple Programs.
DATA STRUCTURES AND ALGORITHMS Lecture Notes 2 Prepared by İnanç TAHRALI.
Analysis of algorithms. What are we going to learn? Need to say that some algorithms are “better” than others Criteria for evaluation Structure of programs.
Observation Inference Variables Problem Statement or Purpose IV DV Levels of IV Units of Measurement Constants Hypothesis Materials Procedure Data Data.
Algorithm Analysis Algorithm Analysis Lectures 3 & 4 Resources Data Structures & Algorithms Analysis in C++ (MAW): Chap. 2 Introduction to Algorithms (Cormen,
Algorithm Analysis (Big O)
1 Chapter 2 Algorithm Analysis All sections. 2 Complexity Analysis Measures efficiency (time and memory) of algorithms and programs –Can be used for the.
Announcement We will have a 10 minutes Quiz on Feb. 4 at the end of the lecture. The quiz is about Big O notation. The weight of this quiz is 3% (please.
1 Chapter 2 Algorithm Analysis Reading: Chapter 2.
GC 211:Data Structures Week 2: Algorithm Analysis Tools Slides are borrowed from Mr. Mohammad Alqahtani.
1 COMP9024: Data Structures and Algorithms Week Two: Analysis of Algorithms Hui Wu Session 2, 2014
CSE 3358 NOTE SET 2 Data Structures and Algorithms 1.
(Complexity) Analysis of Algorithms Algorithm Input Output 1Analysis of Algorithms.
Complexity Analysis (Part I)
Analysis of Algorithms
Chapter 2 Algorithm Analysis
Advanced Algorithms Analysis and Design
COMP9024: Data Structures and Algorithms
COMP9024: Data Structures and Algorithms
GC 211:Data Structures Week 2: Algorithm Analysis Tools
GC 211:Data Structures Algorithm Analysis Tools
Big-O notation.
Complexity analysis.
Analysis of Algorithms
COMP9024: Data Structures and Algorithms
Analysis of Algorithms
Analysis of Algorithms
Analysis of Algorithms
Big-Oh and Execution Time: A Review
Objective of This Course
GC 211:Data Structures Algorithm Analysis Tools
Analysis of Algorithms
Analysis of Algorithms
Analysis of Algorithms
Analysis of Algorithms
Analysis of Algorithms
Measuring Experimental Performance
Asymptotic Analysis.
Analysis of Algorithms
CS210- Lecture 2 Jun 2, 2005 Announcements Questions
Complexity Analysis (Part I)
Analysis of Algorithms
Complexity Analysis (Part I)
Presentation transcript:

PROGRAMMING 1 – REPORT ACKNOWLEDGEMENT: THE SLIDES ARE PREPARED FROM SLIDES PROVIDED BY NANCY M. AMATO AND JORY DENNY 1

SECTIONS IN YOUR REPORT  Introduction  Implementation details  Theoretical analysis  Experimental setup  Results and Discussion  Conclusion 2

EXAMPLE PROBLEM  Sum of numbers stored in a vector 3

INTRODUCTION  Problem statement  Summary of what you learnt through this assignment  Summary of results you found  Comment on any comparison result and your inference (ie., which is the best in which scenario). 4

INTRODUCTION  Problem statement  Summary of what you learnt through this assignment  Summary of results you found  Comment on any comparison result and your inference (ie., which is the best in which scenario).  “In this assignment, we study the addition of numbers stored in a vector”…  “While doing the assignment, I learnt how to use iterators”….  “ The experiments show that adding numbers stored in vector takes O(n) time, where n is the number of elements in the vector.”…. 5

IMPLEMENTATION DETAILS  Details about the containers and functions you implemented  Containers: What’s the underlying data structure for the continer  Functions: Major functions especially ones directly used in experiments or related to them.  Your thoughts and progress 6

IMPLEMENTATION DETAILS  Details about the containers and functions you implemented  Containers: What’s the underlying data structure for the continer  Functions: Major functions especially ones directly used in experiments or related to them.  Your thoughts and progress  “I first constructed a vector to store all the numbers. Then I implemented the sum of all the numbers stored in the vector. The function takes vector as input and returns the sum as result. ….” 7

THEORETICAL ANALYSIS  Discuss about the time complexity of the functions you are about to analyze in the experiments.  Comment on the justification for the complexity 8

THEORETICAL ANALYSIS  Discuss about the time complexity of the functions you are about to analyze in the experiments.  Comment on the justification for the complexity  “ In theory, adding elements stored in the vector requires traversing through the vector making it an O(n) operation”. 9

EXPERIMENTAL SETUP  Machine specification: OS, RAM, etc. (only if you are using a machine other than linux.cse.tamu.edu)  Input sizes you conducted your experiments  Any parameters you set 10

EXPERIMENTAL SETUP  Machine specification: OS, RAM, etc. (only if you are using a machine other than linux.cse.tamu.edu)  Input sizes you conducted your experiments  Any parameters you set (eg., increment size in incremental strategy)  “linux.cse.tamu.edu” …  “ Input sizes used in the experiments: 2^1, 2^2,…,2^23” 11

RESULTS AND DISCUSSION  Plot the experimental data (ie., mostly time)  For comparison plot, you can use a single plot with different line legends  Discuss what you infer from the plot  General trends shown in the plots  Any anomalies you observe and try to find a reason for it.  Big Oh constants from Big Oh plots 12

RESULTS AND DISCUSSION  Plot the experimental data (ie., mostly time)  For comparison plot, you can use a single plot with different line legends  Discuss what you infer from the plot  General trends shown in the plots  Any anomalies you observe and try to find a reason for it.  Big Oh constants from Big Oh plots  “In the above plot, we plot the total time (y-axis) taken to calculate the sum of elements in a vector of varied sizes (x-axis). As shown in the plot, the calculation of sum of elements stored in vector shows a linear trend i.e., O(n)….” 13 Size

AVERAGE TIME  For functions like push_back, we compute the total time for n push operations  While plotting, we plot the average time instead of total time with respect to varying size  Average time, i.e., (Total Time /Total Size) vs. Total Size 14

BIG OH CONSTANTS  Actual or experimental time f(n)  Big oh complexity: O(g(n)), c*g(n) > f(n) for n>n0  Big Oh constants to find : c, n0  Plot (Average Time/Theoretical Time) (y-axis) vs. Size(x-axis)  c = where in y-axis levels and becomes || to x-axis  n0 = where in x-axis, the line becomes || to x-axis 15

CONCLUSION  Summary of results you found  Summary of inference you drawn  Your thought (if any) about what you learnt and others. 16