4. (10pts) Let S be the subset of the set of binary strings defined recursively by...
discrete math. Structural Induction: Please write and explain clearly. Thank you. Let S be the set of binary strings defined recursively as follows: Basis step: 0ES Recursive step: If r ES then 1rl E S and 0x0ES (I#x and y are binary strings then ry is the concatenation of and y. For instance, if 011 and y 101, then ry 011101.) (a) List the elements of S produced by te first 2 applications of the recursive definition. Find So, Si...
Suppose that the following subset T of binary strings is defined recursively: • Basis: 1 is in T • Recursively, if the binary string s is in T, then so are the strings Os, so, 181, 11s and s11 1. Carefully show why the string 011001 must be in the set T. 2. Provide an argument that shows that if s is a string in T of length n and s has an odd number of 1s, then all strings...
5. (6 marks) Let S be the set of all binary strings of length 6. Consider the relation ρ on the set S in which for all a,b ∈ S, (a,b) ∈ ρ if and only if the length of a longest substring of consecutive ones in a is the same as the length of a longest substring of consecutive ones in b. (a) Is 011010 related to 000011? Explain why or why not. (b) Prove that ρ is an...
QUESTION 10 The equality relationon any set S is: A total ordering and a function with an inverse. An equivalence relation and also function with an inverse. A function with an inverse, and an equivalence relation with as single equivalence class equal to S An equivalence relation and also a total ordering QUESTION 11 A binary operation on a set S, takes any two elements a,b E S and produces another element c e S. Examples of binary operations include...
Let Σ = {0, 1). (a) Give a recursive definition of Σ., the set of strings from the alphabet Σ. (b) Prove that for every n E N there are 2" strings of length n in '. (c) Give a recursive definition of I(s), the length of a string s E Σ For a bitstring s, let O(s) and I(s) be number of zeroes and ones, respectively, that occur in s. So for example if s = 01001, then 0(s)...
PROJECT 2-COUNTING SUBSETS (BINARY STRINGS Choose 6 letters of the English alphabet including all the different characters in your family name (If you have more than & diffecent characters, choose the first 61. Let X be the set di all lower case vensions of the letters you have chosen. Let S be the set of all binary strings of length 6 (0 Using cofrect set notation, list the elements in set X. (u) ust all the subsets of X with...
Let A be the set of all bit strings of length 10. 1. How many bit strings of length 10 are there? How many bit strings of length 10 begin with 1101? How many bit strings of length 10 have exactly six 0's? How many bit strings of length 10 have equal numbers of O's and 1's? How many bit strings of length 10 have more O's than 1's? a. b. c. d. e.
2. A binary string s a finite sequence u = ala2 . . . an, where each ai įs either 0 or 1. In this case n is the length of the string v. The strings ai,aia2,...,ai...an-1,aan are all prefixes of v. On the set X of all binary strings consider the relations Ri and R2 defined as follows R, = {(u, u) | w and u have the same length } {(w, u) | w is a prefix of...
Let S be the set of outcomes when two distinguishable dice are rolled, let E be the subset of outcomes in which at least one die shows an even number, and let F be the subset of outcomes in which at least one die shows an odd number. List the elements in the given subset. E' (2, 2), (2, 4), (2, 6), (4, 2), (4, 4), (4, 6), (6, 2), (6, 4), (6, 6) (1, 1), (1, 3), (1, 5),...
I. Let each of R, S, and T be binary relations on N2 as defined here: R-[<m, n EN nis the smallest prime number greater than or equal to m] S -[< m, n> EN* nis the greatest prime number less than or equal to m] (a) Which (if any) of these binary relations is a (unary) function? (b) Which (if any) of these binary relations is an injection? (c) Which (if any) of these binary relations is a surjection?...