Question
You are the proud owner of a new social media website! You decide that you want your users to protect their accounts using a PIN.
You are the proud owner of a new social media website! You decide that you want your users to protect their accounts using a PIN. Two different security companies come to you:
Company A tells you that they can set up a 5 digit PIN where the first entry must be a capital letter (A to Z), the middle 3 entries must be integers (0 to 9), and the last entry must be a lowercase letter (a to z).
Company B tells you that they can set up a 4 digit PIN where each digit may be any lowercase letter (a to z) or integer from 0 to 9.
Using R, complete the following tasks:
(1): Use the expand.grid() function to create the sample space of possible PINs using Company A's plan. Call this sample space SA.
(2): Use the nrow() function to figure out how many possible PINs there are in SA
(3): Now look at Company B's plan. Create vector called entries that contains all the lowercase letter (a to z) and integer from 0 to 9. Then, using entries and expand.grid(), create the sample space of possible PINs using Company B's plan. Call this SB.
(4): There are four entries in the PIN this time, so there are 4 "stages." Each stage has the same number of options. The number of options per stage is 26 + 10 = 36, because there are 26 lowercase letters (a to z) and 10 digits (0 to 9).Using the product rule, the total number of possible PINs is 36 36 36 36 = 364 = 1, 679, 616. We will now check if this number is consistent with the size of SB. Use the nrow() function to figure out how many possible PINs there are in SB.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started