CSE 3101 Design and Analysis of Algorithms
Solutions for Review Test for Unit 5
(Required, checked for completion, but not read or marked.)
Je Edmonds
Dont cheat by looking at these answers prematurely.
1. Stock Market Prices You are very lucky to have a
Static
St
ti E
Equilibrium:
ilib i
Whole Body and Joint Level
Chapter 13
Equilibrium
1
Review
Definition of centre of gravity (CG)
The point around which the mass and weight of a body
are balanced, no matter how the body is positioned
Methods of determi
COSC 3101A - Design and
Analysis of Algorithms
4
Quicksort
Medians and Order Statistics
Many of these slides are taken from Monica Nicolescu, Univ. of Nevada, Reno, [email protected]
Quicksort (1)
Sort an array A[pr]
A[pq1]
Divide
A[q+1r]
x
Partition the
COSC 3101A - Design and
Analysis of Algorithms
13
Maximum Flow
Taken from Kevin Waynes slides (Princeton University)
Contents
Contents.
Maximum flow problem.
Minimum cut problem.
Max-flow min-cut theorem.
Augmenting path algorithm.
Capacity-scaling.
Short
COSC 3101A - Design and
Analysis of Algorithms
14
NP-Completeness
Classes P and NP
Class P consists of decision problems that are
solvable in polynomial time:
O(nk), k constant
Class NP consists of problems that are
verifiable in polynomial time
Could
COSC 3101A - Design and
Analysis of Algorithms
2
Asymptotic Notations Continued
Proof of Correctness: Loop Invariant
Designing Algorithms: Divide and Conquer
Typical Running Time Functions
1(constant running time):
Instructions are executed once or a fe
COSC 3101A - Design and
Analysis of Algorithms
9
Knapsack Problem
Huffman Codes
Introduction to Graphs
Many of these slides are taken from Monica Nicolescu, Univ. of Nevada, Reno, [email protected]
The Knapsack Problem
The 0-1 knapsack problem
A thief r
COSC 3101A - Design and
Analysis of Algorithms
8
Elements of DP
Memoization
Longest Common Subsequence
Greedy Algorithms
Many of these slides are taken from Monica Nicolescu, Univ. of Nevada, Reno, [email protected]
Elements of Dynamic Programming
Optima
COSC 3101A - Design and
Analysis of Algorithms
7
Dynamic Programming
Assembly-Line Scheduling
Matrix-Chain Multiplication
Elements of DP
Many of these slides are taken from Monica Nicolescu, Univ. of Nevada, Reno, [email protected]
Dynamic Programming
An
COSC 3101A - Design and
Analysis of Algorithms
10
BFS, DFS
Topological Sort
Strongly Connected Components
Many of these slides are taken from Monica Nicolescu, Univ. of Nevada, Reno, [email protected]
Searching in a Graph
Graph searching = systematically
CSE3101
Solutions to the Midterm Test
Winter 2013
1.
Asymptotic notations & Summations:
Briefly show most simplified answers & the steps used to derive them.
a)
True/False:
= o + 2 log
True.
() is at least 0 and 2 log is at least log log .
b)
log
=1
=
Recursion
Jeff Edmonds
York University
Lecture 3
Multiplying
Recurrence Relations
Code
Stack of Stack Frames
Tree of Stack Frames
Friends and Strong Induction
Towers of Hanoi
Check List
Merge & Quick Sort
Simple Recursion on Trees
Generalizing the Problem
Recursive Back Tracking
&
Dynamic Programming
Jeff Edmonds York University
Lecture 7
COSC 31011
Techniques
Optimization Problems
A Sequence of Decisions
The Little Bird & Friend
Optimal Substructure
Memoization
Set of Sub-Instances
Tracing Dyn. Prog. Alg
COSC 3101A - Design and
Analysis of Algorithms
6
Lower Bounds for Sorting
Counting / Radix / Bucket Sort
Many of these slides are taken from Monica Nicolescu, Univ. of Nevada, Reno, [email protected]
Selection
General Selection Problem:
select the ith s
COSC3101A: Design and
Analysis of Algorithms
Tianying Ji
Lecture 1
Part 1
The course
General information
Introduction to algorithms
Algorithm analysis basics
Asymptotic notation
The Course
Purpose: The theoretical study of design and
analysis of algorith
24/02/2013
Linear Kinetics of Human
Movement
1
24/02/2013
Newtons Laws
2
24/02/2013
Objectives
Newtonss three laws
Review Newton
Understand application of Newtons laws
to biomechanics
3
24/02/2013
Sir Isaac Newton
A picture of Newtons own copy of Philos
Static
St
ti E
Equilibrium:
ilib i
Joint Level
Chapter 13
Equilibrium
1
Review
Static Equilibrium: A state characterized by
balanced forces and torques that occurs
when acceleration equals zero
Three conditions must be met for static
equilibrium:
Fx =
Free Body
F
B d Diagrams
Di
for Human Movement
1
Objectives
Understand how free body diagrams are
used
to construct a model of the forces acting on a
body
2
Purpose of a free body diagram
A free body diagram is a pictorial
representation of the left s
03/03/2013
Torque
Mechanical Action of Muscles
1
03/03/2013
To Think About.
Weight
GRFfriction
GRFpush
Above is shown the free body diagram of a
person jumping off flat ground.
If the p
person jumps
j p straight
g up,
p, would the
ground reaction force h
. Biomechanics of Human Movement
Objectives
Introduction to the
Biomechanics of
Human Movement
Lecture 2
Foundations for Analysis and Objective Observation
Review reference positions, planes, and axes
associated with the human body & joint
movement termin
. Biomechanics of Human Movement
Introduction to the
Biomechanics of Human
Movement
Lectures 5
Linear Kinematics
Kinesiology and Health Science
HH KINE 3030 3.0
Objectives
Linear Kinematics
Understand the definitions of displacement, distance,
velocity, s
Resistance to Angular Motion
Moment of Inertia
1
Objectives
Review
R i
and
d understand
d
d the
h relationships
l i
hi
between linear and angular motion
Discuss the similarities between linear and
g
versions of Newtons three laws
angular
Understand and
Objectives
Biomechanics of human
skeletal muscle
To understand essential biomechanics
of human skeletal muscle
musculotendinous unit
structural organization (motor units)
Dr. Anne Moore
Skeletal muscle function
Change length with tension development
09/03/2014
Gravity
G
it
Centre of Gravity
1
09/03/2014
Objectives
Define and understand the concept of centre
of gravity (CG)
Review equations to calculate CG
Solve basic sample problem related to
locating CG
Understand application of CG to study of
b
. Biomechanics of Human Movement
Todays Objectives
Introduction to the
Biomechanics of
Human Movement
o
Course Administration
o
Describe the typical scientific inquiry
addressed by biomechanists
o
Define biomechanics, statics, dynamics,
kinematics and kin
. Biomechanics of Human Movement
Introduction to the
Biomechanics of Human
Movement
Lectures 4
Kinetic Framework
Last Week
Define Biomechanics, Kinetics, Kinematics,
Static, Dynamic
Kinematic Framework
Cartesian Coordinate system
Translation vs. Rotatio
2016-02-28
Friction
Ground Reaction Force
1
2016-02-28
Review
Newtons 3 Laws of Motion as applied to
Human Movement
Definition and purpose of free body
diagrams
5 steps to creating a free body diagram
Common forces in analyzing human
movement
2
2016-0
COSC 3101A - Design and
Analysis of Algorithms
3
Recurrences
Masters Method
Heapsort and Priority Queue
Many of the slides are taken from Monica Nicolescus slides, Univ. Nevada, Reno, [email protected]
Fibonacci numbers
Leonardo Pisano
Born: 1170 in (prob