Docsity

Mathematical Principles for Computer Science Solutions, Assignments of Computer Science

Partial preview of the text

Download Mathematical Principles for Computer Science Solutions and more Assignments Computer Science in PDF only on Docsity!

MATHEMATICAL OF

COMPUTER SCIENCE

ASSIGNMENT

MAPC5112 MSIMISI SIGCINO DLAMINI ST

MAY 15, 2025

QUESTION 1

Q.1.

Q.1.1.

8+6÷2× (3+5)-

8+6÷2×8-

According to (Mathsisfun.com, 2018) in order of operations (PEDMAS)

References

Mathsisfun.com. (2018). Order of Operations - PEMDAS. [online] Available

at: https://www.mathsisfun.com/operation-order-pemdas.html.

Q.1.1.

8+6÷2× (3+5)-

14÷

7×8-

=52 This result is 52 the difference from the correct which 28

demonstrating the importance of the following the operations

The Correct answer 8+6÷2x (3+5)-

8 +3 x 8-

According to (Khanacademy.org, 2023)

Q.1.2 Simplifying the Exponential Expression

3

− 1

2

− 1

2

2

− 1

( 2

2

)

− 1

− 2

3

2

( 2

3

)

2

6

4

− 1

( 2

4

)

− 1

4

Simplify the equation:

=12(4x-3) +15(5x+9) =20(2x) +30(15)

Expanding the Equation:

12 × 4x-12 × 3+15 × 5x+15 × 9=20 x 2x

48x-36+75+135=40x+450-70x

Collect and combine like terms

(48x+75x)-36+135=(40x-70x) +

128x+99=-30x+

128x+99=450-

128x +30x

153x=

X =

X=

According to (BBC Bitesize, 2013) in solving equations.

Q.2.

| 5 x − 4 x | ≤ 15

− 15 ≤ 5 − 4 x

Minus or subtract 5 from both sides

− 15 − 5 ≤ 5 − 4 x

− 20 ≤ − 4 x

We divide by -4 and (eventually add reserve the inequality sign)

− 4 x

5 ≥ x

5 − 4 x ≤ 15

Minus or subtract 5

5 − 4 x ≤ 15 -

− 4 x ≤ 10

Divide by -4(REVERSE THE SIGN)

X ≥ −

≤ X ≤ 5

According to (Lamar.edu, 2024) on Algebra on absolute value in

inequalities

Q.2.

The two numbers with product 60 average 8 are 10 and 6 first we have a

the find the two numbers given the product and average

: Product: a × b = 60

Average:

a + b

we multiply both sides of the average by 2:

8 x 2 =

a × b = 16

Rewrite as a quadratic with roots a and b:

t

2

−( a + b ) t + ab = 0

t

2

− 16 t + 60 = 0

Calculate the discriminant:

2

− 4 × 1 × 60 = 256 − 240 = 16

Find roots:

t =

Root 1:

t =

Root 2:

t =

The two numbers are 10 and 6

According to (BBC Bitesize, 2019) on solving quadratic equation.

Q.2.

3

√

− 8 a

3

b

6

×

4

√

16 x

8

y

12

Verification:

√

√

According to (College, 2019) on Simplifying Radical Expressions Using the

Product Rule and the Quotient Rule

And All steps are consistent with the normal algebraic rules for radicals

(Stewart, 2018).

Question 3

Q.3.1 The video shows the difference between atomic statement and

molecular statement on which your knowledge paper focuses. Atomic

statements are like the single building blocks of logic. They represent

assertions that cannot be broken down further. For example, the sentence

“the sky is blue” is an atomic statement. On the other hand, more than

one atomic statement combined with logical connectives is a molecular

statement. These connectives— “and”, “or”, “not”, “if…, then”—are used

to form more complex statements. By recognizing how atomic and

molecular statements interact, viewers are invited to see mathematics as

a web instead of just a collection of isolated facts. According to (Sixty

Thought ,2024). And other context in programming

Atomic Statement Example:

python.

x has been assigned a value of 10. Justification: It is atomic as it doesn’t

contain any sub-statements and performs only one action which is

assignment. It assigns a value to a variable directly without logical or

structural complexity (Smith, 2020, p. 45).

Molecular Statement Example.

python.

if temperature > 30:

print ("Hot day").

This is a molecular because it combines a condition (it is more than 30)

and an action (print). There is a structural dependence of the if statement

on nested components which makes it a compound statement (Johnson,

2019, p. 112).

References.

Smith, J. (2020). Programming Fundamentals. Cambridge Press

Johnson, R. (2019). Logic in Computer Science. Springer.

All steps are consistent of programming rules (Smith, 2020; Johnson,

Q.3.

Q.3.2.

Given : A ={ 1 , 2 , 3 , 4 , 5 , 6 } ,B ={ 2 , 4 , 6 } ,D ={ 7 , 8 , 9 } , U ={ 1 , 2 ,…. , 10 }

( B ∪ C )

C

1. B ∪ C ={ 1 , 2 , 3 , 4 , 6 }

( B ∪ C )

C

= U ¿ { 1 , 2 , 3 , 4 , 5 , 6 ¿}={ 5 , 7 , 8 , 9 , 10 }

According to (GeeksforGeeks, 2021) on Universal Set: Definition, Symbol,

Venn Diagram and Examples

Q.3.2.2 A/B

A/B= {1,2,3} which are element fond in A not B

Q.3.2.3 (

D ∩ C

C

)

∩ ( A ∩ B )

C

1. C

C

= U ¿={ 4 , 5 , 6 , 7 , 8 , 9 , 10 }

D ∩ C

C

= D ={ 7 , 8 , 9 }

A ∩ B ={ 2 , 4 , 6

( A ∩ B )

C

= U ¿ 2 , 4 , 6 }={ 1 , 3 , 5 , 7 , 8 , 9 , 10 }.

3. Union: {7,8,9} ∪ {1,3,5 ,7,8,9,10} = {1,3,5,7,8,9,10}.

According to (GeeksforGeeks, 2021) on Universal Set: Definition, Symbol,

Venn Diagram and Examples

Sequence = 0 , 1 , 3 , 7 , 15 , 31 ,.. …

Identify the pattern: Each term is

n

1

Q.2.1 BBC Bitesize (2013). Solving equations - Algebraic skills - National 4

Maths Revision - BBC Bitesize. [online] BBC Bitesize. Available at:

https://www.bbc.co.uk/bitesize/guides/zt8sgk7/revision/3.

Q.2.2 Lamar.edu. (2024). Algebra - Absolute Value Inequalities (Practice

Problems). [online] Available at:

https://tutorial.math.lamar.edu/problems/alg/SolveAbsValueIneq.aspx.

Q.2.

 Lamar.edu. (2024). Algebra - Absolute Value Inequalities (Practice

Problems). [online] Available at:

https://tutorial.math.lamar.edu/problems/alg/SolveAbsValueIneq.asp

x

Q.2.

 College, H.C. (2019). Section 1: Simplifying Radical Expressions

Using the Product Rule and the Quotient Rule | Houston Community

College (HCC) | We are Houston’s Community College. [online]

Hccs.edu. Available at: https://www.hccs.edu/departments/division-

of-instructional-services/hcc-texas-success-initiative-assessment/

optional-math-review/session-11---radical-expressions/section-1-

simplifying-radical-expressions-using-the-product-rule-and-the-

quotient-rule-/.

 Stewart, J. (2018). Algebra and Trigonometry. Cengage Learning.

Q.2.

 College, H.C. (2019). Section 1: Simplifying Radical Expressions

Using the Product Rule and the Quotient Rule | Houston Community

College (HCC) | We are Houston’s Community College. [online]

Hccs.edu. Available at: https://www.hccs.edu/departments/division-

of-instructional-services/hcc-texas-success-initiative-assessment/

optional-math-review/session-11---radical-expressions/section-1-

simplifying-radical-expressions-using-the-product-rule-and-the-

quotient-rule-/.

 Stewart, J. (2018). Algebra and Trigonometry. Cengage Learning.

Question 3

Q.3.

 (Sixty Thought ,2024). Available at: https://youtu.be/tGmWxsdTm-c?

si=M9HhOo0qOg3ym2bd [Accessed 16 May 2025].

 Smith, J. (2020). Programming Fundamentals. Cambridge Press.

 Johnson, R. (2019). Logic in Computer Science. Spring

Q.3.

Q.3.2.1GeeksforGeeks. (2021). Universal Set: Definition, Symbol, Venn

Diagram and Examples. [online] Available at:

https://www.geeksforgeeks.org/universal-set/.

Q.3.2.2 GeeksforGeeks. (2021). Universal Set: Definition, Symbol, Venn

Diagram and Examples. [online] Available at:

https://www.geeksforgeeks.org/universal-set/.

Q.3.

 Pierce, R. (2017). Sequences. [online] Mathsisfun.com. Available at:

https://www.mathsisfun.com/algebra/sequences-series.html.

 Rosen, K. H. (2019). Discrete Mathematics and Its Applications (8th

ed.). McGraw-Hill.