Homework # 1
(Preliminaries)
CS 510 Design and Analyses of Algorithms
Lahore University of Management Sciences
January 31, 2012
February 9, 2012 (Before Class)
100
Release Date
Due Date
Points
Notes:
Work within your group. Each member must submit his/he

CS 173
Homework 10 Solutions
Fall 2007
The maximum score for this homework is 45 points.
1. Consider the three sets
A = cfw_1, 3, 5, 7,
B = cfw_2, 3, 6, 7,
C = cfw_4, 5, 6, 7.
Write expressions for the following sets in terms of A, B , and C , using the s

Lecture 17
Tuesday, October 29, 2013
8:17 AM
Planar Graphs: graphs which can be drawn on a plane without any crossovers.
Gray Code: to simplify graphs' construction, e.g. a hypercube
Graph Isomorphism? (hard problem)
GRAPH: G is a set of vertices and edge

Discrete Mathematics
Lecture 6
Tue 10 Sep 2013
SCRABBLE
How many different (two to seven letter) words can
you make with the letters
Think of it separately as words containing 0, 1 or 2
Bs
Egg Tray
You have a 6 x 6 egg tray
How may distinguishable way

Discrete Mathematics
Lecture 5
Thu 5 Sep 2013
The Confused Attendant problem
n visitors to a masjid, removed their shoes and gave
them to an attendant, in return for a token
The attendant was new, and did not put the shoes
in the shoe slot corresponding

Lecture 10
Tuesday, September 24, 2013
8:07 AM
Discrete Mathematics TA Page 1
Discrete Mathematics TA Page 2
E
Discrete Mathematics TA Page 3
Discrete Mathematics TA Page 4

Lecture 19
Tuesday, November 5, 2013
8:25 AM
Discrete Mathematics TA Page 1
Discrete Mathematics TA Page 2
Discrete Mathematics TA Page 3
Discrete Mathematics TA Page 4
Discrete Mathematics TA Page 5

CS 173
Homework 9 Solutions
Fall 2007
The maximum score for this homework is 58 points.
1. Let V be an arbitrary nite set, and let
be an arbitrary partial order on V . Let G = (V, E ) be the
directed graph where E = cfw_(u, v ) | (u v ) (u = v ). Prove th

CS 173
Homework 8 Solutions
Fall 2007
The maximum score for this homework is 65 points.
1. For any relation , the [adjective] closure of is dened to be the smallest [adjective] relation that contains
as a subset. Here, [adjective] could be symmetric, or r

CS 173
Homework 7 Solutions
Fall 2007
1. Prove that A (B C ) = (A B ) (A C ) for all sets A, B , and C .
Solution:
A (B C )
= cfw_(a, x) | a A x (B C )
[denition of ]
= cfw_(a, x) | a A (x B x C )
[denition of ]
= cfw_(a, x) | (a A x B ) (a A x C )
[distr

Homework # 2
Divide and Conquer
CS 510 Design and Analysis of Algorithms
Lahore University of Management Sciences
Release Date
Due Date
Points
February 10, 2012
February 21, 2012 (Before Class)
120
Notes:
Work within your group. Each member must submit h

Homework # 3
Dynamic Programming
CS 510 Design and Analysis of Algorithms
Lahore University of Management Sciences
Release Date
Due Date
Points
February 29, 2012
March 10, 2012 (Tutorial time)
90
Notes:
Work within your group.
Start early (there will be

CS 173
Homework 0 Grading Rubric
Fall 2007
CS 173: Discrete Mathematical Structures, Fall 2007
Homework 0 Grading Rubric
As a general course policy, every error in notation, terminology, algebra, logic, word
usage, grammar, spelling, or punctuation should

CS 173
Homework 0 Solutions
Fall 2007
CS 173: Discrete Mathematical Structures, Fall 2007
Homework 0 Solutions
1. Simplify the following expressions as much as possible. Do not approximate. Express all rational numbers
as improper fractions.
73
+
37
6
(e)

CS 173
Homework 1 Solutions
Fall 2007
1. 10 points total. Professors Kirk, Spock, and McCoy are sitting around in Siebel Center having
a discussion about coffee. Each of these people is either an acionado (someone who speaks
only truth) or a charlatan (so

CS 173
Homework 2 Solutions
Fall 2007
CS 173: Discrete Mathematical Structures, Fall 2007
Homework 2 Solutions + Rubric
Rubric: As usual, the maximum score on this homework is 100; the homework score is the percentage
of 2 homework points applied to your

CS 173
Homework 3 Solutions
Fall 2007
1. (5 points 3) [E&C 1.6 #3] For each of the following, identify the reasoning as valid (by
modus ponens or modus tollens) or invalid (by the converse fallacy or inverse fallacy).
(a) If you pass the test, you studied

CS 173
Homework 4 Solutions
Fall 2007
1. The Fibonacci numbers are dened by the recurrence:
F0 = 0
F1 = 1
Fn = Fn1 + Fn2 , n 2
We give you a skeleton of an inductive proof that that for all integers n 0, the nth Fibonacci number can
be written
1
Fn = (n n

CS 173
Homework 5 Solutions
Fall 2007
1. One of the most basic functions preformed by computing hardware is binary addition. Representing the
sum of two bits in binary requires two bits; the less signicant (ones) bit is called the sum bit, and the
more si

CS 173
Homework 6 Solutions
Fall 2007
Rubric: The maximum possible score on this homework is 50.
1. Venn diagrams are commonly used in set theory as illustrations to show inclusion in a set. Write a set
formula for the shaded regions in the following Venn

Lecture 7
Thursday, September 12, 2013
8:04 AM
http:/cs200.lums.edu.pk/dm2013/
Discrete Mathematics TA Page 1
Discrete Mathematics TA Page 2
Discrete Mathematics TA Page 3
Discrete Mathematics TA Page 4
Discrete Mathematics TA Page 5