Wednesday, September 29, 2010
Wednesday, September 22, 2010
22 Sept, 2010: Lecture 5
A few tools to navigate through your curriculum, and monitor your progress towards your degree.
1. Presentation on DARS
2. Major Maps
3. Major Search
Although these look like zip files, they are .pptx.
Just open them with Powerpoint.
-Aviral
1. Presentation on DARS
2. Major Maps
3. Major Search
Although these look like zip files, they are .pptx.
Just open them with Powerpoint.
-Aviral
Homework from the class of Sept 22, 2010
Write a routine to test if a given list of numbers is sorted
IsSorted(n, a1, a2, …, an)
{
// return YES if a1, … an is sorted
// else return NO
}
Your algorithm should work for any 'n', any set of numbers, a1, ...., an, and for any permutation of numbers a1,... an, AND should finish in finite time.
Then answer the following questions
–Why will your solution work for any n?
–Why will your solution work for any given set of numbers?
–Why will your solution work for any permutation of those numbers?
–Why will your solution finish in finite time?
Deadline: Sunday, Sept 26, 2010.
IsSorted(n, a1, a2, …, an)
{
// return YES if a1, … an is sorted
// else return NO
}
Your algorithm should work for any 'n', any set of numbers, a1, ...., an, and for any permutation of numbers a1,... an, AND should finish in finite time.
Then answer the following questions
–Why will your solution work for any n?
–Why will your solution work for any given set of numbers?
–Why will your solution work for any permutation of those numbers?
–Why will your solution finish in finite time?
Deadline: Sunday, Sept 26, 2010.
Thursday, September 16, 2010
Homework from the class of Sept 15, 2010
As discussed in the class, here is the homework for this week.
Write an algorithm to search for a number in a list of given numbers.
Write an algorithm to search for a number in a list of given numbers.
–Should take a list of numbers a1, a2, ... an, and a key "k" as input.
–Should return "YES" if the k is the same as one of a1, ... an, else return "NO".
Also write a proof of correctness and proof of finiteness
Deadline: Sunday, Sept 19, 2010.
Monday, September 13, 2010
Comments on homework 2.
Hi all,
I had a look at HW2. Most of you have done it.
I have written some comments. See if you need to do something more.
-Aviral
I had a look at HW2. Most of you have done it.
I have written some comments. See if you need to do something more.
-Aviral
Thursday, September 9, 2010
Homework from the class of Sept 08, 2010
I need you to formally write an algorithm to compute the max. of a given list of numbers.
Also I want you to argue that your algorithm
1. will terminate
2. will produce the correct results for any set of numbers.
Please finish this by Sunday, I will check the blog posts very early on the morning of Monday, and assign grades.
See you in the class, next Wednesday.
- Aviral
Also I want you to argue that your algorithm
1. will terminate
2. will produce the correct results for any set of numbers.
Please finish this by Sunday, I will check the blog posts very early on the morning of Monday, and assign grades.
See you in the class, next Wednesday.
- Aviral
Subscribe to:
Comments (Atom)