Professor Kate Poirier, Spring 2017

Category: Uncategorized (Page 2 of 3)

Spring Break Assignments

  1. OpenLab code-breaking assignment (in teams); first post due by Tuesday April 11; others due Thursday April 13.
  2. MATLAB assignment; bring files with you to class on Tuesday, April 25.
  3. Complete the assigned exercises for Sections 10.1, 10.2, and 10.4 (20 questions total; most require an understanding of a particular definition). Quiz #7 on Thursday, April 27 will cover material/homework from these sections and/or 4.5 and 4.6. If there’s anything that’s still unclear by the end of the break, make sure to attend office hours on Tuesday, April 25.

MATLAB assignment

  1. On a computer that has MATLAB installed, watch the videos for Lectures #1, #2, #3, and #5 here (5-10 minutes each).
  2. Open MATLAB and follow along with the videos. (If you’re using a computer lab on campus, don’t forget to bring headphones.)
  3. Read from page 191 to the top of page 196.
  4. Complete #1, 13, 14, and 16 on page 202.
  5. Try implementing Algorithms 1, 2, and 3 in MATLAB for a random list of numbers.
  6. Try implementing your answers for #1, 13, 14, and 16 on page 202 in MATLAB for a random list of numbers.
  7. Bring these files with you to class on Tuesday, April 25.

While MATLAB is the official requirement for this assignment, and is installed on most computers in CityTech labs, a free alternative to MATLAB is Scilab. You might like to practice on Scilab if you will not have access to MATLAB during the break but do have access to a computer that you can install software on. Commands in Scilab are similar to the commands in MATLAB, but they’re not necessarily identical, so you may find the MATLAB-Scilab equivalence page helpful. You will have to convert to MATLAB after you arrive back on campus after the break.

Test #1 – Thursday, March 9

The first in-class test will be given on Thursday, March 9. It will cover material/homework from Sections 1.1, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, and 2.3. The test will take up the first 60 minutes of class time. The remaining time will be used for a shortened lesson.

1.5 In-class exercise follow-up

Here is a photo of the board from the end of the lesson on nested quantifiers. Part of our discussion was a little rushed, so I wanted to recap here.

Recall that T(x,y) means that student x likes cuisine y. Recall also that the names x and y don’t matter…what matters is that the first entry is always a student and the second entry is always a cuisine. The exercise was to translate the propositions below into English sentences.

(a) \neg T(Juliano, Japanese) translates to “Juliano does not like Japanese food.”

(b) \exists x T(x, Korean) \wedge \forall x T(x, Mexican) translates to “There is a student who likes Korean food and all students like Mexican food.

(c) \exists y (T(Shannon, y) \vee T(Jiayu, y)) translates to “There exits a cuisine that either Shannon or Jiayu (or both) like.”

(d) (x \neq z) \rightarrow \neg (T(x,y) \wedge T(z,y)))…let’s do this translation in a few steps:

  • T(x,y) \wedge T(z,y) translates to “Students x and z like cuisine y.”
  • \neg (T(x,y) \wedge T(z,y) translates to “It is not the case that students x and z like cuisine y,” which we can translate to “Either student x or student z does not like cuisine y.”
  • (x \neq z) \rightarrow \neg (T(x,y) \wedge T(z,y))) translates to “If x and z are different students, then either student x or student z does not like cuisine y.”
  • So far none of the statements are propositions, since we don’t know the values of the variables, but we can turn the last statement into a proposition by adding the quantifiers. \forall x \forall z \exists y ( (x \neq z) \rightarrow \neg (T(x,y) \wedge T(z,y))) translates to “For all students x and students z there exists a cuisine y such that if x and z are different students, then either student x or student z does not like cuisine y.” We can translate this into a more natural sentence in English by eliminating the variables: “For any pair of two distinct students, there is a cuisine that one of the students does not like.”

(e) \exists x \exists z \forall y (T(x,y) \leftrightarrow T(z,y))…again, let’s do this translation in a few steps:

  • T(x,y) \leftrightarrow T(z,y) translates to “Student x likes cuisine y if and only if student z likes cuisine y.”
  • Again, the above statement is not a proposition since we don’t know the values of the variables, but we can upgrade it to a proposition by adding the quantifiers. \exists x \exists z \forall y (T(x,y) \leftrightarrow T(z,y)) translates to “There exists a student x such that there exists a student z such that for all cuisines y, student x likes cuisine y if and only if student z likes cuisine y.” We can translate this into a more natural sentence in English: “There exits a pair of two students who like all the same cuisines as one another and don’t like all the same cuisines as one another.

(f) \forall x \forall z \exists y (T(x,y) \leftrightarrow T(z,y))…let’s do this translation in a few steps:

  • T(x,y) \leftrightarrow T(z,y) is the same as in question (e)
  • This time the quantifiers will change the statement to: “For all students x and for all students z there exists a cuisine y such that student x likes cuisine y if and only if student z likes cuisine y.” Again, we translate this into a more natural sentence: “For all pairs of students there is a cuisine that they either both like or both do not like.”

Introduction of Mohammed Goni

Hello to everyone. I started my journey from Queensborough Community College. I finished my associates in the field of computer information systems. Then I transferred to New York City College of Technology to finish my bachelor’s in computer systems and technology. So far it’s my third semester here. I have been to USA for about four years. I am from Bangladesh. I am really glad to be a part of this class. The class seems really exciting and active. I hope I can learn something from this class.

Introduction Javed

Hello

I’m a transfer student and this is my second semester here at City Tech. My major is in computer systems focusing on networking and security. I started doing programming, but wasn’t as enthusiastic about it and switched over to network where I’m enjoying it more. I’ve always been into computers since my dad worked in the field doing networking, so I was exposed to it at an early age.  I’ve already learned a lot about this field from him making it an easy decision when selecting my major. After graduating from here, I hope to work in the networking field as a network administrator. If that doesn’t work out, the security field is also very good. I hope to fully understand algorithms and mathematical logic since it is the bases of computer programming, at the end of the semester. During my free time, I like working on computers and building them. I’ve built many for friends and family so they can have a better computer and not spend so much on it. I also enjoy writing programs for fun. It helps me get better at coding and I just find it fun.

Introducing Mario N. Lopez

Greetings, this is my first semester here at City Tech, which is actually the third school I’ve gone to. I’ve acquired Associate’s Degrees from my prior two schools, one for Electronics and Computer Technology, as well as one for Computer Operations, and am currently working on a Technical Bachelor’s Degree in Computer Systems . I like tinkering with computers and other electronic devices, researching things online, various kinds of video games, and listening in on conversations discreetly. I know a little about a lot of things, but I can be completely dense about the obvious at times.

I haven’t done a lot of jobs yet, but I did get some work fixing computers and doing file transfer stuff, getting to know some new people in the process. The only other work I’ve done besides that is at a call center conducting surveys over the phone for a company over in Long Island City, a difficult job at times but it had its interesting moments.

As for what I hope to gain from this course, hopefully a better understanding of mathematical logic will make it easier to write or read programs should the need arise in the future. While my focus is on operating and maintaining computers, sometimes you want to make or edit scripts for common functions to make doing that easier, and an understanding of programming logic can help a great deal with it.

Anyway, I hope that’s enough of a description to make this read worthwhile, I guess I’ll see you guys in class next time we meet.

lesson 1

January 31 2017

ch 1 the fundamentals- logic and proofs

1.1 propositional logic

point give precise meaning to math statements

applications

-design of computer circuts see sec 1.2

-writing of software

-verification of correctness

-computer programs

-etc

proposition a statement that makes a declaration -that can be true or false but there is no burden to proove truth

examples

p= “2+2=4” T

q = “the sun comes up every day”

r = “the world is flat”

america is the best country – doesnt matter if its an opinion

2+2 = dog

non examples

any question

where are we

commands

make me a taco

2+2

building new proposions from odl propositions

1- negation (!P)

if p is a proposition

¬p means ‘not p’

or it is not the case

¬p = “it is not the case that 2+2=4” F

  1. conjunction (&)

if p and q are propositions

p˄q means ‘p and q’

2+2=4 and the sun will come up every day

p q

P Q p˄q
T T T
T F F
F T F
F F F
  1. disjunction (||)

id p and q are 2 props

p˅q means ‘p or q’

2+2=4 or the sun comes up every day

in english can mean either a or b but not both (exclusive or) and a or b or both – inclusive or

P Q p˄q p˅q(inclusive or)
T T T T
T F F T
F T F T
F F F F
  1. exclusive disjunction or direct sum

p⊕q means ‘p or q’ but also not both

p⊕q ‘ 2+2=4 or the sun comes up every day

can be shown ˅

P Q p˄q p˅q(inclusive or) p⊕q

(exclusive or)

T T T T
T F F T
F T F T
F F F F
  1. conditional statements/implications

p→q means ‘if p then q’

if p is true then q is true

if 2+2 = 4 then the sun comes up every day

p implies q

if p is true q must be true

if q is true it doesnt rely on p for the statement to be true

P Q p˄q p˅q(inclusive or) p⊕q

(exclusive or)

p→q
T T T T F T
T F F T T F
F T F T T T
F F F F F T
  1. biconditionals

p↔q

(p → q) ∧ (q → p)

p if and only if q

this means

“(if p is true then q is true) and (if p is true then q is true)”

P Q p˄q p˅q(inclusive or) p⊕q

(exclusive or)

p→q p↔q
T T T T F T T
T F F T T F F
F T F T T T F
F F F F F T T

THE ORDER OD 5 AND 6 MATTERS THE FIRST IS DEPENDANT ON THE LAST

7 Q→P converse of p→q

8 ¬q →¬p contrapositive of p→q

9 ¬p→¬q inverse of p→q

p˄q 7 8 9
T ? t ?
F ? f ?
« Older posts Newer posts »