Problem #4 : Suppose that a code (similar to a postal code) is of the form...
Problem 1. Assume a password in a computer system contains eight character, each can be a digit (0 to 9), an uppercase English alphabet, or a lowercase English alphabet. How many password are there (a) if letters can be repeated? (b) if no letter can be repeated? (c) starts with X and letters can be repeated? (d) either starts with X or ends with 10 (letters can be repeated)? (e) neither starts with X nor ends with 10 (letters can...
Problem 1 (12 points): In this problem you will count the number of passwords with certain characteristics. The characters in the passwords are all either letters or digits. You can assume all letters are lower case, so there are only 26 letters. State how many passwords there are with the given restrictions: 1. Length is 6 or 7 2. Length is 6 and it must contain at least one digit. 3. Length is 6 and it must have at least...
A 4 digit code number is generated by randomly selecting digits, with replacement, from the set {1,2,3,...,9}. Find the probability that the number consists of two 9's and two 6's.Give an exact answer as a fraction of the form a/b (explained).
A 3 digit code number is generated by randomly selecting digits, with replacement, from the set {1,2,3,...,9}. Find the probability that the number does NOT include a 2. Note: 4 decimal place accuracy please (explained)
2) (5pts) A 3-digit number will be formed using the digits 1, 2, 3, 4, 5; using each digit only once. a) How many possible 3-digit numbers are possible? TOTAL: b) Assume three of the digits are randomly chosen and randomly permuted in order to form the 3-digit number. Then each of the possible 3-digit numbers in part a) are equally likely. Find the probability that the 3-digit number ends up being an even number greater than or equal to...
6. The digits 1,2,3,4 and 5 are randomly arranged to form a three-digit number. If digits are not repeated, find the probability that the number is even and greater than 500? 7. A coin is tossed 10 times. Find the probability that at least one toss results in a tail. 8. A game is played using one die. If the die is rolled and shows 1,2 or 3, the player wins nothing. If the die shows 4 or 5, the...
Given java code is below, please use it!
import java.util.Scanner;
public class LA2a {
/**
* Number of digits in a valid value sequence
*/
public static final int SEQ_DIGITS = 10;
/**
* Error for an invalid sequence
* (not correct number of characters
* or not made only of digits)
*/
public static final String ERR_SEQ = "Invalid
sequence";
/**
* Error for...
PLEASE CODE IN PYTHON Run-length encoding is a simple compression scheme best used when a data-set consists primarily of numerous, long runs of repeated characters. For example, AAAAAAAAAA is a run of 10 A’s. We could encode this run using a notation like *A10, where the * is a special flag character that indicates a run, A is the symbol in the run, and 10 is the length of the run. As another example, the string KKKKKKKKKKKKKBCCDDDDDDDDDDDDDDDKKKKKMNUUUGGGGG would be encoded...
**DO IT AS PYTHON PLEASE**
The Trifid Cipher General Problem Description The Trifid cipher (not to be confused with the creatures from the classic science-fiction film "The Day of the Triffids") is an algorithm that enciphers a plaintext message by encoding each letter as a three-digit number and then breaking up and rearranging the digits from each letter's encoded form. For this assignment, you will create a set of Python functions that can encode messages using this cipher (these functions...
Question 5# (Combinations, including stars and bars') Problem: How many PINs have digit suam 20? (A PIN is string abcd of 4 decimal digits eg 6806) As a first attempt at answering this: (a) How many different solutions in non-negative integers has the equation a+b+c+d-20? Hint: 20 stars and 3 bars. The count in (a) is much too big for our problem because it includes many solutions that contain non-decimal digits; ie. values of a, b, c or d that...