<p>Looks like some Data integrity check stuff.
For example adding something like CRC16 (4hex digits) will allow filter ID with typos</p>

CC BY-SA 3.0
2014-05-08T01:11:00.750Z
2014-05-08T05:42:32.350Z
2014-05-08T05:42:32.350Z
MolbOrg
<p>A colleague of mine recently interviewed for a software engineering job, and he was given a problem regarding unique identifier creation and testing for validation.</p>

<p>So, the problem is: if a generated  unique-identifier, let's say an order id provided online by an ecommerce site, is provided to a customer, and when the customer attempts to lookup the order, they have inadvertently transposed two characters, how to quickly test that the id is invalid, and how to create an id such that the transposition of two characters does not represent another valid id.</p>

<p>I want to know what class of problem is this (not in the complexity sense but categorically) and what are general methods that attempt to solve it. Looking for variations on the theme of unique identifier and invalidation on google has not produced interesting results. I am hoping someone here might lead me in the right direction to learn more about this kind of problem.</p>

<p>I hope I have found the right forum for posing the question, and apologies if I have not.</p>

CC BY-SA 3.0
2014-05-10T01:30:34.630Z
What are the goals or requirements?  Are you trying to minimize the length of the identifier?  Can you store a list of all valid identifiers in a database on the site?  There are many possible solutions; can you provide any evaluation criteria to help narrow this down?  What have you considered?  Have you looked at various checksum mechanisms and schemes for introducing check digits?  Are you familiar with error-correcting codes?
D.W.
CC BY-SA 3.0
2014-05-13T22:26:06.670Z
There are no explicit goals or requirements, I was more interested in gathering some search terms and keywords that cover this general kind of problem. As described in the original post it was posed as an interview question and thus was as open ended as is presented. Essentially, if I wanted to answer this question for real, what would I have to know about.
Ahmad Ragab
<string-matching>
Unique Identifier Creation and Invalidation
Ahmad Ragab
# Unique Identifier Creation and Invalidation

(Asked by: username_0 on 2014-05-08)

A colleague of mine recently interviewed for a software engineering job, and he was given a problem regarding unique identifier creation and testing for validation.

So, the problem is: if a generated unique-identifier, let's say an order id provided online by an ecommerce site, is provided to a customer, and when the customer attempts to lookup the order, they have inadvertently transposed two characters, how to quickly test that the id is invalid, and how to create an id such that the transposition of two characters does not represent another valid id.

I want to know what class of problem is this (not in the complexity sense but categorically) and what are general methods that attempt to solve it. Looking for variations on the theme of unique identifier and invalidation on google has not produced interesting results. I am hoping someone here might lead me in the right direction to learn more about this kind of problem.

I hope I have found the right forum for posing the question, and apologies if I have not.

**Tags:** string-matching

> **Comments:**
> **username_1**: What are the goals or requirements?  Are you trying to minimize the length of the identifier?  Can you store a list of all valid identifiers in a database on the site?  There are many possible solutions; can you provide any evaluation criteria to help narrow this down?  What have you considered?  Have you looked at various checksum mechanisms and schemes for introducing check digits?  Are you familiar with error-correcting codes?  
> **username_0**: There are no explicit goals or requirements, I was more interested in gathering some search terms and keywords that cover this general kind of problem. As described in the original post it was posed as an interview question and thus was as open ended as is presented. Essentially, if I wanted to answer this question for real, what would I have to know about.  

---

## 1 answers

### Answer by username_2 on 2014-05-08. Score: 0 | Accepted answer

Looks like some Data integrity check stuff.
For example adding something like CRC16 (4hex digits) will allow filter ID with typos


---

