Documentos de Académico
Documentos de Profesional
Documentos de Cultura
If X is a set: x X x belongs to X g x X x does not belong to X { x x N and x is odd } The set of all x such that x belongs to N and x is odd
Improper Subset: A is an improper subset of B if:(i) A is a subset of B (ii) There does not exist any element in B which does not belong to A. Every set is an improper subset of itself
Union of X & Y:
X Y = { z z X or z Y }
Cartesian Product:
X x Y = {(x,y) x X and y Y }
Real Numbers:
Set of real numbers: R Set of positive real numbers: R+ = { x R x > 0 } Set of negative real numbers: R- = { x R x < 0 }
Interval:
An interval i a set of numbers l i A i t l is t f b lying between two bounds. If a and b are two real numbers (a b):
Open interval = { x R a < x < b} Semi-open interval = { x R a < x b } p or {xRax<b} Empty interval = { x R a < x < b } where a=b Integer interval [i j] Integer interval = { n Z i n j } where i & j are integers such that i j+1.
Example
(i) C={(x,1), (y,1)} Domain C={x, y} Range C={1} (ii) D={(1, 1), (1, 2), (2, 1)} Domain D={1, 2} { , } Range D={1, 2}
Example
A={2, 3, 5} B={a, b, x, y} ={(2, a), (3, x), (5,y)} Domain ={2, 3, 5} Range ={a, x, y}
(i)
A 2 3 5
B
a b x y
A into B A B
A (ii) 2 4 6
B 1 3 5
A into B
A onto B
( Range = image)
A (ii) 2 3 5
A 2 3 5
A onto A
Domain =A Range =A
( Range = image)
A onto A
and A A A into A Domain =A Range =A
Quantifiers
for all for all there exists ( x X) [P(x)] ( x X) [P(x)] ( ! x X) [P(x)] ( ( x X) [P(x)] ) [ ( )] ( x X) [P(x)] every x in X has property P. there exists at least one x in X that has property P. there exists exactly one x in X that has property P. is always true if X is an empty set. y py is always false if X is an empty set.
Alternation of Quantifiers
( n N) ( m N) [ m > n] For every natural number, there exists another natural number (m) greater than (n). ( m N) ( n N) [ m > n] There is an integer m that is larger that every natural number i l di m it lf t l b including itself. It is obviously false the order in which the quantifiers are presented is important.
i =1
Sum of the values taken by on the first n positive integers
f (i )
n
i=1 P(i) Sum of the values taken by f on those integers between 1 and n for which property P holds. p p y If n = 10 and P(i) is odd
10
i = 1 + 3 + 5 + 7 + 9 = 25
i=1
P(i) is odd
Products
n (i) = (1) x (2) x (3) x .. x (n) i=1 Product of (i) as i goes from 1 to n. If n = 0, the product is defined to be one.
Miscellaneous Notations
Logbx=y Where b 1 and x are +ve real numbers (b&x must be +ve) by = x log10 1000 = 3 or 103 = 1000 Where b is not specified, it is taken as 10 and denote the natural logarithm (ln)
Loga(xy) = logax + logay Loga(x/y) = logax logay Logaxy = ylogax
log a x = log b x log b a
(i )
(ii )
log 9 729 =
log 4 16 =
log 2 16 log 2 4
x logb y = y logb x
x = 3
1 2 x = 4
x=3
1 2 x =4
PROOF
(1) Proof by contradiction (2) Proof by Mathematical Induction
Proof by contradiction b
It is also known as indirect proof. Theorem : There exist two irrational numbers x Th and y such that xy is rational. By contradiction, assume xy =irrational contradiction we know 2 is a irrational number
Let z= 2
2
Let
w= z
w= z =
( 2)
2 = =2
( 2)
2 2
Here conclusion says that 2 is irrational which is false. Thus, our assumption was false. So it is possible to obtain a rational number when raising an irrational number to an irrational power. It is a proof by contradiction and is avoided in the context of algorithmics.
Deduction Approach
(i) Sum of the cubes of the first n positive integers is always a perfect square. 13 = 1 = 12 13+23 = 9 = 32 13+23+33 = 36 = 62 13+23+33+43 = 100 = 102 13+23+33+43+53 = 225 = 152
(ii) Algorithm for Mathematical Induction function sq (n) if n=0 then return 0 else return 2n + sq(n-1)-1 ( ) Check: sq(0)=0, sq(1)=2+0-1=1 (0) 0 (1) 2 0 1 1 sq(2)=4+1-1=4, sq(3)=6+4-1=9 sq(4)=8+9-1=16 sq(4)=8+9 1=16 Proof: sq(n)=2n+sq(n-1)-1 sq(n)=2n+sq(n 1) 1 sq(n)=2n+n2-2n+1-1 sq(n)=2n+n2-2n sq(n)=n2
Tiling Problem
m squares in each row and column where m is power of 2 1 square is distinguished as special square. It is not covered b any til i t d by tile. 1 tile takes 3 squares 2 x 2 board is formed The tiling problem can always be solved
(d) solution
(ii)
Induction Step
Consider n1 m = 2n According to induction hypothesis theorem is true for 2n-1 x 2n-1 boards Suppose a m x m board containing one special square Divide the board into four equal parts Place the tile in the middle of the original board so to cover 1 square of three sub-boards. These three squares are also special squares squares. By induction hypothesis, each of these sub-boards can be tiled Thus h Th theorem i f m=20, and since i truth f m=2n f ll is for 2 d i its h for 2 follows from its assumed truth for m=2n-1 for all n 1, it follows from the principle of mathematical induction that the theorem is true for all m provided m i a power of 2 t f ll id d is f 2. A suitable algorithm can be obtained to solve tiling problem.
Construction Induction
It can also be used to prove the truth of a partially specified assertion and discover the missing specifications This technique can be illustrated featuring the Fibonacci sequence ( th century, Italian mathematician). q (12 y, ) Every month a breeding pair of rabbits produce a pair of offspring. The offspring will in their turn start breeding after two 1 months and so on.
Month-4 Month-3
1 1 1 1 1 1 1 1
Month-1
Month-2
1
(1 pair)
(2 pairs)
(3 pairs)
(5 pairs) and so on
Format definition
f 0 = 0; f1 = 1
and d
f n = f n 1 + f n 2 f n >= 2 for
The sequence is = 0 1 1 2 3 5 8 13 21 34 55 89 .. 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, Constructive induction can be useful in the analysis of algorithms.
Elementary Probability
It is concerned with the study of random phenomena whose future is not predictable with certainty. Example E l (i) Throwing of a dice (ii) Counting number of cars passing a particular point in a given period of time (iii) Measuring the response time of a computer system The set of all possible outcomes of a random experiment is called the sample space (s) of the experiment The individual outcomes are called sample points or elementary events.
Possible outcomes of throwing an ordinary dice=6, namely 1 to 6. Sample space = S = {1, 2, 3, 4, 5, 6,} for throwing a dice (S is finite and discrete) S = {0, 1, 2, 3, } for counting the cars passing a g g given point (S is infinite but discrete) for measuring the S = {tt>0} response ti time of a f (S is continuous) computer system An event is subset of S as it is a collection of sample p p points
Example: To know probability that a random number generator will produce a value th t i b t ill d l that is prime (range 09999)
1. S={0, 1, 2, 3, 1 S={0 1 2 3 , 9999} 2. Pr [1] = Pr [2] = Pr [3] = .. = Pr [9999]=1/10000 3. 3 A = {2, 3, 5, .., 9967, 9973} {2 3 5 9967 (Prime numbers,Total = 1229) 4. Probability of elementary events in A
3.
Assigning Probabilities W(A) = 50, W(B) =100, W(C) = -30 etc. P(-30) ( 30) = Pr(C)+Pr(D) (C) ( ) = 0.25+0.50 = 0.75 P(15) = Pr(E) = 0.10 P(50) = Pr(A) = 0.10 P(100) = Pr(B) = 0.05 4. Expected winnings E(W) E(W) = -30p(-30)+15p(15)+50p(50)+100p(100) = -30(0.75)+15(0.10)+50(0.10)+100(0.05) = -22.5+1.50+5.0+5.0 = -22.50+11.50 = -11 Variance of X = Var[X] = E[(x-E[X])2] = p(x)(x-E[X])2 [ ] [( [ ]) p( )( [ ]) Var[W] = p(-30)x192 +p(15)x262+p(50)x612+p(100)x1112 = 1326.5 Standard deviation of W = sqrt(1326.5)=36.42 q ( ) E[W] allows to predict the average observed value of W and the variance serves to quantify how good this prediction is likely to be.