IF YOU HAVE ANY DOUBTS COMMENT BELOW I WILL BE TTHERE TO HELP YOU..ALL THE BEST..
I HOPE YOU UNDERSTAND..
PLS RATE THUMBS UP..ITS HELPS ME ALOT..
THANK YOU...!!
Consider binary strings with n digits (for example, if n = 4 some of the possible...
Discrete mathematics 2) Let be eumber of ternary strings (of 0s, 1s and 2s) of length n that have no adjacent even digits. For example, so (the empty string), s3 (the strings 0, 1 and 2), while s2 5: 01, 0, 12, 2 because the strings 00,02, 20, 22 are not allowed, as they have adjacent even digits. As another example, the string 10112 is allowed, while the strings 10012 and 120121 are not allowed (a) Find #3; (b) find...
(a) Generate all sequences of n digits 0, 1 and 2 that do not contain a substring of type XX. (E.g., the sequence 210102 is prohibited because it contains 1010.) (b) Repeat the previous problem for binary strings of length n that do not contain a substring of type XXX.
Discrete math 4. Popeye and Olive Oyl frequently send each other text messages that are just contiguous strings of the three emojis , , and . For instance, one particular length-5 emoji string might be e (a) Find a recurrence relation for the number of possible length-n emoji strings that do not contain two consecutive winkey emojis, (b) What are the initial conditions for the recurrence relation? (c) Find a closed-form solution to the recurrence relation you found in part...
For a string s ∈ {0, 1} let denote the number represented by in the binary * s2 s numeral system. For example 1110 in binary has a value of 14 . Consider the language: L = {u#w | u,w ∈ {0, 1} , u } , * 2 + 1 = w2 meaning it contains all strings u#w such that u + 1 = w holds true in the binary system. For example, 1010#1011 ∈ L and 0011#100 ∈...
Give a recursive formula for the function g(n) that counts the number of ternary strings of length n that do not contain 2002 as a substring. You do not need to find a closed form solution for g(n).
Imprecise Counting - Long Runs in Binary Strings Let n=2^k for some positive integer k and consider the set Sn of all n-bit binary strings. Let c be an integer in {0,…,n−k}. Consider any j∈{1,…,n−k−c+1}. How many strings b1,…,bn∈Sn have bj,bj+1,…,bj+k+c−1=00…0? In other words, how many strings in Sn have k+c consecutive zeros beginning at position j? For each j∈{1,…,n−k+c+1}, let Xj be the subset of Sn consisting only of the strings counted in the previous question. Show that (n−k−c+1)∑(j=1)...
Discrete Mathematics 7. (15 points) Let an be the number of length n ({ne Zin 20}) ternary strings (strings made up of {0, 1, 2), ex. 01211120002) that contain two consecutive digits that are the same. For example, a = 3 since the only ternary strings of length 2 with matching consecutive digits are 00, 11, and 22. Also, a, = 0, since in order to have consecutive matching digits, a string must be of length at least two. a....
3. (10 points) Let T = {A, B,C), and let tn be the number of T-strings of length n which do not contain AA or BA as substrings. Find a recurrence for tn, and then use that to find a closed-form (i.e. non-recursive) formula for tn.
Let an be the number of strings of length n in 0, 1,2,3 which do not have a 000 substring. Find a recursion satisfied by the an. 7.
Need help with this question. Thank you :) (6) (a) Consider the following graph P R U T (i) What are the degrees of the vertices in the graph? (ii) Does the graph have a closed Euler trail? If so, give an example of a closed Euler trail in the graph. If not, explain why no closed Euler trail exists. (iii Give an example of a spanning tree in the graph (iv) Two identical looking bags are on a table....