IP Library Granted Patent US 7,634,470
Granted Patent B2
US 7,634,470 · App. 11/189,185 · Granted Dec 15, 2009

Efficient searching techniques

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,634,470
App. No.
11/189,185
Granted
Dec 15, 2009
Kind
B2
Abstract

The present invention describes techniques for performing searches in an efficient manner while minimizing the memory resources required to perform the searches. According to the techniques of the present invention, the number of comparisons needed to determine if a query element is in included in a set of elements is proportional to the length of the query element and independent of the number of elements in the set of elements.

Claims (82)

1. A computer-implemented method of determining if a query element is included in a set of elements comprising one or more elements from a first domain having a character set of “m” characters and “Z” is the maximum possible length of an element in the first domain, the method comprising:

providing a processor and associated memory;

using the processor to build a data structure based upon the set of elements, the data structure comprising “Z” memory structures, each memory structure comprising “m” slots, each slot comprising a first memory location and an array of memory locations, each array of memory locations comprising “(m+1)” memory locations;

storing the data structure using the memory;

receiving information identifying the query element; and

using the data structure to determine if the query element is included in the set of elements such that the number of comparisons needed to determine if the query element is included in the set of elements is proportional to a length of the query element and independent of the number of elements in the set of elements;

wherein building the data structure based upon the set of elements comprises:

initializing the first memory location and memory locations in the array of memory locations of each slot in each memory structure to null values;

for each element “R” in the set of elements, where R=c 1 c 2 , . . . c f for some f≦Z, for each c i where 1≦i≦f:

if (“i”<“f”):

storing a non-null value in a memory location corresponding to character c i+1 in the array of memory locations of the slot corresponding to c i of memory structure i; and

if(“i” is equal to “f”):

storing a non-null value in the (m+1) th memory location of the array of memory locations of the slot corresponding to c i of memory structure i; and

storing a reference to element “R” in the first memory location of the slot corresponding to c i of memory structure i.

2. The method of claim 1 wherein:

receiving information identifying the query element comprises:

receiving information identifying a query element “k”, where k=c 1 C 2 . . . C q for some q≦Z;

using the data structure to determine if the query element is included in the set of elements comprises:

outputting a signal indicating that the query element is included in the set of elements if, for each c i of k:

if (“i”<“q”), a non-null value is stored in a memory location corresponding to character c i+1 in the array of memory locations of the slot corresponding to c i of memory structure i; and

if(“i” is equal to “q”), a non-null value is stored in the (m+1) th memory location in the array of memory locations of the slot corresponding to c i of memory structure i, and the first memory location of the slot corresponding to c i of memory structure i refers to the query element.

3. The method of claim 1 wherein:

receiving information identifying the query element comprises:

receiving information identifying a query element “k”, where k=c 1 c 2 . . . c q for some q≦Z; and

using the data structure to determine if the query element is included in the set of elements comprises:

outputting a signal indicating that the query element is not included in the set of elements if, for any c i of k:

if (“i” is equal to “q”), a null value is stored in the (m+1) th memory location in the array of memory locations of the slot corresponding to c i of memory structure i, or the first memory location of the slot corresponding to c i of memory structure i does not refer to the query element; and

if (“i”<“q”), a null value is stored in a memory location corresponding to character c i+1 in the array of memory locations of the slot corresponding to c i of memory structure i.

4. A computer-implemented system for determining if a query element is included in a set of elements comprising one or more elements from a first domain having a character set of “m” characters, and “Z” is the maximum possible length of an element in the first domain, the system comprising:

a processor; and

a memory coupled to the processor, the memory configured to store a plurality of code modules executable by the processor, the plurality of code modules comprising:

a code module for building a data structure based upon the set of elements, the data structure comprising “Z” memory structures, each memory structure comprising “m” slots, each slot comprising a first memory location and an array of memory locations, each array of memory locations comprising “(m+1)” memory locations;

a code module for receiving information identifying the query element; and

a code module for using the data structure to determine if the query element is included in the set of elements such that the number of comparisons needed to determine if the query element is included in the set of elements is proportional to a length of the query element and independent of the number of elements in the set of elements;

wherein the code module for building the data structure based upon the set of elements comprises:

a code module for initializing the first memory location and memory locations in the array of memory locations of each slot in each memory structure to null values;

for each element “R” in the set of elements, where R=c 1 c 2 , . . . c f for some f≦Z, for each c i where 1≦i≦f:

if (“i”<“f”):

a code module for storing a non-null value in a memory location corresponding to character c i+1 in the array of memory locations of the slot corresponding to c i of memory structure i; and

if(“i” is equal to “f”):

a code module for storing a non-null value in the (m+1) th memory location of the array of memory locations of the slot corresponding to c i of memory structure i; and

a code module for storing a reference to element “R” in the first memory location of the slot corresponding to c i of memory structure i.

5. The system of claim 4 wherein:

the code module for receiving information identifying the query element comprises:

a code module for receiving information identifying a query element “k”, where k=c 1 c 2 . . . c q for some q≦Z;

the code module for using the data structure to determine if the query element is included in the set of elements comprises:

a code module for outputting a signal indicating that the query element is included in the set of elements if, for each c i of k:

if (“i”<“q”), a non-null value is stored in a memory location corresponding to character c i+1 in the array of memory locations of the slot corresponding to c i of memory structure i; and

if(“i” is equal to “q”), a non-null value is stored in the (m+1) th memory location in the array of memory locations of the slot corresponding to c i of memory structure i, and the first memory location of the slot corresponding to c i of memory structure i refers to the query element.

6. The system of claim 4 wherein:

the code module for receiving information identifying the query element comprises:

a code module for receiving information identifying a query element “k”, where k=c 1 c 2 . . . c q for some q≦Z; and

the code module for using the data structure to determine if the query element is included in the set of elements comprises:

a code module for outputting a signal indicating that the query element is not included in the set of elements if, for any c i of k:

if(“i” is equal to “q”), a null value is stored in the (m+1) th memory location in the array of memory locations of the slot corresponding to c i of memory structure i, or the first memory location of the slot corresponding to c i of memory structure i does not refer to the query element; and

if (“i”<“q”), a null value is stored in a memory location corresponding to character c i+1 in the array of memory locations of the slot corresponding to c i of memory structure i.

7. A computer program product stored on a computer-readable storage medium for determining if a query element is included in a set of elements comprising one or more elements from a first domain having a character set of “m” characters, and “Z” is the maximum possible length of an element in the first domain, the computer program product comprising:

code for building a data structure based upon the set of elements, the data structure comprising “Z” memory structures, each memory structure comprising “m” slots, each slot comprising a first memory location and an array of memory locations, each array of memory locations comprising “(m+1)” memory locations;

code for receiving information identifying the query element; and

code for using the data structure to determine if the query element is included in the set of elements such that the number of comparisons needed to determine if the query element is included in the set of elements is proportional to a length of the query element and independent of the number of elements in the set of elements;

wherein the code for building the data structure based upon the set of elements comprises:

code for initializing the first memory location and memory locations in the array of memory locations of each slot in each memory structure to null values;

for each element “R” in the set of elements, where R=c 1 c 2 , . . . c f for some f≦Z, for each c i where 1≦i≦f:

if (“i”<“f”):

code for storing a non-null value in a memory location corresponding to character c i+1 in the array of memory locations of the slot corresponding to c i of memory structure i; and

if(“i” is equal to “f”):

code for storing a non-null value in the (m+1) th memory location of the array of memory locations of the slot corresponding to c i of memory structure i; and

code for storing a reference to element “R” in the first memory location of the slot corresponding to c i of memory structure i.

8. The computer program product of claim 7 wherein:

the code for receiving information identifying the query element comprises:

code for receiving information identifying a query element “k”, where where k=c 1 c 2 . . . c q for some q≦Z;

the code for using the data structure to determine if the query element is included in the set of elements comprises:

code for outputting a signal indicating that the query element is included in the set of elements if, for each c i of k:

if (“i”<“q”), a non-null value is stored in a memory location corresponding to character c i+1 in the array of memory locations of the slot corresponding to c i of memory structure i; and

if(“i” is equal to “q”), a non-null value is stored in the (m+1) th memory location in the array of memory locations of the slot corresponding to c i of memory structure i, and the first memory location of the slot corresponding to c i of memory structure i refers to the query element.

9. The computer program product of claim 7 wherein:

the code for receiving information identifying the query element comprises:

code for receiving information identifying a query element “k”, where k=c 1 c 2 . . . c q for some q≦Z;

the code for using the data structure to determine if the query element is included in the set of elements comprises:

code for outputting a signal indicating that the query element is not included in the set of elements if, for any c i of k:

if(“i” is equal to “q”), a null value is stored in the (m+1) th memory location in the array of memory locations of the slot corresponding to c i of memory structure i, or the first memory location of the slot corresponding to c i of memory structure i does not refer to the query element; and

if (“i”<“q”), a null value is stored in a memory location corresponding to character c i+1 in the array of memory locations of the slot corresponding to c i of memory structure i.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 12, 2012
From: ARCOT SYSTEMS, INC.
To: COMPUTER ASSOCIATES THINK, INC.
Reel/Frame 028943/0020 →
MERGER Recorded Sep 12, 2012
From: COMPUTER ASSOCIATES THINK, INC.
To: CA, INC.
Reel/Frame 028943/0463 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 20, 2008
From: RAJASEKARAN, SANGUTHEVAR; GOPALAKRISHNA, RAJENDRA A.
To: ARCOT SYSTEMS, INC.
Reel/Frame 021418/0784 →