CS 201 - Spring 2025. 2/19/2025.


[Home]

Welcome to CS 201!

Video of the Day

Robot insurance SNL.

I hereby solicit suggestions for the video of the day. Please email me your ideas with explanations. Selected entries will win 5 homework points. If your video is played at the beginning of class, you must also briefly explain something about the video and something about yourself - in person.

Logical problem of the day

What is the next number in this sequence?
14, 23, 28, 33, 42, ....

https://pollev.com/slade You may also download the app to your phone. Use the "slade" poll id.

In CS 202 you will write proofs like the following.

Inductive Proof of Monday's logical problem (from Francesca Slade):
For 2n - 1 dollars you'll need a minimum of n envelopes.

Base case:
21 - 1 dollars = 1 dollar needs at least 1 envelope.
22 - 1 dollars = 3 dollars needs at least 2 envelopes

Inductive step:

Assume that for 2n - 1 dollars you need a minimum of n envelopes
Prove that for 2(n+1) - 1 dollars you need a minimum of n+1 envelopes

You need to prove 2 things:

I. It's possible to use n+1 envelopes
II. n+1 envelopes is a minimum

I. By assumption you can get any number between 1 and 2n-1 with n
envelopes, put 2n dollars in your second envelope, now for any number
between 2n and 2(n+1) - 1 use your 2n dollars envelope and the
remainder will be between 1 and 2n -1 and use up to n+1 envelopes to
construct that amount.

II. With M envelopes you can make 2M distinct values (including 0
dollars, so really 2M - 1 distinct positive values), for each of the M
envelopes you either include it or don't, so you need a minimum of M
envelopes to describe 2M - 1 positive numbers.

Canvas Quiz of the Day (need daily password)

Most days, there will be a simple canvas quiz related to the lecture. You need a password to activate the quiz, which I will provide in class. These quizzes will count toward your class participation grade. The quiz is available only during class.

Click for today's quiz.

Lecture 16: Computability.

  • I have office hours Wednesdays from 5-6 pm this week, on zoom, id 459 434 2854.

  • I am available for lunch on Mondays at 1 pm in Morse.

  • ULA office hours are found at https://csofficehours.org/CS201/schedule. Sign up via the queue.

  • Homework assignments: [Assignments]. hw3 is now available.

    Announcements

  • Midsemester feedback is open on canvas starting 2/27/2025 for one week. It is anonymous. This is Yale's version of Yelp.

  • If you have an upcoming performance or athletic event, I am happy to promote it during class. Just send me a note.

  • Information Society Project Yale Law School. Weekly Events

    Midterm Exam

    The midterm will be Tuesday February 25th at 7pm in Davies Auditorium. It will be a 2 hour hand written exam. No computers. No notes. No books. No kidding. Students registered with Student Accessibility Services will take the exam at Becton C031 next door.

    Sample Midterm Exam available . (solutions) The midterm will not have a boolean function question. Instead, it will have a struct question. The actual exam will also include UNIX questions (Principles 1 and 2). I will give you a transcript with some of the commands X'd out. You will have to deduce those commands (solutions).

    You should be familiar with the recursion and tail recursion examples from the recursion.rkt and Recursion.html For more details on the wonders of tail recursion, see TailRecursion.html and this tail recursion article.

    Also, the paper Music and Computation, discussed below, is also in scope, up to but not including Music. There will be true/false questions about binary encodings of numbers, text, images, and sound. No questions about music.

    See Point.html for a sample struct question.

    Lecture: Computability.

    Computer Machinery and Intelligence Turing (1950). Mind 49: 433-460. The origin of the Turing Test. Did not coin "artificial intelligence." Try to read this before Friday's class. Pay attention to the question "can a computer take us by surprise?"

    Structs.html (covered on Monday)

    Hw3.html Problem 2.

    Execute examples from tmcopy.rkt using hw3 simulator.

      (simulate tm1 (conf 'q1 '(b) 0 '(1 1 1)) 20)
      (simulate tmcopy (conf 'q1 '(b) 0 '(1)) 200)
    

    See Turing Machine Notes Detailed explanation of tmcopy.

    Everything is a string of bits

    See Music and Computation

    Computability.html (jupyter) Part 2. What is computable?

    Getting to know UNIX

    UNIX Introduction Principle 3.
    [Home]