The presently disclosed embodiments are directed to providing bit coding, more particularly to encoding and decoding N-bit memory devices, and even more particularly to encoding and decoding N-bit memory devices such that orientation of a memory device relative to a reader does not alter the determination of memory device contents.
Printed memory (PM) labels and devices are manufactured in a variety of sizes, including twenty (20) bit, which has a symmetrical arrangement of electrical contacts or contact pads. An example of a 20-bit PM is depicted in
The present disclosure addresses a method for encoding and decoding N-bit data so that label to reader orientation does not alter the determined value of a printed memory label.
For an N-bit label, there are 2N possible states, including mostly non-palindromes and a few palindromes. This leaves O(2(N−1)) distinct states. The present disclosure provides an encoding mapping ƒ from “data” states to “encoded” states, and a decoding mapping g from “encoded” states to “data” states, where g recovers the original data even if the encoded state is reversed before decoding. In an embodiment, the present method analyzes a sequence of symmetrically oriented pairs in the encoded state. For each pair, if the bit values are identical, their shared value is retained and that embodiment of the present algorithm moves to the next pair. If the bit values in a pair are not identical, they are used to establish a reading direction and the remaining bits are collected as a group. Each pairwise comparison is a dictionary split, catching half as many cases as the previous comparison, until the only remaining values are palindromes.
In another embodiment, distinct encoded states are enumerated to establish a mapping. Specifically, those encoded states which are not less than their reverse are listed in a particular order based on triangular numbers. To encode a data state for a label with an even number of bits, the largest triangular number less than or equal to the data state is computed. The index of the triangular number is used for the first half of the encoded state, and the second half of the encoded state is given by the reverse of the remainder when the triangular number is subtracted from the data state. For a label with an odd number of bits, the least significant bit is placed in the center of the encoded state, and the rest of the encoded state is computed based on the even number of remaining bits. To decode an encoded state from a label with an even number of bits, the larger of the encoded state or its reverse is used. The triangular number indexed by the first half of the resulting state is computed. To this is added the reverse of the second half. For a label with an odd number of bits, the center bit is appended to the sum calculated from the even number of remaining bits.
The present disclosure sets forth an embodiment of this type, using a formulation that works for both odd and even values of N, as well as being directly extendible to cover the entire set of solutions to the problem statement via transformations including permutation transformations, symmetric bit-swapping transformations and symmetric bit-flipping transformations. Selection from among this family may be useful for mild encryption, i.e., to make the coding specific to a particular application, device, or user.
Broadly, the present disclosure sets forth a printed memory reader adapted to determine an original value from a printed memory device including a plurality of contact pads and an encoded value created by encoding the original value. The encoded value includes N bits of data, where N is equal to a number of bits of data stored in the printed memory device. The printed memory reader includes a plurality of probes arranged to contact the plurality of contact pads and a memory storage element including instructions programmed to execute the steps: a) reading the encoded value or an inverse encoded value from the printed memory label using the plurality of probes to obtain a read value; and, b) decoding the read value to obtain a decoded value equal to the original value. The printed memory reader further includes a processor arranged to execute the instructions.
Additionally, the present disclosure sets forth a printed memory reader adapted to determine a first value from a printed memory device including a plurality of contact pads and a second value created by encoding the first value. The second value including N bits of data, where N is equal to a number of bits of data stored in the printed memory device. The printed memory reader includes a plurality of probes arranged to contact the plurality of contact pads and a memory storage element comprising instructions programmed to execute the steps: a) reading a third value from the printed memory label using the plurality of probes, wherein the third value is equal to the second value or an inverse of the second value; and, b) decoding the third value to obtain a fourth value equal to the first value. The printed memory reader further includes a processor arranged to execute the instructions.
Moreover, the present disclosure sets forth a method of using a printed memory device for storage and retrieval of an original value. The method includes: a) encoding the original value to form an encoded value having N bits of data, where N is equal to a number of bits of data stored in the printed memory device, such that an alternate value cannot yield an alternate encoded value equal to the encoded value or an inverse encoded value; and, b) storing the encoded value on the printed memory device. In some embodiments, the method further includes: c) reading the encoded value using a printed memory reader to obtain a read value, wherein the read value is the encoded value or the inverse encoded value; and, d) decoding the read value to obtain the original value.
Other objects, features and advantages of one or more embodiments will be readily appreciable from the following detailed description and from the accompanying drawings and claims.
Various embodiments are disclosed, by way of example only, with reference to the accompanying drawings in which corresponding reference symbols indicate corresponding parts, in which:
At the outset, it should be appreciated that like drawing numbers on different drawing views identify identical, or functionally similar, structural elements of the embodiments set forth herein. Furthermore, it is understood that these embodiments are not limited to the particular methodologies, materials and modifications described and as such may, of course, vary. It is also understood that the terminology used herein is for the purpose of describing particular aspects only, and is not intended to limit the scope of the disclosed embodiments, which are limited only by the appended claims.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood to one of ordinary skill in the art to which these embodiments belong.
As used herein, the term “inverse”, when in conjunction with a string or binary value, e.g., the inverse of a read value or the inverse read value, is intended to mean the reverse order of a particular value. For example, if a read value is “01001101”, an inverse of the read value or the inverse read value is “10110010”. Moreover, as used herein, the term “palindrome” is intended to mean a number or sequence of characters which reads the same backwards as forwards. For example, read values of “10011011001” and “1100110011” are both palindrome values. Furthermore, as used herein, the term ‘average’ shall be construed broadly to include any calculation in which a result datum or decision is obtained based on a plurality of input data, which can include but is not limited to, weighted averages, yes or no decisions based on rolling inputs, etc.
Additionally, as used herein, a “truncated value” is intended to mean a string or binary value having its terminal bit removed. For example, the truncated value for the binary value “10110010” is “1011001”. Furthermore, as used herein, a “diminished value” is intended to mean a string or binary value having its center bit removed. For example, the diminished value for the binary value “1011001” is “101001”.
Moreover, although any methods, devices or materials similar or equivalent to those described herein can be used in the practice or testing of these embodiments, some embodiments of methods, devices, and materials are now described.
The various embodiments of the basic algorithm described herein has been implemented as Excel® functions in Visual Basic for Applications (VBA), together with a small set of more general functions for handling binary numbers. The current implementations handle numbers up to 49 bits, since this is the precision that can be stored in a single numeric Excel® cell. However, it should be appreciated that the present algorithms may include support for larger numbers of bits by storing the data in strings, and/or using a more sophisticated programming language to speed up encoding and decoding operations, e.g., C++ programming language.
The present algorithms provide a method by which a single reader module, e.g., reader 24, may be used for multiple configurations of printed memory device, e.g., wallet cards 26 and 28. The PM will be written with the wallet card integrated into a display card, as shown in cards 26 and 28 in
It should be appreciated that the embodiments described herein may be implemented with a printed memory reader. Reader 24 may include a plurality of probes 30 arranged to contact a plurality of contact pads 22. Reader 24 may further include memory storage element 32 including instructions programmed to execute the steps of the various embodiments set forth herebelow. Printed memory reader 24 further comprises processor 34 arranged to execute the aforementioned instructions.
Notation
[A . . . B) will represent the set {x∈Z:A≤x<B} where Z is the set of integers. Specifically, [0 . . . N) will represent the set of cardinality N representing the non-negative integers strictly less than N. If B≤A, then [A . . . B) is the empty set. The modulus function is defined such that 0≤x(mod b)<b and x=k·b+x(mod b) for some k∈Z. The floor function is defined by └x┘x−x(mod 1). The ceiling function is similarly defined by ┌x┐−└−x┘. A mapping ƒ from set U to set V will be declared as ƒ:U→V. A composition of mappings ƒ:U→V and g:T→U will be denoted ƒ*g:T→V. The inverse off, if it exists, will of course be written as ƒ−1 with the identity mapping I, so that ƒ−1*ƒ=ƒ*ƒ−1=I. A binary number with N digits will be represented by x(N). The concatenation of two binary numbers is defined according to x(N)∘y(M)(x·2M+y)(N+M). The specific mapping r is defined as the bit-reversal mapping, which may be defined recursively by (rx)(1)x(1) and r(x(N)∘y(M))=ry(M)∘rx(N). The triangular numbers tq are given by
Problem Statement
For an N-bit label, the possible states are └0 . . . 2N). Of these 2N states,
are palindromes, i.e., they are invariant under bit-reversal. That leaves
non-palindrome states. Each of these is indistinguishable from one other non-palindrome state with the same bits in reversed order. That means there are
distinct non-palindrome states when the orientation of the label is not known. The total number of distinct states under this condition is then
This means that we seek an encoding mapping
and a decoding mapping g:
such that g*ƒ=g*r*ƒ=I. In practice, there are a large number of choices of ƒ and
to be exact, although we will consider functions ƒ1 and ƒ2 to be equivalent when
This reduces the space of mapping functions to
choices of ƒ and allows us to consider g to be the inverse of ƒ We will describe two embodiments in particular which are readily characterized in terms of N, then extend them to more general embodiments.
Embodiment A
The embodiment presented herebelow builds on one of the alternative strategies presented infra, i.e., Strategy 2. First, Strategy 2 is examined with the notation set forth above:
Clearly, half of the 2N available code states are not being used, so Strategy 2 is inefficient. Specifically, the 0(1)∘x(N−2)∘0(1) and 1(1)∘x(N−2)∘1(1)) code states do not code for any data state under this scheme. As a result, only 2(N−2) of the theoretical
distinguishable data states can be encoded, i.e., a waste of slightly more than one bit.
Embodiment A is similar to Strategy 2, but partitions the available data and code spaces to use all the available code states. To introduce Embodiment A, the solution will be presented first for even N and then for odd N. For N even:
For N Odd:
For General N∈N and j∈[0 . . . └N/2┘):
Using this general form, it is straightforward to describe an encoding mapping ƒ and decoding mapping g in an algorithm. Proof of the desired quality g*ƒ=g*r*ƒ=I is readily apparent to one having ordinary skill in the art upon inspection.
Example 1—Embodiment A—Encode—Between 25 and 29
——0————1——
Example 1—Embodiment A—Decode—Mismatch Before the Middle
——————1011
——————1011
————101011
——————101011
———1101011
————1101011
Example 2—Embodiment A—Encode—Less than 25
Example 2—Embodiment A—Decode—No Mismatch (Palindrome)
Example 3—Embodiment A—Encode—More than 29
Example 3—Embodiment A—Decode—Mismatch in the Middle
Generalizations of Embodiment A
This embodiment suggests a number of other solutions that may be obtained via simple transformations relative to the proposed solution, including any combination of the following:
Implementation of Embodiment A
As described above, the foregoing basic algorithm has been implemented as a pair of Excel® functions in VBA, together with a small set of more general functions for handling binary numbers.
Embodiment B
Embodiment B hinges on an explicit enumeration of all N-bit encoded states x(N) with the property x(N)≥rx(N). With
defined by
note that
With this formulation, it is noted that the encoded value is never smaller than its inverse, and palindromes occur precisely when p is one less than a triangular number, i.e., p=thp+hp. The strategy behind Embodiment B becomes clearer when grouped by values of hp, as tabulated on the following tables. Here k is used for hp+1.
Solution Embodiment B
Example 1—Embodiment B—Encode—Even N
11100 _ _ _ _ _
Example 1—Embodiment B—Decode—Even N
Example 2—Embodiment B—Encode—Odd N
00010111
0 → p = 23
0110 _ _ _ _ _
Example 2—Embodiment B—Decode—Odd N
Example 3—Embodiment B—Encode—Palindrome
11010 _ _ _ _ _
Example 3—Embodiment B—Decode—Palindrome
Generalizations of Embodiment B
While symmetric reorderings and symmetric bitwise-XOR transforms can generate a family of solutions from Embodiment B, any permutation transform will allow computation of the full generality of possible mappings. If
is a permutation of states (any invertible z qualifies), then transforming the payload data by z will generate another valid mapping from Embodiment A or B. For every valid mapping ƒ there is a permutation that converts Embodiment A to ƒ and another that converts Embodiment B to ƒ. Permutations may be generated from a deterministic function, a random bitstream, or a key file by known methods. For N bits there are
permutations, any one of which may be characterized by
bits. By Stirling's approximation, this file size is O(N2N). For 20 bits this is a file of just over 1 MB. For larger bit strings, a deterministic function may be more appropriate. Symmetric reorderings, symmetric bitwise-XOR transforms, and combinations thereof constitute some examples of deterministic functions that may be used to generate permutation transforms.
Implementation of Embodiment B
As in Embodiment A, Embodiment B can be implemented via Excel® formulas as generally follows:
As described above, the foregoing basic algorithm has been implemented as a pair of Excel® functions in VBA, together with a small set of more general functions for handling binary numbers.
Table 1 below includes a listing of Visual Basic functions used in various embodiments of algorithms and software code arranged to perform the present methods. It should be appreciated the functions below include the operators relevant to the various disclosed embodiments; however, other operators conventionally associated with these functions may also be used.
The following section include a full Visual Basic listing of embodiments of algorithms and software code that are arranged to perform steps as described in the accompanying flowcharts. Functions LSB, StrRev, BitString, BitValue, BitSymEnc (embodiments A and B), and BitSymDec (embodiments A and B) are included below.
LSB (Least Significant Bit—Returns the 0-Indexed jth Least Significant Bit) Function:
StrRev (String Reverse—Returns the String in Reverse Format) Function:
BitString (Bit Number to String—Converts Numeric Data to a String of “1”s and “0”s) Function:
BitValue (String to Number—Converts a String of “1”s and “0”s to Numeric Data) Function:
BitSymEncA (Encodes Data for N-Bit Printed Memory—Embodiment A) Function:
BitSymDecA (Decodes Data for N-Bit Printed Memory—Embodiment A) Function:
BitSymEncB (Encodes Data for N-Bit Printed Memory—Embodiment B) Function:
BitSymDecB (Decodes Data for N-Bit Printed Memory—Embodiment B) Function:
Alternate Embodiments
An alternate embodiment, hereinafter referred to as Strategy 1, is depicted in
Another alternate embodiment, hereinafter referred to as Strategy 2, is a simple software approach. A symmetrically oriented pair of bits is chosen and then 0 and 1 are written to those bits, respectively. This embodiment uses two bits of memory to establish what is essentially one bit of information, i.e., 0 represents a first orientation and 1 represents a second bit of orientation. For example, the printed memory could include bit 0=0 and bit 19=1, or any symmetrically oriented pair. Thus, the reader could detect the orientation of the symmetrical pair of bits and determine orientation of the label accordingly.
Generally, the presently disclosed algorithms and methods provide a coding scheme for capturing just over N−1 bits of information in an N-bit memory cell, such that reversing the bit order of the N-bits preserves the N−1 bits payload data. Moreover, the present methods can be directly extended to cover the entire set of solutions to the problem statement via transformations including permutation transformations, symmetric bit-swapping transformations and symmetric bit-flipping transformations. The disclosed methods permit payload data to be robust to, i.e., unaffected by, 180° rotation of the PM carrier body. The methods enable a single reader to register bodies of various configurations. The methods may be easily modified for a particular application, device, or user, while also providing a lower cost option than building a reader compatible with both orientations. Moreover, the methods are more efficient than an approach dedicating two bits to orientation determination.
This technology may be used as an optional part of printed memory solutions, as an alternative to more expensive readers, reduced bit capacity, or mechanical means of enforcing orientation. For example, one use may be as a key enabler to use a single reader for a wallet card before and after it has been punched out of its display card. Moreover, although the encoding and decoding actions are in some embodiments described as actions performed by separate devices, e.g., a printed memory reader or a printed memory writer, it is within the scope of the present disclosure to perform both encoding and decoding actions within a common device or unit.
It will be appreciated that various of the above-disclosed and other features and functions, or alternatives thereof, may be desirably combined into many other different systems or applications. Various presently unforeseen or unanticipated alternatives, modifications, variations or improvements therein may be subsequently made by those skilled in the art which are also intended to be encompassed by the following claims.
This patent application claims the benefit under 35 U.S.C. § 119(e) of U.S. Provisional Patent Application No. 62/214,606, filed Sep. 4, 2015, which application is incorporated herein by reference.
Number | Name | Date | Kind |
---|---|---|---|
5288981 | Davis | Feb 1994 | A |
5889698 | Miwa | Mar 1999 | A |
7127004 | Sonning | Oct 2006 | B1 |
7286066 | Ho | Oct 2007 | B1 |
9008234 | Ko | Apr 2015 | B2 |
20080244349 | Sukegawa | Oct 2008 | A1 |
20110154503 | Stewart | Jun 2011 | A1 |
20130132652 | Wood | May 2013 | A1 |
20140095956 | Ozdemir | Apr 2014 | A1 |
20150019799 | Higo | Jan 2015 | A1 |
20160057437 | Jeong | Feb 2016 | A1 |
20170186500 | Motwani | Jun 2017 | A1 |
20180012642 | Rodriguez-Latorre | Jan 2018 | A1 |
Number | Date | Country | |
---|---|---|---|
20170068830 A1 | Mar 2017 | US |
Number | Date | Country | |
---|---|---|---|
62214606 | Sep 2015 | US |