Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 18

CLASS TEST

TECHNOLOGY PARK MALAYSIA


AQ010-3-1-MCFC

MATHEMATICAL CONCEPTS FOR COMPUTING

Name: Bikram Shrestha


Student ID: NP000022
Intake: NPI1F1909IT
Hand in date: 16-8-2020
Hand out date: 18-8-2020

INSTRUCTION TO CANDIDATES:

1. This paper of 2 page (excluding the cover page).

2. This paper consists of 2 sections.

Section A (20 marks)


This section has 3 questions. Answer all questions.

Section B (30 marks)

3. Write clearly and number the question you attempt accordingly.

4. You must obtain 50% overall to pass this module.


Quiz 1
Name: Bikram shrestha

TP Number: NP000022

Intake: NPI1F1909IT
Duration: 20 minutes

Answer ALL questions. Please fill in your answer in the table provided.

Question No 1 2 3 4 5 6 7
Marks 2 1 2 2 1 1 1
Answer A D B C A C D

Solution:
1. Answer: (A= 10.625)10
=1*23+0*22+1*21+0*20.1*2-1+0*2-2+1*2-3
=8+2.625
= (10.625)10

2. Answer:(D=10011.111)2)
11101.011
-1001.100
10011.111

3. Answer:(B=126646.4)8
(AB12.C)16 in binary form
A= (1010) B= (1011) 1= (0001) 2= (0010) .C= (1100)
= (1010101100010010.1100)2
1010101100010010.1100
+1010010011.11

1010110110100110.1000

3-bit representation
001 010 110 110 100 110. 100 000
1 2 6 6 4 6. 4 0
= (126646.4)8

4. Answer: (C=213.234375)8
=3*82+2*81+5*80.1*8-1+7*8-2
=192+16+5.234375
=213.2343758

5. Answer: (A=80F1.1F)16
A B 1 D. 3 E
-2 A 2 C. 1 F
8 0 F 1. 1 F

6. Answer: (c=105)

01101001
Integer the 1st place as it determines the sign
=1101001
=1*26+1*25+0*24+1*23+0*22+0*21+1*20
=64+32+8+1
=105

7. Answer(D=11101001)

(-23)=11101001

(23)=00010111

00010111 1s complement 11101000 then add 1

=11101001

Quiz-2
Name: Bikram shrestha

TP Number: NPI000022

Intake: NPI1F1909IT
Duration: 20 minutes

Answer ALL questions. Please fill in your answer in the table provided.

Question No 1 2 3 4 5
Marks 2 2 2 2 2
Answer B B D C A

1. Answer: (B = {(-1,3), (-2,2), (-2,5), (-3,3), (-1,5), (-2,3)}


A= {-1,-2,-3}
B= {2, 3, 5}
Then,
Relation from A to B (R)= {(-1, 2), (-1,3), (-1,5), (-2,2), (-2,3), (-2,5), (-3,2), (-3,3), (-
3,5) }
As,
R= {(X, Y) /2X+3Y is prime}
= 2X+3Y
= 2X (-1) +3*2
= 4 (which is not prime number)
Similarly,
(X, Y) = (-1, 3) =2*(-1) +3*3 = 7 (prime)
(X, Y) = (-1, 5) = 2*(-1) + 3*5 =13 (prime)
(X, Y) = (-2, 2) = 2*(-2) + 3*2 = 2 (prime)
(X, Y) = (-2, 3) = 2* (-2) + 3*3 = 5 (prime)
(X, Y) = (-2, 5) = 2* (-2) + 3*5 = 11 (prime)
(X, Y) = (-3, 2) = 2* (-3) + 3*2 = 0 (not prime)
(X, Y) = (-3, 3) = 2* (-3) + 3*3 = 3 (prime)
(X, Y) = (-3, 5) = 2* (-3) + 3*5 = 9 (prime)
So,
R = {(-1, 3), (-2, 2), (-2,5), (-3,3), (-1,5), (-2,3)}

2. Answer: (B= R is not reflexive, symmetric, not transitive )


A = {α, β, γ}
B = {(α, γ), (γ, α), (β, γ)}
Now,
-R is not reflexive.
-To be symmetric we have the condition that if (a, b) € R and (b, a) €R for some a, b €
A and the above relation satisfies the condition then, R is symmetric.
- To be transitive a set A needs to (a, b) € R for a, b, c € A
But the above relation does not satisfy the condition to be transitive.
So, R is not transitive

3. Salutation: ( D ={ (a, b) / b ≤ a2 }
A = {1,5,7}
R = {(1, 1), (7, 5), (5,7), (5, 5), (7, 6)}
The third statement R = {(a, b)/ b ≤ a2} is true
For,
(a, b) = (1, 1) (a, b) = (7, 5) (a, b) = (5,7) (a, b) = (5, 5)
2 2
b≤a b≤a b ≤ a2 b ≤ a2
1 ≤ 12 5 ≤ 72 7 ≤ 52 5 ≤ 52
1≤ 1 5 ≤ 49 7 ≤ 25 5 ≤ 25
2 2
So, b ≤ a b≤a b ≤ a2 b ≤ a2
(a, b) = (7, 1)
b ≤ a2
1 ≤ 49
So, R={(a, b)/ b ≤ a2 }

4. Answer: {c = (1, 1), (2, 2), (2, 1), (3, 3), (4, 4), (1,2)}
R = {(1,1), (2,2), (2,1), (3,3), (4,4), (1,2)}
ab bc ac
(1, 1)
(2, 2)
(2, 1) (1,2) (1,1) (2,1) (1,1)
(3, 3)
(4, 4)
(1, 2) (2,1) (2,2) (1,1) (2,2)

The above relation satisfies the condition to be reflexive, symmetric and transitive.

5. Answer: (A = 33554432)
Let, A be the set of 5 element
So, A = {1, 2, 3 ,4, 5}
Now, the relation R from set A is R = A*A
As A contain 5 elements
R = 25*5
=33554432

Quiz-3
Name: Bikram shrestha__________________
TP Number: NPI000022_________________________

Intake: NPI1F1909IT__________________________
Duration: 30 minutes Answer all questions. Each question carries 5 marks.

1. Give a direct proof, “if n is an even integer then n + n 3 is also an even integer”.
Solution:
If x is an even integer.
Then,
To proof n3+n is also an even integer.
So,
n = k [k is constant of even integer]
now,
n3 = k3 = even integer
then,
k3+k = even integer
Therefore
n3+n is also an even integer.

2. Use proof by contradiction to prove that “if 4 2 x≥ , then x ≥ 2”.


Proof:
If x2 ≥ 4, then |x| ≥ 2
Now, x2 ≥ 4
X*X ≥ 2*2
By idempotent laws,
X≥2
If |X| ≥2
X in positive.
Then,
X ≥2
So, X ≥2 and X ≥2 proved.

3.
Answer:
Let us assume that,X3+2X2+8X+16=0
For showing that X=-2
Suppose X≠-2,then X+2≠0
Now, X3+2X2+8X+16=0
        Or,x2(X+2)+8(x+2)=0
           Or,(X+2)(x2+8)=0
Therefore , (x2+8)=0, this is not possible, we must have X=-2

Test
Section A
Question A1: Solution:
Convert 315.12 octal numbers into 3-bit representation binary form
3 1 5 . 1 2

011 001 101. 001 010

011001101.001010 it convert in to 4- bit representation in binary form

1100 1101. 0010 1000

C D. 2 8

234 decimal number convert in to hexadecimal form

234 = E A

Now,

BD12. A3

-CD.28

BC45.7B

Then,

BC45.7B

+ C.A

BC52.1B

BC52.1B

+ EA

BD3C.1B

Therefore BD12.A3-315.128 +1100.1012+23410 = (BD3C.1B)16

Question A2:
Solution:

28 = 000111002

(-28) = 111000112

15 = 00001112
1’s complement of 00011100 = 11100011

2’s complement of 11100011 = 11100011

+1

11100100

Then,

11100100

+00001111

11110011

Therefore final answer is 1111001

Question A3

Solution:

Let, the number of student who liked apricots, banana and cantaloupes be A, B and C
respectively.

Then,
n (U) = 60

n (A) = 35

n (B) = 30

n (C) = 33

n (AnB) = 11

n (Bnc) =15

n (AnC) = 17

AnBnC = 5

Above information in Venn diagram:

U A

12
6
9 B
5
12
10
6

Question A4

Question A4

Solution:

F (X) = x2-1

g (X) = 3X+7
Then,

a. f(-2)
f(x) = x5-1
= (-2)5-1
=-32-1
=-33
Therefore f(-2) = -33

now,

b.

g (f(x)) = g (x5-1)

= -3x+7

=-3(x5-1)+7

=3x5+3+7

=3x5+10

Therefore gof(x) = 3x5+10

Question A5

Solution:

The first car can filled in 3c9 ways

The second car can filled in 3c6 ways

The third car can filled in 3c3 ways


Now,

Any group can occupy any car if we permute

Again then it will more

Now,

 We know multiplication rule=number of ways of filling first car*number of ways of filling
second*number of ways as filling third

=9c3*6c3*3c3

=   9! * 6! * 3!

3!*(9-3)! 6!(6-3)! 3!(3-3)!

= 84*20*1

=1680 ways

Therefore 1680 ways remaining nine people may be allocated to the cars.

Section B

Question B1

a. Converting 15.2510 in to binary system.


Solution:

1510 = 1111

For fractional part,

0.25*2 = 0.5 = 0

0.5*2 = 1 = 1

15.2510 = 1111.012

Normalization = 1.11101*23

Mantissa = 11101000000000000000000

Extract exponent = 3

Bias = 127+3 = 130 =100000102

Single bit = +ve

Final answer = 01000001011101000000000000000000

Question B1 (B)

Solution:

1100 0010 1101 0000 0000 0000 0000 0000

Step 1: separating, exponent and mantissa

Sign = 1
Exponent = 10000101

Mantissa = 10100000000000000000000

Step 2 = Sign = negative (-)

Step 3 = converting 10000101 in to decimal

=1*27+0*26+0*25+0*24+0*23+1*22+0*21+1*20

=128+4+1

=133

Exponent = 133

Actual Exponent of two = Exponent-bias

=133-127

=6

Step 4 = Mantissa

=10100000000000000000000

= 1.10100000000000000000000*2 6

Step 5 = Converting binary in to decimal

= (1101000)2

= 1*26+1*25+0*24+1*23+0*22+0*21+0*20

= 64+32+8

= 104

Therefore final answer is 10410

Question B2

Solution:
A)
i) True
ii) False
iii) False

B)
i) U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}

A = {1, 3, 5, 7,9, 11}

B = {6}

ii)
A-B = {1, 3, 5, 7, 9, 11} – {6}
= {1, 3, 5, 7, 9, 11}
AnB’ =[ {1, 3,5, 7, 9, 11} n {1, 2, 3, 4, 5, 6, 7, 8,9 ,10, 11} – {6}]
={1,3,5,7,9,11} n{1,2,3,4,5,6,7,8,9,10,11}
={1,3,5,7,9,11}
Therefore A-B AnB proved

iii)
P(B) = {Ө, {6}}
n[P(B)] = 21 = 2

Question B3
Solution:

Given,

Probability of Sally passing her driving test = 0.7

Probability of Laura and sally both passing their driving test = 0.56
a) Work out the probability of laura passing her driving test?
Solution:
Let y be the probability of laura passing her driving test, then:
0.7*y = 0.56
y = 0.8
Therefore, the probability of laura passing her driving test is 0.8

b) Solution:

0.8 Pass

Pass 0.2
Fail
0.7 Pass

0.8

0.3 Fail 0.2

Fail

c) Solution:
i) p (pf) = 0.7*0.2 = 0.14
p(FP) = 0.3*0.8 = 0.24
The probability of only one of them passing the driving test = p(PF) + p(PF)
= 0.14+0.24
= 0.38
ii) The probability of both women failing is 0.3*0.2 = 0.06

You might also like