0% found this document useful (0 votes)
4 views13 pages

Exercise-5 Lect 23 To 28 Induction Contradiction and Algorithm

The document contains exercises related to mathematical concepts including induction, contradiction, algorithms, and combinatorics. It provides proofs and calculations for various mathematical statements and problems, such as proving the existence of the greatest even integer, using the Euclidean algorithm to find GCDs, and calculating bit strings and permutations. The exercises are structured with questions followed by detailed answers and explanations.

Uploaded by

Shafaq Tanveer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views13 pages

Exercise-5 Lect 23 To 28 Induction Contradiction and Algorithm

The document contains exercises related to mathematical concepts including induction, contradiction, algorithms, and combinatorics. It provides proofs and calculations for various mathematical statements and problems, such as proving the existence of the greatest even integer, using the Euclidean algorithm to find GCDs, and calculating bit strings and permutations. The exercises are structured with questions followed by detailed answers and explanations.

Uploaded by

Shafaq Tanveer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Exercise # 5 Lecture No: 23 to 28 Induction, Contradiction and

Algorithm

Q.No:1
Prove the following by the mathematical induction method:

, for all integers .


Answer:

It looks like your question is incomplete. Could you please provide the full mathematical
statement that needs to be proved using mathematical induction?

Mathematical induction typically follows these steps:

1. Base Case: Prove that the statement holds for the smallest integer (usually n=1n = 1 or
n=0n = 0).
2. Inductive Hypothesis: Assume that the statement holds for some integer kk.
3. Inductive Step: Prove that if the statement holds for kk, then it must also hold for
k+1k+1.

Let me know the full statement, and I'll be happy to help with the proof! 😊

Q.No:2
First formulate the negation of the following statement then prove the statement by the
contradiction method:

“There is no greatest even integer”.


Answer:

Step 1: Formulating the Negation of the Statement

The given statement is:

“There is no greatest even integer.”

To negate this statement, we assume the opposite:

“There exists a greatest even integer.”

This means that there is some even integer NN that is the largest among all even integers.
Step 2: Proof by Contradiction

To prove the original statement by contradiction, we assume the negation is true and show that it
leads to a contradiction.

Assumption:

Assume that there exists a greatest even integer NN. This means that NN is the largest even
number, and there is no even number greater than NN.

Contradiction:

 Consider the integer N+2N + 2.


 Since NN is even, it can be written as N=2kN = 2k for some integer kk.
 Adding 2 to both sides: N+2=2k+2=2(k+1)N + 2 = 2k + 2 = 2(k+1)
 Since 2(k+1)2(k+1) is also even, N+2N + 2 is an even number greater than NN.
 This contradicts our assumption that NN is the greatest even integer.

Since our assumption leads to a contradiction, the original statement must be true.

Q.No:3
Prove the following by contraposition:

If a product of two positive real numbers is greater than 100, then at least one of the numbers is
greater than 10.
Answer:

Proof by Contraposition

Step 1: Understanding the Statement

The given statement is:

If a product of two positive real numbers is greater than 100, then at least one of the
numbers is greater than 10.

Using logical notation, let:

 PP be the statement: "The product of two positive real numbers is greater than 100."
 QQ be the statement: "At least one of the numbers is greater than 10."

Thus, the given statement can be written as:

P⇒QP \Rightarrow Q
Step 2: Contrapositive Statement

The contrapositive of P⇒QP \Rightarrow Q is:

¬Q⇒¬P\neg Q \Rightarrow \neg P

In words, this means:

If both numbers are at most 10, then their product is at most 100.

This is logically equivalent to the original statement. If we can prove this, then the original
statement is also true.

Step 3: Proving the Contrapositive

Let aa and bb be two positive real numbers such that:

a≤10andb≤10.a \leq 10 \quad \text{and} \quad b \leq 10.

Now, consider their product:

a⋅b≤10×10=100.a \cdot b \leq 10 \times 10 = 100.

Thus, the product of aa and bb is at most 100, which is precisely ¬P\neg P (i.e., the product is
not greater than 100).

Since we have proved ¬Q⇒¬P\neg Q \Rightarrow \neg P, the original statement P⇒QP \
Rightarrow Q is true by contraposition.

Q.No:4
Use the Euclidean algorithm to hand-calculate the greatest common divisors of each of the
following pairs of integers:
a) 1,188 and 385
b) 509 and 1,177
Answer:

We will use the Euclidean Algorithm to find the greatest common divisor (GCD) for each pair
of integers. The algorithm follows these steps:

1. Divide the larger number by the smaller number.


2. Take the remainder.
3. Replace the larger number with the smaller number and the smaller number with the
remainder.
4. Repeat the process until the remainder becomes zero.
5. The last nonzero remainder is the GCD.
(a) GCD of 1,188 and 385

1. 1188÷385=31188 \div 385 = 3 remainder 1188−(3×385)=1188−1155=331188 - (3 \times


385) = 1188 - 1155 = 33
2. 385÷33=11385 \div 33 = 11 remainder 385−(11×33)=385−363=22385 - (11 \times 33) =
385 - 363 = 22
3. 33÷22=133 \div 22 = 1 remainder 33−(1×22)=33−22=1133 - (1 \times 22) = 33 - 22 = 11
4. 22÷11=222 \div 11 = 2 remainder 22−(2×11)=22−22=022 - (2 \times 11) = 22 - 22 = 0

Since the remainder is 0, the GCD is 11.

(b) GCD of 509 and 1,177

1. 1177÷509=21177 \div 509 = 2 remainder 1177−(2×509)=1177−1018=1591177 - (2 \


times 509) = 1177 - 1018 = 159
2. 509÷159=3509 \div 159 = 3 remainder 509−(3×159)=509−477=32509 - (3 \times 159) =
509 - 477 = 32
3. 159÷32=4159 \div 32 = 4 remainder 159−(4×32)=159−128=31159 - (4 \times 32) = 159 -
128 = 31
4. 32÷31=132 \div 31 = 1 remainder 32−(1×31)=32−31=132 - (1 \times 31) = 32 - 31 = 1
5. 31÷1=3131 \div 1 = 31 remainder 31−(31×1)=31−31=031 - (31 \times 1) = 31 - 31 = 0

Since the remainder is 0, the GCD is 1.

Final Answers

 GCD(1188, 385) = 11
 GCD(509, 1177) = 1 (They are relatively prime)

Let me know if you need further clarification! 😊

Or

a) 1188 and 385

1. Divide 1188 by 385: 1188 = 385 * 3 + 33


2. Divide 385 by the remainder 33: 385 = 33 * 11 + 22
3. Divide 33 by the remainder 22: 33 = 22 * 1 + 11
4. Divide 22 by the remainder 11: 22 = 11 * 2 + 0
Since the remainder is now 0, the last non-zero remainder is the greatest common divisor.

Therefore, the greatest common divisor of 1188 and 385 is 11.

b) 509 and 1177

1. Divide 1177 by 509: 1177 = 509 * 2 + 159


2. Divide 509 by the remainder 159: 509 = 159 * 3 + 32
3. Divide 159 by the remainder 32: 159 = 32 * 4 + 31
4. Divide 32 by the remainder 31: 32 = 31 * 1 + 1
5. Divide 31 by the remainder 1: 31 = 1 * 31 + 0

Since the remainder is now 0, the last non-zero remainder is the greatest common divisor.

Therefore, the greatest common divisor of 509 and 1177 is 1.

Q.No:5
The following algorithm segment makes change; given an amount of money A between 1cent
and 99cent, it determines a breakdown of A into quarters (q), dimes (d), nickels (n), and pennies
(p).
q : = A div 25
A : = A mod 25
d : = A div 10
A : = A mod 10
n : = A div 5
p : = A mod 5
Trace this algorithm segment for A = 69.

Answer:

Let's trace the given algorithm step by step for A = 69 cents:

Step 1: Compute Quarters (q)

q:=69÷25=2(integer division)q := 69 \div 25 = 2 \quad \text{(integer division)} A:=69mod


25=69−(2×25)=69−50=19A := 69 \mod 25 = 69 - (2 \times 25) = 69 - 50 = 19

Now, A=19A = 19.


Step 2: Compute Dimes (d)

d:=19÷10=1(integer division)d := 19 \div 10 = 1 \quad \text{(integer division)} A:=19mod


10=19−(1×10)=19−10=9A := 19 \mod 10 = 19 - (1 \times 10) = 19 - 10 = 9

Now, A=9A = 9.

Step 3: Compute Nickels (n)

n:=9÷5=1(integer division)n := 9 \div 5 = 1 \quad \text{(integer division)} A:=9mod


5=9−(1×5)=9−5=4A := 9 \mod 5 = 9 - (1 \times 5) = 9 - 5 = 4

Now, A=4A = 4.

Step 4: Compute Pennies (p)

p:=4mod 5=4p := 4 \mod 5 = 4

Final Answer: Breakdown of 69 cents

 Quarters (q) = 2
 Dimes (d) = 1
 Nickels (n) = 1
 Pennies (p) = 4

Thus, 69 cents = 2 quarters + 1 dime + 1 nickel + 4 pennies.

Let me know if you need further explanation! 😊

Or

Here's the trace of the algorithm for A = 69:

Step A q d n p
1 69
2 69 2
3 19 2
4 19 2 1
5 9 21
6 9 211
7 4 211
8 4 2114

Therefore, for A = 69, the algorithm determines the following breakdown:

 q = 2 (two quarters)
 d = 1 (one dime)
 n = 1 (one nickel)
 p = 4 (four pennies)

Exercise # 6 Lecture No: 29 to 34 Combinatorics


Q.No:1
How many bit strings consist of from four through nine digits?
Answer:

Here's how to calculate the number of bit strings with lengths from four through nine digits:

Understanding Bit Strings:

A bit string is a sequence of bits (0s and 1s). For a bit string of length 'n', there are 2 possibilities
for each position (either a 0 or a 1). Therefore, there are 2ⁿ possible bit strings of length 'n'.

Calculation:

We need to find the total number of bit strings of lengths 4, 5, 6, 7, 8, and 9. We can do this by
calculating the number of bit strings for each length and then adding them together:

 Length 4: 2⁴ = 16
 Length 5: 2⁵ = 32
 Length 6: 2⁶ = 64
 Length 7: 2⁷ = 128
 Length 8: 2⁸ = 256
 Length 9: 2⁹ = 512

Total number of bit strings = 16 + 32 + 64 + 128 + 256 + 512 = 1008

Therefore, there are 1008 bit strings consisting of from four through nine digits.

Q.No:2
Suppose n(A) = 12 denotes the number of employee having cars in a company, n(B) = 9 denotes the
number of employee having motorcycle and 5 employees have both then find .

Answer:

Here's how to find n(A ∪ B), which represents the total number of employees who have either a
car or a motorcycle or both:

We use the principle of inclusion-exclusion:

n(A ∪ B) = n(A) + n(B) - n(A ∩ B)

Where:

 n(A) is the number of employees with cars (12).


 n(B) is the number of employees with motorcycles (9).
 n(A ∩ B) is the number of employees with both cars and motorcycles (5).

Plugging in the given values:

n(A ∪ B) = 12 + 9 - 5 n(A ∪ B) = 21 - 5 n(A ∪ B) = 16

Therefore, there are 16 employees who have either a car or a motorcycle or both.

Q.No:3
c) Evaluate .
d) How many 4-permutations are there of a set of 8 objects?
Answer:

To evaluate P(6,2)P(6,2), we use the permutation formula:

P(n,r)=n!(n−r)!P(n, r) = \frac{n!}{(n-r)!}

For P(6,2)P(6,2):

P(6,2)=6!(6−2)!=6!4!P(6,2) = \frac{6!}{(6-2)!} = \frac{6!}{4!}

Expanding the factorials:

6!=6×5×4!6! = 6 \times 5 \times 4! 4!=4×3×2×1=244! = 4 \times 3 \times 2 \times 1 = 24

Since 4!4! cancels out:

P(6,2)=6×5×4!4!=6×5=30P(6,2) = \frac{6 \times 5 \times 4!}{4!} = 6 \times 5 = 30


Final Answer:

P(6,2) = 30 \] ✅

A 4-permutation of a set of 8 objects is the number of ways to choose 4 objects from the set of 8
where the order matters. The formula for permutations is:

P(n, r) = n! / (n - r)!

Where n is the total number of objects and r is the number of objects we are choosing.

In this case, n = 8 and r = 4. So:

P(8, 4) = 8! / (8 - 4)! = 8! / 4!

As we calculated in part (a), this is equal to 1680.

Therefore, there are 1680 4-permutations of a set of 8 objects.

Q.No:4
Compute and for .

Answer:

You are asking to compute the floor and ceiling functions for x=754x = \frac{75}{4}.

Step 1: Compute xx

x=754=18.75x = \frac{75}{4} = 18.75

Step 2: Floor Function ⌊x⌋\lfloor x \rfloor

The floor function ⌊x⌋\lfloor x \rfloor returns the greatest integer less than or equal to xx.

⌊18.75⌋=18\lfloor 18.75 \rfloor = 18

Step 3: Ceiling Function ⌈x⌉\lceil x \rceil

The ceiling function ⌈x⌉\lceil x \rceil returns the smallest integer greater than or equal to xx.

⌈18.75⌉=19\lceil 18.75 \rceil = 19


Final Answer:

\lfloor 18.75 \rfloor = 18, \quad \lceil 18.75 \rceil = 19 \] ✅

Q.No:5
How many distinguishable ways can the letter of the word GHWWBCBWYY be arranged?

Answer:

Let's count the frequency of each letter in the word GHWWBCBWYY:

 G: 1
 H: 1
 W: 3
 B: 2
 C: 1
 Y: 2

The word has a total of 10 letters.

The number of distinguishable arrangements of these letters can be found using the formula for
permutations with repetitions:

n1!n2!...nk!n!

where n is the total number of letters, and n1,n2,...,nk are the counts of each distinct letter.

In our case, n = 10, and we have the following counts for each letter:

 G: 1
 H: 1
 W: 3
 B: 2
 C: 1
 Y: 2

So the number of distinguishable arrangements is:

1!1!3!2!1!2!10!=1⋅1⋅6⋅2⋅1⋅210!=2410!

Now, we calculate 10!: 10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3,628,800

So the number of distinguishable arrangements is:

243,628,800=151,200
Thus, there are 151,200 distinguishable ways to arrange the letters of the word
GHWWBCBWYY.

Final Answer: The final answer is 151200

Q.No:6
How many signals can be given by 7 flags of different colors using 3 flags at a time?

Answer:

This is a permutation problem because the order of the flags matters. We have 7 flags and we
want to arrange 3 of them at a time. The formula for permutations is:

P(n, r) = n! / (n - r)!

Where n is the total number of items and r is the number of items1 we choose at a time.

In this case, n = 7 (7 flags) and r = 3 (using 3 flags at a time).

So, we have:

P(7, 3) = 7! / (7 - 3)! P(7, 3) = 7! / 4! P(7, 3) = (7 * 6 * 5 * 4 * 3 * 2 * 1) / (4 * 3 * 2 * 1) P(7, 3)


= 7 * 6 * 5 P(7, 3) = 210

Therefore, 210 different signals can be given using 7 flags of different colors, taking 3 at a time.

Practices Questions (Lecture # 23-28)

Q1) Using mathematical induction prove that is true for integral values of .

Answer:

Q2) Using mathematical induction to prove that for all positive integers
n.

Q3) Suppose is divisible by 6 is true for any positive integer. Justify the statement for n = k+1.
Q4) Suppose is divisible by 4 is true for . Justify the statement for .

Q5) Using contradiction to prove that if is odd then x is even.

Q6) Prove by contradiction that is irrational.

Question:1

A die is weighted so that the outcomes produce the following probability distribution:

Outcome 1 2 3 4 5 6
Probability 0.2 0.4 0.2 0.2 0.1 0.1

Consider the event A = {even number occur on die} then find and .

Question:2

A box contains six discs numbered 1 to 6. Find for each integer x ( x is from 4 to 9), the probability that
the numbers on two discs drawn without replacement have a sum equal to x

Question:3

There are 6 cats and 12 dogs in a form house. Half of the dogs and half of the cats have blue eyes. Find
the probability that one pet chosen either a cat or a pet having blue eyes.

Question:4

A fruit basket contains 20 oranges 4 of which are rotten and 10 are good. Two oranges are selected. What
is probability that the first is good and the second rotten?

Question:5

A pair of fair dice is thrown. Find the probability P that the sum is 8 or greater if
(i) 5 appear on first die.
(ii) 5 appear on at least one die.

Question:6
Consider an equiparable space S = {w, x, y, z}; hence each elementary event has the same

probability .

Consider the events A = {x, z}; B = {y, z} & C = {w, z}


(i) Show that A, B and C are pair wise independent.

(ii) Show that A, B and C are not independent.

Question:7
What is the probability that a randomly selected poker hand contains exactly 4 aces, given that it contains
at least 3 aces?

You might also like