Discrete Mathematics 7. (15 points) Let an be the number of length n ({ne Zin 20})...
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...
) Find a recurrence relation for the number of ternary strings of length n≥1 that do not contain two or more consecutive 2s. (Hint: A ternary string consists of 0s, 1s, and 2s.)
explain why the recurrence relation for number of ternary strings of length n contains "01" 7. (10 points) Extra credit: Explain why the recurrence relation for number of ternary strings of length n that contain "01" is bn = 3n-1-bn-2 +31-2?
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...
Q18 12 Points For any positive integer n, let bn denote the number of n-digit positive integers whose digits are all 1 or 2, and have no two consecutive digits of 1. For example, for n - 3, 121 is one such integer, but 211 is not, since it has two consecutive 1 's at the end. Find a recursive formula for the sequence {bn}. You have to fully prove your answer.
A CERTAIN program to user's password containing rules such as least n length, one uppercase, lowercase, one digit and white space is given as the code down below. So, simiiar to those rules, I need the code for the following questions post in pictures such as no more three consecutive letters of English alphabets, password should not contain User name and so on. //GOAL: To learn how to create that make strong passwords //Purpose: 1)To learn some rules that makes...
specifically on finite i pmu r the number of objøcts or ways. Leave your answers in fornsiala form, such as C(3, 2) nporkan?(2) Are repeats poasib Two points each imal digits will have at least one xpeated digin? I. This is the oounting problem Al ancmher so ask yourelr (1) ls onder ipo n How many strings of four bexadeci ) A Compuir Science indtructor has a stack of blue can this i For parts c, d. and e, suppose...
PYTHON 3 node Node ADT Question. Question 3 (18 points): Purpose: To practice working with node chains created using the Node ADT to implement slightly harder functionality Degree of Difficulty: Moderate to Tricky In this question you'll implement merge sort for node chains! Recall, merge sort is a divide-and-conquer technique that uses recursion to sort a given sequence (in this case a node chain). A overview of the algorithm is given below. Algorithm mergeSort (NC) Borts node chain NC using...