[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
▼ Settings Mobile Home
/sci/ - Science & Math

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • Additional supported file types are: PDF
  • Use with [math] tags for inline and [eqn] tags for block equations.
  • Right-click equations to view the source.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


One-time passcodes got me thinking about a combinatorics question.

In a random 6-digit code, what is the probability that no two digits that are either adjacent or two places apart are equal.

So for example:
105093 does not satisfy this condition, because there are two 0s two places apart

068467 satisfies the condition, because although there are two sixes, they are more than two places apart.

I feel like this shouldn't be hard to work out but I am out of practice these days :-(
>>
10 choices for the first digit, 9 for the second, 8 for the third...
>>
>>17090059
It's just the size of the set of all sequences where s_n is not the same as s_(n-1) or s_(n+1) or s_(n-2) or s_(n+1) over the space of all 6 digit sequences.
>>
>>17090121
>>17090131
Ah yeah, so it's 10*9*8*8*8*8 combinations out of 1000000?

= about 0.37
>>
>>17090133
Stuff like this is usually pretty easy to figure out if you just work number by number sometimes backwards.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.