COMP232 - Mathematics for Computer Science Tutorial 6 Ali Moallemi moa [email protected] Iraj Hedayati h [email protected] Concordia University, Winter 2016 Ali Moallemi, Iraj Hedayati COMP232 - Mathematics for Computer Science 1/7 Table of Contents 1 1.8 Rules of Inference Exercise 8 Exercise 14 Exercise 19 Exercise 31 Exercise 38 Ali Moallemi, Iraj Hedayati COMP232 - Mathematics for Computer Science 2/7 Exercise 8 Prove that there is a positive integer that equals the sum of the positive integers, not exceeding it. Is your proof constructive or non constructive. Answer: 3 = 1 + 2 Constructive. Ali Moallemi, Iraj Hedayati COMP232 - Mathematics for Computer Science 3/7 Exercise 14 Prove or disprove that, if a and b are rational numbers, then ab is also rational. Answer: To disprove it we just need to find a counter example: √ 1 2 2 = 2 Ali Moallemi, Iraj Hedayati COMP232 - Mathematics for Computer Science 4/7 Exercise 19 Show that if n is an odd integer, then there is a unique integer k such that n is the sum of k − 2 and k + 3. Answer: Let n be any arbitrary odd integer. We look for a k such that, n = (k − 2) + (k + 3) that is, n = 2k + 1. To find k, it is sufficient to see n−1 that k = n−1 2 . Since n is odd then, n − 1 is even, consequently, 2 is an integer, which means k is an integer. Moreover, this equation has only one solution that is, k is unique. Finally, There is a unique integer k for any n. Ali Moallemi, Iraj Hedayati COMP232 - Mathematics for Computer Science 5/7 Exercise 31 Prove that there are no solutions in positive integers x and y to the equation x4 + y 4 = 625. Answer: On one hand, since 54 = 625, both x and y have to be less than 5. On the other hand if both x and y be 4, Then we have, x4 + y 4 = 44 + 44 = 512, and 512 < 625. Then there is no integer value for x and y such that x4 + y 4 = 625. Ali Moallemi, Iraj Hedayati COMP232 - Mathematics for Computer Science 6/7 Exercise 38 Prove or disprove that if you have an 8-gallon jug of water and two empty jugs with capacities of 5 gallons and 3 gallons, respectively, then you can measure 4 gallons by successively pouring some of or all of the water in a jug into another jug. Answer: Let (j1 , j2 , j3 ) represent the quantities of water in each jug. Here is the sequence of steps. 1- (8, 0, 0) 2- (3, 5, 0) 3- (3, 2, 3) 4- (6, 2, 0) 5- (6, 0, 2) 6- (1, 5, 2) 7- (1, 4, 3) Ali Moallemi, Iraj Hedayati COMP232 - Mathematics for Computer Science 7/7
© Copyright 2025 Paperzz