# US 2012/0254238 A1 · Managing uncertain data using monte carlo techniques

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2012/0254238 A1
- Document ID: US20120254238A1
- Status: Published application
- Kind: A1
- Application number: 13/495,610
- Filed: 2012-06-13
- Published: 2012-10-04
- Earliest claimed: 2009-06-03
- Assignees: International Business Machines Corporation
- Inventors: Peter Jay Haas; Ravindranath Jampani; Christopher Matthew Jermaine; Luis Leopoldo Perez; Mingxi Wu; Fei Xu
- Web page: https://patentgrep.com/patent/US20120254238A1

## CPC

- G06F 16/2462: {Approximate or statistical queries}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

According to one embodiment of the present invention, a method for managing uncertain data is provided. The method includes specifying data uncertainty using at least one variable generation (VG) function. The VG function generates pseudorandom samples of uncertain data values. A random database based on the VG function is specified and multiple Monte Carlo instantiations of the random database are generated. Using a Monte Carlo method, a query is repeatedly executed over the multiple Monte Carlo instantiations to output a Monte Carlo method result and associated query-results. The Monte Carlo method result may then be used to estimate statistical properties of a probability distribution of the query-result.

## Claims

### Claim 1

A method comprising:
specifying data uncertainty using at least one variable generation (VG) function, wherein said VG function generates pseudorandom samples of uncertain data values;
specifying a random database based on said VG function;
generating a number N Monte Carlo instantiations of said random database, wherein N is a number greater than 1;
identifying a database tuple bundle t, wherein the database tuple bundle t is a data structure representing N instantiations of a tuple in the N Monte Carlo instantiations;
executing a query Q over the N Monte Carlo instantiations, wherein said executing comprises:
executing a query plan for the query Q once over the set of all database tuple bundles; and
outputting zero or more numerical values that are used to estimate statistical properties of the probability distribution of the result of the query Q.

### Claim 2 (depends on 1)

The method according to claim 1, further comprising representing the database tuple bundle t in a compressed form in which only pseudorandom numbers used to generate the uncertain data values are represented.

### Claim 3 (depends on 2)

The method according to claim 2, further comprising expanding the database tuple bundle t represented in the compressed form to an expanded form, wherein the database tuple bundle t is represented in the expanded form when all instantiated attribute values are explicitly represented.

### Claim 4 (depends on 2)

The method according to claim 2, where executing the query plan further comprises filtering out tuples based on the compressed form of the database tuple bundle.

### Claim 5 (depends on 1)

The method according to claim 1 wherein said outputting comprises outputting a set of pairs (v,f), where each v is a distinct tuple and f is the fraction of said Monte Carlo instantiations in which said tuple v appears at least once in a query result.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the second query computes an average of query-results in the table.

### Claim 7 (depends on 1)

The method according to claim 1, further comprising:
maintaining a running statistical property of query-results as each query-result is determined, wherein each query-result corresponds to one of the N Monte Carlo instantiations; and
after N query-results are determined, outputting the final value of the running statistical property to be the estimated statistical property of the probability distribution of the result of the query Q.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
outputting N query-results, wherein each query-result corresponds to one of the N Monte Carlo instantiations; and
using the N query-results, computing an estimate of a statistical property of the probability distribution of the result of the query Q.

### Claim 9 (depends on 1)

The method according to claim 1, wherein specifying said random database based on the VG function comprises specifying random tables based on the VG function.

### Claim 10

A method comprising:
specifying data uncertainty using at least one variable generation (VG) function, wherein said VG function generates pseudorandom samples of uncertain data values;
specifying a random database based on said VG function;
generating multiple Monte Carlo instantiations of said random database;
using a Monte Carlo method, repeatedly executing a query over said multiple Monte Carlo instantiations to output a Monte Carlo method result and associated query-results; and
using said Monte Carlo method result, estimating statistical properties of a probability distribution of said query-result.

### Claim 11 (depends on 10)

The method according to claim 10, wherein repeatedly executing said query over said multiple Monte Carlo instantiations comprises executing said query over each of said Monte Carlo instantiations to output an associated query-result for each of said Monte Carlo instantiations.

### Claim 12 (depends on 10)

The method according to claim 10, wherein specifying said random database based on said VG function comprises specifying random tables based on said VG function.

### Claim 13 (depends on 12)

The method according to claim 12, wherein specifying random tables based on said VG function comprises specifying random tables of a relational database based on said VG function.

### Claim 14 (depends on 10)

The method according to claim 10, wherein said VG function is user-defined.

### Claim 15 (depends on 14)

The method according to claim 14, wherein the VG function is parameterized and is based on results of SQL queries executed over parameter tables stored in a relational database.

### Claim 16

A system comprising:
a database containing uncertain data values and zero or more parameter tables;
a variable generation (VG) function component that receives the results of SQL queries over said parameter tables as input and that outputs pseudorandom samples of said uncertain data values;
a random database comprising said pseudorandom samples;
a processor generating multiple Monte Carlo instantiations of said random database;
a query execution component receiving a query and executing a query over said multiple Monte Carlo instantiations to output a Monte Carlo result and associated query-results; and
a statistical property estimator receiving said Monte Carlo result and estimating statistical properties of a probability distribution of said query result.

### Claim 17

A computer program product for managing uncertain data, said computer program product comprising a non-transitory computer readable medium having computer usable program code embodied therewith, said computer usable program code configured to:
specify data uncertainty using at least one variable generation (VG) function, wherein said VG function generates pseudorandom samples of uncertain data values;
specify a random database based on said VG function;
generate multiple Monte Carlo instantiations of said random database;
using a Monte Carlo method, repeatedly execute a query over said multiple Monte Carlo instantiations to output a Monte Carlo method result and associated query-results; and
using said Monte Carlo method result, estimate statistical properties of a probability distribution of said query-result.
