csc102_assignment3

4
COMSATS Institute of Information technology. Virtual Campus, Islamabad COMPUTER SCIENCE DEPARMENT 3 3 RD RD A A SSIGNMENT SSIGNMENT S S PRING PRING 2015 2015 DISCRETE STRUCTURES CSC CSC 102 102 SUBMITTED TO: SUBMITTED TO: P P ROF ROF . IMRAN QURESHI . IMRAN QURESHI SUBMITTED BY: SUBMITTED BY: MUHAMMAD ADNAN MUHAMMAD ADNAN 1 CSC 102 DISCRETE STRUCTURES

Upload: bakiz89

Post on 05-Sep-2015

212 views

Category:

Documents


0 download

DESCRIPTION

Vcomsats csc102 sp15 assignment solved

TRANSCRIPT

COMSATS Institute of Information technology.Virtual Campus, IslamabadCOMPUTER SCIENCE DEPARMENT

3rd Assignment Spring 2015

DISCRETE STRUCTURESCSC102SUBMITTED TO:

Prof. IMRAN QURESHI

SUBMITTED BY:

MUHAMMAD ADNAN

REGISTRATION #:

CIIT/SP15-MCS-127/CVC

EMAIL ID:

[email protected]

Question No .01 Define Inverse of a function along with one suitable example.

(5 Marks)

Solution:Inverse of a function:

In mathematics, an inverse function is a function that reverses another function. If f is a function mapping x to y, then the inverse function of f maps y back to x.

The inverse of function (x) also be a function, this inverse function is denote by -1(x).Example:

(x) = {(3,4),(1,-2),(5,-1)(0,2)}Solution:

Function f is a one to-one function since the x and y values are used only once. Since function f is one-to-one unction, the inverse relation is also a function.Therefore, inverse function is:

-1(x) = {4,3),(-2,1),(-1,5),(2,0)}

Question No. 02: Compute the first six terms of the sequence c0, c1, c2, . defined as follows:

c j = (1) j for all integers j 0. (5 Marks)Solution:As

c0 = (-1)0 = 1

c1= (-1)1 = -1

c2= (-1)2 = 1

c3= (-1)3 = -1

c4= (-1)4 = 1

c5= (-1)5 = -1We know that even powers of -1 equal to 1 and odd power of -1 equal -1,

Thus, the first six terms are 1, -1, 1, -1, 1, -1.

3CSC 102 DISCRETE STRUCTURES