Reply To: Programming
A Tale of 2 Secrets › Forums › T.E.M.P.E.S.T. › Programming › Reply To: Programming
17th Century solution for @ByteInBits question #107489.
>A number is chosen at random from the first 100 positive integers.
>What is the percentage probability that the chosen number is not divisible by 3, 4, or 7?
We’ve modified one of Joseph Marie Jacquard’s loom head contraptions to perform this calculation. We take a card with 100 positions marked and devised a mechanism to punch holes in rows, marked ‘X’, every third, fourth and seventh mark along the card. The areas marked ‘-‘ are left unpunched.
–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X-
—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X
——X——X——X——X——X——X——X——X——X——X——X——X——X——X–
We then feed this card back into the Jacquard head where we have devised an additional mechanism to punch a hole, along a new line, if none of the holes in the three original rows are punched.
–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X–X-
—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X—X
——X——X——X——X——X——X——X——X——X——X——X——X——X——X–
XX–X—-XX-X—X-X–XX-XX–X-X–X–XX–X-X–XX–X–X-X–XX-XX–X-X—X-XX—-X–XX-XX–X—-XX-X—
We thereby arrive at the answer, by counting the number of punched holes. This indicates that the numbers, from the first 100 positive integers, not divisible by 3, 4, nor 7 is 42 out of 100 (42 %). Once set up, we can perform the ‘calculation’ in under two minutes.