Analysis of Algorithms
Lecture 2
Basic Operations
A basic operation is an operation whose execution time is bounded above by a constant.
We are only concerned with execution time of an algorithm defined within a
multiplicative constant, thus it is the num

CSC 382
Project 2
Average Case
In this project we will try to match the Average Case of algorithm A5 as we calculated in class
and the Real Average of the algorithm.
A5: int Find (int x, int A[ ], int n) / array of size n
cfw_ int j;
for (j=0; j < n; j+)

Graph A graph G=(V,E) is an ordered pair in which V is a finite
set of elements called vertices and E is a set of ordered pairs of
vertices called edges.
Subgraph - A subgraph G=(V,E) of a graph G=(V,E), is a graph
such that V V, and E E.
Spanning Subgrap

/Cynthia Murillo
/28 February 2012
/CSC 382
/Lab 2 - This program calculates the average case of algorithm A5 and the real average of the
algorithm
#include <iostream>
using namespace std;
int Find(int x, int n, int A[]);
void calcAverages(int bound);
int

ANALYSIS OF ALGORITHMS
Dijkstras shortest path algorithm
A more realistic version of a graph is when we assign weights to the edges representing cost,
distance, etc.
A weighted graph G=(V,E,W), where W:E, that is each edge is assigned a real-valued weight

ANALYSIS OF ALGORITHMS
Graph Theory
Concepts
Definition 1- A graph G=(V,E) , is an order pair, where V is a finite set whose elements are called
vertices, and where E is a set of unordered pairs of distinct vertices of V, called edges.
v1
v2
V=cfw_v1, v2,

/ChristieAnn Sitro
/CSC382 Project 3
/The program will run the "average case" of algorithm
/A10 and the "real average" of the algorithm using
/the Monte Carlo approach.
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <ctime>
using namespa