Exploration Sessions
Tuesdays, 3:30 in room MOR 230

Each week we will offer a different opportunity to explore extra topics in computer science. There will be a homework assigned each week. You will accumulate one "exploration point" for each week that you attend the lecture and do the homework. At the end of the quarter, your total exploration points will be divided by 3 and will be added to your homework points. There will be 170 homework points total, so this isn't adding a lot to your potential score. As an example, if you were to participate in 3 exploration sessions, you would have 1 point added to your homework points, which is like getting one more point on a weekly programming assignment. The idea is to give people a small reward, but not something that is so large that people feel obligated to participate in these optional sessions.

Week 9 - 5/31/2011

There will not be an Exporation Section this week.

Week 8 (Machine Learning) - 5/24/2011 icon Turn in Exploration HW8 here.

This week we will be talking about machine learning. In particular we will learn about two very interesting ideas, decision trees and neural networks. These techniques can be used to learn very complicated functions on a vast number of kinds of data

Files: Homework: (due by Friday, 6/3 3 pm via the link above)

For your assignment this week, do the following. If a perceptron takes two boolean values inputs x and y, what weights and threshold must the perceptron use to achieve an output that is consistent with the NAND function. Let w1 be the weight associated with x, w2 be the weight associated with y and b be the threshold of the perceptron. The NAND function is the negation of the AND function and has the following truth table:

True False
True False True
False True True

Turn in a file called lastname_firstname_eshw8.pdf or eshw.doc to the link above.

Week 7 (Python Objects) - 5/17/2011 icon Turn in Exploration HW7 here.

This week we will be talking about objects and inheritance in Python.

Files: Homework: (due by Tuesday, 5/24 3 pm via the link above)

For your assignment this week, create a Python class called Point3d that extends the above Point class and that contains the following functions:

  • __init__(self, x, y, z) - a constructor for Point3d that
  • distance(p1, p2) - takes two Point3d objects as parameters and returns the distance between them (notice that there is no self parameter, what does that mean).
  • distanceFromOrigin(self) - returns the distance between this Point3d and the origin (notice the self parameter, what does that mean).
  • __add__(self, other) - takes another Point3d as a parameter and returns a new Point3d whose components are the sums of the components of this Point3d and other.
  • __str__(self) - returns a string representation of this Point3d of the form "(x,y,z)".
and the following static field:
  • origin - the 3 dimensional origin.
Turn in point3d.py with the link above.

Week 6 - 5/10/2011

There will not be an Exporation Section this week due to the midterm.

Week 5 (Functional Python) - 5/3/2011 icon Turn in Exploration HW5 here.

This week we will be talking about functional programming in the context of Python. Functional programming is a powerful flavor of programming that is drastically different from the iterative approach we are used to in Java.

Files: Homework: (due by Tuesday, 5/10 3 pm via the link above)

For your assignment this week, create a Python file called badgerfunctions.py that contains the following functions:

  • badger1(n) - returns a string that is "Badger" n times. Write this function in the usual way with the def keyword (think about string multiplication).
  • badger2(n) - returns a string that is "Badger" n times. Write this function without using the def keyword (think lambda functions).
  • badger3(n) - returns a string that is "Badger" n times. Write this function without using the def keyword or lambda functions (think about partials).
Turn in badgerfunctions.py with the link above.

Week 4 (Python Basics) - 4/26/2011 icon Turn in Exploration HW4 here.

This week will get a whirlwind tour of the basics of Python, a popular scripting language. In many ways Python is simpler to write

Files: More information: Homework: (due by Tuesday, 5/3 3 pm via the link above)

For your assignment this week, create a Python file called sortedlistmethods.py that contains the following methods. Define the following operations on your list:

  • size(list) - returns the number of elements stored in the list
  • max(list) - return the maximum element from the list; if list is empty, raises an exception
  • min(list) - return the minimum element from the list; if list is empty, raises an exception
  • remove(list, index) - removes the value at the given index; if index is not valid, raises an exception
  • indexOf(list, value) - searches the list for a value using binary search. Returns an index of the value if the value is in the list, or -1 if it is not.
  • contains(list, value) - searches the list for a value using binary search. Returns True if the value is in the list, False if it is not.
  • add(list, value) - adds given value in sorted order
  • removeDuplicates(list) - removes all duplicate values from a list so that the resulting list has only unique values. For example, for list = [1,1,2,2,2,3,4,4], a call removeDuplicates(list) will result in list storing [1,2,3,4]

To throw ("raise") an exception in Python, write the following:

	raise Exception("your error message here")
	

The list methods discussed in the documentation may be useful for deleting values (del) and working with lists. Also check out bisect.

Feel free to look back at your SortedIntList.java for the algorithms to do these operations. Next week, when we learn about classes, you will make a sortedlist class using these methods as the basis.

To do a binary search in Python, use the bisect, bisect_left, or insort functions. Documentation for these functions is at the link below. To use them, remember to write: from bisect import *

Since the provided testlistmethods.py is not a very good or exhaustive test, you are encouraged to write your own testing code to make sure your list works. If you like, you can turn in your own testlistmethods.py. You should make sure that your code works with our testlistmethods.py though.

Files:

Turn in sortedlistmethods.py with the link above.

Week 3 (Human Computation) - 4/19/2011 icon Turn in Exploration HW3 here.

This week we will be thinking about the power of human computation. In what ways are humans computationally better or more efficient than computers. Can we leverage this fact toward any useful end? We will take a look at some of the ways that people are already doing this to improve accessibility and our ability to search.

More information: Files: Homework: (due by Tuesday, 4/26 3 pm via the link above)

Visit Google reCAPTCHA and complete a few of the reCPATCHA tests. Your should successfully complete 3 text CAPTCHAs and 2 audio CAPTCHAs and record your responses. You should turn in a file named lastname_firstname_eshw3.pdf to the dropbox linked above.

Week 2 (Searching and Google) - 4/12/2011 icon Turn in Exploration HW2 here.

This week we will be exploring searching. What exactly does Google do and why is it such a big deal? What problems can arise in this field? We will examine Google's PageRank algorithm and see how it helps refine the effectiveness of an Inverted Index. We will see that building an Inverted Index uses the same Collections ideas we have been discussing in class.

More information: Files: Homework: (due by Tuesday, 4/19 3 pm via the link above)

Visit Google Insights and play with the tool. Record your answers in a file named Homework2.doc or Homework2.pdf and turn it in with the link above. Find a search term that satisfies each of the following conditions (you should have 6 separate search terms):

  • there is a steady increase in the term's interest over time
  • there is a steady decrease in the term's interest over time
  • there is a single sharp peak somewhere in the term's interest over time
  • the highest regional interest in the term is from Australia
  • an image search term with consistent interest over time
  • a product search term that has gained significant interest in the last year

Week 1 (Computing Security) - 4/5/2011 icon Turn in Exploration HW1 here.

This week we will be talking about computer security. What does it mean for a computer to be "secure"? How are modern day computer's secured? We will be focusing on CritterMain as a small case Study. Are/were there vulnerabilities in CritterMain? We will be exploring the security of CritterMain while investigating the issues that come up with computer security in general and what do to solve these issues.

More information: Homework: (due by Tuesday, 4/12 3 pm via the link above)

Install Firefox and the Piigeon plugin. Piigeon allows you to see whether login credentials for a given website are encrypted or not by simply hovering over the submit button. Snoop around the internet and find 2 websites that do not have encrypted login information and 4 websites that do encrypt the login information.

Record your answers in a file named Homework1.doc or Homework1.pdf and turn it in with the link above.