csc102_assignment3
DESCRIPTION
Vcomsats csc102 sp15 assignment solvedTRANSCRIPT
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:
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