Classwork:
1. At classroomSalon.com:
Video 11.3 has questions.
Please type “done” in edmodo.com when you are finished.
2. At edmodo.com:
Hash Attack
Homework:
Bad Hash Function
Parking Problem
NOTE: Classroomsalom.com has gone mobil now!!!!
Classwork:
1. At classroomSalon.com:
Video 11.1 has questions.
Please type “done” in edmodo.com when you are finished.
2. At edmodo.com:
Uniform hashing assumptions:
From Video 11.1:
Coupon collector. Suppose that you have a shuffled deck of cards and you turn them face up, one by one. How many cards do you need to turn up before you have seen one of each suit? This is an example of the famous coupon collector problem. In general, suppose that a trading card company issues trading cards with N different possible cards: how many do you have to collect before you have all N possibilities, assuming that each possibility is equally likely for each card that you collect?
Illustrate the assumption made in the video either mathematically or with program YI_CouponCollector.
NOTE: Be clear and concise
Homework:
At classroomSalon.com:
Video 11.2 has questions.
Please type “done” in edmodo.com when you are finished.
NOTE: Classroomsalom.com has gone mobil now!!!!
Classwork:
Visit edmodo.com to ask and reply more questions about Point2D.java, RectHV.java and PointsST.
You will be graded based on your questions content and clear and meaningful explanations.
Homework:
Work on programming assignment.
Be prepared to answer questions tomorrow. Some of them will be based on Joshua Hug videos.
February 16th, 2016
Glossary. Here are some definitions that we use.
1. A self-loop is an edge that connects a vertex to itself.
2. Two edges are parallel if they connect the same pair of vertices.
3. When an edge connects two vertices, we say that the vertices are adjacent to one another and that the edge is incident on both vertices.
4. The degree of a vertex is the number of edges incident on it.
5. A subgraph is a subset of a graph’s edges (and associated vertices) that constitutes a graph.
6. A path in a graph is a sequence of vertices connected by edges. A simple path is one with no repeated vertices.
7. A cycle is a path (with at least one edge) whose first and last vertices are the same. A simple cycle is a cycle with no repeated edges or vertices (except the requisite repetition of the first and last vertices).
8. The length of a path or a cycle is its number of edges.
9. We say that one vertex is connected to another if there exists a path that contains both of them.
10. A graph is connected if there is a path from every vertex to every other vertex.
11. A graph that is not connected consists of a set of connected components, which are maximal connected subgraphs.
12. An acyclic graph is a graph with no cycles.
13. A tree is an acyclic connected graph.
14. A forest is a disjoint set of trees.
15. A spanning tree of a connected graph is a subgraph that contains all of that graph’s vertices and is a single tree.
16. A spanning forest of a graph is the union of the spanning trees of its connected components.
17. A bipartite graph is a graph whose vertices we can divide into two sets such that all edges connect a vertex in one set with a vertex in the other set.
Robert Sedgewick and Kevin Wayne.
Classwork:
Video: Watch 14.1 and 14.2 in classroomsalon.com and answer the questions.
Homework
Undirected Graphs – Ex 4.1.4-4.1.6
January 5th, 2015
Due date: 1/8/2015
Homework:
Histogram of running times. Write a program that takes command-line arguments N and T, does T trials of the experiment of running quicksort on an array of N random Double values, and plots a histogram of the observed running times. Run your program for N = 10^3, 10^4, 10^5, and 10^6, with T as large as you can afford to make the curves smooth. Your main challenge for this exercise is to appropriately scale the experimental results.
January 3rd, 2017
Decimal vs Binary
Here are some equivalent values:
2 Methods for binary-decimal conversions
Octal to Hexadecimal conversion
Check edmodo.com for exercises.