Discrete Mathematics 22. Let r be a relation on the integers such that (a, b) E r if and only if a +b 1. What is the transitive closure of r? 23. Write an algorithm in pseudo code that converts nu...
(17) (20pt) Let F be the set of functions f : R+ → R. Prove that the binary relation "f is 0(g)" on F is: (a) (4pt) Write down the definition for "f is O(g)". (b) (4pt) Prove that the relation is reflexive (c) (6pt) Prove that the relation is not symmetric. (d) (6pt) Prove that the relation is transitive. (17) (20pt) Let F be the set of functions f : R+ → R. Prove that the binary relation "f...
16. (8 points) Let Z be the integers and let A - Zx Z. Define the relation R on A by (a, b) R(c, d) if and only if a c and b 3 d for all (a, b), (c, d)E A. Prove that R is a partial ordering on A that is not a total ordering. 16. (8 points) Let Z be the integers and let A - Zx Z. Define the relation R on A by (a, b)...
discrete mathematics help 1. List the order pairs in the relation R from A ={0, 1, 2, 3, 4} to B = {0, 1, 2, 3}, where (a, b) Î R if and only if a) a = b b) a + b = 4 c) a > b d) a|b //6th edition ((a), (b), (c), and (d) of Exercise 1, Page 527.) 2. a) List all the ordered pairs in the relation R = {(a, b) |a divides b}...
Please do problem 9 and write a detailed proof when doing (a) 9. Letbe the relation on the set of non-zero real numbers defined as follows: for r, y E R [0), x~ylf and only if-EQ (a) Prove thatis an equivalence relation. (b) Determine the equivalence class of π. 9. Letbe the relation on the set of non-zero real numbers defined as follows: for r, y E R [0), x~ylf and only if-EQ (a) Prove thatis an equivalence relation. (b)...
1. (2 marks) Let S 2,3,4,5,6,7,8,9, 10, 11, 12). Let r be the relation on the set S defined as follows: Va,bE S, arb if and only if every prime number that divides a is a factor of b and a S b. The relation T is a partial order relation (you do not need to prove this). Draw the Hasse diagram for T 1. (2 marks) Let S 2,3,4,5,6,7,8,9, 10, 11, 12). Let r be the relation on the...
Please answer all parts. Thank you! 20. Let R be a commutative ring with identity. We define a multiplicative subset of R to be a subset S such that 1 S and ab S if a, b E S. Define a relation ~ on R × S by (a, s) ~ (a, s') if there exists an s"e S such that s* (s,a-sa,) a. 0. Show that ~ is an equivalence relation on b. Let a/s denote the equivalence class...
Write program(Only in C, no C++) as follow. With comment Algorithm 1 MaxSubSeqDivideNConquer(S[..r] Input: A sequence, S of r - 1 integers Output: The sum, start and end of a maximum contiguous subsequence S[start..end 1: if ( r then (S 0) then if 2: return 0, -1, 0 3: else 4: return 5: end if 6: 7: else mid (r/2 (таzSum,mid, start, end) (таzSummid+1,r, start,end,) (marSuffix, left.Index) (maxPrefia, rightIndea) 8: MaxSubSeq DivideNConquer (S[l, mid) MarSubSeq DivideNConquer (S[mid1, r) marSuffix (S[l,...
1. (5 marks) Perform a selection sort on the list 23, 59, 34, 13, 31, 10. Show the list after each exchange that has an effect on the list ordering. 2. (5 marks) Explain why the bubble sort algorithm does Ө(n2) comparisons on an n-element list. The bubble-sort algorithm is shown just after question 10 on p. 141. 3. (5 marks) Write the resulting data list, give the ending value of legit, and find the exact number of copies done by the converging...
pls answer all questions 1) A step-by-step solution to a problem is called a. hardware b. an operating system c. a computer language d. an algorithm 2) separated the programming task from the computer operation tasks. a. Algorithms b. Data processors c. High-level programming languages d. Operating systems 3) is a 16-bit code that can represent symbols in languages other than English. a. ASCII b. Extended ASCII c. EBCDIC d. Unicode 4) When you want to download music to a...
Need this in C Code is given below e Dots l lah dit Problem 1. (30 points) Fre bendord.cto obtain the free in decimal representation For ATY. this problem we complete the code in i tive long inte ens (W written the following positive long term 123, 40, 56, 7, 8, 9, 90, 900 the frequencies of all the digits are: 0:4, 1:1, 2:1, 3:1, 4:1, 5:1, 6:1, 7: 1. 8: 1.9: 3 In this example, the free ency of...