# Mathematics for computer science

• majeedh
In summary, the conversation discusses multiple problems, including determining the truth or falsehood of statements, proving that the square of an odd number is an odd number using direct, indirect, and contradiction methods, and resolving typographical errors in the questions. The summary includes a brief overview of the notation used and the steps involved in proving by contradiction.
majeedh
i was hoping somebody could help me with these problems
1) Are the following statements true or false?
(a) 2 є S, where
S= {x є R|x is the square root of an integer}
b) ø є {ø}
c) ø c ø
d) {{ø}} c {ø, {ø}}
e) {ø, {ø}, {ø, {ø}}} has the cardinality 4
f) {ø, {a}, {ø,a}} is the powerset of set of cardinaltiy 2
g) if A,B and C are sets such that AuC = BuC and AuC = BnC then A=B

also another problem I had was:

Prove that the square of an odd number is an odd
number using

Last edited:

im sure very sure how to prove the odd number by using the proofs
but for problem 1
1) Are the following statements true or false?
(a) 2 2 S, where
S= {x 2 R|x is the square root of an integer}
(b) ; 2 {;}
(c) ; ;
(d) {{;}} {;, {;}}
(e) {;, {;}, {;, {;}}} has the cardinality 4.
(f) {;, {a}, {;, a}} is the powerset of a set of cardinality

this is what i got for number 1 but I am not sure about them
a) true
b) true
c) false
d) true
e) false
f) true

i got the following for direct proof but don't know how to solve it using indirect and contradiction:

This is a statement of the form P-->Q where
Domain = integers
P = x is an odd number
Q = x^2 is odd
direct proof: assume P true and try to prove Q
Assume P true =======> x is odd
=======> x = 2k + 1 where k is an integer

By substitution x^2 = x.x = (2k + 1)(2k + 1) = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1
This number is of the form 2(integer) + 1 so it is odd
Therefore P-->Q is true and the statement is true

Last edited:
I'll try and help as much as I can, but I'm not a computer scientist, and haven't studied any formal logic as such, so I may not be much help!

majeedh said:
im sure very sure how to prove the odd number by using the proofs
but for problem 1
1) Are the following statements true or false?
(a) 2 2 S, where
S= {x 2 R|x is the square root of an integer}
(b) ; 2 {;}
(c) ; ;
(d) {{;}} {;, {;}}
(e) {;, {;}, {;, {;}}} has the cardinality 4.
(f) {;, {a}, {;, a}} is the powerset of a set of cardinality

this is what i got for number 1 but I am not sure about them
a) true
b) true
c) false
d) true
e) false
f) true

Could you explain your notation; for example what does ; mean?

i got the following for direct proof but don't know how to solve it using indirect and contradiction:

This is a statement of the form P-->Q where
Domain = integers
P = x is an odd number
Q = x^2 is odd
direct proof: assume P true and try to prove Q
Assume P true =======> x is odd
=======> x = 2k + 1 where k is an integer

By substitution x^2 = x.x = (2k + 1)(2k + 1) = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1
This number is of the form 2(integer) + 1 so it is odd
Therefore P-->Q is true and the statement is true

That looks fine for the direct proof. I'm not too sure what your definition of indirect proof is here, but since the last question asks for a proof by contradiction, I would assume that indirect in this sense means a proof by contrapositive.

If so, to prove a statement by the contrapositive, you would show ~q=>~p. I.e. assume that x2 is not odd, and use it to prove that x is not odd.

For a proof by contradiction, you would assume x2 is not odd, and arrive at a contradiction.

Last edited:
i have managed to prove it by direct and indirect but don't know how to prove it by contradiction...
i also had some typo errors in the question which i have resolved

Last edited:
Well, we want to prove for odd x, x2 is odd. So, let x be odd and suppose that x2 is even. Then, write x=2k+1 and square it; arrive at a contradiction.

(Ive just spotted a typo in my above post, which may have confused you; the last line should be assume x2 is not odd, and arrive at a contradiction)

i could start the proof by assuming its odd but then what?

Last edited:

## What is the importance of mathematics in computer science?

Mathematics is the foundation of computer science and plays a crucial role in designing algorithms, analyzing their efficiency, and developing new technologies. It provides a systematic way of thinking and problem-solving that is essential for computer scientists.

## What are the key mathematical concepts used in computer science?

Some of the key mathematical concepts used in computer science include logic, discrete mathematics, graph theory, and linear algebra. These concepts are used to develop algorithms, analyze data structures, and model complex systems.

## How does mathematics help in data analysis for computer science?

Mathematics provides the necessary tools and techniques for data analysis, such as statistical methods, probability theory, and calculus. These tools help computer scientists to process and make sense of large amounts of data and extract meaningful insights from it.

## What are some real-world applications of mathematics in computer science?

Mathematics has numerous real-world applications in computer science, including cryptography, artificial intelligence, machine learning, and computer graphics. It is also used in fields like finance, healthcare, and engineering to solve complex problems and optimize processes.

## How can I improve my mathematical skills for computer science?

To improve your mathematical skills for computer science, you can practice solving problems and work on strengthening your understanding of key concepts. You can also take online courses or join study groups to learn from others and get feedback on your progress.

• Precalculus Mathematics Homework Help
Replies
23
Views
1K
• Precalculus Mathematics Homework Help
Replies
19
Views
1K
• Differential Geometry
Replies
4
Views
1K
• Precalculus Mathematics Homework Help
Replies
1
Views
1K
• Programming and Computer Science
Replies
32
Views
3K
• Set Theory, Logic, Probability, Statistics
Replies
1
Views
814
• Precalculus Mathematics Homework Help
Replies
5
Views
790
• Introductory Physics Homework Help
Replies
6
Views
2K
• Special and General Relativity
Replies
48
Views
3K
• Engineering and Comp Sci Homework Help
Replies
1
Views
2K