CPS 102: Discrete Mathematics Assignment 1 1 Designing DFAs (35 points) Due:
Instructor: Bruce Maggs
Monday, September 19th, 2011
Let = cfw_0, 1. For each of the following languages, give the state diagram for a DFA that recognizes it. (a) (4 pts) L1 = cf

COMPSCI 102
Discrete Mathematics for Computer Science
Ancient Wisdom: On Raising A Number To A Power
Lecture 12
15
15
a
Egyptian Multiplication
The Egyptians used decimal numbers but multiplied and divided in binary
a x b By Repeated Doubling
b has n-bit

Fibonacci Numbers, Polynomial Coefficients, and Vector Programs.
Leonardo Fibonacci
In 1202, Fibonacci proposed a problem about the growth of rabbit populations.
Stage 0, Initial Condition, or Base Case: Fib(0) = 0; Fib (1) = 1 Inductive Rule For n>1, Fi

Discrete Mathematics for Computer Science COMPSCI 102 Duke University
Randomness and Computation: Some Prime Examples
Earth has huge file X that she transferred to Moon. Moon gets Y.
Did you get that file ok? Was the transmission accurate?
Uh, yeah. Earth

Great Theoretical Ideas In Computer Science COMPSCI 102 Fall 2010 Lecture 16 October 27, 2010 Duke University
Modular Arithmetic and the RSA Cryptosystem
p1
1
Starring
Rivest
Shamir
Adleman
Euler
Fermat
The RSA Cryptosystem
Rivest, Shamir, and Adelman (19

Group Theory
E d i t h L a w 2 7 . 0 3 . 2 0 0 7
Group Theory in the Bedroom
Puzzle
Reference: Scientific American, 93(5)-395
What is a Group?
A Familiar Group
To solve the equation 4 + x = 20 -4 + (4+x) = -4 + 20 (-4+4) + x = 16 0 + x = 16 x = 16 Closure

COMPSCI 102
Introduction to Discrete Mathematics
Graphs
Lecture 18 (November 3, 2010)
What's a tree?
A tree is a connected graph with no cycles
Tree
Not aTree
Not a Tree
Tree
How Many n-Node Trees?
1: 2: 3: 4: 5:
Notation
In this lecture: n will denote th

COMPSCI 102
Discrete Mathematics for Computer Science
Graphs II
Lecture 18
Recap
Theorem: Let G be a graph with n nodes and e edges The following are equivalent: 1. G is a tree (connected, acyclic) 2. Every two nodes of G are joined by a unique path 3. G

Alpha
A final word about addition/subtraction chains (an idea due to Rob Miller) Improving the 2 (log2 n) 1 upper bound on the length of the shortest chain for generating n. Express n using redundant notation with as few 1's and 1's as possible. Examples:

COMPSCI 102
Introduction to Discrete Mathematics
Cantor's Legacy: Infinity And Diagonalization
Lecture 22 (November 22, 2010)
The Theoretical Computer:
no bound on amount of memory no bound on amount of time Ideal Computer is defined as a computer with in

COMPSCI 102
Introduction to Discrete Mathematics
Turing's Legacy: The Limits Of Computation.
Anything
says is false!
This lecture will change the way you think about computer programs. Many questions which appear easy at first glance are impossible to so

COMPSCI 102
Discrete Mathematics for Computer Science
Probability Refresher
What's a Random Variable? A Random Variable is a real-valued function on a sample space S E[X+Y] = E[X] + E[Y]
Conditional Expectation
What does this mean: E[X | A]? E[X | A] = k

COMPSCI 102
Introduction to Discrete Mathematics
CPS 102
Classics
Today, we will learn about a formidable tool in probability that will allow us to solve problems that seem really really messy.
If I randomly put 100 letters into 100 addressed envelopes, o

CPS 102: Discrete Mathematics Assignment 2 1 (15 points) Due:
Instructor: Bruce Maggs
Monday, October 3th, 2011
Prove that 1/3 is a recurring decimal number (in other words, it does not have a finite decimal representation). Hint: Use induction on the num

CPS 102: Discrete Mathematics Assignment 3 Due:
Instructor: Bruce Maggs
Monday, October 24th , 2011
Note: You cannot discuss/collaborate with any other person other than the instructor or TA. And, when solving for any question below please show your work!

Discrete Mathematics for Computer Science Bruce Maggs Lecture 1 COMPSCI 102 Duke University
Pancakes With A Problem!
Course Staff
Prof: Bruce Maggs
TA: Bala Chandrasekaran Lectures developed at Carnegie Mellon, primarily by Prof. Steven Rudich.
(
Please f

Deterministic Finite Automata
COMPSCI 102 Lecture 2
Let me show you a machine so simple that you can understand it in less than two minutes
0 1 0111 111 0
11 0,1
1
1 0 1
The machine accepts a string if the process ends in a double circle
Steven Rudich: ww

COMPSCI 102
Discrete Mathematics for Computer Science
Bits of Wisdom on Solving Problems, Writing Proofs, and Enjoying the Pain: How to Succeed in This Class
Lecture 3
What did our brains evolve to do? What were our brains "intelligently designed" to do?

COMPSCI 102
Discrete Mathematics for Computer Science
Inductive Reasoning
Lecture 4
Dominoes
Domino Principle: Line up any number of dominos in a row; knock the first one over and they will all fall
Dominoes Numbered 1 to n
Fk = "The kth domino falls" If

COMPSCI 102
Discrete Mathematics for Computer Science
Ancient Wisdom: Unary and Binary
Lecture 5
Prehistoric Unary
1 2 3 4
Hang on a minute! Isn't unary too literal as a representation? Does it deserve to be an "abstract" representation?
It's important to

COMPSCI 102
Discrete Mathematics for Computer Science
Counting I: One-To-One Correspondence and Choice Trees
Lecture 6
If I have 14 teeth on the top and 12 teeth on the bottom, how many teeth do I have in all?
Addition Rule
Let A and B be two disjoint fin

COMPSCI 102
Discrete Mathematics for Computer Science
Counting II: Recurring Problems and Correspondences
Lecture7
(
+
+
)(
+
)=?
1-1 onto Correspondence (just "correspondence" for short)
A
B
Correspondence Principle
If two finite sets can be placed into

COMPSCI 102
Discrete Mathematics for Computer Science
Counting III
Lecture 8
X
1+
X
2+
X
3
How many ways to rearrange the letters in the word "SYSTEMS"?
SYSTEMS
7 places to put the Y, 6 places to put the T, 5 places to put the E, 4 places to put the M, an

COMPSCI 102
Discrete Mathematics for Computer Science
Probability Theory: Counting in Terms of Proportions
Lecture 9
The Descendants of Adam
Adam was X inches tall He had two sons: One was X+1 inches tall One was X-1 inches tall Each of his sons had two s

CPS 102: Discrete Mathematics Quiz 1
Instructor: Bruce Maggs
Date:
Monday October 4, 2010
NAME:
Prob #. 1 2 3 4 5 6 7 8 9 10 Total
Score
Max Score 10 10 10 10 10 10 10 10 10 10 100
1
Problem 1 Use a regular expression to describe the language accepted by