Skip to main content

CSC 151.03, Class 31: Project introduction

Overview

  • Preliminaries
    • Notes and news
    • Upcoming work
    • Extra credit
    • Quiz 10
    • Questions
  • Quiz
  • About the project
  • Group composition and construction

News / Etc.

  • Please try to keep the room straight.
  • Quiz 9 returned.

Upcoming Work

  • Reading for Monday: Association lists
    • Yes, it’s ready!
  • No writeup for class 30.
  • No writeup for class 31.
  • Exam 3
    • Prologue due TONIGHT
    • Exam due Tuesday the 14th.
    • Cover pages due Wednesday the 15th.
    • Epilogues due Wednesday the 15th.

Extra credit (Academic/Artistic)

Extra credit (Peer)

  • Eat at ISO food bazaar.
  • Pioneer weekend walkins at 6pm today.

Extra credit (Misc)

Other good things

  • Showvember tonight
  • Drag

Quiz 10

Notes

  • Did not go well.
  • So we’ll go over it.
  • I’m now dropping the two lowest quiz grades in calculating your final grade.

Problem 1

(cons
  (cons 5 10)
  (list 15
        20
        (cons 25 null)))

See whiteboard for drawing.

  • Note: Drawing from inside out is generally a good strategy.

Result in Scheme

'((5 . 10) 15 20 (25))

Find the smallest value in a vector of real numbers.

We need to have a helper that keeps track of pos and smallest-so-far. We are going to write a kernel.

  • Named let
  • Write a separate helper procedure
  • letrec
(define smallest-in-vector
  (lambda (vec)
    (let kernel ([pos 1]
                 [smallest-so-far (vector-ref vec 0)])
      (if (>= pos (vector-length vec))
          smallest-so-far
          (kernel (increment pos) 
                  (min smallest-so-far
                       (vector-ref vec pos)))))))

How do we fix this so that it doesn’t make the smallest inexact if it’s not already inexact?

  • Keep track of the position rather than the value. But Sam is too lazy to implement that.
  • Write better preconditions.
  • Write tests for exact and inexact Sam really is lazy.
  • Write inexact->exact in the base case. No!
  • Rewrite min

Questions exam

Where should I start on problem 3?
  1. Make a list of all the things you need for it to be a BST. Two options: Empty tree. Nonempty tree. i. Is it a node? ii. Does it contain a string? iii. Is the left tree a BST? (Trust the magic recursion fairy.) iv. Is the right tree a BST? (TTMRF); v. c; vi. d.
Use and to group things together for the nonempty tree case.

Question in prep for next quiz

Quiz

Ooh! A tree problem. That will be helpful when I solve problem 3 on the exam.

About the project

  • Do something interesting of your choice within constraints
    • New and different data set
    • Requires some processing/munging/whatever you want to call
    • With a novel algorithm that does something to help you understand the data
  • Examples
    • Literature classifier
    • Text generation
    • Something similar to cancer cell identification.
    • A set of tools for dealing with a data set. (E.g., …)
  • Goals
    • Time-boxed: 8-10 hours per person over two+ weeks
    • Ideal group size: 3 (or 2 or 4 or 1)
  • For a week from Monday: Find the data set and Write a proposal
    • Describe set
    • Describe your intended goals with the data set
      • What you think you can do
      • What would satisfice
      • Reach goal
    • Describe the algorithms you will be generating

Group composition and construction