0% found this document useful (0 votes)
151 views4 pages

CSCI190 Exam 1 2024spring-1

Uploaded by

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

CSCI190 Exam 1 2024spring-1

Uploaded by

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

CSCI 190 Discrete Mathematics Applied to Computer Science

Exam 1

Name : ____________________________

Read these instructions before proceeding.

 Closed book. Closed notes. You can use calculator.

 You have 120 minutes to complete this exam.

 No questions will be answered during the exam or immediately afterwards. Answer each question
as best you can. Partial credit will be awarded for reasonable efforts. If a question contains an
ambiguity or a misprint, then say so in your answer, providing the answer to a reasonable
interpretation of the question; give your assumptions.

 Answer the problems on the blank spaces provided for each problem.

 Box your answers.

Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14 Q15 Q16 Q17 Q18 Total
(6) (7) (7) (6) (6) (8) (4) (4) (4) (4) (6) (6) (5) (6) (5) (5) (6) (5) (100)

1. (6 pts) Determine whether the proposition is TRUE or FALSE. No justifications needed.

a) 5 + 4 = 8 if and only if 2 + 3 = 6. (2 pts)

b) If 20 > 11, then 2 > 5. (2 pts)

c) If it is sunny, then it is sunny. (2 pts)

2. (7 pts) Determine whether (¬p → ¬q) ≡ (q → p) using truth table.

3. (7 pts) Prove that (p ˄ (¬q → ¬p)) → q is a tautology using propositional equivalence and
the laws of logic. Show steps. Give names of laws used in all steps.

1
4. (6 pts) Write the contrapositive, converse, and inverse of the following:

If you like the class, then you will be excited.

a) contrapositive (2 pts)

b) converse (2 pts)

c) inverse (2 pts)

5. (6 pts) Suppose the variable x represents people, and


F(x): x is friendly T(x): x is tall H(x): x is happy.

Write the statement using these predicates and any needed quantifiers.

a) All people are not happy. (3 pts)

b) Some friendly people are tall. (3 pts)

6. (8 pts) Consider the following theorem:


“if x and y are odd integers, then 3x + y is even”.
Give a direct proof of this theorem. Show Steps.

7. (4 pts) Draw two Venn diagrams for A U (B ∩ C) and (A ∩ B) U C.


Are they the same?

8. (4 pts) determine whether the given set is the power set of some set. (Answer “Yes” or “No”).
If the set is a power set, give the set of which it is a power set.

a) {Ø, {a}, {Ø}, {a,Ø}} (2 pts)

b) {{Ø}, {{ Ø,b}}} (2 pts)

2
9. (4 pts) Just answer “yes” or “no” in the box. No justifications needed.

(a) Suppose f: Z → Z has the rule f(n) = n + 5. Determine whether f is 1-1. (1 pts)

(b) Suppose f: Z → Z has the rule f(n) = n + 5. Determine whether f is onto. (1 pts)

(c) Suppose f: N → N has the rule f(n) = n2 + 3. Determine whether f is 1-1. (1 pts)

(d) Suppose f: N → N has the rule f(n) = n2 + 3. Determine whether f is onto. (1 pts)

10. (4 pts) Find an (a formula that generates the following sequence a1, a2, a3 . . . . )

a) 26, 29, 32, 35, 38,. . . (2 pts)

b) -7, 7, -7, 7, -7, 7, . . . (2 pts)

11. (6 pts) Suppose A= 001 and B= 010


001 011
010 100

Find
(a) the join of A and B.

(b) the meet of A and B.

(c) the Boolean product of A and B.

12. (6 pts)
Show (step by step) how the binary search algorithm searches for 8 in the following list:
4 6 8 15 21 25 37.

3
13. (5 pts) Arrange the following functions in a list so each is big-O of the next one in the list.
No justifications needed.
n3 + log n + 3, log n, 10n, n3 log n, 2n

14. (6 pts)
(a) Give the best-case analysis of a lineary search of a list of size n (counting the number of
comparisons). (3 pts)

(b) Give the worst-case analysis of a lineary search of a list of size n (counting the number of
comparisons). (3 pts)

15. (5 pts) Prove or disprove: For all integers a, b, c, if a|c and a|d, then a2|cd. Show steps.

16. (5 pts) Find the prime factorization of 6,600. Show steps.

17. (6 pts)
(a) Convert (73)10 to base 2.. (3 pts)

(b) Convert (1011111011)2 to base 16. (3 pts)

18. (5 pts) A message has been encrypted using the function f(x) = (x + 7) mod 26.

If the message in coded form is LEHJA, decode the message. Show steps.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy