Serial number: Difference between revisions

Content deleted Content added
DV8 2XL (talk | contribs)
moved 'Estimating pop....' to under 'Operations...'
Undid revision 1140114409 : "scheme" makes more sense to me in this context.
 
(463 intermediate revisions by more than 100 users not shown)
Line 1:
{{short description|Unique code assigned for identification of a single unit}}
A Serial Number is unique [[number]] that that is one of a [[series]] assigned for [[identification]] which varies from it's [[successo]]r or [[predecessor]] by a fixed discreet [[integer]] value. Common usage has expanded the term to refer to any unique [[alphanumeric]] identifier for one of a large [[set]] of objects, however in [[data processing]] and allied fields in [[computer science]], the distinction between serial and [[nominal number]]s is an important one.
{{Use dmy dates|date=February 2025}}
{{More citations needed|date=February 2025}}
When considered as serial numbers no value has any particular
[[File:Seriennummer.JPG|thumb|alt=The serial number Y0139836 printed on an identity document|Serial number from an identity document]]
significance, there is no minimum or maximum serial number, every
[[File:Travelers Cheques of 50 USD each issued by American Express, bought ca. 2012, showing incremental serial numbering.jpg|thumb|[[Traveller's cheque]]s, a kind of insured cash money in form of a paper cheque, are sold to customers in sets having ''consecutive'' numbers - one of the very few type of items where consumers have access to "serialized" similar things.]]
value has a successor and predecessor. Serial numbers are formed from non-negative integers from a finite subset of the range of all integer values. The lowest integer in every subset used for this purpose is zero
 
A '''serial number''' ('''SN''') is a [[unique identifier]] used to ''uniquely'' identify an item, and is usually assigned incrementally or sequentially.
In computer science applications, the maximum is always one less than a power of two.
To define a serial number to be used in this way, the size of the
serial number space must be given. This value, called "SERIAL_BITS",
gives the power of two which results in one larger than the largest
integer corresponding to a serial number value. This also specifies
the number of bits required to hold every possible value of a serial
number of the defined type. The operations permitted upon serial
numbers are defined in the following section.
 
Despite being called serial "numbers", they do not need to be strictly numerical and may contain letters and other [[typographical symbol]]s, or may consist entirely of a [[character (computing)|character]] [[string (computer science)|string]].
== Operations on serial numbers (sequence space arithmetic)==
==Applications of serial numbering==
Only two operations are defined upon serial numbers, [[addition]] of a
[[File:NumeroPistola.JPG|thumb|Serial number on a [[Ballester–Molina]] [[semi-automatic pistol]]]]
positive integer of limited range, and [[comparison]] with another serial
{{details|Numbering scheme}}
number.
Serial numbers identify otherwise identical individual units, thereby serving various practical uses. Serial numbers are a deterrent against theft and [[counterfeit]] products, as they can be recorded, and stolen or otherwise irregular goods can be identified. [[Banknote]]s and other transferable documents of value bear serial numbers to assist in preventing counterfeiting and tracing stolen ones.
'''Addition'''
Serial numbers may be incremented by the addition of a positive
integer n, where n is taken from the range of integers
[0 .. (2^(SERIAL_BITS - 1) - 1)]. For a sequence number s, the
result of such an addition, s', is defined as
s' = (s + n) modulo (2 ^ SERIAL_BITS)
where the addition and modulus operations here act upon values that
are non-negative values of unbounded size in the usual ways of
integer arithmetic.
Addition of a value outside the range
[0 .. (2^(SERIAL_BITS - 1) - 1)] is undefined.
 
They are valuable in [[quality control]], as once a defect is found in the production of a particular batch of product, the serial number will identify which units are affected. Some items with serial numbers are [[Vehicle identification number|automobiles]], [[Gun serial number|firearms]], electronics, and appliances.
'''Comparison'''
Any two serial numbers, s1 and s2, may be compared. The definition
of the result of this comparison is as follows.
For the purposes of this definition, consider two integers, i1 and
i2, from the unbounded set of non-negative integers, such that i1 and
s1 have the same numeric value, as do i2 and s2. Arithmetic and
comparisons applied to i1 and i2 use ordinary unbounded integer
arithmetic.
Then, s1 is said to be equal to s2 if and only if i1 is equal to i2,
in all other cases, s1 is not equal to s2.
s1 is said to be less than s2 if, and only if, s1 is not equal to s2,
and
(i1 < i2 and i2 - i1 < 2^(SERIAL_BITS - 1)) or
(i1 > i2 and i1 - i2 > 2^(SERIAL_BITS - 1))
s1 is said to be greater than s2 if, and only if, s1 is not equal to
s2, and
(i1 < i2 and i2 - i1 > 2^(SERIAL_BITS - 1)) or
(i1 > i2 and i1 - i2 < 2^(SERIAL_BITS - 1))
Note that there are some pairs of values s1 and s2 for which s1 is
not equal to s2, but for which s1 is neither greater than, nor less
than, s2. An attempt to use these ordering operators on such pairs
of values produces an undefined result.
The reason for this is that those pairs of values are such that any
simple definition that were to define s1 to be less than s2 where
(s1, s2) is such a pair, would also usually cause s2 to be less than
s1, when the pair is (s2, s1). This would mean that the particular
order selected for a test could cause the result to differ, leading
to unpredictable implementations.
 
==Smartphones and other smart devices==
While it would be possible to define the test in such a way that the
[[File:TMP246M-M-352F serial number 20170608.jpg|thumb|Serial number of a [[laptop]] computer]] In [[smartphone]]s, serial numbers are extended to the integrated [[Electronic component|components]] in addition to the electronic device as a whole, also known as serialization. This gives unique individual parts such as the screen, battery, [[Integrated chip|chip]] and camera a separate serial number. This is queried by the software for proper release for use.{{clarify|date=September 2023}} This practice by manufacturers limits the ''serial '''number''''' electronic devices.
inequality would not have this surprising property, while being
defined for all pairs of values, such a definition would be
unnecessarily burdensome to implement, and difficult to understand,
and would still allow cases where
s1 < s2 and (s1 + 1) > (s2 + 1)
which is just as non-intuitive.
Thus the problem case is left undefined, implementations are free to
return either result, or to flag an error, and users must take care
not to depend on any particular outcome. Usually this will mean
avoiding allowing those particular pairs of numbers to co-exist.
The relationships greater than or equal to, and less than or equal
to, follow in the natural way from the above definitions.
 
===Serial numbers for intangible goods===
These definitions give rise to some results of note.
Serial numbers may be used to identify individual physical or intangible objects; for example, [[computer software]] or the right to play an online multiplayer game. The purpose and application is different. A software serial number, otherwise called a [[product key]], is usually not embedded in the software but is assigned to a specific user with a [[software license | right to use]] the software. The software will function only if a potential user enters a valid product code. The vast majority of possible codes are rejected by the software. If an unauthorized user is found to be using the software, the legitimate user can be identified from the code. It is usually not impossible, however, for an unauthorized user to create a valid but unallocated code either by trying many possible codes, or [[reverse engineering]] the software; use of unallocated codes can be monitored if the software makes an [[Internet]] connection.
'''Corollary 1'''
For any sequence number s and any integer n such that addition of n
to s is well defined, (s + n) >= s. Further (s + n) = s only when
n = 0, in all other defined cases, (s + n) > s.
'''Corollary 2'''
If s' is the result of adding the non-zero integer n to the sequence
number s, and m is another integer from the range defined as able to
be added to a sequence number, and s" is the result of adding m to
s', then it is undefined whether s" is greater than, or less than s,
though it is known that s" is not equal to s.
'''Corollary 3'''
If s" from the previous corollary is further incremented, then there
is no longer any known relationship between the result and s.
'''Corollary 4'''
If in corollary 2 the value (n + m) is such that addition of the sum
to sequence number s would produce a defined result, then corollary 1
applies, and s" is known to be greater than s.
 
==Other uses of the term==
'''A trivial example'''
The term ''serial number'' is sometimes used for codes which do not identify a single instance of something. For example, the [[International Standard Serial Number]] or ISSN used on magazines, journals and other [[Periodical literature|periodicals]], an equivalent to the [[International Standard Book Number]] (ISBN) applied to books, is assigned to each ''periodical''. It takes its name from the [[library science]] use of the word ''serial'' to mean a periodical.
The simplest meaningful serial number space has SERIAL_BITS = 2. In
this space, the integers that make up the serial number space are 0,
1, 2, and 3. That is, 3 = 2^SERIAL_BITS - 1.
In this space, the largest integer that it is meaningful to add to a
sequence number is 2^(SERIAL_BITS - 1) - 1, or 1.
Then, as defined 0+1 = 1, 1+1 = 2, 2+1 = 3, and 3+1 = 0.
Further, 1 > 0, 2 > 1, 3 > 2, and 0 > 3. It is undefined whether
2 > 0 or 0 > 2, and whether 1 > 3 or 3 > 1.
'''A slightly larger example'''
Consider the case where SERIAL_BITS = 8. In this space the integers
that make up the serial number space are 0, 1, 2, ... 254, 255.
255 = 2^SERIAL_BITS - 1.
In this space, the largest integer that it is meaningful to add to a
sequence number is 2^(SERIAL_BITS - 1) - 1, or 127.
Addition is as expected in this space, for example: 255+1 = 0,
100+100 == 200, and 200+100 = 44.
Comparison is more interesting, 1 > 0, 44 > 0, 100 > 0, 100 > 44,
200 > 100, 255 > 200, 0 > 255, 100 > 255, 0 > 200, and 44 > 200.
Note that 100+100 > 100, but that (100+100)+100 < 100. Incrementing
a serial number can cause it to become "smaller". Of course,
incrementing by a smaller number will allow many more increments to
be made before this occurs. However this is always something to be
aware of, it can cause surprising errors, or be useful as it is the
only defined way to actually cause a serial number to decrease.
The pairs of values 0 and 128, 1 and 129, 2 and 130, etc, to 127 and
255 are not equal, but in each pair, neither number is defined as
being greater than, or less than, the other.
It could be defined (arbitrarily) that 128 > 0, 129 > 1,
130 > 2, ..., 255 > 127, by changing the comparison operator
definitions, as mentioned above. However note that that would cause
255 > 127, while (255 + 1) < (127 + 1), as 0 < 128. Such a
definition, apart from being arbitrary, would also be more costly to
implement.
 
Certificates and [[certificate authority|certificate authorities]] (CA) are necessary for widespread use of [[cryptography]]. These depend on applying mathematically rigorous serial numbers and serial number arithmetic, again not identifying a single instance of the content being protected.
Ref: Serial Number Arithmetic from RFC1982.
 
[[File:Short_SC.1.jpg|thumb|The [[Royal Air Force|RAF]] serial (''XG900'') on the [[Short SC.1]]]]
== Estimating the population size using serial numbers ==
If there are items whose serial numbers is part of a sequence of consecutive numbers and you take n number of random samples of the items. You can determine the population of items "in the wild".
 
===Military and government use===
To do so, calculate the difference between the largest serial number and the smallest serial number in your sample. The expected population size of the item is that difference divided by the expected proportion.
The term ''serial number'' is also used in military formations as an alternative to the expression ''[[service number]]''.{{Citation needed|reason=The linked article suggests that service numbers apply to people|date=January 2009}} In [[air force]]s, the serial number is used to uniquely identify individual aircraft and is usually painted on both sides of the aircraft fuselage, most often in the tail area, although in some cases the serial is painted on the side of the aircraft's fin/rudder(s). Because of this, the serial number is sometimes called a ''tail number''.
 
{{Main|United Kingdom military aircraft registration number}}
For example:
In the UK [[Royal Air Force]] (RAF) the individual serial takes the form of two letters followed by three digits, e.g., ''BT308''—the prototype [[Avro Lancaster]], or ''XS903''—an [[English Electric Lightning|English Electric Lightning F.6]] at one time based at RAF [[Binbrook]].<ref>{{cite web|url=http://1000aircraftphotos.com/Contributions/DentonNeville/6467.htm|title=British Aircraft Corporation Lightning F.Mk.6|website=1000aircraftphotos.com|access-date=2 June 2007|archive-date=29 September 2007|archive-url=https://web.archive.org/web/20070929084235/http://1000aircraftphotos.com/Contributions/DentonNeville/6467.htm|url-status=live}}</ref> During the [[World War II|Second World War]] RAF aircraft that were [[Secrecy|secret]] or carrying secret equipment had "/G" (for "Guard") appended to the serial, denoting that the aircraft was to have an armed guard at all times while on the ground, e.g., ''LZ548/G''—the prototype [[de Havilland Vampire]] [[jet engine|jet]] [[Fighter aircraft|fighter]], or ''ML926/G''—a [[de Havilland Mosquito|de Havilland Mosquito XVI]] experimentally fitted with [[H2S radar]]. Prior to this scheme the RAF, and predecessor [[Royal Flying Corps]] (RFC), utilized a serial consisting of a letter followed by four figures, e.g., ''D8096''—a [[Bristol F.2 Fighter]] currently owned by the [[Shuttleworth Collection]], or ''K5054''—the prototype [[Supermarine Spitfire]]. The serial number follows the aircraft throughout its period of service.
 
In 2009, the U.S. [[U.S. Food and Drug Administration|FDA]] published draft guidance for the [[pharmaceutical industry]] to use serial numbers on prescription drug packages.<ref name=giss>{{cite web|last=Food and Drug Administration |title=Guidance for Industry Standards for Securing the Drug Supply Chain - Standardized Numerical Identification for Prescription Drug Packages Draft Guidance |website=[[Food and Drug Administration]] |url=https://www.fda.gov/oc/guidance/drugsupplychain.html |access-date=19 April 2009 |url-status=dead |archive-url=https://web.archive.org/web/20090511135327/https://www.fda.gov/oc/guidance/drugsupplychain.html |archive-date=11 May 2009 }}</ref> This measure is intended to enhance the [[traceability]] of drugs and to help prevent [[counterfeit medications|counterfeiting]]. The FDA also required a serial number or lot number to be added to [[breast implant]]s.<ref>{{cite web | url=https://www.mbcalliance.org/guestblogposts/force-content/stronger-guidance-about-breast-implant-safety/ | title=Stronger guidance about breast implant safety | date=14 December 2021 }}</ref>
You take 4 random samples. The serial numbers are 2,7,34,13. Thus the difference is 34-2=32. The expected proportion is 0.6 The expected population size is 32 / 0.6 = 53 and the standard deviation of the expected proportion is 0.2
 
==Serial number arithmetic==
<pre>numofsamples = 2 proportion = 0.333 std_dev = 0.236
Serial numbers are often used in [[network protocol]]s. However, most [[sequence number]]s in computer protocols are limited to a fixed number of bits, and will [[arithmetic overflow|wrap around]] after sufficiently many numbers have been allocated. Thus, recently allocated serial numbers may duplicate very old serial numbers, but not other recently allocated serial numbers. To avoid ambiguity with these non-unique numbers, {{IETF RFC|1982}} "Serial Number Arithmetic", defines special rules for calculations involving these kinds of serial numbers.
numofsamples = 3 proportion = 0.500 std_dev = 0.224
numofsamples = 4 proportion = 0.600 std_dev = 0.200
numofsamples = 5 proportion = 0.667 std_dev = 0.178
numofsamples = 6 proportion = 0.714 std_dev = 0.160
numofsamples = 7 proportion = 0.750 std_dev = 0.144
numofsamples = 8 proportion = 0.778 std_dev = 0.132
numofsamples = 9 proportion = 0.800 std_dev = 0.121
numofsamples = 10 proportion = 0.818 std_dev = 0.111
numofsamples = 11 proportion = 0.833 std_dev = 0.103
numofsamples = 12 proportion = 0.846 std_dev = 0.097
numofsamples = 13 proportion = 0.857 std_dev = 0.090
numofsamples = 14 proportion = 0.867 std_dev = 0.085
numofsamples = 15 proportion = 0.875 std_dev = 0.080
</pre>
 
[[Lollipop sequence numbering|Lollipop sequence number space]]s are a more recent and sophisticated scheme for dealing with finite-sized sequence numbers in protocols.
 
== Applications of serial numbering ==
Serial numbers are valuable in [[quality control]], as once a defect is found in the production of a particular batch of product, the serial number will quickly identify which units are affected. Serial numbers are also used as a deterrent against theft and counterfeit products in that serial numbers can be recorded, and stolen or otherwise irregular goods can be identified.
 
Many computer programs come with serial numbers, often called "CD keys," and the installers often require the user to enter a valid serial number to continue. These numbers are verified using a certain [[algorithm]] to avoid usage of counterfeit keys.
 
Serial numbers also help track down [[counterfeit]] [[currency]], because in some countries each [[banknote]] has a unique serial number.
 
The [[ISSN]] or International Standard Serial Number seen on magazines and other periodicals, an equivalent to the [[ISBN]] applied to books, is serially assigned but takes its name from the [[library science]] use of serial to mean a periodical.
 
Certificates and [[Certificate Authorities]] (CA) are necessary for widespread use of [[cryptography]]. These depend on applying mathematically rigorous serial numbers and serial number arithmetic
 
The term "serial number" is also used in military formations as an alternative to the expression [["service number"]].
 
==See also==
{{div col}}
*{{annotated link|Engine number}}
*{{annotated link|English numerals}}
*{{annotated link|Numbering scheme}}
*{{annotated link|Part number}}
*{{annotated link|Product key}}
*{{annotated link|Sequence number}}
*{{annotated link|SQL}} (serial identifiers for databases)
*{{annotated link|United Kingdom military aircraft registration number}}
*{{annotated link|United States military aircraft serial numbers}}
*{{annotated link|Vehicle identification number}}
*{{annotated link|Arithmometer}} – one of the first machines to sport a unique serial number
{{div col end}}
 
== Sources ==
*[[Cardinal number]]
*Elz, R., and R. Bush, {{IETF RFC|1982}} "Serial Number Arithmetic", Network Working Group, August 1996.
*[[Ordinal number]]
*Plummer, William W. [http://www.isi.edu/in-notes/ien/ien74.txt "Sequence Number Arithmetic"] {{Webarchive|url=https://web.archive.org/web/20081221213405/http://www.isi.edu/in-notes/ien/ien74.txt |date=21 December 2008 }}. Cambridge, Massachusetts: Bolt Beranek and Newman, Inc., 21 September 1978.
*[[Nominal number]]
*[[Numbering scheme]]
 
==References==
{{Reflist}}
 
William W. Plummer, "Sequence Number Arithmetic" BB&N Inc, September 1978.
 
R. Elz and R. Bush, "Serial Number Arithmetic" Network Working Group, August 1996
 
==External links==
*[http://www.issn.org ISSN International Centre]
 
{{DEFAULTSORT:Serial Number}}
*[http://rfc.sunsite.dk/rfc/rfc1982.html RFC 1982]
[[Category:Serial numbers| 20081221213405
*[http://www.issn.org:8080/pub/ ISSN Home page]
]]
*[http://www.garykessler.net/library/crypto.html An Overview of Cryptography]
 
[[Category:Numbers]]
 
[[de:Seriennummer]]