Why the same key can open different padlocks?
11 Why the same key can open different padlocks?
Fathan Akbar and Mikrajuddin Abdullah (a)
Department of Physics, Bandung Institute of Technology Jl. Ganesa 10 Bandung 40132, Indonesia (a)
Email: [email protected]
Abstract
We accidentally observed that one key can open two padlocks from different brands. Based on this observation, here we derived equations to estimate the number of different padlocks that can be produced. We focus on simple padlocks that are usually used in most households. It is made of a rectangular block of metal and crafted at any position. Different keys have different sizes and positions of the crafting (hole) and un-crafting (hill) portions. We limit the study to only padlocks having a maximum of four holes. This is the typical architecture of household padlocks. We observed that the number of different padlocks depends on the minimum size of the holes and hills. We also observe a scaling relationship between the number of different padlocks that can be produced with the size of holes or hills. Keywords: padlocks, keys, scaling relationship.
1. Introduction
Padlocks are widely used worldwide, commonly used for locking fences, warehouses, and similar buildings. Meanwhile for locking houses, key systems that fixed inside the door are commonly opted. The padlock has many advantages, such as it is hardy, less costly compared to other door’s lock system, convenient to use, could be carried and used where necessary, and do not need much space [1]. Çelik has discussed the history development of the lock from the Ancient Egypt, Chinese, Iran, Roman, Turk-Islam [2]. The padlocks have various sizes, ranging from very small that often used for locking bags of luggage up to very large sizes to lock fences or warehouses. Although the smart locking system are being developed [3,4,5,6,7,8,9], the classical padlock systems are still widely applied based on the reasons above. Interestingly, although the padlocks are very classic items–invented around the Roman age [1] –its concept meets considerations in new science to model the processes or mechanisms in biological systems, for example the method of pedlock probes. This method has been applied to detect sets of gene sequences with high specificity and excellent selectivity for sequence variants [10], detection and subtyping of seasonal influenza [11], localized detection of specific nucleic acids [12], understanding the molecular docking [13], molecular recognition [14], reaction between enzymes and substrates [15], differentiating single-nucleotide [16], etc. At present, the need for padlock increases due to massive infrastructure development and it has triggered mass production of padlocks. This implies the structure of keys and locking parts inside the padlocks become simpler. This is why, some people still worry about using the padlock for high security purposes [17].Most of the current padlock architectures are merely rectangular shaped rods which are then grounded in several positions. We call now the grinded parts as holes and the parts between two holes as hills. The number of holes in a key of commercial padlocks is commonly a maximum of four. The number of holes, the size of holes, and the size of hills are specific for a key. Because the number of holes, the size of holes, and the size of the hills are limited, then the possibility of duplicating the same key –if the number of produced padlocks is very large– is possible. We have already experienced that. As shown in
Figure 1 (a), we have two different padlocks from different brands. Surprisingly, the key in
Figure 1 (a) can open both padlocks.
Figure 1 (b) is unlocking the first padlock and
Figure 1 (c) is unlocking the second padlock using the same key.
Figure 1 (d) is a workshoper duplicating a key using a grinding machine. We only need to pay 1 dollar for his service. The interesting question is, how many different numbers of padlocks can be produced? What parameters affect the number of different padlocks that can be produced? This seems to be an interesting topic and can be discussed in undergraduate level. The problem begins with an accidental observation of a phenomenon and then thinking and deriving of the formulation to explain such a phenomenon. The mathematical equations should not be too complicated, but an imagination is required to derive the equations. We have done similar works previously, such as initiated by the observation of firework’s rod bending [18], discharge of water when wringing wet clothes [19] and segregation of rice when winnowing the tray [20]. The purpose of this paper is to derive the equations to predict the number of different padlocks that can be produced using key structures as shown in
Figure 1 (a).We only focus on keys having identical holes and hills. Indeed, there are some keys having holes with different depths, but we ignore this situation. We also only focus on keys having a maximum of four holes. This limitation is very realistic because most padlocks with the above architecture have keys with up to four holes. For example, the key in
Figure 1 (a) is considered to have three holes. Two bottom holes having different depths are treated as one hole, with the width of which is the sum on widths of the original holes. To best our knowledge, the discussion of physical model for describing the padlock differentials has never been reported.
2. Modeling
First, let us consider the case when only one hole was crafted on the key. The hole has a minimum width according to key mechanical structure as well as grinding equipment to craft the hole. Usually, household padlocks are not very precise items. Assume the minimum shift of a grinding cutting wheel to make a hole is a . This value may be less than 1 mm. When the hole is made, the grinding cutting wheel can shift at least as far as a . If the length of the key portion that penetrating into the padlock body is L, the maximum number of shifts of the grinding cutting wheel is N = L / a . Suppose the minimum size of a hole and hill that can be made are h and h , respectively. The number of shifts related to those minimum sizes are ahn / and ahm / , respectively, with n and m are integers. Next, we only discuss the problem in term of these integers, instead of in term of meter or centimeter. It is clear that Nmn , . Take a look at Figure 2 (top). One hole of width n is made at the far left end of the key. The width of the hill on the right side is nN . This is one different key that can be made. Another different key is possible made if the hole is moved to the right side of a , which is identical to a shift of one unit. The number of shifts until the hole reaches the far right position ( Figure 2 (bottom)) is N – n + 1. Next different key is made by crafting hole of one step wider, i.e. n . In this condition, the width of the hill on the right side is nN . Different keys can be generated by shifting the hole one unit to the right. The number of shifts until the hole reaches the far right position is nN . This is the number of different keys that can be produced if the size of the hole is n . The next different keys are made by crafting a wider hole, i.e., of size n . The number of shifts belong to this size is nN . We continue this procedure until the hole has the width of N , which has only one choice (no shift). Therefore, the total number of different keys produced by only making one hole is )1(...21),:1( nNnNW )2)(1(21 nNnN (1) Now we examine the next case where there are two holes and one hill between these holes. The smallest size of a hill that can be made is m . We start by looking at the condition of all of the holes and hills are located at the left end of the key and all of them have the minimum sizes as illustrated in Figure 3 (top). Now look at the hole is positioned on the right side. The size of the hill on the right side of this hole is )(2 nnmNmnN . This is one different key. Other different key is obtained by sifting the right hole to the right for every step. The number of shifts until this hole reaches the far right position (formation like in
Figure 3 (bottom).) is nnmN . Furthermore, different keys can be made by widening the rightmost hole by one unit so it become n .This widening results in the width of hill on the right side becomes nnmN ,so the number of ways of moving the right most hole becomes )( nnmN . We continue this procedure until the rightmost hole occupies all the space on the right side with a width of )( nmN and provides no shifting. As a result, the number of ways to make a key with only changing the position and size of the rightmost hole, and maintaining the position and size of the left hole and the hill in between is nnmNs nmnNnmnN )),(:1( nnmNW (2) The next different key is made by shifting the position of the hill between two holes by one unit to the right. The shift will cause the space for shifting the rightmost hole decreases by one unit. Thus, the number of ways of shifting the position and resizing of the rightmost hole can be obtained from equation (2) by reducing the last term by one unit, i.e. )(...21 nnmNs nmnNnmnN )),1(:1( nnmNW (3) Next different key is made by shifting the hill between the two holes two steps to the right. The number of ways to change the position and size of the rightmost hole changes to )),2(:1( nnmNWs (4) We continue this procedure until the rightmost hole only occupies the far right end with the width of only n and the number of compilation is only 1. The total number of hill shifts is nN . Thus, the number of arrangements by changing the position and width of the rightmost hole and the hill between two holes is j j smn )0,,(
20 000 )),(:1( nNj njmnNW (5) We can easily prove that if nNj then )),2(:1( nnnNNW nnWnnNNW . Next, we begin to move the holes in the left position one step each. If this hole is moved one step to the right, the space to make variations of hole and hill to the right is as if reduced by one compared to the Initial condition. Thus, the number of variation satisfies equation (5) but with replacing N with N -1, resulting )),()1(:1()1,,( mnN j nnjmNWmn (6) If the left hole is moved two sites to the right, the number of ways is )),()2(:1()2,,( mnN j nnjmNWmn (7) And so on so that we get the general equation for the shift as far as k , i.e., )),()(:1(),,( mnN j nnjmkNWkmn (8) The maximum number of shifts is nmN . Thus, the number of ways through shifting only the leftmost hole is
20 0000 ),,(),( nmN k kmnmn (9) Next different key is obtained by changing the width of the left hole. When the width is enlarged to n then the number of shifts becomes nmN and the number of ways the arrangement becomes
120 0000 ),,(),1( nmN k kmnmn (10) When the width of the leftmost hole is changed to n , the number of shifts becomes nmN and the number of arrangements becomes
220 0000 ),,(),2( nmN k kmnmn (11) We continue the process until the maximum width for the leftmost hole is reached. The allowed maximum width of the leftmost hole is nmN . This means the maximum additional width that can be generated is nmN . The number of ways of widening this hole is
00 00)2(2 0 000000 knmNnmN k kmnkmnmnmNn (12) And then we finally obtain that the total number of different keys that can be produced when two holes are made is
20 0000 ),(),,:2( nmN i minmnNW
00 00
20 20 00 ),,( nmN i inmN k kmn
00 00 00
20 20 2 0 000 )),()(:1( nmN i inmN k mnN j nnjmkNW (13) Next we discuss the keys containing three holes. The base position of the holes and hills is shown in
Figure 4 . There are three holes, each having a width of n where two adjacent holes are separated by a hill of width m . Let us first consider the case when the hole and the hill in the far left position do not change in both position and size. Two holes and one hill on the right claim a space )(' mnNN width. The number of variations of two holes and one hill on the right satisfies equation (13) with only replacing N with ' N . Therefore, we have ),),(:2(),,':2( mnnmNWmnNW (14) Next, we move the leftmost hill to the right by one step. Two holes and one hill on the right occupy a space of N width. Thus, the number of variations if the second hill is moved to the right by one step is ),,1)(:2(),,1':2( mnnmNWmnNW (15) If the second hill is moved to the right by two steps, the number of variations is ),,2)(:2(),,2':2( mnnmNWmnNW (16) The number of shifting the left hill to the right is nmNnmnnmN . Thus, the total number of ways if the leftmost hole remains unchanged but with position and size of others are changed becomes
32 0 0000 ),,)(:2( nmN mnnmNW (17) Next, we change the position of the leftmost hole by shifting it step by step to the right. The initial shift is identical to decreasing N by 1 to become N -1 at the upper limit of the summation in equations (17). The rightmost position of the left hole is obtained after the maximum shift is nmN . Thus, the number of shifts to reach this maximum shifting is nmNnnmN . Finally, the total number of ways of producing keys containing three holes is
00 00
32 0 32)( 0 000000 ),,)(:2(),,:3( nmN p nmpN mnnmNWnmNW (18) Finally, we discuss the conditions when the key has four holes as illustrated in Figure 5 . We begin by forming the basic condition where four holes and three hills are at the left end of the key and each has a minimum size.
If the leftmost hole and hill does not change, then the sum of the variations in the three holes and the two hills on the right satisfies equation (18) with simply replacing N with )( mnN . The number of ways is ),),(:3( nmmnNW (19) If the rightmost hill is moved to the right one step then the number of ways is ),,1)(:3( nmmnNW (20) If the rightmost hill is moved to the right two steps, the number of ways is ),,2)(:3( nmmnNW (21) The number of shifts to the rightmost hills is N – 3 m -4 n . Thus, the total number of ways is
43 0 0000 ),,)(:3( nmN q nmqmnNW (22) Finally, the position of the leftmost hole is shifted to the right for every step. Each shift seems to reducing the width by 1. The number of shifts to the right is N – 3 m -4 n . Thus, the total number becomes
00 00
43 0 43)( 0 000000 ),,)(:3(),,:4( nmN r nmrN q nmqmnNWnmNW (23). We then obtain a recursion formula for arbitrary number of holes
00 00 )1(0 )1()( 0 000000 ),,)(:(),,:1( nuumN r nnumrN q nmqmnNuWnmNuW (24) with u is the number of holes, as long as nuumN and u
2. All of the summations above are finite terms so that the final solution can always be obtained. Using a free accessed symbolic mathematics, we obtained [21] )24227()1(241),,:2( SSSSnmNW (25) QQQQnmNW QQQ (26) UUUUUUnmNW UUU (27) with S = N – 2 n – m , (28) Q = N – 3 n – 2 m , (29) and U = N – 4 n – 3 m . (30)
3. Results and Discussion
Now let us do some simulations. The portion of key inserted into the padlock is usually not too long. Generally, the length of this portion is around 1.5 cm to 2.0 cm. If we assume that the length of this portion is 2.0 cm and the smallest portion that can be grinded has a length of 1 mm, the length of the key corresponds to N = 20 sites. The true smallest value depends on the machine used to make the key and the padlock. However, for most of household padlocks, the number does not vary too far from N = 20. Figure 6 is the number of different keys that can be made with a number of holes between 1 and 4 at various hole and hill lengths. In this case, we assume that the hole length and the hill length are identical. The total number of keys is defined as ),,:4(),,:3(),,:2(),:1()( nmNWnmNWnmNWnNWtotW (31) It appears that as the minimum size of hole and hill increases, the number of different keys decreases. This is due to the number of ways of shifting and widening the hole and the hill decrease. For N = 15, 20, and 25, we obtain a scaling relationship )( n etotW (32) with = 6.16, 6.82, and 7.10 for N = 15, 20, and 25, respectively. The scaling factor rises slightly with increasing the key length. We can show that N as shown in inset of Figure 6 . Figure 7 shows the number of different keys as a function of n at different m . We maintain N = 20. The number of different keys decreases as n increases. The scaling relationship according to equation (32) is also observed here, but with a nearly constant scaling factor. If m increases, the number of different keys that can be made decreases. We also estimate the number of different keys – in combination formulation –if the width of hole and hill are the same. If the widths of hole and hill are identical, m = n = 1, the number of different keys for N = 20 is the same as combination of two states, with each has a width of unity, having the values ranging from 0 to 20 with the sum of both number is 20. In general, if the total number of holes and hills is M , the number of holes is n and the number of hills is M - n , then the number of combinations up to a maximum of four holes is )!(! !)( n nMn MtotW (33) It should be noted here that M N but M = N / n = N / m . Figure 8 are the calculation results using equation (33) at different M : M = 15, 20, and 24. Calculations were made for selected n = m that produces M as an integer. For example, at N = 15, the calculation is only performed for n = 1, n = 3, and n = 5. We get the exponential equation (32) with changes slightly with increasing N . Figures 6 and show that the number of different key calculated using equation (31) changes exponentially, resemble those of calculated using Eq. (33).Both are different in scaling parameter because in equation (34) the width of the hole or hill is always a multiple of m or n , whereas in equations (31) m and n are the minimum widths of holes and hills. In Eq. (31), the width of holes does not need to be a multiple of n and the width of hills does not need to be a multiple of m . This is why the results of calculations using equation (31) are larger than those of using equation (33). Reducing n or m has the meaning of making keys with higher accuracy. It can be seen from Figure 6 or that the more accurate the key is, the more variations can be made. We also found that for keys with a length of 2 cm and a minimum size of holes and hills about 3 mm, the number of different keys is only around a half of million. This amount becomes less if the portion of the key that enters the padlock is only about 1.5 cm (the number commonly found for household locks). Let us consider the limiting cases when N >> n , m such that one can approximate S Q U N . Under this condition, we obtain from Eqs. (25)-(27) that W (2: N , m , n ) N , W (3: N , m , n ) N , and W (4: N , m , n ) N . This behavior can be obtained from the recursive Eq. (24) as follow. If N >> n , m one may approximate ),,:(),,)(:( nmNuWnmqmnNuW (34) so that Nr Nq nmNuWnmNuW ),,:(),,:1( ),,:(),,:()1( nmNuWNnmNuWN (35) Since W (2: N , m , n ) N , we then obtain W ( u : N , m , n ) N for u > 1 which is consistent with Eqs. (25)-(27). As final notes we obtained that the number of different keys for the above key architecture is very limited. For example, for N = 15 and n = m = 3, the different keys that can be made (based on Fig. 6) is approximately exp(8) n = m = 2 the different keys that can be made is approximately exp(10)
4. Conclusion
We have derived equations for estimating the number of different keys that can be made based on key architecture as in Fig. 1(a). We obtained a general recursive formula for estimating the number of different keys as a function of the number of holes. For very precise keys, we obtained the number of different keys increase as N with N is the key length and u is the number of holes. We argue the equation might be applied to estimating the number of configurations in the padlock probes method of biological systems. References [1]
Haddad N A 2016
Mediterran. Archaeol. Archaeometry
53 [2]
S. S. Çelik SS 2015
IntJSCS
96 [3]
Adiono T, Fuada S, Anindya S F, Purwanda I G and Fathany M Y 2019
Int. J. Adv. Comp. Sci. Appl .
445 [4]
Kumbhar N N and Deshmukh P V M 2017
Int. J. Res. Appl. Sci. Eng. Technol .
507 [5]
R. Satoskar and Mishra A 2018
Int. J. Comp. Sci. Inf. Technol . [6] Li W, Li H, Gong A, Ou Y and Li M 2018
J. Phys.: Conf. Ser.
Shashank K, Gopalakrishna M T and Hanumantharaju M C
685 [8]
Hadis M S, Palantei E, Ilham A A and Hendra A 2018
International Conference on Information and Communications Technology (ICOIACT), doi:10.1109/ICOIACT.2018.8350767 [9]
Sunehra D 2019
IOSR J. Eng .
29 [10]
Banér J, Nilsson M, Mendel-Hartvig M and Landegren U 1998
Nucleic Acids Res . Neumann F, Hernandez-Neuta I, Grabbe M, Madaboosi N, Albert J and Nilsson M 2018
Clinical Chem . Nilsson M, Malmgren H, Samiotaki M, Kwiatkowski M, Chowdhary B P and Landegren U 1994
Science
Tripathi A and Bankaitis V A 2017
J. Mol. Med. Clin. Appl . , 1 [14] Ben-Naim A 2018 arXiv:1806.03499 [15]
Schneider H –J 2015
Int. J. Mol. Sci . Nilsson M, Krejci K, Koch J, Kwiatkowski M, Gustavsson P and Landegren U 1997
Nature Genetics
252 [17]
Lee F W W and Ibrahim A B 2018
J. Inf. Sys. Technol. Manag .
26 [18]
Abdullah M, Khairunnisa S and Akbar F 2014
Eur. J. Phys . Rahmayanti H D, Utami F D and Abdullah M 2016
Eur. J. Phys . Munir R, Rahmayanti H D, Murniati R, Rahman D Y, Utami F D, Viridi S and Abdullah M 2020
Granular Matter
24. [21]
We used Wolframalpha to do the calculations explicitly (accessed on January 2, 2020) Figure 1 (a) Two padlocks and a key that can open both padlocks. (b) When the key is opening the first padlock. (c) When the same key is opening the second padlock. (a) A worker is duplicating a key using a grinding machine. (a) (b)(c)(d) Figure 2
A key contains only one hole. We can change the position and the width of the hole to produce different keys. n n N - n N Figure 3
A key contains two holes. We can change the position and width of holes and hills to produce different keys. n n N- ( m + n ) - n N n m N- ( m + n ) n Figure 4
A key contains three holes. We can change the position and width of holes and hills to produce different keys. n n N- (2 m +2 n ) - n N n m N’= N- ( m + n ) n n m m n Number of ways = ( N ’, n , m )= ( N -( m + n ), n , m ) Figure 5
A key contains four holes. We can change the position and width of holes and hills to produce different keys. n N- (3 m +3 n ) - n N n m N’= N- ( m + n ) n m Number of ways = (3: N ’, n , m )= (3: N -( m + n ), n , m ) n m Figure 6
Number of total different keys that can be produced by making up to four holes as a function of the width of the hole and hill. The width of the hole and the width is assumed to be identical. Calculations were performed for three different lengths of the keys: (a) N = 25 steps, (b) 20 steps, and (c) 15 steps. Inset is the curve of scaling factor as a function of 1/3 power of key length.
20 0 0.5 1 1.5 2 n = m (ln scale) W ( t o t ) ( l n s ca l e )
24 (b) N = 20, slope -6.82 (a) N = 25, slope -7.10 (c) N = 15, slope -6.16 (a) (b) (c) R ² = 0.9308 N Figure 7
Number of total different keys that can be produced by making up to four holes as a function of the width of the hole at different width of the hole. We calculated for different values of the hill: (a) m = 2, (b) m = 3, (c) m = 4, and (d) m = 5 and the total length of the keys was kept as N = 20 steps.
0 0.5 1 1.5 2 (a) (b) (c) (d) (a) m = 2, slope -5.14 (b) m = 3, slope -4.05 (c) m = 4, slope -3.48 (d) m = 5, slope -3.28 ln n l n W ( t o t ) Figure 8
Number of total different keys that can be produced by making up to four holes as a function of the width of the hole and hill calculated using Eq. (33). The width of the hole and the width is assumed to be identical. Calculations were performed for three different lengths of the keys: (a) N = 24 steps, (b) 20 steps, and (c) 15 steps. - 0 4 8 12 0 0.5 1 1.5 2 (a) N = 24, slope -3.93 (b) N = 20, slope -3.72 (c) N = 15, slope -3.56 (a) (b) (c) n = m (ln scale) W ( t o t ) ( l n s ca l e ))