Calculate item from n-size cross product without creating product?

Click For Summary
SUMMARY

The discussion focuses on calculating specific sets from a Cartesian product of an array without generating the entire product. The user has an array A of length 512 and seeks to determine the set at a specific index after performing the Cartesian product multiple times. The example provided illustrates the Cartesian product of a smaller array, demonstrating the exponential growth of the resulting sets. The key challenge is efficiently accessing elements without full iteration through the product.

PREREQUISITES
  • Understanding of Cartesian product in set theory
  • Familiarity with array indexing and manipulation
  • Basic knowledge of combinatorial mathematics
  • Experience with programming concepts for efficient algorithm design
NEXT STEPS
  • Research algorithms for calculating Cartesian products without full enumeration
  • Learn about indexing techniques in combinatorial data structures
  • Explore programming languages that support efficient array manipulation, such as Python or JavaScript
  • Investigate mathematical approaches to optimize set retrieval in large datasets
USEFUL FOR

Mathematicians, software developers, data scientists, and anyone involved in combinatorial algorithms or needing efficient data retrieval methods.

SophieP
Messages
8
Reaction score
0
Hi all,

I'm trying to work out how I can get the set at specific index in a cross product without creating the whole product.

For instance:

I have array A of length 512

I also have a number that specifies how many times that array needs to be 'cross-producted' against itself.

This gives me a potentially huge set of sets. I need to be able to work out what the set is at a particular point, without iterating through the entire cross product creation procedure.

Anyone have any advice?
 
Physics news on Phys.org
What doew "cross product" mean in this context?
 
Hi Mathman,

As an example:

A = [1, 2, 3, 4]

gives:
1,1
1,2
1,3
1,4
2,1
2,2
2,3
2,4
3,1
3,2
3,3
3,4
4,1
4,2
4,3
4,4

I've just noticed that I meant to say Cartesian product, sorry!
 
Last edited:

Similar threads

Replies
21
Views
4K
  • · Replies 14 ·
Replies
14
Views
4K
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
5
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K