Dashboard
College of Liberal Arts and Sciences
CS (Computer Science)
CS 173
CS 173 BL2 FA16
September 12 - September 18
Relations and Review of Modular Arithmetic
STARTED ON
STATE
COMPLETED ON
TIME TAKEN
GRADE
Question 1
Saturday, September 17, 2016
Reference Sheet You may separate this sheet from the exam, but please hand it in with your exam. Please do not include work on this page.
Boolean Algebra
x+0=x x+1=1 x+x=x x + x = 1 (x) = x x+y=y+x x + (y + z) = (x + y) + z x(y + z) = xy + xz (x + y) = xy
1
CS 173, Fall 2016
Examlet 4, Part A
NETID:
FIRST:
Discussion:
LAST:
Thursday
2
3
4
5
Friday 9
10
11
12
1
2
Suppose that n is some positive integer. Lets define the relation Rn on the integers such that aRn b
if and only if a b + 1 (mod n). Prove the fol
1
CS 173, Fall 2016
Examlet 5, Part B
NETID:
FIRST:
Discussion:
LAST:
Thursday
2
3
4
5
Friday 9
10
11
12
1
2
1. (5 points) Suppose that |A| = 2 and |B| = 3. How many onto functions are there from A to B?
Briefly justify or show work.
Solution: There are n
1
CS 173, Fall 2016
Examlet 2, Part A
NETID:
FIRST:
LAST:
Discussion:
Thursday
2
3
4
5
Friday 9
10
11
12
1
2
(15 points) Recall that a real number p is rational if there are integers m and n (n non-zero) such
that p = m
. Use this definition and your best
1
CS 173, Fall 2016
Examlet 5, Part A
NETID:
FIRST:
Discussion:
LAST:
Thursday
2
3
4
5
Friday 9
10
11
12
1
2
1. (10 points) Suppose that f : Z Z is one-to-one. Lets define g : Z2 Z2 by
g(x, y) = (2f (x) + f (y), f (x) f (y). Prove that g is one-to-one. Yo
CS 173, Fall 2016
Examlet 1, Part A
NETID:
FIRST:
Discussion:
LAST:
Thursday
2
3
4
5
Friday 9
10
11
12
1
2
1. (5 points) State the negation of the following claim, moving all negations (e.g. not) so that they
are on individual predicates.
For every comput
1
CS 173, Fall 2016
Examlet 4, Part B
NETID:
FIRST:
Discussion:
LAST:
Thursday
2
3
4
5
Friday 9
10
11
12
1
2
1. (5 points) Check all boxes that correctly characterize this relation on the set cfw_A, B, C, D, E, F .
A
B
C
D
E
F
Reflexive:
Irreflexive:
Symm
1
CS 173, Fall 2016
Examlet 9, Part B
NETID:
FIRST:
LAST:
Discussion:
Thursday
2
3
4
5
Friday 9
10
11
12
1
2
1. (8 points) Here is a grammar with start symbol S and terminal symbols a and b. Draw three parse
trees for the string a b b a that match this gr
1
CS 173, Fall 2016
Examlet 6, Part B
NETID:
FIRST:
LAST:
Discussion:
Thursday
2
3
4
5
Friday 9
10
11
12
1
2
(9 points) How many cycle subgraphs (i.e. subgraphs isomorphic to Cn for some n) does the graph
below contain? Count two cycles as the same if the
1
CS 173, Fall 2016
NETID:
Examlet 10, Part B
FIRST:
LAST:
Discussion:
Thursday
2
3
4
5
Friday 9
10
11
12
1
2
1. (9 points) Fill in key facts about the recursion tree for T , assuming that n is even.
T (8) = 5
(a) The height:
T (n) = 3T (n 2) + c
n
2
4
(b
CS 173, Fall 2016
Examlet 8, Part B
NETID:
FIRST:
Discussion:
LAST:
Thursday
2
3
4
5
Friday 9
10
11
12
1
2
(10 points) Suppose we have a function F defined (for n a power of 2) by
F (2) = c
F (n) = F (n/2) + n for n 4
Your partner has already figured out
1
CS 173, Fall 2016
Examlet 3, Part A
NETID:
FIRST:
Discussion:
LAST:
Thursday
2
3
4
5
Friday 9
10
11
12
1
2
A = cfw_(2, 4) + (1 )(2, 5) | R
B = cfw_(a, b) R2 | b 1
C = cfw_(p, q) R2 | p 0
Prove that A B C.
Solution: Let (x, y) be a 2D point and suppose t
1
CS 173, Fall 2016
Examlet 2, Part B
NETID:
FIRST:
Discussion:
LAST:
Thursday
2
3
4
5
Friday 9
10
11
12
1
2
1. (5 points) Let a and b be integers, b > 0. We used two formulas to define the quotient q and the
remainder r of a divided by b. One of these is
Question 1: Multiple Choice & Short Answer A. You are a software developer that is developing an inventory system for a store. The store currently stocks 9000 items and you would like to refer to them by a unique ID number. What is the minimum number of b
AnExampleofHowaComputerReallyWorks Acomputerisacomplexsystemconsistingofmanydifferentcomponents.Butattheheart or the brain, if you want of the computer is a single component that does the actual computing.ThisistheCentralProcessingUnit,orCPU.Inamoderndesk
Building Blocks for Theoretical Computer Science
Margaret M. Fleck
Chapter 1: Math Review
1.1 Some Sets
Z = cfw_. . . , 3, 2, 1, 0, 1, 2, 3, . . . is the integers.
N = cfw_0, 1, 2, 3, . . . is the non-negative integers, also known as the natural numbers
Dashboard
College of Liberal Arts and Sciences
CS (Computer Science)
CS 173
CS 173 BL2 FA16
September 26 - October 2
Graphs and 2-way Bounding
STARTED ON
Thursday, September 29, 2016, 9:27 PM
STATE
Finished
COMPLETED ON
Thursday, September 29, 2016,
Dashboard
College of Liberal Arts and Sciences
CS (Computer Science)
CS 173
CS 173 BL2 FA16
October 10 - October 16
More Induction and introduction to recursive denitions
STARTED ON
STATE
COMPLETED ON
TIME TAKEN
Question 1
Correct
Wednesday, October
Dashboard
College of Liberal Arts and Sciences
CS (Computer Science)
CS 173
CS 173 BL2 FA16
September 26 - October 2
Graphs
STARTED ON
STATE
COMPLETED ON
TIME TAKEN
GRADE
Tuesday, September 27, 2016, 8:46 PM
Finished
Tuesday, September 27, 2016, 8:4
Dashboard
College of Liberal Arts and Sciences
CS (Computer Science)
CS 173
CS 173 BL2 FA16
September 5 - September 11
HW1: Logic, Proofs and Numbers (Lectures 1-4)
STARTED ON
STATE
COMPLETED ON
TIME TAKEN
GRADE
Sunday, September 4, 2016, 8:10 PM
Fi
Dashboard
College of Liberal Arts and Sciences
CS (Computer Science)
CS 173
CS 173 BL2 FA16
October 3 - October 9
Mathematical Induction
STARTED ON
Tuesday, October 4, 2016, 3:50 PM
STATE
Finished
COMPLETED ON
Tuesday, October 4, 2016, 3:53 PM
TIME
Dashboard
College of Liberal Arts and Sciences
CS (Computer Science)
CS 173
CS 173 BL2 FA16
September 12 - September 18
Numbers, Modular Arithmetic, Sets and Relations
STARTED ON
STATE
COMPLETED ON
TIME TAKEN
GRADE
Question 1
Correct
1.00 points out
Dashboard
College of Liberal Arts and Sciences
CS (Computer Science)
CS 173
CS 173 BL2 FA16
September 19 - September 25
Functions
STARTED ON
STATE
COMPLETED ON
TIME TAKEN
GRADE
Question 1
Correct
1.00 points out of
1.00
Wednesday, September 21, 2016
Dashboard
College of Liberal Arts and Sciences
CS (Computer Science)
CS 173
CS 173 BL2 FA16
October 10 - October 16
Recursive Denitions
STARTED ON
STATE
COMPLETED ON
TIME TAKEN
Question 1
Friday, October 14, 2016, 10:21 AM
Finished
Friday, October 1
1
CS 173, Fall 2016
Examlet 7, Part B
NETID:
FIRST:
LAST:
Discussion:
Thursday
2
3
4
5
Friday 9
10
11
12
1
2
1. (9 points) What is the chromatic number of graph G (below)? Justify your answer.
t
B
D
C
R
R
s
G
y
x
p
q
G
B
n
G
B
B
A
B
R
R
m
G
Solution: The
1
CS 173, Fall 2016
Examlet 6, Part A
NETID:
FIRST:
LAST:
Discussion:
Thursday
2
3
4
5
Friday 9
10
11
12
1
2
1. (10 points) How many isomorphisms are there from G (below) to itself? Justify your answer
and/or show your work clearly .
B
J
A
C
E
D
I
G
K
H
S
CS 173, Fall 2016
NETID:
Examlet 3, Part A |
FIRST: |LASTz
Discussion: Thursday 2 3 4 5 Friday9 10 11 12 1 2
A = cfw_a(2, 4) + (1 a)(2, 5) | a E R
B: cfw_(a,b) 6R2 | ()3 1
C=cfw_(P,<1)IR<2 | 1920
Prove that A n B Q C.
Solution: Let (say) be a 2D poi
1
CS 173, Spring 2016
NETID:
Examlet 1, Part A
FIRST:
Discussion:
LAST:
Monday
9
10
11
12
1
2
3
4
5
1. (5 points) State the negation of the following claim, moving all negations (e.g. not) so that they
are on individual predicates.
There is a soup s such
1
CS 173, Spring 2016
NETID:
Examlet 3, Part A
FIRST:
Discussion:
LAST:
Monday
9
10
11
12
A = cfw_(x, y) R2 | x2 + y 2 100
B = cfw_(p, q) R2 | p 5
C = cfw_(a, b) R2 | b 20
Prove that A B C.
Hint: notice that 0 (x y)2. So 0 (x2 + y 2) 2xy.
1
2
3
4
5
2
CS 1
Intro to Discrete Structures
01/21/14
Todays lecture
Presented by:
Karl Palmskog
TronAnimation by Craig Reynolds.
Written in an actor language
Discrete Structures (CS 173)
Gul Agha
Slides derived from version by
Derek Hoiem, University of Illinois
Todays