Governor's Career & Technical Academy Arlington

CSC 208 Weekly Goals and Tasks: Week 2

CSC 208


Overview

With both the preliminaries and the workflow established last week, this week we begin our study of logic and proofs.

Friday, Feburary 14th

Classwork

Dear Students, I'm our sick today, so please do what you need to do to move forward without me. Read through the next section, and work all the exercises. We meet again next Wednesday, when we will review both 1.1. and 1.2, and prepare for our first quiz on Friday. Blu asked me yesterday for a list of questions to pay particular attention to. I promise to have that finished over the weekend.

Here are the two steps needed to get truth-table-generator working on your school Macbook:

  1. Run: python3 -m pip install truth-table-generator
  2. In your .zshrc file add this line to the bottom:
    export PATH=$PATH:$HOME/Library/Python/3.11/bin
    

We'll begin class by discussing the exercises from Section 1.1: Mathematical Statements. I'll share my notes from this section, and use them for a brief discussion of how to take notes on this material.

I'll randomly choose students to share their solutions to a few of the exercises.

We will then discuss Section 1.2: Implications.

Challenge

Run:

ttg_cli.py "['P', 'Q']" -p "['P => Q', 'Q => P', '~Q => ~P', '~P => ~Q']" -i False

in your terminal. What do you observe?

Homework

Complete the Reading Questions, Practice Problems, and three Additional Exercises at the end of the section. Come to our next class prepared to discuss these exercises.

Monday, February 10th

Classwork

Today in class we will discuss Section 1.1: Mathematical Statements in our text. Since it will be so useful to us as we explore logical statements, we will start by installing truth-table-generator and learning how to use it to investigate the mathematical statements presented in the section.

Unfortunately, I do not have access to a student impaired Macbook on which to test how you will have to work around your restrictions. During first period Toby put together a shell script to install the application. During fourth period I hope we can refine this a bit, using it to as a teachable moment to better understand the challenges of installing software.

That done, we will work through the following examples together.

  1. ttg_cli.py "['p']"
  2. ttg_cli.py "['p', 'q']"
  3. ttg_cli.py "['p', 'q', 'r']"
  4. ttg_cli.py "['p']" -i False
  5. ttg_cli.py "['p', 'q']" -p "['~(p and q)', 'p or ~q']" -i False
  6. ttg_cli.py "['p', 'q', 'r', 's'] -i False"
  7. ttg_cli.py "['p', 'q']" -p "['p and q', 'p or q', 'p => q']" -i False

Challenge I

Find a statement logically equivalent (i.e. having the same truth table) to p => q using or and ~ operators.

Challenge II

Given the following propositional variables:

  • p: Troll 1 is a knave.
  • q: There are exactly two knights.
  • r: Troll 1 is lying.
  • s: All 3 Trolls are knaves.

use truth-table-generator to explore the Investigate! activity in the Section Preview of Section 1.1 Mathematical Statements. See if you can determine which Trolls are knaves and which are knights.

Homework

Take notes on section 1.1, and learn the following vocabularly and be prepared to use it correctly:

  • premise
  • conclusion
  • argument
  • theorem
  • proposition
  • proof
  • statement
  • quantifier
  • predicate
  • logical connective
  • binary connective
  • unary connective
  • truth value
  • propositional variables
  • conjunction
  • disjunction
  • implication
  • conditional
  • biconditional
  • negation
  • truth conditions

Complete the Reading Questions, Practice Problems, and three Additional Exercises at the end of the section. Come to our next class prepared to discuss these exercises.