You are on page 1of 3

ALLAMA IQBAL OPEN UNIVERSITY, ISLAMABAD

(Department of Computer Science)


1.

2.

PLAGIARISM OR HIRING OF GHOST WRITER(S) FOR SOLVING THE ASSIGNMENT(S) WILL DEBAR THE STUDENT FROM AWARD OF DEGREE/CERTIFICATE, IF FOUND AT ANY STAGE. SUBMITTING ASSIGNMENTS BORROWED OR STOLEN FROM OTHER(S) AS ONES OWN WILL BE PENALIZED AS DEFINED IN AIOU PLAGIARISM POLICY.

WARNING

ASSIGNMENT No. 1
Course: Discrete Mathematics (3406) Level: Graduate Note: All questions carry equal marks. Q.1 a) Write negations for each of the following statements. i) If P is square then P is a rectangle. ii) If n is prime, then n is odd or n is 2. iii) If x is nonnegative, then x is positive or x is 0. iv) If n is divisible by 6, then n is divisible by 2 and n is divisible by 3. Use truth table to establish the truth of each of the following statement. i) A conditional statement is not logically equivalent to its converses. ii) A conditional statement is not logically equivalent to its inverse. (20) Explain in your own words what distinguishes a valid form of argument from an invalid one. Give an example of a valid argument with a false conclusion. (20) Write the following statements in if-then form. i) Earning a grade C-in this course is a sufficient condition for it to count toward graduation. ii) Being divisible by 6 is a sufficient condition for being divisible by 3. Indicate whether the arguments are valid or invalid. Support your answer by drawing diagram. i) All people are mice All mice are mortal All people are mortal ii) No College cafeteria is good. No good food is wasted No college cafeteria food is wasted. (20) Prove that for any nonnegative integer n if the sum of the digits of n is divisible by 3, then n is divisible by 3. Semester: Autumn, 2010 Total Marks: 100 Pass Marks: 50

b)

Q.2 a) b) Q.3 a)

b)

Q.4 a)

b)

Write an algorithm that accepts the numerator and denominator of a fraction as input and produces as output the numerator and denominator of that fraction written in lowest terms. (The algorithm may call upon the Euclidean algorithm as needed). (20) State and prove De-Morgans Law of set theory. Prove that For all sets A, B and C (A B) C = A (B U C).

Q.5 a) b)

(20)

ASSIGNMENT No. 2
Total Marks: 100 Note: All questions carry equal marks Q.1 a) b) Q.2 a) b) Five people are to be seated around a circular table. Two seatings are considered the same if one is a rotation of the other. How many different seatings are possible? Prove that for all integer n 2 P (n+1, 2) P (n-2) = 2P(n, 1) (20) A computer programming team has 14 members. How many ways can a group of seven be chosen to work on a project? Assume that all years have 365days and all birthdays occur with equal probability. How large must n be so that in any randomly chosen groups of n people, the probability that two or more have the same birthday is at least 1/2? (20) Write a computer algorithm to check whether a function from one finite set to another is one-to-one. Assume the existence of an independent algorithm to compute values of the function. Let f is defined on a set of real numbers. Determine whether or not f is oneto-one and justify your answer. (20) f ( x) = ( x +1) / x for all real numbers x 0 Suppose population of a country increases at a steady rate of 3% per year. If the population is 50 million at a certain time, what will it be 25 years later. Give recursive definitions of the following. (20) i) Set of all strings of 0s and 1s that have the same number of 0s as 1s. ii) Set of all strings of 0s and 1s for which all the 0s precede all the 1s. Write algorithms to implement insertion sort. For each positive integer n, let an e the number of iterations of the while loop. While (n > 0) n : = n div 2 end while i) Trace the action of this algorithm segment on n when the initial value of n is 25. ii) Find a recursive relation for an. (20) Pass Marks: 50

Q.3 a) b)

Q.4 a) b)

Q.5 a) b)

3406 Discrete Mathematics

Credit Hours: 4 (4+0)

Recommended Book: Discrete Mathematics with Applications (2nd Edition) By Susanna S. Epp, Pws Publishing, Company Boston U.S.A

Course Outlines:
Unit No. l Introduction of Mathematical Reasoning Logical Form & Logical Equivalence, Conditional Statements, Valid and invalid Arguments, Digital Logic Circuits, Number Systems and Circuits for additions, Predicates and Quantified Statements, Arguments with Quantified Statements Unit No. 2 Number Theory and Mathematical Induction Introduction, Rational Numbers, Divisibility, division into Cases and the Quotient Remainder Theorem, algorithms, Sequences, Principles of Mathematical Induction, Correctness of Algorithms Unit No. 3 Set Theory Basic Definitions, Properties of Sets, The Empty Set, Partitions, Power Sets, Boolean Algebra, Russells Paradox and Halting Problem Unit No. 4 Counting Techniques Counting and Probability, Possibility Trees and Multiplication Rule, Counting Elements of Disjoint Sets, counting Subsets of a Set Unit No. 5 Functions Functions Defined on General Sets, Finite State Automata, One-to-One, Inverse Functions, the Pigeonhole Principle Unit No. 6 Recursion Recursively defined Sequences, Solving Recurrence Relations by Iteration Unit No. 7 Efficiency of Algorithms Real Valued Functions of Real Variable and Their Graphs, O-Notations, Efficiency of Algorithms-I, Efficiency of Algorithms-II Unit No. 8 Graphs Introduction, paths and Circuits, Matrix representation of Graphs, Isomorphism of Graphs Unit No. 9 Boolean Algebra Basic Definition, Basic Theorems and Properties of Boolean Algebra, Boolean Functions, Canonical and Standard Forms, Logic Operations