Question

In: Advanced Math

For this question, a block is a sequence of 20 characters, where each character is one...

For this question, a block is a sequence of 20 characters, where each character is one of the 26 lowercase letters a-z. For example, these are blocks:

iwpiybhunrplsovrowyt
rpulxfsqrixjhrtjmcrr
fxfpwdhwgxtdaqtmxmlf
  1. How many different blocks are there?
  2. A block is squarefree if no character appears two times consecutively. The first and third example above are squarefree, but the second example is not because of the two consecutive occurrences of r. How many squarefree blocks are there?
  3. A block is non-local if the number of characters between any two occurrences of the same character is at least 2. The first example above is non-local. The second example is not, because there are two occurrences of r with no characters between them. The third example is not because there are two occurrences of m with only one character between them. How many non-local blocks are there?
  4. A block is k-non-local if the number of characters between any two occurrences of the same character is at least k. Write a formula for the number of k-non-local blocks that is valid for any k∈{0,…,20}.

Sanity check: The formula you get for 2.4 gives the answer to 2.2 when k=1 and gives the answer to 2.3 when k=2.

Solutions

Expert Solution

Question is based on combinations......above images contains solution of that....


Related Solutions

2. Non-Local Strings For this question, a block is a sequence of 20 characters, where each...
2. Non-Local Strings For this question, a block is a sequence of 20 characters, where each character is one of the 26 lowercase letters a-z. For example, these are blocks: iwpiybhunrplsovrowyt rpulxfsqrixjhrtjmcrr fxfpwdhwgxtdaqtmxmlf How many different blocks are there? A block is squarefree if no character appears two times consecutively. The first and third example above are squarefree, but the second example is not because of the two consecutive occurrences of r. How many squarefree blocks are there? A block...
A password is a sequence of five characters. Each character is one of twenty-six uppercase letters...
A password is a sequence of five characters. Each character is one of twenty-six uppercase letters (“A” through “Z”), one of ten digits (“0” through “9”), or one of five symbols (“+”, “-”, “!”, “<”, “>”). Count the number of possible passwords that can be created in each of the following scenarios. Consider each part of this questions separately. (a) There are no restrictions on how the characters are chosen. (b) A password must begin with a letter and end...
A password is a string of ten characters, where each character is a lowercase letter, a...
A password is a string of ten characters, where each character is a lowercase letter, a digit, or one of the eight special characters !, @, #, $, %, &, (, and ). A password is called awesome, if it contains at least one digit or at least one special character. Determine the number of awesome passwords.
Simon Says' is a memory game where 'Simon' outputs a sequence of 10 characters
Simon Says' is a memory game where 'Simon' outputs a sequence of 10 characters (R, G, B, Y) and the user must repeat the sequence. Create a for loop that compares the two strings starting from index 0. For each match, add one point to userScore. Upon a mismatch, exit the loop using a break statement. Ex: The following patterns yield a userScore of 4:simonPattern: R, R, G, B, R, Y, Y, B, G, YuserPattern:  R, R, G, B, B,...
Nathan the Wise Discuss the assumptions of the characters of Nathan the Wise. Choose one character...
Nathan the Wise Discuss the assumptions of the characters of Nathan the Wise. Choose one character from each group to discuss. Group A: Discuss the superstition that the character has and how the character learns the superstition is groundless. Group A: Daja, Recha, Curd. Group B: Discuss the gossip, rumors and lies that the character uses, how the character uses the information, and how it affects other characters. Group B: Al-Hafi, the friar, and the patriarch. Group C: Discuss the...
A database uses 20-character strings as record identifiers. The valid characters in these strings are upper-case...
A database uses 20-character strings as record identifiers. The valid characters in these strings are upper-case letters in the English alphabet and decimal digits. (Recall there are 26 letters in the English alphabet and 10 decimal digits.) How many valid record identifiers are possible if a valid record identifier must meet all of the following criteria: Letter(s) from the set {A,E,I,O,U} occur in exactly three positions of the string. The last three characters in the string are distinct decimal digits...
A computer system uses passwords that contain exactly 5 characters, and each character is 1 of...
A computer system uses passwords that contain exactly 5 characters, and each character is 1 of the 3 lowercase letters (a, b, c) or 3 upper case letters (A, B, C) or the 5 odd digits (1, 3, 5, 7, 9). Let Ω denote the set of all possible passwords, and let A and B denote the events that consist of passwords with only letters or only integers, respectively. Determine the probability that a password contains at least 1 uppercase...
A computer system uses passwords that contain exactly six characters, and each character is 1 of...
A computer system uses passwords that contain exactly six characters, and each character is 1 of the 26 lowercase letters (a–z) or 26 uppercase letters (A–Z) or 10 integers (0–9). Let Ω denote the set of all possible passwords, and let A and B denote the events that consist of passwords with only letters or only integers, respectively. Determine the number of passwords in each of the following events. (a) Password contains all lowercase letters given that it contains only...
Using c++, write a program that reads a sequence of characters from the keyboard (one at...
Using c++, write a program that reads a sequence of characters from the keyboard (one at a time) and creates a string including the distinct characters entered and displays the string on the screen. The input terminates once the user enters a white-space character or the user has entered 50 distinct characters. Do not use C-Strings. 2. Use the following function to append character “ch” to the string “s”: s.push_back(ch); 3. Read the input characters one by one, i.e. do...
"Simon Says" is a memory game where "Simon" outputs a sequence of 10 characters (R, G,...
"Simon Says" is a memory game where "Simon" outputs a sequence of 10 characters (R, G, B, Y) and the user must repeat the sequence. Create a for loop that compares the two strings starting from index 0. For each match, add one point to userScore. Upon a mismatch, exit the loop using a break statement. Assume simonPattern and userPattern are always the same length. Ex: The following patterns yield a userScore of 4: simonPattern: RRGBRYYBGY userPattern: RRGBBRYBGY #include <stdio.h>...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT