how many five digit zip code numbers are possible if the first digit cannot be a four and adjacent digits cannot be the same?
the first digit cant be 4, so there are 9 choices the second choice can be a 4, but cannot be the same choice as the first digit . so there are 9 choices for the second digit. for the third digit there are 8 choice, etc so you get 9X9x8x7
9x9x8x7x6 i mean
Number theory/discrete mathematics? S = Set of all 5 digit numbers. D = Set of digits 0-9. Know that D^x = "D cross D cross D.... x times) \[S = D^5\]\[n(S) = n(D^5) = 100000\] F = Set of all 5 digit numbers with 4 as the first digit. \[n(F) = n(D^4) = 10000\] A = Set of all 5 digit numbers with 2 or more identical adjacent numbers. \[A = n(D^4) = 10000\](Pretend one of the 4 digits is actually two identical digits next to each other) We're looking for: \[n(S) - n(F \cup A)\] \[n(F \cup A) = n(F) + n(A) - n(F intersect A)\] (sorry, there is no upside-down U... wtf) n(F intersect A) = n(D^3) = 1000 \[ n(F \cup A) = 10000 + 10000 - 1000 = 19000 \]\[n(S) - n(F \cup A) = 100000 - 19000 = 81000\] Your answer is 81,000 possibilities.
dave thats wrong
oh crap...
you did the complement
I learned the hard way in my discrete mathematics course that a problem that looks extremely simple can turn out to be the most pain-in-the-retricebullsh..t that you never saw coming, and especially if you have to provide a proof..
yeah i did it too fast , one sec
i guess i answered a different question
how did you get ... F intersect A , and how did you find A , you said two adjacent numbers is like 00 123 , etc, but there could be more
, ok so you grouped it as (00) 1 2 3 , and then you have 10 ^4 possibilities, beause you can have (00) , 10 ways and then times what exactly
The only thing I'm not positive of in my answer is my evaluation of n(A), so feel free to try and criticize/correct that if you find it is wrong. I'm looking at it now.
yes Im not so sure with your reasoning there
i think you overcounted
Try not to spam the answers, use the chat instead...
lets look at the complement, n(A) = 1 - n(A')
woops, im doing probability. n(A) = universe - n(A') , n(A') = 10*9*8*7*6 ,
universe = n(D^5) = 10^5, so n(A) = 10^5 - 10*9*8*7*6
you sound like somebody who is either extremely rusty in the topic, or only knows a little.. I'm guessing rusty? you don't subtract cardinalities from the Universe.. the universe is a set and cardinality is an integer
regardless, i think you may be going in the right direction with factorials
the universe is S . , so n(A) = n(S) - n(A')
there ya go
wow, that was so important
omg, the whole problem hinged on that
but let me give you my reasoning, do you agree with n(A')
the cardinality of having no adjacent numbers. the first choice is 10 digits, then the next can only by 9, then 8 , etc
no because this reasoning doesn't allow a number such as 12121, which does not have any same adjacent numbers
ok
hm okay how about 10*9*9*9*9
for n(A') ?
i think that may be the solution right there.. sooo 65610
yeah, and that would make sense.. now we just have to find the intersection between that and F
which you could do by skipping the whole F deal, and just making it 9^5 i think?
ah no it's wrong
i agree thats 10*9*9*9*9 for n(A')
so n(A) = n(S) - n(A') ,
9^5 = 59, 049
ah maybe it's right.. haha aghhhh
9 choices for first number (can't be 4) 9 choices for second number (can't be first number) 9 choices for third number (can't be second number) 9 choices for fourth number (can't be third number) 9 choices for fifth number (can't be fourth number) I also verified it with a short program.
right, thats logical
^Thank you for doing what I was too lazy to do...
my first answer assumed no repeating for some reason, woops
thats by multiplication principle
dave, you botched this one pretty bad
and then you tried to insult me. haha
im not even sure about n(F intersect A)
you got 10^3 for that , hmmmm
i asked you about your past experience.. not trying to insult you. this isn't a social playground, we're just trying our best to help somebody get the correct answer here
the person is long gone
who asked the question
anyways, how about finding n(A) now ?
n(A) = 34390
directly finding n(A) is difficult,
dmancine, how did you verify it with a short program?
ok to find n(A) directly you split it into cases, find when there are exactly 2 adjacent, then exactly 3 adjacent, ... exactly 5 adjacent. these cases are mutuall exclusive and you can use addition rule
Join our real-time social learning platform and learn together with your friends!