4/13/2017
Recall the Topological Sorting Problem in DAG
Recall:
A DAG: a directed acyclic graph, i.e. a directed graph with no
(directed) cycles
Topological Sorting: Determine a linear ordering of the vertices of a
DAG so that for every edge, its starti
4/4/2017
Course Introduction
Why Algorithms
Essential for design and development
Impact
Problem solving skills
Content: Design and analysis of algorithms
Brute force, exhaustive search, and graph algorithms
Decrease, Transform, Divide and Conquer
Greedy
5/11/2017
Dynamic Programming History
Dynamic Programming is a general algorithm design technique
for solving (mostly optimization) problems defined by recurrences
with overlapping subproblems.
Bellman. Pioneered the systematic study of dynamic programm
4/24/2017
Divide-and-Conquer
The most-well known algorithm design strategy:
Divide instance of problem into two or more smaller
instances
Solve smaller instances recursively (can implement
iteratively)
Obtain solution to original (larger) instance by
4/13/2017
Brute Force
A straightforward approach, usually based directly on the
problems statement and definitions of the concepts
involved
Simple Examples:
1. Computing an (a > 0, n a nonnegative integer)
2. Computing n!
3. Multiplying two matrices
4. Se
4/13/2017
Heaps Efficiently Implement Priority Queues
Heap is an efficient way of supporting an algorithm that requires
repeatedly finding the maximum (or minimum) of a data set.
In particular, heaps support
Remove max O(log n) time
Insert O(log n) ti
5/5/2017
Greedy Technique
Constructs a solution to an optimization problem
piece by piece through a sequence of choices that
are:
feasible
locally optimal
irrevocable
For some problems, yields an optimal solution for
every instance.
For some problem
4/13/2017
Heap Construction: Top-down
Start with empty heap and repeatedly insert elements
Worst case performance = Theta(n log n)
Can you see why? Can you justify the following statements
Each drift up of the final n/2 elements inserted takes log (n/
4/21/2017
Sorting and Selection
Goals
Understand how efficient partitioning algorithm and Divide and
Conquer lead to very efficient algorithms for two important
problems
Two partitioning algorithms
Lomuto: Easier to implement correctly
Hoare: Generall
-This is a design file
entity Recipes is
Port ( Temp : in std_logic_vector (5 downto 0);
Cheese : in std_logic_vector (4 downto 0);
Meat : in std_logic_vector (3 downto 0);
Parsley : in std_logic;
EggBeater : in std_logic;
Egg : in std_logic;
FreeRnn 1: Di ital Desi 1
Chapter Exercises
1) Why are simple registeis typically associated with D ip-ops? Would it be possible to : J :
construct t1 legistei using something such as a T or JK flip- op? Briey explain. ' I .
4e: 1041 cm.) 1100 NH 01 o F
EI -
I i.
FraeRm cDi ital Desi n . ii
. 53- III, ii'
Chapter Exercises I i ii 3 hli 51:5 I .
.i 'i' : I |'.1 Ii
1) In your own words, describe what is meant by the term random access in the context ofgcompute! .11 - i
. ' . . | |
lnemones. wqu wcl l) OV [
Name: 50L UTlO NS
CPE 133 Fall 2012 Exam 1
Show your work and state any assumptions you make for full credit. Point value of problems is listed after problem
number (60 pts). Please read the problems carefully.
1. Function Forms and Logic Gates (15)
a) (1
Name: SDL U T) l0 S
CPE 133 Fall 2011 Exam 1
Open book and notes. Show your work and state any assumptions you make for full credit. Point value of problems is
listed after problem number (100 pts). Please read the problems carefully. Be good.
1. (15) Wri
Name: E
CPE 133 Fall 2011 Exam3
Open book, notes, and computer. Show your work and state any assumptions for full credit. Point value of problems is
listed after problem number (100 pts). Please read the problems caredly. Have even more fun.
1. (10) Desi
Name: :SOL U TIQU
CPE 133 Fa112015 Practice Midterm
Closed book. Closed notes. No Calculators. Show your work and state any assumptions you make.
1. (4) Number Conversions
a) Convert (AFB)15 0 octa
[Oi m1 IOII :@
19) Convert (UOOIFDIIFOODBCD to hexadecima
Name:
CPE 133 Fall 2015 Practice Midterm
Closed book. Closed notes. No Calculators. Show your work and state any assumptions you make.
1.
(4) Number Conversions
a) Convert (AFB) 16 to octal
b) Convert (000100111001) BCD to hexadecimal
c) Convert (231) 4 t
CPE 103 Fall 2015
Assignment 1
Kearns
Railroad/Stack Permutations
Due: October 1
You have been hired by Fly-by-night, Inc. to write a computer program to manage their freight terminal.
Pictured below is the terminus of a railroad line. The horizontal trac
CSC 202, Spring 2017, Quiz 2
Name:
Write down the answers in the space provided.
You may use all forms that you know from
your homework.
If you need a method and you dont know
whether it is provided, define it.
Its always okay to add helper functions.
CSC 202, Spring 2017, Quiz 3
Name:
Write down the answers in the space provided.
You may use all forms that you know from
your homework.
If you need a method and you dont know
whether it is provided, define it.
Its always okay to add helper functions.
CSC 202, Spring 2017, Quiz 1
Name:
Write down the answers in the space provided.
You may use all forms that you know from
your homework.
If you need a method and you dont know
whether it is provided, define it.
Its always okay to add helper functions.
- Company: RAT Technologies
- Engineer: James Ratner
- Create Date:
13:55:34 04/06/2014
- Design Name:
- Module Name:
Mux - Behavioral
- Project Name:
- Target Devices:
- Tool versions:
- Description: Full featured D Flip-flop intended for use as flag reg