\( \newcommand{\blah}{blah-blah-blah} \newcommand{\eqb}[1]{\begin{eqnarray*}#1\end{eqnarray*}} \newcommand{\eqbn}[1]{\begin{eqnarray}#1\end{eqnarray}} \newcommand{\bb}[1]{\mathbf{#1}} \newcommand{\mat}[1]{\begin{bmatrix}#1\end{bmatrix}} \newcommand{\nchoose}[2]{\left(\begin{array}{c} #1 \\ #2 \end{array}\right)} \newcommand{\defn}{\stackrel{\vartriangle}{=}} \newcommand{\rvectwo}[2]{\left(\begin{array}{c} #1 \\ #2 \end{array}\right)} \newcommand{\rvecthree}[3]{\left(\begin{array}{r} #1 \\ #2\\ #3\end{array}\right)} \newcommand{\rvecdots}[3]{\left(\begin{array}{r} #1 \\ #2\\ \vdots\\ #3\end{array}\right)} \newcommand{\vectwo}[2]{\left[\begin{array}{r} #1\\#2\end{array}\right]} \newcommand{\vecthree}[3]{\left[\begin{array}{r} #1 \\ #2\\ #3\end{array}\right]} \newcommand{\vecdots}[3]{\left[\begin{array}{r} #1 \\ #2\\ \vdots\\ #3\end{array}\right]} \newcommand{\eql}{\;\; = \;\;} \definecolor{dkblue}{RGB}{0,0,120} \definecolor{dkred}{RGB}{120,0,0} \definecolor{dkgreen}{RGB}{0,120,0} \)


Module 0: Introduction


0.1   First of three problems: Robotics

 

In-Class Exercise 1: Download, compile and execute Arm.java. You will see a robotic arm and a circular (green) target hidden behind some (red) obstacles. You can click on a (blue) joint and move it. Goal: move the arm so that the tip of the arm touches the target without touching the obstacles, and while remaining entirely within the drawing space.
 

In-Class Exercise 2: Download carSim.jar, unpack and execute CarGUI by typing java CarGUI manual at the command-line.

 

In-Class Exercise 3: Next, write your own controller:

 

In-Class Exercise 4: How would one define a robot? Is a coffee-maker a robot? A vending machine?
 

In-Class Exercise 5: Identify some creative and possibly futuristic applications of robots. Write down a list of computer-science challenges to be addressed in developing such applications. Write down examples of robotics problems that you consider "easy" or "solved".
 


0.2   Second of three problems: Simulation

 

We actually did see an example of simulation already: the physical modeling and simulation of car movement.

Next, consider a simple inventory system:

 

In-Class Exercise 6: Identify (qualitatively) the tradeoffs between lost-customers and holding costs:

 

In-Class Exercise 7: Download Inventory.java, UniformRandom.java and stick.png. Then compile and execute Inventory.java. Try these values (click "reset" for each):

What do you observe?
 

In-Class Exercise 8: There is a very essential difference between the type of simulation in the car-control example and type of simulation in the inventory example. Can you identify this difference (or differences)? Are there similarities?
 


0.3   Third of three problems: Machine Learning

 

In-Class Exercise 9: Download and execute PointClassifier.java. Enter the following data:

Clearly, it's easy to tell the groups apart. Next, use another color to enter these points:
  • Enter (75,225). Is is easy to tell whether this belongs to the "red" vs. "blue" group?
  • What about (500,150) or (500,400)?
  • What about (150,160)?
 

In-Class Exercise 10: Modify the above program (PointClassifier.java) to draw a line that best separates the two clusters of points. Implement your code in the paintComponent() method.
 

In-Class Exercise 11: One way to classify a new point is to see which side of a dividing-line (like the one you drew above) the point lies. Suggest one or more metrics to quantify the usefulness of a particular line (so that we could compare alternative lines).
 

In-Class Exercise 12: Download and unpack classifier.zip. There are three sets of data files. One set, the "A" set has all the file names beginning with "A". The "B" set has five beginning with "B". And there is one "sample".

  • Examine one of the "A" files. You will see that it is a collection of line segments. Each data file defines a collection of line segments.
  • Every "A" file is similar in some way to every other "A" file.
  • Every "B" file is similar in some way to every other "B" file.
  • The big question: is the "sample" file more similar to an "A" type or a "B" type?
  • To answer the question, modify the code in Classifier.java to print some statistic related to each collection. To do this, you can simply insert code into the printData() method.
  • Note that each line segment is available to you as an instance of LineSegmentd.
  • Follow instructions in class to "view" the data files.
 

In-Class Exercise 13: How are the two classification problems related? Have you interacted with a system using classification? Can you list some examples?
 


0.4   What do the three problems have in common?

 

Many things:

  • All three are areas of growing importance in computer science.

  • Underlying all three are key algorithmic questions:
    • How do you devise algorithms for robot control?
    • How do you write a simulation?
    • How do you devise algorithms for classification and learning?

  • None of these algorithms are covered in a standard algorithms course.

  • The type of mathematics behind these areas is mostly continuous
         => As opposed to the discrete mathematics in the standard algorithms course.
 

To better understand this distinction, let's start with discrete structures:

  • Here's a course description:
    Sets, functions, and sequences. Propositional and predicate calculus, formal proofs, mathematical induction. Matrices, semi- groups, groups, and isomorphism. Relations, partitions, equivalence relations, trees, graphs.
     

    In-Class Exercise 14: Can you think of other discrete-math topics that belong here?

  • In later courses: finite automata, grammars, parsing.

  • A key distinction: discrete structures are finite or countable whereas continuous structures are uncountable.
 

In-Class Exercise 15: Find an undergraduate math curriculum and classify courses into "discrete" and "continuous".
 


0.5   What this course is about: The Other Side of Algorithms

 

Main goal: to study algorithms based on continuous structures.

Specifically:

  • Algorithms for computing with real numbers.

  • Computational view of key concepts in continuous mathematics: limits, continuity, calculus.

  • Algorithms for simulating systems with deterministic continuous variables.

  • Computational view of key concepts in probability.

  • Algorithms for simulating systems with probabilistic components.

  • Algorithms for continuous optimization problems.

  • Application areas:
    • Robotics: simulation and control.
    • Simulation: computational modeling, simulation of physical systems (molecules, highway traffic, space travel)
    • Machine learning: classification, learning and adaptation.

  • Other topics, time permitting: statistical NLP, reinforcement learning.



© 2008, Rahul Simha